mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
a5c10ed5e7
* feat: add /opsx:sync command for syncing delta specs to main specs Add a new agent-driven skill that syncs delta specs from a change to main specs without requiring archiving. This enables: - Updating main specs during active development - Intelligent merging (partial updates, adding scenarios) - Idempotent operation (safe to run multiple times) Implementation: - Extract shared specs-apply logic from archive.ts to specs-apply.ts - Add getSyncSpecsSkillTemplate and getOpsxSyncCommandTemplate - Register /opsx:sync in artifact-experimental-setup - Add specs-sync-skill main spec * fix: rename specs apply to specs sync throughout change artifacts Update all references: - /opsx:specs → /opsx:sync - specs-apply-skill → specs-sync-skill - Remove cli-artifact-workflow delta spec (no CLI command) - Update proposal, design, and tasks docs
1.5 KiB
1.5 KiB
Tasks
Core Implementation
- Extract spec application logic from
ArchiveCommandintosrc/core/specs-apply.ts- Move
buildUpdatedSpec(),findSpecUpdates(),writeUpdatedSpec()to shared module - Keep
ArchiveCommandimporting from the new module - Ensure all validation logic is preserved
- Move
Skill Template
-
Add
getSyncSpecsSkillTemplate()function insrc/core/templates/skill-templates.ts- Skill name:
openspec-sync-specs - Description: Sync delta specs to main specs
- Agent-driven: Instructions for agent to read deltas and edit main specs directly
- Skill name:
-
Add
/opsx:syncslash command template inskill-templates.ts- Mirror the skill template for slash command format
- Agent-driven: No CLI command, agent does the merge
Registration
- Register skill in managed skills (via
artifact-experimental-setup)- Add to skill list with appropriate metadata
- Ensure it appears in setup output
Design Decision
Why agent-driven instead of CLI-driven?
The programmatic merge operates at requirement-level granularity:
- MODIFIED requires copying ALL scenarios, not just the changed ones
- If agent forgets a scenario, it gets deleted
- Delta specs become bloated with copied content
Agent-driven approach:
- Agent can apply partial updates (add a scenario without copying others)
- Delta represents intent, not wholesale replacement
- More flexible and natural editing workflow
- Archive still uses programmatic merge (for finalized changes)