feat: Add the esdm: reference notation for addressing model elements.#20
Draft
goloroden wants to merge 2 commits into
Draft
feat: Add the esdm: reference notation for addressing model elements.#20goloroden wants to merge 2 commits into
goloroden wants to merge 2 commits into
Conversation
Define a stable, file-independent way for documents outside a model (product specs, tickets, architecture notes) to point at a model element. The notation is a URI in the authority-less `esdm:` scheme that names the target's kind followed by its full, absolute containment path, for example `esdm:event/library/catalog/book/book-registered`. It builds on the existing logical addressing rather than introducing a stable id: it survives file moves, splits, and merges, but a rename is a refactoring that updates its references, inside the model and out. Naming the kind keeps a reference unambiguous, since a name is unique only within its kind at a given position. This first step defines and documents the notation; resolution, a CLI affordance, and validation are follow-ups. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T9ZRRMdA7iKk6in8u12rK6
goloroden
marked this pull request as draft
July 12, 2026 12:08
Member
Author
|
On hold: reopening the path structure. The reference notation should share one addressing scheme with #5 (the |
Rework the notation so a reference is the element's containment path with no kind segment, for example `esdm:library/catalog/book/book-registered`. That path is exactly the path the element occupies in a documentation tree, so supplying a base URL resolves the reference by concatenation - the same addressing scheme the future `esdm documentation` command (#5) will render, rather than a parallel one. Dropping the kind means resolution walks the hierarchy by name, which requires a name to identify exactly one element at each position across all kinds. That uniqueness is now load-bearing, so the clash it guards against (tracked in #19) becomes an error, not a warning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T9ZRRMdA7iKk6in8u12rK6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a documentation page that defines ESDM's reference notation: a stable, file-independent way for a document outside a model (a product spec, a ticket, an architecture note) to point at a model element.
A reference is a URI in the authority-less
esdm:scheme whose path is the element's containment path, from the Domain inward:The page lives under Reference (next to CLI and Core Schema), not Concepts, since it is a language mechanism rather than a Domain-Driven Design concept. It covers the grammar, the full set of addressable kinds (the 18 core kinds plus the
domain-storyandfeatureextension kinds), and the rationale.Why
Internal references between elements are already logical, so they survive file moves, splits, and merges. What was missing is a documented, absolute form an external artifact can use. This is the enabler for the spec/skill pipeline in #12.
Key design decisions (signed off beforehand)
idfield: it survives file reorganization, but a rename is a refactoring that updates its references, inside the model and out.esdm:scheme has no authority (no//), likeurn:andtag:.esdm documentationcommand (Add anesdm documentationcommand that writes the domain as a Markdown directory tree #5), not a parallel one.Status
Draft. The notation is designed to share one path scheme with #5 (
esdm documentation); it should be reviewed together with #5's tree layout before merging.Notes
make qapasses.Closes #8
🤖 Generated with Claude Code
https://claude.ai/code/session_01T9ZRRMdA7iKk6in8u12rK6