Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
68
81%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Sync delta specs from a change to main specs.
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).
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.
Input: Optionally specify a change name. 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 --json to get available changes. Use the AskUserQuestion tool to let the user select.
Show changes that have delta specs (under specs/ directory).
IMPORTANT: Do NOT guess or auto-select a change. Always let the user choose.
Resolve change context
Run:
openspec status --change "<name>" --jsonThe JSON includes planningHome.root. Main specs live under <planningHome.root>/openspec/specs/ — use that (store-aware) root for every main-spec path below, not a hardcoded repo path. When a store is selected it points at the store, not the current repository.
Find delta specs
Use artifactPaths.specs.existingOutputPaths from the status JSON as the list of delta spec files.
Each delta spec file contains sections like:
## ADDED Requirements - New requirements to add## MODIFIED Requirements - Changes to existing requirements## REMOVED Requirements - Requirements to remove## RENAMED Requirements - Requirements to rename (FROM:/TO: format)If no delta specs found, inform user and stop.
For each delta spec, apply changes to main specs
For each capability delta spec path returned by the CLI (these may belong to a selected store, not the repo):
a. Read the delta spec to understand the intended changes
b. Read the main spec at <planningHome.root>/openspec/specs/<capability>/spec.md (may not exist yet)
c. Apply changes intelligently:
ADDED Requirements:
MODIFIED Requirements:
REMOVED Requirements:
RENAMED Requirements:
## Purpose in the delta:
openspec archive does; it warns and moves on)d. Create new main spec if capability doesn't exist yet:
<planningHome.root>/openspec/specs/<capability>/spec.md## Purpose body verbatim when it has one
(this is what openspec archive does); only write a brief TBD placeholder when it does notShow summary
After applying all changes, summarize:
Delta Spec Format Reference
## Purpose
Only on a delta that introduces a brand-new capability. Seeds the new main spec.
## ADDED Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
#### Scenario: New scenario to add
- **WHEN** user does A
- **THEN** system does B
## REMOVED Requirements
### Requirement: Deprecated Feature
## RENAMED Requirements
- FROM: `### Requirement: Old Name`
- TO: `### Requirement: New Name`Main Spec Format Reference
Main specs are what the delta merges INTO. They must never contain delta operation headers (## ADDED/MODIFIED/REMOVED/RENAMED Requirements) - after syncing, every requirement lives under a single ## Requirements section:
# <capability> Specification
## Purpose
Short description of what this capability does and why it exists.
## Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does YKey Principle: Intelligent Merging
Unlike programmatic merging, you can apply partial updates:
Output On Success
## Specs Synced: <change-name>
Updated main specs:
**<capability-1>**:
- Added requirement: "New Feature"
- Modified requirement: "Existing Feature" (added 1 scenario)
**<capability-2>**:
- Created new spec file
- Added requirement: "Another Feature"
Main specs are now updated. The change remains active - archive when implementation is complete.Guardrails
19d4171
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.