skills/archive-roadmap/SKILL.md
Archive a completed roadmap workspace to openspec/roadmaps/archive/<date>-<id>/
npx skillsauth add jankneumann/agentic-coding-tools archive-roadmapInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Move a completed roadmap workspace into the archive directory, mirroring the OpenSpec change-archive convention. Preserves the full workspace contents (proposal.md, roadmap.yaml, checkpoint.json, learnings/) under a date-prefixed archive entry.
<roadmap-id> - The roadmap identifier, matching the workspace directory name under openspec/roadmaps/.
Optional flags:
--force - Archive even if items are not in terminal states (completed or skipped). Useful for abandoned epics.--archive-root <path> - Override the default archive directory. Defaults to <workspace>/../archive.openspec/roadmaps/<roadmap-id>/ containing at least roadmap.yaml.skills/roadmap-runtime/scripts/.Archiving moves roadmap directories and therefore mutates repository files. In local CLI execution, run inside a managed worktree before moving the workspace:
CHANGE_ID="archive-roadmap-<roadmap-id>"
eval "$(python3 "<skill-base-dir>/../worktree/scripts/worktree.py" setup "$CHANGE_ID")"
cd "$WORKTREE_PATH"
skills/.venv/bin/python skills/shared/checkout_policy.py require-mutation
from pathlib import Path
import sys
sys.path.insert(0, "skills/archive-roadmap/scripts")
from archive import archive_roadmap, IncompleteRoadmapError
workspace = Path("openspec/roadmaps") / roadmap_id
The helper inspects every item's status field. Terminal statuses are completed and skipped. Anything else (failed, blocked, replan_required, in_progress, approved, candidate) means the roadmap is incomplete.
If incomplete and --force is not set, the helper raises IncompleteRoadmapError with a per-status count. Surface that to the user verbatim and prompt them to either:
--force to archive anyway (e.g., abandoned epic)./autopilot-roadmap or manual edits, then re-run.The destination is openspec/roadmaps/archive/<YYYY-MM-DD>-<roadmap-id>/, where the date is today's date in ISO format. This matches the OpenSpec change-archive naming convention (openspec/changes/archive/<date>-<change-id>/).
If the target already exists (multiple archives in one day with the same id, or a re-archive after restoration), the helper raises FileExistsError. Resolve manually — rename the existing entry or pick a different date.
The helper creates the archive root if needed, then moves the workspace directory in place. After move:
openspec/roadmaps/<roadmap-id>/ — gone.openspec/roadmaps/archive/<date>-<roadmap-id>/ — full workspace contents preserved.Print a concise summary:
## Archive Complete
**Roadmap:** <roadmap-id>
**Archived to:** openspec/roadmaps/archive/<date>-<roadmap-id>/
**Items:** N completed, M skipped (or counts by status if --force was used)
**Forced:** yes/no
try:
result = archive_roadmap(workspace, force=force_flag)
except IncompleteRoadmapError as e:
# Surface counts to user and ask how to proceed
print(f"Cannot archive: {e}")
return
except FileExistsError as e:
# Surface collision to user
print(f"Archive collision: {e}")
return
print(f"Archived {result.roadmap_id} to {result.destination}")
--force (prevents accidental archival of in-progress work).mv back to the original location.openspec/roadmaps/
├── <active-roadmap-id>/ # active workspaces
│ ├── proposal.md
│ ├── roadmap.yaml
│ ├── checkpoint.json
│ ├── learnings/
│ └── learning-log.md
└── archive/
└── <YYYY-MM-DD>-<roadmap-id>/ # archived (this skill's output)
└── (same layout, frozen)
/plan-roadmap — produces the workspace this skill archives./autopilot-roadmap — drives items to terminal states so this skill can archive them cleanly./openspec-archive-change — analogous skill for individual OpenSpec changes; this skill is the roadmap-level counterpart.development
Open the artifacts relevant to a review (OpenSpec proposal, branch changes, or explicit paths) in VS Code, in a curated read-order, in the right worktree.
tools
Render and seed coordinator-owned task status block in OpenSpec tasks.md
testing
User-invocable skill that omits the tail block
tools
Missing several required keys