2026-07-12 07:45:15 +01:00
# Epiphany Native Implementation Plan
This is the live campaign plan. The Codex-fork phase succeeded by starving
Codex of Epiphany authority; Epiphany is no longer implemented as a collection
of app-server routes.
## Objective
Build an inspectable native organism whose typed state, runtime, organ gates,
memory, scheduling, interfaces, and social crossings can operate without Codex
owning Epiphany cognition. Retain Codex-derived code only where it provides an
earned OpenAI-compatible authentication or model-transport capability.
## Current Mechanism
- `epiphany-state-model` owns durable Mind shape.
2026-08-16 20:55:32 +02:00
- `epiphany-core` owns keyed Mind admission, runtime spine, organ gates,
heartbeat physiology, Persona, and CultMesh integration. Its coordinator and
status surfaces still retain a legacy persisted `EpiphanyThreadStateEntry` ;
that aggregate is an obsolete live authority and currently blocks fresh keyed
2026-08-18 01:36:34 +02:00
stores from coordinating. Body, Proposal, frontier-verdict Modeling,
2026-08-18 03:24:58 +02:00
Research, Verification, Planning/PlanMind, and Reorientation have been
removed from that authority; generic coordinator presence and residual
objective/state/status paths remain.
2026-07-12 07:45:15 +01:00
- Native binaries expose coordinator, status, state, runtime, memory, daemon,
Persona, repo-work, and Verse operations.
- CultCache stores typed state and receipts; CultMesh/CultNet carry typed local
and federated projections.
- Vendored Codex exposes no Epiphany route, DTO, thread-state field, rollout
migration, scheduler, watcher, or bridge crate.
## Invariants
1. Mind is the only durable state-admission gateway.
2. Substrate Gate controls access; it does not admit state.
3. Eyes establishes provenance; Hands causes consequences; Soul verifies them.
4. Self coordinates but does not steal another organ's authority.
5. Heartbeat/Idunn own physiology and daemon survival, not project truth.
6. Persona speech and outside-world action preserve consent, identity,
provenance, and private-state seals.
7. CultMesh projections and Eve renderers never become owners.
8. Codex remains free of Epiphany state/process/interface authority.
## Completed Foundation
2026-08-16 20:55:32 +02:00
- Typed reasoning bases, terminal decision contexts, exact Mind batch CAS, and
keyed objective/RepoModel documents.
2026-07-12 07:45:15 +01:00
- Native coordinator facade and derived status/recommendation surfaces.
- CultCache runtime spine with worker, Mind, Eyes, Substrate Gate, Hands, Soul,
Continuity, and coordinator receipts.
- Native OpenAI auth/model/runtime spine.
- Native heartbeat, daemon supervision, and cluster liveness surfaces.
- Native Persona memory/turn/audit machinery and Bifrost-governed public mouths.
- Native repo-work planning, Hands/Soul/Mind closure, public-proof, credit, and
Bifrost accounting families.
- CultMesh local Verse, compact operator readbacks, Gjallar sight, Eve
connection receipts, and three-Verse trust boundaries.
- Complete removal of the Epiphany Codex app-server compatibility surface and
`epiphany-codex-bridge` .
## Active Campaign
### 0. Unify Canonical State Transactions
2026-07-12 07:51:52 +01:00
Status: complete. `coordinator_state_transaction.rs` is the sole production
writer of `THREAD_STATE_KEY` ; ordinary updates, launches, and Mind acceptance
share it, raw storage writers are deleted, and negative source guards prevent a
second owner.
2026-07-12 07:45:15 +01:00
- Define one transaction owner for canonical state revision changes.
- Make ordinary update, launch, and Mind-witness acceptance call that owner.
- Preserve operation-specific atomic companions: launch runtime envelopes and
acceptance Mind witnesses must commit in the same cache transaction.
- Replace misleading `runtime_spine_store` state writes with an explicit
unified store contract or genuinely separate stores with a typed transaction
coordinator; do not rely on path aliasing by convention.
- Demote raw `thread_state_store` writers to crate-private substrate helpers.
Exit evidence:
- one named primitive owns `THREAD_STATE_KEY` writes;
- negative source tests reject direct canonical-state writes elsewhere;
- ordinary update, launch, and acceptance transaction tests pass against the
chosen explicit store contract;
- `EpiphanyCoordinatorService` path names match real ownership.
2026-04-26 07:51:25 +01:00
2026-07-14 23:01:56 +01:00
### 1. Repair Modeling
2026-07-12 07:45:15 +01:00
- Keep `notes/epiphany-current-algorithmic-map.md` aligned with source.
- Distinguish historical evidence from current mechanism in long handoffs.
- Remove live-looking references to deleted bridge/routes from current docs,
prompts, wrapper help, and operator output.
- Add source guards where a removed authority could plausibly regrow.
Exit evidence:
- current canonical docs contain no false live paths;
- every mapped owner/file exists;
- source scans show no Epiphany Codex protocol authority.
### 2. Normalize Native Operator Contracts
2026-07-12 07:58:19 +01:00
Status: complete for the canonical coordinator/status boundary. The two-path
service constructor and status flags are deleted, native JSON emits `state` ,
and the wrapper supplies the live unified store. Source guards reject the old
field and flags.
2026-07-12 07:45:15 +01:00
- Audit native JSON artifacts for compatibility-shaped field names and nested
Codex response assumptions.
- Rename only when no external contract depends on the old shape; otherwise
publish a typed migration and explicit expiry.
- Prefer CultCache/CultMesh documents as load-bearing state; keep JSON at CLI,
schema, MCP, OpenAI, and other xenos boundaries.
Exit evidence:
- native coordinator/status consumers read native fields directly;
- wrapper summaries are projections, not reconstructed policy;
- no load-bearing JSON sidecar decides behavior.
### 3. Close The Organ Loop
2026-07-12 08:05:39 +01:00
Status: active. The scheduler can no longer impersonate Modeling/Mind after
Hands execution, and closure refuses deterministic fallback or a passing
2026-07-12 08:17:08 +01:00
verdict without an explicit model-authored finding. That finding now persists
as a typed runtime document backed by a passing Soul receipt; Mind rereads it,
2026-07-12 08:27:47 +01:00
and repo-map/CultMesh admission carries its receipt ID. Repo-map admission is
now atomic: the typed canonical map entry and both Mind witnesses publish in one
CultCache batch, while CultMesh lowers the committed entry. The custom map
2026-07-12 08:33:10 +01:00
MessagePack owner is deleted. Stable phase IDs are immutable: identical retries
reread existing Soul, Modeling, and Mind/map documents, while conflicting retry
cargo fails without changing admitted state.
2026-07-12 08:05:39 +01:00
2026-07-12 07:45:15 +01:00
- Prove Hands → Soul → Modeling → Mind → Self on a fresh repository without
supervisor implementation or direct worker-thought inspection.
- Ensure every consequence has Substrate Gate scope, Hands receipts, Soul
verdict, Modeling map update, and Mind admission before the next Hands turn.
- Treat no-diff, unreviewable, timeout, and regather outcomes as explicit typed
states rather than success-shaped silence.
Exit evidence:
- fresh-repo live-fire closes one nontrivial work item;
- negative tests prove workers/Hands/Soul cannot bypass Mind;
- operator-safe artifacts explain owner, inputs, outputs, and verdicts.
### 4. Make Physiology Durable
- Finish Idunn-owned service installation/audit aftercare without moving
elevation authority into Self or wrappers.
- Prove cooldown-after-completion, no overlapping lane heartbeat, idle sleep,
rumination, and recovery across restart.
- Ensure scheduler and liveness receipts remain separate from project state.
Exit evidence:
- seven organ daemons survive restart under typed policies;
- complete lifecycle audits close the current elevated-service warning;
- no duplicate daemon keeper exists.
### 5. Publish Eve/CultUI Interfaces
- Emit typed Eve composition/state graphs for coordinator, organ status,
receipts, repo work, Persona, and daemon physiology through CultMesh.
- Lower those graphs in Aquarium/browser/TUI without renderer-owned truth.
- Keep private/internal, trusted-local, and public Verse surfaces distinct.
2026-04-26 03:00:06 +01:00
2026-07-12 07:45:15 +01:00
Exit evidence:
- one composition graph renders in at least GUI and compact TUI targets;
- commands route back through typed owner intents;
- UI timeline probes observe transition-time invariants.
2026-04-26 03:00:06 +01:00
2026-07-12 07:45:15 +01:00
### 6. Prove Federated Work And Social Citizenship
2026-04-29 21:49:47 +01:00
2026-07-12 07:45:15 +01:00
- Demonstrate a Bifrost-originated work item flowing through Epiphany lanes,
maintainer review, credit/ledger receipts, and operator-safe public proof.
- Demonstrate Persona discussion with semantic memory, consent, disagreement,
and governed external crossing.
- Treat foreign dreams as thought weather until a reviewed adoption receipt.
2026-04-29 21:49:47 +01:00
2026-07-12 07:45:15 +01:00
Exit evidence:
2026-05-01 07:34:09 +01:00
2026-07-12 07:45:15 +01:00
- public proof contains no private worker/operator context;
- Bifrost and Heimdall ownership remains explicit;
- local agency, refusal, exit, and provenance survive federation.
2026-05-01 07:34:09 +01:00
2026-07-12 07:45:15 +01:00
## Verification Strategy
2026-04-23 22:01:17 +01:00
2026-07-12 07:45:15 +01:00
- Unit tests prove local authority and validation.
- Adjacent-organ smokes prove typed handoff.
- Native end-to-end runs prove operator/product contracts.
- Negative source and runtime checks prove old owners cannot regain authority.
- Timeline checks cover load, user/programmatic transition, mid-transition,
settled state, and restart/re-entry where timing matters.
- Served/runtime versions and schema versions are exposed when deployment or
cache uncertainty could impersonate logic failure.
2026-04-28 15:53:36 +01:00
2026-07-12 07:45:15 +01:00
## Cut Line
2026-04-28 15:53:36 +01:00
2026-07-12 07:45:15 +01:00
Delete or demote:
2026-04-28 18:43:46 +01:00
2026-07-12 07:45:15 +01:00
- stale current-looking bridge/route prose;
- compatibility-shaped native code with no external consumer;
- wrapper policy duplicated from Rust owners;
- whole-context serialization where a narrow typed query exists;
- tests whose only purpose is keeping extinct compatibility anatomy alive;
- any cache, registry, adapter, mode, or metadata field without a named
invariant and owner.
2026-04-28 18:43:46 +01:00
2026-07-12 07:45:15 +01:00
## Immediate Next Action
2026-04-23 22:01:17 +01:00
2026-08-16 20:55:32 +02:00
Keep the five-day shakedown and Model Atlas operational Gate 1 paused. Complete
the remaining Decision-Auditable Concurrent Mind hard cut before another live
coordinator run. Fresh Gate preflight proved that keyed Mind and both semantic
partitions become ready, then falsified coordinator ownership: status still
declares the organism missing because it reads persisted
`EpiphanyThreadStateEntry` as the presence and routing head.
Cut in this order:
2026-08-17 19:31:14 +02:00
1. **Landed at `79346523`: ** replace the aggregate-shaped role reasoning input with one sealed typed
2026-08-16 21:13:17 +02:00
projection assembled from exact keyed Mind document versions. The final
model request must render that projection; citing keyed sources while
rendering the old thread snapshot is explicitly forbidden.
2026-08-17 20:06:56 +02:00
2. **Body admission landed at `2eb95df6`; current-work projection landed at `e42788c9`: ** one pure typed projection now derives Body Modeling, Eyes continuation, proposal Modeling, frontier planning, and Hands readiness from keyed Mind/runtime receipts.
2026-08-16 20:55:32 +02:00
Modeling must derive from the current Body/RepoModel obligation; Eyes only
2026-08-17 19:31:14 +02:00
from explicit external-evidence obligations. Body-generation Modeling
2026-08-17 19:52:31 +02:00
identity, typed Body-to-Mind admission, sealed reasoning, and atomic decision
2026-08-17 20:06:56 +02:00
admission are landed. Current-work no longer reads the external Body store;
2026-08-17 21:03:43 +02:00
status consumes the shared projection.
3. **Baseline transaction landed at `9f7b164f`; operator routing at `587c56d2`; Resident continuation and keyed acceptance at `478fb923`: ** baseline Body Modeling is now thread-free from unresolved Body obligation through Launch/Wait/Review and exact Mind admission. Resident and operator callers consume the same family projection and acceptance owner. Thread ID remains immutable pass provenance only.
2026-08-17 21:50:51 +02:00
4. **Proposal Modeling landed at `d1b031cb`: ** its immutable request, exact launch binding, runtime attempt/result, and `Modeling.proposal_frontier` commit now own Launch/Wait/Review and admission. The aggregate launcher refuses proposal cargo; the old selector, validator, context builder, and generic-launch hint are deleted. Body and Proposal share only the exact-envelope launch CAS invariant, not a mutable family registry.
2026-08-18 01:36:34 +02:00
5. **Continuation vocabulary landed at `e404c105` and was named truthfully at `fc5d1a4a`: ** concrete pass families share one pure `EpiphanyAgentPassContinuationAction` ; their semantic requests, projections, validators, and admission owners remain separate.
2026-08-17 22:24:11 +02:00
6. **Dormant claim-repair authority deleted at `20dd66c8`: ** no request/binding/context schema, runtime carrier, coordinator branch, result cargo, export, or model lowering survives. The independent Eyes challenge fact remains. The same pass fixed two-snapshot Body/Proposal launch derivation and stress-proved single Proposal launch 20/20.
2026-08-17 23:30:00 +02:00
7. **Frontier-verdict Modeling landed at `d367e525`: ** one exact Soul verdict
atomically creates its deterministic request; the sealed role projection,
deterministic attempt, shared Launch/Wait/Review state, and
`Modeling.frontier_verdict` commit own the complete lifecycle. Admission
accepts disjoint keyed changes but refuses a changed strong frontier without
mutation. Accepted Eyes timestamps, latest-result slots, aggregate prompt
construction, and generic role lanes cannot create or suppress this work.
2026-08-18 00:36:44 +02:00
8. **Frontier Research landed at `c7412998`: ** the v3 request seals the exact
frontier/dependency document closure, while the full RepoModel projection is
audit cargo only. One deterministic attempt, terminal decision context,
request-bound Eyes packet, and `Eyes.frontier_research` Mind mutation own
Launch/Wait/Review/admission. Stale terminal decisions remain durable, exact
strong-state changes refuse admission byte-identically, and disjoint keyed
writes merge. Accepted Eyes, role lanes, timestamps, generic regather, and
Modeling hints cannot launch Eyes or gate Modeling. CultCache `ba6a487`
supplies the shared named nested-document encoding boundary used by Mind.
2026-08-18 01:36:34 +02:00
9. **Frontier Verification landed at `fc5d1a4a`: ** one exact Hands commit and
its deterministic Verification request publish atomically. The sealed
request/launch/result/context lifecycle owns Launch/Wait/Review; admission
writes the keyed audit, Soul verdict, frontier-Modeling request, and Mind
commit receipt atomically. Disjoint keyed writes merge, exact-frontier drift
refuses byte-identically, and replay is stable. Generic launch/acceptance,
accepted-at/latest-result selection, dynamic telemetry prompts, and
model-authored causal IDs no longer own this family.
2026-08-18 02:24:38 +02:00
10. **Frontier Planning and PlanMind landed at `c9329ed6`: ** the Planning
request seals exact frontier/dependency versions plus per-claim obligation
guards. Current-work owns deterministic Imagination and Mind attempts;
Imagination authors a typed candidate, while Mind alone adopts it through a
sealed PlanMind request and family-owned frontier mutation. Claim challenge
admission atomically updates the target claim-obligation document, so stale
planning conflicts without turning unrelated graph writes into a global
head. Thread provenance, generic coordinator validators/constructors,
aggregate role lanes, and accepted-at/latest-result behavior no longer own
2026-08-18 03:24:58 +02:00
this family.
11. **Reorientation landed at `d5df53ae`: ** one keyed request seals the exact
continuity projection and source document versions; deterministic attempts
bind an exact reasoning basis and terminal decision context. The family
owner alone admits resume/regather plus its continuity receipt. Model-backed
failure retains a typed Mind failure document before retry. Status and
coordinator routing use the same current-work projection. Aggregate
launch/acceptance, checkpoint/freshness recommendation, latest binding,
global revision acceptance, and accepted-at comparison no longer own this
family.
12. Delete `EpiphanyThreadStateEntry` , `coordinator_state_transaction` , global
2026-08-16 20:55:32 +02:00
expected revisions, aggregate update APIs, and all source references from
production. Refuse old writable stores; add no dual reader or migrator.
2026-08-18 03:24:58 +02:00
13. Replay fresh-store concurrency and decision-context acceptance. Only then
2026-08-16 20:55:32 +02:00
restart Model Atlas Gate 1 from a new external root.
Do not preserve the aggregate for compatibility, manufacture a bootstrap
thread, release autonomous scheduling, register topology in `gamecult-ops` ,
touch Yggdrasil, reuse historical/partial Gate roots, or treat semantic
readiness as coordinator acceptance.