From alive
Upgrades ALIVE Context System worlds from prior versions: detects legacy structures (.walnut/, _core/, _kernel/, bundles/), migrates files, converts MD/JSON/YAML formats, audits sync scripts, executes with rollback.
npx claudepluginhub alivecontext/alive --plugin aliveThis skill uses the workspace's default tool permissions.
Upgrade a world from any previous version of the ALIVE Context System to the current version. Handles structural renames, file migrations, terminology updates, legacy cleanup, and integrity verification.
Audits Claude Code workspaces (walnuts) for maintenance issues like stale tasks, orphan folders, v2 remnants, and unsaved sessions. Surfaces issues one at a time with recommended fixes.
Proposes upgrades to generated skills via Ars Contexta research graph consultation, justifying methodology improvements. Never auto-implements; triggers on /upgrade or upgrade phrases.
Migrates AI-DLC environment from v1 to v2, running preflight verification (uncommitted changes, v1 detection), data migration, and post-migration checks. Triggers on 'start migrate', 'aidlc migrate', 'γγ€γ°γ¬γΌγ·γ§γ³'.
Share bugs, ideas, or general feedback.
Upgrade a world from any previous version of the ALIVE Context System to the current version. Handles structural renames, file migrations, terminology updates, legacy cleanup, and integrity verification.
This skill has been battle-tested on a 16GB world with 142 walnuts, 88 bundles, 81 people, and 6 distinct legacy patterns. Every edge case below comes from a real upgrade.
.walnut/, _core/, _capsules/, companion.md, bundles/, _kernel/_generated/, tasks.md, observations.md)/alive:system-upgrade| Component | v1 | v2 | v3 |
|---|---|---|---|
| System dir | _core/ | _kernel/_generated/ | _kernel/ (flat) |
| Bundles | _core/_capsules/ | bundles/ | walnut root (flat) |
| Manifest | companion.md | context.manifest.yaml | context.manifest.yaml |
| Tasks | N/A | tasks.md | tasks.json (script-operated) |
| State | now.md | _kernel/_generated/now.json | _kernel/now.json (script-generated) |
| Observations | N/A | observations.md | removed (stash -> log) |
| Inbox domain | 03_Inputs/ | 03_Inputs/ | 03_Inbox/ |
Before touching anything, understand what's there. Dispatch a scout agent (or multiple in parallel) to map the full world structure.
Core structure scan:
.walnut/ vs .alive/ -- which system folder exists? Do BOTH exist (merge needed)?_core/ vs _kernel/ -- which kernel structure is in use?_kernel/_generated/ present? (v2 intermediate directory -- needs flattening in v3)_capsules/ vs bundles/ vs flat-at-root -- which bundle structure is in use?companion.md vs context.manifest.yaml -- which manifest format exists?now.md vs _kernel/_generated/now.json vs _kernel/now.json -- which state format is in use?tasks.md present anywhere? (v2 -- needs conversion to tasks.json in v3)observations.md present in any bundles? (v2 -- removed in v3).claude/ configuration referencing old pathsLegacy structure detection (critical -- older ALIVE versions used different layouts):
archive/, life/, ventures/, experiments/, inbox/, docs/, product/, plugin/, _working/ -- these are from pre-ALIVE-framework eras when domains didn't have numbered prefixes_brain/ folders inside walnuts (v3 era state management)_state/ folders inside walnuts (v3 era)_core/ or _kernel/)src/ or other code directories orphaned at world root from website development01_Archive/, 02_Life/, 03_Inbox/, 04_Ventures/, 05_Experiments/, .alive/, .claude/, or standard dotfilesv2 structure detection (for v2->v3 upgrade):
bundles/ directory inside any walnut root (v2 -- bundles flatten to walnut root in v3)_kernel/_generated/ directory structure (v2 -- _kernel/ is flat in v3)tasks.md files anywhere under any walnut (v2 -- converted to tasks.json in v3)observations.md files inside bundles (v2 -- removed in v3)Duplicate walnut detection:
people/professional/jane/ AND people/jane-smith/)World size check:
du -sh on the world rootSync script audit:
preferences.yaml context_sources: for configured sync scripts.claude/scripts/ for any scripts with hardcoded paths_core/, _capsules/, .walnut/, companion.md, now.md, _kernel/_generated/, bundles/, tasks.md, observations.md, or un-numbered domain paths like inbox/ instead of 03_Inbox/Root-level now.md duplicates:
now.md at BOTH the walnut root AND inside _core/_core/ version as canonical)_core/ directories with only _capsules/ inside:
_core/ dirs contain only _capsules/ (no key.md, now.md, etc.)ββ πΏοΈ system scan complete
β
β Current version: [detected]
β System folder: [.walnut/ | .alive/ | both]
β Kernel: [_core/ | _kernel/_generated/ | _kernel/ (flat) | mixed]
β Bundles: [_capsules/ | bundles/ | flat at root | mixed]
β State: [now.md | _kernel/_generated/now.json | _kernel/now.json | mixed]
β Tasks: [tasks.md | tasks.json | none | mixed]
β Observations: [observations.md present | none]
β Squirrels: [count] in [location]
β Custom: [N skills, N rules, N hooks]
β
β ! Legacy: [un-numbered domains at root | _brain/ folders | etc.]
β ! Duplicates: [N person walnuts in multiple locations]
β ! World size: [size] -- [git OK | tarball recommended]
β ! Sync scripts: [N scripts reference old paths]
β
β Upgrade path: [v1->v3 | v2->v3 | already v3 | specific operations needed]
β°β
Generate an interactive HTML visualisation showing what will change. Open it in the browser so the human can review before committing.
The visualisation shows:
Before executing, confirm with the human:
Preferences:
Permissions -- batched into one AskUserQuestion:
Generate a Python upgrade script and run it. The script MUST be generated fresh (not fetched from a URL) so the human can review it. Write it to .alive/_generated/upgrade.py.
The script must handle these known edge cases:
companion.md and now.md files in the wild contain YAML that breaks standard parsers:
[[walnut-name]]) that YAML interprets as nested flow sequencesdescription: Schema spec for dev: block)2026-03-12 vs 2026-03-12T14:00:00 vs 2026-03-12T14:00:00Z)The parser must:
yaml.safe_load() firstField mapping:
type: capsule -> removed (inferred from location in bundles/)goal: -> preserved, also used to generate description: (first 120 chars)status: -> preserved (known values: draft, prototype, published, done, active)linked_capsules: -> linked_bundles:squirrel: (singular, rare) -> normalize to squirrels: (plural, as array)sources: -> preserved, but normalize bare strings to {path: str, description: "", type: "document"}Body section handling (body sections vary wildly across worlds):
## Context / ## Summary / ## Current State -> context: YAML field in manifest## Tasks -> extract to tasks.md sibling file (if contains [ ], [x], [~] markers)## Work Log -> extract to observations.md sibling file## Changelog, ## Decisions, ## Open Questions, custom sections -> preserved in context: or dropped (these are historical, not operational)After conversion, rename original to companion.md.bak (never delete source material during upgrade).
Field mapping:
phase: -> preserved (10+ distinct values exist in the wild: active, building, launching, pre-launch, onboarding, waiting, legacy, planning, ready, complete, starting, retainer-pending)updated: -> preserved as string (normalize to ISO format if possible)capsule: -> rename to bundle: (can be null)next: -> preservedsquirrel: -> preserved (can be a hex hash OR the word "migration")health: -> dropped (calculated at read time in v2+)links: -> dropped (lives in key.md)model: -> dropped (lives in squirrel entry)## Context, ## Open, custom headings, or bare prose) -> context: JSON stringCreate _kernel/_generated/ directory before writing now.json (for v2 target). For v3 target, write directly to _kernel/now.json. Delete now.md after successful conversion.
Credential scrubbing: Scan body text for patterns matching password, api[_-]?key, secret, token, Bearer. Scrub matching lines from the JSON context field. Warn the human about what was removed.
Parse markdown checkbox format into structured JSON:
Status mapping from checkboxes:
[ ] -> status: "todo"[~] -> status: "active"[x] -> status: "done" -> route to completed.json instead of tasks.jsonField extraction:
@session_id anywhere in the line -> session field (strip the @ prefix)## Urgent or ### Urgent -> priority: "urgent"## Active or ### Active -> priority: "active"## To Do or ### To Do -> priority: "normal"## Blocked or ### Blocked -> priority: "blocked"tags field (array):
[M] -> "must"[S] -> "should"[C] -> "could"[W] -> "wont"text fieldOutput format (tasks.json):
{
"tasks": [
{
"text": "Implement the parser",
"status": "active",
"priority": "urgent",
"session": "abc123",
"tags": ["must"]
}
]
}
Output format (completed.json):
{
"completed": [
{
"text": "Write the spec",
"status": "done",
"priority": "normal",
"session": "def456",
"tags": []
}
]
}
Error handling:
After successful conversion, rename original to tasks.md.bak.
observations.md.bak)context.manifest.yaml context: field, appending to any existing contextobservations.md.bakEach subdirectory under bundles/ moves to the walnut root:
walnut-root/bundles/my-bundle/ -> walnut-root/my-bundle/_kernel would collide)bundles/ directory_kernel/_generated/now.json -> _kernel/now.json_kernel/_generated/ to _kernel/ (preserving names)_kernel/_generated/ directory_kernel/_generated/ contains subdirectories, warn and skip (flag for manual review)After structural migration is complete:
project.py --walnut {path} to generate a fresh _kernel/now.json reflecting the new structureproject.py is not available, preserve the migrated now.json as-is and warnbundles/ (v2) or walnut root directly (v3), not just renamed. The move changes relative path depth.bundles/ (v2) or leave in place with rename (v3).Skip files in templates/ directories -- these are plugin scaffolding templates, not walnut state:
templates/walnut/now.md -- do not converttemplates/companion/companion.md -- do not convertIf both walnut-root/now.md AND _core/now.md (or _kernel/now.md) exist:
_core/ / _kernel/ version as canonical (it's the system file)v1->v3 upgrade (full path -- runs v1->v2 steps then v2->v3 steps):
.alive/_generated/pre-upgrade-backup.tar.gz.walnut/ into .alive/ (handle overlapping squirrels, skills, scripts)_core/ -> _kernel/ (deepest first to avoid parent-before-child issues). Include dirs that only contain _capsules/._capsules/ -> walnut root (check both _kernel/_capsules/ and walnut-root _capsules/)companion.md -> context.manifest.yaml (with YAML sanitization)now.md -> _kernel/now.json (with credential scrubbing, writing directly to flat _kernel/)tasks.md -> tasks.json + completed.json (with checkbox parsing)observations.md -> context field or removed_core/ -> _kernel/, _capsules/ -> bundle names, _kernel/_generated/ -> _kernel/, bundles/ -> flat refs, etc. in all custom skills, scripts, CLAUDE.md files, hooksproject.py --walnut {path} for fresh now.json.alive/log.mdv2->v3 upgrade:
_kernel/_generated/ dirs + all bundles/ dirs + all tasks.md + all observations.md. Write to .alive/_generated/pre-upgrade-backup.tar.gz_kernel/_generated/now.json -> _kernel/now.json, remove empty _kernel/_generated/bundles/*/ to walnut root, remove empty bundles/tasks.md -> tasks.json + completed.json (per bundle and per kernel)_kernel/completed.json with migrated done tasksobservations.md -> manifest context field or removed03_Inputs/ -> 03_Inbox/ at world root (if exists)_kernel/_generated/ -> _kernel/, bundles/X -> X, tasks.md -> tasks.json, observations.md references removed, 03_Inputs -> 03_Inbox, in all custom skills, scripts, CLAUDE.md files, hooks02_Life/_kernel/ exists, flag as legacy cruft (domain folders are NOT walnuts). If People/ exists at world root, flag for move to 02_Life/people/.project.py --walnut {path} for EVERY walnut to generate fresh _kernel/now.json. Then run generate-index.py on the world root to rebuild the world index with task counts, recent sessions, and unsigned stash data. This is the final step that makes /alive:world work..alive/log.mdSafety rules for v2->v3 (and all paths):
Log every operation to .alive/_generated/upgrade-log.yaml with type, source, target, timestamp, status.
Structural verification:
.alive/ exists with correct structure (_squirrels/, scripts/, preferences.yaml).walnut/ remains_core/ kernel directories remaining (find + verify)_capsules/ directories remainingcompanion.md inside any walnut (.bak files are OK)now.md remaining in _kernel/ directories_kernel/_generated/ directories remaining (v3 flattened)bundles/ directories remaining at walnut root (v3 flattened)tasks.md remaining (converted to tasks.json, .bak files OK)observations.md remaining (migrated or removed, .bak files OK)_kernel/ dirs contain now.json directly (not nested in _generated/)_core/, _kernel/_generated/, bundles/ -- should find nothing)Task conversion verification (v2->v3):
15. Every tasks.json is valid JSON and parseable
16. Every completed.json is valid JSON and parseable
17. Task count in tasks.json + completed.json matches original tasks.md checkbox count (minus flagged unparseable lines)
Root-level hygiene:
18. No unexpected folders at world root -- only 01_Archive/, 02_Life/, 03_Inbox/, 04_Ventures/, 05_Experiments/, .alive/, .claude/, and standard dotfiles should exist
19. No People/ at world root (should be 02_Life/people/)
20. No _kernel/ inside domain folders (02_Life/_kernel/ is legacy cruft)
21. 03_Inbox/ exists (not 03_Inputs/)
22. Flag any legacy folders that remain (un-numbered domains, _working, src, etc.)
Projection verification:
23. Every walnut has _kernel/now.json (generated by project.py)
24. .alive/_index.json exists and is current (generated by generate-index.py)
25. World index includes recent_sessions and unsigned_with_stash data
Sync script audit: 20. Check configured sync scripts for old path references -- flag any that will recreate legacy folders 21. Surface specific line numbers and suggested fixes
Report:
ββ πΏοΈ upgrade complete
β
β Version: ALIVE Context System v3.0
β System folder: .alive/
β Walnuts upgraded: N/N
β Bundles flattened: N/N
β Tasks converted: N/N (N routed to completed.json)
β Observations migrated: N/N
β Custom capabilities updated: N/N
β Verification: N/N checks passed
β
β ! [any remaining issues]
β
β Backup: .alive/_generated/pre-upgrade-backup.tar.gz
β Log: .alive/_generated/upgrade-log.yaml
β°β
| From | To | Operations |
|---|---|---|
Un-numbered domains + _brain/ + _state/ | Current v3 | Full restructure -- route to numbered domains, convert state, flatten kernel + bundles, convert tasks |
.alive/ + _core/ + _capsules/ + companion.md | v3 | Kernel rename, bundle move + flatten, manifest convert, state convert, task convert |
.walnut/ + _core/ + _capsules/ + companion.md | v3 | System folder merge + all above |
.walnut/ + _kernel/ + bundles/ | v3 | System folder merge + flatten kernel + flatten bundles + convert tasks + migrate observations |
.alive/ + _kernel/_generated/ + bundles/ + tasks.md | v3 | Flatten _kernel/_generated/ to _kernel/, flatten bundles/ to root, convert tasks.md to tasks.json, migrate observations.md |
.alive/ + _kernel/ + bundles/ + context.manifest.yaml | v3 | Flatten bundles + convert tasks + migrate observations (partial v2->v3) |
.alive/ + _kernel/ (flat) + flat bundles + tasks.json | (current v3) | Already up to date -- verify only |
Both .walnut/ AND .alive/ exist | Merge .walnut/ into .alive/ then v3 | Handle overlapping squirrels, skills, scripts -- keep newer versions |
| No system folder | Fresh install | Redirect to alive:world for initial setup |
The upgrade detects what's present and only performs the operations needed. It never forces a full rebuild when a partial upgrade suffices.
If something goes wrong mid-upgrade:
upgrade-log.yaml for the last successful operationThe tarball contains every file that was about to be renamed or converted -- full restore is always possible.
ββ πΏοΈ upgrade issue
β
β Failed at: converting [path]/tasks.md
β Error: [specific error]
β
β βΈ Options:
β 1. Skip this one, continue (fix manually later)
β 2. Show me the file so I can fix it
β 3. Restore from backup
β°β
~/.claude/plugins/ is managed by Claude Code, not this skillalive:build-extensions -- extensions create new capabilities. Upgrade migrates existing structure.alive:system-cleanup -- cleanup fixes broken things in the current version. Upgrade moves between versions.alive:world for initial setup.Cleanup fixes. Upgrade transforms.