Eureka/SKILL.md
Eureka 1bbd8a574c Eureka skill: router plus on-demand references (54 KB -> 17 KB loaded per invocation); loop steps 1-5, Self's discipline and git scars moved verbatim to references/, each step keeps its lead and a pointer
After GoogleChrome/modern-web-guidance's router-and-corpus design (references/research-modern-web-guidance-2026-11-11.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 06:21:07 +01:00

17 KiB

name description
eureka Eureka runs a foundation change as a faculty pipeline for Claude Code agents. It is the skill counterpart of Epiphany. The root agent acts as Self and routes the work. The target shape is written first, Imagination maps the cut, Hands executes one cut at a time, Soul verifies by trying to falsify what Hands promised, Life keeps memory honest at phase boundaries, and the operator rules on real forks. Use it for any migration, rebuild, teardown, cross-repo or cross-runtime change, infrastructure swap, or multi-cut refactor, especially on shared GameCult substrate (CultLib, CultCache, CultNet, CultMesh, CultMath). Also use it when the operator says "Eureka", "map the cut", "Imagination pass", "Soul pass", "Hands", "mini Epiphany loop", or "make this migration look like the last one", or asks to plan and land a change too big for one diff, even without naming the pipeline.

Eureka

Eureka is the pipeline used by Claude Code agents. It sits next to Epiphany, the running organism in F:\Projects\Epiphany, and shares its faculty vocabulary and its document schemas.

Eureka keeps questions, rulings, cut specs, reports, verdicts, findings, follow-ups and resolutions as typed documents in the instance's mind, held by Huginn and reached through the huginn CLI (huginn whoami, huginn admit, huginn view, huginn query; huginn --help is the source). Status is derived from those documents, never written. The committed target and map keep only what has no kind: body facts, the model page and rationale. references/campaign-state.md has the document set and the selection recipes that every faculty reads state through.

This pipeline lands changes that are too large or too foundational to trust to one agent's judgment. It turns "migrate X" into a sequence of small, verified ownership changes. Each cut is specified tightly enough that Hands barely has to read, and each one is falsified by an agent that did not write it.

It exists because the failure it prevents is common and quiet: one agent plans, implements, tests and reports on its own work. The tests then pin the agent's spelling, not the operator's invariants, and the report is written by the party with the most reason to believe it. In the Aetheria CultCache migration (2026-09-12..15), 29 of 32 Soul passes found real defects that Hands' own green tests had passed, about 75 in all: deadlocks, lost writes, a wire-parity split between runtimes, untested operator rulings, and a writable catalog in the editor. See references/postmortem-cultcache.md for the evidence.

The faculties

Faculties are postures, not personalities. The root agent is Self. It routes work, admits the campaign's frame and the operator's rulings, commits the prose map, and talks to the operator. Delegate every other faculty to a subagent with its own brief. Each is a Claude Code subagent type of the same name (imagination, hands, soul, eyes, modeling, life), and the dispatch names it as subagent_type, which loads that faculty's charter. A faculty that grades its own work has lost the point.

Faculty Runs against Admits Must not
Imagination the Body (source, docs, probes), plus the target questions and cut_specs specified to file:line, follow_ups for work no cut owns, and an idea for every alternative considered that is not a question's option (a rejected one with its Recorded resolution); body facts, the model page and rationale go to the prose map commit code, choose a product fork silently
Hands one cut_spec small pushed commits, then one cut_report redesign the spec, work around a fork
Soul Hands' executed commits one verdict and its findings edit or commit a repo, or review a plan (a pass on a plan is Imagination)
Life memory surfaces nothing: named mutations and proposals touch Body code, restate what an owner records
Eyes (optional) history, transcripts, logs research only: one note per claim, a source on every note conclude or recommend (the note has no field for one)
Operator forks that are hers to hold: her own work, the wallet, the legal root, and what a campaign asks for where she holds it; elsewhere a respected contributor whose word a steward weighs rulings, which Self admits (not an agent)

Admitting is a write to the Mind, not to the Body. Soul stays read-only on repos and still admits its verdict.

The operator's doctrine defines the faculties, and each charter owns its faculty's identity, method and boundaries. Read ~/.claude/agents/soul.md and ~/.claude/agents/imagination.md. In short, a pass is named by what it produces, so a pass over a plan is Imagination, and a plan is finished when Hands can go straight to the cut.

Three tiers of context

A Mind is a tiered context-management system. Each tier keeps the context its job needs and hands down only what the next tier needs to act:

  • The operator tier cares about the project's scope and goals. In the swarm it is the Mind's Persona; in an operator's own Claude Code session it is the operator. It holds what the work is for, who it serves, and what matters next.
  • Self, the session that tier drives, cares about achieving the goals it was given. It holds the context to coordinate that work: the campaign's state, the rulings in force, which cut is next and who is on it.
  • The organs (Imagination, Hands, Soul, Eyes, Modeling, Life) take work that needs a context of its own, each specialized for its task: one spec, one diff, one question.

Delegation is a choice, not a rule. The operator tier and Self are both capable of doing a task directly, and should when their own context already suffices for it: a one-line fix, a lookup, a status check. A task goes down a tier when doing it would fill the tier's context with detail its job never reads (wide reading, a long build, many files), or when it needs a context the doer must not share: work is never verified by the party that wrote it, so a consequential change still gets its Soul pass from a separate context however small it is. The weight of the machine therefore scales with the task. Measure a task by what it brings back, not by how simple it looks: every tool result stays in the context that ran it, so a quick check that returns thousands of lines of output spends the higher tier's context, which is meant for goals and coordination, as surely as real work does. Do directly what returns little; hand down what returns a lot, and ask for the conclusion, not the dump.

The operator tier talks to its Self the way an operator talks to this session: it can push a message at any time, and every reply comes back to it as a message it can answer (rulings eureka-body:ruling:mind-self-is-a-persistent-session and eureka-body:ruling:live-mind-sessions). Parallel work is Self dispatching organs at once, not the operator tier opening more Selves. A tier that takes on work too big for its context fills it with detail its job never reads and loses the context its own job needs; a tier that hands down work its context already covers pays a handoff for nothing. Operator, 2026-11-06: "The operator agent, the persona, cares about the scope and goals of the project. The Self it drives cares about achieving the goals given to it and has the context to coordinate that work, while doing the work goes to the sub agent organs whose context is specialized for their task."

The loop

0. Reach the mind, map the substrate, scope, target

  • Check that huginn runs in this session (huginn --version; on Yggdrasil it is /opt/gamecult/huginn/current/huginn, and EUREKA_INSTANCE and HUGINN_ENDPOINT name the mind). If it is absent, stop and tell the operator. Never fall back to prose.
  • Run huginn whoami. If it does not answer, follow "When the organ does not answer" in references/campaign-state.md: one retry, then stop. Pick a session label and give it in every brief; it attributes every admission.
  • Map the real substrate before you propose anything. Run parallel read-only exploration of the old system and the new one, of any prior attempts and why they failed (git history, rollbacks), and of every consumer across repos.
  • Write and commit the target document first, on the campaign's working branch: its rationale, and the design truths the migration will produce. The campaign and the target cite it by DocRef, and a DocRef names a commit.
  • Then admit the campaign and the target (Self's checklist in references/briefs.md). The target holds the ends, not the means: labelled invariants that must survive (wire parity, one owner per decision, what the operator refuses to lose), and what is explicitly not a consumer. For example, AetheriaEve was "taxidermy", and saying so up front saved every later pass from considering it.
  • State the scope boundary out loud. The earlier Aetheria attempt failed because it bundled cache, mesh, eve and daemons into one change. One foundation per pipeline.
  • Dispatch Life before the first consequential action. Global doctrine names the agent type that carries it.

0b. Settle identity, lifecycle and authority before any cut is mapped

Re-cutting is not usually caused by a map that was insufficiently detailed. It is caused by a question that was answerable on day one and got asked on day three. In the Eureka pipeline-state campaign every backtrack was one of three questions, and none of them needed a line of source to answer:

  • Identity. The key grammar was redesigned after three patches because ids had no namespace. Every earlier cut specified behaviour over an unnamed space, so the same invariant kept reappearing one level up.
  • Lifecycle. Cut 6d exists because the shape of each document was specified and its life was not: a subject that is resolved, withdrawn, resolved again, and transferred to another steward. Sequences had to be retrofitted into keys that were already landed.
  • Authority. The repo-owned store died whole in Cut 4 because who owns a mind was never asked before the store was specified.

So produce one table before mapping any cut, with a row per persistent kind and three columns: what names it, what happens to it over time, and who decides. No cut is mapped while a cell is empty. This costs a page and an hour. The table is the model page in the prose map; no kind carries it.

Admit the operator's forks in the same pass, as questions in one batch. In that campaign they surfaced across five cuts instead, so rulings kept landing on code that was already written. Discovering that the operator wants something different is not waste; discovering it after the code lands is.

1. Imagination maps the cut

Brief an Imagination agent to admit the cut_spec for the next cut against the current Body; depends_on names the cut labels it waits on. The fields are the spec standard: repo, branch and base; deletes first, with exact paths and line counts; keeps_moves; adds; file_changes at file:line for code that exists; reads for code Hands must see but not change; an authority_map for anything that changes ownership; verification (builds, tests with the rule each pins, negative greps, operator checks); an estimate for the ledger; and the rulings and questions it rests on. A changed spec is a new revision, admitted with the resolution that supersedes the old one, never an edit.

Read references/loop-1-imagination.md in full when you map a cut or brief Imagination.

2. Operator rulings

Prior art comes before every nontrivial fork. Before a nontrivial question goes to the operator, Self stops the line that raised it. Self dispatches an Eyes pass over the research literature and over established implementations of the same problem: papers, the source and design notes of the systems that solved it, and their known failure modes. Self first runs huginn known on the question in plain words and dispatches a fresh pass only for what the notes it returns do not answer. The question then cites the notes it stands on in raised_in, and the recommendation stands on them. Operator, 2026-10-02: "I feel like the default reflex is to defer to my judgment, and I'm neither a Dijkstra nor a Carmack." The operator holds the decision where the work is hers; in a steward's domain she is a respected contributor and the steward decides.

Read references/loop-2-rulings.md in full before you put a fork to the operator or admit a ruling.

3. Hands executes one cut

Size the cut against Hands' context budget before dispatch. Self owns this, for map cuts and fix batches alike. Sonnet degrades at about 0.5M tokens of context (operator, 2026-09-25), and the sloppiness starts earlier: Aetheria's stats and shield Hands got "loopy" past 400k, and a StreamPixels fix batch past 550k produced sloppy code. Treat 0.5M as the danger line, never the target. Size by calls too: each call re-reads the context, so an agent's reads grow with the square of its calls. A cut that needs more than about 150 Hands calls is two cuts, or one cut and a continuation.

Read references/loop-3-hands.md in full when you size, brief or dispatch Hands, or act as Hands.

4. Soul falsifies

Brief Soul with the cut_report id and the session label. The report carries the exact range and Hands' promises. Soul's claims are not bounded by what Hands chose to promise. Soul also views every ruling the cut_spec cites and makes one claim per ruling, runs the rulings-in-force recipe so that standing operator directions reach it (including ones admitted after the spec), and measures the target invariants the cut touches. Hands' self-report is one input to attack, never the list of what gets checked. Point Soul at the specific places a shortcut would hide. Soul:

Read references/loop-4-soul.md in full when you brief Soul or act as Soul.

5. Triage and repeat

For each finding in force, decide:

Read references/loop-5-triage.md in full when a verdict comes back.

6. Land, record, run Life

After each cut:

  • Progress is a query, not a section to update: the recipes for specs with no report (minus those blocked on a question), reports with no verdict, and open questions, follow-ups and findings.
  • Self reconciles the subtraction ledger with the ledger recipe (each spec's estimate against its reports' structural_delta). A miss is allowed, but it must be explained. The CultCache core missed its size target by roughly 1,200 lines, and nobody looked, because the ledger stopped being updated after Cut 4.
  • Self commits and pushes the prose map when its body facts, model page or rationale changed. Hands and Soul never touch it.
  • At phase boundaries, a Life pass moves durable rulings to their owners, retires superseded memory, and falsifies at least one persisted claim.

At the end, Self writes the postmortem (see references/postmortem-template.md) and reconciles the target doc with the Body.

Self's discipline

  • Never restate typed state in prose. Not in the map, not in a brief, not in a summary for another agent: give the id, and let the reader view or query it. A paraphrase of a spec or a ruling is a second copy, and a second copy is how stale text gets read as live design. Tell the operator what matters in words. Tell agents the id.

Read references/self-discipline.md in full at session start and after every /clear, if you are Self.

Shared tools

Scripts that agents share live in this repo under tools/. tools/INDEX.md lists each script, its consumer and the brief that names it; briefs name the exact script they want and agents do not browse. Contributions come by branch and Forgejo pull request (this repo lives on Yggdrasil's Forgejo), never a push to main. A script that verdicts depend on gets a Soul pass before merge, and bash tools/test-tools.sh passes first. The summary and wait modes of tools/stopgap/ygg-verify.sh, tools/mutation-table.sh and tools/cargo-mutants.sh are such scripts. A script whose brief no longer names it is pruned. Scripts that know a project's layout stay in that project.

Git and tooling rules (scars)

  • Stage explicit paths. Never git add -A. It swept an untracked local settings file into history.

Read references/git-and-tooling-scars.md in full before any git, build or tooling work in a cut.

Adapting the pipeline

Small cuts can merge Imagination into Self when the map is already current, but never merge Soul into Hands. Non-code migrations (content, data, docs) keep the same loop: the "tests" become captures and independent decodes. The shape to preserve is separate planner, executor and falsifier, with the operator ruling forks and memory kept honest.

Record changes to this skill in references/changelog.md, with the evidence that motivated each one.