This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Epiphany/notes/eureka-pipeline-state-target.md
Meta Vens f05686c137 Map the Eureka pipeline state cuts
Imagination's cut map, built from probes:
1. Re-pin CultLib: 12 load_envelope sites; core 154/154 at the new pin.
2. One profile-parameterized commit owner.
3. The pipeline document set, lease, admission, queries, and a merge command.
4. The eureka-state stdio MCP package.
5. Skill wiring.
6. A proof campaign on the CultRecordRefFormatter follow-ups.
7. voidbot projection.

Five operator questions are open. The target now drops the claim that the
store merges in git, and records that voidbot indexes only default branches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:52:32 +02:00

8.7 KiB

Eureka pipeline state: target

Status: target (the ends). The means will live in notes/eureka-pipeline-state-cut.md, written by Imagination. Operator rulings are dated 2026-09-15.

Why

Eureka is the Claude Code counterpart of this organism. It is a skill at ~/.claude/skills/eureka that runs the same faculties (Self, Imagination, Hands, Soul, Mind Steward) over foundation changes. In its first campaign, the Aetheria CultCache migration, the pipeline worked, but its findings lived in prose: the cut map, subagent reports and memory files. Self re-read and re-summarised that prose at every step. Stale claims survived until a steward caught them. The postmortem needed a transcript crawl, and one operator quote survived only in a compaction summary.

Epiphany already has the other half: typed documents, admission and receipts. Her own notes/faculty-workflow-lessons-2026-09-04.md:146-176 proposes typed forms of Eureka's habits (Map, Spec, CutReport, Verdict, rulings, a landed-names digest), but none of them are built.

This campaign builds them once, here, and gives Eureka agents access to them.

Operator rulings

  1. Epiphany owns the schemas for pipeline state.
  2. Searchable state serves agents first. Self and new agents rehydrate from it ("what rulings govern stores?", "what is still open?"). Soul and Imagination check precedent in it ("have nil map keys bitten us?"). Operator browsing across projects comes later.
  3. Query split. Epiphany owns the typed store and exact, filtered queries. voidbot owns semantic search, by indexing a projection of these documents as one more Qdrant collection. The typed store is the truth and the index is only a derived copy.
  4. Two campaigns. This one covers the schemas, the store, admission, the Eureka MCP server, and a proof on one real Eureka task. The second, Epiphany adopting Eureka's habits, comes after the schema stops moving. It covers ahead-of-time cut specs, adversarial Soul with mutations, rulings consumed by Self, and steward triggers.
  5. MCP hosting. A Rust stdio MCP server, built as an Epiphany package and launched by Claude Code per session, so no daemon is added. It writes through a newly public Epiphany admission path under organ provenance (eureka), so Epiphany's rules decide what is admitted.
  6. The store lives in the task's repo. This replaces an earlier ruling from the same day that put a single user-level store outside every repo. The operator said: "have the pipeline store sit in the repo where the task takes place. Each Epiphany learns for itself, with affordances for sharing knowledge, same when running Eureka. Then the Eureka working branch can sync with Yggdrasil".
    • The pipeline store is committed in the repo where the campaign runs, on its working branch, next to the target and cut documents.
    • It is separate from Epiphany's runtime and Mind stores and has its own epoch.
    • Knowledge crosses repos only through explicit sharing.
    • Pushing the branch is the sync, and voidbot's existing repo mirror indexes it.
  7. Re-pin first. Epiphany's CultLib pin (e171eca3) is 30 commits behind main (a0813c6), from before one-home-store and atomic push_all. The re-pin is the first cut.

End state

  • Documents. Epiphany defines typed CultCache documents for pipeline state:

    • campaign
    • target
    • cut spec
    • cut report
    • finding (Soul, with CONFIRMED/PLAUSIBLE and HOLDS/FALSIFIED/UNPROVEN decided by Imagination against the lessons doc)
    • ruling, with supersession
    • follow-up
    • landed-names digest

    Imagination fixes the exact set and fields, and every one must have a live Eureka consumer. Each document derives DatabaseEntry, has a stable schema id and version, and a key strategy chosen for identity, not convenience. Each is published in schemas/cultnet/index.json alongside persona_state and work_organ_state.

  • Store. Each campaign's pipeline store sits at a fixed relative path in the repo where the task runs and is committed on the campaign's working branch. Since each repo has one runner, the layout does not need to merge in git. Divergent copies are reconciled by the merge tool. The map decides the layout. Epiphany's admission is the only writer, using batch compare-and-swap with receipts. It refuses foreign epochs, with no compatibility reader.

  • One runner per repo. Only one Epiphany or Eureka writes a repo's pipeline store at a time. The operator put it as "There should only ever be one Epiphany/Eureka running in any one repo. Nonetheless, we should have a merge tool in case it ever happens."

    • A second concurrent writer is refused with a typed refusal naming the holder. The map chooses the mechanism.
    • A merge tool reconciles two divergent copies through Epiphany's admission, replaying admitted documents. It reports true conflicts as typed refusals and never lets the last writer win.
  • Sharing. Knowledge crosses repos only through explicit affordances, such as a read-only foreign query or a citation carrying provenance, as the map decides. A repo's store is written only by admissions made while working in that repo.

  • Admission. A public admission entry point accepts organ provenance (eureka) and applies per-document rules:

    • A finding must name its commit range and evidence.
    • A ruling supersedes by id, never by overwriting.
    • A cut report must cite its cut spec.

    Refusals are typed.

  • MCP server (eureka-state, name to be decided in the map). It is stdio and speaks Rust rmcp in server mode. Its tools are:

    • admit a document;
    • read by id;
    • filtered query (by campaign, repo, cut, kind, status, supersession, time);
    • "open items" for a campaign;
    • the rulings currently in force.

    Every write is an admission, so no tool writes to the store directly. It is registered for Claude Code at user scope.

  • Semantic projection. Pushed stores reach Yggdrasil through git. voidbot's repo mirror finds pipeline stores in the repos it pulls and indexes a projection of their admitted documents as a new collection. Today the mirror fetches only each public repo's default branch, so which branches and repos get indexed is an operator question in the map. The typed store remains the only truth, and voidbot hits resolve to typed ids in the owning repo's store.

  • Eureka. The skill's briefs tell Self, Imagination, Hands and Soul to read from and admit to this state instead of relaying prose. The cut map document in the target repo becomes a rendering of typed cut specs, or is retired, as Imagination decides.

  • Proof. One real Eureka task runs end to end on the typed state: rulings admitted, a cut spec, Hands' cut report, Soul findings, and the follow-ups queried back. A fresh agent rehydrates from queries alone.

Invariants

  • Mind admits. Only Epiphany's admission writes the pipeline store. The MCP server, voidbot and Eureka agents are clients or projections, never owners.
  • Typed, not prose. No JSON store and no untyped blob fields where a typed field exists. JSON appears only in published schemas.
  • No new daemon. The MCP server is a per-session process. Anything long-running must earn it by independent lifecycle, privilege, resource or failure isolation.
  • One package per production entrypoint. Build economy follows AGENTS.md: focused single-package checks on the shared target dir, and no broad builds.
  • Stores stay separate. The pipeline store's epoch never gates Epiphany's runtime or Mind stores, and theirs never gate it.
  • Supersession, not deletion. An old ruling or finding stays queryable as superseded.
  • The skill defers to the schema. The Eureka skill describes how to use the state; the schema set and admission rules are owned here.

Not in scope

  • Epiphany's own organs consuming pipeline documents: the second campaign.
  • Operator browsing surfaces (Eve/CultUI) over pipeline state.
  • Migrating the Aetheria CultCache campaign's prose into typed documents. Imagination may propose it as the proof task if it is cheaper than a new real task.
  • Cleanup of .epiphany-run/ (105 GiB) and the repo-local target/ (39 GiB): the operator's call, tracked separately.
  • CultNet over-the-wire compare-and-swap. The MCP server attaches the store locally through cultcache-rs, which already has cross-process locking and conditional commits.

Evidence

  • Substrate maps (scratch, 2026-09-15): Epiphany typed state and admission; the MCP and client landscape.
  • Dated comparison: ~/.claude/skills/eureka/references/epiphany-comparison-2026-09-15.md.
  • Campaign precedent: F:\Projects\Aetheria\docs\cultcache-migration-postmortem.md.