Archive a completed change in the SDD workflow. Automatically syncs all delta specs and moves the change to the archive — no confirmation prompts.
Input: Optionally specify a change name after /sdd-archive (e.g., /sdd-archive add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes (you can use the AskUserQuestion tool).
Steps
If no change name provided, prompt for selection
List directories in
{ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/(excludingarchive) to get available changes. Use the AskUserQuestion tool to let the user select.Show only active changes (not already archived).
IMPORTANT: Do NOT guess or auto-select a change. Always let the user choose.
Check verification status
Read
{ARTIFACT_MAIN_FOLDER}/sdd-tracker.ymland find the entry for this change.If the change
statusis notverified, stop immediately and output:## Archive Blocked **Change:** <change-name> **Current status:** <status> This change has not been verified yet. Run `/sdd-verify <change-name>` and ensure all checks pass before archiving.Do not proceed further.
Check artifact completion status
List files in
{ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/<name>/to determine which artifacts exist. The expected artifacts are:proposal.md,design.md,tasks.md, and any files underspecs/.If any expected artifacts are missing:
- Note the missing artifacts in the final summary
- Proceed automatically without prompting
Check task completion status
Read the tasks file (typically
tasks.md) to check for incomplete tasks.Count tasks marked with
- [ ](incomplete) vs- [x](complete).If incomplete tasks found:
- Note the count of incomplete tasks in the final summary
- Proceed automatically without prompting
If no tasks file exists: Proceed without task-related note.
Sync all delta specs
Check for delta specs at
{ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/<name>/{SPECS_SUBFOLDER}/. If none exist, skip this step.If delta specs exist, automatically sync all of them:
- For each delta spec, compare with its corresponding main spec at
{ARTIFACT_MAIN_FOLDER}/{SPECS_SUBFOLDER}/<capability>/spec.md - Apply all changes (adds, modifications, removals, renames) directly to the main specs under
{ARTIFACT_MAIN_FOLDER}/{SPECS_SUBFOLDER}/ - Record which specs were synced for the final summary
Do NOT prompt — always sync automatically.
- For each delta spec, compare with its corresponding main spec at
Perform the archive
Create the archive directory if it doesn't exist:
mkdir -p {ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/archiveGenerate target name using current date:
YYYY-MM-DD-<change-name>Check if target already exists:
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move the change directory to archive
mv {ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/<name> {ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/archive/YYYY-MM-DD-<name>Tracker Update
After the move succeeds, follow the
sdd-trackerskill — set changestatustoarchivedand changelog entry "Archived on YYYY-MM-DD" for the change.Display summary
Show archive completion summary including:
- Change name
- Archive location
- Spec sync status (list of synced specs / no delta specs)
- Any warnings (incomplete artifacts/tasks)
Output On Success
## Archive Complete [with warnings]
**Change:** <change-name>
**Archived to:** {ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/archive/YYYY-MM-DD-<name>/
**Specs synced:** spec-a, spec-b ← or "No delta specs" if none
[Warnings: (only if present)
- Archived with N incomplete artifacts: <list>
- Archived with N incomplete tasks]
Output On Error (Archive Exists)
## Archive Failed
**Change:** <change-name>
**Target:** {ARTIFACT_MAIN_FOLDER}/{CHANGE_SUBFOLDER}/archive/YYYY-MM-DD-<name>/
Target archive directory already exists.
**Options:**
1. Rename the existing archive
2. Delete the existing archive if it's a duplicate
3. Wait until a different date to archive
Guardrails {SKILL_ASSETS_NOTICE}
- Always prompt for change selection if not provided and cannot be inferred
- Never block or prompt during archiving — proceed automatically, surface warnings in the summary
- Always sync all delta specs before archiving; never skip sync