Archiving Previous Runs
Ralph automatically archives completed features when you start a new one. This keeps your workspace clean and preserves history.How Archiving Works
When you run Ralph with a newprd.json that has a different branchName, Ralph detects the change and archives the previous run.
Detect branch change
Ralph compares the current
branchName in prd.json to the previous run’s branch (stored in .last-branch)Create archive folder
Ralph creates a dated folder in Format:
archive/:archive/YYYY-MM-DD-feature-name/Copy files
Ralph copies the completed run’s files:
prd.json(with all stories markedpasses: true)progress.txt(all learnings and commit history)
Archiving happens automatically when you run
./ralph.sh with a new feature. You don’t need to do anything manually.Archive Structure
After several features, your archive looks like this:Viewing Archived Runs
See what features Ralph completed:When Archiving Happens
Scenario 1: Starting a new feature
Scenario 1: Starting a new feature
Setup:Action: You create a new PRD for notifications:Result: When you run
./ralph.sh, it archives task-status to archive/2026-03-11-task-status/Scenario 2: Continuing same feature
Scenario 2: Continuing same feature
Setup:Action: You run
./ralph.sh again without changing prd.jsonResult: No archiving happens. Ralph continues working on the same feature.Scenario 3: Manual archiving
Scenario 3: Manual archiving
Setup: You want to archive manually before Ralph does it automaticallyAction:Result: Previous run is archived, and you can safely start a new feature.
What Gets Archived
| File | Included | Why |
|---|---|---|
prd.json | ✅ Yes | Shows completed stories and final state |
progress.txt | ✅ Yes | Full log of learnings and commits |
prompt.md / CLAUDE.md | ❌ No | Shared across features |
ralph.sh | ❌ No | Shared across features |
| Git commits | ❌ No | Already in git history |
Recovering From Archive
If you need to revisit an old feature:Archive Management
How long to keep archives
How long to keep archives
Archives are small (just JSON and text). Keep them indefinitely or clean up old ones:
Searching across archives
Searching across archives
Find learnings from previous features:
Backing up archives
Backing up archives
Archives contain valuable learnings. Back them up:
Manual Archive Script
If you want to archive manually before Ralph does it automatically:Preventing Accidental Overwrites
To prevent accidental archives:Version Control Considerations
Should you commit archives?
Should you commit archives?
Pros of committing archives:
- Full history in git
- Team can see what was completed
- Easy to reference previous learnings
- Adds noise to git history
- Can grow large over time
- Progress logs might contain sensitive info
Gitignore archives
Gitignore archives
To exclude archives from git:You’ll still have git history of commits, which is the real record of what Ralph did.
Debugging Archive Issues
Archive folder not created
Archive folder not created
Symptom: Branch changed but no archive was createdDebugging:
Wrong files archived
Wrong files archived
Symptom: Archive contains incomplete or wrong dataCause: Ralph archives whatever is in
prd.json and progress.txt at the time of the branch change.Solution: Manually copy the correct files:Next Steps
- Debugging - Troubleshoot Ralph issues
- Customizing Prompts - Configure Ralph for your project
- Right-Sizing Stories - Create better PRDs

