build-extensions
Create new skills, rules, and hooks for your world. Checks plugin compatibility, writes to the human's space (not plugin cache), validates against the system,…
Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection.
$ npx -y skills add alivecontext/alive --skill system-upgrade --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/system-upgradeContext preview
The summary Claude sees to decide when to auto-load this skill.
Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection.
name: alive:system-upgrade description: "Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection." user-invocable: true
Upgrade an ALIVE world from any prior version to the current target. The skill is a thin operator-facing surface; the work happens in the `system_upgrade/` Python package shipped with the plugin (orchestrator + 13 locked phases). Stdlib-only, no PyYAML/ruamel.
If you are reading this on the old monolithic skill (476 lines of inline upgrade logic), that file has been retired in favour of the orchestrator. This file documents what the operator and skill agent need to know to drive it.
---
---
Two distinct version concepts; the orchestrator never confuses them.
---
The orchestrator runs the same 13 steps every invocation. Numbers below are stable contract numbers — they appear in resume markers, runstate logs, and the `phase_reached` envelope field.
For higher-level grouping in operator briefings the orchestrator uses the labels **Setup / Detection block (steps 1–5)** and **Mutation / Verify block (steps 6–13)** — labels are not "macro phases" and never re-use the digit `1` to mean step 1 of a sub-grouping; the locked numbers below are the only phase numbers that matter.
1. Preflight — resolve world_root, .alive symlink + containment check, then UpgradeLock
acquire (lock-meta written ONLY after containment validation), dirty stash,
Syncthing, half-sync, submodule guards
2. Snapshot — FileSnapshot pass: both world files + required plugin files. Inputs frozen
for the rest of the run.
3. Detect — consume snapshot; produce DetectionReport (world_version + per-walnut
versions + all_signals_raw + tool_version_at_run + walkthrough_eligible_matches).
The retired-pattern PRE-SCAN runs here as a read-only pass against the
snapshot — phase 7 only renders prompts for matches found here.
4. Probe surfaces — each surface's --version --json; collect state_paths for sweep exclusion.
NO migrator dispatch yet. --surfaces=none skips per-surface probe + dispatch
but does NOT skip the prior-record load — load_prior_final_record runs
unconditionally so pending retries from a prior run still reach the no-op gate.
5. NO-OP short-circuit — gate predicate: world_version == TARGET_WORLD_VERSION AND every
per-walnut version == TARGET AND walkthrough_eligible_matches is empty AND
surface_retry_map is empty AND probe_results contains no hard-fail. On pass:
write a no-op upgrade record, release lock, exit 0. On fail: continue.
--force-run bypasses; --dry-run logs the would-be no-op without writing.
6. Backup — write .alive/upgrades/pre-upgrade-<iso-ts>.tar.gz (atomic stage → fsync →
rename). Stages selected paths into a temp staging dir; excludes
.alive/upgrades/, the lock files, and any .alive/.rollback-* dirs to prevent
recursive self-inclusion.
7. Walkthrough decide — render prompts for the walkthrough_eligible_matches collected in phase 3;
collect y/n decisions. Pure presentation + decision capture; NO writes
(dry-run-safe). Phase 7 NEVER re-scans the catalog.
8. Plugin cleanup — world-root sweep + per-walnut audit. Operates ONLY on retired-pattern
catalog entries with cleanup_action == "cleanup". migrate_input entries
(`_core/`, `_capsules/`, `now.md`, `tasks.md`, `observations.md`,
`_kernel/_generated/`, `03_Inputs/`, `companion.md`) are NOT deleted here
— phase 9 consumes them.
9. Plugin migrate — per-version migrations (v2→v3.0, v3.0→v3.1, v3.1→v3.2). Consumes the
walkthrough decisions from phase 7 to apply extension rewrites; consumes
cleanup_action=="migrate_input" catalog entries (reads, transforms into
the v3 layout, then removes the source paths atomically).
10. Surface dispatch — run each surface's migrator (alive-mcp, Hermes, Codex). Soft-fail per the
four-class probe contract. Also consumes the carried-forward nRepo: alivecontext/alive
Create new skills, rules, and hooks for your world. Checks plugin compatibility, writes to the human's space (not plugin cache), validates against the system,…
Create, share, and graduate bundles — the unit of focused work within a walnut. Manages the full bundle lifecycle from creation through sharing to graduation.
Use when external content arrives in the session — emails, transcripts, screenshots, documents, files, or in-session research worth keeping. Also use when…
Something 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,…
Generate a believable, lived-in ALIVE world from a free-text persona description (custom path) or a deterministic sandbox preset. Routes the…
Report 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.…