Add repo memory distiller packet

This commit is contained in:
Meta Vens 2026-05-07 01:17:34 +01:00
commit 62ddc39df4
10 changed files with 604 additions and 5 deletions

View file

@ -37,6 +37,7 @@ remembers doctrine; the branch remembers the blade.
- 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.
- CultNet APIs are advertised as compatible schemas plus mutation contracts. Hello frames now expose readable document types, allowed operations, mutation authority, typed intent document types, and typed receipt document types; Aquarium should use those contracts to submit state changes and watch receipts rather than growing a little bespoke verb zoo.
- Repo personality initialization now has a terrain-reduced plan and first native organ surface. `epiphany-repo-personality scout/project/agent-packet/status` scouts local git repos, scores body taxonomy/history temperament/memory doctrine, writes typed CultCache terrain/profile/role-projection MessagePack stores, emits JSON/Markdown inspection exports, and renders a birth-only Repo Personality Distiller specialist prompt packet. `epiphany-repo-personality-smoke` creates tiny repos and proves one terrain report, one personality profile, all eight role projections, and the rendered distiller packet can round-trip through typed stores/artifacts. The next seam is startup routing that checks for an accepted personality initialization record, launches the distiller only if absent, and lets Self review bounded `selfPatch` candidates into initial role memory and heartbeat seeds. After that, personality drift belongs to heartbeat, mood, rumination, sleep consolidation, lived evidence, and reviewed `selfPatch`, not repeated startup distillation.
- Repo memory initialization is now split from personality initialization. `epiphany-repo-personality memory-packet` renders a birth-only Repo Memory Distiller packet from the same typed terrain/profile/projection store plus bounded source excerpts. It gives each organ its own mission filter: Self for routing/authority, Face for public surface, Imagination for plans/backlog, Eyes for prior art, Body for architecture, Hands for implementation habits, Soul for evidence, and Life for continuity. The output is still a Self-reviewed petition, not direct memory mutation.
- Native CRRC automation is now landed only at turn-complete safe boundaries. It may submit `Op::Compact` for coordinator-approved `compactRehydrateReorient` or for a successful pre-compaction checkpoint intervention's pending compact handoff, and it may launch the fixed `reorient-worker` for coordinator-approved `launchReorientWorker`. It does not auto-launch Imagination/modeling/verification, accept findings, promote evidence, edit implementation code, or keep going after reviewable semantic output.
- Pre-compaction checkpoint intervention is now landed. On token-count events for loaded Epiphany threads, when current context usage reaches 80% of the active auto-compact/context limit, the harness steers the active turn once with a CRRC checkpoint directive so the agent banks working context before compaction/reorientation. Pressure ignores cumulative token spend; cumulative-only telemetry reports unknown instead of yelling. A successful steer now latches a turn-scoped compact handoff that is consumed at clean turn completion, preventing the brake from decaying into another implementation turn. This is still bounded steering plus compaction handoff, not automatic semantic acceptance, a broad scheduler, or implementation continuation.
- The old Python dogfood/live-specialist runners were cut because they encoded the obsolete completion path. The replacement must be native Rust/CultCache/CultNet and complete heartbeat-owned runtime-spine job results with auditable artifacts.
@ -289,6 +290,12 @@ For the native Void-derived routine pass, run:
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-heartbeat-store -- routine --store .\state\agent-heartbeats.msgpack --artifact-dir .\.epiphany-heartbeats --agent-store .\state\agents.msgpack
```
For repo personality and memory birth packet changes, run:
```powershell
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-repo-personality-smoke
```
For Face's Discord mouth and Void memory bridge, run:
```powershell

View file

@ -467,6 +467,7 @@ Initial commands:
```powershell
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-repo-personality -- scout --root E:\Projects --artifact-dir .\.epiphany-imports\repo-personality-terrain
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-repo-personality -- project --repo E:\Projects\AetheriaLore --baseline .\.epiphany-imports\repo-personality-terrain\baseline.msgpack --artifact-dir .\.epiphany-imports\aetheria-lore-personality
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-repo-personality -- memory-packet --store .\.epiphany-imports\aetheria-lore-personality\projection.msgpack --artifact-dir .\.epiphany-imports\aetheria-lore-memory
```
The first version can use deterministic scoring from local filesystem and git
@ -494,6 +495,7 @@ It provides:
- `scout --root <path> --artifact-dir <path> [--max-repos <n>]`
- `project --repo <path> --baseline <baseline.msgpack> --artifact-dir <path>`
- `agent-packet --store <projection.msgpack> --artifact-dir <path> [--repo-id <id>]`
- `memory-packet --store <projection.msgpack> --artifact-dir <path> [--repo-id <id>]`
- `status --store <baseline-or-projection.msgpack>`
The first implementation is intentionally deterministic. It inventories git
@ -526,11 +528,39 @@ must not rerun this specialist merely because terrain changed or the repo
reopened; major terrain surprises should route to Eyes/Body/Self as normal
modeling or review work, not as a personality reset.
## Repo Memory Distillation
Repo memory initialization is a separate birth organ. Personality answers what
temperament pressure the repo should exert; memory answers what each newborn
sub-agent should know before it starts work.
The `memory-packet` command renders a dedicated Repo Memory Distiller packet.
It uses the same typed terrain/profile/projection store, then adds a bounded
source inventory from instruction, documentation, state, research, contract,
verification, runtime, and code surfaces. The packet includes one role-specific
distiller brief for each standing organ:
- Self receives routing, authority, review-gate, and cross-swarm boundary memory.
- Face receives public-surface, Aquarium, Discord, voice, and sealed-thought boundary memory.
- Imagination receives roadmap, backlog, objective-shaping, dream, and rejected-path memory.
- Eyes receives research, prior-art, canonical algorithm, vendor/API, and invention-avoidance memory.
- Body receives architecture, graph, control/data-flow, invariant, and checkpoint memory.
- Hands receives implementation conventions, build/edit constraints, dependency habits, and common patch traps.
- Soul receives verification commands, evidence standards, invariant checks, and truth-refusal memory.
- Life receives compaction, scratch, checkpoint, heartbeat, sleep, and continuity memory.
The memory distiller petitions Self with Ghostlight-shaped `selfPatch`
candidates. It must not mutate memory directly, adopt objectives, copy raw file
dumps into role memory, or store detailed project maps where typed Epiphany
state should live. If source is thin or stale, it names that risk instead of
filling the newborn with pasteboard certainty.
Smoke coverage lives in
`epiphany-core/src/bin/epiphany-repo-personality-smoke.rs`. The smoke creates two
tiny git repos, scouts them into a baseline store, projects one repo, and proves
the projection store contains one terrain report, one profile, all eight
standing role projections, and a rendered distiller packet plus prompt.
standing role projections, a rendered personality distiller packet plus prompt,
and a rendered role-specific memory distiller packet plus prompt.
## Next Implementation Step