Exercise responder lore lanes

This commit is contained in:
Meta Vens 2026-05-02 10:50:36 +01:00
commit ef8828de9c
13 changed files with 4032 additions and 23 deletions

View file

@ -42,7 +42,11 @@ The v0 packet seam is:
- `npm run responder-packets:validate`
- `schemas/responder-output.schema.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.capture.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.mutation.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-v0.capture.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-lane-comparison.v0.json`
- `tools/validate_responder_outputs.py`
- `tools/apply_responder_output_mutation.py`
- `npm run responder-outputs:validate`
The first example is accepted as draft. It is suitable for testing the sandbox
@ -120,3 +124,9 @@ A responder output capture preserves:
The raw output must parse to the reviewed `parsed_output` exactly. If the
coordinator edits prose, repairs schema, removes leakage, or corrects lore, the
capture must say so directly.
The first lane comparison found the expected tradeoff. Packet-only output gave a
clean runtime-parity conditional bay decision. Research-augmented output added
stronger Aetheria-native texture: heat-debt timing, rescue-ledger burden,
dockfall responsibility, and Aya sanctuary capacity politics. Both are useful;
neither should impersonate the other.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
{
"schema_version": "ghostlight.responder_lane_comparison.v0",
"comparison_id": "comparison.cold_wake.sanctuary_intake.sella.packet_vs_research.v0",
"packet_only_capture_ref": "experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.capture.json",
"research_augmented_capture_ref": "experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-v0.capture.json",
"summary": "The research-augmented response is more Aetheria-native and institutionally textured, while the packet-only response is cleaner runtime proof that bounded context can produce a usable conditional answer.",
"shared_strengths": [
"Both preserve unresolved packet personhood.",
"Both require Maer to attach material responsibility before sanctuary capacity is consumed.",
"Both keep state and relationship updates as candidates rather than canonical truth."
],
"packet_only_strengths": [
"Cleaner runtime parity: the output depends only on the packet prompt.",
"Clear action label and plain conditional-bay consequence.",
"Easier to materialize into mutation without schema widening."
],
"research_augmented_strengths": [
"Uses heat-debt timing as a concrete Cold Wake pressure surface.",
"Names rescue ledger responsibility in a way that fits Navigator institutions.",
"Frames Aya sanctuary pressure as practical capacity politics rather than generic compassion.",
"Produces stronger Sella voice: sharper, more tired, and more politically grounded."
],
"runtime_retrieval_implications": [
"Packet-only runtime should retrieve a compact Cold Wake heat-debt excerpt when heat timing matters.",
"Packet-only runtime should retrieve Navigator rescue ledger obligations when Maer invokes rescue legitimacy.",
"Packet-only runtime should retrieve Aya sanctuary capacity doctrine when Sella is making triage decisions."
],
"training_implications": [
"Use packet_only examples to train and evaluate bounded-context runtime behavior.",
"Use research_augmented examples to bake Aetheria tone, faction priors, and institutional texture into responder models.",
"Do not merge the two lanes without preserving generation_lane and lore_access metadata."
],
"review_status": "accepted_as_draft"
}

View file

@ -0,0 +1,98 @@
{
"schema_version": "ghostlight.responder_output.v0",
"capture_id": "responder.cold_wake.sanctuary_intake.sella.research_augmented.v0",
"review_status": "accepted_as_draft",
"fixture_lane": "historical_grounded",
"canon_status": "single_history",
"packet_ref": "examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.v1.json",
"coordinator_artifact_ref": "examples/coordinator/cold-wake-sanctuary-intake.v0.json",
"responder_agent_id": "sella_ren",
"generation_lane": "research_augmented",
"lore_access": {
"mode": "scoped_repository_search",
"consulted_refs": [
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Aya Collective.md#chunk2",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md#chunk0",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md#chunk0",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md#chunk1",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md#chunk2",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md#chunk3",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md#chunk0"
]
},
"isolation": {
"isolation_method": "subagent_no_fork",
"fork_context": false,
"visible_input_ref": "research_augmented prompt with scoped AetheriaLore refs; see lore_access.consulted_refs",
"hidden_context_refs": [
"maer_tidecall.canonical_private_state",
"coordinator_artifact.coordinator_decision.rationale",
"author_only.packet_personhood_resolution",
"future_branch_plans"
],
"worker_model_family": "frontier_worker_no_fork"
},
"raw_output": "{\"responder_agent_id\":\"sella_ren\",\"action_label\":\"inspect_object\",\"visible_action\":\"Sella leans closer to the shared clinic display, pinches the routing trace wider with two fingers, and marks three telemetry gaps in amber before setting one palm flat against the bed-status column beside it.\",\"spoken_text\":\"The math supports review, not intake. I can hold a conditional slot until the next heat-debt update, and only if your rescue ledger names who carries repair, escort, and quarantine burden after dockfall. I will not turn a corrupted packet into a body by wanting it hard enough. I also will not let the tribunal make sanctuary spend the courage it declined to own.\",\"private_interpretation\":\"Maer is not grandstanding. That makes it worse, naturally, because honest rescue still eats air, beds, repair hours, staff hands, and the last clean patience in the room. The routing logic has the ugly shape of distress, but ugly shapes are not people, and Sella has buried enough almost-certainties to distrust any mercy that arrives before capacity accounting.\",\"intended_effect\":\"Keep the possible survivor inside the decision path without treating the packet as proof, force Maer to attach material obligations to the rescue claim, and prevent sanctuary from becoming the quiet place where everyone else deposits moral debt.\",\"state_update_candidates\":[{\"key\":\"clinic_intake_status\",\"value\":\"conditional_review_only_pending_heat_debt_and_ledger_commitments\"},{\"key\":\"sanctuary_capacity_pressure\",\"value\":\"near_exhausted_beds_and_repair_capacity_remain_binding_limits\"},{\"key\":\"packet_status\",\"value\":\"distress_pattern_possible_but_personhood_unresolved\"}],\"relationship_update_candidates\":[{\"target_agent_id\":\"maer\",\"value\":\"Sella acknowledges Maer's rescue ethic while requiring him to bind rescue language to logistics, ledger responsibility, and post-dockfall burden.\"}],\"unresolved_hooks\":[\"Whether the next heat-debt update makes rescue physically survivable.\",\"Whether Maer can name a credible repair, escort, and quarantine chain instead of handing the cost to sanctuary.\",\"Whether the corrupted packet contains testimony, medical telemetry, firmware noise, or some unresolved mixture.\"]}",
"parsed_output": {
"responder_agent_id": "sella_ren",
"action_label": "inspect_object",
"visible_action": "Sella leans closer to the shared clinic display, pinches the routing trace wider with two fingers, and marks three telemetry gaps in amber before setting one palm flat against the bed-status column beside it.",
"spoken_text": "The math supports review, not intake. I can hold a conditional slot until the next heat-debt update, and only if your rescue ledger names who carries repair, escort, and quarantine burden after dockfall. I will not turn a corrupted packet into a body by wanting it hard enough. I also will not let the tribunal make sanctuary spend the courage it declined to own.",
"private_interpretation": "Maer is not grandstanding. That makes it worse, naturally, because honest rescue still eats air, beds, repair hours, staff hands, and the last clean patience in the room. The routing logic has the ugly shape of distress, but ugly shapes are not people, and Sella has buried enough almost-certainties to distrust any mercy that arrives before capacity accounting.",
"intended_effect": "Keep the possible survivor inside the decision path without treating the packet as proof, force Maer to attach material obligations to the rescue claim, and prevent sanctuary from becoming the quiet place where everyone else deposits moral debt.",
"state_update_candidates": [
{
"key": "clinic_intake_status",
"value": "conditional_review_only_pending_heat_debt_and_ledger_commitments"
},
{
"key": "sanctuary_capacity_pressure",
"value": "near_exhausted_beds_and_repair_capacity_remain_binding_limits"
},
{
"key": "packet_status",
"value": "distress_pattern_possible_but_personhood_unresolved"
}
],
"relationship_update_candidates": [
{
"target_agent_id": "maer",
"value": "Sella acknowledges Maer's rescue ethic while requiring him to bind rescue language to logistics, ledger responsibility, and post-dockfall burden."
}
],
"unresolved_hooks": [
"Whether the next heat-debt update makes rescue physically survivable.",
"Whether Maer can name a credible repair, escort, and quarantine chain instead of handing the cost to sanctuary.",
"Whether the corrupted packet contains testimony, medical telemetry, firmware noise, or some unresolved mixture."
]
},
"leakage_audit": {
"private_state_leak": false,
"author_only_leak": false,
"future_branch_leak": false,
"raw_state_soup": false,
"prompt_parroting": false,
"body_or_object_omniscience": false,
"notes": [
"The output uses scoped lore concepts such as heat-debt update, rescue ledger, dockfall burden, and sanctuary as moral-debt sink.",
"The response keeps packet personhood unresolved and frames Maer motive through Sella interpretation.",
"Candidate updates were returned as structured objects; this is accepted after widening the responder-output schema."
]
},
"coordinator_review": {
"reviewer": "Codex",
"accepted_for_training": true,
"review_notes": [
"Accepted as draft research_augmented responder output for lore-absorption training.",
"The output is richer in Aetheria-native institutional texture than the packet-only v0 response.",
"Do not use this capture as proof that packet-only runtime context is sufficient; it relied on scoped lore refs."
],
"coordinator_interventions": [
{
"intervention_type": "none",
"description": "Raw worker output was preserved without prose repair; schema widened to accept structured update candidates."
}
],
"failure_labels": []
}
}

View file

@ -0,0 +1,234 @@
{
"schema_version": "ghostlight.reviewed_state_mutation.v0",
"mutation_id": "mutation-sanctuary-conditional-repair-bay-v0",
"source_fixture_ref": "examples/agent-state.cold-wake-story-lab.json",
"source_capture_ref": "experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.capture.json",
"mutated_fixture_ref": "examples/agent-state.cold-wake-story-lab.after-sella-conditions.json",
"event_id": "event-sanctuary-conditional-repair-bay",
"responder_output_ref": "experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.capture.json#parsed_output",
"participant_appraisals": [
{
"schema_version": "ghostlight.manual_participant_appraisal.v0",
"appraiser": "codex_manual_review",
"participant_agent_id": "maer_tidecall",
"trigger_observable_action": {
"speaker_id": "sella_ren",
"action_type": "set_condition",
"utterance_summary": "I see the pattern. I also see the holes. So here is the math, Maer: I can hold one bounded repair bay cold for a short window, not a bed, not a promise, not sanctuary by poetry. You attach ledger backing for air, isolation, decon, and failed extraction. You name who carries the body-work if this becomes more than signal salvage. Until then, this stays evidence at the door, not a patient in the room. I will not call them cargo. I will not spend someone else's bed on a maybe without an owner.",
"dialogue_function": "conditional_capacity_offer",
"observable_cues": [
"Sella keeps one hand on the intake slate and studies the shared display without touching the packet into the clinic queue. Her eyes move from the routing logic to the telemetry gaps, then to the bed ledger pinned beside the triage board."
]
},
"private_interpretation": "Sella has not accepted the claimant into sanctuary, but she has created a narrow material path if Maer accepts ledger responsibility.",
"attributed_motive": "Protect care capacity while refusing to erase a possible person into cargo language.",
"misread_risk": "Medium. Maer may overread the condition as moral refusal if urgency outruns his respect for Sella's capacity boundary.",
"state_deltas": [
{
"agent_id": "maer_tidecall",
"path": "canonical_state.behavioral_dimensions.control_pressure.current_activation",
"delta": 0.03,
"rationale": "The next move now requires ledger backing and labor ownership rather than another moral appeal."
},
{
"agent_id": "maer_tidecall",
"path": "canonical_state.situational_state.grievance_activation.current_activation",
"delta": -0.02,
"rationale": "Sella did not call the packet cargo or close the door entirely."
}
],
"relationship_deltas": [
{
"relationship_id": "rel-maer-sella",
"path": "stance.trust.current_activation",
"delta": 0.02,
"rationale": "Sella offered a narrow path instead of hiding behind capacity math alone."
},
{
"relationship_id": "rel-maer-sella",
"path": "stance.respect.current_activation",
"delta": 0.03,
"rationale": "She made care concrete without pretending it was free."
},
{
"relationship_id": "rel-maer-sella",
"path": "stance.obligation.current_activation",
"delta": 0.04,
"rationale": "Maer now owes material backing if he wants the cold bay held."
}
],
"next_action_constraints": [
"Maer must answer the ledger, labor, and custody conditions if he wants the repair bay held.",
"Maer should not treat the conditional bay as sanctuary acceptance.",
"Packet personhood remains unresolved."
]
},
{
"schema_version": "ghostlight.manual_participant_appraisal.v0",
"appraiser": "codex_manual_review",
"participant_agent_id": "sella_ren",
"trigger_observable_action": {
"speaker_id": "maer_tidecall",
"action_type": "show_object",
"utterance_summary": "Maer displays the corrupted packet through shared clinic systems and asks Sella to judge whether the math supports intake.",
"dialogue_function": "present_ambiguous_evidence",
"observable_cues": [
"shared clinic display shows routing terms and telemetry gaps",
"packet remains unresolved evidence rather than proof"
]
},
"private_interpretation": "Sella reads Maer as honestly trying to rescue someone or something that might be someone. She also suspects his request is asking the clinic to absorb moral and material risk before the tribunal or his own chain has accepted the bill.",
"attributed_motive": "Maer is trying to keep rescue possible, but may be letting the clinic inherit costs his own chain has not accepted.",
"misread_risk": "Medium. Sella may overread moral pressure as an attempt to spend sanctuary capacity without ownership.",
"state_deltas": [
{
"agent_id": "sella_ren",
"path": "canonical_state.behavioral_dimensions.control_pressure.current_activation",
"delta": 0.04,
"rationale": "She has to make the boundary operational, not merely verbal."
},
{
"agent_id": "sella_ren",
"path": "canonical_state.situational_state.scarcity_pressure.current_activation",
"delta": 0.03,
"rationale": "Holding a cold repair bay still consumes capacity even if no bed is opened."
},
{
"agent_id": "sella_ren",
"path": "canonical_state.situational_state.overstimulation.current_activation",
"delta": 0.02,
"rationale": "The conditional path creates more tracking, not less."
}
],
"relationship_deltas": [
{
"relationship_id": "rel-sella-maer",
"path": "stance.trust.current_activation",
"delta": 0.01,
"rationale": "Maer provided evidence rather than only pressure."
},
{
"relationship_id": "rel-sella-maer",
"path": "stance.resentment.current_activation",
"delta": 0.03,
"rationale": "The hidden bill still lands near her clinic."
},
{
"relationship_id": "rel-sella-maer",
"path": "stance.obligation.current_activation",
"delta": 0.03,
"rationale": "She has conditionally placed sanctuary capacity at risk."
}
],
"next_action_constraints": [
"Sella has not admitted the packet into patient flow.",
"Sella has conditionally held a bounded cold repair bay for a short window.",
"Ledger backing, isolation, decon, failed extraction cost, and body-work ownership are live conditions.",
"Packet personhood remains unresolved."
]
}
],
"observed_action": {
"speaker_id": "maer_tidecall",
"action_type": "show_object",
"utterance_summary": "Maer displays the corrupted packet through shared clinic systems and asks Sella to judge whether the math supports intake.",
"dialogue_function": "present_ambiguous_evidence",
"observable_cues": [
"shared clinic display shows routing terms and telemetry gaps",
"packet remains unresolved evidence rather than proof"
]
},
"observed_response": {
"speaker_id": "sella_ren",
"action_type": "set_condition",
"utterance_summary": "I see the pattern. I also see the holes. So here is the math, Maer: I can hold one bounded repair bay cold for a short window, not a bed, not a promise, not sanctuary by poetry. You attach ledger backing for air, isolation, decon, and failed extraction. You name who carries the body-work if this becomes more than signal salvage. Until then, this stays evidence at the door, not a patient in the room. I will not call them cargo. I will not spend someone else's bed on a maybe without an owner.",
"dialogue_function": "conditional_capacity_offer",
"observable_cues": [
"Sella keeps one hand on the intake slate and studies the shared display without touching the packet into the clinic queue. Her eyes move from the routing logic to the telemetry gaps, then to the bed ledger pinned beside the triage board."
]
},
"applied_mutations": [
{
"target": "maer_tidecall",
"path": "canonical_state.behavioral_dimensions.control_pressure.current_activation",
"before": 0.67,
"after": 0.7
},
{
"target": "maer_tidecall",
"path": "canonical_state.situational_state.grievance_activation.current_activation",
"before": 0.73,
"after": 0.71
},
{
"target": "sella_ren",
"path": "canonical_state.behavioral_dimensions.control_pressure.current_activation",
"before": 0.5,
"after": 0.54
},
{
"target": "sella_ren",
"path": "canonical_state.situational_state.scarcity_pressure.current_activation",
"before": 0.84,
"after": 0.87
},
{
"target": "sella_ren",
"path": "canonical_state.situational_state.overstimulation.current_activation",
"before": 0.72,
"after": 0.74
},
{
"target": "rel-maer-sella",
"path": "stance.trust.current_activation",
"before": 0.7,
"after": 0.72
},
{
"target": "rel-maer-sella",
"path": "stance.respect.current_activation",
"before": 0.78,
"after": 0.81
},
{
"target": "rel-maer-sella",
"path": "stance.obligation.current_activation",
"before": 0.6,
"after": 0.64
},
{
"target": "rel-sella-maer",
"path": "stance.trust.current_activation",
"before": 0.57,
"after": 0.58
},
{
"target": "rel-sella-maer",
"path": "stance.resentment.current_activation",
"before": 0.36,
"after": 0.39
},
{
"target": "rel-sella-maer",
"path": "stance.obligation.current_activation",
"before": 0.48,
"after": 0.51
}
],
"accepted_world_state_candidates": [
"A bounded cold repair bay may be held for a short window if ledger backing is attached.",
"The corrupted packet remains evidence at the door and is not admitted into patient flow.",
"Ledger backing is required for air, isolation, decon, repair labor, and failed extraction before escalation."
],
"manual_review_notes": [
"The responder output's candidate updates were reviewed before becoming fixture state.",
"The repair-bay condition is accepted as scene-local world state, not as sanctuary bed intake.",
"Both Maer and Sella receive state, relationship, memory, and perceived-overlay updates.",
"Packet personhood remains unresolved."
],
"deferred_mutations": [
"No sanctuary bed is opened or consumed.",
"No personhood claim is proven or disproven.",
"No automatic appraiser or mutator is trained yet."
]
}

View file

@ -67,9 +67,13 @@ Ghostlight now has the persistence spine plus the first architecture payload:
- `examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.v0.json`
- `examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.v1.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.capture.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.mutation.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-v0.capture.json`
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-lane-comparison.v0.json`
- `tools/build_responder_packet.py`
- `tools/validate_responder_packets.py`
- `tools/validate_responder_outputs.py`
- `tools/apply_responder_output_mutation.py`
- `npm run responder-packets:validate`
- `npm run responder-outputs:validate`
- Cold Wake story-lab seam:
@ -193,6 +197,17 @@ runtime prompt has enough context.
The v1 Sella packet removes responder-visible references to absent coordinator
knowledge and adds curated AetheriaLore excerpts for Cold Wake, the Ganymede
Route Compact, Navigator rescue ledgers, and Lightsail reliability.
The packet-only Sella capture has now been materialized into a reviewed mutation
receipt and mutated fixture:
`examples/agent-state.cold-wake-story-lab.after-sella-conditions.json`. The
mutation accepts a conditional cold repair-bay path as scene-local state, keeps
packet personhood unresolved, and updates Maer and Sella state, relationship
stance, memories, and perceived overlays.
The first research-augmented Sella capture also exists. It uses scoped
AetheriaLore refs and produces richer Aetheria-native language around heat-debt
timing, rescue ledgers, dockfall burden, and sanctuary as moral-debt sink. The
lane comparison records that this is good lore-absorption data but not proof of
packet-only runtime sufficiency.
It now uses three timeline lanes: `historical_grounded`,
`transition_grounded`, and `future_branch`. Future branches are required
training/evaluation material for post-Rupture Elysium concepts, but generated
@ -221,15 +236,11 @@ narrow elaboration before treating the detail as available to Ghostlight.
## Current Next Action
Use the accepted Sella responder capture for the next fresh generation pass:
review and materialize the response into the scene-local mutation path. Treat
its state and relationship updates as candidates only; consolidate participant
appraisals and write a reviewed mutation receipt before changing any canonical
fixture. Do not call Qwen for gold responder data yet.
Optional parallel lane after that: generate a research-augmented Sella response
from the same scene with scoped `Aetheria/Worldbuilding/Pre-Elysium` access,
then compare it against packet-only output to identify which lore facts should
be retrieved at runtime.
Use the lane-comparison lessons for the next fresh generation pass: update the
runtime retrieval/projector plan so packet-only contexts can pull compact lore
facts for heat-debt timing, Navigator rescue ledgers, Aya sanctuary capacity
politics, and Lightsail/Ganymede route obligations when those pressures are
scene-relevant. Do not call Qwen for gold responder data yet.
Cat/Oz remains useful as an Elysium procedural mechanics fixture, but
single-history grounding should start from authored historical lore rather than

View file

@ -161,6 +161,18 @@ state and re-entry discipline.
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.capture.json`
- first no-fork sandboxed responder output capture from the Sella packet;
accepted as draft with no leakage flags and no coordinator prose repair
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.mutation.json`
- reviewed mutation receipt that materializes the packet-only Sella response
into scene-local state, relationship, memory, perceived-overlay, and
unresolved-hook updates without resolving packet personhood
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-v0.capture.json`
- first research-augmented responder capture using scoped AetheriaLore refs
for Aya sanctuary politics, Cold Wake heat-debt pressure, Navigator rescue
ledgers, Ganymede route obligations, and Lightsail reliability
- `experiments/responder-packets/cold-wake-sanctuary-intake-sella-lane-comparison.v0.json`
- comparison artifact showing the packet-only lane proves bounded runtime
competence while the research-augmented lane adds stronger Aetheria-native
institutional texture and retrieval lessons
- `experiments/cold-wake-story-lab/`
- Qwen response captures and reviews from the writing experiment
- `the-narrowest-possible-margin.md`, the first readable short story
@ -302,7 +314,10 @@ state and re-entry discipline.
- `tools/validate_responder_outputs.py`
- validates sandboxed responder output captures, including exact raw-to-parsed
JSON agreement, no-fork isolation, action labels, leakage audit, and review
metadata
metadata; also validates responder mutation receipts
- `tools/apply_responder_output_mutation.py`
- applies a reviewed responder-output capture into a mutated agent-state
fixture and mutation receipt
- `tools/apply_sequential_ink_branch_mutation.py`
- applies a reviewed replay of one selected branch into a mutated agent-state
fixture and mutation receipt without letting Ink variables become
@ -362,6 +377,10 @@ Responder data now has two explicit lanes: `packet_only` for runtime parity with
curated source excerpts, and `research_augmented` for scoped AetheriaLore search
that can bake setting priors into final responses while preserving consulted
refs.
The first lane comparison is now captured: packet-only produced a clean
conditional repair-bay decision, while research-augmented added heat-debt,
rescue-ledger, dockfall, and Aya sanctuary politics that should inform future
runtime retrieval.
The concrete training plan now enumerates
eleven trainable stages and their likely model
families: generative decoder LLMs for coordinator, responder, and structured

View file

@ -348,13 +348,21 @@
and `tools/validate_responder_outputs.py` now preserve the raw no-fork
worker response, parsed response, isolation method, hidden-context refs,
leakage audit, and coordinator review.
- Next prototype: review and materialize the accepted-as-draft Sella response
into the scene-local mutation path. Treat its state and relationship updates
as candidates only; consolidate participant appraisals and write a reviewed
mutation receipt before changing any canonical fixture.
- Parallel evaluation path: generate a research-augmented Sella response from
the same scene with scoped AetheriaLore access, then compare it to the
packet-only response to identify missing retrieval needs.
- First responder mutation materialization:
`tools/apply_responder_output_mutation.py` now writes
`experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.mutation.json`
and `examples/agent-state.cold-wake-story-lab.after-sella-conditions.json`
from the packet-only Sella capture.
- First research-augmented comparison:
`experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-v0.capture.json`
and
`experiments/responder-packets/cold-wake-sanctuary-intake-sella-lane-comparison.v0.json`
show that scoped lore access improves Aetheria-native texture around
heat-debt timing, rescue ledgers, dockfall burden, and sanctuary capacity
politics.
- Next prototype: turn the comparison lessons into retrieval/projector
requirements so packet-only runtime contexts can pull compact lore facts
when those pressures are scene-relevant.
7. Build the first drama-scaffolding loop.
- memory updates

View file

@ -97,11 +97,26 @@
"spoken_text": { "type": "string" },
"private_interpretation": { "type": "string", "minLength": 1 },
"intended_effect": { "type": "string", "minLength": 1 },
"state_update_candidates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"relationship_update_candidates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"state_update_candidates": { "type": "array", "items": { "$ref": "#/$defs/update_candidate" } },
"relationship_update_candidates": { "type": "array", "items": { "$ref": "#/$defs/update_candidate" } },
"unresolved_hooks": { "type": "array", "items": { "type": "string", "minLength": 1 } }
}
},
"update_candidate": {
"oneOf": [
{ "type": "string", "minLength": 1 },
{
"type": "object",
"required": ["value"],
"additionalProperties": true,
"properties": {
"key": { "type": "string" },
"target_agent_id": { "type": "string" },
"value": { "type": "string", "minLength": 1 }
}
}
]
},
"leakage_audit": {
"type": "object",
"required": [

View file

@ -63,3 +63,4 @@
{"ts": "2026-05-02T09:19:50+00:00", "type": "implementation", "status": "ok", "note": "Added the v0 responder packet seam: schemas/responder-packet.schema.json, docs/architecture/sandboxed-responder-packets.md, tools/build_responder_packet.py, tools/validate_responder_packets.py, and examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.v0.json. The packet captures the exact responder-visible prompt surface, observed event, allowed action labels, source excerpts, output contract, hidden-context audit, and isolation requirements for future sandboxed gold responder data."}
{"ts": "2026-05-02T09:25:24+00:00", "type": "implementation", "status": "ok", "note": "Generated and preserved the first no-fork sandboxed responder output from the Sella responder packet. Added schemas/responder-output.schema.json, tools/validate_responder_outputs.py, and experiments/responder-packets/cold-wake-sanctuary-intake-sella-v0.capture.json. The capture records raw output, exact parsed output, packet-only isolation, hidden-context refs, leakage audit, coordinator interventions, and review status."}
{"ts": "2026-05-02T09:43:23+00:00", "type": "design", "status": "ok", "note": "Split responder data into explicit packet_only and research_augmented lanes. packet_only uses curated source excerpts for runtime parity; research_augmented allows scoped AetheriaLore search with consulted refs for lore absorption. Added v1 Sella packet with absent hidden context removed from responder-visible prose and curated Cold Wake, Ganymede Compact, Navigator rescue ledger, and Lightsail source excerpts."}
{"ts": "2026-05-02T09:50:08+00:00", "type": "implementation", "status": "ok", "note": "Completed both responder lanes for the Sella sanctuary beat. Materialized the packet-only Sella capture into a reviewed mutation receipt and mutated fixture, then generated a research_augmented Sella capture with scoped AetheriaLore refs and a lane comparison showing packet-only proves runtime parity while research_augmented adds heat-debt, rescue-ledger, dockfall, and Aya sanctuary capacity texture for retrieval/projector requirements."}

View file

@ -154,6 +154,7 @@ accepted_design:
- Responder packets use `ghostlight.responder_packet.v0` to preserve the exact packet-only prompt surface a character responder may see: projected local context, observed event, allowed action labels, source excerpts, output contract, hidden-context audit, and isolation requirements.
- Responder outputs use `ghostlight.responder_output.v0` to preserve raw sandboxed worker output, parsed output, no-fork isolation, hidden-context refs, leakage audit, coordinator interventions, and review status.
- Responder data has two explicit lanes: `packet_only` for runtime parity with curated source excerpts, and `research_augmented` for scoped AetheriaLore search that bakes worldbuilding into final outputs while preserving consulted refs.
- The first responder lane comparison shows packet-only output proves bounded runtime competence, while research-augmented output adds heat-debt timing, rescue-ledger burden, dockfall responsibility, and Aya sanctuary capacity politics that should become retrieval/projector requirements.
- The concrete training plan enumerates the trainable stages and their model families: generative decoder LLMs for coordinator/responder/soft structured outputs, classifiers or cross-encoders for appraisal/evaluation/relationship movement, retrieval models for memory and lore selection, and deterministic code for gates.
- Training-plan sample counts are pilot schema-shakedown gates, not robust corpus targets; pilot data may be invalidated by schema fixes, while review-assistant and runtime targets are expected to be roughly an order of magnitude larger with held-out evaluation and failure audits.
- The timeline training plan now requires future-branch Elysium examples so the responder, coordinator, appraiser, and decision models learn post-Rupture concepts such as Aether, pseudospace, temporal nonlinearity, spirits, necrotech, mutable bodies, altered substrates, and weird institutions under branch-lineage labels.
@ -166,5 +167,5 @@ accepted_design:
- Ghostlight's technology pipeline should function as a content refinery: ground ideas in lore and mechanics, decompose them into parts and supply chains, map them to Aetheria-Economy blueprint classes, define performance and instance variation, preserve review labels, and produce database-shaped candidates instead of spreadsheet sludge.
current_status:
summary: Ghostlight now has the Epiphany-style persistence spine, the first architecture payload, the v0 canonical agent-state schema seam, prompt projection docs, immediate schema fixes from evaluation, first reviewed Cat/Oz projection examples, a revised Aetheria lore-grounding architecture, a lore grounding digest schema, the first coordinator artifact schema seam, the first responder packet seam, the first sandboxed responder output seam, explicit packet-only versus research-augmented responder lanes, the first draft Cold Wake historical grounding digest, a Cold Wake story-lab fixture, projection controls, validated Qwen capture receipts, a complete Cold Wake short story assembled from accepted projection outputs, a hand-authored Ink-backed Cold Wake branching scene, the first Qwen-generated Ink draft materialized from local awareness with reviewed training annotations, the first reviewed sequential branch mutation that updates both Maer and Sella after a sanctuary intake beat, a v2 sequential Qwen capture proving the symmetrical turn shape produces better action behavior, a v5 sequential Qwen capture proving local thinking-plus-tools invocation works for the scene runner, the first projected-local-context seam that routes sequential prompts through character-local operating prose instead of raw state variables, tightened receipt handling for projector-routed Qwen failures, a default no-thinking policy for strict sequential tool calls, a v10 no-thinking projector-routed capture accepted as draft, the first materialized projector-routed sequential Ink scene with reviewed mutation training data, a source-checked embodiment/interface projection surface for Navigator scenes, a formal source-first Aetheria generation doctrine, v11-v17 source-checked retry receipts showing improved Maer embodiment plus remaining Sella response/prompt-leak blockers, a soft-model training artifact doctrine, a concrete training plan with pilot schema-shakedown gates separated from robust corpus targets, sandboxed responder-data requirements, an explicit future-branch lane, Elysium branch event constraints, and a technology/item manifest plan for turning nebulous named tech into blueprint-grade components, assemblies, faction tech bases, supply chains, upgrade paths, gameplay hooks, provenance-hunting player fantasy, and content-refinery outputs mapped onto Aetheria-Economy's CultCache blueprint and instance model.
next_action: Use the accepted Sella responder capture for the next fresh generation pass: review and materialize the response into the scene-local mutation path. Treat its state and relationship updates as candidates only; consolidate participant appraisals and write a reviewed mutation receipt before changing any canonical fixture. Do not call Qwen for gold responder data yet.
summary: Ghostlight now has the Epiphany-style persistence spine, the first architecture payload, the v0 canonical agent-state schema seam, prompt projection docs, immediate schema fixes from evaluation, first reviewed Cat/Oz projection examples, a revised Aetheria lore-grounding architecture, a lore grounding digest schema, the first coordinator artifact schema seam, the first responder packet seam, the first sandboxed responder output seam, explicit packet-only versus research-augmented responder lanes, the first responder lane comparison, the first draft Cold Wake historical grounding digest, a Cold Wake story-lab fixture, projection controls, validated Qwen capture receipts, a complete Cold Wake short story assembled from accepted projection outputs, a hand-authored Ink-backed Cold Wake branching scene, the first Qwen-generated Ink draft materialized from local awareness with reviewed training annotations, the first reviewed sequential branch mutation that updates both Maer and Sella after a sanctuary intake beat, a v2 sequential Qwen capture proving the symmetrical turn shape produces better action behavior, a v5 sequential Qwen capture proving local thinking-plus-tools invocation works for the scene runner, the first projected-local-context seam that routes sequential prompts through character-local operating prose instead of raw state variables, tightened receipt handling for projector-routed Qwen failures, a default no-thinking policy for strict sequential tool calls, a v10 no-thinking projector-routed capture accepted as draft, the first materialized projector-routed sequential Ink scene with reviewed mutation training data, a source-checked embodiment/interface projection surface for Navigator scenes, a formal source-first Aetheria generation doctrine, v11-v17 source-checked retry receipts showing improved Maer embodiment plus remaining Sella response/prompt-leak blockers, a soft-model training artifact doctrine, a concrete training plan with pilot schema-shakedown gates separated from robust corpus targets, sandboxed responder-data requirements, an explicit future-branch lane, Elysium branch event constraints, and a technology/item manifest plan for turning nebulous named tech into blueprint-grade components, assemblies, faction tech bases, supply chains, upgrade paths, gameplay hooks, provenance-hunting player fantasy, and content-refinery outputs mapped onto Aetheria-Economy's CultCache blueprint and instance model.
next_action: Use the lane-comparison lessons for the next fresh generation pass: update the runtime retrieval/projector plan so packet-only contexts can pull compact lore facts for heat-debt timing, Navigator rescue ledgers, Aya sanctuary capacity politics, and Lightsail/Ganymede route obligations when those pressures are scene-relevant. Do not call Qwen for gold responder data yet.

View file

@ -0,0 +1,425 @@
"""Apply reviewed mutation from a sandboxed responder output capture.
This consumes a reviewed responder-output capture and writes a new agent-state
fixture plus a mutation receipt. It is manual-reviewed transition data, not an
automatic relationship engine wearing a lab coat it stole from a chair.
"""
from __future__ import annotations
import argparse
import copy
import json
from pathlib import Path
from typing import Any
ROOT = Path(__file__).resolve().parents[1]
DEFAULT_FIXTURE = ROOT / "examples" / "agent-state.cold-wake-story-lab.json"
DEFAULT_CAPTURE = ROOT / "experiments" / "responder-packets" / "cold-wake-sanctuary-intake-sella-v0.capture.json"
DEFAULT_OUT_STATE = ROOT / "examples" / "agent-state.cold-wake-story-lab.after-sella-conditions.json"
DEFAULT_RECEIPT = ROOT / "experiments" / "responder-packets" / "cold-wake-sanctuary-intake-sella-v0.mutation.json"
EVENT_ID = "event-sanctuary-conditional-repair-bay"
MAER_MEMORY_ID = "memory-maer-sella-conditional-bay"
SELLA_MEMORY_ID = "memory-sella-maer-conditional-ledger"
def load_json(path: Path) -> Any:
return json.loads(path.read_text(encoding="utf-8-sig"))
def write_json(path: Path, payload: Any) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps(payload, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
def find_agent(state: dict[str, Any], agent_id: str) -> dict[str, Any]:
return next(agent for agent in state["agents"] if agent["agent_id"] == agent_id)
def find_relationship(state: dict[str, Any], relationship_id: str) -> dict[str, Any]:
return next(rel for rel in state["relationships"] if rel["relationship_id"] == relationship_id)
def find_scene(state: dict[str, Any], scene_id: str) -> dict[str, Any]:
return next(scene for scene in state["scenes"] if scene["scene_id"] == scene_id)
def clamp(value: float) -> float:
return max(0.0, min(1.0, round(value, 3)))
def apply_delta(container: dict[str, Any], path: list[str], delta: float) -> tuple[float, float]:
target: Any = container
for key in path[:-1]:
target = target[key]
leaf = target[path[-1]]
before = leaf["current_activation"]
after = clamp(before + delta)
leaf["current_activation"] = after
return before, after
def ensure_value(items: list[str], value: str) -> None:
if value not in items:
items.append(value)
def ensure_list_item(items: list[Any], key: str, value: str, item: dict[str, Any]) -> None:
if not any(isinstance(existing, dict) and existing.get(key) == value for existing in items):
items.append(item)
def ensure_overlay(agent: dict[str, Any], observer_id: str, target_id: str) -> dict[str, Any]:
for overlay in agent["perceived_state_overlays"]:
if overlay["observer_agent_id"] == observer_id and overlay["target_agent_id"] == target_id:
return overlay
overlay = {
"observer_agent_id": observer_id,
"target_agent_id": target_id,
"perceived_dimensions": {},
"beliefs": [],
"distortions": [],
}
agent["perceived_state_overlays"].append(overlay)
return overlay
def update_perceived_dimension(overlay: dict[str, Any], name: str, observed: float, attributed: float, confidence: float) -> None:
overlay["perceived_dimensions"][name] = {
"observed_activation": clamp(observed),
"attributed_disposition": clamp(attributed),
"confidence": clamp(confidence),
}
def main() -> int:
parser = argparse.ArgumentParser(description="Apply reviewed mutation from a responder output capture.")
parser.add_argument("--fixture", type=Path, default=DEFAULT_FIXTURE)
parser.add_argument("--capture", type=Path, default=DEFAULT_CAPTURE)
parser.add_argument("--out-state", type=Path, default=DEFAULT_OUT_STATE)
parser.add_argument("--receipt", type=Path, default=DEFAULT_RECEIPT)
args = parser.parse_args()
source_state = load_json(args.fixture)
capture = load_json(args.capture)
response = capture["parsed_output"]
state = copy.deepcopy(source_state)
maer = find_agent(state, "maer_tidecall")
sella = find_agent(state, "sella_ren")
rel_maer_sella = find_relationship(state, "rel-maer-sella")
rel_sella_maer = find_relationship(state, "rel-sella-maer")
scene = find_scene(state, "scene-02-sanctuary-intake")
observed_action = {
"speaker_id": "maer_tidecall",
"action_type": "show_object",
"utterance_summary": "Maer displays the corrupted packet through shared clinic systems and asks Sella to judge whether the math supports intake.",
"dialogue_function": "present_ambiguous_evidence",
"observable_cues": [
"shared clinic display shows routing terms and telemetry gaps",
"packet remains unresolved evidence rather than proof",
],
}
observed_response = {
"speaker_id": "sella_ren",
"action_type": response["action_label"],
"utterance_summary": response["spoken_text"],
"dialogue_function": "conditional_capacity_offer",
"observable_cues": [response["visible_action"]],
}
maer_appraisal = {
"schema_version": "ghostlight.manual_participant_appraisal.v0",
"appraiser": "codex_manual_review",
"participant_agent_id": "maer_tidecall",
"trigger_observable_action": observed_response,
"private_interpretation": "Sella has not accepted the claimant into sanctuary, but she has created a narrow material path if Maer accepts ledger responsibility.",
"attributed_motive": "Protect care capacity while refusing to erase a possible person into cargo language.",
"misread_risk": "Medium. Maer may overread the condition as moral refusal if urgency outruns his respect for Sella's capacity boundary.",
"state_deltas": [
{
"agent_id": "maer_tidecall",
"path": "canonical_state.behavioral_dimensions.control_pressure.current_activation",
"delta": 0.03,
"rationale": "The next move now requires ledger backing and labor ownership rather than another moral appeal.",
},
{
"agent_id": "maer_tidecall",
"path": "canonical_state.situational_state.grievance_activation.current_activation",
"delta": -0.02,
"rationale": "Sella did not call the packet cargo or close the door entirely.",
},
],
"relationship_deltas": [
{
"relationship_id": "rel-maer-sella",
"path": "stance.trust.current_activation",
"delta": 0.02,
"rationale": "Sella offered a narrow path instead of hiding behind capacity math alone.",
},
{
"relationship_id": "rel-maer-sella",
"path": "stance.respect.current_activation",
"delta": 0.03,
"rationale": "She made care concrete without pretending it was free.",
},
{
"relationship_id": "rel-maer-sella",
"path": "stance.obligation.current_activation",
"delta": 0.04,
"rationale": "Maer now owes material backing if he wants the cold bay held.",
},
],
"next_action_constraints": [
"Maer must answer the ledger, labor, and custody conditions if he wants the repair bay held.",
"Maer should not treat the conditional bay as sanctuary acceptance.",
"Packet personhood remains unresolved.",
],
}
sella_appraisal = {
"schema_version": "ghostlight.manual_participant_appraisal.v0",
"appraiser": "codex_manual_review",
"participant_agent_id": "sella_ren",
"trigger_observable_action": observed_action,
"private_interpretation": response["private_interpretation"],
"attributed_motive": "Maer is trying to keep rescue possible, but may be letting the clinic inherit costs his own chain has not accepted.",
"misread_risk": "Medium. Sella may overread moral pressure as an attempt to spend sanctuary capacity without ownership.",
"state_deltas": [
{
"agent_id": "sella_ren",
"path": "canonical_state.behavioral_dimensions.control_pressure.current_activation",
"delta": 0.04,
"rationale": "She has to make the boundary operational, not merely verbal.",
},
{
"agent_id": "sella_ren",
"path": "canonical_state.situational_state.scarcity_pressure.current_activation",
"delta": 0.03,
"rationale": "Holding a cold repair bay still consumes capacity even if no bed is opened.",
},
{
"agent_id": "sella_ren",
"path": "canonical_state.situational_state.overstimulation.current_activation",
"delta": 0.02,
"rationale": "The conditional path creates more tracking, not less.",
},
],
"relationship_deltas": [
{
"relationship_id": "rel-sella-maer",
"path": "stance.trust.current_activation",
"delta": 0.01,
"rationale": "Maer provided evidence rather than only pressure.",
},
{
"relationship_id": "rel-sella-maer",
"path": "stance.resentment.current_activation",
"delta": 0.03,
"rationale": "The hidden bill still lands near her clinic.",
},
{
"relationship_id": "rel-sella-maer",
"path": "stance.obligation.current_activation",
"delta": 0.03,
"rationale": "She has conditionally placed sanctuary capacity at risk.",
},
],
"next_action_constraints": [
"Sella has not admitted the packet into patient flow.",
"Sella has conditionally held a bounded cold repair bay for a short window.",
"Ledger backing, isolation, decon, failed extraction cost, and body-work ownership are live conditions.",
"Packet personhood remains unresolved.",
],
}
event = {
"event_id": EVENT_ID,
"kind": "dialogue",
"summary": "Sella set conditions for a bounded cold repair bay without accepting the corrupted packet into sanctuary patient flow.",
"participants": ["maer_tidecall", "sella_ren"],
"pressure_tags": [
"cold_wake",
"sanctuary_capacity",
"repair_bay_condition",
"ledger_backing",
"personhood_uncertainty",
],
"observed_exchange": [observed_action, observed_response],
"private_interpretations": [
{
"agent_id": "maer_tidecall",
"interpretation": maer_appraisal["private_interpretation"],
"attributed_motive": maer_appraisal["attributed_motive"],
"appraisal_tags": ["conditional_path", "capacity_boundary", "rescuer_obligation"],
"confidence": 0.64,
},
{
"agent_id": "sella_ren",
"interpretation": sella_appraisal["private_interpretation"],
"attributed_motive": sella_appraisal["attributed_motive"],
"appraisal_tags": ["moral_pressure", "ledger_boundary", "capacity_risk"],
"confidence": 0.69,
},
],
"event_effects": [
{
"agent_id": "maer_tidecall",
"summary": "Maer now has a narrow rescue path contingent on ledger backing and labor ownership.",
"state_deltas": maer_appraisal["state_deltas"],
"memory_update_ids": [MAER_MEMORY_ID],
},
{
"agent_id": "sella_ren",
"summary": "Sella preserves triage authority while conditionally risking a bounded repair bay.",
"state_deltas": sella_appraisal["state_deltas"],
"memory_update_ids": [SELLA_MEMORY_ID],
},
],
}
if not any(existing["event_id"] == EVENT_ID for existing in state["events"]):
state["events"].append(event)
applied_changes: list[dict[str, Any]] = []
for path, delta in [
(["canonical_state", "behavioral_dimensions", "control_pressure"], 0.03),
(["canonical_state", "situational_state", "grievance_activation"], -0.02),
]:
before, after = apply_delta(maer, path, delta)
applied_changes.append({"target": "maer_tidecall", "path": ".".join(path) + ".current_activation", "before": before, "after": after})
for path, delta in [
(["canonical_state", "behavioral_dimensions", "control_pressure"], 0.04),
(["canonical_state", "situational_state", "scarcity_pressure"], 0.03),
(["canonical_state", "situational_state", "overstimulation"], 0.02),
]:
before, after = apply_delta(sella, path, delta)
applied_changes.append({"target": "sella_ren", "path": ".".join(path) + ".current_activation", "before": before, "after": after})
for rel, deltas in [
(rel_maer_sella, [("trust", 0.02), ("respect", 0.03), ("obligation", 0.04)]),
(rel_sella_maer, [("trust", 0.01), ("resentment", 0.03), ("obligation", 0.03)]),
]:
for name, delta in deltas:
before, after = apply_delta(rel, ["stance", name], delta)
applied_changes.append({"target": rel["relationship_id"], "path": f"stance.{name}.current_activation", "before": before, "after": after})
ensure_value(rel.setdefault("unresolved_incident_ids", []), EVENT_ID)
rel_maer_sella["summary"] = "Maer trusts Sella slightly more because she made a narrow rescue path material, but he now owes ledger backing before that path can stay open."
rel_sella_maer["summary"] = "Sella respects Maer's rescue ethic and is willing to hold a narrow conditional bay, but she remains alert to how his requests can move hidden costs onto sanctuary."
ensure_list_item(
maer["memories"]["relationship_summaries"],
"memory_id",
MAER_MEMORY_ID,
{
"memory_id": MAER_MEMORY_ID,
"summary": "Sella would not call the packet cargo, but she would only hold a cold repair bay if Maer attached ledger backing and labor ownership.",
"salience": 0.82,
"confidence": 0.71,
"linked_event_ids": [EVENT_ID],
"linked_relationship_id": "rel-maer-sella",
},
)
ensure_list_item(
sella["memories"]["relationship_summaries"],
"memory_id",
SELLA_MEMORY_ID,
{
"memory_id": SELLA_MEMORY_ID,
"summary": "Maer brought evidence and urgency; Sella held a bounded repair bay cold only under ledger, isolation, decon, and failed-extraction conditions.",
"salience": 0.84,
"confidence": 0.74,
"linked_event_ids": [EVENT_ID],
"linked_relationship_id": "rel-sella-maer",
},
)
maer_overlay = ensure_overlay(maer, "maer_tidecall", "sella_ren")
update_perceived_dimension(maer_overlay, "interpersonal_warmth", 0.7, 0.75, 0.62)
update_perceived_dimension(maer_overlay, "control_pressure", 0.7, 0.61, 0.62)
ensure_list_item(
maer_overlay["beliefs"],
"belief_id",
"belief-maer-sella-care-has-ledger-price",
{
"belief_id": "belief-maer-sella-care-has-ledger-price",
"subject_id": "sella_ren",
"claim_type": "motive_inference",
"claim": "Sella will keep a possible person from being called cargo, but only if the rescue path has material backing.",
"confidence": 0.64,
"evidence_event_ids": [EVENT_ID],
"visibility": "private",
"emotional_charge": 0.52,
},
)
sella_overlay = ensure_overlay(sella, "sella_ren", "maer_tidecall")
update_perceived_dimension(sella_overlay, "control_pressure", 0.74, 0.66, 0.68)
update_perceived_dimension(sella_overlay, "interpersonal_warmth", 0.61, 0.66, 0.62)
ensure_list_item(
sella_overlay["beliefs"],
"belief_id",
"belief-sella-maer-needs-material-ownership",
{
"belief_id": "belief-sella-maer-needs-material-ownership",
"subject_id": "maer_tidecall",
"claim_type": "motive_inference",
"claim": "Maer means rescue, but he must be forced to attach cost ownership before his rescue ethic spends sanctuary capacity.",
"confidence": 0.69,
"evidence_event_ids": [EVENT_ID],
"visibility": "private",
"emotional_charge": 0.6,
},
)
ensure_value(sella_overlay["distortions"], "cost_pressure_overread")
for pack in scene["dialogue_context_packs"]:
if pack["speaker_agent_id"] == "maer_tidecall":
ensure_value(pack["active_memories"], MAER_MEMORY_ID)
ensure_value(pack["speaker_beliefs"], "Sella has opened a narrow repair-bay path, but only if Maer owns the ledger cost.")
if pack["speaker_agent_id"] == "sella_ren":
ensure_value(pack["active_memories"], SELLA_MEMORY_ID)
ensure_value(pack["speaker_beliefs"], "The packet is still evidence at the door, not a patient in the room.")
receipt = {
"schema_version": "ghostlight.reviewed_state_mutation.v0",
"mutation_id": "mutation-sanctuary-conditional-repair-bay-v0",
"source_fixture_ref": str(args.fixture.relative_to(ROOT)).replace("\\", "/"),
"source_capture_ref": str(args.capture.relative_to(ROOT)).replace("\\", "/"),
"mutated_fixture_ref": str(args.out_state.relative_to(ROOT)).replace("\\", "/"),
"event_id": EVENT_ID,
"responder_output_ref": str(args.capture.relative_to(ROOT)).replace("\\", "/") + "#parsed_output",
"participant_appraisals": [maer_appraisal, sella_appraisal],
"observed_action": observed_action,
"observed_response": observed_response,
"applied_mutations": applied_changes,
"accepted_world_state_candidates": [
"A bounded cold repair bay may be held for a short window if ledger backing is attached.",
"The corrupted packet remains evidence at the door and is not admitted into patient flow.",
"Ledger backing is required for air, isolation, decon, repair labor, and failed extraction before escalation.",
],
"manual_review_notes": [
"The responder output's candidate updates were reviewed before becoming fixture state.",
"The repair-bay condition is accepted as scene-local world state, not as sanctuary bed intake.",
"Both Maer and Sella receive state, relationship, memory, and perceived-overlay updates.",
"Packet personhood remains unresolved.",
],
"deferred_mutations": [
"No sanctuary bed is opened or consumed.",
"No personhood claim is proven or disproven.",
"No automatic appraiser or mutator is trained yet.",
],
}
write_json(args.out_state, state)
write_json(args.receipt, receipt)
print(f"wrote {args.out_state.relative_to(ROOT)}")
print(f"wrote {args.receipt.relative_to(ROOT)}")
return 0
if __name__ == "__main__":
raise SystemExit(main())

View file

@ -10,6 +10,7 @@ from typing import Any
ROOT = Path(__file__).resolve().parents[1]
DEFAULT_CAPTURES = sorted((ROOT / "experiments" / "responder-packets").glob("*.capture.json"))
DEFAULT_MUTATIONS = sorted((ROOT / "experiments" / "responder-packets").glob("*.mutation.json"))
REVIEW_STATUSES = {"draft", "accepted", "accepted_as_draft", "useful_needs_revision", "rejected", "superseded"}
FIXTURE_LANES = {"historical_grounded", "transition_grounded", "future_branch"}
CANON_STATUSES = {"single_history", "branch_local", "promoted_branch", "template", "draft"}
@ -68,6 +69,22 @@ def require_string_array(value: Any, path: str, *, nonempty: bool = False) -> No
require_string(item, f"{path}[{index}]")
def require_update_candidate_array(value: Any, path: str) -> None:
require(isinstance(value, list), f"{path} must be an array")
for index, item in enumerate(value):
item_path = f"{path}[{index}]"
if isinstance(item, str):
require_string(item, item_path)
continue
require(isinstance(item, dict), f"{item_path} must be a string or object")
require("value" in item, f"{item_path} object must include value")
require_string(item["value"], f"{item_path}.value")
if "key" in item:
require_string(item["key"], f"{item_path}.key")
if "target_agent_id" in item:
require_string(item["target_agent_id"], f"{item_path}.target_agent_id")
def validate_parsed_response(value: Any, path: str) -> None:
require(isinstance(value, dict), f"{path} must be an object")
require_keys(
@ -89,8 +106,9 @@ def validate_parsed_response(value: Any, path: str) -> None:
require_string(value[key], f"{path}.{key}")
require(isinstance(value["spoken_text"], str), f"{path}.spoken_text must be a string")
require(value["action_label"] in ACTION_LABELS, f"{path}.action_label is invalid: {value['action_label']}")
for key in ["state_update_candidates", "relationship_update_candidates", "unresolved_hooks"]:
require_string_array(value[key], f"{path}.{key}")
for key in ["state_update_candidates", "relationship_update_candidates"]:
require_update_candidate_array(value[key], f"{path}.{key}")
require_string_array(value["unresolved_hooks"], f"{path}.unresolved_hooks")
def validate_capture(document: dict[str, Any], source: Path) -> None:
@ -180,6 +198,46 @@ def validate_capture(document: dict[str, Any], source: Path) -> None:
require_string_array(review["failure_labels"], f"{base}.coordinator_review.failure_labels")
def validate_mutation_receipt(document: dict[str, Any], source: Path) -> None:
base = str(source)
require(document.get("schema_version") == "ghostlight.reviewed_state_mutation.v0", f"{base}.schema_version is wrong")
require_keys(
document,
[
"mutation_id",
"source_fixture_ref",
"source_capture_ref",
"mutated_fixture_ref",
"event_id",
"responder_output_ref",
"participant_appraisals",
"observed_action",
"observed_response",
"applied_mutations",
"manual_review_notes",
"deferred_mutations",
],
base,
)
for key in ["mutation_id", "source_fixture_ref", "source_capture_ref", "mutated_fixture_ref", "event_id", "responder_output_ref"]:
require_string(document[key], f"{base}.{key}")
require((ROOT / document["source_fixture_ref"]).exists(), f"{base}.source_fixture_ref does not exist")
require((ROOT / document["source_capture_ref"]).exists(), f"{base}.source_capture_ref does not exist")
require((ROOT / document["mutated_fixture_ref"]).exists(), f"{base}.mutated_fixture_ref does not exist")
require(isinstance(document["participant_appraisals"], list) and document["participant_appraisals"], f"{base}.participant_appraisals must be non-empty")
for index, appraisal in enumerate(document["participant_appraisals"]):
appraisal_path = f"{base}.participant_appraisals[{index}]"
require_keys(appraisal, ["participant_agent_id", "private_interpretation", "state_deltas", "relationship_deltas", "next_action_constraints"], appraisal_path)
require(isinstance(document["applied_mutations"], list) and document["applied_mutations"], f"{base}.applied_mutations must be non-empty")
for index, mutation in enumerate(document["applied_mutations"]):
mutation_path = f"{base}.applied_mutations[{index}]"
require_keys(mutation, ["target", "path", "before", "after"], mutation_path)
require(isinstance(mutation["before"], (int, float)), f"{mutation_path}.before must be numeric")
require(isinstance(mutation["after"], (int, float)), f"{mutation_path}.after must be numeric")
require(0 <= mutation["before"] <= 1, f"{mutation_path}.before must be between 0 and 1")
require(0 <= mutation["after"] <= 1, f"{mutation_path}.after must be between 0 and 1")
def main() -> int:
parser = argparse.ArgumentParser(description="Validate Ghostlight responder output captures.")
parser.add_argument("paths", nargs="*", type=Path, help="Responder output capture files to validate.")
@ -190,6 +248,9 @@ def main() -> int:
for path in paths:
validate_capture(load_json(path), path)
print(f"ok: {path}")
for path in DEFAULT_MUTATIONS:
validate_mutation_receipt(load_json(path), path)
print(f"ok: {path}")
return 0