/hermitd:hermit-evolvefrom hermitd
Evolves hermit configuration and templates after a plugin update. Detects version gaps and runs the upgrade (migrations, templates, new settings) in an isolated subagent. Run after updating the plugin.
Ships in hermitd. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Upgrade the project's hermit configuration after a plugin update.
evolve-apply: bun ${CLAUDE_PLUGIN_ROOT}/scripts/evolve-plan.ts .hermit applyleftover-check: bun ${CLAUDE_PLUGIN_ROOT}/scripts/evolve-plan.ts .hermit leftover-checkEvery run of this skill (interactive or unattended) delegates steps 0–9 to the hermitd:evolve-runner subagent, so the upgrade's transient churn (changelog slice, migration execution, file diffs) never lands in the calling session. The main loop keeps only step 10 (summary + operator notification).
Tool note:
hermitd:evolve-runneris a subagent — invoke it via the Agent tool, never the Skill tool. Theplugin:nameform it shares with skills does not imply the Skill tool.
evolve-runner subagent, skip this section and execute steps 0–9 directly (you are the delegate — do not re-dispatch).unattended ⇒ execution unattended, delivery automated-maintainer.unattended argument authorizes a proactive maintainer notification.test -f "${CLAUDE_PLUGIN_ROOT}/skills/hermit-evolve/reference.md". If it fails, abort — log "hermit-evolve aborted: plugin root unresolved; cannot dispatch evolve-runner." and stop. Do not dispatch with a broken path.<now> for step 10 as the current UTC time (date -u +%FT%TZ), then dispatch the hermitd:evolve-runner subagent via the Agent tool. Pass the report contract (below); the runner body supplies its own plugin root and Commands entries. Do not execute steps 0–9 yourself. The runner works in the background: end the turn after dispatch. The launch acknowledgment is not the report, so do not poll or wait for it.Steps 0–9 (in reference.md, read only by the evolve-runner subagent) are executed with no AskUserQuestion — the subagent cannot pause to ask. Each step's "Delegated mode:" note states the non-interactive behavior. The rule in every case: never guess on a destructive choice, never block.
## Plan strip, template conflicts, an ### Upgrade Instructions step that names a single non-destructive command such as deny ask-only), take the default silently and report the outcome.### Upgrade Instructions migration step in 2b/7 that poses a choice and names no default), defer: skip that step and record a verbatim deferred-migration block in the report (see the report contract in step 10). Never guess. Step 10 resolves it — interactive asks the operator; automated-maintainer execution relays it through its delivery route. Never apply a deferred instruction that would write .claude/settings*.json from a channel session.After a successful upgrade, arm /hermitd:later add 1d "doctor has no new failures after upgrading to <version>" | .hermit/bin/hermitd-run doctor-check .hermit --verdict --since <now> (hermit origin, --timeout-s 120: the doctor run probes credentials and docker and gets the same budget as its routine). <now> is the time recorded before dispatch, so a failure that already existed before the upgrade does not count against it while one first seen during the runner's steps still does. The resolver form survives the next plugin update; a baked plugin path points at a cache directory that may be gone by the time the claim is checked.
Step 10 runs in the main loop (not the subagent), consuming the evolve-runner's returned report. The subagent's report is the single source for what follows.
Build the Templates, Bin wrappers, Docker entrypoint lines from the runner's evolve-apply JSON receipt plus its completed remaining resolutions.
Report contract — the subagent's final message is exactly this; non-deferred runs carry no deferred block, so the common payload is tiny:
Upgrade: vOLD -> vNEW | core current vNEW | blocked: <reason>
Settings added: <keys | none>
Templates: <refreshed/restored/kept-N/conflicts-parked-N | none>
Bin wrappers: <restored/replaced(.bak) | none>
Docker entrypoint: <refreshed | conflict-replaced(<backup path>) | migrated(<N> moved, <M> in <patch path>) | n/a>
Docker render: <written | skipped(reason) | n/a>
Docker rebuild: <needed + order | no>
Sibling hermits: <one or more of the following per sibling, space-separated, or "none">
<name vOLD->vNEW> (confirmed by finalizer — only from siblings_confirmed)
<name current> (no version gap)
<name path-unresolved> (in _hermit_versions but no project-effective plugin-list match)
<name SKIPPED-by-finalizer> (finalizer's siblings_skipped — never report as upgraded)
Siblings detected but not activated: <name ... | none>
Siblings warnings: <one line per siblings_warnings entry | none>
Permissions added: <entries | none>
Messages: <retranslated-N | none>
Audit scope: <whole_run | version_only>
Operator notes: <one line per version-specific operator note collected in steps 2b/7 | none>
Findings: <none | one line per subject: subject -> replacement, N hits, file:line examples, shared marker>
Deferred for operator: <none | one or more verbatim blocks, each:>
--- deferred-migration ---
source: <plugin>@<version>
instruction: |
<exact verbatim ### Upgrade Instructions step text — copied, not summarized>
options: <the either/or choices presented>
skipped: <the safe/no-op branch taken, or "skipped pending operator">
--- end ---
Audit scope. whole_run needs no mention; say nothing. On version_only, tell the operator once that this upgrade's config changes were not recorded in the settings history (the upgrade itself succeeded; only the attribution is missing), so a later "why did this setting change?" gets an honest answer instead of a confident wrong one.
Operator notes. If Operator notes is not none, append every line to the delivered result as its own line, in every delivery mode (inline, automated-maintainer). These are the CHANGELOG's version-specific notes for the operator and the report is their only route out of the subagent. Relay each line verbatim: a line starting with **Operator action required:** keeps that marker so it renders bold. Never fold these lines into the one-line summary and never merge them with deferred-migration text. Omit the section when none.
Sibling report integrity: parse the finalizer JSON siblings_confirmed and siblings_skipped. Only names in siblings_confirmed may be reported as vOLD->vNEW. Any name in siblings_skipped must be reported as SKIPPED-by-finalizer — never as upgraded, even if Step 7 said it ran.
Failure fallback. If the runner's completion reports a failure or carries no report (subagent died: same partial-state risk
as an in-loop failure), report "evolve delegation failed — type
/hermitd:hermit-evolve in a terminal or the Claude app". In automated-maintainer delivery, send that as a
maintainer-only notice; in inline delivery, return it only to the invoking
conversation. Stop.
Print the summary from the report fields. Omit lines where nothing changed. End with "Run /hermitd:hermit-settings to adjust any settings." if settings were added.
Resolve deferrals by execution and delivery mode. If "Deferred for operator" is non-empty:
Interactive execution: for a source: leftover-check block, present the grouped Findings and Fix them / Leave them options; Fix them follows the Fix procedure in leftover-check.md, read whole once with Read. For each other deferred-migration block, present its instruction + options to the operator via AskUserQuestion, then apply the chosen branch inline (this is the only place changelog/migration text re-enters the main loop, and only for the rare deferred step). A branch that changes .hermit/config.json is applied with settings-edit verbs, never the Edit or Write tool: bun ${CLAUDE_PLUGIN_ROOT}/scripts/settings-edit.ts .hermit/config.json get|set|unset <dotted.path> [value], using the harness-substituted path. That keeps the change validated and in the settings ledger, and under the strict profile a tool write to config.json is hook-blocked outright. If a verb refuses, treat the branch as not applied and fall through to the version-bump caveat below.
Unattended execution: relay deferred blocks verbatim through the selected delivery route. Open or block a task with an admin input decision, its explicit options, and decision.resume naming the existing channel --answer entry point. With no such entry point, name the original deferred migration procedure; for leftover-check name leftover-check.md § Fix procedure. Use channel-responder/questions.md; no inferred default authorizes a deferred write. Resume only after task answer records a match. Settings and native permission writes keep their existing gates; never write .claude/settings*.json from a channel session.
Version-bump caveat (all delivery modes): the subagent already bumped _hermit_versions to <to> in step 9, having skipped the deferred migration. We keep that bump — withholding it would replay the whole oldest-first slice next evolve and double-apply non-idempotent migrations. So if an interactive apply fails or the operator declines, report loudly through the selected delivery route: "version already bumped to v<to>; migration <source> was NOT applied; apply manually: <instruction>" — otherwise a rerun-says-up-to-date would silently hide it. On success, report it applied.
Docker rebuild notice. When the report has Docker render: skipped(not_converted), with or without an update in progress, the Docker: section holds only "The image still builds from the project folder. Run hermitd setup docker-customize in a host terminal, then ask for Convert." It replaces every rebuild and running-update line, including the Step 10 one. Otherwise, when .hermit/state/update-in-progress.json has an at under 60 minutes old and does not hold "build": false, the update that launched evolve waits for the version stamps, builds the merged Docker files, and restarts the resident once this turn ends. Report that the running update applies the refreshed files and restarts the agent, unless a changed Docker input needs the operator's approval, which the agent reports separately; never request another update. Otherwise, from the report's Docker entrypoint / Docker rebuild fields, append a Docker: section when a rebuild is needed:
hermitd update."Docker entrypoint: migrated(...) → "Your entrypoint customizations moved to docker-entrypoint.hermit-local.sh, where upgrades no longer touch them (<N> moved). Rebuild to apply the new entrypoint: hermitd update." Add, only when <M> is non-zero: "<M> change(s) could not be moved automatically — they are in <patch path> for you to re-apply."Reconcile routines after a successful always-on upgrade. If the report represents a completed
upgrade (not blocked or already up to date) and the refreshed config.json has always_on: true,
ask what actually needs re-arming before loading anything:
bun ${CLAUDE_PLUGIN_ROOT}/scripts/routines.ts arm check .hermit ${CLAUDE_PLUGIN_ROOT}
arm check reports routine and heartbeat health in one read-only Bash call. Route on its JSON status:
healthy: both legs are registered and current. Log it; invoke nothing.arm with routines in legs: invoke /hermitd:hermit-routines load, which
makes exact-match routine migrations active immediately in CronCreate fallback mode (a migration
that changed routines shows up in reasons as fallback_drift) and re-arms the heartbeat leg with it.arm with only heartbeat: invoke /hermitd:heartbeat start.skip, reason paused: the hermit is paused and fires nothing until resumed. Log it; invoke nothing.restart_required: arm nothing, then continue to delivery. With a fresh update-in-progress marker, the single update line in Deliver the result covers it. Otherwise append this as its own line, delivered through the same route as Operator notes: the monitors still run the previous version. An always-on hermit with its watchdog running restarts itself at its next idle moment; without it, the operator types /hermitd:hermit-restart in a terminal or the Claude app.error (check_error:<reason>): state was unreadable, so nothing is safe to re-arm. Append
it and the manual hermit-routines load next action to the report.If reconciliation fails, append that failure and the manual hermit-routines load next action to
the report.
If Upgrade Instructions reported restart_required in Operator notes, use that route even when reconciliation reports healthy; do not re-arm against the previous resident prompt.
Deliver the result. Compose a condensed one-line message such as "Hermit upgraded: vOLD → vNEW. N settings added, M templates refreshed." Omit segments where nothing changed. Append the
deferred/auto-applied segments: settings set to defaults (Step 4), permission entries added (Step
8), template conflicts parked as .new (Step 5), any deferred migrations, so the operator can follow up via /hermit-settings. Append each
non-none Operator notes line after that list, one line each. With an update-in-progress marker whose at is under 60 minutes old, drop every restart line, a restart_required Operator note included, and say once that the running update applies the refreshed files and restarts the agent, unless a changed Docker input needs the operator's approval, which the agent reports separately; never request another update. Drop rebuild lines too, unless the marker holds "build": false: that update restarts without rebuilding, so the Docker rebuild notice stays. Put each pending task question after those lines and all receipts, ending the result with the plain options.
channel-send.ts --notice with
{"maintainer":"<complete condensed result>"} on stdin and no client leg. Follow prompts/resident.md
§ Operator Notification fallback behavior.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hermit, configuration-upgrade, plugin-update, migration-runner
npx claudepluginhub gtapps/hermitd --plugin hermitd41 skills in this plugin
/briefReturns a 5-line executive summary of recent work. Checks open records first, then recent task outcomes. Activates on messages like "brief", "what happened", "morning update", "overnight summary", "progress", "what are you working on", "how's it going"./browserDrives the agent's own browser, or the operator's Chrome for their accounts. Use before giving steps that send someone to a web console to create or change something on an account (an API key, a bot, an app registration), even when the person will do them by hand or no browser is available. Also use when WebSearch fails, or when WebFetch cannot read a page: it is refused (such as 402 or 403), stays rate-limited after a retry, times out, or returns an empty page, a JavaScript-only shell, or a block notice in place of the content asked for. Use it before answering from other sites or searches, above all when the person named or linked the page, even if the browser may be off. Also use when a page needs clicks, forms, scrolling or sign-in; or when a screenshot or exact rendered text is needed. Public read-only lookups start with WebSearch or WebFetch./capability-brainstormMonthly routine plus on-demand hermit-voice brainstorm — synthesizes memory, capabilities, recent artifacts, and codebase shape into at most 2 capability ideas, each gated by proposal-triage before becoming a proposal task. Runs on the capability-brainstorm routine and when the operator asks to brainstorm capabilities or ideate, e.g. "brainstorm capabilities", "any capability ideas?".Other plugins' skills for the same job