openspec-sync-specs

Merge delta spec changes into main OpenSpec capability specifications.

1|Updated Aug 21, 2023
One-click install
npx skills add https://github.com/jmuchovej/homelab --skill openspec-sync-specs-jmuchovej
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openspec-sync-specs
Source: https://github.com/jmuchovej/homelab/tree/main/.agents/skills/openspec-sync-specs
Command: npx skills add https://github.com/jmuchovej/homelab --skill openspec-sync-specs-jmuchovej

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping main specifications in sync with change proposals is tedious and error-prone when done by hand. This Skill applies delta specs (ADDED, MODIFIED, REMOVED, RENAMED requirements) from an OpenSpec change directly into the main specs, without archiving the change. ## Core Features & Use Cases - Intelligent Merging: Reads each delta spec and merges requirements into main specs, preserving existing scenarios and content the delta does not mention. - Store-Aware Operation: Supports registered OpenSpec stores via --store <id> flags so specs in external stores are updated correctly. - Safe Capability Retirement: Deletes a capability's spec.md only when strict retirement conditions are met, and validates results with openspec validate --specs. - Use Case: After finishing a change that adds scenarios to the user-auth spec, run the sync to update openspec/specs/user-auth/spec.md while keeping the change active for continued work. ## Quick Start Ask the assistant to sync the delta specs from a named OpenSpec change into the main specs without archiving the change.

Frequently Asked Questions about openspec-sync-specs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync delta specs to main specs in OpenSpec?

Provide a change name or let the skill infer it from context, then it reads the delta specs listed in the change status and merges their requirements into the main specs under the planning root. It validates the result with openspec validate --specs.

How to update main specs without archiving an OpenSpec change?

Use this sync workflow instead of openspec archive. It applies the delta changes to main specs while leaving the change active, so you can archive later once implementation is complete.

Does openspec sync work with registered stores?

Yes. Run openspec store list --json to discover store ids, then pass --store <id> on the status, instructions, and validate commands. The flag stays sticky for the whole workflow and paths resolve against the store root.

What happens when a REMOVED requirement empties a spec?

The spec.md is deleted only if strict retirement conditions hold, including a retire_capabilities: true marker in the change's .openspec.yaml and no leftover content. Otherwise the sync stops for that capability and reports the blocking condition.

Why does spec sync stop before writing any main spec?

The sync halts if the specs-instruction lookup exits non-zero or returns invalid JSON, if no delta specs exist in existingOutputPaths, or if a caller-named path is missing. It reports the error rather than guessing or writing partial specs.