/alive:system-cleanupfrom alive
Scans for stale tasks, orphan folders, v2 remnants, and unsaved sessions across all walnuts, then surfaces issues one at a time for the user to fix.
Ships in alive. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
System maintenance. Root health first, then one walnut at a time. Surfaces issues with recommended fixes — the human picks.
Not a dashboard (that's world). Not a search (that's find). Not session history (that's alive:session-history). Pure maintenance.
Walnut structure is flat under _kernel/:
walnut-name/
_kernel/
key.md
log.md
insights.md
tasks.json
now.json
completed.json
bundle-a/
context.manifest.yaml
raw/
bundle-b/
context.manifest.yaml
There is NO _kernel/_generated/ subdirectory. There is NO bundles/ container directory. Bundles sit as direct children of the walnut root alongside _kernel/.
Task operations go through tasks.py, never by reading/writing task files directly:
tasks.py list --walnut {path} — all active tasks as JSONtasks.py list --walnut {path} --status active — filter by statustasks.py summary --walnut {path} — structured summary with countsProjection rebuilds go through project.py:
project.py --walnut {path} — rebuilds _kernel/now.jsonPhase 1: Root Audit (system-level, 7 checks — parallel subagents)
|
Phase 2: Walnut Summary (single subagent scans frontmatter, human picks)
|
Phase 3: Deep Audit (one walnut, 12 checks — parallel subagents)
Tidy is read-heavy. Every phase uses subagents to keep the main context clean.
Discovery subagents MUST use subagent_type: "Explore" — Explore agents have direct file read access without needing Bash. Use Explore for all Phase 1, Phase 2, and Phase 3 discovery checks.
Fix-execution subagents MUST use subagent_type: "general-purpose" — only general-purpose agents have Write/Edit access. Dispatch one general-purpose agent per approved fix.
Each subagent gets: the subagent brief (read $ALIVE_PLUGIN_ROOT/templates/subagent-brief.md once, prepend to every agent prompt), the check description, what to scan, what constitutes a pass/fail, and instructions to return a structured result (pass/fail + details if fail). Without the brief, subagents will not understand walnut/bundle structure, tasks.py, or v3 conventions.
Never read walnut files in the main context. All file reading happens inside subagents. The main context only sees results.
✓ 3a. now.json zero-context — pass. No details.Dispatch 7 subagents in parallel. Each checks one thing across the whole world.
Verify all 5 ALIVE folders exist at the world root (01_Archive/ through 05_Experiments/).
Pass: all 5 exist. Fail: any missing.
Scan 03_Inbox/ for items older than 48 hours. Unrouted inputs may contain decisions or context affecting active walnuts.
Pass: empty or nothing older than 48h. Fail: items found.
> **🐿️ tidy — unrouted inputs**
> 03_Inbox/ has 3 items older than 48 hours:
> - vendor-brochure.pdf (3 days)
> - meeting-notes-feb20.md (4 days)
>
> ▸ route via alive:capture-context / skip
Scan ALL walnuts' _kernel/key.md frontmatter (links: and parent: fields) AND body text for [[wikilinks]]. Check for:
parent: pointing to a non-existent walnut[[wikilinks]] used in body text or log entries but NOT in the frontmatter links: field. These are invisible to alive:search-world traversal._kernel/ but look like they should be walnutsQuick scan that every walnut has the full v3 flat _kernel/ skeleton:
_kernel/key.md, _kernel/log.md, _kernel/insights.md_kernel/tasks.json, _kernel/now.json_kernel/completed.jsonThere is NO _kernel/_generated/ subdirectory expected. There is NO bundles/ container directory expected. If either is found, that is a separate check (see 1d does not flag these — checks 3k and 3l handle v2 remnant detection during deep audit).
Pass: all walnuts have all 6 files in flat _kernel/. Fail: list what's missing where.
Scan .alive/_squirrels/ (world-level) for YAML files where saves: 0 (never saved). Flag entries that have stash items — those contain unrouted decisions/tasks. For entries with saves: 0 and empty stash, check transcript file size to distinguish "opened and closed" from "real work, never saved."
Separate entries with stash (need review) from empty shells (safe to clear).
> **🐿️ tidy — unsaved sessions**
> 3 sessions with unrouted stash:
> - stellarforge / squirrel:67b1e464 — 4 stash items
> - glass-cathedral / squirrel:45dcf404 — 6 stash items
> 13 empty shells (no walnut, no stash) — safe to clear.
>
> ▸ review stellarforge stash / review glass-cathedral stash / clear empty shells / skip
Flag anything at the world root that isn't an ALIVE folder (01_Archive/ through 05_Experiments/), .alive/, .claude/, or dotfiles. Nothing should live loose at root.
Check if .alive/_index.yaml exists and when it was last generated. If it doesn't exist or is older than 7 days, offer to regenerate by running generate-index.py.
Pass: index exists and is recent. Fail: missing or stale — offer to regenerate.
Present all 7 results together. Passing checks get one line. Failures expand.
> **🐿️ root audit — 7 checks**
> ✓ 1a. ALIVE structure — intact
> ✓ 1b. Inputs buffer — clean
> ⚠ 1c. Cross-walnut links — 2 undeclared connections
> ✓ 1d. Walnut integrity — all complete
> ⚠ 1e. Unsaved entries — 3 with stash, 13 empty
> ⚠ 1f. Orphan files — 2 at root
> ✓ 1g. Index — current
>
> 3 issues to resolve.
Then ask which to fix:
> **🐿️ root audit — which to fix?**
> 1. 2 undeclared cross-walnut connections
> 2. 3 unsaved sessions with stash (11 items total)
> 3. 2 orphan files at world root
>
> ▸ which ones? (numbers, "all", or "skip")
For each the human picks, propose the specific fix:
> **🐿️ proposed fixes**
> 1. Add [[ryn-okata]], [[jax-stellara]] to stellarforge key.md links:
> 3. Move AGENTS.md → glass-cathedral/raw/,
> delete disaster-recovery-extraction.md
>
> ▸ go / change something / skip
On "go": dispatch parallel general-purpose subagents to execute — one per fix. Each subagent reads the file, makes the edit, returns confirmation. Main context does not touch files.
> **🐿️ root audit complete**
> 7 checks. 3 issues, 2 fixed, 1 skipped.
> ▸ continue to walnut audit / done
Single subagent scans all walnuts. For each walnut, read ONLY _kernel/now.json (v3 flat path) and _kernel/key.md frontmatter (rhythm, type). Frontmatter only. Do not read full files.
Return a health table. The main context presents it:
> **🐿️ walnut health summary**
> # Walnut Type Health Updated Rhythm
> 1. glass-cathedral experiment active 2 hours ago weekly
> 2. stellarforge venture active 2 days ago weekly
> 3. nova-station venture quiet 12 days ago weekly ⚠
> 4. glass-cathedral experiment waiting 34 days ago monthly ⚠
>
> Which walnut to audit? (number, or "done" to finish)
Health thresholds (from rhythm):
| Rhythm | Quiet at | Waiting at |
|---|---|---|
| daily | 2 days | 4+ days |
| weekly | 2 weeks | 4+ weeks |
| fortnightly | 3 weeks | 6+ weeks |
| monthly | 6 weeks | 3+ months |
Post-migration note: If many walnuts show today's date with "active" health, the data may reflect migration timestamps rather than genuine recent work. Flag this to the human if detected (e.g., 5+ walnuts all updated on the same day).
Dispatch 12 subagents in parallel — one per check. Each subagent reads only the files it needs from the walnut's _kernel/ and its bundle directories. Do not read the brief pack in the main context.
The main context receives pass/fail results from all 12 subagents, presents them together, then walks through failures one at a time.
Scan ALL .md files in _kernel/ and in bundle directories (directories at the walnut root that contain context.manifest.yaml). Check each .md file starts with --- followed by valid YAML and a closing ---.
Pass: all files have frontmatter. Fail: list files without it.
Fix guidance: When the human picks "add frontmatter now", read the file body to determine:
Check that all 6 v3 kernel files exist in the flat _kernel/ directory:
_kernel/key.md_kernel/log.md_kernel/insights.md_kernel/tasks.json_kernel/now.json_kernel/completed.jsonPass: all present. Fail: list what's missing.
If _kernel/now.json is missing, suggest running project.py --walnut {path} to generate it.
Read _kernel/key.md frontmatter and body. Check:
type, goal, created, rhythm, tagspeople: populated (especially for ventures — empty people on a venture with collaborators is a gap)links: matches body references — if body text uses [[wikilinks]] not declared in links:, flag themtags: not emptyPass: all fields filled, links match body. Fail: list gaps.
Read _kernel/now.json (v3 flat path) and _kernel/log.md (frontmatter + first ~100 lines). Apply the zero-context test: "If a brand new agent loaded this walnut with no prior context, would it have everything it needs to continue the work?"
Fail conditions:
updated: timestamp is more than 2 weeks oldFix guidance: When the human picks "rewrite now", suggest running project.py --walnut {path} to regenerate now.json from current sources. If the log itself is stale, note that project.py will produce a stale projection and suggest a manual log entry first.
Use tasks.py list --walnut {path} --priority urgent to get urgent tasks. Check:
paused, archived, published).Pass: there is a credible top-of-mind action, or the walnut is legitimately at rest. Fail: nothing urgent, nothing active, and the walnut is not paused or archived.
Read _kernel/log.md frontmatter and first ~150 lines. Check:
signed: squirrel:[session_id])entry-count: in frontmatter is roughly accurate (within +/-5 of actual)last-entry: in frontmatter matches the top entry's datePass: ordered, signed, counts match. Fail: list specific issues.
Compare _kernel/key.md rhythm against _kernel/now.json updated timestamp using the Phase 2 thresholds.
Pass: within rhythm. Fail: quiet or waiting.
> **🐿️ tidy — stale walnut**
> nova-station has been quiet for 18 days (rhythm: weekly)
> Last entry: Feb 5 — "locked episode 11 structure"
>
> ▸ open it / archive it / change rhythm / skip
Scan bundle directories (direct children of walnut root that contain context.manifest.yaml). Check:
raw/ subdirectories with no corresponding context.manifest.yaml in the parent bundletype:, description:, date:). A manifest without description: is almost as invisible as no manifest.Pass: all raw files have manifests, all manifests have required fields. Fail: list gaps.
Check bundle directories for bundles with status: draft in their context.manifest.yaml that are older than 30 days (by date: field or file modification time).
Pass: nothing older than 30 days in draft. Fail: list stale bundles.
> **🐿️ tidy — stale draft**
> submission-draft/ — 39 days in draft status
> ▸ promote to prototype / archive / delete / skip
Scan bundle directories for bundles whose context.manifest.yaml has status: done or status: published. These bundles have completed their lifecycle and may contain working files, draft iterations, or temporary artefacts that can be cleaned up or archived.
Check each done/published bundle for:
*-draft-*.md, *.tmp, *.bak)proposal-v1.md, proposal-v2.md alongside proposal-v3.md)Pass: no cleanup candidates found. Fail: list bundles with cleanup opportunities.
> **🐿️ tidy — completed bundle cleanup**
> shielding-review/ (status: published) has 3 draft iterations
> ▸ archive drafts / delete drafts / skip
Check for v2 architecture remnants that need migration:
bundles/ container directory — In v3, bundles sit as direct children of the walnut root. A bundles/ directory at the walnut root is a v2 remnant. Suggest moving its contents up one level._kernel/_generated/ subdirectory — In v3, now.json lives directly in _kernel/. A _generated/ subdirectory inside _kernel/ is a v2 remnant. Suggest moving now.json up and removing the directory.tasks.md without tasks.json — Scan the walnut recursively for tasks.md files. If a tasks.md exists in a directory that has no corresponding tasks.json, flag it as a v2 remnant needing migration. The tasks.md format is no longer read by tasks.py.Pass: no v2 remnants found. Fail: list each remnant with migration instruction.
> **🐿️ tidy — v2 remnants**
> bundles/ container directory found — 4 bundles inside
> _kernel/_generated/ directory found — contains now.json
> 2 tasks.md files found without tasks.json counterpart
>
> ▸ migrate all / review individually / skip
Migration instructions per remnant type:
bundles/ — move each child directory up to walnut root, then remove empty bundles/_kernel/_generated/ — move now.json to _kernel/now.json, then remove _generated/tasks.md without tasks.json — parse tasks.md and create corresponding tasks.json using tasks.py addScan all direct child directories of the walnut root. Flag any directory that:
_kernel/raw/context.manifest.yamlThese are orphan folders — they exist in the walnut but have no manifest, so they are invisible to the context system. They may be leftover working directories, unmigrated content, or directories that need a manifest added.
Pass: all non-system child directories have manifests. Fail: list orphan folders.
> **🐿️ tidy — orphan folders**
> 3 folders with no context.manifest.yaml:
> - scratch-notes/
> - old-research/
> - meeting-prep/
>
> ▸ add manifests / archive / delete / skip
Use tasks.py list --walnut {path} --status active to get all active tasks as structured JSON. Each task includes a created date field.
Stale task detection: Filter tasks where created date is more than 14 days ago and status is still active or todo. These tasks may be stuck, forgotten, or no longer relevant.
Also check:
status: blocked that have no recent log entries mentioning themdue date that has passed> **🐿️ tidy — stale tasks**
> 3 tasks older than 14 days with no progress:
> - t012: "Send post-launch message to Ryn" (created 2026-03-10)
> - t015: "Review shielding spec" (created 2026-03-05, due: 2026-03-20 — OVERDUE)
> - t018: "Update API docs" (created 2026-03-01)
>
> ▸ still relevant / remove / reprioritise / blocked (note why) / skip
Present all 12 results together. Passing checks collapsed, failures listed.
> **🐿️ stellarforge audit — 12 checks**
> ✓ 3a. malformed files — all 34 .md files have frontmatter
> ✓ 3b. walnut skeleton — complete (6/6 kernel files)
> ⚠ 3c. key.md completeness — links: [] but body references 4 people
> ✓ 3d. now.json zero-context — pass
> ✓ 3e. urgent task — top urgent task fresh, aligns with phase
> ✓ 3f. log health — ordered, signed, counts match
> ✓ 3g. stale rhythm — active
> ✓ 3h. bundles — all manifests valid
> ✓ 3i. stale drafts — none
> ✓ 3j. completed bundles — clean
> ⚠ 3k. v2 remnants — bundles/ container found, 1 tasks.md without tasks.json
> ⚠ 3l. orphan folders — 2 folders without manifests
> ⚠ 3m. stale tasks — 3 tasks older than 14 days
>
> 4 issues to resolve.
Ask which to fix:
> **🐿️ stellarforge — which to fix?**
> 1. key.md links: [] but body references 4 person walnuts
> 2. bundles/ container + 1 tasks.md needing migration
> 3. 2 orphan folders without manifests
> 4. 3 stale tasks older than 14 days
>
> ▸ which ones? (numbers, "all", or "skip")
For each the human picks, propose the specific fix:
> **🐿️ proposed fixes**
> 1. Add [[ryn-okata]], [[jax-stellara]], [[mira-solaris]],
> [[orion-vex]] to stellarforge `_kernel/key.md` frontmatter links: field
> 2. Move 4 bundle directories from bundles/ to walnut root,
> migrate tasks.md in submission-draft/ to tasks.json
> 3. Add context.manifest.yaml to scratch-notes/ and old-research/
>
> ▸ go / change something / skip
On "go": dispatch parallel general-purpose subagents to execute — one per fix. Each subagent reads the file, makes the edit, returns confirmation. Main context does not touch files.
> **🐿️ stellarforge — fixes applied**
> ✓ `_kernel/key.md` links updated — 4 person walnuts added
> ✓ bundles/ migrated — 4 directories moved, tasks.md converted
> ✓ manifests added — 2 orphan folders now have context.manifest.yaml
> ✗ stale tasks — skipped
>
> ▸ audit another walnut / done
If "audit another walnut" — return to Phase 2 summary with updated health flags. If "done" — Final Summary.
> **🐿️ tidy complete**
> Root: 7 checks, 3 issues, 2 resolved
> stellarforge: 12 checks, 4 issues, 3 resolved
>
> 9 resolved, 2 skipped. World is healthy.
After presenting the final summary, write the current date to .alive/.last_tidy so the session hook can track when tidy was last run:
date -u +"%Y-%m-%d" > "$WORLD_ROOT/.alive/.last_tidy"
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivecontext/alive --plugin alive17 skills in this plugin
/build-extensionsCreate new skills, rules, and hooks for your world. Checks plugin compatibility, writes to the human's space (not plugin cache), validates against the system, and suggests when repeated work should become a skill. For marketplace-ready plugins, hands off to the contributor plugin./bundleCreate, share, and graduate bundles — the unit of focused work within a walnut. Manages the full bundle lifecycle from creation through sharing to graduation./capture-contextUse when external content arrives in the session — emails, transcripts, screenshots, documents, files, or in-session research worth keeping. Also use when there's nothing obvious to capture — the skill checks 03_Inbox/ for unrouted files and enters inbox scan mode. Stores raw content, routes to bundles, extracts tasks and insights into the stash./create-walnutSomething new is emerging. A venture, an experiment, a person entering the orbit, a life area getting serious. It needs its own walnut — its own identity, history, and future. Scaffolds the full structure, maps existing context sources, and optionally migrates files across./demoGenerate a believable, lived-in ALIVE world from a free-text persona description (custom path) or a deterministic sandbox preset. Routes the create/list/activate/deactivate/delete/status surface and orchestrates the 5-stage subagent generation pipeline./feedbackReport a bug, request a feature, or send general feedback to the ALIVE team. Collects safe system metadata, shows a preview, and creates a GitHub Issue. Nothing personal leaves the machine, only what you type and anonymous system info.Other plugins' skills for the same job