2026-05-27 12:43:44 +01:00
# Perfect Machine Audit Roadmap
Date: 2026-05-27
2026-05-30 01:21:33 +01:00
Updated: 2026-05-30
2026-05-27 12:43:44 +01:00
Objective: audit Epiphany's current organ shape and map the path from named
contracts to the Perfect Machine: a coherent organism where repository access,
evidence, projection, public speech, action, verification, continuity, and
persistent state are separately owned but mutually aware.
## Current Shape
Epiphany has the first typed skeleton for the organ boundaries:
- `Mind` : persistent state guardian. `epiphany-core::mind_gateway` names
thought, state-effect proposal, gateway-review, commit/rejection, and Verse
adoption contracts.
2026-05-28 22:50:50 +01:00
- `Substrate Gate` : repository/substrate access protocol. `epiphany-core::substrate_gate`
2026-05-27 12:43:44 +01:00
names repo access requests, reviews, grant/refusal receipts, snapshots, and
mutation receipts.
- `Eyes` : evidence ingress guardian. `epiphany-core::eyes_gateway` names
evidence requests, reviews, source lookup receipts, evidence packets, and
refusals.
2026-06-15 16:38:09 +01:00
- `Imagination` : projection/future-shape organ. For Persona, it now owns the
Projector prompt boundary in `epiphany-core::persona_turn` .
- `Persona` : public person-shaped surface. It receives projected context and writes
2026-05-27 12:43:44 +01:00
natural prose only.
- `Hands` : action organ by doctrine, but not yet backed by a dedicated CultNet
2026-05-28 22:50:50 +01:00
contract family parallel to Substrate Gate/Eyes/Mind.
2026-05-27 12:43:44 +01:00
- `Soul` : verification organ by doctrine, but not yet backed by a dedicated
CultNet contract family parallel to Eyes.
2026-05-29 00:09:40 +01:00
- `Continuity` : continuity organ by doctrine, heartbeat, reorientation, and handoff
2026-05-27 12:43:44 +01:00
surfaces, but not yet a single typed contract family for sleep/compaction and
recovery.
- `Self` : coordinator/routing organ exists through coordinator policy, role
board, CRRC, and view surfaces, but it is still partly embedded in bridge and
Codex-compatible routes.
The dependency matrix is explicit in `epiphany-core::organ_dependencies` : every
2026-05-29 00:16:05 +01:00
standing sub-agent depends on every other standing sub-agent. This is correct, but it
2026-05-27 12:43:44 +01:00
is currently descriptive. It does not yet force every launch packet, prompt, or
runtime receipt to carry dependency context.
2026-06-15 16:38:09 +01:00
## Void Persona Lessons
2026-05-27 12:43:44 +01:00
2026-06-15 16:38:09 +01:00
Void's current Persona work is the best reference implementation for the Persona
2026-05-27 12:43:44 +01:00
organ. The important lesson is not "make the prompt longer." The lesson is
parent-organ ownership:
- Parent `Imagination` projects typed state into lived character-facing prose
2026-06-15 16:38:09 +01:00
before the Persona sees it.
- The Persona reads raw room/context evidence directly and writes natural prose as
2026-05-27 12:43:44 +01:00
a person.
2026-06-15 16:38:09 +01:00
- Parent `Mind` interprets the Persona output into memory, affect, social reads,
2026-05-27 12:43:44 +01:00
mood, agency pressure, speech, retry, or drop.
- The deterministic assembler creates compact packets, raw transcripts, repo
activity, pronoun guidance, channel policy, and media awareness. It must not
turn those into character prose itself.
Relevant Void references:
2026-06-15 16:38:09 +01:00
- `VoidBot:prompts/repo-Persona-state-projector.prompt.md` : names the projector as
the Persona's parent Imagination organ and forbids schema slurry.
- `VoidBot:prompts/repo-Persona-turn.prompt.md` : keeps the Persona turn as the
2026-05-27 12:43:44 +01:00
speaking surface, with recent repo activity before conversation transcript and
deterministic policy sections outside projected state.
2026-06-15 16:38:09 +01:00
- `VoidBot:prompts/repo-Persona-turn-interpreter.prompt.md` : names the
2026-05-27 12:43:44 +01:00
Interpreter as parent Mind and requires route/retry/drop plus structured
side effects.
2026-06-15 16:38:09 +01:00
- `VoidBot:scripts/run-repo-Persona-heartbeats.ts` : runs projection as
2026-05-27 12:43:44 +01:00
`organ: "imagination"` in read-only mode, rejects leaky memory surfaces, keeps
raw transcript evidence oldest-to-newest, includes visible chronology, exports
recent repo activity read-only, and keeps pronoun guidance deterministic so
Imagination cannot accidentally omit it.
2026-06-15 16:38:09 +01:00
Audit implication for Epiphany: `persona_turn.rs` has the right first boundary but
2026-05-27 12:43:44 +01:00
is still too thin. It lacks deterministic human pronoun guidance, channel label
resolution, visible chronology, media attachment awareness, retry/drop
semantics, projection model receipts, and explicit leakage rejection as strong
as Void's `rejectLeakyMemorySurface` .
## Audit Findings
### 1. Contract Names Exist Before Contract Execution
2026-05-28 22:50:50 +01:00
Mind, Substrate Gate, and Eyes have type constants, CultMesh policy documents, and
2026-05-27 12:43:44 +01:00
runtime-spine advertisement. They are not yet the mandatory runtime path.
Workers can still be launched and accepted through older bridge/service flows
without every substrate touch, evidence claim, or state mutation passing through
a real receipt chain.
Required correction: turn contract families into executable gates.
2026-05-28 22:50:50 +01:00
### 2. Substrate Gate/Eyes/Mind Are Correctly Split But Not Yet Chained
2026-05-27 12:43:44 +01:00
The desired chain is:
```text
Need fact or action
-> Self routes
2026-05-28 22:50:50 +01:00
-> Substrate Gate grants scoped substrate access
2026-05-27 12:43:44 +01:00
-> Eyes packages inspected evidence when truth is needed
-> Imagination projects options or scenes when future/personhood is needed
-> Hands executes bounded action when mutation is needed
-> Soul verifies result/invariant
-> Mind admits durable state
2026-05-29 00:09:40 +01:00
-> Continuity preserves continuity
2026-05-27 12:43:44 +01:00
```
Today the chain is documented, not structurally unavoidable.
2026-05-29 00:09:40 +01:00
### 3. Hands, Soul, and Continuity Have First-Class Contract Catalogs
2026-05-27 12:43:44 +01:00
2026-05-27 16:00:41 +01:00
The contract set now names the gates around action, verification, and
continuity:
2026-05-27 12:43:44 +01:00
2026-05-27 16:00:41 +01:00
- Hands has action intent/review plus command, patch, commit, PR, rollback, and
refusal receipts.
- Soul has verification request plus invariant check, verdict, regression,
review, and refusal receipts.
2026-05-29 00:09:40 +01:00
- Continuity has continuity packet plus compaction checkpoint, sleep distillation,
2026-05-27 16:00:41 +01:00
recovery, stale-turn repair, and continuity refusal receipts.
2026-05-27 12:43:44 +01:00
2026-05-27 16:00:41 +01:00
Runtime-spine advertises those contracts and CultMesh persists Verse-scoped
2026-05-27 16:13:05 +01:00
policy documents for each. The first executable pressure slice is landed:
worker launch packets now carry an `EpiphanyLaunchOrganContract` derived from
authority scope, launch document kind, and output contract id. That contract
2026-05-30 01:28:32 +01:00
carries the full standing sub-agent dependency matrix, a receipt document
catalogue, and effect-specific proof profiles for state admission, evidence
promotion, repo action, verification, and continuity recovery. Role/reorient
acceptance now refuses completed runtime-spine findings if the original launch
request is missing, document-kind mismatched, or lacks a state-admission proof
2026-05-30 01:35:41 +01:00
profile requiring Mind review. Acceptance now evaluates claimed effects through
those profiles, rereads the persisted Mind gateway review from runtime-spine,
and enforces that available proof. Mind's first executable proof chain is now
2026-05-30 01:28:32 +01:00
persisted: acceptance writes `epiphany.mind.gateway_review` before state
admission and `epiphany.mind.state_commit_receipt` after admission with the
2026-05-30 01:43:01 +01:00
resulting state revision. Research acceptance also emits a typed
`epiphany.eyes.evidence_packet` from its accepted Eyes-shaped statePatch,
persists it in runtime-spine, rereads it, and enforces Eyes packet proof for the
2026-05-30 01:51:26 +01:00
evidence-promotion profile. Research launches now also persist a typed
Substrate Gate read/snapshot access grant, and Research acceptance enforces that
2026-05-30 01:58:27 +01:00
grant before admitting evidence-shaped state. Verification acceptance emits a
typed `epiphany.soul.verdict_receipt` , persists/rereads it through
runtime-spine, and enforces Soul verdict proof before Mind admits
2026-05-30 02:07:02 +01:00
verification-shaped state. Reorient acceptance emits a typed
`epiphany.continuity.recovery_receipt` , persists/rereads it through
runtime-spine, and enforces Continuity recovery proof before Mind admits
2026-06-02 14:31:41 +01:00
recovery-shaped state. Hands now has a first executable runtime-spine proof
chain for action documents: `HandsActionIntent` -> `HandsActionReview` ->
2026-06-02 14:42:47 +01:00
`HandsPatchReceipt` plus typed command and commit receipts can be persisted and
reread from the runtime store, and `epiphany-hands-action-smoke` proves the
chain without executing a patch, command, or commit. The repo-action proof
profile now requires the full Hands intent/review/patch chain before promotion,
2026-06-02 14:36:40 +01:00
not only a patch receipt.
2026-06-02 14:31:41 +01:00
Remaining weakness: live implementation edits, commands, commits, and PRs still
do not have to pass through that Hands chain before action promotion, and the
current Mind state mutation plus post-commit receipt is not a single transaction
yet.
2026-05-27 12:43:44 +01:00
### 4. Self Still Shares A Throne With Compatibility Plumbing
Coordinator policy is much cleaner, but Codex-compatible route edges still
shape parts of the living workflow. The Perfect Machine needs Self as a typed
router over CultNet/CultMesh contracts, not a half-native coordinator behind a
JSON-RPC organ.
2026-05-27 14:47:23 +01:00
### 5. CultMesh/CultLib Local Dependency Was Broken
2026-05-27 12:43:44 +01:00
2026-05-27 14:47:23 +01:00
`epiphany-core` previously pointed at:
2026-05-27 12:43:44 +01:00
```toml
cultcache-rs = { path = "../../CultLib/crates/cultcache-rs" }
cultmesh-rs = { path = "../../CultLib/crates/cultmesh-rs" }
cultnet-rs = { path = "../../CultLib/crates/cultnet-rs" }
```
This checkout has `E:\Projects\CultLib` but no `crates` directory, so cargo
2026-05-27 14:47:23 +01:00
checks failed before reaching the new code. This was a Body-level substrate
wound: the Rust dependency body described by the map did not exist at the path
the machine used.
2026-05-27 12:43:44 +01:00
2026-05-27 14:47:23 +01:00
Correction landed: Epiphany now compiles against repo-contained vendored crates:
```toml
cultcache-rs = { path = "../vendor/cultcache-rs" }
cultmesh-rs = { path = "../vendor/cultmesh-rs" }
cultnet-rs = { path = "../vendor/cultnet-rs" }
```
`vendor/cultmesh-rs` is a small Rust facade over vendored CultCache and CultNet.
It owns document-set registration plus local typed node operations
(`put` /`get` /`get_required` /`delete` /`flush` ) for now. Vendored CultCache also
reads and writes the `cultcache.store.v1` snapshot format used by the current
state ledgers. This keeps Epiphany's body self-contained while preserving
CultMesh as the ergonomic local store surface.
2026-05-27 12:43:44 +01:00
2026-06-15 16:38:09 +01:00
### 6. Persona Prompting Is Directionally Correct But Behind Void
2026-05-27 12:43:44 +01:00
2026-06-15 16:38:09 +01:00
Epiphany's Persona loop now says `Imagination Projector -> Persona -> Mind
2026-05-27 12:43:44 +01:00
Interpreter`, but Void has the stronger living practice:
- state projector is model-owned, not deterministic prose assembly
- projection runs read-only with model/output receipts
- leaked schema/prompt construction language is rejected
- raw transcript and chronology stay raw and oldest-to-newest
- deterministic pronoun guidance sits outside projection
2026-06-15 16:38:09 +01:00
- channel labels are resolved through Persona permissions before posting
- interpreter can retry one Persona pass when correction uptake or doctrine fails
2026-05-27 12:43:44 +01:00
Epiphany should port that shape, not the exact TypeScript machinery.
## Path To The Perfect Machine
### Phase 0: Repair The Rust Body
2026-05-27 14:47:23 +01:00
Goal: make the existing contracts buildable again. Status: landed for the local
repo-contained dependency body.
2026-05-27 12:43:44 +01:00
2026-05-27 14:47:23 +01:00
- Audited the CultLib/CultCache/CultNet/CultMesh repo layout.
- Chose the repo-contained vendored Rust dependency source.
- Updated dependency paths away from the dead `CultLib/crates` layout.
- Added `vendor/cultmesh-rs` as the local CultMesh facade.
- Ran the previously blocked focused surface through:
2026-06-15 16:38:09 +01:00
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib persona_turn`
2026-05-27 12:43:44 +01:00
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib mind_gateway`
2026-05-28 22:50:50 +01:00
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib substrate_gate`
2026-05-27 12:43:44 +01:00
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib eyes_gateway`
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib cultmesh_integration`
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib runtime_spine::tests::runtime_spine_emits_cultnet_hello_frame`
Definition of done: contract code compiles against the intended Rust substrate
2026-05-27 14:47:23 +01:00
without local path superstition. Verification: `cargo test --manifest-path
.\vendor\cultmesh-rs\Cargo.toml` and ` cargo test --manifest-path
.\epiphany-core\Cargo.toml --lib` pass.
2026-05-27 12:43:44 +01:00
### Phase 1: Make The Gates Executable
Goal: no worker output, repo touch, or evidence claim bypasses the appropriate
organ.
2026-05-28 22:50:50 +01:00
- Implement Substrate Gate access request/review/grant/refusal documents in CultCache.
2026-05-27 12:43:44 +01:00
- Route retrieval, indexing, file edit, shell command, Rider, and Unity bridge
2026-05-28 22:50:50 +01:00
operations through Substrate Gate access receipts.
2026-05-27 12:43:44 +01:00
- Implement Eyes evidence request/review/packet/refusal documents in CultCache.
- Require Eyes packets for claims promoted into Mind state proposals when the
claim depends on inspected source.
2026-05-30 01:21:33 +01:00
- Landed first slice: role/reorient acceptance persists Mind gateway reviews
before state mutation and Mind state-commit receipts after state mutation.
This is proof, not yet a single transactional admission primitive.
- Convert existing role/reorient acceptance to one Mind-owned state-admission
primitive when the storage layer can atomically pair mutation and commit
receipt.
2026-05-27 12:43:44 +01:00
Definition of done: the old direct paths cannot produce repo mutation,
evidence promotion, or durable state mutation without the corresponding typed
receipt.
2026-05-29 00:09:40 +01:00
### Phase 2: Give Hands, Soul, And Continuity Their Own Contracts
2026-05-27 12:43:44 +01:00
Goal: action, verification, and continuity stop hiding behind neighbors.
2026-05-27 16:00:41 +01:00
Status: first contract catalog slice landed.
2026-05-27 12:43:44 +01:00
2026-05-27 16:00:41 +01:00
- Hands contracts landed:
2026-05-27 12:43:44 +01:00
- `epiphany.hands.action_intent`
- `epiphany.hands.command_receipt`
- `epiphany.hands.patch_receipt`
- `epiphany.hands.commit_receipt`
2026-05-27 16:00:41 +01:00
- `epiphany.hands.pr_receipt`
2026-05-27 12:43:44 +01:00
- `epiphany.hands.rollback_receipt`
2026-05-27 16:00:41 +01:00
- Soul contracts landed:
2026-05-27 12:43:44 +01:00
- `epiphany.soul.verification_request`
- `epiphany.soul.invariant_check`
- `epiphany.soul.verdict_receipt`
- `epiphany.soul.regression_receipt`
2026-05-27 16:00:41 +01:00
- `epiphany.soul.review_receipt`
2026-05-29 00:09:40 +01:00
- Continuity contracts landed:
- `epiphany.continuity.packet`
- `epiphany.continuity.compaction_checkpoint`
- `epiphany.continuity.sleep_distillation`
- `epiphany.continuity.recovery_receipt`
- `epiphany.continuity.stale_turn_repair`
2026-05-27 12:43:44 +01:00
Definition of done: action, verification, and continuity have the same typed
2026-05-28 22:50:50 +01:00
contract dignity as Mind/Substrate Gate/Eyes, and every worker launch carries the
2026-05-27 16:13:05 +01:00
organ-dependency/receipt contract that later gates can enforce. Verification:
`cargo test --manifest-path .\epiphany-core\Cargo.toml --lib` and `cargo run
--manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-smoke` pass
for the catalog slice; the launch-contract slice is verified by `cargo test
--manifest-path .\epiphany-core\Cargo.toml --lib`. The attempted bridge crate
verification is currently blocked before local code by an upstream
`starlark_map` /`hashbrown` `Allocative` dependency conflict.
Next step: make the launch-carried receipt expectations executable in the live
worker/action/verification and compaction paths.
2026-05-27 12:43:44 +01:00
2026-06-15 16:38:09 +01:00
### Phase 3: Port Void's Persona Prompting Shape Properly
2026-05-27 12:43:44 +01:00
2026-06-15 16:38:09 +01:00
Goal: Persona becomes a living public organ without stealing authority.
2026-05-27 12:43:44 +01:00
2026-06-15 16:38:09 +01:00
- Replace `PersonaProjectorInput` with an Imagination projector packet that carries
2026-05-27 12:43:44 +01:00
typed state, affect, memory, social topology, repo activity, semantic
attractors, curiosity hints, and dependency pressure.
- Add deterministic sections outside projected state:
- raw transcript, oldest-to-newest
- visible chronology across rooms/surfaces
- human pronoun guidance
- channel label/permission policy
- media attachment awareness
2026-05-28 22:50:50 +01:00
- recent home-repo activity from Substrate-Gate-scoped reads
2026-05-27 12:43:44 +01:00
- Make projection model-owned and read-only, with model output receipts.
- Strengthen projection leakage rejection: no schema words, repo paths, prompt
construction language, grants/jurisdictions slurry, or direct action syntax.
- Upgrade Mind Interpreter output from simple effect blocks to:
- correction check
- doctrine/coherence check
- decision: route/retry/drop
- structured memory/affect/social/speech effects
- retry limit
2026-06-15 16:38:09 +01:00
- Ensure public speech resolves Persona-local channel labels through permissions
2026-05-27 12:43:44 +01:00
before delivery.
2026-06-15 16:38:09 +01:00
Definition of done: Persona can be prompted by Aquarium/Discord/CultNet and the
2026-05-27 12:43:44 +01:00
public result is natural, contextual, permission-aware, retryable, and unable to
mutate state or post without parent routing.
### Phase 4: Move Self Fully Onto CultNet/CultMesh
Goal: Self routes organ work through typed contracts, not legacy JSON-RPC
comfort tunnels.
- Add Self routing contracts for choosing next organ, required dependencies,
and allowed authority.
2026-05-27 16:13:05 +01:00
- Landed: role, generic, and reorient worker launch packets declare authority
scope, launch document kind, output contract id, owner organ, full organ
2026-05-29 00:09:40 +01:00
dependency matrix, and required Substrate Gate/Eyes/Hands/Soul/Continuity/Mind receipts.
2026-05-27 16:17:13 +01:00
- Landed: role/reorient acceptance refuses completed runtime-spine findings
when the original worker launch request is missing, mismatched by document
2026-05-30 01:28:32 +01:00
kind, or lacks a state-admission proof profile requiring Mind review.
2026-05-30 01:21:33 +01:00
- Landed: role/reorient acceptance persists Mind review/commit receipts around
durable state admission.
2026-05-30 01:28:32 +01:00
- Landed: launch contracts split the broad receipt catalogue from effect-specific
proof profiles, so the machine does not demand every organ receipt for every
result.
2026-05-30 01:35:41 +01:00
- Landed: acceptance evaluates claimed effect types against runtime-spine
receipt availability, enforces the currently live Mind gateway-review proof,
and defers unavailable non-Mind producer gaps instead of using them as false
blockers.
2026-05-30 01:43:01 +01:00
- Landed: accepted Research findings produce and enforce typed Eyes evidence
packets for the evidence-promotion proof profile.
2026-05-30 01:51:26 +01:00
- Landed: Research launches produce and enforce typed Substrate Gate
read/snapshot grants, closing the Research evidence-promotion chain through
Substrate Gate -> Eyes -> Mind.
2026-05-30 01:58:27 +01:00
- Landed: Verification acceptance produces and enforces typed Soul verdict
receipts before Mind admission.
2026-05-30 02:07:02 +01:00
- Landed: Reorient acceptance produces and enforces typed Continuity recovery
receipts before Mind admission.
2026-06-02 14:31:41 +01:00
- Landed: first Hands action receipt spine. `HandsActionIntent` ,
2026-06-02 14:42:47 +01:00
`HandsActionReview` , `HandsPatchReceipt` , `HandsCommandReceipt` , and
`HandsCommitReceipt` are typed runtime-spine documents with put/get helpers
and `epiphany-hands-action-smoke` coverage; the repo-action proof profile
requires intent, review, and patch receipt before promotion.
2026-06-02 14:31:41 +01:00
- Next: connect live implementation edits/commands/commits to the Hands action
chain, or collapse Mind review/state mutation/commit into one storage-owner
admission primitive.
2026-05-27 12:43:44 +01:00
- Make Aquarium read the contract catalog and available receipts instead of
hard-coding the route zoo.
- Starve `codex_message_processor` down to Codex auth/model transport and
compatibility emission only.
Definition of done: a local run can be inspected as a chain of CultNet/CultMesh
documents from operator request to final response.
### Phase 5: Runtime Physiology
Goal: the machine runs as an organism.
- Heartbeat scheduler wakes organs by initiative, pending pressure, and
completion-gated cooldown.
- Active turns freeze initiative until receipt completion.
2026-05-29 00:09:40 +01:00
- Sleep distills rumination through Continuity and Mind.
- Stale active turns get Continuity recovery receipts.
2026-05-27 12:43:44 +01:00
- Public/global Verse material enters as thought weather, then Eyes/Mind review
before adoption.
Definition of done: unattended operation can pause, recover, explain current
pressure, and preserve memory without transcript worship or hidden loops.
### Phase 6: Aquarium As Inspectable Nervous System
Goal: make the organism visible without making the UI a second truth.
- Display organ dependency graph.
- Display contract catalog by organ.
- Display receipt chains per turn.
2026-06-15 16:38:09 +01:00
- Display Persona prompt packet boundaries: deterministic evidence, Imagination
projection, Persona natural turn, Mind interpretation.
2026-05-29 00:09:40 +01:00
- Display Substrate Gate grants, Eyes packets, Hands actions, Soul verdicts,
Continuity receipts, and Mind state commits.
2026-05-27 12:43:44 +01:00
Definition of done: a human can ask "why did you touch that file / say that /
remember that?" and see the typed path.
## Perfect Machine Target
The Perfect Machine is not more prompts and not more bureaucracy. It is a
coherent authority graph:
```text
Self routes.
2026-05-28 22:50:50 +01:00
Substrate Gate grants substrate access.
2026-05-27 12:43:44 +01:00
Eyes certifies looked-at evidence.
Imagination projects possible scenes and futures.
2026-06-15 16:38:09 +01:00
Persona speaks as a person.
2026-05-27 12:43:44 +01:00
Hands changes the world.
Soul verifies promises and invariants.
2026-05-29 00:09:40 +01:00
Continuity preserves continuity across rupture.
2026-05-27 12:43:44 +01:00
Mind admits durable state.
CultMesh carries the local typed Verse surfaces.
CultNet carries wire contracts.
CultCache preserves the typed documents.
Codex remains only model/auth transport until it can be replaced or minimized.
```
When this is real, no organ can steal the throne. The machine can act, speak,
remember, doubt, recover, and be inspected without turning connection into mush.