一键导入
plan-cleanup
Archive completed plans and clean workspace using CLI commands
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Archive completed plans and clean workspace using CLI commands
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | plan-cleanup |
| description | Archive completed plans and clean workspace using CLI commands |
| triggers | ["archive plans","clean plans","cleanup workspace","remove old plans","archive completed"] |
| maintainer | false |
What: Systematically archive completed plans and clean workspace
When to use:
.aiknowsys/ (>20 active plans)Commands: archive-plans, clean
.aiknowsys/PLAN_*.md.aiknowsys/plans/active-*.md (optional but recommended)Check plan count:
ls -1 .aiknowsys/PLAN_*.md | wc -l
Preview what would be archived:
npx aiknowsys archive-plans --dry-run
Preview full cleanup:
npx aiknowsys clean --dry-run
Option A: Archive Completed Plans Only
Use when:
Command:
npx aiknowsys archive-plans --status COMPLETE --threshold 0
Options:
--status <status> - Archive by status (COMPLETE, CANCELLED, PAUSED, etc.) - default: COMPLETE--threshold <days> - Archive plans older than N days (use 0 for immediate) - default: 7--dry-run - Preview without actually moving filesWhat it does:
.aiknowsys/plans/active-*.md).aiknowsys/archived/plans/Option B: All-in-One Workspace Cleanup
Use when:
Command:
npx aiknowsys clean
What it cleans:
Preview first (recommended):
npx aiknowsys clean --dry-run
Check archived plans:
ls -1 .aiknowsys/archived/plans/ | grep PLAN_
Check remaining active plans:
ls -1 .aiknowsys/PLAN_*.md | wc -l
Verify plan pointers updated:
cat .aiknowsys/plans/active-*.md
# Should not reference archived plans
Review changes:
git status
# Should show plan files moved to archived/
Commit:
git add -A
git commit -m "chore: archive completed plans (cleanup)
Archived X plans to .aiknowsys/archived/plans/:
- PLAN_feature_x.md (completed)
- PLAN_feature_y.md (completed)
...
Result: N plans → M active plans"
Goal: Declutter workspace at end of month
Steps:
# 1. Preview what would be cleaned
npx aiknowsys clean --dry-run
# 2. Review output, ensure nothing important would be removed
# 3. Run cleanup
npx aiknowsys clean
# 4. Verify results
ls -1 .aiknowsys/PLAN_*.md | wc -l
ls -1 .aiknowsys/archived/plans/ | tail -10
# 5. Commit
git add -A
git commit -m "chore: monthly workspace cleanup"
Goal: Archive all cancelled plans (failed experiments)
Steps:
# 1. Preview
npx aiknowsys archive-plans --status CANCELLED --dry-run
# 2. Archive
npx aiknowsys archive-plans --status CANCELLED --threshold 0
# 3. Verify
ls -1 .aiknowsys/archived/plans/ | grep CANCELLED
# 4. Commit
git add -A
git commit -m "chore: archive cancelled plans"
Goal: Clean workspace before major release
Steps:
# 1. Archive completed plans from this release cycle
npx aiknowsys archive-plans --status COMPLETE --threshold 0
# 2. Archive old sessions (free up space)
npx aiknowsys clean --dry-run # Preview
npx aiknowsys clean # Execute
# 3. Verify workspace state
tree .aiknowsys -L 2
# 4. Commit with release context
git add -A
git commit -m "chore: workspace cleanup for v0.11.0 release
Archived completed plans and old sessions
Active plans remaining: $(ls -1 .aiknowsys/PLAN_*.md | wc -l)"
When: Commands unavailable or need custom logic
Steps:
# 1. Create archive directory if needed
mkdir -p .aiknowsys/archived/plans
# 2. Move completed plans
mv .aiknowsys/PLAN_feature_x.md .aiknowsys/archived/plans/
mv .aiknowsys/PLAN_feature_y.md .aiknowsys/archived/plans/
# 3. Update plan pointer files manually
# Edit .aiknowsys/plans/active-*.md to remove archived plan references
# 4. Verify and commit
git add -A
git commit -m "chore: archive completed plans (manual)"
⚠️ Limitation: Manual archival doesn't update plan pointer files automatically. Use commands when possible.
--dry-run before actual cleanup--threshold 0 is safe, avoid high values unless certainPlan Lifecycle:
npx aiknowsys create-plan --title "Feature X"npx aiknowsys archive-plans --status COMPLETE.aiknowsys/archived/plans/Plan Pointer Workflow:
Symptom: npx aiknowsys archive-plans → command not recognized
Solution:
# Rebuild CLI
npm run build
# Verify command exists
npx aiknowsys --help | grep archive
Symptom: archive-plans reports 0 plans archived
Possible causes:
Solutions:
# Check plan status
grep -r "status:" .aiknowsys/PLAN_*.md
# Use threshold 0 for immediate archival
npx aiknowsys archive-plans --threshold 0
# Check if plan pointers exist
ls -1 .aiknowsys/plans/active-*.md
Symptom: Archived a plan still being worked on
Solution:
# Move back from archive
mv .aiknowsys/archived/plans/PLAN_feature_x.md .aiknowsys/
# Update plan pointer if needed
# Edit .aiknowsys/plans/active-<username>.md to re-add plan
# Commit restoration
git add -A
git commit -m "chore: restore accidentally archived plan"
create-plan - Create new implementation planupdate-plan - Update plan status and contentquery-plans - Query plan metadataclean - All-in-one workspace cleanupLast Updated: 2026-02-09
AIKnowSys Version: 0.10.0+
Query up-to-date 3rd-party framework/library documentation using Context7 MCP
Create and modify AIKnowSys sessions and plans using mutation commands
Query AIKnowSys knowledge system (READ operations only - plans, sessions, context search)
AI-assisted workflow for sharing personal patterns with the team. Detects valuable patterns, checks duplicates, and guides sharing decisions.
Review AIKnowSys deliverables (skills, stack templates, documentation) using Context7 MCP for current framework documentation. Use for monthly quality reviews, pre-release validation, or when frameworks release major versions.
Template for creating new skills following VS Code Agent Skills standard