Loading...
Loading...
Archive completed plans from plans/active/ to plans/completed/, supplement verification results and completion time. Suitable for calling after implementation is finished.
npx skill4agent add ashe-li/agent-skills plan-archiveplans/active/plans/completed/ECC Resource Awareness: If a usable code-reviewer agent is available, it can assist in verifying the implementation results in the plan.
.mdplans/active/ls plans/active/*.md 2>/dev/null## Phase## Step## 驗證## Verification## Industry & Standards Reference---**Status: ✅ Completed (YYYY-MM-DD)**
## Verification Resultsmkdir -p plans/completed
mv plans/active/<filename>.md plans/completed/<filename>.md✅ Archived: plans/completed/<filename>.mdplans/active/ExitPlanMode~/.claude/hooks/save-plan-on-exit.sh#!/bin/bash
# PostToolUse hook for ExitPlanMode
# Reads JSON from stdin, copies plan file to project's plans/active/
INPUT=$(cat)
# Extract plan_file path from tool response
PLAN_FILE=$(echo "$INPUT" | python3 -c "
import sys, json
try:
d = json.load(sys.stdin)
# ExitPlanMode tool_response may contain the plan file path
resp = d.get('tool_response', d)
print(resp.get('plan_file', resp.get('planFile', '')))
except Exception:
print('')
" 2>/dev/null)
if [ -z "$PLAN_FILE" ] || [ ! -f "$PLAN_FILE" ]; then
exit 0
fi
# Only act if we're inside a git repo with a plans/ directory pattern
if [ ! -f "$(pwd)/.git/HEAD" ] && [ ! -d "$(pwd)/.git" ]; then
exit 0
fi
DEST_DIR="$(pwd)/plans/active"
mkdir -p "$DEST_DIR"
SLUG=$(basename "$PLAN_FILE")
cp "$PLAN_FILE" "$DEST_DIR/$SLUG"
echo "[plan-archive] Plan saved to plans/active/$SLUG" >&2chmod +x ~/.claude/hooks/save-plan-on-exit.sh~/.claude/settings.json{
"hooks": {
"PostToolUse": [
{
"matcher": "ExitPlanMode",
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/hooks/save-plan-on-exit.sh"
}
]
}
]
}
}CLAUDE.md/plan-archive### Knowledge Precipitation Checklist Before Commit
5. **Archive plan** — If there is a corresponding plan for this work, execute `/plan-archive` after the implementation is completed
Move `plans/active/<name>.md` to `plans/completed/`, add verification resultsplans/
├── active/ # In progress (automatically saved by Hook / manually created via /plan)
├── completed/ # Implemented and completed (archived via /plan-archive)
└── archived/ # Long-term archived (old plans no longer referenced)