一键导入
archiving
Use after completing a plan or when .planning/ has accumulated stale data and needs a clean reset for the next task.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use after completing a plan or when .planning/ has accumulated stale data and needs a clean reset for the next task.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when designing complex multi-step features, building new components, or planning significant behavior changes that require design exploration before implementation.
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Use when refining design docs and specs through deep questioning. Triggered when user says "help me refine this plan", "ask me about the project", "deep interview", or after brainstorming produces a design doc.
Use when implementing any feature or bugfix, before writing implementation code
Use when delegating coding work — prototyping, debugging, analysis, review, implementation, or generating publication-quality scientific/architecture diagrams — to Codex CLI. Supports multi-turn sessions via SESSION_ID.
Use when starting complex multi-step tasks, research projects, or anything needing >5 tool calls. Provides the persistent .planning/ directory used as on-disk working memory across sessions.
| name | archiving |
| description | Use after completing a plan or when .planning/ has accumulated stale data and needs a clean reset for the next task. |
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.mdThis step is destructive. Before running it, use AskUserQuestion to get explicit confirmation, since the reset deletes the live working files. Confirm the archive from Step 3 is on disk first, and surface that the reset removes design.md, plan.md, progress.md, findings.md, and agents/. Do not proceed if the user declines.
Once confirmed:
${CLAUDE_PLUGIN_ROOT}/scripts/planning-reset.sh
This 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.