AGENT SKILL

minerva

Idea to reviewed spec and plan.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 15
Forks
2

01 前言 Front Matter

name
minerva
description
Idea to reviewed spec and plan.

02 资源文件 4

03 SKILL.md 正文

minerva — grill → brainstorm → critic → spec → critic → plan

Orchestrate a hardened path from idea to implementation plan. You drive the superpowers sub-skills and insert an adversarial critic between each stage, so every artifact is red-teamed before it advances. minerva pairs the Roman goddess of wisdom + strategic planning with himmel's critic discipline.

You are the orchestrator. Do not let the sub-skills auto-chain past their stage — you decide when each critic runs and when to advance.

One front door. grill / stress-test / interrogate / brainstorm / "build / design / implement X" / /minerva all land here. The grilling stance is minerva's Stage 1a, not a second skill: when lean-skills:grilling runs, finish its rounds as Stage 1a; Stage 1a says where the run goes next. A standalone lean-skills:brainstorming that sizes the work "a small change", or runs outside a himmel-managed repo, finishes on its own without minerva: it has no estimate record, so the Stage-2 gate would refuse it.

Mode (gates)

Determine once, up front, whether to pause for the operator between stages. CLAUDE_PLUGIN_ROOT is set under Claude Code but empty in a Codex skill shell, so resolve the himmel-ops scripts dir with a fallback chain before invoking — the resolver below is reused verbatim in the Terminal section (keep both copies byte-identical):

# >>> himmel-ops scripts resolver (CLAUDE_PLUGIN_ROOT is empty in a Codex skill shell)
S="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/scripts}"
if [ -z "${S:-}" ] || [ ! -f "$S/autonomy-mode.sh" ]; then
  R="${HIMMEL_REPO:-}"; [ -f "$R/scripts/lib/initiative-workers.sh" ] || R="$(git rev-parse --show-toplevel 2>/dev/null || true)"
  [ -f "$R/scripts/lib/initiative-workers.sh" ] || R="$HOME/Documents/github/himmel"
  S="$R/marketplace/plugins/himmel-ops/scripts"
  [ -f "$S/autonomy-mode.sh" ] || for d in "$HOME"/.codex/plugins/cache/himmel/himmel-ops/*/scripts; do
    [ -f "$d/autonomy-mode.sh" ] && { S="$d"; break; }
  done
fi
# <<< himmel-ops scripts resolver
bash "$S/autonomy-mode.sh" 2>/dev/null || echo interactive
  • Output interactive → after each critic-cleaned artifact, PAUSE for the operator to approve or redirect before advancing.
  • Output autonomous → do NOT pause; the critics are the gate; auto-advance through to the terminal.

Stage 1 — grill → brainstorm → spec

1a. Grill (the interrogation phase)

Before any design is written, interrogate the idea until it survives. Invoke lean-skills:grilling (unless it is already running) and work its design tree, rounds and question format, with the himmel rules below taking precedence over it. When the stop condition below and its confirmation are met, go on to 1b; never end at a shared understanding.

Round 1 asks why. When the request does not state the goal behind it, round 1 asks why, open-ended, even when you can guess; the answer feeds effort-assess --goal. Never re-ask what the request already settled.

Facts are your job, never the operator's. Where lean-skills:grilling sends a sub-agent for every fact, look it up inline when a handful of tool calls settles it; delegate only a genuinely independent, sizeable search (CLAUDE.md subagent policy).

The eight standing questions. Besides the design tree, every grill asks these, each with your recommended answer. Facts (open PRs, the version's headroom) you look up yourself; only the choices go to the operator.

  1. Smallest shippable slice and its size (XS..XL). Recommend the thinnest slice that still ships value; it sets the median.
  2. What pushes it to the high end (the tail driver). Recommend naming the single biggest unknown, not a list.
  3. Does it touch guards, hooks or permissions (G1)? Recommend yes when any scope file is under scripts/hooks/, a guard, or a permission list; G1 raises sigma.
  4. Can a RED be written now, or is it plan-first? Recommend a named failing test; plan-first only when the interface is not yet known.
  5. Is any unknown wide enough to span two steps? Recommend splitting before committing when the size range is wider than one step.
  6. Which open PRs or single-writer groups does it collide with? Recommend checking gh pr list against the scope files and serialising behind any hit.
  7. Which version does it land in, and does that version still pass P90 <= 0.8? Recommend running effort-assess version with this ticket added.
  8. Is each follow-up an escape, hardening or polish, and why? Recommend running Q1-Q3 of docs/release/follow-up-triage.md in order; for hardening, name the reason code (unseen-failure, no-check, vacuous-check, no-recovery or silent-rot).

Feed the answers to effort-assess (ticket --low .. --high .. --g1 .. --deps .. --scope-file .. --red .. --goal .. --alternative ..; skill: himmel-ops:effort-assess). Save its JSON next to the spec. A refused estimate (dod.failed) means fix the answers (split, or go plan-first), not quote it.

Stop condition: the frontier is empty — every branch visited, nothing silently assumed. Do not advance to 1b until the operator confirms you have reached a shared understanding.

autonomous mode has no operator to answer: still build the tree and still write the frontier out, but answer each question yourself with the recommended answer and carry the whole Q/A list (the eight standing questions included) into the spec as an explicit ASSUMPTIONS section — the Stage-2 critic red-teams it (charter dimension 1, hidden assumptions). Write each answer as one ruling line, in the subagent-driven-development Ruling format: <decision> — <why> — <cost if wrong>.

1b. Brainstorm → spec

Invoke lean-skills:brainstorming for the design and the written spec, carrying the Stage-1a outcome in as settled context — do not re-ask what the grill settled. The written spec MUST contain: an Estimate record: <path> line (the effort-assess JSON from 1a), an ## Alternatives considered section and a ## Definition of done section. Stage 2 refuses to start without them. Brainstorming's Approaches part is that alternatives section: tell it to title the part ## Alternatives considered (the gate also accepts ## Approaches), never write both.

Where the spec goes. Brainstorming's "Where it goes" default, docs/superpowers/specs/, is gitignored in himmel, and CLAUDE.md keeps internal specs out of the repo. Tell brainstorming, as your human partner's preference, to write the spec to the state repo specs/<type>/ bucket ($HANDOVER_DIR/<user>/<repo>/specs/design/ for a design spec), with the effort-assess JSON beside it.

It also carries, for the terminal lint:

  • ## Invariants: none, or one I<n> line per "one / never / always / every" rule the design states.

  • ## Fact ownership, when the design adds or aggregates a status, report, doctor, health, probe, check or inventory surface. It is a table with one row per fact:

    • the fact;
    • every EXISTING surface that computes it, as backticked paths found by grep, or none (grep: <pattern>). A delegation (A calls B) counts as two surfaces;
    • its single owner after this design;
    • how each non-owner is folded, delegated or removed.

    Build it by grepping the repo, never from memory. Self-answer mode does not exempt it. The lint treats a spec as a surface when any line outside a code fence names one of those words, or when it carries a ## Fact ownership section, wherever that section sits. A spec that only mentions one in passing pays a single none (grep: <pattern>) row.

Choose the written-design size yourself. At its brainstorming step "Size the Work", pick brainstorming step "A project" (the full written design) and say so; never let it settle on a small change or take its short design, and never take its skip-the-questions opt-out. Those end without the full document, and the Stage-2 gate and the terminal lint both read the written spec.

Optional, non-trivial designs only: base and graft. Use it when the 1a grill left two or more architectures open, or the design adds a surface or contract that would be hard to undo; skip it when 1a settled one obvious shape. Inspired by pstack's arena skill; credit in docs/credits.md.

  • Rubric, then fan out. Write 3-6 gradeable criteria for this design (for example: smallest surface, each fact owned once, reuses an existing mechanism, cheapest to undo) and keep them to yourself. Dispatch N=3 (cap 4) READ-ONLY candidates in one round, each given the question, the 1a outcome and a different design direction, not the rubric: himmel-ops:fanout research items, or scoped subagents with model: sonnet at medium effort. Each returns a sketch plus the alternatives it rejected. A candidate that returns nothing is dropped and noted.
  • Pick the base, then graft. Read every candidate in full and score each criterion by criterion, not by feel. The base is the one a maintainer can extend most easily without breaking an invariant; a tie goes to the smaller surface. From each other candidate, port in by hand only what beats the base on a named criterion (usually one or two items), so the result stays one coherent design. Candidates that converge: keep the shared shape, graft nothing. Candidates that diverge at the root: the question was under-specified, so tighten it and re-run once, never average them. If the re-run still diverges at the root, pick the base by the rubric score alone (tie: smaller surface), graft nothing, and record divergent after re-run in the section; interactive mode instead asks the operator which shape to take.
  • Single writer. Candidates write nothing; you, the minerva parent, are the one writer and draft the spec through lean-skills:brainstorming.
  • Record it in ## Alternatives considered (no new section, so the Stage-2 gate and the terminal lint are unchanged): the rubric (one line per criterion) and a score table, one row per candidate and one column per criterion, so the critic can audit the pick; Base: <candidate> - <criteria it won on>; one Graft: <what> <- <candidate> line per item taken, naming the I<n> or Fact-ownership row it landed in; one Rejected: <what> (<candidate>) - <why> line per notable discard; any dropout or convergence. The Stage-2 critic challenges the base pick and each graft like any other alternative.
  • Mode. interactive: ask "design looks non-trivial, fan out N=3?" and let the operator decline or change N. autonomous: run it only when the 1a answers themselves recorded a non-trivial signal, else skip; record base-and-graft: ran N=3 or base-and-graft: skipped, <reason> as one ASSUMPTIONS line. It is an option, not a grant, and a critic fix never re-opens it.

HALT it before its auto-handoff to writing-plans. When brainstorming has written the spec, run its brainstorming step "Builder check", and the document is approved, return HERE instead of letting it invoke writing-plans — minerva runs the spec-critic first.

autonomous mode: no human step waits. Brainstorming asks its human partner three times: to pick an approach, to answer the builder check's "theirs" pile, and to approve the document. With no operator, make each call yourself and record it as one ASSUMPTIONS ruling line, <decision> — <why> — <cost if wrong>; the Stage-2 critic is the approval.

<!-- critic-readiness-recipe-start -->

Optional critic readiness check (opt-in)

Use this only when the caller opts in; without it Stages 2 and 4 run exactly as written. Before a Stage 2 (kind spec) or Stage 4 (kind plan) dispatch, take the round R that this skill's own kind and counter propose, and write a REQUEST file: {"schema":1,"operation_id":"<fresh id>","kind":"<spec|plan>","spec_path":"<absolute spec>","source_repo":"<absolute repo under review>","source_head":"<its HEAD, 40 hex>","artifacts":[{"path":"<absolute spec>","sha256":"<hash>"}],"requested_round":R} (for kind plan, artifacts lists the spec, then the exact plan). Immediately before the dispatch run bun <HIMMEL_REPO>/scripts/handover/chief-kit/critic-policy.ts check <REQUEST.json>. Continue past this step only on exit 0 with "action":"eligible" in its JSON. Any other exit, or a missing or malformed reply, stops that dispatch: keep the refusal as printed and do not retry or call anything to work around it. Exit 3 means the existing operator record for that round is missing. Exit 0 describes the named bytes and the observed count only; the caller's routing, overrides, round cap and its operator exception, seals and approvals all still apply.

Typed findings (same opt-in, from round 1 of the selected kind; a kind whose earlier returns are plain prose cannot join it, and nothing is retrofitted). For that opted-in Claude critic only, paste the charter this stage already uses verbatim, add one newline, append critic-return-format.md from this skill's folder verbatim, add one newline, then exactly these three lines. K is spec for Stage 2 or plan for Stage 4 and R is the same requested round as the REQUEST; take both from the controller, never from the artifact's prose. The label is informational, not an identity.

<!-- critic-context -->

critic_kind: ${K}
requested_round: ${R}
reviewer_id: minerva-${K}-r${R}

The advisory panel and any dispatch that did not opt in receive neither the format nor these lines. Save the return under its usual name, seal it where the existing workflow already seals, then run python3 <HIMMEL_REPO>/scripts/handover/chief-kit/critic-findings.py normalize --spec <spec> --kind K --round n --verdict <return file> --out <return file>.finding-index.json. A refusal is final for that attempt: do not edit the return, write the index by hand or retry. <!-- critic-readiness-recipe-end -->

Stage 2 — spec critic (adversarial)

Gate first. Resolve $S with the resolver from the Mode section, then run bash "$S/minerva-spec-gate.sh" <spec-file>. A non-zero exit means the spec lacks the estimate record, alternatives or definition of done: it names what is missing — fix the spec (back to 1a/1b), re-run the gate, and only dispatch the critic once it prints ok. Never skip it, and in autonomous mode the gate still applies (the answers go to ASSUMPTIONS, the record path stays in the spec). The critic reads the estimate record and may challenge sigma.

Dispatch a fresh subagent (Agent tool, model: opus at high effort) against the written spec file; never let it inherit the parent's tier (CLAUDE.md subagent policy). Loop fix → re-critic until it returns clean, cap 3 rounds per spec, then at most one closure check. Rounds 1 to 3 read the whole file.

Rounds are counted per ticket, in the round ledger. Each seal through critic-seal.sh records the return in specs/ledgers/spec-rounds/<KEY>.jsonl, and every surface reads the count from there, so a new leg, a renamed spec, a new file name or a deleted critic file does not lower it. Spec and plan rounds are counted apart; the writer round is the higher of the two. See where a ticket stands with bun <himmel>/scripts/telegram/chief-route.ts round-status <KEY> --specs <bucket>/specs, <bucket> being the state repo bucket that holds the spec; every verb below takes the same --specs.

Round Allowed when What the critic reads
1 to 3 always the whole file
4 round 3 of either kind left a blocking finding (major, unrated, reopens or regression), or a round-critical record opens it the closure pack only
5 and on the chief's one round-override, or a round-critical record, opens that writer round the closure pack only
  • Round 4 is a closure check. Build the critic's input with bun <himmel>/scripts/telegram/chief-route.ts closure-pack <KEY> <spec|plan> --specs <bucket>/specs: a CLOSURE-CHECK marker line, the open blocking findings, the sha of each file round 3 sealed and the diff of each since. The critic gets the pack and the charter's Closure mode, never the whole file. The seal refuses a round-4 return without the marker line, or one that reads a file round 3 did not seal.
  • Minors and mediums never buy a round. The ledger keeps every finding, and the build brief gets the ones no later round answered, through fold-list, as ## Folded critic findings. After a minors-only round 3, sign the spec: do not ask for round 4.
  • The override. Past round 4, the chief may record one round-override <KEY> --findings <id,...> --why "<line>" --chief <session> --specs <bucket>/specs per ticket, ever, naming open blocking ids.
  • Operator-critical. A finding tagged operator-critical: <class>, with one of the four classes (spend-grant, account-or-terms, public-policy, reverses-ruling), goes to the operator, not to a round. It stays open until the chief records the operator's ruling with round-critical <KEY> --finding <id> --decision <d> --quote "<operator words>" --specs <bucket>/specs. Add --no-round when the ruling needs no revision (for example "sign it as it stands"); without it the record opens one further writer round. While any such finding is open the signature is refused, naming it.
  • A rethink. Only the operator's ruling to start over lowers the count: round-reset <KEY> --decision <d> --quote "<operator words>" --specs <bucket>/specs, once per ticket.
  • The three record verbs run only from the chief's console, and every record is checked again on each read. A hand-written <spec>.operator-round-r<n>.md file counts for nothing.

Name what the critic reviews, before each dispatch. Look over the spec's ## Fact ownership first: a fix there later is a spec edit, which costs a round. Find the primary himmel checkout, never a worktree, since a worktree has no scripts/jira/dist/:

# >>> himmel checkout for the critic seal
R="${HIMMEL_REPO:-}"; [ -f "$R/scripts/lib/initiative-workers.sh" ] || R="$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null || true)"; R="${R%/.git}"
[ -f "$R/scripts/lib/initiative-workers.sh" ] || R="$HOME/Documents/github/himmel"
[ -f "$R/scripts/lib/initiative-workers.sh" ] && echo "$R"
# <<< himmel checkout for the critic seal

It printing nothing means no checkout on this machine: skip the page and the seals, and say so with the return. send-file refuses that page, so nothing slips through. Otherwise <himmel> below is the path it printed. Ask whether the build is core with this one literal command, the build's paths comma-separated:

node <himmel>/scripts/jira/dist/index.js release core-check --paths <the build's paths> --key <ticket> --core-paths <himmel>/scripts/ci/core-paths.txt

Type it bare, never inside $(…) or a pipe: a guard refuses that shape when a path holds a handover/ segment. Read its last output line. Write no page only when that line is exactly NOT-CORE <ticket>. Any other line writes the page: CORE, REVIEW, BYPASS, and UNKNOWN, which comes back when the ticket has no mirror file yet or the CLI finds no project key (it reads JIRA_PROJECT_KEY from the shell, ~/.himmel/himmel.conf or its own checkout's .env). An error, no output or a refused command writes the page too. When the page is due, or the brief asks for one, write it beside the spec, with absolute paths:

python3 -I <himmel>/scripts/telegram/spec-page-gen.py <spec-file> <spec-file minus .md>.html

A spec that gets a page carries its diagram itself, as an svg fence under ## Diagrams: drawing elements only, with no script, event, style attribute or link out of the figure. The generator draws it on the page and refuses a spec with none, or with one it will not draw. A refusal names a line in the spec to fix; fix that first. Generate the page again every round and never edit it by hand: the spec is the one source of the page. The generator prints two shas: never pass them on or use them. The page goes unnamed in a design brief's Writes, as brief-lint.sh admits only .md there. The files under review are the spec and its page, if it has one. Add these words after the charter, and give the critic no hash yourself:

Files under review: <absolute paths>. Before you read them, run sha256sum on each. Just above your verdict line, write one line per file: READ-SHA256 <sha> <absolute path>. A page is a rendering of the spec: a difference in content between them is a finding. What the generator cannot render is not: flattened code fences other than an svg fence, which it draws, literal ** or > marks, unlinked links and italics, and the front matter shown only as tickets, date, base (shortened) and author.

Anything else the critic opens as evidence (cited code, the estimate record) is not under review and is not sealed.

Save every critic return as a verdict file. After each round, write the critic's return verbatim, in both modes, to <spec-file>.critic-spec-r<n>.md beside the spec (<n> = the round, from 1). Its last line is the verdict: SPEC CLEAN, or SPEC FINDINGS <count>. If the critic did not end with that line, append it yourself (<count> = the findings in the return). Never edit the critic's text. jira release operator spec signs the spec with the last round's file and hashes it. It refuses a last line in any other form. A FINDINGS file signs only when the spec's ## Critic rounds section gives each residual a - R<n>: fixed|ASSUMPTION|ceiling|deferred → HIMMEL-<n> line.

Seal each return to the bytes the critic read. Straight after saving a return, before any fix and whatever its verdict, run one command per file under review, typed as one literal line, with the sha from that file's READ-SHA256 line:

bash <himmel>/scripts/handover/chief-kit/critic-seal.sh <verdict-file> <file under review> <sha the critic quoted>

It adds CONTENT-SHA256 <sha> <relative path> above the verdict line, and send-file re-hashes that file. Never hash a file yourself to fill a gap, and never write that line by hand. A return with no quote line for a file: ask the same critic for it if that run still answers, and keep its reply verbatim in the return. If it no longer answers, that file gets no seal and the next round reads it. At the cap there is no next round: the page stays refused, and a further round needs a record (At the cap, below).

A refused seal names its cause, and each has one next step:

  • hashes to: the file moved since the critic read it, or the critic's sha is wrong: the next round reads it. Never retry with another sha. No hash shown after hashes to means sha256sum is missing: report it.
  • does not quote, not a sha256, not found: a typing slip. Read the return again and type it once more.
  • last line: append the verdict line as above, then type it once more.
  • already seals: that file is done; go on to the next.
  • needs a blocking finding in round 3: round 3 left only minors; sign the spec under 848 and let the build carry them.
  • is a closure check: the return lacks the pack's marker line, or read a file round 3 did not seal; dispatch the critic again with closure-pack.
  • needs a round-override or round-critical record: stop; see At the cap.
  • anything else: report it; the page stays refused.

Every edit after a seal voids it: a fix, a ## Critic rounds line, a status line, a lint fix. Make them before the critic reads. An edit to the spec means another round of the spec critic and of the plan critic, which sealed it too. Write a round's dispositions in the fix the next round reads. An agreed panel finding on a CLEAN return is a fix like any other, and the next round reads it.

At the cap. Once a critic has had round 3, whatever its verdict, the files it read change only to answer an open blocking finding, and only the files round 3 sealed: round 4 checks exactly that diff. When round 3 of either kind left no blocking finding, they are not edited at all: sign the spec under 848, and the minors go to the build. Stages 3 and 4 still run on a frozen spec, because send-file refuses a page with no plan critic file, or one neither PLAN CLEAN nor at its own round 3 in the ledger. The plan alone may still be fixed while its critic is under the cap. send-file lists the findings in a FINDINGS return and every open operator-critical finding. Whatever else wants an edit it cannot have, an agreed panel finding or a Terminal lint gap, goes to the operator in a plain message with the page, and a lint gap also stops the hand-off. If the edit was made, put the sealed bytes back. A round past round 4 needs the chief's one round-override or a round-critical record carrying the operator's quoted words; the operator is asked in a plain message, since no page of the edited spec can be sent. A spec edit voids the plan critic's seal too; a blocking finding of either kind opens round 4 for both, so the plan gets its own closure check.

CHARTER — the single source is panel-charter.md in this skill dir; paste its contents into the subagent prompt verbatim. Do NOT inline a second copy here — the file is the one source, shared with the panel lane below (two prose-synced copies is the instructional-not-structural drift root CLAUDE.md warns against).

⚑ fork-1 ADVISORY cross-model panel lane. After the Claude critic round, run the free-cloud critic panel over the SAME spec as an advisory second opinion — it catches the same-family popularity trap (Claude reviewing Claude). The Claude critic stays the GATE; the panel only feeds its next round. It does not run at a closure round (round 4 and on): that round reads only the closure pack. Resolve paths from the himmel checkout (minerva runs inside it):

REPO="$(git rev-parse --show-toplevel)"; CR="$REPO/scripts/cr"
CHARTER="$REPO/marketplace/plugins/himmel-ops/skills/minerva/panel-charter.md"
# 1. Enumerate the advisory critic rows (free-preferred; if the registry has NO
#    free rows, fall back to the PAID rows rather than an empty panel — an empty
#    advisory panel silently degrades minerva to claude-only).
#    Reads the UNIVERSAL critics.json (adopter-neutral), NOT the operator overlay.
bash "$CR/advisory-rows.sh" "$CR/critics.json"
# 2. Per row, critique the spec artifact (dead row exits non-zero → FAIL OPEN, note + continue):
#    bash "$CR/artifact-critic.sh" --artifact <spec-file> --charter "$CHARTER" --model <model> --slug <slug>

Then the Claude critic ADJUDICATES each panel finding, one line per finding: VERDICT [<slug>-N] = agreed|disproved|conflict|unaddressed. Agreed findings join the fix list for the next round. Append EVERY verdict + one availability record per row to the correctness ledger, segmented as spec-artifact records:

bash "$CR/ledger-append.sh" finding --head <spec-id> --model <slug> --id <slug>-N --verdict <verdict> --artifact spec
bash "$CR/ledger-append.sh" avail   --head <spec-id> --model <slug> --status ok|unavailable         --artifact spec

cr-scores.sh --artifact spec then reports panel accuracy on spec artifacts, separate from CR-diff records. Panel failure of ANY row = fail-open (note + continue); the Claude critic remains the gate.

After the loop: if interactive, present the hardened spec for approve/redirect; if autonomous, proceed.

Stage 3 — plan

Invoke lean-skills:writing-plans on the approved spec to produce the implementation plan. Its "Save plans to" default is gitignored in himmel too: tell it to save the plan to the state repo specs/plans/ bucket, beside the spec's bucket.

HALT it before its writing-plans step "Execution Handoff". When the plan is written and self-reviewed, return HERE instead of letting it ask for an execution method or invoke subagent-driven-development or executing-plans: the plan critic and the terminal lint run first, and the Terminal section makes the hand-off. If the operator already supplied an execution method, carry it to the Terminal section.

Stage 4 — plan critic (adversarial)

Optional readiness check: the marked paragraph before Stage 2 applies here with kind plan.

Dispatch a fresh subagent (Agent tool, model: sonnet at high effort) against the written plan file. Loop fix → re-critic until clean, cap 3 rounds, counted per ticket in the same round ledger and capped by the same table as Stage 2. A plan round 4 is a closure check too: build its input with closure-pack <KEY> plan --specs <bucket>/specs.

Save each return as Stage 2 does, beside the spec (not the plan): <spec-file>.critic-plan-r<n>.md, ending in PLAN CLEAN or PLAN FINDINGS <count>.

Resolve $S with the resolver from the Mode section, then run bash "$S/minerva-trace-lint.sh" <spec-file> <plan-file> once before the first plan dispatch, so a plan-side fix spends no plan round. The lint needs the plan, so it cannot run earlier, and a spec-side fix it asks for is a spec edit. The files under review here are the plan and the spec, with no page. Add the Stage 2 words after the charter, without what they say about a page, and seal each return with critic-seal.sh as Stage 2 does, one command per file.

CHARTER — the single source is plan-charter.md in this skill dir; paste its contents into the subagent prompt verbatim (no inline second copy — same structural-over-instructional rule as Stage 2).

⚑ fork-1 ADVISORY panel lane — mirror Stage 2's lane on the PLAN artifact: same advisory-rows.sh enumeration (free-preferred, paid-fallback)

  • fail-open + Claude-adjudicates-and-gates, but with --artifact <plan-file> --charter "$REPO/marketplace/plugins/himmel-ops/skills/minerva/plan-charter.md" and the ledger records segmented as --artifact plan (cr-scores.sh --artifact plan reports them). The Claude plan-critic remains the gate; the panel is advisory.

After the loop: if interactive, present the hardened plan for approve/redirect; if autonomous, proceed.

Terminal

You now hold a critic-hardened, approved implementation plan. What happens next depends on the execute step of the initiative grammar. Read the active steps (transport wrapper → the shared resolver; fail-open). Re-resolve the scripts dir (this runs in a separate shell from the Mode section — same resolver, byte-identical):

# >>> himmel-ops scripts resolver (CLAUDE_PLUGIN_ROOT is empty in a Codex skill shell)
S="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/scripts}"
if [ -z "${S:-}" ] || [ ! -f "$S/autonomy-mode.sh" ]; then
  R="${HIMMEL_REPO:-}"; [ -f "$R/scripts/lib/initiative-workers.sh" ] || R="$(git rev-parse --show-toplevel 2>/dev/null || true)"
  [ -f "$R/scripts/lib/initiative-workers.sh" ] || R="$HOME/Documents/github/himmel"
  S="$R/marketplace/plugins/himmel-ops/scripts"
  [ -f "$S/autonomy-mode.sh" ] || for d in "$HOME"/.codex/plugins/cache/himmel/himmel-ops/*/scripts; do
    [ -f "$d/autonomy-mode.sh" ] && { S="$d"; break; }
  done
fi
# <<< himmel-ops scripts resolver
bash "$S/workers.sh" 2>/dev/null || true

Lint first. Run bash "$S/minerva-trace-lint.sh" <spec-file> <plan-file> from the target repo before any hand-off. A non-zero exit names each gap:

  • a missing or ungrepped Fact ownership row → back to the spec (1b);
  • an invariant with no named test → back to the plan (Stage 3).

Do not hand off until it prints ok, in either mode.

  • If mode is autonomous (Stage 0) AND the output contains execute: do NOT stop — invoke lean-skills:subagent-driven-development on the hardened plan to implement it task-by-task. This is the execute-seam auto-handoff that makes the loop continuous. (You remain the parent: own synthesis across the subagents.) When the operator already supplied lean-skills:executing-plans as the method, invoke that instead.

  • Otherwise (interactive mode, or execute not active): minerva STOPS here — it does not start implementation. When the operator already supplied an execution method, ask only whether the plan captures what they want, then use that method. Otherwise offer the hand-off:

    Plan ready. Execute with lean-skills:subagent-driven-development (recommended) or lean-skills:executing-plans?

Interactive mode never auto-executes (a human is present to choose).

04 同仓库更多 Skills