openspec-sync-specs

Merge delta spec changes into main OpenSpec capability specifications.

Updated Mar 7, 2024
One-click install
npx skills add https://github.com/girlguidingstaplehurst/booking --skill openspec-sync-specs-girlguidingstaplehurst
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: openspec-sync-specs
Source: https://github.com/girlguidingstaplehurst/booking/tree/main/.opencode/skills/openspec-sync-specs
Command: npx skills add https://github.com/girlguidingstaplehurst/booking --skill openspec-sync-specs-girlguidingstaplehurst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping main capability 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 the corresponding main spec, preserving existing scenarios and content the delta does not mention. - Change Selection & Store Support: Infers the change from context, lists active changes when ambiguous, and supports registered OpenSpec stores via the --store flag. - Validation & Safe Retirement: Runs openspec validate --specs after syncing and only deletes a retired capability's spec file when strict conditions are met. - Use Case: After finishing a change that adds scenarios to the billing capability, ask the agent to sync the delta specs so the main specs reflect the new requirements while the change stays active. ## Quick Start Ask the agent to sync the delta specs from your current 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?▼

Invoke the sync workflow with an optional change name; the agent reads each delta spec listed in artifactPaths.specs.existingOutputPaths and merges its requirements into the matching main spec. It then runs openspec validate --specs to confirm the result.

How does OpenSpec handle MODIFIED requirements during a sync?▼

A MODIFIED block carries the whole requirement including every surviving scenario. The merge adds new scenarios, updates existing ones, and preserves anything the delta does not mention, keeping the main spec's existing order.

Does syncing specs archive the OpenSpec change?▼

No. Syncing updates the main specs while the change remains active, so you can keep iterating. Archive the change separately once implementation is complete.

Can I sync only some delta specs from a change?▼

Yes. A caller can narrow the sync to an explicit subset of paths from existingOutputPaths, and those paths are copied verbatim. Named paths not in the list are reported and skipped rather than silently dropped.

When does OpenSpec delete a main spec during sync?▼

A spec file is deleted only when removing requirements leaves no requirement blocks, the spec is otherwise well-formed, the change declares retire_capabilities: true, and the file resolves inside the real specs root. Otherwise the sync stops and reports the blocking condition.