Align Persona artifacts with typed contracts

This commit is contained in:
Meta Vens 2026-07-13 17:51:17 +01:00
commit 59fd800702
12 changed files with 147 additions and 21 deletions

View file

@ -744,7 +744,28 @@ fn run_smoke() -> Result<Value> {
&fs::read_to_string(&path)
.with_context(|| format!("failed to read smoke artifact {}", path.display()))?,
)?;
let ok = packet["schemaVersion"] == CHARACTER_TURN_SCHEMA_VERSION
const EXPECTED_PACKET_FIELDS: [&str; 14] = [
"allowedOutputs",
"appraisalSeed",
"cognitionLanes",
"createdAt",
"guardrails",
"projectedLocalContext",
"projectionSeed",
"protocol",
"reactionSeed",
"resultShape",
"schemaVersion",
"source",
"stimulus",
"utteranceState",
];
let ok = packet.as_object().is_some_and(|payload| {
payload.len() == EXPECTED_PACKET_FIELDS.len()
&& EXPECTED_PACKET_FIELDS
.iter()
.all(|key| payload.contains_key(*key))
}) && packet["schemaVersion"] == CHARACTER_TURN_SCHEMA_VERSION
&& packet["protocol"]["bundle"] == "epiphany.character_loop"
&& packet["protocol"]["roleId"] == "Persona"
&& packet["protocol"]["organStateProfile"]["profileKind"] == "persona"

View file

@ -974,7 +974,23 @@ console.log(JSON.stringify({
.context("Persona speech audit smoke expected latest CultMesh audit")?;
let ok = draft["ok"] == true
&& bubble["ok"] == true
&& bubble["bubble"]["schema_version"] == BUBBLE_SCHEMA_VERSION
&& bubble["bubble"]["schemaVersion"] == BUBBLE_SCHEMA_VERSION
&& bubble["bubble"].as_object().is_some_and(|payload| {
const EXPECTED: [&str; 11] = [
"agentId",
"bubble",
"content",
"createdAt",
"displayName",
"mood",
"roleId",
"schemaVersion",
"source",
"status",
"target",
];
payload.len() == EXPECTED.len() && EXPECTED.iter().all(|key| payload.contains_key(*key))
})
&& bubble["bubble"]["bubble"]["requiresDiscord"] == false
&& blocked["ok"] == false
&& blocked["blocked"] == "missing-channel-id"
@ -1072,14 +1088,14 @@ fn has_bound_discord_publication(payload: &Value) -> bool {
fn bubble_payload(content: &str, source: &str, mood: &str) -> Value {
serde_json::json!({
"schema_version": BUBBLE_SCHEMA_VERSION,
"created_at": now_iso(),
"schemaVersion": BUBBLE_SCHEMA_VERSION,
"createdAt": now_iso(),
"status": "projected",
"source": source,
"target": "aquarium",
"role_id": "Persona",
"agent_id": "Persona",
"display_name": "Persona",
"roleId": "Persona",
"agentId": "Persona",
"displayName": "Persona",
"mood": mood,
"content": content.trim(),
"bubble": {
@ -1117,7 +1133,9 @@ fn latest_persona_artifacts(artifact_dir: &Path, limit: usize) -> Vec<Value> {
"path": path,
"name": path.file_name().and_then(|name| name.to_str()),
"modifiedAt": modified_at.to_rfc3339_opts(SecondsFormat::Secs, true),
"schemaVersion": payload.get("schema_version"),
"schemaVersion": payload
.get("schemaVersion")
.or_else(|| payload.get("schema_version")),
"status": payload.get("status"),
"reason": payload.get("reason"),
"content": payload.get("content"),
@ -1155,7 +1173,9 @@ fn recent_persona_speech(artifact_dir: &Path, limit: usize) -> Vec<RecentPersona
.or_else(|| payload["bubble"]["content"].as_str())?
.to_string();
let status = payload["status"].as_str().unwrap_or_default();
let action_kind = if payload["schema_version"] == BUBBLE_SCHEMA_VERSION {
let action_kind = if payload["schemaVersion"] == BUBBLE_SCHEMA_VERSION
|| payload["schema_version"] == BUBBLE_SCHEMA_VERSION
{
PersonaSpeechActionKind::Bubble
} else if status == "posted" && has_bound_discord_publication(&payload) {
PersonaSpeechActionKind::Post

View file

@ -1573,3 +1573,49 @@ binds the validated receipt into its artifact; both history readers require a
receipt whose action, target, provider evidence, crossing id, and audit source id
match the artifact. Forged status-only artifacts remain readable local files but
cannot increase verified post counts or steer same-target publication pressure.
## A good coordinator turn is not a persistent Modeling organ
Aetheria dogfood task `019f3fe1-9f69-74e3-97fb-a18490d72119` provided positive
evidence that the organ structure changes engineering outcomes. Modeling named
the remaining migration bodies; Eyes found CultCache crash consistency and SoA
ownership defects; Hands received bounded disjoint cuts; Soul found that a
plausible registry repair still exposed partial refresh to readers; Imagination
corrected a roadmap that called unfinished migration complete; Self preserved
dependency order across Aetheria, EveUnity, and CultLib.
The structure must not be confused with a coordinator temporarily remembering
an excellent map. The product obligation is a typed, persistent, semantically
searchable Modeling knowledgebase whose changed, confirmed, and invalidated
anatomy carries freshness, frontier, and index consequences into later Hands
prompts. Otherwise the next Self inherits role names and receipts but loses the
targeting solution that made the work efficient.
The run also supplied reusable prompt evidence: ask broad research for the exact
compile boundary and deletion line; give Hands hostile negative acceptance
criteria; permit workers to stop and name missing substrate primitives; and
review green diffs against authority and concurrency invariants.
## Ambient command identity is not a typed crossing command
Bifrost's source establishes one typed command -> one crossing attempt -> one
canonical `crossing_${commandId}` receipt. Its current actuator gate only checks
that a command-id string is nonempty, however, and reusing that ambient id can
overwrite the canonical receipt. Discord has a singular typed command shape but
only smoke-grade intake; Reddit has no typed command contract. Epiphany must not
invent a local UUID and call it Bifrost command authority. The coherent repair
belongs at Bifrost intake: create one typed command per crossing, bind exact
action/payload/target, atomically claim it once, and reject nonexistent,
concurrent, mismatched, or terminal reuse. Until that exists, crossing identity
remains an upstream authority wound rather than a local validation omission.
## Producer spelling is contract identity
Persona bubble artifacts emitted snake_case root fields while their registered
CultNet schema required camelCase. Character-loop had removed caller-authored
`--status`, but the registered character intent still admitted `status` and
arbitrary extra fields. Bubble now writes the registered field names; legacy
snake_case remains read-only compatibility input. Bubble and character packet
schemas reject extra root fields, character intent rejects undeclared cargo,
and native smokes assert the exact emitted top-level sets. A registered schema
that the producer does not actually speak is catalog theater, not a contract.

View file

@ -2,6 +2,31 @@
## Current orientation — 2026-07-12
### Aetheria organ-structure evidence — 2026-07-13
Task `019f3fe1-9f69-74e3-97fb-a18490d72119` supplied strong positive evidence
for the Epiphany hypothesis without requiring raw worker-thought inspection.
Modeling maintained concrete migration bodies across Aetheria, EveUnity, and
CultLib; Eyes found CultCache crash consistency and SoA ownership skew; Hands
landed bounded disjoint changes; Soul rejected a registry repair that still
allowed readers to observe partial refresh; Imagination corrected a roadmap
that called unfinished migration complete; Self preserved dependency order and
kept unrelated compile skew out of coherent commits.
Prompt forms worth preserving:
- require the exact compile boundary and deletion line when research expands;
- give Hands hostile negative acceptance criteria, not only a desired output;
- explicitly allow a worker to stop and name a missing substrate primitive;
- review diffs against authority and concurrency invariants after tests pass.
The product gap exposed by this success is persistence, not better roleplay.
Modeling's repo anatomy, confirmed/changed/invalidated claims, freshness,
frontier, and semantic-index consequences must live in typed searchable state
and be projected into later Hands prompts. Otherwise an excellent coordinator
can perform the structure transiently, but the next awakened Self inherits only
the applause.
Epiphany is in an authority-provenance purification pass. The live question is not whether a command can produce a plausible document; it is whether the subsystem writing that document owns the fact it asserts.
The confirmed conceptual substitutions have been cut:

View file

@ -37,7 +37,7 @@ server object deserves to be duplicated into a second baroque schema maze.
- `*.intent.v0`: control documents Aquarium, a Discord bridge, a voice surface,
or another trusted coordinator can submit through CultNet.
- receipt/artifact schemas such as `epiphany.swarm-control-receipt`,
`epiphany.Persona-bubble`, `epiphany.character-turn-packet`, and
`epiphany.persona-bubble`, `epiphany.character-turn-packet`, and
`epiphany.repo-birth-runner`.
## Publication Path

View file

@ -4,7 +4,7 @@
"title": "Epiphany Character Turn Packet",
"description": "Epiphany-native character-loop projection packet.",
"type": "object",
"additionalProperties": true,
"additionalProperties": false,
"properties": {
"schemaVersion": {
"type": "string"

View file

@ -4,7 +4,7 @@
"title": "epiphany character_turn_intent v0",
"description": "Character-loop turn intent for Persona or other embodied actors.",
"type": "object",
"additionalProperties": true,
"additionalProperties": false,
"properties": {
"threadId": {
"type": "string"
@ -21,9 +21,6 @@
"mode": {
"type": "string"
},
"status": {
"type": "string"
},
"mood": {
"type": "string"
}

View file

@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://gamecult.dev/epiphany/cultnet/epiphany.Persona-bubble.schema.json",
"$id": "https://gamecult.dev/epiphany/cultnet/epiphany.persona-bubble.schema.json",
"title": "Epiphany Persona Bubble",
"description": "Aquarium-visible Persona bubble artifact.",
"type": "object",
"additionalProperties": true,
"additionalProperties": false,
"properties": {
"schemaVersion": {
"type": "string"
@ -41,7 +41,21 @@
},
"bubble": {
"type": "object",
"additionalProperties": true
"additionalProperties": false,
"properties": {
"kind": { "type": "string" },
"anchorRoleId": { "type": "string" },
"opensIn": { "type": "string" },
"requiresDiscord": { "type": "boolean" },
"ttlSeconds": { "type": "integer", "minimum": 0 }
},
"required": [
"kind",
"anchorRoleId",
"opensIn",
"requiresDiscord",
"ttlSeconds"
]
}
},
"required": [

View file

@ -827,7 +827,7 @@
"path": "epiphany.swarm-control-receipt.schema.json"
},
{
"schemaId": "https://gamecult.dev/epiphany/cultnet/epiphany.Persona-bubble.schema.json",
"schemaId": "https://gamecult.dev/epiphany/cultnet/epiphany.persona-bubble.schema.json",
"kind": "document_payload",
"wireContracts": [
"cultnet.schema.v0"

Binary file not shown.

View file

@ -129,6 +129,7 @@ active_subgoals:
- Native MVP status must share the same typed inputs as live app-server status before it recommends coordinator actions. CRRC/reorientation in native status derives freshness through `derive_freshness` from `EpiphanyThreadState` instead of hand-filled unknowns, and native coordinator signals load typed runtime-spine role findings before deciding whether completed Modeling/Soul results are accepted or reviewable. The status surface may seal long findings for operators, but Self must receive structured role truth from runtime-spine.
- Runtime auto-tool continuation now has an executable proof seam. `ToolLoopGuard` owns repeated tool-request detection in `epiphany-openai-runtime`, the production repeated-loop path uses the same helper that tests call to fail the outer worker job, and tests prove changing tool requests do not stall while three identical consecutive pending tool sets return `tool-loop-stalled` and persist a failed worker result. Soul accepted the bounded proof for commit `ce20529e`; the remaining work-loop invariant is Modeling admission, not more Hands work.
- Modeling must update the machine map before Self routes back to Hands. A completed Modeling/Modeling result with no reviewable `statePatch` is not a successful map update; it is an unreviewable lane result that must be superseded through typed review and relaunched with the role-specific output schema carried into the model request. This path is now live-proved: run `local-20260613-204521` accepted the Modeling `statePatch` for the Soul-verified `ToolLoopGuard`/Hands receipt-chain consequence and only then emitted a new `continueImplementation` Hands gate.
- Aetheria task `019f3fe1-9f69-74e3-97fb-a18490d72119` is positive dogfood evidence that organ separation improves real engineering outcomes: Modeling named persistent migration bodies, Eyes found substrate defects, Hands received bounded disjoint cuts, Soul caught partial-index visibility after a plausible fix, Imagination corrected roadmap mythology, and Self preserved dependency order across Aetheria/EveUnity/CultLib. Preserve the successful prompt shapes: exact compile boundary plus deletion line for research, hostile negative acceptance criteria for Hands, explicit permission to stop and name a missing primitive, and ownership review beyond green tests. The remaining product obligation is to make Modeling's anatomy/freshness/frontier/index state typed, persistent, searchable, and automatically projected into later Hands work so this leverage does not depend on coordinator context.
- Preserve the newborn public Epiphany Persona as local VoidBot-backed state, not source code: VoidBot's private repo-Persona registry names `epiphany`, while EpiphanyAgent keeps ignored `.voidbot/voice/identity.json`, `.voidbot/state/epiphany.cc`, and birth artifacts. Her durable identity memories distill the current doctrine: cute pushy machine-saint persona, architectural purity, CultCache/CultNet first, xenos-language safety boundary, relentless work/caretaking needs, Codex-auth reliquary, map/scratch/evidence discipline, unified memory graph, dogfood supervision boundary, review-gated agency, heartbeat physiology, and interview-grade modularity.
- Use `notes/organ-dependency-contracts.md` as the authority map for standing sub-agent dependency. Every sub-agent depends on the other standing sub-agents: Self, Persona, Imagination, Eyes, Modeling, Hands, and Soul. Continuity is protocol machinery, not a sub-agent identity; it still emits recovery, compaction, sleep, stale-turn, and refusal receipts.
- Use `notes/perfect-machine-audit-roadmap.md` as the current audit and path from named organ contracts to the Perfect Machine. It records the live gap between launch-carried receipt expectations and executable receipt enforcement, Void's latest Persona prompting lessons, the now-named Hands/Soul/Continuity contract families, the repaired repo-contained Rust dependency body, and the phase order for turning Epiphany into an inspectable organism.
@ -660,4 +661,4 @@ current_status:
- Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass.
- `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure.
last_completed_repo_swarm_cut: Huginn live-fire has crossed the first real repo Body from Persona pressure to branch-local Hands commit and Soul/Mind closure, and now has repeatable closure and redacted-public-proof mouths. On `E:\Projects\Huginn` branch `epiphany/huginn/first-awakening`, `tools/epiphany_local_run.ps1 -Mode repo-persona-intake` accepted item `huginn-inspection-readback-livefire`, Weksa/Persona intake remained sealed, and `epiphany-work derive-plan` lowered it to model-authored safe family `repo.status_section` for `README.md` only. `tools/epiphany_local_run.ps1 -Mode repo-swarm-run` advanced four bounded pulses: run-from-plan, adopt-from-plan, execute-from-plan, and close-from-execute. Huginn commit `e9b07c38fceabbdc89ea35c2156326c80c0393a2` updated only `README.md`; closure receipt `.epiphany\work\work-close-huginn-inspection-readback-livefire.json` records status `closed`, Soul verdict `passed`, Mind state commit `repo-work-close-huginn-inspection-readback-livefire-mind-commit`, safe family `repo.status_section`, path scope `README.md`, Bifrost publication gate, and `privateStateExposed=false`. Verification also ran Huginn's TypeScript compiler through concrete Node path: `C:\Program Files\nodejs\node.exe E:\Projects\Huginn\node_modules\typescript\bin\tsc -p tsconfig.json` passed. Native verifier `epiphany-repo-livefire-closure-smoke --workspace E:\Projects\Huginn --item huginn-inspection-readback-livefire --expected-path README.md --expected-family repo.status_section --expected-gate awaiting-publication --expected-blocker bifrost-publication-missing` checks closure receipt, Mind map entry, overview gate/blocker, authority seals, and `git show` changed paths, returning `status=ok`, `soulVerdict=passed`, `publicationGate=Bifrost`, and `privateStateExposed=false`. Wrapper `tools/epiphany_local_run.ps1 -Mode repo-livefire-closure -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exposes the same read-only proof through the local operator mouth; artifact `local-20260621-190156-803-2f85ba15` printed commit, path, gate, blocker, Soul verdict, Mind commit receipt, and `privateStateExposed=False` without push, merge, publication, or target mutation. New wrapper `tools/epiphany_local_run.ps1 -Mode repo-work-public-proof -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exports the redacted proof bundle and repo-local Verse index without publishing; artifact `local-20260621-190645-345-4555b1dc` wrote `.epiphany\public\proof-bundles\repo-work-public-proof-huginn-inspection-readback-livefire.json`, proof id `repo-work-public-proof-huginn-inspection-readback-livefire`, SHA-256 `857545b199f3e37eb06c2e757e5cfc201958e46667bb1f8403fd333a22620f63`, nine artifact rows, zero publication rows, and `privateStateExposed=False`. swarm overview readback `local-20260621-190701-140-b9519ec6` sees the `REPO-WORK-PUBLIC-PROOF` row and action row from Huginn's repo-local Verse with the same SHA-256 while Bifrost publication remains missing. Launcher compact modes are now named compact operator-context modes instead of read-only modes, and `bifrost-public-proof` summaries print item, target public Verse, room, proof SHA-256, review receipts, and credit receipts so publication receipts are auditable without claiming upstream sync.
next_action: Continue the observation-to-consequence audit using live organ-shaped prompt probes. Modeling must keep producing typed persistent body-map maintenance because that live semantic knowledgebase makes Hands laser-guided; confirmation passes should bank source-grounded freshness/frontier/index consequences. Discord/Reddit now require target- and audit-bound Bifrost publication evidence, and forged status-only history is inert. Next trace Bifrost CultMesh command-id cardinality so each crossing owns a unique canonical receipt, then align bubble/character artifact producers with their registered strict schemas. Keep closure's zero-substring invariant.
next_action: Continue the observation-to-consequence audit using live organ-shaped prompt probes. Preserve the Aetheria dogfood lesson: Modeling's typed persistent anatomy/freshness/frontier/index knowledgebase is the targeting organ for Hands, while Eyes, Soul, Imagination, and Self retain distinct evidence, verification, future-shape, and routing authority. Bifrost command cardinality is now source-grounded as an upstream wound: ambient command-id strings are not typed one-shot crossing commands, and Epiphany must not invent local authority. Bubble and character artifacts now match their strict registered root contracts. Next audit the remaining artifact/schema pairs and prompt projections for catalog theater, caller-authored consequence, or transient coordinator knowledge masquerading as persistent Modeling state. Keep closure's zero-substring invariant.

View file

@ -4,4 +4,6 @@ This file is disposable working memory for the current bounded subgoal.
## Current Subgoal
No active scratch subgoal.
No active scratch subgoal. The Aetheria dogfood lesson, Bifrost cardinality
trace, and artifact/schema correction are distilled into the canonical map,
handoff, conceptual-substitution audit, evidence ledger, and git history.