Skip to content

Add amends relationship for partial decision modification#14

Merged
jimutt merged 2 commits intomainfrom
add-amends-relationship
Mar 15, 2026
Merged

Add amends relationship for partial decision modification#14
jimutt merged 2 commits intomainfrom
add-amends-relationship

Conversation

@jimutt
Copy link
Copy Markdown
Owner

@jimutt jimutt commented Mar 15, 2026

Summary

  • Adds a new amends frontmatter field that allows a decision to partially modify a previous one without fully superseding it
  • Amended decisions stay accepted — the amendment changes part of the original's scope while the rest remains in effect
  • New find-missing-amends.sh script deterministically finds decision IDs referenced in body text but not declared in supersedes or amends, giving audits a concrete starting point
  • Audits now run this script and evaluate candidates for missing amendment relationships

Changes

Schema & scripts: New amends: [] field in decision record format, --amends flag in create-decision.sh, new find-missing-amends.sh audit script

Skills (all ×2 for skills/ and .claude/skills/):

  • dld-decide / dld-plan — prompt distinguishes supersede (full replace) vs amend (partial modify)
  • dld-audit — informational check for amended decisions, mandatory missing-amends check using script + agent evaluation
  • dld-audit-auto — amend-aware auto-fix rules, script-driven missing amends detection and backfill
  • dld-snapshot — cross-referenced *Amends:* / *Amended by:* annotations and diagram edges
  • dld-implement — context-gathering includes amended decisions

Docs: Format spec, concept paper, FAQ, TL;DR, README, steering rule, CLAUDE.md all updated

Tests:

  • 8 new tests for find-missing-amends.sh
  • New amends test for create-decision.sh, updated fixtures
  • Fixed macOS compatibility: /var vs /private/var symlink (pwd -P), sedawk in structure tests
  • 111/111 tests pass on macOS

Test plan

  • All 111 bats tests pass on macOS
  • find-missing-amends.sh correctly identifies undeclared body references
  • Script ignores self-references, already-declared supersedes/amends
  • Structure tests verify skill sync and script path validity
  • Manual verification with /dld-audit in a real project

🤖 Generated with Claude Code

jimutt and others added 2 commits March 15, 2026 22:30
New `amends` frontmatter field allows a decision to partially modify
a previous one without fully superseding it. Amended decisions stay
`accepted` — the amendment changes part of the original's scope while
the rest remains in effect.

- create-decision.sh: --amends flag, format_amends(), frontmatter line
- dld-decide/dld-plan: ask about supersede vs amend, --amends in examples
- dld-audit: informational check for amended decisions, missing amends detection
- dld-audit-auto: amend-aware auto-fix rules, inferred amends backfill
- dld-snapshot: *Amends:*/*Amended by:* annotations and diagram edges
- dld-implement: context-gathering includes amended decisions
- Steering rule, format spec, concept docs, README updated
- Bats tests: new amends test + fixture update
- CLAUDE.md: document bats test runner path

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- find-missing-amends.sh: deterministic script that finds decision IDs
  referenced in body text but not declared in supersedes/amends fields.
  Outputs candidates for the agent to evaluate.
- Audit skills updated to run the script and evaluate candidates
- 8 new bats tests for find-missing-amends
- Fix macOS /var vs /private/var symlink issue in test helper (pwd -P)
- Fix macOS sed compatibility in test_structure.bats (awk instead)
- All 111 tests now pass on macOS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jimutt jimutt merged commit 2805605 into main Mar 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant