mit einem Klick
sdd-sync
// Use when merging delta specs from a change into the main baseline specs. Triggers: "sync specs", "merge delta specs", "update main specs", "apply the spec changes", "sync the change".
// Use when merging delta specs from a change into the main baseline specs. Triggers: "sync specs", "merge delta specs", "update main specs", "apply the spec changes", "sync the change".
Use when the user wants rigorous, non-sycophantic editorial feedback on a draft, essay, blog post, or argument through back-and-forth dialogue โ pressure-testing thesis, structure, argument, clarity, tone, and evidence. Triggers: "be my sparring partner", "pressure-test this draft", "poke holes in my argument", "is this ready to publish", "sharpen this post", "where is this weak". Not for one-shot copyediting, proofreading, or ghostwriting.
Use when distilling the through-line gist of one or more sources โ the spine, argument, tension, or recurring frame running through a set of documents, notes, research, or transcripts, OR across the ideas within a single rich piece โ into a few concise paragraphs. Triggers: "synthesize", "what's the through-line/gist", "extract the insight", "pull these together". Not for faithful summary or condensation that covers what a source says, nor for comparisons or catalogs where enumeration is the deliverable.
Use when deriving SDD specs from existing code or retroactively documenting implemented behavior. Triggers: "derive specs", "generate specs from code", "document this code in SDD", "retrofit specs", "spec out what's already built".
Use when creating a new change with all SDD artifacts โ proposal, delta specs, design, and tasks. Triggers: "propose a change", "create a change for X", "I want to implement feature Y", "start a new change", "let's build X".
Use when the user wants any spec-driven development action โ exploring before speccing, deriving specs from code or translating specs from another system, proposing a change, applying or implementing, verifying, syncing delta specs, or archiving. Triggers: 'spec this out', 'create a change', 'apply tasks', 'verify implementation', 'sync specs', 'archive change', or any mention of 'specs' or 'sdd'.
Use when verifying that an implementation matches a change's SDD artifacts. Triggers: "verify", "check implementation", "did I implement everything", "verify the change", "is implementation complete", "check conformance".
| name | sdd-sync |
| description | Use when merging delta specs from a change into the main baseline specs. Triggers: "sync specs", "merge delta specs", "update main specs", "apply the spec changes", "sync the change". |
Merge delta specs from a change directory into the main baseline specs. Applies each delta marker intelligently, preserving existing content not mentioned in the delta.
SPECS_ROOTis resolved by thesddrouter before this skill runs. Replace.specs/with your project's actual specs root in all paths below.
sdd-sync.sdd-verify passes with no blocking findings โ implementation is confirmed correctsdd-verify reports only blockers that are explicitly overridden per references/sdd-change-formats.mdsdd-verify firstsdd-verifyIf no delta specs exist in .specs/changes/<name>/specs/, warn:
"No delta specs to sync."
Stop unless the user confirms to proceed.
Before syncing, confirm verification status and any recorded override trail:
sdd-sync consumes the latest sdd-verify outcome; it does not reconstruct verification from design.md.sdd-verify first..specs/changes/<name>/design.md for ## Verification Overrides and confirm each applicable entry has all required fields (finding, stage, reason, constraints, follow-up task, approved by, recorded).
Stop if any required field is missing..specs/changes/<name>/specs/.specs/specs/tasks.mdFor each delta spec, read both files:
.specs/changes/<name>/specs/<capability>/spec.md.specs/specs/<capability>/spec.md (may not exist for new capabilities)Apply delta markers:
| Delta marker | Action |
|---|---|
| ADDED requirements | Insert as new ### Requirement: entries in the main spec |
| MODIFIED requirements | Find the matching requirement by name and replace it โ apply the MODIFIED preservation guard first |
| REMOVED requirements | Find the matching requirement by name and delete it |
| RENAMED capabilities | Rename the capability directory and update the spec header |
Preservation rule: Content in the main spec not mentioned in the delta is never touched.
MODIFIED preservation guard: The preservation rule operates at requirement granularity โ a MODIFIED requirement is replaced as a whole, so scenarios its delta block omits are not preserved.
Before replacing, compare the baseline requirement's scenarios and sub-clauses against the MODIFIED delta block.
If the delta omits any baseline scenario that the change did not deliberately remove (no rationale in design.md), stop and surface it:
"MODIFIED
<name>: baseline scenario(s)<โฆ>are absent from the delta block and will be deleted on sync. Restore the full post-change requirement, or confirm the removal is intentional."
Replace only after the omission is confirmed intentional, and strip the delta-only > Previously: โฆ provenance line โ it does not belong in the baseline.
A mechanical backstop ships with the skill for the dropped-scenario half of this guard: run scripts/check_modified_completeness.py <specs-root> --change <name> (a uv script; deps are declared inline).
It compares scenario names only and exits non-zero when a MODIFIED delta drops a baseline scenario โ sub-clause and body-text preservation is not mechanically checked, so keep verifying that by reading.
Mark intentional scenario drops with a <!-- modified-removes: ScenarioName --> comment inside the delta block.
Idempotency rule: Applying the same delta twice produces the same result as applying it once. For ADDED: check whether the requirement already exists by name before inserting โ skip if already present. For RENAMED: check whether the new directory name already exists before renaming โ skip if already renamed.
RENAMED processing order: When a delta spec contains RENAMED alongside other markers, process the rename first (directory rename + spec header update), then apply any ADDED/MODIFIED/REMOVED markers against the already-renamed main spec. The delta spec is always identified by the old capability name โ look it up before renaming.
If a delta spec covers a capability with no corresponding main spec:
.specs/specs/<capability>/ directoryspec.md in baseline format (no delta markers)## ADDED, ## MODIFIED, ## REMOVED section headings and keep the ### Requirement: entries beneath them as plain requirementsSee references/sdd-spec-formats.md for the baseline spec format.
If the delta spec contains only RENAMED and the old capability does not exist in main specs, create the capability under the new name using the ADDED requirements as baseline content.
If .specs/.sdd/schema-config.yaml exists and schemas/after/ is present in the change directory:
Copy each schema file from .specs/changes/<name>/schemas/after/<schema-type> to .specs/schemas/<schema-type> (overwrite).
Update .specs/schemas/.schema-sources.yaml with the generation date and change name.
If the repo contains a committed authored schema (e.g., docs/openapi.yaml), surface a reminder โ do not auto-update it:
"Authored schema at
<path>may need updating to match the implementation. Reference:.specs/changes/<name>/schemas/after/"
If no schema config exists but .specs/schemas/ contains files and no schemas/after/ directory exists in the change, emit a visible warning:
WARNING: Schema baseline exists at
.specs/schemas/but this change has no after-snapshot. The schema baseline may be stale. Runsdd-deriveor create.specs/.sdd/schema-config.yamlto enable schema tracking.
If no schema config exists and .specs/schemas/ is empty or absent, skip silently.
> Previously: provenance lines remain in main specsList each capability synced:
Synced:
- auth/ โ 2 requirements added, 1 modified
- payments/ โ 1 requirement removed
- notifications/ โ new capability created (3 requirements)
Schema snapshots updated:
- openapi.yaml โ 2 endpoints added, 1 model modified
- Reminder: authored docs/openapi.yaml may be stale (schema sync did not update it)
Synced under overrides:
- `pip audit` failure for `litellm` โ stage: `verify`; reason: upstream fix unavailable in current environment; constraints: no ignore added; follow-up remains open in `tasks.md`
> Previously: โฆ provenance line into the baseline specdesign.md instead of consuming the latest sdd-verify result plus any recorded overridessdd-verify clears all blockers, whether by a clean pass or a recorded overridedesign.md override and an unchecked remediation task in tasks.mdreferences/sdd-spec-formats.md โ baseline spec format for new capabilities created during syncreferences/sdd-change-formats.md โ change directory artifact formats (proposal, design, tasks)references/sdd-schema.md โ schema lifecycle policy (ยง 4) and .schema-sources.yaml format (ยง 3)scripts/check_modified_completeness.py โ mechanical dropped-scenario check (scenario names only, not body sub-clauses); exits non-zero on dropped baseline scenarios, wireable as a pre-commit/CI gate