Files
Tabish Bidiwale b322829091 fix: add spec update functionality to archive command
The archive command was missing critical functionality to update main specs
from the change's future state specs when archiving. This fix adds:
- Spec update process that copies future state specs to main specs directory
- Confirmation prompt showing which specs will be created vs updated
- --yes flag for automation scenarios to skip confirmations
- Safety by default with clear visibility into spec changes
2025-08-13 18:00:00 +10:00

849 B

Why

Need a command to archive completed changes to the archive folder with proper date prefixing, following OpenSpec conventions. Currently changes must be manually moved and renamed.

What Changes

  • Add new archive command to CLI that moves changes to changes/archive/YYYY-MM-DD-[change-name]/
  • Check for incomplete tasks before archiving and warn user
  • Allow interactive selection of change to archive
  • Prevent archiving if target directory already exists
  • Update main specs from the change's future state specs (copy from changes/[name]/specs/ to openspec/specs/)
  • Show confirmation prompt before updating specs, displaying which specs will be created/updated
  • Support --yes flag to skip confirmations for automation

Impact

  • Affected specs: cli-archive (new)
  • Affected code: src/cli/index.ts, src/core/archive.ts (new)