openspec-sync-specs

Merge delta spec changes into main OpenSpec capability specifications.

1|Updated Apr 9, 2025
One-click install
npx skills add https://github.com/tbdavid2019/stockbot --skill openspec-sync-specs-tbdavid2019
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: openspec-sync-specs
Source: https://github.com/tbdavid2019/stockbot/tree/main/.opencode/skills/openspec-sync-specs
Command: npx skills add https://github.com/tbdavid2019/stockbot --skill openspec-sync-specs-tbdavid2019

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: Applies ADDED, MODIFIED, REMOVED, and RENAMED requirement blocks into main specs while preserving untouched scenarios and content. - Store-Aware Operation: Discovers registered OpenSpec stores via openspec store list --json and scopes all reads and writes with --store <id>. - Safe Capability Retirement: Deletes a capability's spec.md only when strict conditions hold, including the retire_capabilities: true marker, and reports recovery guidance. - Use Case: After finishing a change that adds billing requirements, run the sync to update specs/billing/invoices/spec.md in the main specs 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?▼

Select the change by name or let the skill infer it, then it reads delta specs from artifactPaths.specs.existingOutputPaths and merges each requirement into the main spec under specs/. It finishes by running openspec validate --specs to confirm the result.

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

Syncing updates the main specs while keeping the change active for further work. Archiving performs the same merge but then closes the change, so sync is used when implementation is still in progress.

Does openspec-sync-specs work with registered OpenSpec stores?▼

Yes. It runs openspec store list --json to discover registered store ids, then appends --store <id> to every spec-reading and spec-writing command so operations target the store instead of the local repository.

When does the sync delete a capability spec file?▼

A spec.md 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.

What happens if no delta specs exist for a change?▼

The skill checks artifactPaths.specs.existingOutputPaths from the status JSON. If that list is missing or empty, it reports there is nothing to sync and stops without writing any main spec or inferring paths from other artifacts.