# Sync Delta Specs

Merges a change's delta specs into the main specs without archiving the change.

- Repository: https://github.com/monid-ai/monid (6137 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-22
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add monid-ai/monid --skill openspec-sync-specs -g -a claude-code -y`
Codex: `npx skills add monid-ai/monid --skill openspec-sync-specs -g -a codex -y`
Cursor: `npx skills add monid-ai/monid --skill openspec-sync-specs -g -a cursor -y`
Gemini CLI: `npx skills add monid-ai/monid --skill openspec-sync-specs -g -a gemini-cli -y`

## Description

Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Sync delta specs from a change to main specs.

This is an **agent-driven** operation - you will read delta specs and directly
edit main specs to apply the changes. This allows intelligent merging (e.g.,
adding a scenario without copying the entire requirement).

**Input**: Optionally specify a change name. If omitted, check if it can be
inferred from conversation context. If vague or ambiguous you MUST prompt for
available changes.

**Steps**

1. **If no change name provided, prompt for selection**

   Run `openspec list --json` to get available changes. Use the
   **AskUserQuestion tool** to let the user select.

   Show changes that have delta specs (under `specs/` directory).

   **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user
   choose.

2. **Resolve change context**

   Run:
   ```bash
   openspec status --change "<name>" --json
   ```

   If status reports `actionContext.mode: "workspace-planning"`, explain that
   workspace spec sync is not supported in this slice and STOP. Do not fall back
   to repo-local paths or edit linked repos.

3. **Find delta specs**

   Use `artifactPaths.specs.existingOutputPaths` from the status JSON as the
   list of delta spec files.

   Each delta spec file contains sections like:
   - `## ADDED Requirements` - New requirements to add
   - `## MODIFIED Requirements` - Changes to existing requirements
   - `## REMOVED Requirements` - Requirements to remove
   - `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)

   If no delta specs found, inform user and stop.

4. **For each delta spec, apply changes to main specs**

   For each repo-local capability delta spec path returned by the CLI:

   a. **Read the delta spec** to understand the intended changes

   b. **Read the main spec** at `openspec/specs/<capability>/spec.md` (may not
   exist yet)

   c. **Apply changes intelligently**:

The rest: https://github.com/monid-ai/monid/blob/HEAD/.opencode/skills/openspec-sync-specs/SKILL.md
