From 91fb98e32d470d0f13718ab486b537702e42785c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 29 May 2026 02:02:42 +0100 Subject: [PATCH] Type Persona candidate actions --- notes/fresh-workspace-handoff.md | 4 +- notes/voidbot-routine-adoption-plan.md | 10 +- schemas/README.md | 10 +- schemas/canonical-agent-state-schema.md | 13 +- .../gamecult.persona_state.v0.schema.json | 138 +++++++++++++++++- schemas/organ-state-profiles.md | 7 +- state/ledgers.msgpack | Bin 167361 -> 167732 bytes state/map.yaml | 2 +- 8 files changed, 161 insertions(+), 23 deletions(-) diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index c6ae2906..a0e3b4f3 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -32,7 +32,7 @@ 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`. -- Canonical anatomy now lives in `notes/epiphany-anatomy.md`. Embodied sub-agents are Self, Face, Imagination, Eyes, Proprioception, Hands, and Soul. Body, Mind, Continuity, and Substrate Gate are substrate/state/protocol surfaces, not sub-agent identities. State is split by layer: `work_organ` for resident Epiphany sub-agents, `persona` for portable public/person-shaped state shared by Epiphany Face, VoidBot repo Faces, and Ghostlight characters, and heartbeat/swarm state for scheduling and coordination physiology. Persona state now carries provenance, required public presentation, `date-time` timestamps, generic `candidateActions`, strict anchored thoughts with non-authoritative extensions, custom enum companion labels, and typed affect records for bonds/status reads/doctrine stances. +- Canonical anatomy now lives in `notes/epiphany-anatomy.md`. Embodied sub-agents are Self, Face, Imagination, Eyes, Proprioception, Hands, and Soul. Body, Mind, Continuity, and Substrate Gate are substrate/state/protocol surfaces, not sub-agent identities. State is split by layer: `work_organ` for resident Epiphany sub-agents, `persona` for portable public/person-shaped state shared by Epiphany Face, VoidBot repo Faces, and Ghostlight characters, and heartbeat/swarm state for scheduling and coordination physiology. Persona state now carries provenance, required public presentation, `date-time` timestamps, typed `candidateActions`, strict anchored thoughts with non-authoritative extensions, custom enum companion labels, and typed affect records for bonds/status reads/doctrine stances. - The repo now has a one-command local operator path: `.\tools\epiphany_local_run.ps1`. Default mode is `smoke`; it builds the retained Codex app-server compatibility edge, builds native Epiphany operator binaries, runs the coordinator smoke, and writes launcher artifacts under `.epiphany-run/` plus coordinator artifacts under `.epiphany-dogfood/`. `-Mode status` is now Epiphany-native: it builds only Epiphany operator binaries, reads `state/thread-state.msgpack` when present, derives status through `epiphany-core`, and does not start or require `codex-app-server`. Use `-Mode plan` or `-Mode run -MaxSteps 4` for the raw bridge-equipped coordinator entrypoints; use `-Mode mvp -FaceInput "" -MaxSteps 4` for the local product cycle that projects Face's character turn, writes a Face/Aquarium bubble, bootstraps a minimal local checkpoint for fresh threads, runs the coordinator with auto-tools, then runs heartbeat sleep/dream maintenance. Live plan/run/mvp modes use the workspace `state/runtime-spine.msgpack`, because CodexThread launch writes worker requests there; the run bundle remains artifact evidence, not runtime lifecycle authority. Add `-ThreadId ` and `-Workspace ` to inspect or continue an existing thread. `status`, `plan`, and `smoke` do not spend model calls; `run` and `mvp` build and use `epiphany-openai-runtime`. Coordinator workers now launch detached and are polled through runtime-spine instead of blocking the coordinator. MVP runs are non-ephemeral by default so `-ThreadId ` can resume and poll later. `-MaxRuntimeSeconds ` is passed into worker runtime; timeout writes a failed worker receipt and exits. Failed modeling now blocks downstream verification until the failed result is reviewed. - Current Mom-ready status: the normal MVP pass reaches Face -> coordinator -> detached runtime -> heartbeat sleep, and modeling workers now complete through the ChatGPT subscription transport. The first failure was a stack of violated observability/runtime invariants: worker prompts prepended the whole shared persistent-memory rite, Responses frame liveness was invisible until completion, and the runtime tried to persist hundreds of text deltas before completing the worker job. Role/reorient workers now get a compact Epiphany worker boundary instead of full persistent memory; runtime-spine records sampled raw Responses frame kinds with small previews; contiguous reasoning/text deltas compact before durable storage; and live proofs completed `2fe38dcd-d99e-4c73-9a58-afcc81f851c7`, `241e3851-e3ea-4877-a63b-0d2bbd96a7e2`, and `85149a26-6975-403f-ac93-092b717c5825` instead of timing out. The second failure was stale lifecycle authority: completed runtime jobs remained as unresolved `runtime_links`, replacement launches treated historical active links as current, and one bad validation path opened an orphan job before rejecting the state patch. Latest-link-wins is now the runtime-link invariant, terminal links project completed jobs, stale active history cannot veto replacement, launch validation happens before opening runtime jobs, and completed-but-unreviewable modeling findings stop for review instead of relaunching the same lane. The remaining concrete blocker is architectural: the MVP coordinator has no executable Eyes/source-gather lane. A modeler can return `regather-needed`, but it cannot inspect the missing stream-storage source itself; choose between adding a real research/Eyes specialist lane or routing this regather to the main implementation agent with explicit statePatch banking. - Local operator runs now write typed CultMesh intent/receipt documents to `.epiphany-run/cultmesh/operator-runs.ccmp` through `epiphany-operator-run`. The wrapper writes intent before acting and a completion receipt after success; this is the local consent/trace rail, not a hidden scheduler queue. @@ -140,7 +140,7 @@ remembers doctrine; the branch remembers the blade. - The native runtime-spine hello now publishes the interactive surface catalog, not just the deep runtime bones. In addition to runtime/session/job/memory/heartbeat/ledger documents, Aquarium-discoverable contracts now advertise scene, pressure, reorient, CRRC, jobs, roles, role-result, reorient-result, planning, coordinator, Face, Void memory, repo initialization/birth runner, Rider bridge, and Unity bridge surfaces, with explicit read-only versus coordinator-owned intent/receipt posture. The point is to let Aquarium discover operator affordances from CultNet instead of hard-coding a secret menu of verbs. - Epiphany now publishes those CultNet receipts locally under `schemas/cultnet/`, and `epiphany-runtime-spine schema-catalog --include-schema-json true` emits a merged builtin-plus-local schema catalog Aquarium can consume directly. The local catalog covers runtime-spine documents, durable agent/heartbeat/ledger state, operator-safe `epiphany.surface.*` projections, control intents, and receipt/artifact payloads. The vendored `cultnet-rs` wire contract was aligned with the C# canon at the same time: raw document replication now keys on `schemaId` and `recordKey`, snapshot filters use `schemaIds` / `recordKeys`, and hello supports typed mutation-contract advertisement instead of the old half-remembered payload-schema-version folklore. - Epiphany now owns the canonical schema paperwork locally under `schemas/`. The key receipts are `schemas/cultnet/gamecult.persona_state.v0.schema.json`, `schemas/cultnet/epiphany.work_organ_state.v0.schema.json`, `schemas/canonical-agent-state-schema.md`, `schemas/agent-state-variable-glossary.md`, `schemas/organ-state-profiles.md`, `schemas/repo-personality-birth-projection.md`, and `schemas/heartbeat-state-schema.md`. If a standing trait name like `routing_discipline` changes, or if organ-state, Persona, heartbeat, or birth-projection semantics move, update those docs in the same pass instead of relying on old Ghostlight notes or live store archaeology. -- The schema doctrine now makes the profile split explicit: resident Epiphany organs are `work_organ` state with lean role memory and growth via rumination/distillation, while Face is the Epiphany organ that may use portable `persona` state shared with VoidBot repo Faces and Ghostlight characters. Work organs do not inherit Persona affect, social bonds, or status-read machinery. PersonaState now has explicit provenance and required presentation surfaces, `date-time` timestamps, `candidateActions` as the generic pressure/action field, `voidbotProjection.candidateInterventions` only as a VoidBot compatibility projection, strict anchored thoughts, extension data marked non-authoritative, custom enum companion labels, and typed affect records for bonds/status reads/doctrine stances. `candidateActions.actions` and `privateNotes` are deliberate v0 simplifications, not authority surfaces. `epiphany-agent-memory-store status` and `epiphany-character-loop` now surface profile classification on the wire as `organStateProfile`. +- The schema doctrine now makes the profile split explicit: resident Epiphany organs are `work_organ` state with lean role memory and growth via rumination/distillation, while Face is the Epiphany organ that may use portable `persona` state shared with VoidBot repo Faces and Ghostlight characters. Work organs do not inherit Persona affect, social bonds, or status-read machinery. PersonaState now has explicit provenance and required presentation surfaces, `date-time` timestamps, typed `candidateActions` with action type/target/readiness/risk/urgency/confidence/evidence/expiry, `voidbotProjection.candidateInterventions` only as a VoidBot compatibility projection, strict anchored thoughts, extension data marked non-authoritative, custom enum companion labels, and typed affect records for bonds/status reads/doctrine stances. `privateNotes` remain a deliberate v0 simplification, not an authority surface. `epiphany-agent-memory-store status` and `epiphany-character-loop` now surface profile classification on the wire as `organStateProfile`. - Face packets now carry deterministic Ghostlight-style `projectionSeed`, `appraisalSeed`, and `reactionSeed` surfaces rebuilt from local organ traits, relationship memories, perceived overlays, and visible stimulus so the public mouth can use actual projection/appraisal machinery instead of decorative prompt text. Also record this now before some future fool hard-codes singularity: multiple Persona actors are part of the plan, even though the current MVP still routes through one `face` role. - Repo personality initialization now has a terrain-reduced plan and native birth 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 startup` now checks for accepted personality/memory initialization records, launches packet generation only when absent, and `accept-init` can route reviewed role `selfPatch` candidates into initial role memory, stamp the newborn Ghostlight trait lattice from deterministic role projections, and seed heartbeat physiology from the same typed role personality projections. The birth specialists are startup-only initialization actuators, not heartbeat lanes; heartbeat receives only the accepted physiology seed. `epiphany-repo-birth-runner` owns the startup-only execution path through `epiphany-model-runtime` typed model-request documents plus runtime-spine receipts and reviewable `result.json`; the old Codex CLI executor path is cut so birth specialists cannot receive Codex prompt wrappers. The remaining seam is Aquarium review/action surfacing. After accepted birth, personality drift belongs to heartbeat, mood, rumination, sleep consolidation, lived evidence, and reviewed `selfPatch`, not repeated startup distillation. - Repo trajectory initialization is now a separate birth-only organ. `epiphany-repo-personality` derives a typed `repo_trajectory_report` from early-history, recent-history, doctrine/content excerpts, and deterministic theme scoring, and `trajectory-packet` renders a startup-only Repo Trajectory Distiller prompt/packet so Self can review historical direction, self-image, implicit goals, and anti-goals before the newborn wakes. diff --git a/notes/voidbot-routine-adoption-plan.md b/notes/voidbot-routine-adoption-plan.md index 0351f013..4ba58542 100644 --- a/notes/voidbot-routine-adoption-plan.md +++ b/notes/voidbot-routine-adoption-plan.md @@ -154,10 +154,12 @@ anchored thoughts because they behave like pressure records. The baseline also requires a public `presentation` block, annotates timestamps as JSON Schema `date-time`, and gives every `custom` enum path a companion -custom-label field. `candidateActions.actions` and `privateNotes` stay simple -for v0 interchange; if either begins carrying routing, readiness, expiry, -provenance, or action authority, promote it into a typed v1 record instead of -letting raw strings or generic thoughts grow a steering wheel. +custom-label field. `candidateActions.actions` are typed action records now: +action type, target, optional delivery target, readiness, risk, urgency, +confidence, evidence, timestamps, and expiry. `privateNotes` stay simple for v0 +interchange; if they begin carrying provenance or authority, promote them into +typed private-note records instead of letting raw strings grow a steering +wheel. CultNet is not just ergonomic framing. It also carries CultLib-style auth and session semantics: diff --git a/schemas/README.md b/schemas/README.md index 2559f056..375ceeea 100644 --- a/schemas/README.md +++ b/schemas/README.md @@ -15,11 +15,11 @@ developer's damp recollection. - [cultnet/gamecult.persona_state.v0.schema.json](./cultnet/gamecult.persona_state.v0.schema.json): portable Persona state contract for Epiphany Face, VoidBot repo Faces, and Ghostlight characters. It carries explicit provenance, public presentation - metadata, generic `candidateActions`, and a non-authoritative extension bag - for source-specific fields; social bonds, status reads, and doctrine stances - are typed affect records rather than generic thought blobs. Timestamps use - JSON Schema `date-time`, `presentation` is required, and `custom` enum values - have companion custom-label fields. + metadata, typed `candidateActions`, and a non-authoritative extension bag for + source-specific fields; social bonds, status reads, and doctrine stances are + typed affect records rather than generic thought blobs. Timestamps use JSON + Schema `date-time`, `presentation` is required, and `custom` enum values have + companion custom-label fields. - [cultnet/epiphany.work_organ_state.v0.schema.json](./cultnet/epiphany.work_organ_state.v0.schema.json): light function-shaped state for Epiphany internal work organs. - [canonical-agent-state-schema.md](./canonical-agent-state-schema.md): diff --git a/schemas/canonical-agent-state-schema.md b/schemas/canonical-agent-state-schema.md index b311c04e..8e3eaf2c 100644 --- a/schemas/canonical-agent-state-schema.md +++ b/schemas/canonical-agent-state-schema.md @@ -171,12 +171,13 @@ Needs remain anchored thoughts because they are closer to pressure records than relationship facts. Every enum that allows `custom` has a companion custom-label field, so custom -does not become a stringly-typed category leak. `candidateActions.actions` -remain anchored thoughts in v0; richer action records with action type, -delivery target, risk, readiness, and expiry belong in the next version if the -shared contract starts carrying executable action pressure. `privateNotes` are -raw strings for v0 interchange only and must not become portable state -authority without being promoted into typed private-note records. +does not become a stringly-typed category leak. `candidateActions.actions` are +typed candidate-action records with action type, target, optional delivery +target, readiness, risk level, urgency, confidence, evidence, and expiry. They +may cite anchored thoughts as evidence, but they are not generic thoughts +pretending to be actions. `privateNotes` are raw strings for v0 interchange +only and must not become portable state authority without being promoted into +typed private-note records. ## Project Truth Versus Self Truth diff --git a/schemas/cultnet/gamecult.persona_state.v0.schema.json b/schemas/cultnet/gamecult.persona_state.v0.schema.json index 7396d633..2537628b 100644 --- a/schemas/cultnet/gamecult.persona_state.v0.schema.json +++ b/schemas/cultnet/gamecult.persona_state.v0.schema.json @@ -484,7 +484,7 @@ "actions": { "type": "array", "items": { - "$ref": "#/definitions/anchoredThought" + "$ref": "#/definitions/candidateAction" }, "default": [] } @@ -493,6 +493,140 @@ "actions" ] }, + "candidateAction": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/thoughtStatus" + }, + "actionType": { + "type": "string", + "enum": [ + "speak", + "draft", + "ask", + "propose", + "inspect", + "notify", + "wait", + "remember", + "handoff", + "render", + "external_action", + "custom" + ] + }, + "customActionType": { + "type": "string" + }, + "readiness": { + "type": "string", + "enum": [ + "draft", + "ready", + "blocked", + "waiting", + "expired" + ] + }, + "riskLevel": { + "type": "string", + "enum": [ + "none", + "low", + "medium", + "high", + "severe", + "unknown" + ] + }, + "target": { + "$ref": "#/definitions/target" + }, + "deliveryTarget": { + "$ref": "#/definitions/target" + }, + "summary": { + "type": "string" + }, + "rationale": { + "type": "string" + }, + "urgency": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "confidence": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "constraints": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "evidence": { + "type": "array", + "items": { + "$ref": "#/definitions/anchoredThought" + }, + "default": [] + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + }, + "extensions": { + "$ref": "#/definitions/extensions" + } + }, + "required": [ + "id", + "status", + "actionType", + "readiness", + "riskLevel", + "target", + "summary", + "createdAt", + "updatedAt" + ], + "allOf": [ + { + "if": { + "properties": { + "actionType": { + "const": "custom" + } + }, + "required": [ + "actionType" + ] + }, + "then": { + "required": [ + "customActionType" + ] + } + } + ] + }, "voidbotProjection": { "type": "object", "additionalProperties": false, @@ -501,7 +635,7 @@ "type": "array", "description": "VoidBot-flavored projection of candidateActions for repo Face routines. This is not the generic PersonaState action authority.", "items": { - "$ref": "#/definitions/anchoredThought" + "$ref": "#/definitions/candidateAction" }, "default": [] } diff --git a/schemas/organ-state-profiles.md b/schemas/organ-state-profiles.md index fd4c98e5..c6901efc 100644 --- a/schemas/organ-state-profiles.md +++ b/schemas/organ-state-profiles.md @@ -100,9 +100,10 @@ usable by Ghostlight and Epiphany Face. The generic action surface is `candidateActions`. VoidBot may project those actions back into `voidbotProjection.candidateInterventions` for repo-Face routine compatibility, but that projection does not own the portable contract. -In v0, candidate actions remain anchored thoughts. That is enough for shared -pressure and intention exchange, but richer action records with action type, -delivery target, risk, readiness, and expiry are the obvious v1 pressure. +Candidate actions are typed records with action type, target, optional delivery +target, readiness, risk level, urgency, confidence, evidence, and expiry. They +may point back to anchored thoughts as evidence, but they are not themselves +generic thoughts wearing an action hat. `anchoredThought.extensions` is a quarantine bag for source-specific fields. Portable consumers may preserve those fields, but they are not authoritative diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 06f82f9fbcff87c17f960c2300d62b35c847e5b5..48c01fdb99fbba1244f6f7457cc2fd1f9e6dde80 100644 GIT binary patch delta 371 zcmaKnF-rqM5QV)f10q`3h%jL3C7cH;rc+ysfQNrq&GB)MDJO>tddQZHICa7yNMV##UL8uO$yn(7 z7ziUXVpM5HD5xBbWh(9f0l*G!yNV^QgH!1bO2%O*nx(H}oG