openspec-sync-specs

Merge delta spec changes into main OpenSpec capability specifications.

Updated Aug 25, 2026
One-click install
npx skills add https://github.com/KevMendesDev/mercadinho-sao-francisco --skill openspec-sync-specs-kevmendesdev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: openspec-sync-specs
Source: https://github.com/KevMendesDev/mercadinho-sao-francisco/tree/main/.agents/skills/openspec-sync-specs
Command: npx skills add https://github.com/KevMendesDev/mercadinho-sao-francisco --skill openspec-sync-specs-kevmendesdev

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 while preserving existing scenarios and content the delta does not mention. - Change Selection & Validation: Resolves the target change via the openspec CLI, validates updated specs with openspec validate --specs, and reports a structured summary of what changed. - Capability Lifecycle Handling: Creates new main spec files for new capabilities and safely retires capabilities whose requirements were fully removed, with strict guardrails. - Use Case: After drafting a change with delta specs for a billing feature, ask the agent to sync those deltas into the main specs so the canonical documentation reflects the proposed behavior 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 OpenSpec delta specs into main specs?▼

Invoke the skill with a change name, or let it infer the change from context. It reads the delta specs listed in the change status, merges each requirement into the corresponding main spec, then runs openspec validate --specs to confirm the result.

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

Syncing updates the main specs with the delta content while the change remains active, so documentation stays current during implementation. Archiving is the final step that closes the change after implementation is complete.

Does syncing overwrite existing scenarios in main specs?▼

No. The merge is intelligent: scenarios and content not mentioned in the delta are preserved in their existing order. A MODIFIED block carries the full requirement, and validation rejects deltas that drop scenarios the main spec still has.

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

Yes. A caller can narrow the sync to an explicit subset of paths from artifactPaths.specs.existingOutputPaths. The skill syncs only the named paths and never widens the selection back to the full list.

What happens when a delta removes all requirements of a capability?▼

The main spec file is deleted only when strict retirement conditions hold, including a retire_capabilities marker in the change's .openspec.yaml and a well-formed remaining spec. Otherwise the sync stops for that capability and reports the blocking condition.

Why does spec sync fail before writing any main spec?▼

The sync stops if the openspec instructions command exits non-zero or returns invalid JSON, since artifact rules could not be confirmed. It also stops when no delta specs exist in existingOutputPaths rather than inferring them from other artifacts.