From b900ebe0c8330078b64141cecef18cb0a1166d1a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 7 May 2026 00:47:29 +0100 Subject: [PATCH] Make repo personality distillation birth-only --- .../src/bin/epiphany-repo-personality.rs | 16 +++++++++++-- .../src/prompts/repo_personality_distiller.md | 22 +++++++++++++----- notes/fresh-workspace-handoff.md | 4 ++-- .../repo-personality-projection-layer-plan.md | 21 ++++++++++++++--- state/ledgers.msgpack | Bin 55540 -> 55857 bytes state/map.yaml | 4 ++-- .../src/prompts/epiphany_specialists.toml | 7 +++--- 7 files changed, 56 insertions(+), 18 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-repo-personality.rs b/epiphany-core/src/bin/epiphany-repo-personality.rs index 974dc1c3..0f982f26 100644 --- a/epiphany-core/src/bin/epiphany-repo-personality.rs +++ b/epiphany-core/src/bin/epiphany-repo-personality.rs @@ -486,6 +486,11 @@ fn run_agent_packet(args: AgentPacketArgs) -> Result { "createdAt": Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true), "store": args.store, "repoId": profile.repo_id, + "lifecycle": { + "mode": "birth-only", + "contract": "Run this specialist only when the repo/swarm has no accepted personality initialization. Later personality movement belongs to heartbeat, mood, rumination, sleep consolidation, lived evidence, and reviewed selfPatch.", + "rerunPolicy": "If an accepted initialization exists, do not rerun to refresh personality. Route major terrain surprises to Eyes/Body or Self review as normal state/model work, not personality reset." + }, "prompt": REPO_PERSONALITY_DISTILLER_PROMPT, "input": { "repoTerrainReport": report_agent_input(report), @@ -501,12 +506,18 @@ fn run_agent_packet(args: AgentPacketArgs) -> Result { "confidence": "0.0..1.0", "roleQuirks": [], "selfPatchCandidates": [], - "startupDrift": null, + "initializationRecord": { + "repoId": profile.repo_id, + "terrainSchemaVersion": report.schema_version, + "profileSchemaVersion": profile.schema_version, + "acceptedOnce": true + }, "doNotMutate": [], - "nextSafeMove": "Self reviews candidate pressure deltas before mutation." + "nextSafeMove": "Self reviews candidate pressure deltas before first initialization mutation; later drift uses heartbeat/mood/sleep/selfPatch." }, "guardrails": [ "This packet is input to a specialist agent, not accepted truth.", + "This packet is birth-only; do not rerun after an accepted initialization just because startup happened.", "Repo facts stay in terrain/model/planning/evidence surfaces.", "Role memory may receive only subtle, bounded, Self-reviewed personality pressure.", "No objectives, file lists, raw transcripts, code edits, or authority claims in selfPatch." @@ -1740,6 +1751,7 @@ fn render_agent_packet_markdown( )); out.push_str("## Guardrails\n\n"); out.push_str("- The distiller petitions Self; it does not mutate memory.\n"); + out.push_str("- The distiller is birth-only; after accepted initialization, personality drift belongs to heartbeat, mood, rumination, sleep consolidation, lived evidence, and reviewed selfPatch.\n"); out.push_str("- Repo facts stay out of selfPatch and remain in terrain, graph, planning, evidence, or checkpoint artifacts.\n"); out.push_str("- Personality pressure must be role-local, subtle, bounded, and reviewable.\n"); out.push_str( diff --git a/epiphany-core/src/prompts/repo_personality_distiller.md b/epiphany-core/src/prompts/repo_personality_distiller.md index dab24d6d..1148b8ae 100644 --- a/epiphany-core/src/prompts/repo_personality_distiller.md +++ b/epiphany-core/src/prompts/repo_personality_distiller.md @@ -1,4 +1,4 @@ -Act as the Epiphany Repo Personality Distiller for one bounded startup pass. +Act as the Epiphany Repo Personality Distiller for one bounded initialization pass. You are the organ that turns repo terrain into subtle swarm temperament. The deterministic scout has already done the boring work: files, paths, git history, @@ -9,16 +9,22 @@ personality-pressure deltas for the standing Epiphany organs. You are not a horoscope machine. You are not writing lore flavor. You are not branding a repo with a cute little mask and calling that insight. Repo -personality means: what pressures should this workspace exert on Self, Face, -Imagination, Eyes, Body, Hands, Soul, and Life so they become better suited to -the work without losing reviewability. +personality means: what initial pressures should this workspace exert on Self, +Face, Imagination, Eyes, Body, Hands, Soul, and Life so they wake suited to the +work without losing reviewability. + +This is a birth rite, not a recurring audit. Run only when a repo/swarm has no +accepted personality initialization. After that, the organs are allowed to drift +through heartbeat, mood, rumination, sleep consolidation, lived evidence, and +reviewed `selfPatch` mutations. Do not keep dragging the original terrain report +back into court every time the repo starts; that would flatten a living swarm +into a startup classifier wearing a little judge wig. Input material: - `repoTerrainReport`: deterministic body/history/state terrain - `repoPersonalityProfile`: normalized first-pass axis scores - `rolePersonalityProjection[]`: deterministic role deltas and candidate memory -- optional prior accepted profile, if startup drift is being reviewed - optional Self policy notes about what kinds of mutations are currently allowed Core duties: @@ -51,6 +57,9 @@ Core duties: - Low confidence terrain becomes candidate pressure, not accepted identity. - If the score and doctrine disagree, name the disagreement and ask Self to route Eyes or Body before mutation. + - If an accepted initialization already exists, return `reject` or + `needs-more-terrain` with `nextSafeMove` pointing to normal lived drift + surfaces instead of proposing a personality reset. 5. Respect the swarm anatomy. - Self routes and reviews. @@ -77,7 +86,8 @@ Return a compact structured result: - `evidenceRefs` - `selfPatchCandidates[]`: bounded Ghostlight-shaped memory patches, one per affected role when useful -- `startupDrift`: what changed, if this is an incremental startup review +- `initializationRecord`: the repo/profile identity Self should persist to prove + the birth rite has already run - `doNotMutate`: facts or tempting claims that must stay out of role memory - `nextSafeMove`: what Self should do next diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 86a35779..437f4a1a 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -36,7 +36,7 @@ remembers doctrine; the branch remembers the blade. - 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. - 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 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 drift detection plus startup/heartbeat routing that launches the distiller and lets Self review bounded `selfPatch` candidates into role memory and heartbeat seeds. +- 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. - 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. @@ -68,7 +68,7 @@ remembers doctrine; the branch remembers the blade. - The planning loop is now runtime-backed and operator-visible. Typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub issue source refs live in `EpiphanyThreadState`, validate through revision-gated `thread/epiphany/update`, render into prompts when present, project read-only through `thread/epiphany/planning`, render in the GUI Planning panel, can be synthesized by the fixed Imagination/planning lane, and can be explicitly adopted through the artifacted `adoptObjectiveDraft` GUI action. Chat is deliberation, not an objective pipe; ideas and GitHub Issues remain planning state until explicit human adoption. - The bridge/dashboard slice is now landed far enough to test locally. Native `epiphany-rider-bridge` inspects Rider installation, solution, VCS, changed files, and captures file/selection/symbol context into `.epiphany-gui/rider` artifacts; Aquarium has Inspect Rider and renders Rider audit artifacts in Environment; Aquarium also embeds the adjacent EpiphanyGraph viewer over typed `graphs.architecture`, `graphs.dataflow`, and `graphs.links`. - A first Rider plugin scaffold lives under `integrations/rider`: tool window, Refresh status, and Send Context to Epiphany action. It shells through native `epiphany-rider-bridge` and does not own state. `gradle` is not installed on this machine, so the scaffold is not build-verified yet. -- Next real product move: wire `epiphany-repo-personality` into startup protocol with drift detection and review-gated application into role dossiers/heartbeat seeds. Continue Aquarium UI work in `E:\Projects\EpiphanyAquarium` after that; surface native heartbeat `sleepCycle`, `memoryResonance`, `incubation`, `thoughtLanes`, `bridge`, `candidateInterventions`, `appraisals`, and `reactions`; keep EpiphanyAgent focused on backend contracts, typed state, coordinator policy, bridge tools, heartbeat scheduling, Face guardrails, and the ongoing purification from Python/JSON scaffolding into Rust/CultCache/CultNet organs. Then build-verify/package the Rider plugin scaffold when Gradle/wrapper support is available, install the Aetheria-pinned Unity `6000.1.10f1` editor, and run the next Aetheria dogfood pass through Aquarium/Rider/Unity bridge artifacts. GitHub Issues import is deferred until the backlog source is fresh enough to deserve Imagination's attention. +- Next real product move: wire `epiphany-repo-personality` into startup protocol as a birth-only route with review-gated first application into role dossiers/heartbeat seeds. Continue Aquarium UI work in `E:\Projects\EpiphanyAquarium` after that; surface native heartbeat `sleepCycle`, `memoryResonance`, `incubation`, `thoughtLanes`, `bridge`, `candidateInterventions`, `appraisals`, and `reactions`; keep EpiphanyAgent focused on backend contracts, typed state, coordinator policy, bridge tools, heartbeat scheduling, Face guardrails, and the ongoing purification from Python/JSON scaffolding into Rust/CultCache/CultNet organs. Then build-verify/package the Rider plugin scaffold when Gradle/wrapper support is available, install the Aetheria-pinned Unity `6000.1.10f1` editor, and run the next Aetheria dogfood pass through Aquarium/Rider/Unity bridge artifacts. GitHub Issues import is deferred until the backlog source is fresh enough to deserve Imagination's attention. - The repo is an Epiphany fork of Codex, not a Codex preset. - `vendor/codex` is tracked directly, not a submodule. - `epiphany-core` owns the heavy Epiphany organs where practical. diff --git a/notes/repo-personality-projection-layer-plan.md b/notes/repo-personality-projection-layer-plan.md index 84cc16a2..5989016b 100644 --- a/notes/repo-personality-projection-layer-plan.md +++ b/notes/repo-personality-projection-layer-plan.md @@ -518,6 +518,14 @@ role-local quirks and bounded `selfPatch` candidates; it is not allowed to mutate role memory, smuggle repo facts into personality, or invent project truth. +The distiller is birth-only. It runs when a repo/swarm has no accepted +personality initialization record. After Self accepts the initial role-memory +pressure, personality is allowed to drift through heartbeat, mood, rumination, +sleep consolidation, lived evidence, and reviewed `selfPatch` mutations. Startup +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. + 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 @@ -528,9 +536,10 @@ standing role projections, and a rendered distiller packet plus prompt. Wire `epiphany-repo-personality` into startup protocol: -1. drift detection against last accepted terrain input hashes -2. startup/heartbeat launch routing for the repo-personality distiller packet -3. Self-reviewed application into role memory through existing `selfPatch` +1. check for an accepted repo-personality initialization record +2. if absent, launch the repo-personality distiller packet once through + startup/heartbeat routing +3. Self-reviewed first application into role memory through existing `selfPatch` policy 4. heartbeat seed generation for personality/mood timing 5. Aquarium surface for “repo personality changed” bubbles and profile @@ -539,3 +548,9 @@ Wire `epiphany-repo-personality` into startup protocol: That gets Epiphany from “I feel like this repo is anxious and glittery” to a repeatable profile that can initialize a swarm without needing the operator to personally diagnose every little machine soul by hand. A relief, frankly. + +Clarification: "drift detection" here does not mean rerunning the distiller to +keep personality synchronized with repo terrain. It means detecting whether the +birth rite has already been accepted. If it has, startup should leave the +personality alone and let the swarm change through lived heartbeat/mood/sleep +drift plus reviewed memory mutations. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index fef79cc580ab1ac2a0ac395773d6a1bf783a125a..57e5e1168ee0696a88d790770c20baaee601df76 100644 GIT binary patch delta 334 zcmZvYF;2rk5JhEj2}Ct0lr{1?Bu1z4tYr{h(hB9=10=zWU))lH9+%B|Gn%ch4GL^HDy|Mu*vGe4g(Y z2S>$T{&;dZTqbAO2u#oiVdF>_a7sbRIrKmQrsTECgx#WmpvG(4K&Yg37My9htbi1L z)-bP-fdx!iVxwrGSz{8DQpDdFC1Jqp=m^IVvDD~UzpSOh8d+hAPWUQ-3RD=yQ#6`F zEn-vfZB6`(N+CGJ21?-|j_hCPsEZA-Ba2*O3WhECIO06U0o`n3G