openspec-sync-specs

Merge delta spec changes into main OpenSpec capability specifications.

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/JhonMA82/api-starter --skill openspec-sync-specs-jhonma82
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: openspec-sync-specs
Source: https://github.com/JhonMA82/api-starter/tree/main/.opencode/skills/openspec-sync-specs
Command: npx skills add https://github.com/JhonMA82/api-starter --skill openspec-sync-specs-jhonma82

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 with intelligent merging, without archiving the change. ## Core Features & Use Cases - Intelligent requirement merging: Adds new requirements, updates modified ones, removes deprecated ones, and applies renames while preserving content the delta does not mention. - Store-aware operation: Supports registered OpenSpec stores via --store <id> so specs in standalone repositories can be synced from anywhere. - Safe capability retirement: Deletes a spec file only when strict conditions hold (empty requirements, valid Purpose, retire_capabilities: true marker), and validates results with openspec validate --specs. - Use Case: After finishing a change that adds scenarios to the user-auth capability, run the sync to fold those delta requirements into openspec/specs/user-auth/spec.md while keeping the change active for implementation. ## Quick Start Ask the assistant to sync the delta specs from a named change into the main specs, for example: sync the specs from my add-billing-invoices change without archiving it.

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?▼

Select the change by name or let it be inferred from context, then the workflow reads each delta spec listed in artifactPaths.specs.existingOutputPaths and merges its ADDED, MODIFIED, REMOVED, and RENAMED requirements into the corresponding main spec. It finishes by running openspec validate --specs.

What is the difference between syncing specs and archiving a change?▼

Syncing updates the main specs while keeping the change active for continued implementation. Archiving also applies the deltas but then closes the change; use sync when implementation is still in progress and archive when it 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. The workflow never widens the narrowed selection back to the full list, and unknown paths are reported rather than synced.

Does openspec sync work with registered stores?▼

Yes. Run openspec store list --json to discover registered store ids, then pass --store <id> on commands that read or write specs and changes. The flag stays sticky for the rest of the workflow and all paths resolve against the store root.

When does syncing delete a main spec file?▼

A spec.md is deleted only when the sync removes all requirement blocks, the spec retains a valid Purpose section, the change declares retire_capabilities: true, and the file resolves inside the real specs root. If any condition fails, the sync stops for that capability and reports the blocker.