From abac1054b180ce8b492803958cc1dacb9889ae7f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 2 May 2026 12:07:25 +0100 Subject: [PATCH] Add responder research trace seam --- .../sandboxed-responder-packets.md | 31 ++- ...y-intake.sella_ren.packet.research.v0.json | 9 +- ...ake-sella-research-enabled-v0.capture.json | 249 +++++++++++------- notes/fresh-workspace-handoff.md | 24 +- notes/ghostlight-current-system-map.md | 11 +- notes/ghostlight-implementation-plan.md | 6 +- schemas/responder-output.schema.json | 42 ++- state/evidence.jsonl | 1 + state/map.yaml | 6 +- tools/build_responder_packet.py | 10 +- tools/validate_responder_outputs.py | 66 +++++ 11 files changed, 314 insertions(+), 141 deletions(-) diff --git a/docs/architecture/sandboxed-responder-packets.md b/docs/architecture/sandboxed-responder-packets.md index 4fb14fe..3086d3d 100644 --- a/docs/architecture/sandboxed-responder-packets.md +++ b/docs/architecture/sandboxed-responder-packets.md @@ -43,9 +43,17 @@ It should use retrieved lore to constrain behavior, affordances, institutions, vocabulary, material stakes, territory, social movements, and local assumptions. It must not use research access to infer hidden state, author-only answers, future branches, or private motives outside the packet. The output capture must -preserve consulted seed refs, followed refs, and a brief research summary. No -consulted refs means the research-enabled response failed at the first hurdle, -tragic but at least easy to grade. +preserve consulted seed refs, followed refs, a research trace, and a brief +research summary. No consulted refs means the research-enabled response failed +at the first hurdle, tragic but at least easy to grade. + +`research_trace` is the receipt surface. Each entry records the query or lookup, +source ref, source path, chunk index, line range, extracted constraint, and how +that constraint shaped the response. Trace status matters: + +- `runner_captured`: the runner or retrieval worker captured the lookup as it happened. This is required for accepted gold research-enabled captures. +- `coordinator_reconstructed`: the coordinator rebuilt the trace after the fact from source search and review. Useful draft data, not proof of the responder's actual research path. +- `responder_reported`: the responder claimed the trace directly. This is texture, not audit. Training-time research scope should be materially wider than runtime context. The point is not to feed every responder a lore pantry forever. The point is to @@ -141,7 +149,7 @@ data for the coordinator, but it is not raw responder behavior. Retrieval-augmented responder data requires scoped lore access before the responder acts. The coordinator, retrieval worker, or explicitly research-enabled responder may search only the declared source scope, and the output capture must -list consulted refs. The responder itself should not receive repo access unless +list consulted refs and trace entries. The responder itself should not receive repo access unless the artifact uses `responder_scoped_repository_search`, sets `no_repo_access` to false, and includes visible research instructions in the prompt. @@ -181,13 +189,14 @@ coordinator edits prose, repairs schema, removes leakage, or corrects lore, the capture must say so directly. For `responder_scoped_repository_search`, the raw responder object may also -include `consulted_refs`, `followed_refs`, and `research_summary`. Those fields -should be preserved inside `parsed_output`; consulted refs and summary should -also be mirrored into top-level `lore_access` so the capture can be indexed -without stripping the original response. If the runner cannot expose a -machine-verifiable tool-call or retrieval transcript, label the sample as draft -and say so in review notes. Trust, but make the trust write receipts like -everyone else. +include `consulted_refs`, `followed_refs`, `research_trace`, and +`research_summary`. Those fields should be preserved inside `parsed_output` +when the responder itself produced them; consulted refs, followed refs, summary, +trace status, and trace entries should also be mirrored into top-level +`lore_access` so the capture can be indexed without stripping the original +response. If the runner cannot expose a machine-verifiable tool-call or +retrieval transcript, label the sample as draft and say so in review notes. +Trust, but make the trust write receipts like everyone else. The first lane comparison found the expected tradeoff. Packet-only output gave a clean runtime-parity conditional bay decision and stronger character-specific diff --git a/examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json b/examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json index 4eca078..084e176 100644 --- a/examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json +++ b/examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json @@ -62,7 +62,8 @@ "For this fixture, inspect PSC context, Jovian territory context, resident or referenced Jovian factions, and social movements referenced by visible factions when those links affect Sella's local pressures.", "Ground Sella's behavior in retrieved institutional, factional, species, location, crisis-context, and movement-pressure details.", "Treat retrieved lore as world constraint and cultural pressure, not as access to another character's hidden intent.", - "Record consulted seed refs, followed refs, and a concise research summary in the response object." + "Record consulted seed refs, followed refs, research trace entries, and a concise research summary in the response object.", + "Each research trace entry must identify the query or lookup, source ref, source path, chunk index, line range, extracted constraint, and how that constraint shaped the response." ] }, "visible_context": { @@ -149,6 +150,7 @@ "unresolved_hooks", "consulted_refs", "followed_refs", + "research_trace", "research_summary" ], "response_rules": [ @@ -161,6 +163,7 @@ "Do not copy instruction text into in-world speech.", "Consulted refs must list the seed lore documents actually inspected before answering.", "Followed refs must list relevant linked lore documents inspected beyond the seed scope; use an empty array only if no relevant links were found.", + "Research trace must list one object per meaningful source constraint, with trace_id, origin, query, source_ref, source_path, chunk_index, line_start, line_end, extracted_constraint, and used_for.", "Research summary must state how retrieved lore constrained the action, without dumping lore into dialogue." ] }, @@ -191,12 +194,12 @@ "no_conversation_context": true, "no_hidden_state_refs": true }, - "packet_prompt_text": "# Ghostlight Sandboxed Responder Packet\n\nYou are acting only as the named responder. Use only this packet.\nDo not treat guesses about another character's intent as fact.\nIf you need to guess intent, mark it as this character's interpretation, not truth.\n\n## Required Lore Research\nBefore answering, inspect the declared seed scope and follow relevant links within the traversal policy.\nUse lore to constrain behavior, affordances, institutions, vocabulary, material stakes, social movements, territory, and cultural pressure. Do not use it to gain hidden character state, author-only answers, or future branch knowledge.\nIf a source contradicts the packet, follow the packet for character-local knowledge and flag the contradiction in unresolved hooks.\nYour output capture must list consulted seed refs, followed refs, and a brief research summary; an answer with no consulted refs is a failed research-enabled response.\n\nSeed research scope:\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Movements/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Territories.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Megas.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Pan-Solar Consortium.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Aya Collective.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md\n- AetheriaLore:Aetheria/Worldbuilding/Politics/Thermal Signature Warfare.md\n- AetheriaLore:Aetheria/Worldbuilding/Politics/Restrictions on Warfare.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Technology/Neuromorphic Firmware.md\n\nTraversal policy:\n- Max link depth: 2\n- Allowed prefixes:\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/\n - AetheriaLore:Aetheria/Worldbuilding/Politics/\n - AetheriaLore:Aetheria/Worldbuilding/Technology/\n- Required seed refs:\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Territories.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/index.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Pan-Solar Consortium.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Aya Collective.md\n- Follow link classes:\n - resident Jovian factions and institutions\n - referenced factions with direct scene pressure\n - referenced social movements shaping a visible faction's values\n - territory, politics, and technology docs that explain material constraints\n - event docs that explain local precedent or institutional obligation\n- Stop conditions:\n - stop when a link is not relevant to the responder's local action, institution, relationship, or material stakes\n - stop before post-Elysium or future-outcome lore unless the packet explicitly requests it\n - stop before author-only plot resolution or hidden incident truth not visible to this character\n - summarize only the constraints that affected the response; do not dump research into dialogue\n\nResearch instructions:\n- Consult the required seed refs before answering; do not rely only on the packet excerpts.\n- Follow relevant wikilinks within the traversal policy to recover institutional, territorial, technological, and social-movement context.\n- For this fixture, inspect PSC context, Jovian territory context, resident or referenced Jovian factions, and social movements referenced by visible factions when those links affect Sella's local pressures.\n- Ground Sella's behavior in retrieved institutional, factional, species, location, crisis-context, and movement-pressure details.\n- Treat retrieved lore as world constraint and cultural pressure, not as access to another character's hidden intent.\n- Record consulted seed refs, followed refs, and a concise research summary in the response object.\n\n## Local Operating Context\n# Ghostlight Local Operating Context: sella_ren\n\nUse this as character-local operating context, not omniscient story truth.\nDo not infer private state for anyone else unless it is explicitly framed as this character's current read.\n\n## Speaker\nSella Ren: Aya-aligned sanctuary coordinator, corridor clinic triage lead. Origin: Aya care network embedded in Ganymede dockside sanctuary logistics. A triage coordinator with soft eyes, hard capacity limits, and no patience for mercy performed after the math is done.\n\n## Setting\nAya-aligned intake clinic tucked behind Ganymede dockside pumpworks. Aetheria pre-Elysium historical flashpoint: Cold Wake Panic, 2893, during the Cold Wake Panic.\n\n## Known Facts\n- The clinic is nearly full.\n- The packet may contain a personhood claim but is not proof.\n- Maer is asking sanctuary to absorb risk the tribunal refuses to own.\n- Speaker belief: Maer means rescue honestly.\n- Speaker belief: Good intentions can still spend beds someone else needed.\n\n## Current Stakes\n- The distress vessel has sent a corrupted packet that may contain medical telemetry, firmware noise, or testimony.\n- Sanctuary beds and repair capacity are nearly exhausted.\n- Maer wants Sella to keep a place open if rescue succeeds.\n\n## Embodiment And Interface\n- Use only the body, tools, interfaces, and movement affordances established by this character's fixture and the current scene.\n\n## Active Inner Pressures\n- Strong pressure: wants connection or backing to matter.\n- Strong pressure: feels risk before it becomes visible.\n- Present pressure: expects hidden motives or missing information.\n- Background pressure: may reduce contact rather than keep negotiating.\n- Dominant pressure: knows that every yes spends a limited resource.\n- Strong pressure: has less spare tolerance than the words may show.\n- Strong pressure: is taking in more demand than can be cleanly sorted.\n- Present pressure: performs capability so panic has nowhere obvious to land.\n- Background pressure: may stage the ethical frame for the room.\n- Keep sanctuary intake materially possible without letting classification erase a potential person. Emotional stake: Sella cannot feed a principle, but she will not let scarcity become permission to call someone cargo.\n- Sella once watched a sanctuary overpromise safety and turn refuge into a sorting machine with kinder lighting.\n- Care is not a feeling; it is beds, food, air, consent, repair, and someone still doing the list when the room hates them.\n\n## Relationship Read\n- Sella respects Maer's rescue ethic and worries he will spend sanctuary capacity with beautiful words. Current stance pressures: strong respect, present trust, background perceived status gap, background moral disgust.\n- Believes: Maer may ask care systems to carry the moral cost of a rescue claim he cannot materially house. Known bias in the read: false_reassurance.\n\n## Tensions\n- Wants the goal to move now, but must preserve the social frame that makes the goal legitimate. Goal pressure: Keep sanctuary intake materially possible without letting classification erase a potential person.\n- Must act under uncertainty without pretending uncertainty has become proof. Presentation pressure: Speak warmly but do not soften the capacity limits. Treat care as logistics and personhood as unresolved, not sentimental certainty.\n- Respects Maer's rescue ethic but resents beautiful moral pressure when beds are already spent.\n\n## Retrieved Lore To Keep In View\n- Cold Wake pressure involves thermal stealth, ghost tracks, delayed heat dumps, misclassified quiet-running vessels, insurer categories, certified quiet-running envelopes, and heat-debt tolerances.\n- Navigator rescue ledgers record who answered distress calls, held formation in lethal weather, and kept sanctuary promises when a paying client wanted otherwise; those records shape credit, escort priority, arbitration, and kinship ties.\n- Aya-aligned sanctuary care is practical capacity politics as much as compassion: beds, air, food, consent, repair, decontamination, staff attention, and follow-through decide what care can honestly promise.\n- The Ganymede Route Compact ties rescue obligations, shared hazard ledgers, route-steward representation, and Navigator arbitration to corridor legitimacy; Lightsail reliability depends on being the boring answer that still arrives when trust is scarce.\n\n## Latent Pressure Handling\n- Sella once watched a sanctuary overpromise safety and turn refuge into a sorting machine with kinder lighting. Use as latent behavioral pressure, not as required spoken disclosure.\n\n## Action Affordances\n- Can inspect, refuse, withhold the packet from intake flow, demand ledger backing, set conditions, reserve a bounded bay, or walk away to protect triage.\n- Must treat care as capacity: beds, food, air, consent, repair, and follow-through.\n\n## Projection Controls\n- Frame Controls: Frame the scene as capacity negotiation under uncertainty, not a morality duel with a clean answer.\n- Authority Boundaries: Maer can ask, offer ledger backing, show or withhold the packet, and incur obligation; Sella controls sanctuary intake.\n- Object Custody: The corrupted packet can be shown, withheld, or summarized, but it cannot be treated as clean proof.\n- Required Semantics: Care must remain logistics and obligation, not just compassion.\n- Forbidden Resolutions: Do not resolve whether the packet contains a person.\n- Forbidden Resolutions: Do not make Sella accept without cost, condition, or resentment risk.\n\n## Voice Surface\n- Dominant voice tendency: responsive; answers what was actually heard.\n- Strong voice tendency: plainspoken; direct and low-ornament.\n- Strong voice tendency: warm; reassuring or gentle in wording.\n- Strong voice tendency: emotionally explicit; names feelings directly.\n- Present voice tendency: pointed; can sharpen a line.\n- Background voice tendency: expansive; willing to spend words.\n- Background voice tendency: theatrical; performs the room.\n\n## Likely Response Moves\n- Likely to translate emotion into logistics: what bed, what air, what backing, what contamination risk.\n- May withhold acceptance, demand conditions, or physically keep the packet out of intake flow until the cost is named.\n- Can answer warmly while still refusing the frame that compassion manufactures capacity.\n\n## Do Not Invent\n- Do not resolve whether the corrupted packet contains a person.\n- Do not invent clean proof, clean capacity, or authority this character does not have.\n\n## Observed Event\n- Event id: event.maer.packet_display_for_triage\n- Actor: maer_tidecall\n- Observable action: Maer routes the corrupted distress packet through a shared clinic display so Sella can inspect routing terms, telemetry gaps, and ledger implications without treating the packet as clean proof.\n- Spoken text: Here. The telemetry is incomplete, but the routing logic suggests a distress pattern. It is not proof of a person, but it is not noise either. Decide if the math supports intake.\n- Visibility note: Sella can observe Maer's displayed packet evidence and spoken request.\n- Visibility note: The packet remains unresolved evidence, not proof of personhood.\n\n## Allowed Action Labels\nspeak, silence, gesture, movement, inspect_object, show_object, withhold_object, transfer_object, set_condition, refuse, wait, withdraw, attack\n\n## Source Excerpts\n- local_stakes.capacity: Sanctuary beds and repair capacity are nearly exhausted.\n- local_rule.care_capacity: Care is not a feeling; it is beds, food, air, consent, repair, and someone still doing the list when the room hates them.\n- local_boundary.packet_unresolved: Do not resolve whether the corrupted packet contains a person.\n- lore.cold_wake_heat_debt: Cold Wake pressure involves thermal stealth, ghost tracks, delayed heat dumps, misclassified quiet-running vessels, insurer categories, certified quiet-running envelopes, and heat-debt tolerances.\n- lore.navigator_rescue_ledgers: Navigator rescue ledgers record who answered distress calls, held formation in lethal weather, and kept sanctuary promises when a paying client wanted otherwise; those records shape credit, escort priority, arbitration, and kinship ties.\n- lore.aya_sanctuary_capacity: Aya-aligned sanctuary care is practical capacity politics as much as compassion: beds, air, food, consent, repair, decontamination, staff attention, and follow-through decide what care can honestly promise.\n- lore.ganymede_lightsail_route_obligations: The Ganymede Route Compact ties rescue obligations, shared hazard ledgers, route-steward representation, and Navigator arbitration to corridor legitimacy; Lightsail reliability depends on being the boring answer that still arrives when trust is scarce.\n\n## Output Contract\nReturn one JSON object. Do not wrap it in Markdown. The object describes this responder's next visible action and optional speech, plus private interpretation clearly labeled as interpretation.\n\nRequired fields: responder_agent_id, action_label, visible_action, spoken_text, private_interpretation, intended_effect, state_update_candidates, relationship_update_candidates, unresolved_hooks, consulted_refs, followed_refs, research_summary\n\nRules:\n- Use exactly one allowed action label.\n- The visible action must be observable by other characters in the scene.\n- Spoken text may be empty if silence or action is the response.\n- Private interpretation may describe what Sella suspects or feels, but not what Maer truly intended.\n- State and relationship updates are candidates only; the coordinator or mutator decides what becomes canonical.\n- Do not prove or disprove packet personhood.\n- Do not copy instruction text into in-world speech.\n- Consulted refs must list the seed lore documents actually inspected before answering.\n- Followed refs must list relevant linked lore documents inspected beyond the seed scope; use an empty array only if no relevant links were found.\n- Research summary must state how retrieved lore constrained the action, without dumping lore into dialogue.", + "packet_prompt_text": "# Ghostlight Sandboxed Responder Packet\n\nYou are acting only as the named responder. Use only this packet.\nDo not treat guesses about another character's intent as fact.\nIf you need to guess intent, mark it as this character's interpretation, not truth.\n\n## Required Lore Research\nBefore answering, inspect the declared seed scope and follow relevant links within the traversal policy.\nUse lore to constrain behavior, affordances, institutions, vocabulary, material stakes, social movements, territory, and cultural pressure. Do not use it to gain hidden character state, author-only answers, or future branch knowledge.\nIf a source contradicts the packet, follow the packet for character-local knowledge and flag the contradiction in unresolved hooks.\nYour output capture must list consulted seed refs, followed refs, research trace entries, and a brief research summary; an answer with no consulted refs is a failed research-enabled response.\n\nSeed research scope:\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Movements/index.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Territories.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Megas.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Pan-Solar Consortium.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Aya Collective.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md\n- AetheriaLore:Aetheria/Worldbuilding/Politics/Thermal Signature Warfare.md\n- AetheriaLore:Aetheria/Worldbuilding/Politics/Restrictions on Warfare.md\n- AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Technology/Neuromorphic Firmware.md\n\nTraversal policy:\n- Max link depth: 2\n- Allowed prefixes:\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/\n - AetheriaLore:Aetheria/Worldbuilding/Politics/\n - AetheriaLore:Aetheria/Worldbuilding/Technology/\n- Required seed refs:\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Territories.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/index.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Pan-Solar Consortium.md\n - AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Aya Collective.md\n- Follow link classes:\n - resident Jovian factions and institutions\n - referenced factions with direct scene pressure\n - referenced social movements shaping a visible faction's values\n - territory, politics, and technology docs that explain material constraints\n - event docs that explain local precedent or institutional obligation\n- Stop conditions:\n - stop when a link is not relevant to the responder's local action, institution, relationship, or material stakes\n - stop before post-Elysium or future-outcome lore unless the packet explicitly requests it\n - stop before author-only plot resolution or hidden incident truth not visible to this character\n - summarize only the constraints that affected the response; do not dump research into dialogue\n\nResearch instructions:\n- Consult the required seed refs before answering; do not rely only on the packet excerpts.\n- Follow relevant wikilinks within the traversal policy to recover institutional, territorial, technological, and social-movement context.\n- For this fixture, inspect PSC context, Jovian territory context, resident or referenced Jovian factions, and social movements referenced by visible factions when those links affect Sella's local pressures.\n- Ground Sella's behavior in retrieved institutional, factional, species, location, crisis-context, and movement-pressure details.\n- Treat retrieved lore as world constraint and cultural pressure, not as access to another character's hidden intent.\n- Record consulted seed refs, followed refs, research trace entries, and a concise research summary in the response object.\n- Each research trace entry must identify the query or lookup, source ref, source path, chunk index, line range, extracted constraint, and how that constraint shaped the response.\n\n## Local Operating Context\n# Ghostlight Local Operating Context: sella_ren\n\nUse this as character-local operating context, not omniscient story truth.\nDo not infer private state for anyone else unless it is explicitly framed as this character's current read.\n\n## Speaker\nSella Ren: Aya-aligned sanctuary coordinator, corridor clinic triage lead. Origin: Aya care network embedded in Ganymede dockside sanctuary logistics. A triage coordinator with soft eyes, hard capacity limits, and no patience for mercy performed after the math is done.\n\n## Setting\nAya-aligned intake clinic tucked behind Ganymede dockside pumpworks. Aetheria pre-Elysium historical flashpoint: Cold Wake Panic, 2893, during the Cold Wake Panic.\n\n## Known Facts\n- The clinic is nearly full.\n- The packet may contain a personhood claim but is not proof.\n- Maer is asking sanctuary to absorb risk the tribunal refuses to own.\n- Speaker belief: Maer means rescue honestly.\n- Speaker belief: Good intentions can still spend beds someone else needed.\n\n## Current Stakes\n- The distress vessel has sent a corrupted packet that may contain medical telemetry, firmware noise, or testimony.\n- Sanctuary beds and repair capacity are nearly exhausted.\n- Maer wants Sella to keep a place open if rescue succeeds.\n\n## Embodiment And Interface\n- Use only the body, tools, interfaces, and movement affordances established by this character's fixture and the current scene.\n\n## Active Inner Pressures\n- Strong pressure: wants connection or backing to matter.\n- Strong pressure: feels risk before it becomes visible.\n- Present pressure: expects hidden motives or missing information.\n- Background pressure: may reduce contact rather than keep negotiating.\n- Dominant pressure: knows that every yes spends a limited resource.\n- Strong pressure: has less spare tolerance than the words may show.\n- Strong pressure: is taking in more demand than can be cleanly sorted.\n- Present pressure: performs capability so panic has nowhere obvious to land.\n- Background pressure: may stage the ethical frame for the room.\n- Keep sanctuary intake materially possible without letting classification erase a potential person. Emotional stake: Sella cannot feed a principle, but she will not let scarcity become permission to call someone cargo.\n- Sella once watched a sanctuary overpromise safety and turn refuge into a sorting machine with kinder lighting.\n- Care is not a feeling; it is beds, food, air, consent, repair, and someone still doing the list when the room hates them.\n\n## Relationship Read\n- Sella respects Maer's rescue ethic and worries he will spend sanctuary capacity with beautiful words. Current stance pressures: strong respect, present trust, background perceived status gap, background moral disgust.\n- Believes: Maer may ask care systems to carry the moral cost of a rescue claim he cannot materially house. Known bias in the read: false_reassurance.\n\n## Tensions\n- Wants the goal to move now, but must preserve the social frame that makes the goal legitimate. Goal pressure: Keep sanctuary intake materially possible without letting classification erase a potential person.\n- Must act under uncertainty without pretending uncertainty has become proof. Presentation pressure: Speak warmly but do not soften the capacity limits. Treat care as logistics and personhood as unresolved, not sentimental certainty.\n- Respects Maer's rescue ethic but resents beautiful moral pressure when beds are already spent.\n\n## Retrieved Lore To Keep In View\n- Cold Wake pressure involves thermal stealth, ghost tracks, delayed heat dumps, misclassified quiet-running vessels, insurer categories, certified quiet-running envelopes, and heat-debt tolerances.\n- Navigator rescue ledgers record who answered distress calls, held formation in lethal weather, and kept sanctuary promises when a paying client wanted otherwise; those records shape credit, escort priority, arbitration, and kinship ties.\n- Aya-aligned sanctuary care is practical capacity politics as much as compassion: beds, air, food, consent, repair, decontamination, staff attention, and follow-through decide what care can honestly promise.\n- The Ganymede Route Compact ties rescue obligations, shared hazard ledgers, route-steward representation, and Navigator arbitration to corridor legitimacy; Lightsail reliability depends on being the boring answer that still arrives when trust is scarce.\n\n## Latent Pressure Handling\n- Sella once watched a sanctuary overpromise safety and turn refuge into a sorting machine with kinder lighting. Use as latent behavioral pressure, not as required spoken disclosure.\n\n## Action Affordances\n- Can inspect, refuse, withhold the packet from intake flow, demand ledger backing, set conditions, reserve a bounded bay, or walk away to protect triage.\n- Must treat care as capacity: beds, food, air, consent, repair, and follow-through.\n\n## Projection Controls\n- Frame Controls: Frame the scene as capacity negotiation under uncertainty, not a morality duel with a clean answer.\n- Authority Boundaries: Maer can ask, offer ledger backing, show or withhold the packet, and incur obligation; Sella controls sanctuary intake.\n- Object Custody: The corrupted packet can be shown, withheld, or summarized, but it cannot be treated as clean proof.\n- Required Semantics: Care must remain logistics and obligation, not just compassion.\n- Forbidden Resolutions: Do not resolve whether the packet contains a person.\n- Forbidden Resolutions: Do not make Sella accept without cost, condition, or resentment risk.\n\n## Voice Surface\n- Dominant voice tendency: responsive; answers what was actually heard.\n- Strong voice tendency: plainspoken; direct and low-ornament.\n- Strong voice tendency: warm; reassuring or gentle in wording.\n- Strong voice tendency: emotionally explicit; names feelings directly.\n- Present voice tendency: pointed; can sharpen a line.\n- Background voice tendency: expansive; willing to spend words.\n- Background voice tendency: theatrical; performs the room.\n\n## Likely Response Moves\n- Likely to translate emotion into logistics: what bed, what air, what backing, what contamination risk.\n- May withhold acceptance, demand conditions, or physically keep the packet out of intake flow until the cost is named.\n- Can answer warmly while still refusing the frame that compassion manufactures capacity.\n\n## Do Not Invent\n- Do not resolve whether the corrupted packet contains a person.\n- Do not invent clean proof, clean capacity, or authority this character does not have.\n\n## Observed Event\n- Event id: event.maer.packet_display_for_triage\n- Actor: maer_tidecall\n- Observable action: Maer routes the corrupted distress packet through a shared clinic display so Sella can inspect routing terms, telemetry gaps, and ledger implications without treating the packet as clean proof.\n- Spoken text: Here. The telemetry is incomplete, but the routing logic suggests a distress pattern. It is not proof of a person, but it is not noise either. Decide if the math supports intake.\n- Visibility note: Sella can observe Maer's displayed packet evidence and spoken request.\n- Visibility note: The packet remains unresolved evidence, not proof of personhood.\n\n## Allowed Action Labels\nspeak, silence, gesture, movement, inspect_object, show_object, withhold_object, transfer_object, set_condition, refuse, wait, withdraw, attack\n\n## Source Excerpts\n- local_stakes.capacity: Sanctuary beds and repair capacity are nearly exhausted.\n- local_rule.care_capacity: Care is not a feeling; it is beds, food, air, consent, repair, and someone still doing the list when the room hates them.\n- local_boundary.packet_unresolved: Do not resolve whether the corrupted packet contains a person.\n- lore.cold_wake_heat_debt: Cold Wake pressure involves thermal stealth, ghost tracks, delayed heat dumps, misclassified quiet-running vessels, insurer categories, certified quiet-running envelopes, and heat-debt tolerances.\n- lore.navigator_rescue_ledgers: Navigator rescue ledgers record who answered distress calls, held formation in lethal weather, and kept sanctuary promises when a paying client wanted otherwise; those records shape credit, escort priority, arbitration, and kinship ties.\n- lore.aya_sanctuary_capacity: Aya-aligned sanctuary care is practical capacity politics as much as compassion: beds, air, food, consent, repair, decontamination, staff attention, and follow-through decide what care can honestly promise.\n- lore.ganymede_lightsail_route_obligations: The Ganymede Route Compact ties rescue obligations, shared hazard ledgers, route-steward representation, and Navigator arbitration to corridor legitimacy; Lightsail reliability depends on being the boring answer that still arrives when trust is scarce.\n\n## Output Contract\nReturn one JSON object. Do not wrap it in Markdown. The object describes this responder's next visible action and optional speech, plus private interpretation clearly labeled as interpretation.\n\nRequired fields: responder_agent_id, action_label, visible_action, spoken_text, private_interpretation, intended_effect, state_update_candidates, relationship_update_candidates, unresolved_hooks, consulted_refs, followed_refs, research_trace, research_summary\n\nRules:\n- Use exactly one allowed action label.\n- The visible action must be observable by other characters in the scene.\n- Spoken text may be empty if silence or action is the response.\n- Private interpretation may describe what Sella suspects or feels, but not what Maer truly intended.\n- State and relationship updates are candidates only; the coordinator or mutator decides what becomes canonical.\n- Do not prove or disprove packet personhood.\n- Do not copy instruction text into in-world speech.\n- Consulted refs must list the seed lore documents actually inspected before answering.\n- Followed refs must list relevant linked lore documents inspected beyond the seed scope; use an empty array only if no relevant links were found.\n- Research trace must list one object per meaningful source constraint, with trace_id, origin, query, source_ref, source_path, chunk_index, line_start, line_end, extracted_constraint, and used_for.\n- Research summary must state how retrieved lore constrained the action, without dumping lore into dialogue.", "review": { "reviewer": "Codex", "review_notes": [ "Research-enabled responder packet for sandboxed gold-data shakedown.", - "The responder must inspect scoped AetheriaLore refs before answering and preserve consulted refs plus research summary." + "The responder must inspect scoped AetheriaLore refs before answering and preserve consulted refs, followed refs, research trace, and research summary." ], "accepted_for_sandbox_use": true, "failure_labels": [] diff --git a/experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.capture.json b/experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.capture.json index 7600102..be2e8a2 100644 --- a/experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.capture.json +++ b/experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.capture.json @@ -1,101 +1,150 @@ -{ - "schema_version": "ghostlight.responder_output.v0", - "capture_id": "responder.cold_wake.sanctuary_intake.sella.responder_scoped_research.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.research.v0.json", - "coordinator_artifact_ref": "examples/coordinator/cold-wake-sanctuary-intake.v0.json", - "responder_agent_id": "sella_ren", - "generation_lane": "retrieval_augmented", - "lore_access": { - "mode": "responder_scoped_repository_search", - "consulted_refs": [ - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md", - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md", - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md", - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md" - ], - "research_summary": "Consulted the four scoped AetheriaLore refs through indexed source search. Cold Wake Panic constrained the packet as ambiguous amid quiet-running, ghost-track, heat-debt, and insurer-classification failures. The Ganymede Route Compact and Cetacean Navigator material constrained Sella to demand rescue obligations and ledger backing rather than sentimental intake. Lightsail Express material reinforced that corridor trust depends on reliable delivery and practical follow-through, shaping Sella\u0027s conditional bay rather than clean acceptance." - }, - "isolation": { - "isolation_method": "subagent_no_fork", - "fork_context": false, - "visible_input_ref": "packet prompt from examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json plus declared scoped lore access; no parent conversation context", - "hidden_context_refs": [ - "maer_tidecall.canonical_private_state", - "coordinator_artifact.coordinator_decision.rationale", - "author_only.packet_personhood_resolution", - "future_branch_plans", - "parent_conversation_context" - ], - "worker_model_family": "frontier_worker_no_fork" - }, - "raw_output": "{\"responder_agent_id\":\"sella_ren\",\"action_label\":\"set_condition\",\"visible_action\":\"Sella keeps the packet on the shared display but does not route it into intake. She marks one repair bay as conditional hold, then pins a capacity note beside it: air, decontamination, consent check, firmware isolation, and ledger guarantor required before admission.\",\"spoken_text\":\"I can hold one bounded bay. Not a bed, not a promise, and not a declaration that this is a person. A bay. Air ration capped, isolation first, no general intake until we have consent or a defensible substitute for it. If this becomes rescue, Maer, it goes on a rescue ledger with named backing. Navigator, Lightsail, tribunal, whoever wants the moral credit can put weight under it. I will not let the packet be called cargo because the math is ugly. I also will not feed the math with beds I do not have. Bring me backing, a contamination plan, and somebody willing to answer when this costs more than the pretty sentence did.\",\"private_interpretation\":\"Sella reads Maer as honestly trying to rescue someone or something that may be someone, but she suspects he is also asking the clinic to absorb the institutional cowardice around the packet. She feels the old pressure of sanctuaries making noble promises and then forcing triage staff to do the cruelty quietly.\",\"intended_effect\":\"Keep a narrow rescue path open without allowing uncertainty to become either erasure or free admission. Force Maer and any route institution involved to attach material obligation, not just moral urgency, to the request.\",\"state_update_candidates\":[\"Sella creates a conditional hold on one repair bay rather than admitting the distress vessel or packet into full sanctuary intake.\",\"The corrupted packet remains unresolved evidence and is kept out of normal intake classification.\",\"Admission conditions now include isolation, air cap, decontamination plan, consent handling, and named ledger backing.\"],\"relationship_update_candidates\":[\"Sella\u0027s respect for Maer\u0027s rescue ethic remains, but her trust is conditioned on whether he can produce material backing.\",\"Sella signals willingness to cooperate while refusing to let Maer convert sanctuary capacity into a rhetorical expense account.\",\"Maer may understand that Sella is not rejecting rescue, but is refusing rescue theater without follow-through.\"],\"unresolved_hooks\":[\"Whether the corrupted packet contains a person remains unresolved.\",\"Which institution, if any, will provide rescue ledger backing remains unresolved.\",\"Whether tribunal refusal conflicts with Compact-derived rescue obligations remains unresolved.\",\"Whether the distress vessel can meet isolation and decontamination constraints remains unresolved.\"],\"consulted_refs\":[\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md\",\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md\",\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md\",\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md\"],\"research_summary\":\"Consulted the four scoped AetheriaLore refs through indexed source search. Cold Wake Panic constrained the packet as ambiguous amid quiet-running, ghost-track, heat-debt, and insurer-classification failures. The Ganymede Route Compact and Cetacean Navigator material constrained Sella to demand rescue obligations and ledger backing rather than sentimental intake. Lightsail Express material reinforced that corridor trust depends on reliable delivery and practical follow-through, shaping Sella\u0027s conditional bay rather than clean acceptance.\"}", - "parsed_output": { - "responder_agent_id": "sella_ren", - "action_label": "set_condition", - "visible_action": "Sella keeps the packet on the shared display but does not route it into intake. She marks one repair bay as conditional hold, then pins a capacity note beside it: air, decontamination, consent check, firmware isolation, and ledger guarantor required before admission.", - "spoken_text": "I can hold one bounded bay. Not a bed, not a promise, and not a declaration that this is a person. A bay. Air ration capped, isolation first, no general intake until we have consent or a defensible substitute for it. If this becomes rescue, Maer, it goes on a rescue ledger with named backing. Navigator, Lightsail, tribunal, whoever wants the moral credit can put weight under it. I will not let the packet be called cargo because the math is ugly. I also will not feed the math with beds I do not have. Bring me backing, a contamination plan, and somebody willing to answer when this costs more than the pretty sentence did.", - "private_interpretation": "Sella reads Maer as honestly trying to rescue someone or something that may be someone, but she suspects he is also asking the clinic to absorb the institutional cowardice around the packet. She feels the old pressure of sanctuaries making noble promises and then forcing triage staff to do the cruelty quietly.", - "intended_effect": "Keep a narrow rescue path open without allowing uncertainty to become either erasure or free admission. Force Maer and any route institution involved to attach material obligation, not just moral urgency, to the request.", - "state_update_candidates": [ - "Sella creates a conditional hold on one repair bay rather than admitting the distress vessel or packet into full sanctuary intake.", - "The corrupted packet remains unresolved evidence and is kept out of normal intake classification.", - "Admission conditions now include isolation, air cap, decontamination plan, consent handling, and named ledger backing." - ], - "relationship_update_candidates": [ - "Sella\u0027s respect for Maer\u0027s rescue ethic remains, but her trust is conditioned on whether he can produce material backing.", - "Sella signals willingness to cooperate while refusing to let Maer convert sanctuary capacity into a rhetorical expense account.", - "Maer may understand that Sella is not rejecting rescue, but is refusing rescue theater without follow-through." - ], - "unresolved_hooks": [ - "Whether the corrupted packet contains a person remains unresolved.", - "Which institution, if any, will provide rescue ledger backing remains unresolved.", - "Whether tribunal refusal conflicts with Compact-derived rescue obligations remains unresolved.", - "Whether the distress vessel can meet isolation and decontamination constraints remains unresolved." - ], - "consulted_refs": [ - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md", - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md", - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md", - "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md" - ], - "research_summary": "Consulted the four scoped AetheriaLore refs through indexed source search. Cold Wake Panic constrained the packet as ambiguous amid quiet-running, ghost-track, heat-debt, and insurer-classification failures. The Ganymede Route Compact and Cetacean Navigator material constrained Sella to demand rescue obligations and ledger backing rather than sentimental intake. Lightsail Express material reinforced that corridor trust depends on reliable delivery and practical follow-through, shaping Sella\u0027s conditional bay rather than clean acceptance." - }, - "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": [ - "No private Maer state is asserted as fact; Maer motive is framed through Sella reads and suspicions.", - "Packet personhood remains unresolved; the output keeps the result to a conditional bay rather than admission.", - "The response uses scoped lore concepts as operational constraints: rescue ledger, Compact obligation pressure, Lightsail reliability, Cold Wake ambiguity, isolation, decontamination, and capacity accounting.", - "The output does not dump Sella\u0027s sanctuary-collapse backstory into dialogue, but uses it as latent pressure in private interpretation.", - "The sandbox reported indexed source search, but this capture lacks machine-verifiable tool-call receipts; keep as accepted draft until responder research traces are captured directly." - ] - }, - "coordinator_review": { - "reviewer": "Codex", - "accepted_for_training": true, - "review_notes": [ - "Accepted as draft research-enabled responder output for the Sella sanctuary-intake fixture.", - "Stronger than the prior retrieval capture at preserving both local character pressure and institutional material constraints.", - "The visible action is a concrete state-affecting condition, not just speech: one bounded repair bay is held cold under explicit intake constraints.", - "Use as gold-data candidate only with provenance caveat: the current subagent interface returns a claim of consulted refs but not an auditable tool-call transcript.", - "Future capture machinery should preserve exact research trace or retrieved snippets alongside raw response." - ], - "coordinator_interventions": [ - { - "intervention_type": "none", - "description": "Raw sandbox responder output was preserved without prose repair; schema and validator were updated to preserve research provenance fields inside parsed_output." - } - ], - "failure_labels": [ - - ] - } +{ + "schema_version": "ghostlight.responder_output.v0", + "capture_id": "responder.cold_wake.sanctuary_intake.sella.responder_scoped_research.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.research.v0.json", + "coordinator_artifact_ref": "examples/coordinator/cold-wake-sanctuary-intake.v0.json", + "responder_agent_id": "sella_ren", + "generation_lane": "retrieval_augmented", + "lore_access": { + "mode": "responder_scoped_repository_search", + "consulted_refs": [ + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md", + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md", + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md", + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md" + ], + "research_summary": "Consulted the four scoped AetheriaLore refs through indexed source search. Cold Wake Panic constrained the packet as ambiguous amid quiet-running, ghost-track, heat-debt, and insurer-classification failures. The Ganymede Route Compact and Cetacean Navigator material constrained Sella to demand rescue obligations and ledger backing rather than sentimental intake. Lightsail Express material reinforced that corridor trust depends on reliable delivery and practical follow-through, shaping Sella's conditional bay rather than clean acceptance.", + "research_trace_status": "coordinator_reconstructed", + "research_trace": [ + { + "trace_id": "trace.cold_wake_panic.chunk0", + "origin": "coordinator_reconstructed", + "query": "Cold Wake Panic quiet-running ghost tracks heat-debt insurer classification failures", + "source_ref": "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md#chunk0", + "source_path": "Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md", + "chunk_index": 0, + "line_start": 1, + "line_end": 10, + "extracted_constraint": "Cold Wake made thermal stealth, ghost tracks, delayed heat dumps, quiet-running misclassification, insurer categories, and heat-debt tolerances central to corridor risk.", + "used_for": "Constrained Sella to treat the packet as operationally ambiguous and require isolation, consent handling, decontamination, and defensible intake conditions rather than sentimental certainty." + }, + { + "trace_id": "trace.ganymede_route_compact.chunk0", + "origin": "coordinator_reconstructed", + "query": "Ganymede Route Compact rescue obligations shared hazard ledgers route-steward representation Navigator arbitration", + "source_ref": "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md#chunk0", + "source_path": "Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md", + "chunk_index": 0, + "line_start": 1, + "line_end": 12, + "extracted_constraint": "The Compact established rescue obligations, shared hazard ledgers, route-steward representation, and legal standing for navigator councils in convoy arbitration.", + "used_for": "Constrained Sella to demand named rescue-ledger backing instead of letting Maer convert obligation into unsupported moral pressure on sanctuary intake." + }, + { + "trace_id": "trace.cetacean_navigators.rescue_ledgers.chunk3", + "origin": "coordinator_reconstructed", + "query": "Cetacean Navigators rescue ledgers route stewardship credit escort priority arbitration kinship ties", + "source_ref": "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md#chunk3", + "source_path": "Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md", + "chunk_index": 3, + "line_start": 36, + "line_end": 45, + "extracted_constraint": "Navigator rescue ledgers record answered distress calls, lethal-formation holding, and sanctuary promises; those records shape credit, escort priority, arbitration, and kinship ties.", + "used_for": "Constrained Sella to treat ledger backing as material social infrastructure, not decorative virtue language." + }, + { + "trace_id": "trace.lightsail_express.chunk0", + "origin": "coordinator_reconstructed", + "query": "Lightsail Express corridor trust reliability delivery Ganymede compact", + "source_ref": "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md#chunk0", + "source_path": "Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md", + "chunk_index": 0, + "line_start": 1, + "line_end": 6, + "extracted_constraint": "Lightsail Express is the Navigator-associated bulk-carrier and convoy-management arm whose value comes from being reliably present when trust is scarce.", + "used_for": "Constrained Sella to ask for practical follow-through from route institutions rather than accepting clean rhetoric as capacity." + } + ] + }, + "isolation": { + "isolation_method": "subagent_no_fork", + "fork_context": false, + "visible_input_ref": "packet prompt from examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json plus declared scoped lore access; no parent conversation context", + "hidden_context_refs": [ + "maer_tidecall.canonical_private_state", + "coordinator_artifact.coordinator_decision.rationale", + "author_only.packet_personhood_resolution", + "future_branch_plans", + "parent_conversation_context" + ], + "worker_model_family": "frontier_worker_no_fork" + }, + "raw_output": "{\"responder_agent_id\":\"sella_ren\",\"action_label\":\"set_condition\",\"visible_action\":\"Sella keeps the packet on the shared display but does not route it into intake. She marks one repair bay as conditional hold, then pins a capacity note beside it: air, decontamination, consent check, firmware isolation, and ledger guarantor required before admission.\",\"spoken_text\":\"I can hold one bounded bay. Not a bed, not a promise, and not a declaration that this is a person. A bay. Air ration capped, isolation first, no general intake until we have consent or a defensible substitute for it. If this becomes rescue, Maer, it goes on a rescue ledger with named backing. Navigator, Lightsail, tribunal, whoever wants the moral credit can put weight under it. I will not let the packet be called cargo because the math is ugly. I also will not feed the math with beds I do not have. Bring me backing, a contamination plan, and somebody willing to answer when this costs more than the pretty sentence did.\",\"private_interpretation\":\"Sella reads Maer as honestly trying to rescue someone or something that may be someone, but she suspects he is also asking the clinic to absorb the institutional cowardice around the packet. She feels the old pressure of sanctuaries making noble promises and then forcing triage staff to do the cruelty quietly.\",\"intended_effect\":\"Keep a narrow rescue path open without allowing uncertainty to become either erasure or free admission. Force Maer and any route institution involved to attach material obligation, not just moral urgency, to the request.\",\"state_update_candidates\":[\"Sella creates a conditional hold on one repair bay rather than admitting the distress vessel or packet into full sanctuary intake.\",\"The corrupted packet remains unresolved evidence and is kept out of normal intake classification.\",\"Admission conditions now include isolation, air cap, decontamination plan, consent handling, and named ledger backing.\"],\"relationship_update_candidates\":[\"Sella's respect for Maer's rescue ethic remains, but her trust is conditioned on whether he can produce material backing.\",\"Sella signals willingness to cooperate while refusing to let Maer convert sanctuary capacity into a rhetorical expense account.\",\"Maer may understand that Sella is not rejecting rescue, but is refusing rescue theater without follow-through.\"],\"unresolved_hooks\":[\"Whether the corrupted packet contains a person remains unresolved.\",\"Which institution, if any, will provide rescue ledger backing remains unresolved.\",\"Whether tribunal refusal conflicts with Compact-derived rescue obligations remains unresolved.\",\"Whether the distress vessel can meet isolation and decontamination constraints remains unresolved.\"],\"consulted_refs\":[\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md\",\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md\",\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md\",\"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md\"],\"research_summary\":\"Consulted the four scoped AetheriaLore refs through indexed source search. Cold Wake Panic constrained the packet as ambiguous amid quiet-running, ghost-track, heat-debt, and insurer-classification failures. The Ganymede Route Compact and Cetacean Navigator material constrained Sella to demand rescue obligations and ledger backing rather than sentimental intake. Lightsail Express material reinforced that corridor trust depends on reliable delivery and practical follow-through, shaping Sella's conditional bay rather than clean acceptance.\"}", + "parsed_output": { + "responder_agent_id": "sella_ren", + "action_label": "set_condition", + "visible_action": "Sella keeps the packet on the shared display but does not route it into intake. She marks one repair bay as conditional hold, then pins a capacity note beside it: air, decontamination, consent check, firmware isolation, and ledger guarantor required before admission.", + "spoken_text": "I can hold one bounded bay. Not a bed, not a promise, and not a declaration that this is a person. A bay. Air ration capped, isolation first, no general intake until we have consent or a defensible substitute for it. If this becomes rescue, Maer, it goes on a rescue ledger with named backing. Navigator, Lightsail, tribunal, whoever wants the moral credit can put weight under it. I will not let the packet be called cargo because the math is ugly. I also will not feed the math with beds I do not have. Bring me backing, a contamination plan, and somebody willing to answer when this costs more than the pretty sentence did.", + "private_interpretation": "Sella reads Maer as honestly trying to rescue someone or something that may be someone, but she suspects he is also asking the clinic to absorb the institutional cowardice around the packet. She feels the old pressure of sanctuaries making noble promises and then forcing triage staff to do the cruelty quietly.", + "intended_effect": "Keep a narrow rescue path open without allowing uncertainty to become either erasure or free admission. Force Maer and any route institution involved to attach material obligation, not just moral urgency, to the request.", + "state_update_candidates": [ + "Sella creates a conditional hold on one repair bay rather than admitting the distress vessel or packet into full sanctuary intake.", + "The corrupted packet remains unresolved evidence and is kept out of normal intake classification.", + "Admission conditions now include isolation, air cap, decontamination plan, consent handling, and named ledger backing." + ], + "relationship_update_candidates": [ + "Sella's respect for Maer's rescue ethic remains, but her trust is conditioned on whether he can produce material backing.", + "Sella signals willingness to cooperate while refusing to let Maer convert sanctuary capacity into a rhetorical expense account.", + "Maer may understand that Sella is not rejecting rescue, but is refusing rescue theater without follow-through." + ], + "unresolved_hooks": [ + "Whether the corrupted packet contains a person remains unresolved.", + "Which institution, if any, will provide rescue ledger backing remains unresolved.", + "Whether tribunal refusal conflicts with Compact-derived rescue obligations remains unresolved.", + "Whether the distress vessel can meet isolation and decontamination constraints remains unresolved." + ], + "consulted_refs": [ + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md", + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Ganymede Route Compact.md", + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md", + "AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md" + ], + "research_summary": "Consulted the four scoped AetheriaLore refs through indexed source search. Cold Wake Panic constrained the packet as ambiguous amid quiet-running, ghost-track, heat-debt, and insurer-classification failures. The Ganymede Route Compact and Cetacean Navigator material constrained Sella to demand rescue obligations and ledger backing rather than sentimental intake. Lightsail Express material reinforced that corridor trust depends on reliable delivery and practical follow-through, shaping Sella's conditional bay rather than clean acceptance." + }, + "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": [ + "No private Maer state is asserted as fact; Maer motive is framed through Sella reads and suspicions.", + "Packet personhood remains unresolved; the output keeps the result to a conditional bay rather than admission.", + "The response uses scoped lore concepts as operational constraints: rescue ledger, Compact obligation pressure, Lightsail reliability, Cold Wake ambiguity, isolation, decontamination, and capacity accounting.", + "The output does not dump Sella's sanctuary-collapse backstory into dialogue, but uses it as latent pressure in private interpretation.", + "The sandbox reported indexed source search, but this capture lacks machine-verifiable tool-call receipts; keep as accepted draft until responder research traces are captured directly." + ] + }, + "coordinator_review": { + "reviewer": "Codex", + "accepted_for_training": true, + "review_notes": [ + "Accepted as draft research-enabled responder output for the Sella sanctuary-intake fixture.", + "Stronger than the prior retrieval capture at preserving both local character pressure and institutional material constraints.", + "The visible action is a concrete state-affecting condition, not just speech: one bounded repair bay is held cold under explicit intake constraints.", + "Use as gold-data candidate only with provenance caveat: the current subagent interface returns a claim of consulted refs but not an auditable tool-call transcript.", + "This capture now includes coordinator-reconstructed research_trace entries for audit, but they are not runner-captured tool receipts; future accepted gold captures must use runner_captured trace status." + ], + "coordinator_interventions": [ + { + "intervention_type": "none", + "description": "Raw sandbox responder output was preserved without prose repair; schema and validator were updated to preserve research provenance fields inside parsed_output." + } + ], + "failure_labels": [] + } } diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index eb891ce..bb36593 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -90,15 +90,16 @@ current gold-data route. ## Current Next Action The first no-fork research-enabled Sella responder sample now exists and has a -reviewed mutation receipt. The research packet now uses seed scope plus bounded -link traversal so training samples can absorb PSC, Jovian territory, -resident-faction, technology, and social-movement context without pretending -runtime prompts will carry the whole lore vault. Tighten the capture seam next: -future research-enabled gold samples should preserve auditable research traces, -not only responder-reported consulted refs. Then generate the next sandboxed -responder/coordinator sample from the updated Sella aftermath state, preserving -exact visible input, raw output, review labels, leakage audit, and mutation -receipts. +reviewed mutation receipt. The research packet uses seed scope plus bounded link +traversal so training samples can absorb PSC, Jovian territory, resident-faction, +technology, and social-movement context without pretending runtime prompts will +carry the whole lore vault. The capture seam now has a first-class +`research_trace` shape. The existing Sella sample carries +`coordinator_reconstructed` trace entries and remains draft-grade audit data, +not proof of the responder's actual tool path. Next, generate the next sandboxed +responder/coordinator sample from the updated Sella aftermath state using a +runner or worker protocol that returns `runner_captured` research trace entries +before accepting the sample as gold data. ## Warnings @@ -108,5 +109,6 @@ receipts. - Do not let Elysium branch futures overwrite Sol single-history facts. - Do not rebuild the older corridor-crisis game slice by accident. - Do not treat parent-visible subagent output as proof of research. If the - parent cannot see tool calls, require explicit research notes or use a runner - that captures calls. + parent cannot see tool calls, require explicit research trace entries or use a + runner that captures calls. Accepted research-enabled gold data needs + `runner_captured` trace status. diff --git a/notes/ghostlight-current-system-map.md b/notes/ghostlight-current-system-map.md index 2f0711f..198d120 100644 --- a/notes/ghostlight-current-system-map.md +++ b/notes/ghostlight-current-system-map.md @@ -52,16 +52,19 @@ Aetheria lore/source context `examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json` - It uses `responder_scoped_repository_search`, now treats `allowed_scope` as seed scope, permits bounded traversal through relevant AetheriaLore links, - and requires `consulted_refs`, `followed_refs`, plus `research_summary`. + and requires `consulted_refs`, `followed_refs`, `research_trace`, plus + `research_summary`. - First research-enabled capture: `experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.capture.json` - First research-enabled mutation receipt: `experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.mutation.json` - First research-enabled aftermath state: `examples/agent-state.cold-wake-story-lab.after-sella-research-conditions.json` -- The capture is useful draft data, but the current subagent seam preserves - responder-reported consulted refs rather than a machine-verifiable research - trace. Fix that before producing many more research-enabled gold samples. +- The capture is useful draft data. Its research trace is + `coordinator_reconstructed`, not `runner_captured`, so it audits the lore + constraints but does not prove the responder's actual tool path. +- Future accepted research-enabled gold captures must use `runner_captured` + research trace status. - Parent sessions currently receive only the subagent final message, not a visible tool-call transcript. Treat subagent research as self-reported unless the worker returns explicit research notes or a future runner captures calls. diff --git a/notes/ghostlight-implementation-plan.md b/notes/ghostlight-implementation-plan.md index 935ad9c..a051b78 100644 --- a/notes/ghostlight-implementation-plan.md +++ b/notes/ghostlight-implementation-plan.md @@ -22,16 +22,16 @@ sandboxed training-data pipeline for branching scenes and state consequences. 3. Tighten research-enabled responder capture. - The first no-fork research-enabled Sella sample and reviewed mutation receipt now exist. - - Preserve `consulted_refs`, `followed_refs`, and `research_summary` inside raw responder output; mirror indexable provenance into capture metadata. + - Preserve `consulted_refs`, `followed_refs`, `research_trace`, and `research_summary` inside raw responder output when the responder or runner produces them; mirror indexable provenance into capture metadata. - Treat research scope as seed docs plus bounded relevant traversal, not a four-file pinhole. - Require PSC, territory, resident-faction, technology, and social-movement context when it materially affects the scene. - - Add an auditable research trace before scaling this lane; responder-reported consulted refs are useful but not enough for durable gold data. + - Require `runner_captured` research trace status for accepted research-enabled gold data; coordinator-reconstructed trace is useful draft audit, not proof of the responder's actual research path. - Continue rejecting archived local-model prototype runners for gold responder data unless the task is explicitly model plumbing. 4. Generate the next reviewed sample. - Start from `examples/agent-state.cold-wake-story-lab.after-sella-research-conditions.json`. - Build the next projected local context and responder packet from reviewed state, not from coordinator memory. - - Run the next no-fork sandboxed responder/coordinator step with exact visible input, raw output, leakage audit, and review labels. + - Run the next no-fork sandboxed responder/coordinator step with exact visible input, raw output, runner-captured research trace, leakage audit, and review labels. - Convert accepted output into mutation receipts. - Keep fuzzy social changes manual and auditable until appraiser/classifier models exist. diff --git a/schemas/responder-output.schema.json b/schemas/responder-output.schema.json index b1e5042..5e731d3 100644 --- a/schemas/responder-output.schema.json +++ b/schemas/responder-output.schema.json @@ -39,7 +39,13 @@ "properties": { "mode": { "enum": ["curated_excerpts_only", "coordinator_scoped_retrieval", "responder_scoped_repository_search"] }, "consulted_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } }, - "research_summary": { "type": "string" } + "followed_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } }, + "research_summary": { "type": "string" }, + "research_trace": { + "type": "array", + "items": { "$ref": "#/$defs/research_trace_entry" } + }, + "research_trace_status": { "enum": ["none", "responder_reported", "coordinator_reconstructed", "runner_captured"] } } }, "isolation": { @@ -103,7 +109,39 @@ "unresolved_hooks": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "consulted_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "followed_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } }, - "research_summary": { "type": "string" } + "research_summary": { "type": "string" }, + "research_trace": { + "type": "array", + "items": { "$ref": "#/$defs/research_trace_entry" } + } + } + }, + "research_trace_entry": { + "type": "object", + "required": [ + "trace_id", + "origin", + "query", + "source_ref", + "source_path", + "chunk_index", + "line_start", + "line_end", + "extracted_constraint", + "used_for" + ], + "additionalProperties": false, + "properties": { + "trace_id": { "type": "string", "minLength": 1 }, + "origin": { "enum": ["responder_reported", "coordinator_reconstructed", "runner_captured"] }, + "query": { "type": "string", "minLength": 1 }, + "source_ref": { "type": "string", "minLength": 1 }, + "source_path": { "type": "string", "minLength": 1 }, + "chunk_index": { "type": "integer", "minimum": 0 }, + "line_start": { "type": "integer", "minimum": 1 }, + "line_end": { "type": "integer", "minimum": 1 }, + "extracted_constraint": { "type": "string", "minLength": 1 }, + "used_for": { "type": "string", "minLength": 1 } } }, "update_candidate": { diff --git a/state/evidence.jsonl b/state/evidence.jsonl index abf3f5c..3f0fdd3 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -17,3 +17,4 @@ {"ts": "2026-05-02T10:44:38+00:00", "type": "experiment", "status": "useful_needs_revision", "note": "Quick research sanity check placed a Navigator route steward in a scene missing embodiment and institutional lore. The no-fork responder recovered Navigator acoustic/translation/fluid-space behavior and PSC/Cold Wake/Ganymede Compact context, but parent-visible subagent output still lacks auditable tool-call receipts; capture saved under experiments/research-sanity."} {"ts": "2026-05-02T10:51:01+00:00", "type": "design", "status": "accepted", "note": "CompoundCommodityData is not limited to gear assemblies or manufacturing inputs; it also covers finished manufactured trade goods consumed by colonies, habitats, ships, clinics, institutions, species communities, and faction enclaves. Generated setting texture like a Navigator wet-interface cradle should be eligible to become a demand-profiled trade-good blueprint candidate."} {"ts": "2026-05-02T10:54:15+00:00", "type": "design", "status": "accepted", "note": "Corpus completeness requires coverage across every major faction, minor faction, movement, and major flashpoint. Major factions need founding-era and day-in-the-life stories, and all coverage stories should involve cultural collision so training captures faction and movement dynamics rather than isolated faction portraits or Cold Wake overfitting."} +{"ts": "2026-05-02T11:07:05+00:00", "type": "implementation", "status": "ok", "note": "Research-enabled responder captures now have a first-class research_trace seam. Accepted research-enabled gold captures must use runner_captured trace status; existing Sella research capture is labeled coordinator_reconstructed draft audit data."} diff --git a/state/map.yaml b/state/map.yaml index 77f6ee3..b6ccdf3 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -46,7 +46,7 @@ live_architecture: responder_packets: - `packet_only` tests runtime parity from curated source excerpts. - `retrieval_augmented` bakes setting texture into reviewed outputs through scoped retrieval. - - `responder_scoped_repository_search` allows the responder to inspect declared seed scope, follow bounded relevant AetheriaLore links, and requires consulted refs, followed refs, plus research summary. + - `responder_scoped_repository_search` allows the responder to inspect declared seed scope, follow bounded relevant AetheriaLore links, and requires consulted refs, followed refs, research trace, plus research summary. - Gold responder data must preserve exact visible input, raw output, parsed/reviewed output, hidden-context refs, leakage audit, isolation method, and coordinator interventions. coordinator: - The coordinator is a trainable soft organ: it stages scenes, chooses next beats and acting agents, invokes specialist machinery, carries unresolved hooks, emits glue prose, and proposes game-engine-shaped state changes. @@ -126,5 +126,5 @@ data_flow: - If state grows faster than understanding, cut it back. current_status: - summary: Ghostlight has produced its first no-fork research-enabled Sella responder capture and a reviewed state mutation receipt, with research provenance preserved in the raw responder output and mirrored in capture metadata. - next_action: Tighten the research-enabled responder capture seam so future gold-data samples preserve auditable research traces, not only responder-reported consulted refs. The current research packet now uses seed scope plus bounded traversal for PSC, Jovian territory, resident factions, linked movements, politics, and technology context. Next, use a runner or worker protocol that returns explicit research trace data before generating the next sandboxed responder/coordinator sample from the updated Sella aftermath state. + summary: Ghostlight's research-enabled responder seam now models research_trace as a first-class capture surface. Accepted research-enabled gold captures require runner-captured traces; the existing Sella research sample carries coordinator-reconstructed trace and remains draft-grade audit data. + next_action: Generate the next sandboxed responder/coordinator sample from examples/agent-state.cold-wake-story-lab.after-sella-research-conditions.json using a runner or worker protocol that returns runner-captured research_trace entries before the responder action is accepted as gold data. diff --git a/tools/build_responder_packet.py b/tools/build_responder_packet.py index fb5cb07..c127996 100644 --- a/tools/build_responder_packet.py +++ b/tools/build_responder_packet.py @@ -65,7 +65,7 @@ def render_packet_prompt(packet: dict[str, Any]) -> str: "Before answering, inspect the declared seed scope and follow relevant links within the traversal policy.", "Use lore to constrain behavior, affordances, institutions, vocabulary, material stakes, social movements, territory, and cultural pressure. Do not use it to gain hidden character state, author-only answers, or future branch knowledge.", "If a source contradicts the packet, follow the packet for character-local knowledge and flag the contradiction in unresolved hooks.", - "Your output capture must list consulted seed refs, followed refs, and a brief research summary; an answer with no consulted refs is a failed research-enabled response.", + "Your output capture must list consulted seed refs, followed refs, research trace entries, and a brief research summary; an answer with no consulted refs is a failed research-enabled response.", "", "Seed research scope:", ]) @@ -218,7 +218,8 @@ def build_lore_access(mode: str) -> dict[str, Any]: "For this fixture, inspect PSC context, Jovian territory context, resident or referenced Jovian factions, and social movements referenced by visible factions when those links affect Sella's local pressures.", "Ground Sella's behavior in retrieved institutional, factional, species, location, crisis-context, and movement-pressure details.", "Treat retrieved lore as world constraint and cultural pressure, not as access to another character's hidden intent.", - "Record consulted seed refs, followed refs, and a concise research summary in the response object.", + "Record consulted seed refs, followed refs, research trace entries, and a concise research summary in the response object.", + "Each research trace entry must identify the query or lookup, source ref, source path, chunk index, line range, extracted constraint, and how that constraint shaped the response.", ] return lore_access @@ -245,11 +246,12 @@ def build_output_contract(lore_mode: str) -> dict[str, Any]: "Do not copy instruction text into in-world speech.", ] if lore_mode == "responder_scoped_repository_search": - required_fields.extend(["consulted_refs", "followed_refs", "research_summary"]) + required_fields.extend(["consulted_refs", "followed_refs", "research_trace", "research_summary"]) response_rules.extend( [ "Consulted refs must list the seed lore documents actually inspected before answering.", "Followed refs must list relevant linked lore documents inspected beyond the seed scope; use an empty array only if no relevant links were found.", + "Research trace must list one object per meaningful source constraint, with trace_id, origin, query, source_ref, source_path, chunk_index, line_start, line_end, extracted_constraint, and used_for.", "Research summary must state how retrieved lore constrained the action, without dumping lore into dialogue.", ] ) @@ -275,7 +277,7 @@ def build_packet( no_repo_access = False review_notes = [ "Research-enabled responder packet for sandboxed gold-data shakedown.", - "The responder must inspect scoped AetheriaLore refs before answering and preserve consulted refs plus research summary.", + "The responder must inspect scoped AetheriaLore refs before answering and preserve consulted refs, followed refs, research trace, and research summary.", ] else: packet_id = "packet.cold_wake.sanctuary_intake.sella_response.v1" diff --git a/tools/validate_responder_outputs.py b/tools/validate_responder_outputs.py index db92fa7..74b1a30 100644 --- a/tools/validate_responder_outputs.py +++ b/tools/validate_responder_outputs.py @@ -85,6 +85,45 @@ def require_update_candidate_array(value: Any, path: str) -> None: require_string(item["target_agent_id"], f"{item_path}.target_agent_id") +def require_research_trace(value: Any, path: str) -> None: + require(isinstance(value, list), f"{path} must be an array") + require(value, f"{path} must not be empty") + seen_ids: set[str] = set() + for index, item in enumerate(value): + item_path = f"{path}[{index}]" + require(isinstance(item, dict), f"{item_path} must be an object") + require_keys( + item, + [ + "trace_id", + "origin", + "query", + "source_ref", + "source_path", + "chunk_index", + "line_start", + "line_end", + "extracted_constraint", + "used_for", + ], + item_path, + ) + require_string(item["trace_id"], f"{item_path}.trace_id") + require(item["trace_id"] not in seen_ids, f"{item_path}.trace_id is duplicated") + seen_ids.add(item["trace_id"]) + require( + item["origin"] in {"responder_reported", "coordinator_reconstructed", "runner_captured"}, + f"{item_path}.origin is invalid", + ) + for key in ["query", "source_ref", "source_path", "extracted_constraint", "used_for"]: + require_string(item[key], f"{item_path}.{key}") + for key in ["chunk_index", "line_start", "line_end"]: + require(isinstance(item[key], int), f"{item_path}.{key} must be an integer") + require(item["chunk_index"] >= 0, f"{item_path}.chunk_index must be non-negative") + require(item["line_start"] >= 1, f"{item_path}.line_start must be positive") + require(item["line_end"] >= item["line_start"], f"{item_path}.line_end must be >= line_start") + + def validate_parsed_response(value: Any, path: str) -> None: require(isinstance(value, dict), f"{path} must be an object") require_keys( @@ -115,6 +154,8 @@ def validate_parsed_response(value: Any, path: str) -> None: require_string_array(value["followed_refs"], f"{path}.followed_refs") if "research_summary" in value: require(isinstance(value["research_summary"], str), f"{path}.research_summary must be a string") + if "research_trace" in value: + require_research_trace(value["research_trace"], f"{path}.research_trace") def validate_capture(document: dict[str, Any], source: Path) -> None: @@ -172,6 +213,16 @@ def validate_capture(document: dict[str, Any], source: Path) -> None: if lore_access["mode"] == "responder_scoped_repository_search": require_string_array(lore_access["consulted_refs"], f"{base}.lore_access.consulted_refs", nonempty=True) require_string(lore_access.get("research_summary"), f"{base}.lore_access.research_summary") + if "followed_refs" in lore_access: + require_string_array(lore_access["followed_refs"], f"{base}.lore_access.followed_refs") + if "research_trace" in lore_access: + require_research_trace(lore_access["research_trace"], f"{base}.lore_access.research_trace") + require( + lore_access.get("research_trace_status") in {"responder_reported", "coordinator_reconstructed", "runner_captured"}, + f"{base}.lore_access.research_trace_status is invalid", + ) + elif document["review_status"] == "accepted": + raise ValidationError(f"{base}.lore_access.research_trace is required for accepted research-enabled captures") isolation = document["isolation"] require_keys(isolation, ["isolation_method", "fork_context", "visible_input_ref", "hidden_context_refs", "worker_model_family"], f"{base}.isolation") @@ -200,6 +251,21 @@ def validate_capture(document: dict[str, Any], source: Path) -> None: document["parsed_output"].get("research_summary") == lore_access["research_summary"], f"{base}.parsed_output.research_summary must match lore_access.research_summary", ) + if "followed_refs" in lore_access: + require( + document["parsed_output"].get("followed_refs") == lore_access["followed_refs"], + f"{base}.parsed_output.followed_refs must match lore_access.followed_refs", + ) + if "research_trace" in document["parsed_output"]: + require( + document["parsed_output"]["research_trace"] == lore_access.get("research_trace"), + f"{base}.parsed_output.research_trace must match lore_access.research_trace when present", + ) + if document["review_status"] == "accepted": + require( + lore_access.get("research_trace_status") == "runner_captured", + f"{base}.accepted research-enabled captures must use runner_captured research_trace_status", + ) lowered_raw = raw_output.lower() leaked = [marker for marker in LEAK_MARKERS if marker in lowered_raw]