Syncing to Specs
Use when you want to update docs/specs/ with deltas from a change without archiving it.
Inputs
- •
docs/changes/<slug>/specs/<capability>/spec.md - •
docs/specs/<capability>/spec.md(create if missing)
Behavior
- •If change slug is not provided, ask which change to sync.
- •For each delta spec under
docs/changes/<slug>/specs/:- •Read the delta spec.
- •Read the current spec (or create if missing).
- •Apply changes with intelligent merge:
- •ADDED: add the requirement if it does not exist; if it exists, treat as MODIFIED.
- •MODIFIED: update only what the delta specifies (add scenarios, tweak text) while preserving existing scenarios and content not mentioned.
- •REMOVED: remove the entire requirement block.
- •RENAMED: rename the requirement header (if content changes, also apply MODIFIED).
- •Normalize current truth format:
- •Ensure a single top-level
## Requirementsheading. - •Remove delta section headers (ADDED/MODIFIED/REMOVED/RENAMED) from
docs/specs/.
- •Ensure a single top-level
- •Ensure every requirement still has at least one
#### Scenario:. - •Summarize changes by capability.
- •If all requirements for the change are implemented, suggest archiving the change.
Notes
- •The delta expresses intent, not full replacement.
- •Preserve existing content unless explicitly changed.
- •If unclear, ask before editing.