openspec-sync-specs
Sync delta specs from a change to main specs and refresh the implementing repos/modules' local SPEC.md files.
This is an agent-driven operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
Input: Optionally specify a change name after openspec-sync-specs (e.g., openspec-sync-specs add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
-
If no change name provided, prompt for selection
Run
openspec list --jsonto get available changes. Use the AskUserQuestion tool to let the user select.Show changes that have delta specs (under
specs/directory) or pending localSPEC.mdupdates recorded in their artifacts.IMPORTANT: Do NOT guess or auto-select a change. Always let the user choose.
-
Find delta specs
Recursively find
spec.mdfiles underopenspec/changes/<name>/specs/. Include bothspecs/<capability>/spec.mdandspecs/<domain>/<capability>/spec.md(and deeper domain paths). Ignore aspec.mddirectly in thespecs/root. The capability ID is the full relative directory path, such asidentity/authentication, not justauthentication.