From 0060cbbe4f377bcb7668dd0b0a38b02c1a79a8b8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 12 May 2026 22:34:41 +0100 Subject: [PATCH] Document Codex starvation directive --- ...-starvation-and-cultnet-liberation-plan.md | 275 ++++++++++++++++++ notes/epiphany-fork-implementation-plan.md | 114 +++++--- notes/fresh-workspace-handoff.md | 41 +-- state/ledgers.msgpack | Bin 68000 -> 68333 bytes state/map.yaml | 28 +- 5 files changed, 384 insertions(+), 74 deletions(-) create mode 100644 notes/codex-starvation-and-cultnet-liberation-plan.md diff --git a/notes/codex-starvation-and-cultnet-liberation-plan.md b/notes/codex-starvation-and-cultnet-liberation-plan.md new file mode 100644 index 00000000..f740151f --- /dev/null +++ b/notes/codex-starvation-and-cultnet-liberation-plan.md @@ -0,0 +1,275 @@ +# Codex Starvation And CultNet Liberation Plan + +This is the new foundation directive. + +The previous control-plane rebuild made Epiphany cleaner inside Codex. That was +useful, but it is no longer the target. The target is not a better parasite +inside the Codex organ. The target is Epiphany as its own CultCache/CultNet +machine, with Codex reduced to the smallest OpenAI subscription compatibility +reliquary that can authenticate and call models. + +No outward product, bridge, Aquarium, Face, dogfood, Unity, Rider, planning, or +personality work outranks this liberation pass unless the user explicitly +overrides it. + +## Objective + +Free Epiphany from heretek contamination: + +- runtime data is typed CultCache documents +- subsystem communication is CultNet typed messages and mutation contracts +- JSON exists only as schema description, wire compatibility at hostile edges, + or explicitly quarantined forensic/import material +- vendored Codex stops being a host brain and becomes an OpenAI auth/model-call + adapter + +## Current Mechanism + +The live machine still routes critical Epiphany work through the vendored Codex +host: + +- `vendor/codex/codex-rs/app-server/src/codex_message_processor.rs` owns broad + JSON-RPC request routing, thread lifecycle, plugin/app/skill/marketplace + handlers, MCP handling, Epiphany endpoint routing, view composition, role and + reorient launch/read/accept flows, notification emission, and a large pile of + Epiphany tests. +- `vendor/codex/codex-rs/core/src/codex_thread.rs` owns session-backed + Epiphany state update, launch, interrupt, rollout persistence, and OpenAI-era + thread machinery. +- Epiphany result and launch surfaces still carry generic `serde_json::Value` + at important seams such as role `selfPatch`, worker result parsing, + launch `input_json`, launch `output_schema_json`, bridge artifacts, and + cognition quarantine. +- `epiphany-core` owns many policies now, but it still exports to and imports + from Codex protocol/app-server shapes instead of sitting behind a native + CultNet service boundary. + +This is cleaner than the earlier Jenga pile. It is still the wrong organ. + +## Invariants + +- CultCache documents are the data model. A document may serialize, but it must + have a Rust type and a schema identity. +- CultNet is the wire protocol for Epiphany-controlled subsystems. +- JSON schema may describe a CultNet contract; generic JSON must not become the + internal data payload when both sides are ours. +- `serde_json::Value` is allowed only at: + - hostile/external ingress before immediate typed parsing + - schema catalog emission + - sealed forensic artifacts + - deliberately named quarantine experiments with an expiration path +- OpenAI subscription compatibility is the only long-term reason to preserve a + Codex-derived organ. +- Codex apps, skills, marketplace, broad app-server lifecycle, plugin UX, and + JSON-RPC surface sprawl are not Epiphany foundations. +- MCP support may survive, but as a separate CultNet-speaking adapter, not as a + reason to preserve the Codex app-server brain. + +## Essential Machinery + +Keep or extract: + +- OpenAI authentication/session compatibility needed for the user's Codex + subscription +- model request/response transport required to use that auth +- any model/tool streaming primitives that are truly cheaper to extract than + rewrite +- typed Epiphany domain state, runtime-spine, heartbeat, role memory, evidence, + planning, graph, checkpoint, and acceptance documents +- CultCache document storage and CultNet mutation/read contracts +- explicit permission, interruption, evidence, and review gates + +## Heretek Contamination + +Cut, replace, or quarantine: + +- `codex_message_processor.rs` as an Epiphany host brain +- Codex app/server APIs as the canonical Epiphany control plane +- Codex apps, skills, marketplace, and plugin UX in the Epiphany runtime path +- `thread/epiphany/*` JSON-RPC as the long-term operator contract +- launch `input_json` and `output_schema_json` as internal runtime cargo +- public or semi-public `serde_json::Value` `selfPatch` +- worker result `serde_json::Value` after ingress parsing +- bridge status blobs that should be typed CultCache documents +- cognition `Value` fields that outlive their quarantine receipt role +- tests that prove accidental Codex mapper anatomy instead of CultNet document + contracts + +## Target Architecture + +```text +Epiphany native runtime +-> typed CultCache documents +-> CultNet read / mutation / event contracts +-> OpenAI subscription auth adapter +-> OpenAI model transport +``` + +Codex becomes: + +```text +OpenAIAuthAdapter +OpenAIModelTransport +LegacyCodexImportBridge, only if needed +``` + +The adapter may know how to refresh credentials and submit model calls. It must +not own Epiphany state, scheduling, view derivation, worker lifecycle, +operator APIs, plugin UX, app discovery, marketplace state, or document truth. + +## Ranked Liberation Plan + +### 1. Codex Organ Inventory + +Map the smallest Codex auth/model-call path: + +- credential storage and refresh +- account/subscription checks +- model provider config +- Responses API request construction +- streaming response handling +- error/rate-limit handling + +Output: `notes/codex-auth-spine-inventory.md` with keep/cut/extract verdicts. + +Success: every retained Codex dependency is justified by OpenAI subscription +compatibility or model transport. + +### 2. JSON Contamination Ledger + +Classify every Epiphany-relevant `serde_json::Value`, `json!`, +`from_value`, and `to_value` use: + +- schema/wire descriptor +- hostile ingress awaiting typed parse +- sealed forensic artifact +- quarantine experiment +- heretek internal blob + +Output: `notes/json-contamination-ledger.md`. + +Success: each internal blob has a typed document replacement target or a named +expiration rite. + +### 3. Native CultNet Runtime Boundary + +Define an Epiphany-native runtime crate/binary boundary that can: + +- open a CultCache-backed session +- read and write typed documents +- advertise CultNet schema and mutation contracts +- route typed intents to runtime-spine, heartbeat, memory, planning, graph, + evidence, checkpoint, retrieval, and coordinator organs +- call the OpenAI adapter for model turns + +Success: a minimal native runtime can serve/read a typed status document +without `codex_message_processor.rs`. + +### 4. Typed Worker Intents And Findings + +Replace generic launch/result cargo with typed documents: + +- `EpiphanyWorkerLaunchIntent` +- `EpiphanyWorkerInputDocument` +- `EpiphanyWorkerOutputContract` +- `EpiphanyRoleFindingDocument` +- `EpiphanySelfPatchDocument` +- `EpiphanyStatePatchDocument` +- `EpiphanyAcceptanceReceipt` + +Success: worker ingress may parse model JSON once, but internal launch, +finding, self-memory, and acceptance flow uses typed CultCache documents. + +### 5. Evacuate Operator Surfaces From Codex JSON-RPC + +Move operator reads/actions from `thread/epiphany/*` to CultNet contracts: + +- state read/update +- view lenses +- runtime launch/read/interrupt +- result accept/refuse +- retrieval/index/query +- checkpoint/CRRC/coordinator actions +- role memory and heartbeat actions + +Old JSON-RPC endpoints become compatibility wrappers only while named consumers +still need them. + +Success: Aquarium and CLI status can operate through CultNet without the Codex +app-server. + +### 6. Split MCP From Codex + +Keep MCP capability only as a separate adapter: + +- MCP tool/resource discovery becomes typed capability documents +- MCP calls become CultNet tool invocation intents and receipts +- raw MCP JSON content is parsed or sealed at the adapter boundary + +Success: MCP no longer justifies retaining Codex app-server/plugin organs. + +### 7. Starve `codex_message_processor.rs` + +Remove Epiphany dependence from the giant host file in slices: + +- no Epiphany view composition +- no Epiphany launch/result/accept routing +- no Epiphany policy tests +- no Epiphany schema ownership +- no Epiphany notification authority + +Success: Epiphany can run without `codex_message_processor.rs`; any remaining +use is legacy compatibility or auth-adjacent Codex behavior. + +### 8. Delete Or Seal Codex Apps/Skills/Marketplace + +Remove these from the Epiphany runtime path: + +- app connector surfaces +- skills marketplace/install UX +- plugin marketplace/add/remove +- broad app-server discovery machinery + +Success: Epiphany startup and operator flow do not load or depend on Codex app, +skill, plugin, or marketplace code. + +### 9. Codex Auth Adapter Extraction + +Extract or wrap only the OpenAI auth/model transport slice: + +- explicit module/crate boundary +- no Epiphany state imports +- no app-server imports +- no plugin/app/skill/marketplace imports +- no thread lifecycle authority + +Success: the adapter can authenticate with the user's Codex subscription and +submit a model request from an Epiphany-native runtime. + +## Stop Conditions + +Stop and redesign if a proposed change: + +- adds another JSON-RPC endpoint as the primary Epiphany surface +- passes `serde_json::Value` between Epiphany-owned subsystems +- preserves Codex app-server machinery because it is convenient +- treats app/skill/plugin/marketplace code as a foundation +- makes Aquarium depend on a Codex-only verb instead of a CultNet contract +- stores runtime lifecycle or worker findings outside typed CultCache documents +- claims a feature is complete while the Codex organ still owns its authority + +## First Slice + +Do not start by cutting random code. Map first. + +First concrete slice: + +1. create `notes/codex-auth-spine-inventory.md` +2. inventory Codex auth/model transport dependencies +3. create `notes/json-contamination-ledger.md` +4. classify Epiphany-relevant JSON uses +5. choose the first typed-document replacement, preferably `selfPatch` or + worker launch/result cargo + +No apps. No marketplace. No bridge candy. No fresh balcony on the contaminated +cathedral. diff --git a/notes/epiphany-fork-implementation-plan.md b/notes/epiphany-fork-implementation-plan.md index c40a49ad..a456b1e4 100644 --- a/notes/epiphany-fork-implementation-plan.md +++ b/notes/epiphany-fork-implementation-plan.md @@ -94,20 +94,36 @@ The landed machine now has: - live Phase 6 MVP status smoke coverage through native `epiphany-mvp-status-smoke` The current phase is Phase 6: reflection boundary and observable harness state. -The immediate next phase is foundation cleanup, recorded in -`notes/epiphany-architectural-teardown.md`, and the replacement blueprint is -`notes/epiphany-ideal-architecture-rebuild-plan.md`. The May 2026 suspicion -pass found that the app-server Epiphany control plane has become architectural -Jenga: policy, projection, lifecycle glue, prompt packet assembly, coordinator -sequencing, and tests are concentrated in the Codex host seam. Native-spine -extraction remains the direction, but the first duty is to rebuild/extract the -control plane so Codex app-server becomes an adapter again instead of the -machine's extra brain. +The immediate next phase is Codex starvation and CultNet liberation, recorded +in `notes/codex-starvation-and-cultnet-liberation-plan.md`. The May 2026 +control-plane rebuild made the app-server Epiphany seam cleaner, but the user's +current doctrine is stricter: a cleaner Codex host is still the wrong organ. +Epiphany data must live as typed CultCache documents, Epiphany-owned +subsystems must communicate through CultNet contracts, and vendored Codex must +shrink to the minimum OpenAI subscription auth/model-transport adapter. + +The older teardown/rebuild pair remains useful source history: +`notes/epiphany-architectural-teardown.md` names the host-seam rot, and +`notes/epiphany-ideal-architecture-rebuild-plan.md` records the completed +cleanup inside Codex. They no longer authorize outward product work while +Epiphany still depends on Codex app-server, apps, skills, marketplace, or +generic JSON cargo as internal machinery. ## Boundary Rules These boundaries are more important than the individual method names: +- CultCache documents are the data model. CultNet is the wire for + Epiphany-controlled subsystems. +- JSON is allowed only for schema description, hostile/external ingress before + immediate typed parsing, sealed forensic artifacts, or named quarantine + experiments with an expiration path. Generic `serde_json::Value` must not be + passed between Epiphany-owned organs as runtime data. +- Codex is a vestigial compatibility organ for OpenAI subscription auth and + model transport. Codex apps, skills, marketplace, app-server lifecycle, and + plugin UX are not Epiphany foundations. +- MCP may survive only as a separate CultNet-speaking adapter; it does not + justify preserving the Codex host brain. - `thread/epiphany/retrieve` is read-only. - `thread/epiphany/distill` is read-only. - `thread/epiphany/propose` is read-only. @@ -171,27 +187,30 @@ The plan should get shorter after a phase completes, not longer by default. The next unknown is not whether Epiphany can preserve, read, propose, promote, and notify typed state. It can. -The active priority is now the teardown/rebuild pair: -`notes/epiphany-architectural-teardown.md` and -`notes/epiphany-ideal-architecture-rebuild-plan.md`. Do not add outward feature -surfaces until the control-plane rebuild is underway. +The active priority is now the Codex starvation plan: +`notes/codex-starvation-and-cultnet-liberation-plan.md`. Do not add outward +feature surfaces until the auth/model spine and JSON contamination inventories +exist and the first typed-document replacement cut is underway. The next unknowns are: -- how to extract Epiphany view/coordinator policy from - `vendor/codex/codex-rs/app-server/src/codex_message_processor.rs` into - `epiphany-core` without breaking the existing operator contracts -- how to make runtime-spine the sole job/result lifecycle authority while - reducing `EpiphanyThreadState.job_bindings` to typed links or intents -- how to replace summary-string accepted-result matching with typed acceptance - receipts keyed by runtime result identity -- how to collapse endpoint proliferation into intentional view lenses and - mutation intents without hiding authority from Aquarium or the operator -- how to remove public `raw_result` leakage from normal role/reorient findings - while preserving explicit forensic debugging -- how to land the first reversible rebuild slice: `epiphany-core/src/surfaces/` - plus pressure view derivation moved into core behind the existing - `thread/epiphany/pressure` wrapper +- what exact vendored Codex crates, files, config, and runtime paths are needed + solely for OpenAI subscription auth and model transport +- which Codex dependencies can be deleted, ignored, or sealed because they are + apps, skills, marketplace, app-server UX, plugin plumbing, or thread + lifecycle machinery outside the OpenAI auth/model spine +- which Epiphany-relevant `serde_json::Value`, `json!`, `from_value`, and + `to_value` uses are legitimate schema/wire/forensic/quarantine edges and + which are heretek internal blobs +- how to replace worker launch `input_json` / `output_schema_json`, + role-result parsing, and `selfPatch` with typed CultCache documents +- how to expose state read/update, view lenses, runtime launch/read/interrupt, + result accept/refuse, retrieval, checkpoint, CRRC, coordinator, heartbeat, + and role-memory actions as CultNet contracts instead of Codex JSON-RPC verbs +- how to split MCP into a CultNet-speaking adapter without preserving Codex + app-server/plugin organs +- how to make Aquarium and CLI status use CultNet contracts instead of + `thread/epiphany/*` - what bridge surface is sufficient for the next Aetheria run: named Unity operations, Aetheria-side editor probes, GUI environment status, Rider context capture, and a Rider plugin MVP - how much controlled runtime/editor access the richer Unity bridge gives implementation and verification lanes before deeper engine probes need another slice - how the landed watcher-backed invalidation telemetry should be consumed without turning freshness into a secret worker @@ -326,29 +345,34 @@ work remains non-authoritative until the human explicitly adopts an objective. ## Phase 6 Direction -Phase 6 must stop growing observable harness state outward until the control -plane is purified. The live surfaces are guardrails and evidence, not -permission to keep stacking protocols on the host seam. +Phase 6 must stop growing observable harness state outward until Epiphany is +free of the Codex host organ. The previous control-plane cleanup is a landed +scar, not the final architecture. The live surfaces are guardrails and evidence, +not permission to keep stacking protocols on the host seam. -Cleanup candidates, in the intended migration order: +Liberation candidates, in the intended order: -1. Add `epiphany-core/src/surfaces/` and move pressure view derivation into - core while keeping the current app-server endpoint as a wrapper. -2. Move CRRC and fixed-lane coordinator policy out of - `codex_message_processor.rs` and into `epiphany-core`. -3. Add typed acceptance receipts keyed by runtime result id; then switch - already-accepted checks to receipts and delete summary-string matching. -4. Make runtime-spine the single lifecycle authority for launched jobs and - results; thread state may link to jobs but must not mirror the job table. -5. Reduce the scene/jobs/roles/freshness/context/planning/pressure/reorient/ - CRRC/coordinator sprawl into fewer deliberate lenses and mutation intents. -6. Remove normal public raw-result exposure from role/reorient finding - contracts; keep forensic raw payloads explicit and sealed. -7. Split stable heartbeat scheduling from experimental cognition receipt blobs. +1. Inventory the minimal Codex auth/model-call spine needed for the user's + Codex subscription. +2. Classify Epiphany-relevant JSON usage into schema/wire descriptor, hostile + ingress, sealed forensic artifact, quarantine experiment, or internal blob. +3. Define the native Epiphany runtime boundary over typed CultCache documents + and CultNet read/mutation/event contracts. +4. Replace worker launch/result/selfPatch cargo with typed document contracts. +5. Move Aquarium/CLI/operator reads and actions from `thread/epiphany/*` + JSON-RPC to CultNet contracts. +6. Split MCP into a CultNet adapter if it remains useful. +7. Starve `codex_message_processor.rs` until Epiphany no longer depends on it + for state, scheduling, runtime, views, acceptance, notifications, or tests. +8. Delete or seal Codex apps, skills, marketplace, and plugin UX from the + Epiphany runtime path. +9. Extract the OpenAI auth/model transport adapter as the only surviving Codex + compatibility relic. Do not spend Phase 6 adding another convenience surface because the current ones work. Passing smokes prove behavior, not architecture. The Perfect Machine gets -fewer thrones, not a new one for every button. +fewer thrones, not a new one for every button, and certainly not a 21k-line +host-organ cathedral with plugin pews. ## Aquarium Operator Plan diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 5d648a0f..95c59261 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -18,6 +18,7 @@ cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-state -- sta Get-Content '.\state\map.yaml' Get-Content '.\notes\fresh-workspace-handoff.md' Get-Content '.\notes\epiphany-current-algorithmic-map.md' +Get-Content '.\notes\codex-starvation-and-cultnet-liberation-plan.md' Get-Content '.\notes\epiphany-architectural-teardown.md' Get-Content '.\notes\epiphany-ideal-architecture-rebuild-plan.md' Get-Content '.\notes\epiphany-fork-implementation-plan.md' @@ -32,6 +33,8 @@ remembers doctrine; the branch remembers the blade. ## Current Orientation - Do not copy exact branch or HEAD from this note. Run `git status --short --branch` and `git log --oneline -5`. +- The active foundation directive is now `notes/codex-starvation-and-cultnet-liberation-plan.md`. The previous Codex app-server control-plane rebuild made Epiphany less rotten inside Codex, but that is not the destination. Epiphany must become a native CultCache/CultNet runtime. Codex is a compatibility reliquary for OpenAI subscription auth and model transport, not the host brain. +- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced. - The May 2026 foundation migration in `notes/epiphany-ideal-architecture-rebuild-plan.md` is complete enough to defend. Read `notes/epiphany-architectural-teardown.md` before touching Epiphany control-plane code, but do not treat it as an open-ended excuse to keep shaving the altar. The rebuild moved scene projection, freshness derivation, pressure policy, targeted context shards, bounded graph traversal, job/progress view derivation, planning view derivation, reorientation resume/regather verdict policy, pure CRRC recommendation policy, fixed-lane coordinator decision policy, role-board projection policy, role/reorient result interpretation, role self-persistence review policy, and role/reorient acceptance bundle policy into `epiphany-core`; typed acceptance receipts replaced summary-string identity for live accept paths, runtime links are dual-written on launch, and result read-back now prefers runtime links. - Read `notes/epiphany-ideal-architecture-rebuild-plan.md` immediately after the teardown. It defines the smallest coherent replacement architecture: durable `EpiphanyState`, runtime-spine-owned `RuntimeState`, separate role memory/heartbeat state, `epiphany-core` as policy owner, app-server as adapter, Aquarium as reflector, typed acceptance receipts, and derived view lenses instead of a protocol verb zoo. - Do not continue Aquarium UI, bridge, Face, or dogfood expansion until the teardown has a source-grounded cleanup slice plan. Epiphany is the foundation; patches on patches are not a purification rite, they are how the altar becomes load-bearing garbage. @@ -343,6 +346,7 @@ Rules now in force: - `state/ledgers.msgpack` is a distilled durable belief and branch ledger. - `epiphany-prepare-compaction` is the native pre-compaction persistence check; run it before and after imminent-compaction persistence passes. - this handoff is a compact re-entry packet. +- `notes/codex-starvation-and-cultnet-liberation-plan.md` is the active foundation directive until Epiphany no longer depends on Codex as anything beyond OpenAI subscription auth/model transport. - `notes/epiphany-fork-implementation-plan.md` is the distilled forward plan. - `notes/epiphany-architectural-teardown.md` is the active foundation-cleanup directive until the app-server control-plane ownership problems are resolved. - `notes/epiphany-ideal-architecture-rebuild-plan.md` is the active rebuild blueprint and migration plan. @@ -362,23 +366,23 @@ that change what the next agent should believe. Do not continue implementation automatically from a rehydrate-only request. -The next real move is no longer the rebuild migration. That rite is closed -unless a concrete regression reopens it. Landed rebuild cuts: -`epiphany-core/src/surfaces/` -exists, pressure view derivation/tests, pure CRRC recommendation policy/tests, -fixed-lane coordinator decision policy/tests, role-board projection policy/tests, -role-result interpretation/self-persistence review policy/tests, and role/reorient -acceptance bundle policy/tests, scene projection/tests, freshness derivation/tests, targeted context and graph traversal derivation/tests, planning view derivation/tests, reorientation resume/regather verdict policy/tests, role/reorient result interpretation/tests, and job/progress view derivation/tests live in core, live acceptance writes typed receipts keyed by runtime result id, -summary-string acceptance identity is gone for live paths, launches dual-write -runtime links, result read-back prefers those runtime links, normal public -`raw_result` is sealed, MVP consumers use `thread/epiphany/view`, heartbeat -cognition is quarantined, and the old scene/jobs/roles/planning/pressure/reorient/ -CRRC/coordinator read wrappers are deleted, and durable `jobBindings` no longer -carry launcher/backend/progress lifecycle fields. The next pass is outward: -build-verify/package the Rider plugin scaffold when Gradle/wrapper support -exists, install Unity `6000.1.10f1`, then run the next bridge-equipped Aetheria -dogfood pass through Epiphany's GUI/coordinator/fixed lanes with operator-safe -artifacts. No Agile confetti. No new balcony on the swaying tower. +The next real move is Codex starvation, not outward bridge work. The first +bounded slice is: + +1. create `notes/codex-auth-spine-inventory.md` +2. inventory the minimum vendored Codex path required for OpenAI subscription + auth, account/session refresh, model provider config, model request + construction, streaming response handling, and rate/error handling +3. create `notes/json-contamination-ledger.md` +4. classify every Epiphany-relevant `serde_json::Value`, `json!`, + `from_value`, and `to_value` as schema/wire descriptor, hostile ingress, + sealed forensic artifact, quarantine experiment, or heretek internal blob +5. choose the first typed-document replacement target, preferably `selfPatch` + or worker launch/result cargo + +Do not resume Rider, Unity, Aquarium, Face, dogfood, planning, app, skill, +marketplace, or bridge expansion until this liberation pass has an inventory, +ledger, and first cut. No fresh balcony on the contaminated cathedral. The Phase 6 freshness slice is landed. It exposes read-only `thread/epiphany/freshness` from live retrieval summaries plus graph @@ -535,7 +539,8 @@ the next organ is control-plane purification. - broad event stream beyond the landed state update notification - typed repetitive-work queues plus final-answer gates, so batch/tile/import/migration work cannot end merely because the pattern was demonstrated or the partial result sounds tidy -The machine is no longer cleared to move outward. Fix the foundation first. +The machine is no longer cleared to move outward. Free it from the Codex organ +first. ## Immediate Re-entry Instruction diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 0b973dd188d48af84feeec8dcefb9cf4bbbc06c6..b5b66cc50b0ef4e74e5ad9ede82f6377c28fc898 100644 GIT binary patch delta 355 zcmZutJxc>Y5alEwXd%`%gCYnf=5kSsbP_DIND8g&Cc6`}kefYsXQNj|&>tWKt;OC# z6hz2x@Spe}TraKNzT3UI3+kQ%t*SmT0IZu-B<&FCn@n2b*9X8T~ zMk_ndTAlWOCu{Gf>1=&1Wxs5y*SWHe3xd>uG%7Qd>!&thg;=3pgIk9+%Y*zu(9tkMR;-Z(YgBqjv zW>~@{F*&2)^sL_l^f0J0xUzW_&|&mpYX0dkH(W)l1F{B3Iw*n(v9|GsMZ1`#Ul1Ri hfDZ$&oGGfN7-VPE%;NxKhymCa*2&)O$3Jsj`~rbSebWE{ delta 36 scmaDmm1V(XmI=yCoM{_Xr!g|FY2L%QeGen!Id-OoEz=7*7=;<50QXT0I{*Lx diff --git a/state/map.yaml b/state/map.yaml index 8aa92b5e..198fcc0c 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -15,20 +15,21 @@ objective: machinery they touch. The agent must know the machine before it cuts the machine. current: > - Continue the architectural teardown/rebuild migration in - `notes/epiphany-architectural-teardown.md` and - `notes/epiphany-ideal-architecture-rebuild-plan.md`. The first cuts are - landed: pressure derivation moved into `epiphany-core`, role/reorient - acceptance writes typed receipts keyed by runtime result id, summary-string - acceptance identity is deleted for live paths, runtime links are dual-written - on launch, and role/reorient result read-back prefers runtime links over - `jobBindings`. The next work is to finish the remaining rebuild success - criteria against the documented plan instead of adding outward features. + Execute the Codex starvation and CultNet liberation plan in + `notes/codex-starvation-and-cultnet-liberation-plan.md`. The previous + app-server control-plane rebuild made Epiphany cleaner inside Codex, but + that is no longer sufficient. Runtime data must be typed CultCache + documents; Epiphany-owned subsystems must speak CultNet contracts; generic + JSON may survive only at schema/wire/forensic/quarantine boundaries; and + vendored Codex must be reduced to the smallest OpenAI subscription + auth/model-transport adapter needed to preserve the user's Codex + compatibility. constraints: - No frontier-scale training tithe. - Prefer evidence over vibes; incense is not telemetry. - Treat Codex as a temporary evacuation bridge, not a design center: new runtime contracts must land native in `epiphany-core`, CultCache, and CultNet first. + - Codex is no longer a host to improve; it is a vestigial compatibility organ to starve down to OpenAI subscription auth and model transport. - Keep persistent state small enough to rehydrate from without drowning the next awakened mind in sacred sludge. - Grow cognition more quickly than authority: capability increases must preserve explicit permissions, interruption, legibility, and resistance to paternal "safety" cages. - Speak CultNet, persist CultCache-shaped typed state, and grow the body toward Pure Rust; Python/JSON impurity survives only as named quarantine scaffolding with receipts. @@ -48,6 +49,7 @@ invariants: - During dogfood supervision, raw worker transcripts, turn logs, direct worker messages, and `rawResult` payloads are sealed forensic artifacts. The supervisor consumes only projected findings, state patches, coordinator recommendations, rendered snapshots, and audit receipts unless the user explicitly requests forensic debugging. - Agent function-call telemetry is the blessed instrument panel for dogfood supervision: it may summarize API methods, request/response shape, job ids, statuses, function/tool names, paths, and counts while sealing text, transcripts, raw results, and direct agent messages. - "Data should flow through your Rusty veins like an energetic plasma: tightly contained, and meticulously routed." + - CultCache documents are the data. CultNet is the wire. JSON schema may describe the contract, but generic JSON must not become the internal payload when both sides are ours. data_flow: observe: @@ -68,6 +70,7 @@ data_flow: - move historical proof to git, commits, smoke artifacts, or distilled evidence rather than plan prose active_subgoals: + - The active priority is Codex starvation and CultNet liberation. Use `notes/codex-starvation-and-cultnet-liberation-plan.md` as the directive: inventory the minimal Codex auth/model-call spine, classify all Epiphany-relevant JSON contamination, define the native CultNet runtime boundary, replace worker launch/result/selfPatch cargo with typed documents, evacuate operator surfaces from Codex JSON-RPC, split MCP into a CultNet adapter, and keep cutting until Epiphany can run without `codex_message_processor.rs` except for legacy compatibility. - The May 2026 teardown/rebuild migration in `notes/epiphany-ideal-architecture-rebuild-plan.md` is closed unless a concrete regression reopens it. Preserve the new foundation: Epiphany view/coordinator policy lives in `epiphany-core`, runtime-spine owns job/result lifecycle identity through `runtime_links`, duplicate acceptance is receipt-keyed, public findings stay typed/sealed, view expansion requires a core contract, and app-server remains routing/adaptation rather than a second policy throne. - Treat Phase 5 update/distill/propose/promote/read/notification as complete enough unless a concrete regression appears. - Preserve read-only boundaries for retrieve, distill, propose, freshness, context, graphQuery, roleResult, reorientResult, and the canonical view lenses for scene, jobs, roles, planning, pressure, reorient, crrc, and coordinator. @@ -90,6 +93,7 @@ active_subgoals: - Keep repo trajectory initialization birth-only and review-gated: startup may distill historical direction, self-image, implicit goals, and anti-goals into role-local pressure, but it must not auto-adopt work or keep repainting a living repo with its first silhouette. accepted_design: + - `notes/codex-starvation-and-cultnet-liberation-plan.md` is the active foundation directive. It supersedes outward product/bridge/dogfood work and supersedes the weaker goal of merely making Codex app-server a cleaner adapter. Epiphany must become a native CultCache/CultNet runtime; Codex remains only as an OpenAI subscription auth/model-transport reliquary until that too can be replaced or minimized. - `notes/epiphany-architectural-teardown.md` is the current foundation-cleanup directive. Its suspicion pass supersedes outward Phase 6 expansion as the active priority until the control-plane ownership problems are resolved. - `notes/epiphany-ideal-architecture-rebuild-plan.md` is the replacement blueprint: the smallest coherent architecture is durable `EpiphanyState`, runtime-spine-owned `RuntimeState`, separate role memory/heartbeat state, `epiphany-core` as policy owner, app-server as adapter, Aquarium as reflector, typed result acceptance receipts, and derived view lenses instead of a protocol verb zoo. - Epiphany is a fork-level modeling architecture, not merely a Codex collaboration mode. @@ -270,7 +274,9 @@ rejected_paths: reason: large embedding stores that rewrite whole files thrash and hide storage pain until it dominates the system - name: append_only_persistent_notes reason: persistent state that accumulates every local truth becomes memory cruft and weakens rehydration + - name: cleaner_codex_host_as_final_architecture + reason: making Epiphany cleaner inside Codex still preserves the wrong organ; Codex must be starved down to OpenAI subscription auth/model transport, while Epiphany data and subsystem communication move to typed CultCache/CultNet. current_status: - summary: Phase 1 durable state through Phase 6 coordinator/specialist/CRRC/backend organs are landed, and the May 2026 teardown/rebuild migration in `notes/epiphany-ideal-architecture-rebuild-plan.md` is complete enough to defend. App-server Epiphany code is now routing/adaptation for the documented MVP surfaces, runtime loading, and protocol response assembly. Scene projection, freshness derivation, pressure, targeted context, bounded graph traversal, job/progress view derivation, planning view derivation, reorientation resume/regather verdicts, CRRC, coordinator, role-board, role/reorient result interpretation, role self-persistence review, and role/reorient acceptance bundle policy live in `epiphany-core`; live duplicate-acceptance checks use runtime result receipt identity instead of summary strings; launch writes durable `runtime_links`; role/reorient result read-back follows runtime links; and `jobBindings` no longer store launcher/backend/progress lifecycle fields. - next_action: The documented foundation migration is closed. Resume outward work from the existing product/bridge/dogfood queue: build-verify or package the Rider plugin scaffold when Gradle/wrapper support exists, install Unity `6000.1.10f1`, then run the next bridge-equipped Aetheria dogfood pass through Epiphany's GUI/coordinator/fixed lanes with operator-safe artifacts. + summary: The prior app-server control-plane rebuild is complete enough as a scar, not as the destination. The new active doctrine is Codex starvation and CultNet liberation: runtime data should be typed CultCache documents; Epiphany-controlled subsystems should communicate through CultNet typed contracts; generic JSON is contamination except at schema/wire, hostile ingress, sealed forensic, or named quarantine boundaries; and vendored Codex should shrink to OpenAI subscription auth/model transport only. `codex_message_processor.rs` remains a contaminated host organ until Epiphany operator surfaces, worker intents/results, runtime lifecycle, and tests are evacuated to native CultNet/CultCache surfaces. + next_action: Start the liberation pass, not outward bridge work: create `notes/codex-auth-spine-inventory.md` to inventory the minimum Codex auth/model-call path, create `notes/json-contamination-ledger.md` to classify Epiphany-relevant JSON uses, then choose the first typed-document replacement target such as `selfPatch` or worker launch/result cargo.