Document Epiphany Body proprioception

This commit is contained in:
Meta Vens 2026-06-09 01:46:52 +01:00
commit 916d0783b1
4 changed files with 626 additions and 0 deletions

View file

@ -0,0 +1,385 @@
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{longtable}
\usepackage{array}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{microtype}
\DeclareUrlCommand{\code}{\urlstyle{tt}}
\newcommand{\bodyterm}[1]{\textbf{#1}}
\emergencystretch=3em
\sloppy
\setlist[itemize]{leftmargin=1.5em}
\setlist[enumerate]{leftmargin=1.5em}
\titleformat{\section}{\Large\bfseries}{\thesection}{0.8em}{}
\titleformat{\subsection}{\large\bfseries}{\thesubsection}{0.8em}{}
\title{Epiphany's Body: A Proprioception Whitepaper}
\author{GameCult / EpiphanyAgent}
\date{June 9, 2026}
\begin{document}
\maketitle
\begin{abstract}
Epiphany is an opinionated Codex-derived agent substrate built around a hard
requirement: the model must model the thing it changes. This whitepaper maps
Epiphany's \bodyterm{Body}: the repository, Rust crates, vendored bridge
machinery, typed state stores, schema catalog, runtime binaries, protocol
surfaces, operator artifacts, and external interface boundaries through which
Epiphany senses and acts. The map is written from the Proprioception faculty:
not as product copy, not as lore, but as an architecture overview whose owner,
input, output, invariant, and cut lines remain inspectable.
\end{abstract}
\section{Definition}
In Epiphany doctrine, the Body is the substrate Epiphany acts through and
senses: repository files, tools, runtime state, prompts, logs, interfaces,
permissions, hosted systems, and editor/runtime bridges. Body is not Mind. Body
is changed and sensed; Mind admits durable state. Proprioception is the faculty
that models the Body: architecture, dataflow, seams, constraints, invariants,
and the difference between the map and the substrate.
The practical definition in this repository is:
\begin{itemize}
\item the root checkout at \code{E:\Projects\EpiphanyAgent};
\item Epiphany Rust crates such as \code{epiphany-core}, \code{epiphany-state-model}, \code{epiphany-codex-bridge}, model/tool adapters, and OpenAI transport crates;
\item vendored substrate in \code{vendor/codex}, \code{vendor/cultcache-rs}, \code{vendor/cultnet-rs}, and \code{vendor/cultmesh-rs};
\item typed state stores under \code{state/};
\item schemas under \code{schemas/cultnet/};
\item local operator scripts and generated witness artifacts;
\item adjacent service/client bodies: Aquarium, Odin/Gjallar, Eve/CultUI, Bifrost, VoidBot, Rider, Unity, Discord, and future GameCult Verse hosts.
\end{itemize}
\section{Executive Map}
Epiphany's current Body is a hybrid machine in transition. Its center of gravity
has moved into typed Rust/CultCache organs, but compatibility arteries still
run through vendored Codex. The live target is not a cleaner pile of Codex
routes. The target is an Epiphany-native CultCache/CultMesh/CultNet body with a
relatively vanilla Codex-derived reliquary retained for OpenAI subscription
auth and model transport.
\begin{longtable}{>{\raggedright\arraybackslash}p{0.23\linewidth}>{\raggedright\arraybackslash}p{0.32\linewidth}>{\raggedright\arraybackslash}p{0.35\linewidth}}
\textbf{Body Region} & \textbf{Current Owner} & \textbf{Invariant} \\
\hline
Durable thread state & \code{epiphany-state-model}, \code{epiphany-core} & State shape is typed; prompt rendering is a projection, not authority. \\
Domain policy & \code{epiphany-core} & Verdicts, launch policy, acceptance rules, runtime lifecycle, and mutation law live here, not in bridge DTOs. \\
Compatibility bridge & \code{epiphany-codex-bridge} & Translate Codex edge shapes; never become a second policy throne. \\
Vendored Codex & \code{vendor/codex} & Retain host/app-server/auth/model compatibility where useful; do not let Codex own Epiphany prompts, scheduler, or state. \\
Runtime spine & \code{epiphany-core/src/runtime_spine.rs} and \code{state/runtime-spine.msgpack} & Runtime identity, jobs, events, receipts, tool/model documents are typed CultCache records. \\
Organ memory & \code{state/agents.msgpack}; agent-memory CLI & Resident work organs use lean work-organ state; Persona uses portable Persona state. \\
Heartbeat physiology & \code{state/agent-heartbeats.msgpack} via \code{epiphany-heartbeat-store} & Scheduling, cooldown, rumination, routine, cognition lanes, and active-turn freeze are scheduler physiology, not project truth. \\
Local Verse & CultMesh over \code{state/local-verse.ccmp} & Local Verse context is compact prompt/operator context; private state does not become public by flipping a flag. \\
Schema catalog & \code{schemas/cultnet/index.json} & JSON schema publishes contracts; typed Rust documents remain runtime authority. \\
Operator artifacts & \code{.epiphany-*}, \code{tools/epiphany_local_run.ps1} & Artifacts witness and lower state; they do not become state owners. \\
\end{longtable}
\section{Repository Body}
The checkout has ten primary Epiphany Rust crates:
\begin{itemize}
\item \code{epiphany-core}: the main domain organ. It owns state-update
validation, launch documents, runtime spine, heartbeat, memory graph, Persona
projection, Substrate Gate, Mind, Eyes, Hands, Soul, Continuity, CultMesh
integration, surface derivation, smokes, and local operator binaries.
\item \code{epiphany-state-model}: the durable \code{EpiphanyThreadState}
type plus \code{render_epiphany_state}. This is the typed Mind surface that
prompt fragments and views read.
\item \code{epiphany-codex-bridge}: the translation layer between typed
Epiphany documents and vendored Codex JSON-RPC/app-server shapes. Its own
crate header states that it is a bridge, not an authority organ.
\item \code{epiphany-model-adapter}: provider-neutral model request, stream
event, receipt, and status documents.
\item \code{epiphany-openai-adapter}: OpenAI-shaped request/event/receipt and
status documents.
\item \code{epiphany-openai-auth-spine}: Codex-derived auth boundary over
\code{codex-login}. It preserves honest Codex-compatible credential and token
behavior rather than impersonating it from scratch.
\item \code{epiphany-openai-codex-spine}: model transport over vendored Codex
client machinery.
\item \code{epiphany-openai-runtime}: executable model runtime, including
\code{epiphany-model-runtime}.
\item \code{epiphany-tool-adapter}: typed tool capability, invocation intent,
and invocation receipt documents.
\item \code{epiphany-tool-codex-mcp-spine}: quarantined Codex MCP adapter. It
consumes typed tool invocation intents and emits typed receipts; raw MCP JSON
remains adapter-edge cargo.
\end{itemize}
The vendored region contains:
\begin{itemize}
\item \code{vendor/codex}: the Codex-derived host and compatibility substrate.
It is tracked directly, not as a submodule.
\item \code{vendor/cultcache-rs}, \code{vendor/cultnet-rs}, and
\code{vendor/cultmesh-rs}: repo-contained Rust Cult substrate.
\end{itemize}
\section{State Body}
The \code{state/} directory is the local persistent body. The important stores
are:
\begin{longtable}{>{\raggedright\arraybackslash}p{0.30\linewidth}>{\raggedright\arraybackslash}p{0.60\linewidth}}
\textbf{Store} & \textbf{Role} \\
\hline
\code{state/map.yaml} & Canonical slow project map: objective, constraints, invariants, dataflow, active subgoals, current status, guardrails, and rejected paths. \\
\code{state/ledgers.msgpack} & CultCache-shaped evidence and branch ledger. Future behavior-changing lessons go here, not in an endless activity feed. \\
\code{state/agents.msgpack} & Organ self-memory and Persona projection source. Resident work organs use \code{work_organ}; public/person-shaped agents use \code{persona}. \\
\code{state/agent-heartbeats.msgpack} & Heartbeat initiative, cooldown, pending turns, cognition lanes, routine physiology, and scheduler pressure. \\
\code{state/runtime-spine.msgpack} & Runtime identity, sessions, jobs, job results, events, worker launch requests, role/reorient findings, receipts, model/tool documents, and schema catalog surfaces. \\
\code{state/thread-state.msgpack} & Native thread-state store. \\
\code{state/local-verse.ccmp} & Local CultMesh Verse context for compact operator and prompt-context packets. \\
\code{state/memory-graph.msgpack} & Local memory graph store. \\
\code{state/persona-discord.toml} & Persona Discord boundary configuration. \\
\code{state/void-memory.toml} & Void memory bridge configuration. \\
\code{state/scratch.md} and \code{state/scratch-compaction-*.md} & Scratch surfaces. Scratch is a workbench, not canonical memory. \\
\end{longtable}
Lock files sit beside several stores. Some local generated state is currently
untracked, including \code{state/local-verse.ccmp},
\code{state/memory-graph.msgpack}, and \code{.epiphany-character-loop/}.
\section{CultNet Schema Body}
The schema catalog in \code{schemas/cultnet/index.json} is the public nerve
chart. Current local grouping from the catalog is approximately:
\begin{itemize}
\item 10 agent-state schemas;
\item 5 heartbeat schemas;
\item 21 intent schemas;
\item 8 model/OpenAI schemas;
\item 3 tool schemas;
\item 6 runtime schemas;
\item 17 surface schemas;
\item 4 receipt/ledger schemas;
\item 7 other schemas.
\end{itemize}
The catalog includes runtime identity/session/job/event/result documents, model
requests and receipts, tool invocation intents and receipts, Persona and
work-organ state, heartbeat state, operator CultMesh documents, scene/freshness
/context/graph/pressure/reorient/roles/coordinator surfaces, Unity and Rider
bridge surfaces, Void memory, and repo-initialization documents.
The invariant is simple: schema JSON describes the contract. Load-bearing
runtime state should be typed Rust documents persisted through CultCache or
projected through CultMesh/CultNet. JSON may remain at hostile edges, schema
publication, sealed forensic artifacts, or named quarantine experiments.
\section{Runtime Spine}
\code{epiphany-core/src/runtime_spine.rs} is one of the main spinal cords of
the Body. It imports and registers:
\begin{itemize}
\item runtime identity, session, job, job-result, and event records;
\item worker launch requests and role/reorient worker result documents;
\item model adapter, OpenAI adapter, and tool adapter documents;
\item surface document types for scene, freshness, context, graph query,
pressure, reorient, CRRC, jobs, roles, role result, reorient result,
planning, coordinator, Persona, Void memory, repo initialization, repo birth
runner, Rider bridge, and Unity bridge;
\item organ receipts for Mind, Eyes, Hands, Soul, Continuity, and Substrate
Gate;
\item CultMesh operator status, snapshots, run intents, run receipts, Verse
policy, global room policy, and organ contract documents.
\end{itemize}
Runtime state is machinery telemetry. It is not project truth. Durable thread
state may link to runtime records through runtime links, but it must not mirror
or duplicate their lifecycle fields as a competing owner.
\section{Faculties And Protocol Machinery}
The embodied sub-agents are:
\begin{itemize}
\item \bodyterm{Self}: coordination, routing, authority boundaries.
\item \bodyterm{Persona}: public and social expression.
\item \bodyterm{Imagination}: futures, plans, objective drafts, projection.
\item \bodyterm{Eyes}: research, source inspection, evidence ingress.
\item \bodyterm{Proprioception}: internal model of Body shape, dataflow,
architecture, checkpoints, and seams.
\item \bodyterm{Hands}: commands, edits, commits, rollbacks, external action.
\item \bodyterm{Soul}: verification, invariants, ethics, falsification.
\end{itemize}
The machinery surfaces are:
\begin{itemize}
\item \bodyterm{Body}: substrate. It is sensed and changed; it does not decide.
\item \bodyterm{Mind}: persistent state and state admission.
\item \bodyterm{Continuity}: compaction, recovery, sleep, stale-turn repair,
and reorientation receipts.
\item \bodyterm{Substrate Gate}: scoped repository/substrate access.
\end{itemize}
Every embodied sub-agent depends on the other embodied sub-agents, but
dependency does not collapse ownership. A Persona turn, for example, should
move through Substrate-Gate-scoped facts, Mind state, social stimulus, organ
dependencies, Imagination as Projector, Persona as natural-language actor, and
Mind as Interpreter. None of those steps grants Persona hidden state authority.
\section{Bridge And Codex Reliquary}
\code{epiphany-codex-bridge} states its boundary plainly: it translates Codex
\code{ThreadEpiphany*} DTOs into Epiphany core documents, projects typed
Epiphany surfaces back into legacy Codex responses, and calls narrow host traits
while Codex still owns some thread persistence. It must not own verdicts,
launch policy, reorientation policy, acceptance rules, runtime-spine lifecycle,
or durable invariants.
The retained Codex body currently matters for:
\begin{itemize}
\item Codex-compatible auth identity and token refresh through
\code{codex-login};
\item OpenAI/Codex model transport through vendored client machinery;
\item useful app-server and streaming compatibility affordances while
Epiphany surfaces are still evacuating to native CultNet/CultMesh contracts.
\end{itemize}
The starvation doctrine is the deletion line: Codex may be a bridge and a
reliquary, but not Epiphany's prompt authority, state owner, scheduler, runtime
truth, operator API owner, or plugin marketplace brain.
\section{Operator And Interface Body}
Current operator access is partly native and partly witness-artifact based:
\begin{itemize}
\item \code{tools/epiphany_local_run.ps1} is the one-command local operator
wrapper.
\item Native binaries such as \code{epiphany-mvp-status},
\code{epiphany-mvp-coordinator}, \code{epiphany-verse-query},
\code{epiphany-operator-run}, \code{epiphany-operator-snapshot},
\code{epiphany-eve-surface}, \code{epiphany-runtime-spine},
\code{epiphany-heartbeat-store}, and \code{epiphany-agent-memory-store}
inspect or update typed state.
\item Local artifact directories such as \code{.epiphany-run/},
\code{.epiphany-dogfood/}, \code{.epiphany-smoke/},
\code{.epiphany-rumination/}, \code{.epiphany-gui/}, and
\code{.epiphany-character-loop/} witness work and lower typed state for
operator inspection.
\item Aquarium is the richer adjacent operator client. It should render and
steer typed state, not become a state owner.
\item Eve/CultUI is the intended GUI/TUI projection mechanism for typed
CultMesh surfaces.
\item Odin/Gjallar/Yggdrasil are the intended GameCult Verse discovery and
hosting organs for daemon affordances and important trusted Verses.
\end{itemize}
The service contract invariant is that status surfaces, dashboards, shell
wrappers, bridge adapters, app-server compatibility layers, and renderers must
read typed projections or emit typed command intents. They must not directly
mutate Epiphany truth.
\section{Primary Dataflows}
\subsection{State Rehydration And Prompt Projection}
Durable thread state lives as typed \code{EpiphanyThreadState}. On re-entry,
state is reconstructed from rollout/native state, then rendered into bounded
prompt-facing context through \code{render_epiphany_state}. Prompt injection is
read-only. If a model learns something from that prompt, admitting it back into
durable state requires an explicit update, proposal, promotion, role acceptance,
or other reviewed write path.
\subsection{View And Surface Projection}
Scene, jobs, freshness, context, graph query, planning, pressure, reorientation,
CRRC, roles, role result, reorient result, coordinator, Persona, bridge, and
environment surfaces are projections. Their job is to make typed state visible
and actionable. A projection does not own its inputs. A dashboard is a window,
not the vault.
\subsection{Worker Launch And Runtime Results}
Launch requests are typed documents. Runtime spine opens jobs, links them to
durable bindings, records model/tool activity, and stores results/receipts.
Role and reorientation findings remain reviewable until Mind and relevant gates
accept them. Implementation now routes through Hands-shaped branch-turn
constraints and should yield one branch/commit evidence slice before
Proprioception refresh.
\subsection{Tool Calls}
Tool use travels through typed capability, invocation intent, and invocation
receipt documents. The Codex MCP adapter is an external compatibility executor.
MCP's raw JSON belongs at that boundary; Epiphany's internal tool state is the
typed intent/receipt pair.
\subsection{Local Verse And Daemon Awareness}
Local Verse context is queried through CultMesh-backed state and can import
Gjallar daemon affordance summaries. The desired daemon path is Odin/Gjallar for
discovery, Eve/CultUI for inspection surfaces, CultMesh/CultNet for state and
commands, and provider-owned receipts for actions. MCP is not the native
GameCult daemon-control path.
\section{Invariants}
\begin{enumerate}
\item CultCache documents are the data model.
\item CultNet is the wire for Epiphany-controlled subsystems.
\item CultMesh is the preferred ergonomic local Verse and operator-store
layer over raw CultCache/CultNet.
\item JSON schema may publish the contract; generic JSON must not become
load-bearing internal state when both sides are Epiphany-owned.
\item Codex is retained for honest compatibility, especially OpenAI auth and
model transport. It must not become Epiphany's state/process/prompt owner.
\item Runtime state is machinery telemetry, not project truth.
\item Operator artifacts are witnesses, not owners.
\item Persona is public/person-shaped state; resident work organs use lean
work-organ state.
\item Heartbeat is scheduler physiology, not project truth.
\item Substrate Gate grants access; Eyes inspects evidence; Hands acts; Soul
verifies; Mind admits durable state; Self routes; Proprioception maps Body.
\end{enumerate}
\section{Current Gaps And Pressure}
The Body is coherent enough to inspect, but not finished:
\begin{itemize}
\item \code{thread/epiphany/*} JSON-RPC remains as a compatibility surface.
Native CultNet/CultMesh operator contracts are the desired authority.
\item \code{codex_message_processor.rs} still participates in routing and
response projection.
\item Some \code{serde_json::Value} and JSON payloads survive at ingress,
model output, schema, sealed artifacts, and quarantine seams. Each internal
blob needs a typed replacement or expiration rite.
\item Eve/CultUI publication is designed but not complete.
\item The local Verse and memory graph stores are useful local generated
state, but not tracked canonical repository content.
\item The persisted next action after this pass remains the non-ephemeral
Hands branch-turn smoke and Proprioception refresh proof.
\end{itemize}
\section{Conclusion}
Epiphany's Body is no longer a prompt style pasted onto Codex. It is a growing
typed substrate: Rust domain organs, CultCache stores, CultMesh local Verse
documents, CultNet schema contracts, runtime-spine receipts, heartbeat
physiology, memory graph state, model/tool adapter documents, and local
operator surfaces. The remaining danger is not absence of structure. It is
split authority: Codex host routes, JSON-RPC compatibility, JSON cargo, and
operator artifacts still trying to act like organs.
The purification path is therefore architectural, not cosmetic. Keep Codex as a
narrow auth/model/compatibility reliquary. Move Epiphany-owned state, scheduler
policy, prompt authority, worker lifecycle, operator surfaces, daemon discovery,
and action receipts through typed CultCache, CultMesh, CultNet, and Eve/CultUI.
That is the Body becoming legible enough to be trusted and sharp enough to keep
building.
\end{document}

View file

@ -0,0 +1,240 @@
# Epiphany Body Proprioception Pass
Date: 2026-06-09
Faculty: Proprioception.
Objective: map Epiphany's Body as it exists now: repository substrate, crates,
state stores, schema catalog, runtime surfaces, compatibility bridge, local
operator artifacts, and sibling/client boundaries. This is not an implementation
plan. It is a source-grounded body map for future work and for the TeX
whitepaper in `docs/epiphany_body_whitepaper.tex`.
## Working Definition
Epiphany's Body is the substrate Epiphany acts through and senses:
- repository files, Rust crates, vendored dependencies, scripts, prompts, and
schemas;
- typed CultCache/CultMesh/CultNet stores under `state/`;
- runtime binaries, smoke binaries, bridge binaries, and local wrapper scripts;
- vendored Codex host machinery retained for compatibility, auth, app-server,
and model transport;
- local operator artifacts under `.epiphany-*`;
- sibling/client surfaces such as Aquarium, Odin/Gjallar, Eve/CultUI, Unity,
Rider, VoidBot, Bifrost, and future GameCult Verse hosts.
Body is not Mind. Body is sensed and changed. Mind admits durable state.
Proprioception models Body shape so other faculties can act without touching
the altar blind.
## Canonical Sources Consulted
- `AGENTS.md`
- `state/map.yaml`
- `notes/fresh-workspace-handoff.md`
- `notes/epiphany-current-algorithmic-map.md`
- `notes/epiphany-fork-implementation-plan.md`
- `notes/epiphany-safety-architecture.md`
- `notes/epiphany-anatomy.md`
- `notes/organ-dependency-contracts.md`
- `notes/verse-service-contract.md`
- `notes/codex-starvation-and-cultnet-liberation-plan.md`
- `README.md`
- `epiphany-core/src/lib.rs`
- `epiphany-core/src/runtime_spine.rs`
- `epiphany-codex-bridge/src/lib.rs`
- `epiphany-state-model/src/lib.rs`
- `epiphany-model-adapter/src/lib.rs`
- `epiphany-openai-adapter/src/lib.rs`
- `epiphany-openai-auth-spine/src/lib.rs`
- `epiphany-openai-codex-spine/src/lib.rs`
- `epiphany-openai-runtime/Cargo.toml`
- `epiphany-tool-adapter/src/lib.rs`
- `epiphany-tool-codex-mcp-spine/Cargo.toml`
- `schemas/cultnet/index.json`
VoidBot indexed retrieval was used first for source orientation, then local
filesystem inspection confirmed the current checkout.
## Repository Body
The root body has these major organs:
- `epiphany-core`: the main Epiphany domain organ. It owns state policy,
launch documents, runtime-spine documents, heartbeat, memory graph, Persona,
Substrate Gate, Mind, Eyes, Hands, Soul, Continuity, CultMesh integration,
view/surface derivation, smokes, and local operator binaries.
- `epiphany-state-model`: the durable `EpiphanyThreadState` type and prompt
renderer. This is Mind-shaped state, not a bridge DTO.
- `epiphany-codex-bridge`: quarantine translation between typed Epiphany
documents and vendored Codex JSON-RPC/app-server shapes. Its own header says
it is not an authority organ.
- `epiphany-model-adapter`: provider-neutral model request, stream event,
receipt, and status CultCache documents.
- `epiphany-openai-adapter`: OpenAI-shaped model request, stream event, receipt,
and adapter status CultCache documents.
- `epiphany-openai-auth-spine`: Codex-derived auth reliquary over
`codex-login`; it preserves honest Codex-compatible auth behavior.
- `epiphany-openai-codex-spine`: model transport over vendored Codex client
machinery.
- `epiphany-openai-runtime`: executable model runtime; currently offers
`epiphany-openai-runtime` and provider-neutral `epiphany-model-runtime`.
- `epiphany-tool-adapter`: provider-neutral tool capability, invocation intent,
and invocation receipt documents.
- `epiphany-tool-codex-mcp-spine`: quarantined Codex MCP adapter. It executes
typed tool intents through Codex MCP and emits typed receipts.
- `vendor/codex`: vendored Codex host substrate. It is not a submodule.
- `vendor/cultcache-rs`, `vendor/cultnet-rs`, `vendor/cultmesh-rs`: repo-local
Rust Cult substrate.
- `schemas/cultnet`: JSON schema publication catalog for typed CultNet/CultCache
documents.
- `state`: canonical and working local state stores.
- `tools`: local wrapper scripts and rumination/run helpers.
- `notes`: current maps, doctrine, contract notes, and archived source history.
- `apps`, `integrations`, and `protocol`: product/client/plugin/interface
scaffolding that must not become durable state owners.
## State Body
`state/` currently contains:
- `map.yaml`: canonical slow machine map.
- `ledgers.msgpack`: distilled evidence and branch ledger.
- `agents.msgpack`: resident organ state and Persona projection source.
- `agent-heartbeats.msgpack`: heartbeat initiative and cognition physiology.
- `runtime-spine.msgpack`: runtime identity, sessions, jobs, job results,
events, receipts, tool calls, model calls, launch requests, and schema catalog
surfaces.
- `thread-state.msgpack`: native thread-state store.
- `local-verse.ccmp`: local CultMesh Verse context.
- `memory-graph.msgpack`: local memory graph store.
- `persona-discord.toml`: Persona Discord boundary configuration.
- `void-memory.toml`: Void memory bridge configuration.
- `scratch.md` and `scratch-compaction-*.md`: scratch and compaction emergency
context.
Lock files exist beside several stores. Generated local stores
`state/local-verse.ccmp`, `state/memory-graph.msgpack`, and
`.epiphany-character-loop/` are currently untracked.
## Schema Body
`schemas/cultnet/index.json` currently groups the catalog approximately as:
- 10 agent-state schemas;
- 5 heartbeat schemas;
- 21 intent schemas;
- 8 model/OpenAI schemas;
- 3 tool schemas;
- 6 runtime schemas;
- 17 surface schemas;
- 4 receipt/ledger schemas;
- 7 other schemas.
The catalog is a public nerve chart, not runtime ownership by itself. Runtime
ownership belongs to typed Rust documents and CultCache/CultMesh stores.
## Runtime And Surface Body
`epiphany-core/src/runtime_spine.rs` registers the typed runtime body:
- runtime identity/session/job/job result/event;
- worker launch request and role/reorient worker results;
- model and OpenAI adapter documents;
- tool capability/intent/receipt documents;
- surfaces for scene, freshness, context, graph query, pressure, reorient,
CRRC, jobs, roles, role result, reorient result, planning, coordinator,
Persona, Void memory, repo initialization, repo birth runner, Rider, and
Unity;
- organ receipts for Mind, Eyes, Hands, Soul, Continuity, and Substrate Gate;
- CultMesh operator status, snapshots, run intents, run receipts, policies, and
Verse contracts.
The native view/surface derivation modules live under
`epiphany-core/src/surfaces/`. They derive views from state; they do not own
state. That distinction is a load-bearing invariant.
## Faculty And Authority Map
The embodied sub-agents are:
- Self: coordination and routing.
- Persona: public/social expression.
- Imagination: future shape and projector work.
- Eyes: source inspection and evidence ingress.
- Proprioception: Body model, architecture, dataflow, seams, checkpoints.
- Hands: commands, edits, commits, PRs, external action.
- Soul: verification, ethics, invariants, falsification.
The machinery/protocol surfaces are:
- Body: substrate.
- Mind: persistent state and state admission.
- Continuity: compaction, sleep, recovery, stale-turn repair, reorientation.
- Substrate Gate: scoped repository/substrate access.
Every embodied sub-agent depends on the other embodied sub-agents, but
dependency does not collapse ownership. The Persona loop is:
```text
Substrate-Gate-scoped facts + Mind state + social stimulus + organ dependencies
-> Imagination Projector
-> Persona natural turn
-> Mind Interpreter
-> reviewed state effects / side effects / silence
```
## Bridge Body
`epiphany-codex-bridge` is explicitly a compatibility bridge. It translates
Codex `ThreadEpiphany*` DTOs into Epiphany core documents, projects typed
Epiphany surfaces back into legacy Codex responses, and calls narrow host traits
while Codex still owns some thread persistence. It must not own verdicts,
launch policy, reorientation policy, acceptance rules, runtime-spine lifecycle
semantics, or durable invariants.
The current liberation plan says Codex remains valuable for OpenAI subscription
auth/model transport and useful Codex app-server affordances, but not as
Epiphany's state/process/prompt owner.
## Operator And Client Body
Operator access currently exists through:
- `tools/epiphany_local_run.ps1`;
- native status/coordinator/Verse/operator snapshot binaries;
- `.epiphany-run/`, `.epiphany-dogfood/`, `.epiphany-smoke/`,
`.epiphany-rumination/`, `.epiphany-gui/`, and `.epiphany-character-loop/`
artifacts;
- future or adjacent Aquarium, Eve/CultUI, Odin/Gjallar, Bifrost, Unity,
Rider, Discord, and VoidBot surfaces.
Operator artifacts are witnesses unless they are typed CultCache/CultMesh
documents. Dashboards and wrappers must not become fact owners.
## Current Gaps
- `thread/epiphany/*` JSON-RPC remains a bridge compatibility surface rather
than the final native contract.
- `codex_message_processor.rs` still participates in routing and response
projection even after many authority cuts.
- Some JSON survives as schema, hostile ingress, model output, sealed artifact,
quarantine, or edge DTO cargo; each load-bearing internal blob should keep
moving toward typed documents.
- Eve/CultUI surface publication is designed but not complete.
- The non-ephemeral Hands branch-turn smoke remains the persisted next action
after this documentation pass.
- Local Verse and memory graph stores are untracked generated state, useful for
local runs but not canonical repo content.
## Proprioception Summary
Epiphany's Body is already partially native: core domain logic, runtime spine,
heartbeat physiology, state ledgers, memory graph, local Verse, model/tool
contracts, and CultMesh operator documents all exist as typed Rust/CultCache
surfaces. The remaining impurity is not lack of organs; it is ownership still
passing through the Codex host and JSON-RPC compatibility body. The coherent
direction is to keep Codex as a narrow auth/model/compatibility reliquary while
Epiphany's own state, scheduler, prompt authority, operator surfaces, and daemon
control move through CultCache, CultMesh, CultNet, and Eve/CultUI.

Binary file not shown.

View file

@ -75,6 +75,7 @@ active_subgoals:
- Use `notes/epiphany-verse-architecture.md` as the source note for local Verse/Odin/Yggdrasil prompt-context architecture. Odin is the all-seer discovery/coordinator surface for advertised Verse metadata, not a trust-boundary bypass. Yggdrasil is the hosted spine for important trusted GameCult Verses such as Bifrost. The first native local Verse query surface is `epiphany-verse-query`, which seeds/queries compact CultMesh policy/status/contract context for dynamic prompt assembly and operator inspection; it can also import `gjallar.affordance.v1` daemon affordances from an Odin/Gjallar CultMesh store so agents see provider-owned daemon inspection/action surfaces without MCP. `epiphany-prompt-context-smoke` proves that compact local Verse context plus a semantic memory graph context cut can render a bounded dynamic prompt packet, omit unrelated private-looking text, and preserve the packet inside a role worker launch document. Live bridge role/reorient launch paths now feed `dynamicPromptContext` from sibling `local-verse.ccmp` and `memory-graph.msgpack` stores beside runtime-spine, refreshing the memory graph from current typed thread-state repo graphs when absent; if `EPIPHANY_GJALLAR_AFFORDANCE_STORE` points at a Gjallar store, the launch context imports daemon affordances before rendering. The bridge launch-context test proves that packet survives into a persisted runtime-spine worker launch request. `tools/epiphany_local_run.ps1 -Mode status` now builds/calls `epiphany-verse-query` and writes `local-verse-context.json` beside native status and operator snapshot artifacts from `.epiphany-run/cultmesh/local-verse.ccmp`; it auto-detects the sibling Odin Gjallar store when present.
- The active priority is Codex starvation and CultNet liberation. Use `notes/codex-starvation-and-cultnet-liberation-plan.md` as the directive and `notes/codex-auth-spine-inventory.md` as the source-grounded keeper list for the retained OpenAI subscription auth/model transport bridge. Classify all Epiphany-relevant JSON contamination, define the native CultNet runtime boundary, keep worker launch/result/selfPatch cargo as typed documents, evacuate Epiphany operator/state/process authority from Codex JSON-RPC, and keep cutting until Epiphany can run its own state and processes without `codex_message_processor.rs` except for bridge compatibility. MCP remains an external compatibility edge only; GameCult daemon discovery/inspection/control should travel through Odin, Gjallar, Eve/CultUI, CultMesh, CultNet, and provider-owned command receipts.
- Use `notes/epiphany-anatomy.md` as the canonical anatomy map. Embodied sub-agents are Self, Persona, Imagination, Eyes, Proprioception, Hands, and Soul. Body is substrate, Mind is persistent state/state admission, Continuity is recovery/compaction/sleep protocol machinery, and Substrate Gate is substrate access protocol.
- Use `notes/epiphany-body-proprioception-pass.md` as the latest source-grounded Body map and `docs/epiphany_body_whitepaper.tex` as the polished TeX overview. Body currently spans the repo checkout, Epiphany Rust crates, vendored Codex/Cult substrate, typed `state/` stores, CultNet schema catalog, runtime-spine, heartbeat, memory graph, local Verse, operator artifacts, and sibling/client surfaces; the whitepaper records owner, input, output, invariant, bridge, and gap lines for future Proprioception work.
- Organ state now has a hard profile split: resident Epiphany sub-agents use lean `work_organ` state, public/person-shaped agents use portable `persona` state, and heartbeat/swarm machinery owns scheduling/coordination physiology. Persona is the Epiphany organ; Persona is the shared GameCult contract for Epiphany Persona, VoidBot repo Personas, and Ghostlight characters. Persona documents carry provenance, required public presentation metadata, `date-time` timestamps, typed `candidateActions`, strict anchored thoughts with non-authoritative extensions, custom enum companion labels, and typed affect subrecords for bonds/status reads/doctrine stances. Work organs must not inherit Persona affect/social-bond/status-read machinery just because the old Ghostlight-derived shape had room for it. The old public-organ path is not a compatibility alias: public/social authority now uses role id `persona`, surface document `epiphany.surface.persona`, artifact namespace `.epiphany-persona`, and action `personaBubble`; tracked Persona and heartbeat stores have been rebuilt/migrated so stale public-role/schema/artifact/action authority cannot decide state.
- The Eyes/source-gathering fork exposed by the Mom-ready MVP proof is now landed as a fixed Research lane owned by Eyes. The quarantined Codex MCP spine may execute typed tool intents and emit typed receipts; the model runtime can build and run provider-neutral follow-up turns from those receipts; coordinator run mode passes the quarantined tool adapter into worker runtime with auto-tools enabled by default; worker runtime now enforces max-runtime with one timeout close primitive for both tokio timeout and watchdog paths; inner `openai-worker-*` jobs are opened before async auth/stream waits and sealed with their outer worker on timeout; native status/roles/jobs/coordinator surfaces project failed and completed runtime-linked jobs as terminal without Codex prompt or scheduler authority; direct tiny model-turn transport succeeds; worker requests record request metrics, transport readiness, and sampled raw Responses frame kinds; worker prompts no longer prepend the full shared persistent-memory rite; stream deltas compact before durable storage; live MVP modeling workers complete instead of timing out; stale completed runtime links no longer block replacement launches; jobLaunch validates before opening runtime jobs; completed-but-unreviewable modeling findings now stop for review instead of relaunching the same blind lane; and completed unreviewable modeling findings with verdict `regather-needed` route to `LaunchResearch` instead of relaunching Proprioception. Research findings are accepted only when their statePatch is Eyes-shaped: observations, evidence, scratch, and optional investigationCheckpoint, with no graph/planning/objective authority.
- The GameCult integrated investment dossier at `E:\Projects\gamecult-site\docs\gamecult_integrated_dossier.tex` raises the Mom-ready bar from local demo to diligence-ready loop. Epiphany must be ready to prove Bifrost-first external work: a human/agent work item or topic originates in Bifrost, Epiphany decomposes and executes through bounded roles, maintainers review artifacts, Bifrost records receipts/credit, and operator-safe public evidence can be shown without exporting private worker/operator/agent context. The concrete readiness asks are fresh-repo Epiphany demo, Bifrost work item/topic/agent transport/receipt/ledger demo, compute spend and accepted-artifact metrics, and a security model for secrets, write permissions, and public/private exports. Discord, VoidBot, repo Personas, and ad hoc scripts must not become shadow governance or reward authorities.