Widen research responder lore traversal

This commit is contained in:
Meta Vens 2026-05-02 11:41:33 +01:00
commit 41379c1c7e
12 changed files with 198 additions and 36 deletions

View file

@ -37,14 +37,23 @@ There are two retrieval-augmented modes:
research-enabled lane. The packet must include a `Required Lore Research`
section, `allowed_scope`, and `research_instructions`.
In `responder_scoped_repository_search`, the responder must consult the scoped
docs before answering. It should use retrieved lore to constrain behavior,
affordances, institutions, vocabulary, material stakes, and local assumptions.
In `responder_scoped_repository_search`, the responder must consult the seed
docs before answering and may follow relevant links inside the traversal policy.
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 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, 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.
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
let high-quality training samples absorb the world: PSC risk language, Jovian
territorial texture, resident factions, linked social movements, technology
constraints, and the odd little institutional grudges that make the universe
smell lived in. Runtime can later feed compact retrieval. Fine-tuning should
have already eaten its vegetables.
Do not mix these silently. Retrieval-augmented output can be excellent training
material for an Aetheria-tuned responder, but it does not prove packet-only
@ -86,6 +95,9 @@ A packet contains:
- `generation_lane`: `packet_only` or `retrieval_augmented`
- `lore_access`: curated excerpts, coordinator-scoped retrieval, or
responder-scoped repository search
- `traversal_policy`: for responder-scoped research, the permitted link depth,
allowed repo prefixes, required seed refs, link classes to follow, and stop
conditions
- `local_context_prompt`: the projected character-local context
- `observed_event`: what the character can see or hear from the prior action
- `allowed_action_labels`: concrete action labels, including speech and non-speech moves
@ -169,12 +181,13 @@ 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` and `research_summary`. Those fields should be
preserved inside `parsed_output` and 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`, 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.
The first lane comparison found the expected tradeoff. Packet-only output gave a
clean runtime-parity conditional bay decision and stronger character-specific

File diff suppressed because one or more lines are too long

View file

@ -75,9 +75,12 @@ current gold-data route.
## Current Next Action
The first no-fork research-enabled Sella responder sample now exists and has a
reviewed mutation receipt. 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
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.
@ -89,3 +92,6 @@ receipts.
- Do not train on coordinator-repaired responder prose unless the repair is labeled.
- 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.

View file

@ -50,8 +50,9 @@ Aetheria lore/source context
- Research-enabled packet:
`examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json`
- It uses `responder_scoped_repository_search`, allows only declared
AetheriaLore scope, and requires `consulted_refs` plus `research_summary`.
- 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`.
- First research-enabled capture:
`experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.capture.json`
- First research-enabled mutation receipt:
@ -61,6 +62,9 @@ Aetheria lore/source context
- 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.
- 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.
## Archived Receipts

View file

@ -22,7 +22,9 @@ 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` and `research_summary` inside both raw responder output and capture metadata.
- Preserve `consulted_refs`, `followed_refs`, and `research_summary` inside raw responder output; 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.
- Continue rejecting archived local-model prototype runners for gold responder data unless the task is explicitly model plumbing.

View file

@ -102,6 +102,7 @@
"relationship_update_candidates": { "type": "array", "items": { "$ref": "#/$defs/update_candidate" } },
"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" }
}
},

View file

@ -44,6 +44,18 @@
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"traversal_policy": {
"type": "object",
"required": ["max_link_depth", "allowed_prefixes", "required_seed_refs", "follow_link_classes", "stop_conditions"],
"additionalProperties": false,
"properties": {
"max_link_depth": { "type": "integer", "minimum": 0 },
"allowed_prefixes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"required_seed_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"follow_link_classes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"stop_conditions": { "type": "array", "items": { "type": "string", "minLength": 1 } }
}
},
"required_provenance": { "type": "boolean", "const": true }
}
},

View file

@ -13,3 +13,4 @@
{"ts": "2026-05-02T10:43:00+00:00", "type": "distilled_state", "status": "accepted", "note": "Archived local-model prototype material remains evidence only; do not use those runners for gold responder data unless explicitly testing model plumbing."}
{"ts": "2026-05-02T10:44:00+00:00", "type": "distilled_state", "status": "ok", "note": "Persisted state was compacted to mission, live seams, and next action; older evidence moved to state/evidence.archive.jsonl."}
{"ts": "2026-05-02T10:30:22+00:00", "type": "implementation", "status": "accepted", "note": "First no-fork research-enabled Sella responder capture and reviewed mutation receipt were produced; capture preserves consulted refs and research summary, but future gold research samples need auditable research traces beyond responder self-report."}
{"ts": "2026-05-02T10:41:08+00:00", "type": "design", "status": "accepted", "note": "Research-enabled responder scope is seed-plus-traversal, not a narrow file whitelist: training samples should recover PSC, Jovian territory, resident faction, linked movement, politics, and technology context; parent-visible subagent output does not prove tool calls, so future gold data needs explicit research trace receipts."}

View file

@ -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 only declared lore scope and requires consulted 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, 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.
@ -112,4 +112,4 @@ data_flow:
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. Then generate the next sandboxed responder/coordinator sample from the updated Sella aftermath state, keeping exact visible input, raw output, leakage audit, review labels, and mutation receipts.
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.

View file

@ -59,17 +59,35 @@ def render_packet_prompt(packet: dict[str, Any]) -> str:
"",
]
if lore_access["mode"] == "responder_scoped_repository_search":
traversal_policy = lore_access["traversal_policy"]
lines.extend([
"## Required Lore Research",
"Before answering, inspect the declared lore scope and ground your action in what those sources make true or likely.",
"Use lore to constrain behavior, affordances, institutions, vocabulary, and material stakes. Do not use it to gain hidden character state, author-only answers, or future branch knowledge.",
"If a scoped source contradicts the packet, follow the packet for character-local knowledge and flag the contradiction in unresolved hooks.",
"Your output capture must list consulted refs and a brief research summary; an answer with no consulted refs is a failed research-enabled response.",
"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.",
"",
"Allowed research scope:",
"Seed research scope:",
])
for scope in lore_access["allowed_scope"]:
lines.append(f"- {scope}")
lines.extend([
"",
"Traversal policy:",
f"- Max link depth: {traversal_policy['max_link_depth']}",
"- Allowed prefixes:",
])
for prefix in traversal_policy["allowed_prefixes"]:
lines.append(f" - {prefix}")
lines.append("- Required seed refs:")
for ref in traversal_policy["required_seed_refs"]:
lines.append(f" - {ref}")
lines.append("- Follow link classes:")
for link_class in traversal_policy["follow_link_classes"]:
lines.append(f" - {link_class}")
lines.append("- Stop conditions:")
for condition in traversal_policy["stop_conditions"]:
lines.append(f" - {condition}")
if lore_access.get("research_instructions"):
lines.extend(["", "Research instructions:"])
for instruction in lore_access["research_instructions"]:
@ -144,10 +162,21 @@ def build_source_excerpts(projected: dict[str, Any]) -> list[dict[str, str]]:
def build_lore_access(mode: str) -> dict[str, Any]:
allowed_scope = [
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/index.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/index.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/index.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Movements/index.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Territories.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Megas.md",
"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/Pan-Solar Consortium.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Aya Collective.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Cetacean Navigators.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Minor/Lightsail Express.md",
"AetheriaLore:Aetheria/Worldbuilding/Politics/Thermal Signature Warfare.md",
"AetheriaLore:Aetheria/Worldbuilding/Politics/Restrictions on Warfare.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Technology/Neuromorphic Firmware.md",
]
lore_access = {
"mode": mode,
@ -155,11 +184,41 @@ def build_lore_access(mode: str) -> dict[str, Any]:
"required_provenance": True,
}
if mode == "responder_scoped_repository_search":
lore_access["traversal_policy"] = {
"max_link_depth": 2,
"allowed_prefixes": [
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/",
"AetheriaLore:Aetheria/Worldbuilding/Politics/",
"AetheriaLore:Aetheria/Worldbuilding/Technology/",
],
"required_seed_refs": [
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Timeline/Events/Cold Wake Panic.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Territories.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/index.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Pan-Solar Consortium.md",
"AetheriaLore:Aetheria/Worldbuilding/Pre-Elysium/Factions/Powers/Major/Aya Collective.md",
],
"follow_link_classes": [
"resident Jovian factions and institutions",
"referenced factions with direct scene pressure",
"referenced social movements shaping a visible faction's values",
"territory, politics, and technology docs that explain material constraints",
"event docs that explain local precedent or institutional obligation",
],
"stop_conditions": [
"stop when a link is not relevant to the responder's local action, institution, relationship, or material stakes",
"stop before post-Elysium or future-outcome lore unless the packet explicitly requests it",
"stop before author-only plot resolution or hidden incident truth not visible to this character",
"summarize only the constraints that affected the response; do not dump research into dialogue",
],
}
lore_access["research_instructions"] = [
"Consult the allowed AetheriaLore scope before answering; do not rely only on the packet excerpts.",
"Ground Sella's behavior in retrieved institutional, factional, species, location, and crisis-context details.",
"Consult the required seed refs before answering; do not rely only on the packet excerpts.",
"Follow relevant wikilinks within the traversal policy to recover institutional, territorial, technological, and social-movement context.",
"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 the consulted refs and a concise research summary in the response object.",
"Record consulted seed refs, followed refs, and a concise research summary in the response object.",
]
return lore_access
@ -186,10 +245,11 @@ 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", "research_summary"])
required_fields.extend(["consulted_refs", "followed_refs", "research_summary"])
response_rules.extend(
[
"Consulted refs must list the scoped lore documents actually inspected before answering.",
"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 summary must state how retrieved lore constrained the action, without dumping lore into dialogue.",
]
)

View file

@ -111,6 +111,8 @@ def validate_parsed_response(value: Any, path: str) -> None:
require_string_array(value["unresolved_hooks"], f"{path}.unresolved_hooks")
if "consulted_refs" in value:
require_string_array(value["consulted_refs"], f"{path}.consulted_refs")
if "followed_refs" in value:
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")

View file

@ -113,6 +113,17 @@ def validate_packet(document: dict[str, Any], source: Path) -> None:
require(lore_access["required_provenance"] is True, f"{base}.lore_access.required_provenance must be true")
if "research_instructions" in lore_access:
require_string_array(lore_access["research_instructions"], f"{base}.lore_access.research_instructions", nonempty=True)
if "traversal_policy" in lore_access:
traversal_policy = lore_access["traversal_policy"]
require_keys(
traversal_policy,
["max_link_depth", "allowed_prefixes", "required_seed_refs", "follow_link_classes", "stop_conditions"],
f"{base}.lore_access.traversal_policy",
)
require(isinstance(traversal_policy["max_link_depth"], int), f"{base}.lore_access.traversal_policy.max_link_depth must be an integer")
require(traversal_policy["max_link_depth"] >= 0, f"{base}.lore_access.traversal_policy.max_link_depth must be non-negative")
for key in ["allowed_prefixes", "required_seed_refs", "follow_link_classes", "stop_conditions"]:
require_string_array(traversal_policy[key], f"{base}.lore_access.traversal_policy.{key}", nonempty=True)
if document["generation_lane"] == "packet_only":
require(lore_access["mode"] == "curated_excerpts_only", f"{base}.packet_only must use curated_excerpts_only lore access")
if document["generation_lane"] == "retrieval_augmented":
@ -127,6 +138,10 @@ def validate_packet(document: dict[str, Any], source: Path) -> None:
lore_access.get("research_instructions"),
f"{base}.responder_scoped_repository_search requires lore_access.research_instructions",
)
require(
lore_access.get("traversal_policy"),
f"{base}.responder_scoped_repository_search requires lore_access.traversal_policy",
)
visible = document["visible_context"]
require_keys(visible, ["local_context_prompt", "observed_event", "allowed_action_labels", "source_excerpts"], f"{base}.visible_context")
@ -180,6 +195,9 @@ def validate_packet(document: dict[str, Any], source: Path) -> None:
require("## Required Lore Research" in prompt_text, f"{base}.packet_prompt_text must include required lore research instructions")
for scope in lore_access["allowed_scope"]:
require(scope in prompt_text, f"{base}.packet_prompt_text must include allowed research scope: {scope}")
traversal_policy = lore_access.get("traversal_policy", {})
for prefix in traversal_policy.get("allowed_prefixes", []):
require(prefix in prompt_text, f"{base}.packet_prompt_text must include allowed traversal prefix: {prefix}")
review = document["review"]
require_keys(review, ["reviewer", "review_notes", "accepted_for_sandbox_use", "failure_labels"], f"{base}.review")