sonder-selfmod-lifecycle

Operates Sonder Runtime's self-modification lifecycle including gates, deploys, backups, and rollback recovery.

6|3|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Krilliac/Sonder-runtime --skill sonder-selfmod-lifecycle-krilliac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sonder-selfmod-lifecycle
Source: https://github.com/Krilliac/Sonder-runtime/tree/main/.claude/skills/sonder-selfmod-lifecycle
Command: npx skills add https://github.com/Krilliac/Sonder-runtime --skill sonder-selfmod-lifecycle-krilliac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Sonder Runtime can edit its own source code, and doing that safely requires navigating a strict phase machine, deterministic review gates, protected-path policy, hash-verified backups, and rehearsed rollback. This Skill gives you the operational runbook so you can plan, run, approve, deploy, and recover selfmod runs without tripping rejection gates or corrupting the live tree. ## Core Features & Use Cases - Full lifecycle command surface: Plan, run, diff, test, approve, deploy, rollback, resume, and cancel selfmod runs via /selfmod commands, with exact phase-machine semantics. - Gate triage and rejection diagnosis: Match exact last_error strings (missing passing checks, weakened test inventory, protected file modified) to their causes and fixes. - Deploy proof obligations and recovery: Understand the unconditional rollback probe, post-deploy hash recording, conflict-refusing rollback, and the stdlib-only selfmod_recover.py emergency restore path. - Use Case: A nightly selfmod candidate was rejected with "original failure was not demonstrated before editing" — use this Skill to learn that reproducer_before must fail on the untouched live source and how to re-scope the run. ## Quick Start Ask the assistant to explain why a selfmod candidate was rejected and walk through the correct plan-run-approve-deploy sequence for that run id.

Frequently Asked Questions about sonder-selfmod-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a self-modification cycle in Sonder Runtime?

Use /selfmod plan with an objective and file list, then /selfmod run with a test command, review the diff and recorded gates, approve from the reviewing phase, and deploy. Deploy requires console operator approval and runs a rollback probe before any health check.

Why was my selfmod candidate rejected?

Rejections come from review() gates: missing passing checks, a failing recorded gate, a reproducer that did not fail pre-edit, an empty scoped diff, protected file modification, or weakened test inventory. Run /selfmod tests <run-id> and match the last_error string to its documented cause.

Can selfmod edit protected files like server.py or selfmod.py?

Automatic edits can never touch protected paths. Protected maintenance requires an explicitly authorized --maintenance run with a security gate plus explicit user approval, and auto-low-risk mode can never approve it.

How do I recover Sonder when a bad deploy prevents startup?

Run the stdlib-only selfmod_recover.py against the run's backup manifest.json. It verifies the manifest checksum, validates the whole bundle with path confinement and per-file checksums, then atomically restores files and re-verifies SHA-256 hashes.

Why does selfmod rollback refuse with a conflict error?

Rollback compares live files against recorded post-deploy hashes and refuses if you edited a deployed file afterwards, preserving your changes. Resolve the conflict explicitly; the system never force-clobbers user edits.

When should I not use the selfmod lifecycle workflow?

Use sonder-change-control for ordinary code review and approval flow, sonder-build-and-env for environment setup and general test runs, and sonder-failure-archaeology for incident history. Selfmod applies only to runs, candidates, backups, and deploys of the self-modification subsystem.