prune
Archive completed PRDs and their associated files (tasks, progress) to .plans/archive/. Use --dry-run to preview.
Archive completed PRDs to .plans/archive/:
-
Parse
$ARGUMENTS— check if the user requested a dry run (look for--dry-run,dry-run,dry run,preview, etc.). -
Find all
prd-*.mdfiles in.plans/(not in archive/). -
For each PRD:
- Extract feature name:
prd-<feature>.md-><feature> - Check if
.plans/tasks-<feature>.ymlexists and read it - Parse task YAML and check if ALL tasks have status
completedorcancelled - If all tasks done, this PRD is eligible for archiving
- Extract feature name:
-
If no completed PRDs found:
No completed PRDs found to archive. Complete some tasks with: /hone:run <task-file> -i <N> -
If
--dry-run:- List each completed PRD with its feature name
- Show which files would be moved (prd, tasks, progress — only those that exist)
- Show summary: "Would move N finished PRDs to archive: feature1, feature2"
- Say "Run without --dry-run to execute."
-
If NOT dry-run:
- Create
.plans/archive/directory if it doesn't exist - Before moving any files, check for conflicts: verify none of the destination files already exist in
.plans/archive/(prd, tasks, progress for each feature). If any conflicts found, list them and stop without moving anything. - For each completed PRD, move these files (if they exist) to
.plans/archive/:.plans/prd-<feature>.md.plans/tasks-<feature>.yml.plans/progress-<feature>.txt
- Use Bash
mvcommands to move files - Report each successful archive:
[ok] Archived: <feature> - Show summary: "Moved N finished PRDs to archive: feature1, feature2"
- Create