-
Notifications
You must be signed in to change notification settings - Fork 11
feat(contract): implement ADR 172 domain-storage separation #275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wmadden
merged 35 commits into
main
from
tml-2172-contract-domain-extraction-implement-adr-172-domain-storage-separation
Apr 1, 2026
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
ac3bc0e
add spec and execution plan for contract domain-storage separation
wmadden 8d9f6ba
add skill to prevent heredoc escaping in commit messages
wmadden 4b19f2b
add typechecked type design for contract domain-storage separation
wmadden 72660b2
add models intersection validation to type design
wmadden 976d08c
add domain types and widen ContractBase with roots+models
wmadden 284adff
extract domain validation from mongo-core to framework contract
wmadden e8ded02
add dual-format normalizeContract bridge and domain validation
wmadden 9dc0f84
update emitter to produce ADR 172 contract structure
wmadden 02da4ea
update emitter output fixtures and canonicalization for ADR 172
wmadden 1716780
keep models off ContractBase to avoid index signature leakage
wmadden 7d12884
add roots field to test contracts and update emitter test assertions
wmadden c98c83c
restore models on ContractBase via generic TModels parameter
wmadden c633804
refine design questions: SQL JSON relevance, M:N gap, strategy naming
wmadden c1b9bc7
ADR 177: ownership replaces relation strategy
wmadden c08f70f
update docs to use owner/storage.relations instead of strategy
wmadden a3d1424
add design question Q19: self-referential models
wmadden 76d5fc1
resolve nested ownership open question in ADR 177
wmadden b1f6ac6
align spec and plan with ADR 177: owner replaces relation strategy
wmadden f08141e
resolve all open questions in contract-domain-extraction spec
wmadden 3cd8f85
mark all spec open questions as resolved in plan
wmadden 5e022c5
strip column from emitted model.fields for ADR 172 compliance
wmadden dead52b
add owner and ownership validation to spec acceptance criteria
wmadden dc37139
clean up constructContract roots cast and emitter-lanes round-trip test
wmadden 8366f74
address review feedback: relation comment, domain shape helper, roots…
wmadden 21ead96
implement ADR 177: remove strategy from relations, add owner to models
wmadden ca2954e
update tests for ADR 177: ownership validation and strategy removal
wmadden f405490
regenerate contract fixtures: remove strategy from emitted JSON
wmadden b5fff3b
fix JSON schema: ModelField no longer requires column
wmadden 57a6af9
fix biome noBannedTypes: replace {} with Record<string, never>
wmadden 64d00f4
fix(sql-contract): raise branch coverage to meet 95% per-file threshold
wmadden a208200
docs: fix review feedback - links, ADR consistency, glossary wording
wmadden 28381bc
fix: address review feedback - own-property checks, owner schema/emis…
wmadden 653fd07
docs: add M3 (Mongo emitter hook), renumber milestones M3-M6
wmadden f114262
fix(sql-contract): harden normalizeContract dual-format bridge
jkomyno 0094f36
chore: regenerate fixtures after rebase onto origin/main
wmadden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| name: multiline-commit-messages | ||
| description: >- | ||
| Use single-quoted strings for multiline git commit messages in the Shell tool. | ||
| Prevents heredoc escaping failures that produce garbled commit messages. | ||
| --- | ||
|
|
||
| # Multiline commit messages | ||
|
|
||
| The Shell tool sends commands as a single string. Heredoc syntax (`<<'EOF'`) inside `$(cat ...)` is fragile and fails silently — the literal `$(cat <<'EOF' ...` ends up as the commit message instead of the intended text. | ||
|
|
||
| ## Rule | ||
|
|
||
| **Never** use `$(cat <<'EOF' ...)` or `$(cat <<EOF ...)` for commit messages. | ||
|
|
||
| Use single-quoted strings with embedded newlines: | ||
|
|
||
| ```bash | ||
| git commit -m 'short summary line | ||
|
|
||
| Longer body paragraph explaining why the change exists. | ||
| Additional context if needed.' | ||
| ``` | ||
|
|
||
| ## Why heredocs fail | ||
|
|
||
| The Shell tool passes the command as a single string argument. When you write: | ||
|
|
||
| ```bash | ||
| git commit -m "$(cat <<'EOF' | ||
| message | ||
| EOF | ||
| )" | ||
| ``` | ||
|
|
||
| The shell may not parse the heredoc correctly in this context — the `EOF` delimiter, newlines, and nested quoting interact unpredictably. The result is the raw `$(cat <<'EOF' ...` text appearing as the commit message. | ||
|
|
||
| Single-quoted strings with literal newlines are simple, portable, and always work. | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.