| name | archive |
| description | Use when planning a sprint transition, archiving completed work, or resetting the PRD for a fresh start. Archives completed PRD stories to docs.local/. Covers archive, cleanup, sprint transition, reset PRD. NOT for: deleting stories mid-sprint (use prd-manager), viewing PRD status (use ralph-status). |
Archive PRD Stories
Archive completed stories to docs.local/prd-archive/ with full history preservation. Optionally reset the working PRD for a fresh start.
Available Scripts
Run these directly - standalone, no ralph.zsh dependency:
| Script | Purpose | Usage |
|---|
scripts/archive-snapshot.sh | Create archive snapshot | bash ~/.claude/commands/archive/scripts/archive-snapshot.sh |
scripts/cleanup-completed.sh | Archive + remove completed | bash ~/.claude/commands/archive/scripts/cleanup-completed.sh |
Quick Actions
What Gets Archived
Each archive creates a timestamped directory:
docs.local/prd-archive/20260123-153000/
├── index.json # PRD index at time of archive
├── stories/ # All story files (completed + pending)
│ ├── US-001.json
│ ├── US-002.json
│ └── ...
└── progress.txt # Ralph progress log
Cleanup Behavior
When cleanup is triggered (via --clean or confirming prompt):
- Completed stories deleted - All
*.json files where passes=true
- Index reset - Stats reset, pending array rebuilt from remaining stories
- Progress cleared -
progress.txt replaced with fresh start header
History is always preserved - The archive contains full state before cleanup.
Safety Notes
- Always archives first - Cleanup only happens after successful archive
- Blocked stories preserved - Stories in blocked array are kept
- Pending stories preserved - Only completed (passes=true) stories removed
- Reversible - Full state available in
docs.local/prd-archive/
Converted and distributed by TomeVault — claim your Tome and manage your conversions.