$npx -y skills add mvschwarz/openrig --skill rig-lifecycleUse when reasoning about the rig lifecycle operations family (create / start / stop / resume / restore / snapshot / release / unclaim / destroy), reading or trusting rig ps / lifecycle projections after recovery, or designing proof for a lifecycle scenario. Covers the 4 failure
| 1 | # Rig Lifecycle |
| 2 | |
| 3 | The family of operations that **create, start, stop, resume, restore, |
| 4 | snapshot, release, unclaim, and destroy** OpenRig-managed topologies. |
| 5 | Includes the user story after reboot: **"bring my work back without |
| 6 | turning a clean recovery into a cleanup project."** |
| 7 | |
| 8 | If lifecycle is brittle, every higher-level primitive inherits that |
| 9 | brittleness. Queue, workflow, seat continuity, cross-host operation, |
| 10 | and RSI all assume that rigs and seats can be restored into known |
| 11 | states. |
| 12 | |
| 13 | ## Use this when |
| 14 | |
| 15 | - Operating `rig up / down / restore / resume / snapshot / release / unclaim / destroy` |
| 16 | - Reading `rig ps` after a reboot or recovery and deciding what to trust |
| 17 | - Designing proof for a lifecycle scenario (clean start / warm resume / host reboot / provider auth loss / partial boot / operator recovery) |
| 18 | - Reasoning about restore-outcome semantics (`resumed` / `rebuilt` / `fresh` / `failed` / `attention_required`) |
| 19 | - Auditing whether a lifecycle proof is in-process bedrock vs requires real reboot evidence |
| 20 | |
| 21 | ## Don't use this when |
| 22 | |
| 23 | - The operation is single-command and deterministic — use `openrig-user` skill for CLI surface |
| 24 | - The work is operator-level configuration of OpenRig itself — use `openrig-operator` |
| 25 | - The work is rig spec authoring — use `openrig-architect` |
| 26 | |
| 27 | ## Failure modes (4) |
| 28 | |
| 29 | 1. **Auto-restore creates a partially restored rig that must be cleaned up before real recovery.** Partial restore looks like recovery but isn't; cleanup-before-recovery becomes the actual workload. |
| 30 | 2. **`rig ps` or lifecycle projections report a healthier state than the runtime actually has.** Projections are summaries; the runtime is truth. Don't trust projections silently. |
| 31 | 3. **Provider auth is unavailable after reboot and the system treats that as implementation work** instead of a human/environment decision. Auth issues are environmental; route to human. |
| 32 | 4. **Resume succeeds for one runtime/provider but fails for another scenario that was never tested.** Per-runtime parity assumptions break silently; matrix proof catches them. |
| 33 | |
| 34 | ## Restore-honesty rule (load-bearing) |
| 35 | |
| 36 | **Failed resume is FAILED loudly.** No automatic fresh fallback. Fresh |
| 37 | launch is **explicit follow-up only.** This is enforced architecturally |
| 38 | at the daemon level (per `docs/as-built/architecture/architecture-rules-and-event-system.md` rule 15). |
| 39 | |
| 40 | The locked restore-outcome vocabulary: |
| 41 | |
| 42 | | Outcome | Meaning | |
| 43 | |---|---| |
| 44 | | `resumed` | Native runtime resumed the same conversation | |
| 45 | | `rebuilt` | New process assembled from artifacts (`session_source: mode: rebuild`) | |
| 46 | | `fresh` | New process with no prior continuity | |
| 47 | | `failed` | Restore attempted and failed; no automatic fallback | |
| 48 | | `attention_required` | Recoverable blocker (provider auth refused, etc.); needs operator action | |
| 49 | | `n-a` | Not applicable (terminal nodes, etc.) | |
| 50 | |
| 51 | Codex auth-refusal returns `attention_required` (recoverable); Claude |
| 52 | `looksLikeClaudeLoginPrompt` returns `failed/login_required` (terminal). |
| 53 | Cross-runtime alignment is an open follow-up question. |
| 54 | |
| 55 | ## Proof standard |
| 56 | |
| 57 | Lifecycle proof should include **real reboot or VM-reboot evidence**, |
| 58 | not only daemon-unit evidence. The minimum useful matrix covers: |
| 59 | |
| 60 | | Scenario | What it proves | |
| 61 | |---|---| |
| 62 | | Clean start | Boot from spec into known state | |
| 63 | | Warm resume | `rig down` → `rig up <name>` resumes seats | |
| 64 | | Host reboot / tmux socket absence | Recovery from lost tmux connection | |
| 65 | | Provider auth loss | Codex/Claude auth refusal handled honestly | |
| 66 | | Partial boot / partial failure | Some seats up, some failed; honest reporting | |
| 67 | | Intentional operator recovery | Operator-initiated restore from snapshot | |
| 68 | |
| 69 | Tier 1: in-process bedrock (daemon-unit evidence). Tier 2: real reboot |
| 70 | or disposable Tart VM. Tier 1 alone is not lifecycle proof; it's |
| 71 | bedrock. |
| 72 | |
| 73 | ## Default policy is part of the primitive |
| 74 | |
| 75 | **Treat default policy as part of the primitive, not an afterthought.** |
| 76 | Lifecycle defaults that are too optimistic for the reliability level |
| 77 | actually proven create silent harm: |
| 78 | |
| 79 | - `auto- |