openspec-sync-specs

Sync delta specs from an OpenSpec change into main specification files.

Updated Nov 7, 2023
One-click install
npx skills add https://github.com/lstellway/nixfiles --skill openspec-sync-specs-lstellway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openspec-sync-specs
Source: https://github.com/lstellway/nixfiles/tree/main/modules/home-manager/claude/skills/openspec-sync-specs
Command: npx skills add https://github.com/lstellway/nixfiles --skill openspec-sync-specs-lstellway

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping main specifications up to date with changes defined in OpenSpec delta specs requires manual, error-prone merging. This Skill applies ADDED, MODIFIED, REMOVED, and RENAMED requirements from a change's delta specs directly into the main spec files without archiving the change. ## Core Features & Use Cases - Intelligent Merging: Applies partial updates such as adding a single scenario to an existing requirement without copying unchanged content. - Full Delta Support: Handles ADDED, MODIFIED, REMOVED, and RENAMED requirement sections across multiple capability specs. - New Spec Creation: Creates a new main spec file with Purpose and Requirements sections when a capability does not exist yet. - Use Case: After drafting a change with delta specs under openspec/changes/, ask the agent to sync them so openspec/specs/ reflects the latest requirements while the change stays active. ## Quick Start Sync the delta specs from my current OpenSpec change into the main specs.

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 to main specs?

Provide a change name or let the agent list available changes with openspec list --json. The agent reads each delta spec under openspec/changes/<name>/specs/ and applies ADDED, MODIFIED, REMOVED, and RENAMED requirements to the matching main spec.

What is the difference between syncing and archiving an OpenSpec change?

Syncing updates the main specs with the delta changes while keeping the change active for further work. Archiving finalizes the change after implementation is complete, so sync first and archive later.

Does syncing delta specs overwrite existing scenarios in main specs?

No. The merge is intelligent and partial: MODIFIED requirements can add or change specific scenarios while preserving existing content not mentioned in the delta. The delta represents intent, not a wholesale replacement.

What happens if the main spec for a capability does not exist yet?

A new main spec file is created at openspec/specs/<capability>/spec.md with a Purpose section (which can be marked TBD) and a Requirements section containing the ADDED requirements from the delta spec.

Is the OpenSpec sync operation idempotent?

Yes. The operation is designed to be idempotent, so running the sync twice produces the same result. Existing requirements that match an ADDED entry are treated as implicitly modified rather than duplicated.