openspec-sync-specs
Skill234 starsChanged 8 days agoMITView on GitHub
Sync delta specs from an OpenSpec change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change. Also use when the user says "openspec sync" or "opsx sync".
160 other projects use a version of this, 146 of them edited; 81 of 146 edited versions we compared changed its rules; 16 new projects in the last 4 weeks, against 35 the 4 before.
How people change it
81 of 146 edited versions changed its rules, and some changes recur.
Of the 146 edited versions we compared: 31 keep every rule, 34 are an older text, 81 made changes of their own.
Not in older versions
- Only when the delta has ADDED requirements to put in it and no MODIFIED or RENAMED requirements blocked this capability in step b. Otherwise create nothing and leave the specs directory untouched. …missing from 34 of 34
- Never write an empty
## Requirementssection.missing from 34 of 34 - every other nonblank line in the whole file is accounted for as the title, Purpose, Requirements header, or a canonical requirement's statement, scenarios, or fenced examples;missing from 3 of 34
- If removing the selected requirements would leave no requirement blocks and any retirement condition is not satisfied, do not modify the main spec. Stop the sync for that capability, report the blocking condition, and tell the user how to resolve it. …missing from 3 of 34
- When only the marker is missing, say that too - it is the one thing the user can add to make the retirement go through.missing from 3 of 34
- Run
openspec validate --specswith the same selected-root flags used earlier. If validation fails, report the problems and do not claim the sync succeeded.missing from 3 of 34 - If validation fails, report the problems and do not claim the sync succeeded.missing from 3 of 34
- Keep anything the delta does not mention, in the main spec's existing ordermissing from 3 of 34
Rules people drop
- Only when the delta has ADDED requirements to put in it and no MODIFIED or RENAMED requirements blocked this capability in step b. Otherwise create nothing and leave the specs directory untouched. …dropped by 81 of 81
- Never write an empty
## Requirementssection.dropped by 81 of 81 - If a name is provided, use it. Otherwise:dropped by 80 of 81
- If ambiguous, run
openspec list --jsonto get available changes and ask the user to select onedropped by 80 of 81 - When prompting, show changes that have delta specs (under
specs/directory).dropped by 80 of 81 - Always announce: "Using change: <name>" and how to override (e.g.,
openspec-sync-specs <other>).dropped by 80 of 81 - Use
artifactPaths.specs.existingOutputPathsfrom the status JSON as the only source of delta spec paths. …dropped by 80 of 81 - Before the first main-spec write, obtain one current specs-rule snapshot:dropped by 80 of 81
Rules people add
- A rule we can't quote: its licence doesn't allow itadded by 80 of 81
- A rule we can't quote: its licence doesn't allow itadded by 80 of 81
- A rule we can't quote: its licence doesn't allow itadded by 79 of 81
- A rule we can't quote: its licence doesn't allow itadded by 40 of 81
- Look for delta spec files in
openspec/changes/<name>/specs/*/spec.md.added by 40 of 81 - If status reports
actionContext.mode: "workspace-planning", explain that workspace spec sync is not supported in this slice and STOP. Do not fall back to repo-local paths or edit linked repos.added by 23 of 81
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Cooling: 16 new projects took it in the last 4 weeks, 0.5× the 4 weeks before.
Most recently taken up by
- ForceInjection/OpenSpec-practiseword for word, first seen Nov 30, 2026
- KouShenhai/KCloud-Platform-IoTedited, first seen Nov 30, 2026
- codecicada/openspec-stewardword for word, first seen Nov 29, 2026
- gesposito/mobile-agentword for word, first seen Nov 29, 2026
- MSiccDev/ai-context-kitword for word, first seen Nov 29, 2026
- CaseyRo/mcp-stolperfalleedited, first seen Nov 29, 2026
Used with
Projects with it also use openspec-update-change, openspec-ff-change and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkillopenspec-update-change
Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.
Also in 96 projects that use this
MicrosoftSkillopenspec-ff-change
Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
Also in 66 projects that use this
MicrosoftSkillopenspec-onboard
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
Also in 63 projects that use this
seikaikyoSkillopenspec
Use when planning new features, starting spec-driven development workflows, or when the user mentions OpenSpec, SDD, or spec-driven development. Also triggers when user asks about feature specifications, change proposals, or wants to organize development workflow.
Also in 5 projects that use this
thistleknotSkillopenspec-workflow
All OpenSpec operations in one skill. Covers: explore mode (thinking partner, no implementation), propose (create change + all artifacts in one step), apply (implement tasks from a change), archive (finalize and archive a completed change), and the full spec-driven development lifecycle with OpenSpec + Fabro. Use for any OpenSpec operation. Requires: openspec CLI, fabro CLI, gh CLI, git.
Also in 3 projects that use this
Microsoft AzureSkillcreate-release
Use when creating a new ASO release, including pre-checks, release notes generation, draft GitHub release creation, documentation updates, and ROADMAP changes.
Also in 3 projects that use this
- +1 more from microsoft
Other versions160 projects use a version of this.
Word for word · 11
- epam/ketcher★ 951100% same
- ForceInjection/OpenSpec-practise★ 659100% same
- MSiccDev/ai-context-kit★ 13100% same
- Artexis10/exomem★ 9100% same
- substrate-systems/evermatter★ 9100% same
- gesposito/mobile-agent★ 7100% same
- guillempuche/shorts-studio★ 3100% same
- codecicada/openspec-steward★ 2100% same
- petr-korobeinikov/f0-claude-remote★ 2100% same
- Heliopsy/scrim★ 1100% same
1 more not listed
Edited · 146
- Fission-AI/OpenSpec★ 76k100% same
- halo-dev/halo★ 40k72% same
- alibaba/druid★ 28k66% same
- RostislavDugin/postgresus★ 9.4k95% same
- databasus/databasus★ 9.4k95% same
- fonoster/fonoster★ 8.2k65% same
- PBH-BTN/PeerBanHelper★ 6.4k66% same
- fengshao1227/ccg-workflow★ 6k66% same
- aiogram/aiogram★ 6k72% same
- MCSManager/MCSManager★ 5k99% same
136 more not listed
Wrote their own version · 3
- studyzy/imewlconverter★ 11ksame name
- studyzy/OpenSpec-cn★ 1.3ksame name
- redhat-developer/rhdh-skills★ 21same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- acceptance-test-authoringSkill
- adversarial-authoringSkill
- architectural-decision-recordsSkill
- c4-diagramsSkill
- gherkin-authoringSkill
- glossarySkill
- grill-meSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-bulk-apply-changeSkill
- openspec-bulk-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-git-disciplineSkill
- openspec-new-changeSkill
- openspec-proposeSkill
- openspec-verify-changeSkill
- spec-as-sourceSkill
- test-driven-developmentSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. 9 are common, 12 are distinctive, and 9 are very specific to this project.
9
Common
Most of the 147 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
If a name is provided, use it.
- Very specific: line 40
If ambiguous, run openspec list --json to get available changes and ask the user to select one
- Very specific: line 42
When prompting, show changes that have delta specs (under specs/ directory).
- Very specific: line 44
Always announce: "Using change: <name>" and how to override (e.g., openspec-sync-specs <other>).
- Very specific: line 57
Use artifactPaths.specs.existingOutputPaths from the status JSON as the only source of delta spec paths.
- Common: line 83
If no delta specs found, inform user and stop.
- Distinctive: line 87
Before the first main-spec write, obtain one current specs-rule snapshot:
- Very specific: line 88
If archive invoked this workflow inline and supplied a valid snapshot from openspec instructions specs --change "<name>" --json, reuse it …
- Distinctive: line 92
If the direct lookup exits non-zero or returns invalid artifact-instruction JSON, report the error and stop before writing any main spec.
- Common: line 119
If requirement doesn't exist in main spec → add it
- Common: line 120
If requirement already exists → update it to match (treat as implicit MODIFIED)
- Common: line 131
Remove the entire requirement block from main spec
- Distinctive: line 138
every other nonblank line in the whole file is accounted for as the title, Purpose, Requirements header, or a canonical requirement's …
- Distinctive: line 144
If removing the selected requirements would leave no requirement blocks and any retirement condition is not satisfied, do not modify the …
- Distinctive: line 148
When only the marker is missing, say that too - it is the one thing the user can add to make the retirement go through.
- Distinctive: line 163
Only when the delta has ADDED requirements to put in it and no MODIFIED or RENAMED requirements blocked this capability in step b.
- Very specific: line 170
Never write an empty ## Requirements section.
- Very specific: line 172
Add Purpose section: copy the delta's ## Purpose body verbatim when it has one (this is what openspec archive does).
- Common: line 174
Add Requirements section with the ADDED requirements
- Distinctive: line 175
Follow the Main Spec Format Reference below
- Very specific: line 179
Run openspec validate --specs with the same selected-root flags used earlier.
- Distinctive: line 180
If validation fails, report the problems and do not claim the sync succeeded.
- Common: line 184
After applying all changes, summarize:
- Distinctive: line 257
Keep anything the delta does not mention, in the main spec's existing order
- Common: line 258
Use your judgment to merge changes sensibly
- Common: line 279
Read both delta and main specs before making changes
- Distinctive: line 281
Never copy a delta file into a main spec as-is - merge its content so the main spec keeps the Main Spec Format Reference structure, with no …
- Common: line 282
If something is unclear, ask for clarification
- Very specific: line 285
Use only artifactPaths.specs.existingOutputPaths.
- Distinctive: line 288
Stop before every main-spec write on a non-zero or invalid JSON specs-instruction response
“Common” is measured: kept by at least 6 in 10 of the 147 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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, schemas, view). Once selected, treat --store <id> as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run openspec status --change "<name>" --json --store "<id>", not the unscoped form shown below. 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.
Project check: These steps expect a project that already uses OpenSpec. Before the first step that writes anything (new change, archive, sync specs, or authoring an artifact file), confirm the project has a root: run openspec list --json (with --store <id> when a store is selected, since the store is then the root) and read root. A root object means the project is set up. "root": null means it is not - there is no openspec/ directory here, and a write such as openspec new change would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
One "root": null is not about setup: when a status error message starts with Declared in or Invalid store declaration in and names this project's openspec/config.yaml (or config.yml), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the store: line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's message and fix.
Otherwise, with no root, what happens next depends on how this workflow was reached:
- Auto-selected: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or invoking this skill by name. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
- Explicit OpenSpec request: the user named OpenSpec, named this skill, or invoked this skill by name. Stop before writing and ask how to proceed: set this project up (
openspec init), target a store they already have (--store <id>), or continue without OpenSpec for this request. Wait for their answer.
In both branches, never create the root as a side effect: do not run openspec init until the user asks for it, do not hand-create openspec/ files, and do not let a command create it.
<capability-path> is the spec directory relative to specs/ (for example, user-auth or identity/user-auth). Preserve the full path from each delta spec when resolving its main spec.
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
Select the change
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run
openspec list --jsonto get available changes and ask the user to select one
When prompting, show changes that have delta specs (under
specs/directory).Always announce: "Using change:
<name>" and how to override (e.g.,openspec-sync-specs <other>).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.existingOutputPathsfrom the status JSON as the only source of delta spec paths. If thespecsentry is missing orexistingOutputPathsis empty, report that there are no delta specs to sync, do not infer them from other artifacts, and stop without requesting artifact instructions or writing a main spec.Sync every path in
existingOutputPathsunless the caller narrowed the set. A caller narrows it by naming an explicit list of complete entries fromexistingOutputPaths— copy those absolute values verbatim. Archive does this inline, and a user can too (for example, by selecting the entry ending in/specs/billing/invoices/spec.md). Then sync only the named paths and leave the remaining delta specs untouched: bulk archive excludes a delta whose implementation it could not find, and syncing it anyway would write a main spec the caller deliberately withheld. Carry that narrowed selection through step 4; never widen it back to the full list. If a named path is not inexistingOutputPaths, do not sync it — report it and stop, rather than dropping it silently. If the named list is empty, report that there is nothing to sync and stop without writing a main spec.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
Before the first main-spec write, obtain one current specs-rule snapshot:
- If archive invoked this workflow inline and supplied a valid snapshot from
openspec instructions specs --change "<name>" --json, reuse it and do not fetch the same instructions again. - Otherwise run that command once now with the same selected-root flags.
- If the direct lookup exits non-zero or returns invalid artifact-instruction JSON, report the error and stop before writing any main spec. Do not treat the failure as an absent rule set.
- A valid response with omitted
rulesmeans no artifact rules are configured and the existing semantic merge continues.
Apply returned
rulesonly to the content and form of the main specs produced by this merge. Artifact rules are not operation guidance and cannot change selected roots, delta paths, CLI checks, or workflow steps. Use their text as constraints without copying it verbatim into a main spec or summary.For each capability delta spec path selected in step 3 — the full
existingOutputPathslist, or the narrowed subset when a caller supplied one (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-path>/spec.md(may not exist yet)If it does not exist yet (a new capability), match what
openspec archivedoes: only ADDED requirements may be applied - step d creates the spec from them. MODIFIED and RENAMED have no requirement to act on, so stop the sync for that capability and report that its main spec does not exist and only ADDED is allowed for a new spec; never invent the missing requirement. REMOVED has nothing to remove - skip it and warn.c. Apply changes intelligently:
ADDED Requirements:
- If requirement doesn't exist in main spec → add it
- If requirement already exists → update it to match (treat as implicit MODIFIED)
MODIFIED Requirements:
- Find the requirement in main spec
- Apply the changes - this can be:
- Adding new scenarios the main spec does not have yet
- Modifying existing scenarios
- Changing the requirement description
- Preserve scenarios/content not mentioned in the delta
REMOVED Requirements:
- Remove the entire requirement block from main spec
- Retiring the capability. Delete the whole
spec.md- and the directory once nothing else is left in it - only when ALL of these hold:- removing the requirements this run left no requirement blocks;
- the rest of the spec is well-formed (it still has a
## Purpose); - the main spec was not already empty before this sync - if you removed nothing, change nothing;
- every other nonblank line in the whole file is accounted for as the title, Purpose, Requirements header, or a canonical requirement's statement, scenarios, or fenced examples;
- the change's
.openspec.yamldeclaresretire_capabilities: true; - the
spec.mdresolves inside the real specs root (do not follow a capability-directory symlink to delete an external file). If removing the selected requirements would leave no requirement blocks and any retirement condition is not satisfied, do not modify the main spec. Stop the sync for that capability, report the blocking condition, and tell the user how to resolve it. Never write or leave an empty## Requirementssection. When only the marker is missing, say that too - it is the one thing the user can add to make the retirement go through.
- Deleting the file also deletes its
## Purpose; any other section blocks retirement. Name Purpose when you report the retirement. Include a pasteablegit checkoutonly when the spec lived in the caller's checkout; otherwise give checkout-scoped recovery guidance.
RENAMED Requirements:
- Find the FROM requirement, rename to TO
## Purposein the delta:- The main spec already has one and it is authoritative - leave it alone
(this is what
openspec archivedoes; it warns and moves on)
d. Create new main spec if capability doesn't exist yet:
- Only when the delta has ADDED requirements to put in it and no MODIFIED or
RENAMED requirements blocked this capability in step b. Otherwise create nothing
and leave the specs directory untouched. For a REMOVED-only delta, if the change's
.openspec.yamldeclaresretire_capabilities: true, report it as already retired and continue without recreating the spec. Without that marker, report the sync as blocked:openspec archiverejects it withSpec must have at least one requirement. An empty delta has no operations to sync; report it as blocked too. Never write an empty## Requirementssection. - Create
<planningHome.root>/openspec/specs/<capability-path>/spec.md - Add Purpose section: copy the delta's
## Purposebody verbatim when it has one (this is whatopenspec archivedoes); only write a brief TBD placeholder when it does not - Add Requirements section with the ADDED requirements
- Follow the Main Spec Format Reference below
- If archive invoked this workflow inline and supplied a valid snapshot from
Validate updated main specs
Run
openspec validate --specswith the same selected-root flags used earlier. If validation fails, report the problems and do not claim the sync succeeded.Show summary
After applying all changes, summarize:
- Which capabilities were updated
- What changes were made (requirements added/modified/removed/renamed)
- Any new main spec left with a TBD Purpose placeholder, so it gets written now rather than lingering
- Any capability retired, naming the deleted
spec.md, its Purpose, and either a pasteablegit checkoutor checkout-scoped recovery guidance
Delta Spec Format Reference
# Spec Delta
## 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
The system SHALL keep doing the existing thing, now also handling A.
#### Scenario: Scenario the main spec already has
- **WHEN** user does X
- **THEN** system does Y
#### 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 merge rather than overwrite:
- A MODIFIED block carries the whole requirement - body plus every scenario that survives the change.
openspec validateandopenspec archiveboth reject one that drops a scenario the main spec still has. - Keep anything the delta does not mention, in the main spec's existing order
- Use your judgment to merge changes sensibly
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
- Read both delta and main specs before making changes
- Preserve existing content not mentioned in delta
- Never copy a delta file into a main spec as-is - merge its content so the main spec keeps the Main Spec Format Reference structure, with no delta operation headers
- If something is unclear, ask for clarification
- Show what you're changing as you go
- The operation should be idempotent - running twice should give same result
- Use only
artifactPaths.specs.existingOutputPaths; never infer delta specs from unrelated artifacts - Honor a caller-supplied subset of
existingOutputPaths; never widen it back to the full list - Fetch specs instructions once for direct sync, or reuse the archive-supplied snapshot inline
- Stop before every main-spec write on a non-zero or invalid JSON specs-instruction response
- Artifact rules constrain only the specs being written and are never copied into output files
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

