plugins/coordinator.bak/skills/artifact-consolidation/SKILL.md
Use when artifact directories are bloated, during periodic maintenance, or when disk usage from session debris is excessive. Prunes and consolidates accumulated session artifacts — plans/, archive/handoffs/, stale task dirs. Supports dry-run mode. Standalone invocation only — not part of /update-docs.
npx skillsauth add oduffy-delphi/coordinator-claude artifact-consolidationInstall 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.
Session-based workflows generate artifacts: plan files, handoff archives, feature task directories, execution trackers. These accumulate indefinitely unless actively pruned. This skill consolidates them in bulk.
For distill-then-delete: If you want to extract knowledge into wiki documents before deleting artifacts, use /distill instead. This skill prunes without extracting; /distill extracts into docs/guides/ and docs/decisions/ first.
This is a destructive operation — it deletes files. Always start with a dry run. The PM approves the plan before any deletions.
| Directory | What accumulates | Pruning strategy |
|-----------|-----------------|-----------------|
| plans/ | Session plan files (*.md) | Delete plans older than 14 days with no open references |
| archive/handoffs/ | Consumed handoff files | Keep the most recent 10; delete the rest |
| tasks/*/ | Feature task directories | Delete dirs where all items are [x] completed and the feature branch is merged |
| tasks/handoffs/ | Active handoffs | Chain-aware archival (handled by handoff-archival); this skill does NOT touch active handoffs |
Run this phase first, always. Present the results to the PM before proceeding.
Count artifacts:
plans/ — count .md files, note oldest and newest timestampsarchive/handoffs/ — count filestasks/*/ — list feature directories, note which have all items completeddu -sh each directory)Classify each artifact as KEEP or PRUNE:
Plans (plans/*.md):
tasks/handoffs/, tasks/, and MEMORY.mdArchived handoffs (archive/handoffs/*.md):
Feature task directories (tasks/<feature>/):
todo.md exists and all items are [x], AND no lessons.md with unmerged entries, AND the feature branch (if identifiable from the dir name) is merged or deleted[ ] items remain, or contains unmerged lessonstasks/lessons.md (global), tasks/health-ledger.md, tasks/bug-backlog.md, tasks/debt-backlog.md, or tasks/architecture-atlas/Present the dry-run report:
## Artifact Consolidation — Dry Run
| Category | Total | Keep | Prune |
|----------|-------|------|-------|
| Plans | N | N | N |
| Archived handoffs | N | N | N |
| Feature task dirs | N | N | N |
**Total files to delete:** N
**Disk to reclaim:** ~Xkb
### Files to prune:
- plans/2026-01-15-foo.md (67 days old, no references)
- ...
### Files to keep:
- plans/2026-03-18-bar.md (2 days old)
- ...
Wait for PM approval. Do not proceed to Phase 2 without explicit confirmation.
Create a safety commit before any deletions:
git add -A && git commit -m "pre-consolidation checkpoint"
Delete PRUNE-classified files using git rm (so deletions are tracked in git history):
git rm plans/<file>git rm archive/handoffs/<file>git rm -r tasks/<feature>/Remove empty directories left behind (git doesn't track empty dirs, but the filesystem might retain them)
Commit the consolidation:
git add -A && git commit -m "artifact consolidation: pruned N plans, N handoffs, N task dirs"
Report results:
## Consolidation Complete
- Deleted N plan files
- Deleted N archived handoffs
- Deleted N feature task directories
- Reclaimed ~Xkb
- Safety commit: <hash> (revert target if needed)
The defaults (14-day plan retention, 10 archived handoffs) are starting points. Override with arguments:
/artifact-consolidation --plan-age 30 — keep plans younger than 30 days/artifact-consolidation --keep-handoffs 20 — keep 20 most recent archived handoffs/artifact-consolidation --dry-run — inventory only, no deletions (default on first run)/update-docs. Invoke it explicitly when artifact bloat is noticeable.git revert can undo the entire consolidation in one step.find | wc -l rather than listing individual files — present counts and size, not filenames.tasks/architecture-atlas/), global tracking files, or active handoffs. When in doubt, keep.tools
Orient session — preflight, load context, choose work
documentation
Wrap up finished work — capture lessons, update docs
testing
Use before commit, /merge-to-main, /workday-complete, or to validate repo state. Resolves and runs the project's configured fast-test command.
development
Root-cause discipline for ONE identified bug, test failure, or unexpected behavior — pin the premise, reproduce, trace to source, fix at source, verify. For a single known issue, not a codebase sweep.