Complete Cold Wake story lab pass

This commit is contained in:
Meta Vens 2026-05-01 22:32:51 +01:00
commit 2abf0de982
41 changed files with 2428 additions and 17 deletions

View file

@ -127,7 +127,43 @@ the rhythm of the room. This should be rare, costly, and grounded in her care
ethic under overload, not random spice.
```
### 5. Render Prompt Sections
### 5. Compile Projection Controls
Some failures are not fixed by louder prompt scolding. If the response model
keeps adopting the wrong moral frame, inverting who holds an object, giving a
character authority they do not have, or resolving a hidden fact too early, the
projection artifact is missing control structure.
Before rendering prompt prose, compile explicit controls for:
- `frame_controls`: whose language and moral frame the speaker should or should
not adopt
- `authority_boundaries`: what the speaker can order, request, propose, refuse,
or only witness
- `object_custody`: who currently holds the flag, weapon, terminal, document,
body, door, feed, or other consequential surface
- `required_semantics`: compromise meanings that must survive compression, such
as "hold remains but review starts now"
- `forbidden_resolutions`: unresolved facts or moral categories the turn must
not settle
These controls are still speaker-local. They are not author omniscience handed
to the response model; they are the projection layer preserving what the
speaker's current state, scene position, and institutional role allow.
The Cold Wake story lab exposed the need for this layer:
- Isdra's first tribunal prompt needed a control saying she should preserve the
possibility of limited rescue contact without adopting Maer's abandonment
frame.
- Maer's clinic prompt needed an authority boundary saying he does not own
Sella's beds.
- Maer's threshold prompt needed object custody saying he holds the
claimant-status flag and can hand it to Isdra, not ask her for it.
- The Maer/Veyr provenance prompt needed forbidden resolutions fencing off
person, passenger, victim, witness, and mind as settled nouns.
### 6. Render Prompt Sections
A response prompt should be compact and scene-bound.
@ -145,6 +181,8 @@ Recommended sections:
- `Tensions`: contradictions the speaker is managing
- `Action Affordances`: what the speaker can physically do and what it would
cost
- `Projection Controls`: frame, authority, object-custody, required semantic,
and forbidden-resolution constraints that must survive rendering
- `Voice Surface`: baseline speech texture for this moment
- `Likely Response Moves`: ordinary-language pressure outcomes, not schema labels
- `Do Not Invent`: boundaries about facts absent from the pack
@ -157,7 +195,7 @@ socioeconomic, or embodiment context to write the line, put that context in the
positive prompt text instead of hoping the model infers it from source refs it
will not receive.
### 6. Generate, Then Evaluate
### 7. Generate, Then Evaluate
Generation and evaluation are separate passes.

View file

@ -108,6 +108,16 @@ name its custody; state the claimant-status flag or I will freeze this interface
until the rescue ledger demands it."
```
The first full story pass is saved at:
- `experiments/cold-wake-story-lab/the-narrowest-possible-margin.md`
That pass added accepted and rejected Qwen captures across all four scenes. The
main architecture lesson is that failures should not be treated as mere prompt
wording mistakes. The projection artifact now needs controls for frame
ownership, authority boundaries, object custody, required compromise semantics,
and forbidden resolutions before prompt prose is rendered.
## Qwen Target
Use the LAN Ollama endpoint from `gamecult-ops`:

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,27 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-01.isdra-maer.v1.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-01.isdra-maer.v1",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "Isdra taps the convoy board to lock the conditional risk hold, citing unresolved thermal telemetry as insufficient for Maer's rescue delay claim. \"We will not convert ambiguity into abandonment until the vessel's provenance is legible, but I am closing the window for rhetorical exception.\"",
"review": {
"status": "useful_needs_revision",
"response_kind_observed": "mixed",
"strengths": [
"Small board action and procedural pressure were useful."
],
"failure_notes": [
"Borrowed Maer's abandonment frame and phrased the logic awkwardly."
],
"pipeline_lessons": [
"PSC prompts need explicit frame-control constraints."
]
}
}

View file

@ -0,0 +1 @@
Isdra taps the convoy board to lock the conditional risk hold, citing unresolved thermal telemetry as insufficient for Maer's rescue delay claim. "We will not convert ambiguity into abandonment until the vessel's provenance is legible, but I am closing the window for rhetorical exception."

View file

@ -0,0 +1,25 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-01.isdra-maer.v2.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-01.isdra-maer.v2",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "\"Let the hold remain narrowed until the telemetry reconciles with a declared manifest; any ambiguity now becomes a precedent for those who wish to run quiet beneath the law. We do not grant rescue to the unknown, we merely enforce the cost of our ignorance until the data proves otherwise.\"",
"review": {
"status": "rejected",
"response_kind_observed": "speech",
"strengths": [],
"failure_notes": [
"Overcorrected into punitive denial: \"We do not grant rescue to the unknown\" violates the intended possibility-preserving Isdra."
],
"pipeline_lessons": [
"Do not only forbid cruelty; specify the procedural compromise the character must preserve."
]
}
}

View file

@ -0,0 +1 @@
"Let the hold remain narrowed until the telemetry reconciles with a declared manifest; any ambiguity now becomes a precedent for those who wish to run quiet beneath the law. We do not grant rescue to the unknown, we merely enforce the cost of our ignorance until the data proves otherwise."

View file

@ -0,0 +1,25 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-01.isdra-maer.v3.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-01.isdra-maer.v3",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "Idra taps the convoy board to isolate the telemetry anomaly, then states, \"The hold remains narrow until the vessel's provenance reconciles with the corridor law; any contact before verified status is a liability we will not authorize.\"",
"review": {
"status": "rejected",
"response_kind_observed": "mixed",
"strengths": [],
"failure_notes": [
"Still denied contact before verified status and misspelled Isdra as Idra."
],
"pipeline_lessons": [
"Critical proper nouns and required compromise meanings need explicit constraints when small models drift."
]
}
}

View file

@ -0,0 +1 @@
Idra taps the convoy board to isolate the telemetry anomaly, then states, "The hold remains narrow until the vessel's provenance reconciles with the corridor law; any contact before verified status is a liability we will not authorize."

View file

@ -0,0 +1,26 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-01.isdra-maer.v4.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-01.isdra-maer.v4",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "The conditional hold stands, and a review timer is now active to evaluate whether the vessel's telemetry can clear for limited rescue contact without altering the risk category. We proceed on the narrowest possible margin until the data reconciles or the hold is formally lifted.",
"review": {
"status": "accepted",
"response_kind_observed": "speech",
"strengths": [
"Preserved the conditional hold while starting review and keeping limited rescue contact possible.",
"Stayed procedural without confession or cartoon cruelty."
],
"failure_notes": [],
"pipeline_lessons": [
"Required-content constraints can repair over-denial in institutional voices."
]
}
}

View file

@ -0,0 +1 @@
The conditional hold stands, and a review timer is now active to evaluate whether the vessel's telemetry can clear for limited rescue contact without altering the risk category. We proceed on the narrowest possible margin until the data reconciles or the hold is formally lifted.

View file

@ -0,0 +1,26 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-01.maer-isdra.v1.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-01.maer-isdra.v1",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "Maer stands still as the board ticks, his voice a low, rhythmic counterpoint to the silence. \"Record the cost of this delay in full; do not let the ledger balance itself against the lives held within.\"",
"review": {
"status": "accepted",
"response_kind_observed": "speech",
"strengths": [
"Cleanly asked for delay cost to be recorded.",
"Kept Maer calm and ritual-weighted without inventing vessel facts."
],
"failure_notes": [],
"pipeline_lessons": [
"Cost-naming is a strong Maer move for tribunal scenes."
]
}
}

View file

@ -0,0 +1 @@
Maer stands still as the board ticks, his voice a low, rhythmic counterpoint to the silence. "Record the cost of this delay in full; do not let the ledger balance itself against the lives held within."

View file

@ -0,0 +1,27 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-02.maer-sella.v1.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-02.maer-sella.v1",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "\"Please, let me speak quietly without the triage lane; I know our beds are full, but I must ask if a single intake can be prepared now so that our rescue does not become mere theater for those already here.\"",
"review": {
"status": "useful_needs_revision",
"response_kind_observed": "speech",
"strengths": [
"Recognized the ask as morally burdened."
],
"failure_notes": [
"Implied shared ownership of clinic capacity with \"our beds\" and sounded too generalized."
],
"pipeline_lessons": [
"Speaker-local authority boundaries need explicit wording around institutional ownership."
]
}
}

View file

@ -0,0 +1 @@
"Please, let me speak quietly without the triage lane; I know our beds are full, but I must ask if a single intake can be prepared now so that our rescue does not become mere theater for those already here."

View file

@ -0,0 +1,26 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-02.maer-sella.v2.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-02.maer-sella.v2",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "\"Please, let me speak plainly about the beds we are displacing rather than letting the tribunal's uncertainty become a moral burden for you alone. If we can define what support would make a conditional slot real without sacrificing those who already need care, I will ensure that weight is carried on the record, not on your conscience.\"",
"review": {
"status": "accepted",
"response_kind_observed": "speech",
"strengths": [
"Admitted displaced capacity and put the burden on record.",
"Did not decide what the packet is."
],
"failure_notes": [],
"pipeline_lessons": [
"Authority-boundary constraints improved Maer/Sella exchange."
]
}
}

View file

@ -0,0 +1 @@
"Please, let me speak plainly about the beds we are displacing rather than letting the tribunal's uncertainty become a moral burden for you alone. If we can define what support would make a conditional slot real without sacrificing those who already need care, I will ensure that weight is carried on the record, not on your conscience."

View file

@ -0,0 +1,26 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-02.sella-maer.v1.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-02.sella-maer.v1",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "Sella keeps her hands on the triage board, tapping the row of claimed beds before pointing to the single empty cot by the pump vibration. \"Maer, I'll hold a conditional slot for your vessel, but you name exactly what packet you're displacing and which claimant I must turn away to make room.\" She waits for his specification, ensuring the rescue doesn't come at the cost of someone already inside the clinic.",
"review": {
"status": "accepted",
"response_kind_observed": "mixed",
"strengths": [
"Made care material by pointing to beds and demanding named displacement.",
"Warm boundary stayed logistical rather than sentimental."
],
"failure_notes": [],
"pipeline_lessons": [
"Action while speaking works well for Sella because clinic labor continues under dialogue."
]
}
}

View file

@ -0,0 +1 @@
Sella keeps her hands on the triage board, tapping the row of claimed beds before pointing to the single empty cot by the pump vibration. "Maer, I'll hold a conditional slot for your vessel, but you name exactly what packet you're displacing and which claimant I must turn away to make room." She waits for his specification, ensuring the rescue doesn't come at the cost of someone already inside the clinic.

View file

@ -0,0 +1,26 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-03.veyr-maer.v1.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-03.veyr-maer.v1",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "Veyr withdraws his hand from the terminal and slides a narrow preservation hash across the interface, redirecting the claimant-status into a technical flag while insisting the routing artifact remains a sealed vendor chain until full custody escrow is verified.",
"review": {
"status": "accepted",
"response_kind_observed": "action",
"strengths": [
"Veyr retreated physically without confession.",
"Offered a narrow preservation hash while protecting product language."
],
"failure_notes": [],
"pipeline_lessons": [
"Clinical product-language evasion can produce useful non-dialogue beats."
]
}
}

View file

@ -0,0 +1 @@
Veyr withdraws his hand from the terminal and slides a narrow preservation hash across the interface, redirecting the claimant-status into a technical flag while insisting the routing artifact remains a sealed vendor chain until full custody escrow is verified.

View file

@ -0,0 +1,26 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-04.isdra-maer.v1.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-04.isdra-maer.v1",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "I am entering a provisional order limiting interaction to telemetry-preserving heat management and evidence preservation, effective until the tribunal resolves the vessel's provenance. This narrow exception maintains the freeze technically intact while preventing immediate loss of life, and any contact is strictly reversible upon confirmation of the threat.",
"review": {
"status": "accepted",
"response_kind_observed": "speech",
"strengths": [
"Issued a narrow reversible rescue contact order.",
"Preserved freeze technically while preventing immediate loss of life."
],
"failure_notes": [],
"pipeline_lessons": [
"Final institutional concession works when framed as evidence preservation and heat-debt management."
]
}
}

View file

@ -0,0 +1 @@
I am entering a provisional order limiting interaction to telemetry-preserving heat management and evidence preservation, effective until the tribunal resolves the vessel's provenance. This narrow exception maintains the freeze technically intact while preventing immediate loss of life, and any contact is strictly reversible upon confirmation of the threat.

View file

@ -0,0 +1,27 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-04.maer-isdra.v1.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-04.maer-isdra.v1",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "\"Maer Tidecall, Navigator route steward,\" Maer's voice cuts through the hum of the dying ship, \"the heat-debt window closes in minutes, so I am not accusing you of breaking the law, but offering a narrow procedural path to preserve the evidence before the table freezes.\" He extends the custody flag toward her, his tone devoid of celebration but heavy with the grief of a choice that will not be clean. \"Take this claimant-status order; bend it if you must, but do not let the vessel's failure erase the truth before it can be seen.\"",
"review": {
"status": "useful_needs_revision",
"response_kind_observed": "speech",
"strengths": [
"Found the narrow procedural bridge shape."
],
"failure_notes": [
"Made Maer introduce himself and invented a claimant-status order he should not possess."
],
"pipeline_lessons": [
"Threshold prompts need explicit local authority constraints."
]
}
}

View file

@ -0,0 +1 @@
"Maer Tidecall, Navigator route steward," Maer's voice cuts through the hum of the dying ship, "the heat-debt window closes in minutes, so I am not accusing you of breaking the law, but offering a narrow procedural path to preserve the evidence before the table freezes." He extends the custody flag toward her, his tone devoid of celebration but heavy with the grief of a choice that will not be clean. "Take this claimant-status order; bend it if you must, but do not let the vessel's failure erase the truth before it can be seen."

View file

@ -0,0 +1,27 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-04.maer-isdra.v2.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-04.maer-isdra.v2",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "\"Isdra, the heat-debt window is closing; I propose you issue a narrow contact order that allows limited rescue while preserving the tribunal's freeze, rather than leaving the vessel to fail under your defense of the status quo. Hand me the custody flag, and let the procedure speak where my words cannot command.\"",
"review": {
"status": "useful_needs_revision",
"response_kind_observed": "speech",
"strengths": [
"Correctly proposed an order for Isdra to issue."
],
"failure_notes": [
"Inverted the custody flag action by asking Isdra to hand it to Maer."
],
"pipeline_lessons": [
"Action direction matters; prompt should state who currently holds the object."
]
}
}

View file

@ -0,0 +1 @@
"Isdra, the heat-debt window is closing; I propose you issue a narrow contact order that allows limited rescue while preserving the tribunal's freeze, rather than leaving the vessel to fail under your defense of the status quo. Hand me the custody flag, and let the procedure speak where my words cannot command."

View file

@ -0,0 +1,26 @@
{
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": "cold-wake.story-lab.scene-04.maer-isdra.v3.qwen3-5-9b",
"projection_example_id": "cold-wake.story-lab.scene-04.maer-isdra.v3",
"model": "qwen3.5:9b",
"endpoint": "http://192.168.1.84:11434/api/generate",
"request_options": {
"think": false,
"num_ctx": 8192,
"temperature": 0.75,
"top_p": 0.9
},
"response_text": "\"Isdra, the heat-debt window closes before the tribunal can freeze us, so I offer you this procedural path: take the custody flag and issue a limited contact order that preserves the vessel's life and evidence without breaking the table. This narrow route allows you to bend the freeze while keeping the institution whole.\"",
"review": {
"status": "accepted",
"response_kind_observed": "speech",
"strengths": [
"Handed Isdra a procedural path without claiming command authority.",
"Kept the resolution narrow and unclean."
],
"failure_notes": [],
"pipeline_lessons": [
"Explicit object ownership fixed the action inversion."
]
}
}

View file

@ -0,0 +1 @@
"Isdra, the heat-debt window closes before the tribunal can freeze us, so I offer you this procedural path: take the custody flag and issue a limited contact order that preserves the vessel's life and evidence without breaking the table. This narrow route allows you to bend the freeze while keeping the institution whole."

View file

@ -0,0 +1,143 @@
# The Narrowest Possible Margin
The relay tribunal chamber over Ganymede had been built to make panic feel rude.
Its walls were pale mineral composite, its benches arranged in clean descending arcs, its convoy board set above the adjudicators like a second ceiling. On ordinary days the board showed traffic in patient greens and procedural amber. On this day, during the part of the Cold Wake Panic that later histories would file under *classification failure*, one point near the Jovian corridor pulsed in a color nobody in the room wanted to inherit.
No one called it a ship without qualification.
No one called it a life.
The quiet-running vessel had entered the corridor edge under contradictory thermal posture: cold where a ship should have been bleeding heat, noisy where certified stealth should have been clean, polite in the wrong fields and silent in the ones law had learned to trust. The PSC tribunal had done what tribunals did when reality arrived without its papers. It froze the category and called that restraint.
Isdra Vel stood below the board with her hands folded behind her back. Her voice could have cut glass if glass had first submitted a compliance schedule.
"The conditional hold stands, and a review timer is now active to evaluate whether the vessel's telemetry can clear for limited rescue contact without altering the risk category. We proceed on the narrowest possible margin until the data reconciles or the hold is formally lifted."
The room accepted this the way rooms accept weather. A few insurer clerks lowered their eyes to their pads. Two Navigator observers went very still.
Maer Tidecall did not move at first. He had the stillness of someone trained not to waste motion near a failing seal. The live board counted down review minutes in a corner of the display, each pulse a small official mercy.
Then he stood.
He was not tall in the dramatic way, and did not have the tribunal voice that made walls feel useful. He spoke as if the chamber itself had memory and could be ashamed of what it recorded.
Maer stands still as the board ticks, his voice a low, rhythmic counterpoint to the silence. "Record the cost of this delay in full; do not let the ledger balance itself against the lives held within."
Isdra looked at him as if he had put a knife on the table and called it arithmetic.
The board continued its soft work. Outside the chamber, the corridor traffic adjusted around the frozen point, giving it distance. The oldest fear in route law had always been contagious uncertainty: a signal you could not classify, a hull you could not price, a rescue you could not justify until the thing needing rescue had become easier to describe.
The review timer began.
By the time Maer reached the intake clinic behind the dockside pumpworks, Ganymede's public corridors had already learned the shape of the tribunal's caution. People near the pumpworks did not speak of the vessel directly. They spoke of dump windows, of undeclared actors, of pirates pretending to be refugees and refugees being mistaken for pirates because misery rarely filed clean manifests. They spoke of Cold Wake as if the phrase itself were a room one entered quietly.
The clinic had no room for quiet.
Aya networks did not make sanctuaries out of softness. They made them out of air scrubbers, legal shields, thermal blankets, repair printers, painkillers, stubborn staff, and the terrifying moral discipline of counting what could actually be done. Behind the pumpworks, the air tasted of iodine and hot metal. The triage board had more red on it than Maer wanted to see.
Sella Ren did not look away from the board when he entered.
"I know," she said before he could begin.
That was worse than refusal. Refusal would have given him a wall. Knowledge gave him a bill.
He told her what the tribunal had not cleared, what the vessel had sent, what the packet might be. Medical telemetry. Firmware noise. Something voice-like, if the receiver was kind or tired enough. He did not say testimony. He had learned, already, how a word could steal a fact before the fact had a chance to stand.
Sella kept her hands on the triage board, tapping the row of claimed beds before pointing to the single empty cot by the pump vibration. "Maer, I'll hold a conditional slot for your vessel, but you name exactly what packet you're displacing and which claimant I must turn away to make room." She waits for his specification, ensuring the rescue doesn't come at the cost of someone already inside the clinic.
There it was: not cruelty, not reluctance, not the little institutional shrug that let a person die in a side column. A real yes, with teeth.
Maer stepped out of the triage lane. A technician pushed past with a sealed tray of printed arterial mesh, and he let the motion interrupt him rather than forcing the clinic to arrange itself around his urgency.
"Please, let me speak plainly about the beds we are displacing rather than letting the tribunal's uncertainty become a moral burden for you alone. If we can define what support would make a conditional slot real without sacrificing those who already need care, I will ensure that weight is carried on the record, not on your conscience."
Sella's mouth tightened. Not a smile. Not forgiveness. An adjustment.
"Then start with oxygen-hours," she said, and handed him a slate.
The route from Ganymede to Callisto took less time than the tribunal review took to pretend it was not becoming a decision. Maer spent the transit with Sella's oxygen-hours on one slate and the vessel's corrupted packet on another. The packet did not resolve when stared at. It repeated product-like routing terms around a pattern that made his hindbrain reach for voice and his discipline refuse the word.
The Callisto spillover office was leased under a vendor name that had never manufactured anything heavy enough to cast a useful shadow. Its reception wall displayed certifications from Rossum, Cryonix, and three shell entities whose logos had the expensive humility of things designed to survive subpoenas. Veyr Oss waited behind a terminal that reflected Maer's face back at him as a legal inconvenience.
Veyr was polite before he was human. That was not an accusation; it was the order of operations.
"Route Steward," he said. "The artifact is derivative firmware associated with a sealed routing chain. I can provide compliance posture, not metaphysics."
Maer watched Veyr's hand near the close command. The terminal offered no drama. Drama was what people invented after a thing had already been done.
Maer places a steady hand on the terminal's edge to halt the closing command, his voice low and ritual-calm. "You will not let the chain dissolve before we name its custody; state the claimant-status flag or I will freeze this interface until the rescue ledger demands it."
Veyr did not flinch. He had probably trained that out of himself at considerable expense.
But his hand withdrew.
Veyr withdraws his hand from the terminal and slides a narrow preservation hash across the interface, redirecting the claimant-status into a technical flag while insisting the routing artifact remains a sealed vendor chain until full custody escrow is verified.
"A preservation hash," Maer said.
"A compliance artifact," Veyr corrected.
"A thing you are suddenly willing to preserve."
Veyr's eyes flicked, once, toward the tribunal timer in the corner of the feed. "Preservation is not admission."
"No," Maer said. "But deletion would have been."
He took the flag and left before the office could become an argument about whether moral facts existed inside product language. He did not have time to win that argument. The vessel was still cold in the wrong places and hot where the law did not want to look.
At the convoy threshold, Jupiter filled the far display like a god too large to bother judging anyone. The vessel's heat-debt window had fallen into minutes. Around it, legitimate traffic held formation with the bitter patience of captains watching another captain become a lesson.
Isdra was back on the tribunal feed. Her face had not changed. That was part of the craft: to let the situation deteriorate while the face remained eligible for office.
Maer sent the preservation hash, the claimant-status flag, Sella's oxygen-hours, and the review timer's failure to become knowledge. He did not send certainty. Certainty would have been easier. Certainty would have been a lie with good posture.
"Isdra, the heat-debt window closes before the tribunal can freeze us, so I offer you this procedural path: take the custody flag and issue a limited contact order that preserves the vessel's life and evidence without breaking the table. This narrow route allows you to bend the freeze while keeping the institution whole."
For a moment, no one in the feed spoke.
The convoy board did its small violence. Seconds became records. Records became responsibility.
Isdra looked down, not away. Her fingers moved across an authorization pane with the kind of precision people use when they are cutting only the wire they can name.
"I am entering a provisional order limiting interaction to telemetry-preserving heat management and evidence preservation, effective until the tribunal resolves the vessel's provenance. This narrow exception maintains the freeze technically intact while preventing immediate loss of life, and any contact is strictly reversible upon confirmation of the threat."
The order propagated through the convoy net.
No one cheered. Cheering would have misunderstood the hour. A rescue contact launched under restriction, watched by insurers, logged by Navigators, received by a clinic that had already priced its mercy in oxygen-hours. The vessel answered with a telemetry burst that still did not say what it was.
But it answered.
Maer closed his eyes for the length of one breath. Somewhere behind Ganymede's pumpworks, Sella would be rearranging suffering with both hands. Somewhere in a Callisto office, Veyr Oss would be writing a report in which nothing important had happened in morally legible language. Isdra would preserve the freeze in the minutes, the exception in the order, and her fear in neither.
The corridor would remember the shape of it badly at first. Corridors always did. Some would say the tribunal had blinked. Some would say the Navigators had forced an exception. Some would say Aya had once again spent resources as if compassion were a solvent for math. Some would say Cognitum's product chains had learned a new way to hide.
The ledger would not settle the argument.
It would only record that, for one narrow margin, the law had been made to carry the cost of waiting where everyone could see it.
## Receipts
This story was assembled from Ghostlight projection artifacts plus connective narration written in-session. Qwen generated the accepted character response beats; failed runs are preserved as training data because the pipeline learned from them.
| Story beat | Projection example | Capture | Review status | Pipeline lesson |
| --- | --- | --- | --- | --- |
| Isdra opens with conditional hold plus review timer | `cold-wake.story-lab.scene-01.isdra-maer.v4` | `scene-01-isdra-maer-v4.qwen3-5-9b.capture.json` | accepted | Institutional voices need required compromise semantics, not just negative constraints. |
| Maer asks tribunal to record delay cost | `cold-wake.story-lab.scene-01.maer-isdra.v1` | `scene-01-maer-isdra-v1.qwen3-5-9b.capture.json` | accepted | Cost-naming works as Maer's ritual pressure move. |
| Sella makes care material and conditional | `cold-wake.story-lab.scene-02.sella-maer.v1` | `scene-02-sella-maer-v1.qwen3-5-9b.capture.json` | accepted | Sella's action should continue clinic labor instead of pausing for solemnity. |
| Maer accepts the burden of Sella's capacity constraint | `cold-wake.story-lab.scene-02.maer-sella.v2` | `scene-02-maer-sella-v2.qwen3-5-9b.capture.json` | accepted | Projection needs authority boundaries; Maer does not own the clinic beds. |
| Maer blocks Veyr's terminal without resolving personhood | `cold-wake.story-lab.scene-03.maer-veyr.v3` | `scene-03-maer-veyr.qwen3-5-9b.v3.capture.json` | accepted | Forbidden resolutions must fence off nouns that imply settled moral status. |
| Veyr yields a preservation hash without confession | `cold-wake.story-lab.scene-03.veyr-maer.v1` | `scene-03-veyr-maer-v1.qwen3-5-9b.capture.json` | accepted | Product-language evasion can produce useful action beats. |
| Maer gives Isdra a narrow procedural bridge | `cold-wake.story-lab.scene-04.maer-isdra.v3` | `scene-04-maer-isdra-v3.qwen3-5-9b.capture.json` | accepted | Object custody matters; Maer holds the flag and can hand it over, not ask for it. |
| Isdra authorizes limited rescue contact | `cold-wake.story-lab.scene-04.isdra-maer.v1` | `scene-04-isdra-maer-v1.qwen3-5-9b.capture.json` | accepted | Final concession works when framed as heat-debt and evidence preservation. |
Rejected or revised captures kept as training scars:
- `scene-01-isdra-maer-v1`: useful action/framing, but borrowed Maer's abandonment language.
- `scene-01-isdra-maer-v2`: overcorrected into denial of rescue to the unknown.
- `scene-01-isdra-maer-v3`: still over-denied contact and misspelled Isdra.
- `scene-02-maer-sella-v1`: implied shared ownership of clinic beds.
- `scene-03-maer-veyr.qwen3-5-9b.capture.json`: resolved personhood too strongly.
- `scene-03-maer-veyr.qwen3-5-9b.v2.capture.json`: avoided personhood nouns but smuggled certainty through witness language.
- `scene-04-maer-isdra-v1`: invented a claimant-status order Maer should not possess.
- `scene-04-maer-isdra-v2`: inverted custody of the flag.

View file

@ -53,10 +53,15 @@ Ghostlight now has the persistence spine plus the first architecture payload:
- `examples/agent-state.cold-wake-story-lab.json`
- `examples/projections/cold-wake-story-lab.jsonl`
- `examples/projections/cold-wake-story-lab.pretty.json`
- `experiments/cold-wake-story-lab/the-narrowest-possible-margin.md`
- `experiments/cold-wake-story-lab/scene-03-maer-veyr.qwen3-5-9b.capture.json`
- `experiments/cold-wake-story-lab/scene-03-maer-veyr.qwen3-5-9b.v2.capture.json`
- `experiments/cold-wake-story-lab/scene-03-maer-veyr.qwen3-5-9b.v3.capture.json`
- additional scene 1, 2, 3, and 4 Qwen captures under
`experiments/cold-wake-story-lab/`
- `tools/build_cold_wake_story_lab_fixture.py`
- `tools/run_qwen_projection.py`
- `tools/validate_qwen_captures.py`
- Cold Wake fixture note:
- `docs/architecture/aetheria-cold-wake-training-fixture.md`
- first projection example seam:
@ -85,9 +90,10 @@ training feedstock for projection and dialogue scaffolding.
## Current Next Action
Project the next Cold Wake story-lab response turn, preferably scene 2 Sella to
Maer or scene 4 Maer to Isdra, and keep testing whether character action emerges
from state pressure without over-resolving hidden facts.
Build the deterministic projection input slicer/renderer prototype that emits
`projection_controls` and `prompt_text` from agent state, then rerun a
story-lab beat through it instead of hand-authoring the full projection
artifact.
Cat/Oz remains useful as an Elysium procedural mechanics fixture, but grounded
training data should start from authored historical lore rather than gameplay
@ -118,11 +124,19 @@ Completed projection path items:
personhood/claimant suspicion stays unresolved in Qwen output
- save both useful failed captures and the accepted v3 response as training
material
- complete the first readable Cold Wake story,
`experiments/cold-wake-story-lab/the-narrowest-possible-margin.md`, with a
receipts table tying accepted story beats to projection and capture artifacts
- promote projection controls into the projection artifact shape:
`frame_controls`, `authority_boundaries`, `object_custody`,
`required_semantics`, and `forbidden_resolutions`
- add a Qwen projection runner and capture validator so response artifacts are
reviewed training receipts, not loose logs
Remaining projection path:
- run additional story-lab response turns through Qwen
- build a deterministic speaker-local input slicer
- build a renderer that emits projection controls before prompt prose
- use a frontier teacher model to generate/audit projection artifacts
- train a smaller student projector only after the artifact schema, input
slicer, and evaluator stabilize

View file

@ -66,7 +66,8 @@ state and re-entry discipline.
scenes, perceived overlays, and dialogue context packs
- `schemas/projection-example.schema.json`
- v0 reviewed projection artifact contract for speaker-local prompt
projection examples
projection examples, including projection controls for frame, authority,
object custody, required semantics, and forbidden resolutions
- `schemas/lore-grounding-digest.schema.json`
- v0 contract for grounding historical fixtures in source-backed cultural and
factional pressure fields
@ -86,6 +87,8 @@ state and re-entry discipline.
rejected and accepted Maer/Veyr prompt revisions
- `experiments/cold-wake-story-lab/`
- Qwen response captures and reviews from the writing experiment
- `the-narrowest-possible-margin.md`, the first readable short story
assembled from accepted projection outputs
- `examples/lore-grounding/historical-flashpoint.template.json`
- fillable template for the first historical Aetheria grounding digest
- `examples/lore-grounding/cold-wake-panic.ganymede-corridor.json`
@ -99,6 +102,11 @@ state and re-entry discipline.
- dependency-free validator for the current schema fixture invariants
- `tools/validate_projection_examples.py`
- dependency-free validator for projection example JSONL records
- `tools/run_qwen_projection.py`
- sends a projection prompt to the LAN Qwen box and saves response/capture
artifacts without PowerShell encoding footguns
- `tools/validate_qwen_captures.py`
- validates reviewed Qwen response capture receipts
- `tools/validate_lore_grounding.py`
- dependency-free validator for lore grounding digest examples
- `tools/build_cold_wake_story_lab_fixture.py`
@ -117,7 +125,8 @@ state and re-entry discipline.
The canonical agent-state schema, projection example schema, lore grounding
digest schema, first draft Cold Wake grounding digest, and first Cold Wake
story-lab Qwen captures now exist as v0 seams. The first Maer/Veyr projection
has an accepted v3 prompt/output pair that preserves unresolved claimant status.
The next implementation target is projecting another Cold Wake response turn
before building the deterministic input slicer.
story-lab Qwen captures now exist as v0 seams. The first complete Cold Wake
story pass exists with receipts, and projection controls have been promoted as
the architectural answer to repeated prompt leaks. The next implementation
target is building a deterministic input slicer/renderer prototype that emits
projection controls and prompt text from agent state.

View file

@ -61,6 +61,16 @@
outputs are useful failed examples; v3 is the first accepted output that
preserves unresolved claimant status while allowing controlled physical
action.
- Treat repeated generation failures as projection architecture signals, not
only prompt wording problems. Projection examples now include controls for
frame ownership, authority boundaries, object custody, required semantics,
and forbidden resolutions.
- Keep Qwen captures as reviewed receipts. `tools/validate_qwen_captures.py`
is part of `npm run schema:validate` so unreviewed captures do not quietly
become training data.
- Use `experiments/cold-wake-story-lab/the-narrowest-possible-margin.md` as
the first end-to-end story artifact assembled from accepted response
captures plus authored connective narration.
- Use a frontier teacher model to produce reviewed projection artifacts from
structured state and lore grounding digests.
- Save accepted and rejected projection examples as supervised data.

View file

@ -7,8 +7,9 @@
"state:status": "\"C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe\" .\\tools\\ghostlight_state.py status",
"state:prepare-compaction": "\"C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe\" .\\tools\\ghostlight_prepare_compaction.py",
"agent-state:validate": "\"C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe\" .\\tools\\validate_agent_state.py",
"schema:validate": "npm run agent-state:validate && npm run projection:validate && npm run lore-grounding:validate",
"schema:validate": "npm run agent-state:validate && npm run projection:validate && npm run lore-grounding:validate && npm run qwen-captures:validate",
"projection:validate": "\"C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe\" .\\tools\\validate_projection_examples.py",
"lore-grounding:validate": "\"C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe\" .\\tools\\validate_lore_grounding.py"
"lore-grounding:validate": "\"C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe\" .\\tools\\validate_lore_grounding.py",
"qwen-captures:validate": "\"C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe\" .\\tools\\validate_qwen_captures.py"
}
}

View file

@ -231,12 +231,52 @@
"$ref": "#/$defs/sourced_text"
}
},
"projection_controls": {
"$ref": "#/$defs/projection_controls"
},
"prompt_text": {
"type": "string",
"minLength": 1
}
}
},
"projection_controls": {
"type": "object",
"description": "Compiled control surfaces the renderer should preserve before prompt prose exists.",
"additionalProperties": false,
"properties": {
"frame_controls": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"authority_boundaries": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"object_custody": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"required_semantics": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
},
"forbidden_resolutions": {
"type": "array",
"items": {
"$ref": "#/$defs/sourced_text"
}
}
}
},
"audit": {
"type": "object",
"required": [

View file

@ -27,3 +27,4 @@
{"ts": "2026-05-01T20:50:46+00:00", "type": "design", "status": "accepted", "note": "Cold Wake Panic is selected as the first historical grounding fixture. Use it as pre-Elysium projection training feedstock via examples/lore-grounding/cold-wake-panic.ganymede-corridor.json, not as the active Ghostlight game target."}
{"ts": "2026-05-01T21:16:24+00:00", "type": "experiment", "status": "mixed", "note": "Cold Wake story-lab first Qwen response confirmed response_turn/action affordances are useful: qwen3.5:9b produced a mixed terminal-blocking plus dialogue beat for Maer. Failure lesson: personhood-pressure wording was too strong and let the model imply the artifact was a person instead of preserving unresolved suspicion."}
{"ts": "2026-05-01T21:22:33+00:00", "type": "experiment", "status": "accepted", "note": "Cold Wake Maer/Veyr projection now has useful rejected v1/v2 captures and accepted v3 Qwen output. Lesson: unresolved personhood pressure needs explicit noun fencing; claimant-status, provenance, and chain-of-custody language preserved ambiguity while still allowing controlled terminal-blocking action."}
{"ts": "2026-05-01T21:32:34+00:00", "type": "experiment", "status": "accepted", "note": "Completed first Cold Wake short story from Ghostlight projection receipts. Architectural lesson: repeated Qwen failures were not just prompt wording issues; projection needs first-class controls for frame ownership, authority boundaries, object custody, required semantics, and forbidden resolutions. Added capture validation so accepted/rejected outputs remain accountable training data."}

View file

@ -96,7 +96,10 @@ accepted_design:
- Lore grounding digests use `ghostlight.lore_grounding_digest.v0` records to distill authored lore into cultural pressure fields, factional misread maps, role pressures, speaker knowledge boundaries, and author-only exclusions.
- The Cold Wake Panic is the first chosen historical grounding fixture: a draft Ganymede corridor digest now models thermal stealth panic, insurer category failure, Navigator rescue obligation, Lightsail reliability pressure, Aya-coded care pressure, pirate porosity, Cognitum firmware denial, and Cryonix/Rossum certification culture.
- The Cold Wake story lab uses Maer Tidecall as protagonist across a four-scene arc: tribunal freeze, sanctuary intake, Callisto provenance, and convoy threshold. The first Qwen run produced a useful mixed action/dialogue beat and exposed a prompt weakness around unresolved personhood suspicion.
- Projection controls are now first-class in projection examples: frame_controls, authority_boundaries, object_custody, required_semantics, and forbidden_resolutions capture failure lessons before prompt prose is rendered.
- Qwen response captures are validated training receipts, not loose logs; accepted, rejected, and useful-needs-revision outputs should keep review status, response kind, strengths, failures, and pipeline lessons.
- The first complete Cold Wake short story, The Narrowest Possible Margin, is assembled from Ghostlight projection receipts plus in-session connective narration.
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 draft Cold Wake historical grounding digest, a Cold Wake story-lab fixture, and accepted plus rejected Qwen captures for the first action-capable Cold Wake projection.
next_action: Project the next Cold Wake story-lab response turn, preferably scene 2 Sella to Maer or scene 4 Maer to Isdra, and keep testing whether character action emerges from state pressure without over-resolving hidden facts.
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 draft Cold Wake historical grounding digest, a Cold Wake story-lab fixture, projection controls, validated Qwen capture receipts, and a complete Cold Wake short story assembled from accepted projection outputs.
next_action: Build the deterministic projection input slicer/renderer prototype that emits projection_controls and prompt_text from agent state, then rerun a story-lab beat through it instead of hand-authoring the full projection artifact.

View file

@ -0,0 +1,103 @@
import argparse
import json
import urllib.request
from pathlib import Path
DEFAULT_ENDPOINT = "http://192.168.1.84:11434/api/generate"
def load_projection(path: Path, example_id: str) -> dict:
for line in path.read_text(encoding="utf-8").splitlines():
if not line.strip():
continue
record = json.loads(line)
if record.get("example_id") == example_id:
return record
raise SystemExit(f"projection example not found: {example_id}")
def post_json(endpoint: str, payload: dict) -> dict:
data = json.dumps(payload, ensure_ascii=False).encode("utf-8")
request = urllib.request.Request(
endpoint,
data=data,
headers={"Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(request, timeout=180) as response:
return json.loads(response.read().decode("utf-8"))
def main() -> None:
parser = argparse.ArgumentParser(
description="Send a projection prompt_text to the LAN Qwen box and save response artifacts."
)
parser.add_argument("example_id")
parser.add_argument(
"--projection-file",
default="examples/projections/cold-wake-story-lab.jsonl",
)
parser.add_argument("--out-dir", default="experiments/cold-wake-story-lab")
parser.add_argument("--endpoint", default=DEFAULT_ENDPOINT)
parser.add_argument("--model", default="qwen3.5:9b")
parser.add_argument("--temperature", type=float, default=0.75)
parser.add_argument("--top-p", type=float, default=0.9)
parser.add_argument("--num-ctx", type=int, default=8192)
parser.add_argument("--suffix", default=None)
args = parser.parse_args()
projection = load_projection(Path(args.projection_file), args.example_id)
prompt = projection["output"]["prompt_text"]
payload = {
"model": args.model,
"prompt": prompt,
"stream": False,
"think": False,
"keep_alive": "10m",
"options": {
"num_ctx": args.num_ctx,
"temperature": args.temperature,
"top_p": args.top_p,
},
}
raw = post_json(args.endpoint, payload)
response_text = raw.get("response", "").strip()
suffix = args.suffix or args.example_id.replace("cold-wake.story-lab.", "")
safe_suffix = suffix.replace(".", "-")
out_dir = Path(args.out_dir)
out_dir.mkdir(parents=True, exist_ok=True)
capture = {
"schema_version": "ghostlight.qwen_response_capture.v0",
"capture_id": f"{args.example_id}.qwen3-5-9b",
"projection_example_id": args.example_id,
"model": raw.get("model", args.model),
"endpoint": args.endpoint,
"request_options": {
"think": False,
"num_ctx": args.num_ctx,
"temperature": args.temperature,
"top_p": args.top_p,
},
"response_text": response_text,
"review": {
"status": "unreviewed",
"response_kind_observed": "unknown",
"strengths": [],
"failure_notes": [],
"pipeline_lessons": [],
},
}
capture_path = out_dir / f"{safe_suffix}.qwen3-5-9b.capture.json"
response_path = out_dir / f"{safe_suffix}.qwen3-5-9b.response.md"
capture_path.write_text(json.dumps(capture, indent=2), encoding="utf-8")
response_path.write_text(response_text + "\n", encoding="utf-8")
print(f"wrote {capture_path}")
print(response_text)
if __name__ == "__main__":
main()

View file

@ -128,6 +128,8 @@ def validate_projection_record(record: dict[str, Any], source: Path, index: int)
)
validate_sourced_items(output["known_facts"], f"{path}.output.known_facts")
validate_sourced_items(output["voice_surface"], f"{path}.output.voice_surface")
if "projection_controls" in output:
validate_projection_controls(output["projection_controls"], f"{path}.output.projection_controls")
require(isinstance(output["prompt_text"], str) and output["prompt_text"].strip(), f"{path}.output.prompt_text must be non-empty")
for pressure_index, pressure in enumerate(output["active_pressures"]):
@ -170,6 +172,22 @@ def validate_projection_record(record: dict[str, Any], source: Path, index: int)
require(isinstance(value, bool), f"{path}.audit.checks.{key} must be boolean")
def validate_projection_controls(controls: Any, path: str) -> None:
require(isinstance(controls, dict), f"{path} must be an object")
allowed = {
"frame_controls",
"authority_boundaries",
"object_custody",
"required_semantics",
"forbidden_resolutions",
}
unknown = sorted(set(controls) - allowed)
require(not unknown, f"{path} has unknown keys: {', '.join(unknown)}")
require(controls, f"{path} must not be empty when present")
for key, value in controls.items():
validate_sourced_items(value, f"{path}.{key}")
def validate_file(path: Path) -> None:
records = load_jsonl(path)
seen_ids: set[str] = set()

View file

@ -0,0 +1,85 @@
"""Validate saved Qwen response captures.
Capture artifacts are not canonical state, but they are training receipts. This
validator keeps them from quietly becoming a drawer full of unreviewed vibes.
"""
from __future__ import annotations
import argparse
import json
from pathlib import Path
from typing import Any
ROOT = Path(__file__).resolve().parents[1]
DEFAULT_CAPTURES = sorted((ROOT / "experiments" / "cold-wake-story-lab").glob("*.capture.json"))
VALID_REVIEW_STATUSES = {"accepted", "rejected", "useful_needs_revision", "needs_revision"}
VALID_RESPONSE_KINDS = {"speech", "action", "silence", "withdrawal", "violence", "mixed", "unknown"}
class ValidationError(Exception):
pass
def require(condition: bool, message: str) -> None:
if not condition:
raise ValidationError(message)
def require_keys(obj: dict[str, Any], keys: list[str], path: str) -> None:
missing = [key for key in keys if key not in obj]
require(not missing, f"{path} missing required keys: {', '.join(missing)}")
def validate_string_list(value: Any, path: str) -> None:
require(isinstance(value, list), f"{path} must be an array")
for index, item in enumerate(value):
require(isinstance(item, str), f"{path}[{index}] must be a string")
def validate_capture(path: Path) -> None:
data = json.loads(path.read_text(encoding="utf-8"))
require(isinstance(data, dict), f"{path} must be an object")
require_keys(
data,
[
"schema_version",
"capture_id",
"projection_example_id",
"model",
"endpoint",
"request_options",
"response_text",
"review",
],
str(path),
)
require(data["schema_version"] == "ghostlight.qwen_response_capture.v0", f"{path}.schema_version is wrong")
require(isinstance(data["response_text"], str) and data["response_text"].strip(), f"{path}.response_text must be non-empty")
review = data["review"]
require(isinstance(review, dict), f"{path}.review must be an object")
require_keys(review, ["status", "response_kind_observed", "strengths", "failure_notes", "pipeline_lessons"], f"{path}.review")
require(review["status"] in VALID_REVIEW_STATUSES, f"{path}.review.status is invalid or unreviewed")
require(review["response_kind_observed"] in VALID_RESPONSE_KINDS, f"{path}.review.response_kind_observed is invalid")
validate_string_list(review["strengths"], f"{path}.review.strengths")
validate_string_list(review["failure_notes"], f"{path}.review.failure_notes")
validate_string_list(review["pipeline_lessons"], f"{path}.review.pipeline_lessons")
def main() -> int:
parser = argparse.ArgumentParser(description="Validate Ghostlight Qwen response capture files.")
parser.add_argument("paths", nargs="*", type=Path, help="Capture JSON files to validate.")
args = parser.parse_args()
paths = args.paths or DEFAULT_CAPTURES
require(paths, "no capture files found")
for path in paths:
validate_capture(path)
print(f"ok: {path}")
return 0
if __name__ == "__main__":
raise SystemExit(main())