Record Epiphany rebuild footing

This commit is contained in:
Meta Vens 2026-05-12 02:54:02 +01:00
commit e2e4229c6a
3 changed files with 23 additions and 19 deletions

View file

@ -32,11 +32,11 @@ 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`.
- Top priority is now foundation cleanup, not outward feature work. Read `notes/epiphany-architectural-teardown.md` before touching Epiphany control-plane code. The May 2026 suspicion pass found that the app-server Epiphany control plane has become architectural Jenga: too much policy, projection, lifecycle glue, prompt packet assembly, coordinator sequencing, and test authority lives in `vendor/codex/codex-rs/app-server/src/codex_message_processor.rs`.
- Top priority is still foundation cleanup, not outward feature work. Read `notes/epiphany-architectural-teardown.md` before touching Epiphany control-plane code. The May 2026 suspicion pass found that the app-server Epiphany control plane had become architectural Jenga: too much policy, projection, lifecycle glue, prompt packet assembly, coordinator sequencing, and test authority lives in `vendor/codex/codex-rs/app-server/src/codex_message_processor.rs`. The rebuild has begun: pressure policy moved 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.
- Phase 1 through Phase 5 are complete enough.
- Phase 6 has read-only `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/roles`, `thread/epiphany/freshness`, `thread/epiphany/context`, `thread/epiphany/graphQuery`, `thread/epiphany/planning`, `thread/epiphany/pressure`, `thread/epiphany/reorient`, `thread/epiphany/crrc`, `thread/epiphany/coordinator`, `thread/epiphany/reorientResult`, and `thread/epiphany/roleResult`; durable `jobBindings` now act as a thin Epiphany-owned launcher seam with launcher id, authority scope, and heartbeat backend/job id. New `thread/epiphany/jobLaunch`, `thread/epiphany/jobInterrupt`, `thread/epiphany/roleLaunch`, and `thread/epiphany/reorientLaunch` writes open typed runtime-spine job receipts under `state/runtime-spine.msgpack` and do not require the Codex SQLite state runtime. Freshness carries watcher-backed invalidation inputs, graphQuery traverses authoritative typed graph neighborhoods and path/symbol matches without mutation, planning projects typed captures/backlog/roadmap/objective drafts without adopting work, roles project implementation/imagination/modeling/verification/reorientation ownership from existing signals without becoming a scheduler, `roleResult` and `reorientResult` read heartbeat-backed typed runtime-spine job results when present, `roleAccept` and `reorientAccept` accept completed heartbeat findings from typed runtime-spine results while remaining explicit review gates, `thread/epiphany/crrc` recommends the next explicit CRRC action without launching, accepting, compacting, scheduling, or mutating, and `thread/epiphany/coordinator` composes those signals into a fixed-lane MVP action recommendation without becoming a writer.
- Phase 6 has read-only `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/roles`, `thread/epiphany/freshness`, `thread/epiphany/context`, `thread/epiphany/graphQuery`, `thread/epiphany/planning`, `thread/epiphany/pressure`, `thread/epiphany/reorient`, `thread/epiphany/crrc`, `thread/epiphany/coordinator`, `thread/epiphany/reorientResult`, and `thread/epiphany/roleResult`; durable `jobBindings` are now legacy launcher compatibility while new durable `runtimeLinks` hold the stable runtime-spine association. New `thread/epiphany/jobLaunch`, `thread/epiphany/jobInterrupt`, `thread/epiphany/roleLaunch`, and `thread/epiphany/reorientLaunch` writes open typed runtime-spine job receipts under `state/runtime-spine.msgpack` and do not require the Codex SQLite state runtime. Freshness carries watcher-backed invalidation inputs, graphQuery traverses authoritative typed graph neighborhoods and path/symbol matches without mutation, planning projects typed captures/backlog/roadmap/objective drafts without adopting work, roles project implementation/imagination/modeling/verification/reorientation ownership from existing signals without becoming a scheduler, `roleResult` and `reorientResult` read heartbeat-backed typed runtime-spine job results through runtime links when present, `roleAccept` and `reorientAccept` accept completed heartbeat findings by writing typed acceptance receipts while remaining explicit review gates, `thread/epiphany/crrc` recommends the next explicit CRRC action without launching, accepting, compacting, scheduling, or mutating, and `thread/epiphany/coordinator` composes those signals into a fixed-lane MVP action recommendation without becoming a writer.
- Native `epiphany-mvp-status` is the first dogfood operator view. It starts or reads a thread through app-server and prints scene, planning, pressure, reorient, jobs, roles, Imagination/modeling/verification role result read-backs, reorient result, heartbeat, Face bubbles, and CRRC recommendation as text or machine output. The old Python status module has been cut; native Rust/CultCache/CultNet surfaces are the smoked product path.
- Native `epiphany-mvp-coordinator` is the first auditable fixed-lane coordinator runner. It starts or reads a thread through app-server, opens a native runtime-spine session, follows the harness-native coordinator action, can auto-launch modeling, verification, or reorient-worker jobs, records native runtime job/result receipts for terminal launched work, keeps semantic findings review-gated by default, and writes summary, steps, rendered snapshots, transcript, stderr, runtime-spine status, and final next-action artifacts under `.epiphany-dogfood/coordinator` or a caller-provided artifact directory. It refuses direct backend-completion mutation; full completion smoke needs live workers while execution is being cauterized into CultNet.
- Native `epiphany-runtime-spine` is the first Codex-independent runtime vertebra. It owns typed CultCache documents for runtime identity, sessions, jobs, job results, and events; opens/completes native jobs; snapshots jobs/results by runtime job id; projects job-result counts; and can emit a framed CultNet hello message advertising the native document and mutation contract surface. Codex app-server launch/read-back/acceptance is now a typed heartbeat/runtime-spine bridge with no Epiphany job-result dependency on the Codex SQLite runtime.
@ -370,16 +370,18 @@ that change what the next agent should believe.
Do not continue implementation automatically from a rehydrate-only request.
The next real move is foundation cleanup. Start from
The next real move is still foundation cleanup. Start from
`notes/epiphany-architectural-teardown.md` and
`notes/epiphany-ideal-architecture-rebuild-plan.md`, not from the older outward
Phase 6 bridge/UI trail. The first reversible rebuild slice is to add
`epiphany-core/src/surfaces/`, move pressure view derivation into core while
leaving `thread/epiphany/pressure` as an app-server wrapper, and move pressure
policy tests into core. The next cuts are typed acceptance receipts,
runtime-spine lifecycle ownership, endpoint collapse into view lenses, removal
of normal public `raw_result`, and heartbeat cognition quarantine. No Agile
confetti. No new balcony on the swaying tower.
Phase 6 bridge/UI trail. Landed rebuild cuts: `epiphany-core/src/surfaces/`
exists, pressure view derivation and 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, and result read-back
prefers those runtime links. The next cut is to shrink/delete `jobBindings`
lifecycle/backend fields now that `runtimeLinks` can locate runtime-spine jobs,
then continue with public `raw_result` removal, `epiphany/view` lens collapse,
consumer migration, and heartbeat cognition quarantine. No Agile confetti. No
new balcony on the swaying tower.
The Phase 6 freshness slice is landed. It exposes read-only
`thread/epiphany/freshness` from live retrieval summaries plus graph

Binary file not shown.

View file

@ -15,13 +15,15 @@ objective:
machinery they touch. The agent must know the machine before it cuts the
machine.
current: >
Stop outward feature work until the architectural teardown in
`notes/epiphany-architectural-teardown.md` and the rebuild blueprint in
`notes/epiphany-ideal-architecture-rebuild-plan.md` are acted on. Epiphany
is the foundation for everything else; the current app-server control plane
has absorbed too much policy, projection, lifecycle glue, and coordinator
sequencing. The next work is foundation cleanup, not another bridge,
Aquarium pane, Face surface, or convenience layer.
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 shrink/delete `jobBindings` lifecycle
mirror fields, then continue endpoint/view and raw-result cleanup.
constraints:
- No frontier-scale training tithe.
@ -270,5 +272,5 @@ rejected_paths:
reason: persistent state that accumulates every local truth becomes memory cruft and weakens rehydration
current_status:
summary: Phase 1 durable state through Phase 6 coordinator/specialist/CRRC/backend organs are landed, but the May 2026 architectural teardown 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 host seam. The foundations are conceptually sound, and `notes/epiphany-ideal-architecture-rebuild-plan.md` now defines the smallest coherent replacement architecture.
next_action: Treat `notes/epiphany-architectural-teardown.md` and `notes/epiphany-ideal-architecture-rebuild-plan.md` as the active top-priority cleanup directive. Start with the first reversible rebuild slice: add `epiphany-core/src/surfaces/`, move pressure view derivation into core while leaving `thread/epiphany/pressure` as an app-server wrapper, and move pressure policy tests into core. Then pursue typed acceptance receipts, runtime-spine lifecycle ownership, endpoint collapse into view lenses, removal of public `raw_result`, and heartbeat cognition quarantine. Do not continue Aquarium UI, bridge, Face, or dogfood expansion until this foundation cleanup is underway.
summary: Phase 1 durable state through Phase 6 coordinator/specialist/CRRC/backend organs are landed, and the May 2026 rebuild has started cutting the app-server control-plane tumor. Pressure policy now lives in `epiphany-core`; role/reorient acceptance writes typed `acceptance_receipts`; live duplicate-acceptance checks use runtime result receipt identity instead of summary strings; launch writes durable `runtime_links`; and role/reorient result read-back follows runtime links before falling back to legacy bindings.
next_action: Continue the teardown/rebuild migration from `notes/epiphany-ideal-architecture-rebuild-plan.md`. The next bounded cut is to shrink or delete `jobBindings` lifecycle/backend fields now that `runtime_links` can locate runtime-spine jobs, then remove normal public `raw_result`, add the canonical `epiphany/view` lens wrapper, migrate consumers, and quarantine heartbeat cognition blobs. Do not resume outward Aquarium/bridge/Face/dogfood expansion until this foundation cleanup is materially farther along.