skills/archiving/SKILL.md
Use after completing a plan or when .planning/ has accumulated stale data and needs a clean reset for the next task.
npx skillsauth add sipengxie2024/superpower-planning archivingInstall 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.
Archive the active project in .planning/ into a structured archive directory, consolidate and polish project memory based on current repo facts, and reset .planning/ for the next task.
Core principle: The target is the active project (design, plan, findings, progress), not "the session."
Announce at start: "I'm using the archiving skill to archive this project and consolidate memory."
Prerequisite: .planning/progress.md and .planning/findings.md must exist with content beyond the empty template.
.planning/progress.md — extract task names from the Task Status Dashboard.planning/plan.md exists, derive the feature name from itAskUserQuestion to let the user confirm or modify the archive nameRead all active project files:
.planning/design.md (if exists).planning/plan.md (if exists).planning/progress.md.planning/findings.md.planning/agents/*/findings.md (if any exist)Generate a concise summary.md with this format:
# Archive: <name>
**Date:** YYYY-MM-DD
## Summary
<!-- 2-3 sentences: what was done, what was the outcome -->
## Key Decisions
<!-- From findings.md Technical Decisions table — only decisions with long-term value -->
## Lessons Learned
<!-- Patterns discovered, gotchas, things to remember for similar future work -->
## Key Files Changed
<!-- Important files that were created or significantly modified -->
Keep it concise. The summary is a quick-reference document. Aim for 30-60 lines. The full design, plan, findings, and progress are preserved alongside it.
mkdir -p .planning/archive
${CLAUDE_PLUGIN_ROOT}/scripts/unique-filename.sh .planning/archive "<name>" ""
mkdir -p "<returned-path>"
${CLAUDE_PLUGIN_ROOT}/scripts/snapshot-save.sh "<returned-path>"
summary.md to the archive directoryThis step performs a fact-based memory maintenance pass — not just adding new findings, but optimizing existing memory against current repo state.
4a. Explore current facts
~/.claude/projects/. Read MEMORY.md and any topic files in that directory only — do NOT glob across all projects.git diff --stat to see recent changes4b. Extract new findings
.planning/findings.md, identify items worth long-term retention:
4c. Generate unified optimization proposal
Present to user in this format:
Memory Optimization Suggestions:
New items (from this session's findings)
- [new finding 1]
- [new finding 2]
Compress (existing memory that can be condensed)
- [memory item X] -> [compressed version]
Update (inconsistent with current repo facts)
- [outdated memory Y] -> [corrected version]
Remove (no longer applicable)
- [obsolete memory Z] — reason: [why]
If there are no suggestions in a category, omit that category entirely.
4d. User confirmation
AskUserQuestion to present the suggestions4e. Execute writes
MEMORY.md stays under 200 lines — move detailed content to topic filesMEMORY.md${CLAUDE_PLUGIN_ROOT}/scripts/planning-reset.sh
This removes design.md, plan.md, progress.md, findings.md, and agents/, then recreates clean templates from canonical sources. archive/ and stash/ are preserved automatically.
Display a concise completion summary:
Archive complete:
- Archive: .planning/archive/<name>/
- Memory: <N> items added, <N> compressed, <N> updated, <N> removed
- .planning/ reset to clean state
Empty .planning/: Run ${CLAUDE_PLUGIN_ROOT}/scripts/check-planning-state.sh — if it returns empty, warn the user and ask if they still want to archive. An empty archive has no value.
No memory changes needed: If there are no new findings worth persisting and existing memory is already accurate, skip Step 4c-4e entirely. Report "Memory already up to date."
Multiple sessions in one .planning/: If progress.md shows multiple session headers, include all of them in the archive summary.
Legacy archives: Existing single-file archives in .planning/archive/*.md remain valid. The archive listing and historical archive checks should handle both formats.
development
Use when a spec or requirements exist for a multi-step task and an implementation plan needs to be written before touching code
data-ai
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs.
data-ai
Use when executing implementation plans with parallel task groups or individual tasks too heavy for subagent context limits.
development
Use when implementing any feature or bugfix, before writing implementation code