The operator accepted the map's recommendation on PA-Q1, Q3, Q7, Q10, Q12
and Q13 on 2026-09-22. The operator also ruled PA-Q15: the play authority's
facts stand as Ruled, and it mints quantity without evidence ("if the agent
can invent people, it can invent loot"). Only Play gains either;
elaborators, consumers and the seed keep the evidence gate.
The target now lists the library's fourth piece (the table vocabulary and
inference seams) and the affordance grants. Invariant 5 gains Ruled facts
and minting, and invariant 8 shows the kernel's refusal of the player's own
act. Cut 3 still specifies the superseded PlayCarriesEvidence refusal and
is being respecified.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
67 KiB
Ghostlight Dungeon play agent — cut map (plan step 16)
Ends are owned by ghostlight-play-agent.md; this document owns the means.
Written 2026-09-22 against Ghostlight cb0b604 on
codex/ghostlight-dungeon-mvp, and re-read against 5ff1d54 (the target's Q1
premise correction and the Q11 ruling). cb0b604..5ff1d54 changes no file under
crates/, sidecar/ or web/, so every line number below is against
cb0b604 = 5ff1d54 source. Hands start at Cut 1 from the commit that lands
this file, once the open questions below carry rulings.
How status is read
Status is derived from what this document records; nothing here is a maintained header.
- A question (
PA-Qn) is open exactly when it has noRulingfield.Authorityisoperator,self-under-standing-go, ordefaulted. A defaulted question is a conventional choice the map made and recorded; it is open to the operator but blocks nothing. - A cut is landed when its
Landedfield names commits, and closed when every promise (P<cut>.<n>) in its Verdicts table has a verdict (HOLDS | FALSIFIED | UNPROVEN). The root agent fillsLandedand the Verdicts; Hands and Soul do not edit this file. - A mutation (
M<cut>.<n>) names file, line, before and after; the commit it ran against is filled at execution. Mutations run against committed code and are restored with a reverse edit, nevergit checkout. - A finding (
PA.f<n>) is something no cut owns; each carries introduced-or-pre-existing, severity, and triage (fix | operator | recorded). - The ledger carries an estimate per cut; the Actual column is computed from the diff at landing and is empty until then.
The pass is open until every cut is closed and every question has a ruling.
Every build and test named here runs on the Windows workstation and proves
Windows only. The Linux release is Idunn's build on Yggdrasil
(gamecult-ops/runbooks/ghostlight-dungeon-yggdrasil.md); the Dungeon bin lists
four more tests there (#[cfg(target_os = "linux")], see the stock-lenses map).
What the probes established
-
Probe B, the public boundary (compile, external crate). A scratch crate outside the workspace (session scratchpad
probe-boundary, path dependency oncrates/ghostlight,cargo check --offline, scratch target removed; repo untouched) tried, from outside the library:- build an
InferenceRequest: E0451, fieldspurposeandproviderare private (controllers.rs:115-118); there is no public constructor (tool_requestispub(super),controllers.rs:6061); - read
InferenceOutput.events: E0616 (controllers.rs:148-151,pub(super)); - read
PreparedInference.invocation: E0616 (controllers.rs:132-135). So a port "a consumer implements outside this crate" (the doc comment atcontrollers.rs:376-380) cannot read the request it must lower; - read
SubjectSnapshot.position: E0616 (lib.rs:978); - read
AffordanceSnapshot.entry.roles: E0616 (patch.rs:889).
And these compile from outside:
ControllerPort::new(mailbox) .submit_controller(id, &opportunity, invocation)(mailbox.rs:688-731);WorldMailbox::submit_clock(mailbox.rs:356);serde_json::from_str::<WorldPatch>and::<DecisionInvocation>(both deriveDeserializewithpub(crate)fields).Consequence: Dungeon today can exercise for a Persona and submit a patch it deserialized, but it cannot run an inference, read an inference's output, read where anyone stands, or read what an affordance's roles are. Every surface the play agent reads or writes is library-private. This is PA-Q12.
- build an
-
Catalog size (measured from the checked-in fixture).
sidecar/claude-sdk/test/schemas.jsonis regenerated frompatch_tools()bysdk_inference.rs:1874-1913. The 39 patch tools total 54,810 characters (parameters plus descriptions parsed frompatch.rs:5600-6128). Droppingdeclare_affordance(8,055 characters of parameters on its own),record_gapandsubmitleaves 36 tools and 46,428 characters, about 13,300 tokens at 3.5 characters per token. The largest arecreate_commitment(6,373), the three pressure tools (about 2,950 each),bind/release(1,625). A 22-tool core (relocate, transfer, consume, admit, bind, release, communicate, witness, acquire_knowledge, forget, create/discharge_commitment, advance/reduce_pressure, open/close_route, the five light declarations, set_persona_material) is 31,609 characters, about 9,000 tokens. A grantedspeaktool is 160 characters. Script: scratchpadcatalog_size.py. -
Source-verified facts the design rests on (read, not probed):
- Rust drives every connector round: an inert port returns one round's calls
and the lane's evaluator re-derives the conversation from
completed(evaluate_elaboration_loop,elaboration.rs:1127-1223;evaluate_operational_loop,controllers.rs:5829). The SDK port instead runs the loop inside one sidecar query and asks a lentToolResultOracle(sdk_inference.rs:417-498); it holds onegatemutex for a whole query (:423), andToolResultOracle::answeris synchronous (controllers.rs:251-260). - Routing is a model-name prefix with two slots, connector and SDK
(
sdk_inference.rs:715-773);open_inferencerefuses at open anyControllerModelslane no slot claims (controllers.rs:2336-2376). - The SDK sidecar is a private MessagePack child-process pipe
(
SidecarFrame,sdk_inference.rs:36-70) that borrowscodex_connector::CodexInputItem; the connector port is the only user of the connector's socket client (controllers.rs:406-527). The one shared seam is the in-processInferencePorttrait. This confirms the target's corrected Q1 premise (5ff1d54). - The Projector's typed context carries no knowledge
(
projector_context,controllers.rs:4144-4166); its visible stimulus is the subject's wholeknowledge, each row renderedsaid | seen_doing | knownwith the speaker's label, certainty and text (visible_stimulus/projector_knowledge/perceived_from,controllers.rs:4604-4655). Rows carryminted_at(lib.rs:1044-1047) but nothing marks what arrived since the subject last acted. The kernel records every exercise as aDecisionEvent { revision, scope, .. }inWorldState.events(lib.rs:774-793,:873, pushed at:4881);last_opportunity_atis fictional minutes, not a revision (lib.rs:853). - Projector then Persona runs as two checkpointed stages of the narrative
lane (
run_narrativecontrollers.rs:2770-2840,run_projector:3530,run_persona:3604), followed by the Interpreter.select_one(:1261) matches any mode the opportunity names, so the Projector can run for aHuman-mode opportunity; onlyrun_narrative's lane gate (:2776-2780) restricts it. - An exercise commits only if
exact_opportunityfinds the scope's current digest (lib.rs:4244-4270) and the caller equals the assignment'sexpected_caller(lib.rs:738-752, checked at:1613and:1631and re-decided at:4866and:4897). ANarrativePersona's expected caller isController(controller_id), whichControllerPort::submit_controllermints from the kernel-issued opportunity (mailbox.rs:316-332); a forgedcontroller_idfailsControllerMismatch. A human's expected caller is itsPrincipal. - Retry identity is caller plus body (
lib.rs:1466-1476); anExerciseDecisionbody carries its opportunity (revision and digest), so a retry rebuilt from a later snapshot isCommandIdConflict, notAlreadyApplied. A retry must resubmit the persisted body. require_system_capability(lib.rs:1703-1720) and its twin (apply_effect,:4768-4780) admit a system caller for exactly the listed pairs.require_answer(:1740-1764) refuses every unanswered Active patch that declares or carries evidence, from every caller, including the owner.require_patch_author(:4284-4315) returns unconfined only for the owner.verify_state_shapedemandscontroller_assignments.len() == subjects.len()(journal.rs:488-495); opportunities are minted for every assignment whosemode()isSome(lib.rs:4115-4156).- No operation grants or revokes an affordance: grants are written only by a
subject's declaration (
ComponentOpvariantspatch.rs:1014-1188; catalog "Draft-only",lib.rs:868). The genesis human subject is declared withkernel_speak_grant()only, at the commons (mailbox.rs:115-145), andspeakhas one precondition,CanBroadcast { Colocated }(patch.rs:2283-2297).Relocateneeds a route from the subject's current place and cannot place an unplaced subject (patch.rs:3613-3660). render_world_structure(elaboration.rs:2172-2280) is an existing whole-world renderer with bracketed ids, used by the seed lane only.SourceSpan::locate(ghostlight-persona-projection/src/lib.rs:366-375) is the existing verbatim-quote locator.- The seed lane's key hashes ancestry (
seed_command_id,elaboration.rs:1545-1551). Seeding runs assweep(1)inside the owner's request (runtime.rs:1786-1826), one session at a time.
- Rust drives every connector round: an inert port returns one round's calls
and the lane's evaluator re-derives the conversation from
Questions
PA-Q1 Where the local backend lives
- Asked: 2026-09-22 (target Q1, premise corrected at
5ff1d54). - Context: the only shared seam is
InferencePort. Every lane's request is aCodexProviderRequest(instructions, input items, tools, tool choice, parallel calls, effort, output cap); lowering that to OpenAI chat completions is mechanical (instructions → system,UserText→ user,AssistantText→ assistant,ToolCall→ assistanttool_calls,ToolResult→ tool message; response text →InferenceEvent::Text,tool_calls→InferenceEvent::ToolCall, inert). Probe B: an external port cannot readPreparedInference.invocation, and routing is a private two-slot router. Ghostlight never holds a credential; a local llama-server on loopback needs none. - Options:
- A: a third port in the library,
crates/ghostlight/src/local_inference.rs, besidesdk_inference.rs. Loopback-only endpoint (refused at open otherwise), no credential header, inert tool calls, receipt digest over a typed receipt (request id, model, response id, usage, finish reason). A third routing slot claimed by a model prefix. Addsreqwestto the library (already in the workspace lock for Dungeon). About 250 lines with tests. - B: a port in Dungeon. Needs a public accessor on
PreparedInferenceand a public routing seam that takes a foreign port. Two changes to the library's inference boundary so the port can live outside it; the port itself is the same code. - C: a CultNet connector daemon (a new service speaking a new CultNet contract, like CodexConnector). No invariant it protects exists here: a local model server is already its own process, and no credential needs isolating. It buys third-party credentialed endpoints, which the map says are needed "before third parties use the deployment" — not for the gate.
- A: a third port in the library,
- Recommendation: A. Smallest surface, one owner for routing, and the loopback-and-no-credential rule keeps "Ghostlight never holds a credential" true by construction. C remains the path for credentialed third-party endpoints and is recorded as PA.f1.
- Depends on it: Cut 2.
- Ruling: A, as recommended.
- Authority: operator.
- Ruled: 2026-09-22.
PA-Q2 What a Persona perceived
- Asked: 2026-09-22 (target Q2).
- Finding: partly yes. The visible stimulus already carries every row the
subject holds, with speaker and
said | seen_doing | known(controllers.rs:4616-4638), which is what speech heard and acts seen are (Told { by },Seen { by }). It carries all of it, inminted_atorder, with nothing marking what arrived since the subject last acted, so a Persona cannot tell the player's line of this turn from one heard ten turns ago. - Smallest addition (default): a derived, per-row marker. The snapshot
derives
last_acted_at: Option<u64>for each subject as the greatestDecisionEvent.revisionwhose scope is that subject (one pass overstate.events, no new state, no schema change), andprojector_knowledgeadds"new": minted_at > last_acted_atto each row (a subject that never acted sees every minted row as new). Nothing about who hears what changes; the kernel'sknowledgestays the sole perception owner. - Cost: the Projector's stimulus bytes change for every lane that renders
one, including the offline narrative lane. Stored
NarrativeCheckpoint::Projectorrows stay valid: their integrity check does not rebuild the stimulus (controllers.rs:788-822). - Depends on it: Cut 6.
- Ruling: default as above.
- Authority: defaulted.
PA-Q3 The callable Persona turn
- Asked: 2026-09-22 (target Q3).
- Context: the stages exist; what binds them to
ControllerRunneris the checkpoint store, the Interpreter stage and the runner's five-model open. - Options:
- A: an unpersisted lane.
pub struct PersonaLaneincontrollers.rs, built from aControllerPort, anArc<dyn InferencePort>, a projector model and a persona model. Two methods:pub async fn turn(&self, command_id, &DecisionOpportunity) -> Result<PersonaTurn, ControllerError>(Projector then Persona, the existing prompt builders, returns the existing receipt-boundPersonaTurn), andpub async fn narrate(&self, command_id, &DecisionOpportunity) -> Result<String, ControllerError>(Projector only, for the player; Q11). No work-store row. A restart mid-turn repeats the two inferences; nothing was committed, and the returned turn is persisted by its caller (Dungeon's turn record, Cut 8). - B: persisted. Reuse the
ProjectorandPersonacheckpoints and end at a new terminal stage (Spoken { turn }). Resumable, but it needs a new stage, its integrity arm, its progression rule, and acontroller_workrow bump, and it gives the turn two durable owners (the work store and Dungeon's turn record).
- A: an unpersisted lane.
- Recommendation: A. The prose is what is worth keeping and its caller keeps it; in-flight inference on a local machine is the cheap thing to lose. One owner for turn state.
- Depends on it: Cut 6.
- Ruling: A, as recommended.
- Authority: operator.
- Ruled: 2026-09-22.
PA-Q4 Exercising on an actor's behalf
- Asked: 2026-09-22 (target Q4).
- Finding: no kernel change. Probe B compiled
ControllerPort::submit_controllerfrom an external crate. A Persona's act commits as that Persona's ownExerciseDecision, under the caller the mailbox mints from the kernel-issued opportunity, and admission is unchanged:exact_opportunity(scope digest),expected_caller,require_granted,action::exercise(preconditions, ceilings, band draw). The player's act commits throughsubmit_principalwith the player's ownVerifiedPrincipalEvidence, which Dungeon already holds for the request (runtime.rs:1571-1585); the evidence's own expiry bounds it (mailbox.rs:227-233). Sealed admission is not weakened because nothing new is admitted. - What the kernel cannot check, Dungeon checks (Cut 8): that the actor was
dispatched this turn (or is the player), and that speech and display are
literal spans of that actor's prose (invariant 4). Tool identity carries the
actor (
<handle>__<kind>, the grouped lane's precedent,controllers.rs:73-75), never a model-written argument. - Retry rule (Cut 8): the exact
CommandBodyis persisted before it is submitted, and a resumed call resubmits those bytes under the same command id, so the kernel answersAlreadyApplied(lib.rs:1466-1476). - Ruling: finding; nothing to rule.
- Authority: self-under-standing-go.
PA-Q5 The play authority's shape
- Asked: 2026-09-22 (target Q5).
- Default design:
SystemCapability::Play(lib.rs:467-484), unit-shaped. Minted by exactly one public method on a narrowed port,pub struct PlayPort { mailbox }inmailbox.rswithsnapshot(),submit_patch(command_id, WorldPatch)andadvance_time(command_id, TickMinutes), both stamped (submit_stamped,mailbox.rs:267). The clock precedent maps one-for-one: a system capability with no session evidence, minted by one method, admitted for listed bodies only. Admission:require_system_capabilityand itsapply_effecttwin admit(Play, AdmitPatch)and(Play, AdvanceTime)and nothing else;require_patch_authorreturnsOk(None)(unconfined) forPlay;require_answeradmits(Active, None)with declarations forPlayand for no other caller;Playis refused in Draft (WrongPhase) and refused any patch carrying evidence (Mismatch, new variantPlayCarriesEvidence), so it cannot mint quantity;require_clock_calleradmitsPlay.
- "Only one thing holds it": the capability is compile-time narrowed like
every other port; exclusivity is Dungeon constructing one
PlayPortinAppState, pinned by a negative grep (Cut 3, Cut 8). - Option not taken: binding
PlayPortto the owner's verified evidence, likeSeedPort. It would end a long play session at the owner's session expiry and buys nothing the journal'sSystem(Play)attribution does not. - Depends on it: Cut 3.
- Ruling: default as above; the name is the operator's to change.
- Authority: defaulted.
PA-Q6 Retirement's shape
- Asked: 2026-09-22 (target Q6).
- Finding and default: retirement is a subject state written by a
component operation.
- State:
ControllerAssignment::Retired(lib.rs:700-722).id()andmode()returnNone, soderive_opportunitiesmints nothing for it (lib.rs:4125) with no new filter, andcontroller_assignmentsstays the sole answer to who may call (lib.rs:836-838).expected_callerbecomesOption<CallerId>and returnsNoneforRetired; both call sites compareSome(caller). The shape check'slen ==clause is unchanged. - Operation:
ComponentOp::Retire { subject: Ref<SubjectId> }resolving toResolvedOp::Retire { subject }. Applied: the assignment becomesRetired, the subject'spositionsentry andaffordance_grantsentry are removed.subjects,events,knowledge, holdings, facts and the journal keep everything, which is "stays in history". - Refusals: retiring an already retired subject is
NoOperationEffect; retiring anExternallyControlledmirror is refused (another world owns it); a confined author (elaborator, consumer) is refused byconfine_to_ground(OutsideJurisdiction) whatever the subject's place. Owner andPlaymay retire. - What readers see: no opportunity, so no dispatch (Dungeon dispatches from
opportunities) and no act (
exact_opportunity→OpportunityMismatch); no position, soaudience(lib.rs:3053) never reaches it and the Projector'spresentomits it;SubjectSnapshotgainspub retired: boolso the agent's view and the surface can say so. Preconditions read the actor's own state and are never reached for a retired actor. - Replay:
apply_effectapplies the resolved op like any other, so replay reproduces it. - A body that matters afterwards is the agent's
declare_resourcein the same patch, as the target says.
- State:
- Schema:
ControllerAssignment,ComponentOp,SystemCapabilityall change shape, soSTATE_SCHEMA/COMMIT_SCHEMAbumpconsumer.v5 → v6(lib.rs:172-173, pinned atconsumer.rsas for L1), in one cut with Q5. - Not done (recorded, PA.f4): a retired subject's commitments, pressures and dependency edges stay and the clock keeps deriving motion over them.
- Depends on it: Cut 4.
- Ruling: default as above.
- Authority: defaulted.
PA-Q7 The agent's catalog, and whether a small model plausibly handles it
- Asked: 2026-09-22 (target Q7).
- Measured: above. The kernel side without
declare_affordanceis 36 tools, ~13,300 tokens; a 22-tool core ~9,000 tokens. Dungeon addsdispatch,ask_player,end_turn(small), plus one<handle>__<kind>tool per granted entry per actor in the scene (160–1,500 characters each). With Cut 4 and Cut 5,retireandgrant_affordance/revoke_affordancejoin the kernel side. - Plausibility: nobody has measured Bonsai 2 on this. A 13k-token stable tools prefix is reused from a llama.cpp slot's KV cache when the prefix is byte-identical, so its cost is paid once per slot; the risk is selection accuracy over ~40 tools, not tokens. Strict-schema grammar enforcement on llama-server tool calls is a property of the server build and must be checked on Raven's machine (PA.f2).
- Options: A: the whole kernel catalog minus
declare_affordance. B: a curated Dungeon list ofPATCH_TOOLSnames (Dungeon policy, pinned ⊆PATCH_TOOLSby test, the lensleads_withprecedent), starting from the 22-tool core plusretireandgrant_affordance. - Recommendation: B, measured at the gate against A on the same turn script; the list is one constant and widening it is a one-line change.
- Depends on it: Cut 7 (the library takes a name list), Cut 8 (the list).
- Ruling: B, as recommended.
- Authority: operator.
- Ruled: 2026-09-22.
PA-Q8 The turn lifecycle, and what survives a restart
- Asked: 2026-09-22 (target Q8).
- Default design: Dungeon owns one open turn at a time in its own CultCache
store,
service/play-turn-v1.cc, on theapp_session.rspattern (OwnedRedbMessagePackBackingStore, one row). The row,PlayTurn:turn_id(theworld.playidempotency key),opening_prompt(built once from the snapshot and the player's text, then never rebuilt),player_prose: Vec<String>(the first text and each answer),rounds: Vec<InferenceOutput>,calls: Vec<CallRecord>(per tool call: its call id, the exactCommandBodyor play patch persisted before submission, and its result string once known),persona_turns: Vec<(SubjectId, PersonaTurn)>,question: Option<String>,refusal: Option<String>(Q13),narration: Option<String>,state: Running | AwaitingPlayer | Closed.- The agent's conversation is re-derived from
opening_prompt,roundsand the recorded results, the connector posture; nothing crosses from one turn to the next except world state. When a turn closes, the next turn'sopening_promptdepends only on the snapshot and the new text, which is invariant 1's test. - Commands inside a turn carry ids derived from
(turn_id, round, call_index)(sha256 → UUID,CommandId::parse_uuid); a call whose body is recorded and whose result is not is resubmitted with the recorded body. - After a restart, a
Runningturn resumes on the player's nextworld.play(the player's evidence rides that request; an empty text means "continue"), and anAwaitingPlayerturn waits for the answer. Nothing runs a player act without a live principal.
- The agent's conversation is re-derived from
- Depends on it: Cut 8.
- Ruling: default as above.
- Authority: defaulted.
PA-Q9 The Eve play surface
- Asked: 2026-09-22 (target Q9), narrowed by Q11's ruling.
- Default design: in Active, for the principal whose subject is
human_controller, the surface is: the latestnarration(the Projector's prose for the player; Q11) as atextcard; the agent'squestionwhen one is open; the refusal line (Q13) when present; the turn state; acontrol.input.textareabound totextand oneworld.playbutton (ghostlight.world_play.v0, bindings["text"]). Place, co-presence, perceived speech with speaker and displays arrive through the narration, which renders them from committed state. The owner keepsworld.advance_time. The story card (eve.rs:436-455) is deleted from the play surface: it is the whole-world operator log and shows the player speech it never perceived. - Depends on it: Cut 9.
- Ruling: default as above.
- Authority: defaulted.
PA-Q10 The player's subject
- Asked: 2026-09-22 (target Q10).
- Finding: the genesis human subject serves as the player's body, but not
as it stands. It holds
speakonly (mailbox.rs:115-124), and no operation in any lane can grant it another verb; a physical act refused by a precondition, and moving by the player's own act (invariant 3), both need verbs it cannot get. Placement is fine: the agent, holdingPlay, declares a route from the commons and relocates the subject as its own ruling. - Options:
- A:
ComponentOp::GrantAffordance { subject, affordance }andRevokeAffordance, writingaffordance_grantsfor an existing subject and existing catalog entry. Owner,Play, and the seed lane (Draft, owner) may use them; confined authors are refused (a grant is authority, not structure). The seed can then grant the player the world's verbs in Draft, and the agent can grant or take verbs in play (bound hands). - B: rebind a seeded Person to the human principal. Binding a human is
genesis-only on purpose (
admits_human,lib.rs:1775-1778), because a human joins the required approvers. - C: let the agent rule the player's physical acts as raw ops. Violates invariant 3.
- A:
- Recommendation: A.
- Depends on it: Cut 5.
- Ruling: A, as recommended.
- Authority: operator.
- Ruled: 2026-09-22.
PA-Q11 The player's prose
- Ruling: the player's perception is rendered by the same Projector a
Persona gets. "Render it with the Projector; we're paying for it on every
Persona already." The Projector is the player's narration; the play agent
writes none. Plan: one
PersonaLane::narratecall for the player subject at the end of every turn (Cut 8), after the last commit. Its serial cost is measured and recorded at the gate beside seconds per turn, not decided here. - Authority: operator.
- Ruled: 2026-09-22 (
4e61f58).
PA-Q12 Where the agent's read and write vocabulary lives
- Asked: 2026-09-22, from probe B. The target says the library gains three
pieces and Dungeon owns the agent's loop, prompt and catalog. The Body says
Dungeon cannot build or read an inference, cannot see positions, roles,
resources, routes or knowledge, and cannot decode a patch tool call, because
every one of those is
pub(crate). - Options:
- A: a consumer-neutral table module in the library (
table.rs), the vocabulary any unconfined author running actors needs, and nothing about turns:pub fn table_view(&WorldSnapshot) -> String(the whole-world render with bracketed ids, grown fromrender_world_structure, which moves here and the seed lane calls);pub fn authoring_tools(names: &[&str]) -> Result<Vec<CodexToolDefinition>, TableError>(a named subset ofPATCH_TOOLS, refusing unknown names);pub fn decode_authoring_call(name, arguments) -> Result<WorldPatch, String>(the existingapply_tool_calldecode, one call to a one-item patch);pub fn actor_tools(prefix, &WorldSnapshot, SubjectId) -> Vec<CodexToolDefinition>andpub fn decode_actor_call(&WorldSnapshot, SubjectId, kind, arguments) -> Result<(DecisionOpportunity, DecisionInvocation), String>(the existingcatalog_tools/decode_catalog_call, plus an optionaldisplay);pub fn describe_refusal(&WorldSnapshot, &KernelError) -> String. Plus two inference seams:pub fn InferenceRequest::play(..)(wrapstool_requestunder a newInferencePurpose::Play) andpub fn InferenceOutput::events(&self)/receipt_digest(&self). - B: widen
pub(crate)topubon the types Dungeon would read and let Dungeon render and decode. Two renderers and two decoders of one vocabulary, one on each side of the boundary: split authority. - C: move the loop into the library as a table runner with Dungeon supplying prompt text and its own tools through a trait. Contradicts the operator's ownership ruling.
- A: a consumer-neutral table module in the library (
- Recommendation: A. It keeps one owner per vocabulary, is consumer-neutral (another consumer could run its own table on it), and leaves the loop, prompt, Dungeon tools and turn lifecycle in Dungeon as ruled. It is a fourth library piece the target did not list; the target's Ownership section should name it when this is ruled.
- Depends on it: Cut 7, Cut 8.
- Ruling: A, as recommended.
- Authority: operator.
- Ruled: 2026-09-22.
PA-Q13 How the player sees why an act was refused
- Asked: 2026-09-22, from Q11's ruling meeting gate item 3 ("does
something physical that a precondition refuses, and sees why"). A refused act
commits nothing, and the Projector renders committed state only, so the
narration cannot say why. The agent writes no narration. The play authority
cannot state a world truth as a canonical fact without an evidence receipt
(
FactStanding::Canonical { evidence }), and Q5 refuses it evidence. - Options:
- A: the surface shows the kernel's refusal of the player's own attempt,
rendered by
describe_refusal(Q12) from theActionRejectedmismatch set and the affordance's precondition list ("you are not at the cellar"). It is the world's verdict on the player's own act, derived from state, not a claim of world truth. Invariant 8's sentence "The agent's questions are the one thing shown that is not derived from state" still holds; the target should add that kernel refusals of the player's own act are shown. - B: the agent asks the player a question that carries the reason. Puts the agent's paraphrase of a kernel verdict in front of the player.
- C: a
Ruledfact standing for play-authority facts, so the agent can commit "the door is barred" and the Projector narrates it. New kernel vocabulary for one gate item.
- A: the surface shows the kernel's refusal of the player's own attempt,
rendered by
- Recommendation: A.
- Depends on it: Cut 7 (
describe_refusal), Cut 8 (refusalon the turn), Cut 9 (the line). - Ruling: A, as recommended.
- Authority: operator.
- Ruled: 2026-09-22.
PA-Q14 L1.f13 and the gate
- Asked: 2026-09-22 (target exception: in scope if it bites seeding on the gate path).
- Finding: it does not bite. L1.f13 orphans a refused seed row only when an
owner Draft commit lands between the refused round and the retry
(
seed_command_idhashes ancestry,elaboration.rs:1545-1551). The gate's seeding is the owner pressing Seed, onesweep(1)per request (runtime.rs:1786-1826); consecutive presses with no commit between them find the same row. Its cost when it does bite is a repeated inference and an orphan row, never a wrong commit. It stays deferred. - Ruling: finding.
- Authority: self-under-standing-go.
PA-Q15 What the play authority may assert and mint
- Asked: 2026-09-22, from PA.f7: the play authority could state no fact
of its own (a fact is
Canonicalwith an evidence receipt, orClaimedby a subject) and could mint no quantity (Admitrequires evidence), so the residue rule (anything untyped becomes a fact) had no standing for the agent's rulings. - Ruling: the play authority's facts stand as
Ruledby it, and the play authority mints quantity. The operator: "shackling the Ghostlight Dungeon agent to Njordr's invariants is crazy, if the agent can invent people, it can invent loot." OnlyPlaygains either. Elaborators, consumers and the seed keep the evidence gate, so a consumer feeding Njordr keeps quantity provenance. - Authority: operator.
- Ruled: 2026-09-22.
- Supersedes: PA-Q5's
PlayCarriesEvidencerefusal ("so it cannot mint quantity") and PA.f7. Cut 3 is respecified to match. - Depends on it: Cut 3.
Order, and why
Subtraction first, then library, then Dungeon's table. The automatic cover
tick and the elaboration sweep are writers the play agent must not share the
world with: a cover tick makes Personas act outside any turn, and an Active
elaborator declares structure the agent did not rule. They are forbidden
writers under the target, so they go before the owner that replaces them exists
(Loud Rebuild: cut obsolete authorities first). world.speak and the story card
stay until Cut 9 replaces them, because between the cuts they are the only way
to use the world.
| Cut | Kind | Repo | Depends on |
|---|---|---|---|
| 0 | captures | Ghostlight | rulings |
| 1 | subtraction | Dungeon | 0 |
| 2 | behaviour | library (inference) | PA-Q1 |
| 3 | behaviour | library (kernel: play authority, schema v6) | PA-Q5 |
| 4 | behaviour | library (kernel: retire) | 3, PA-Q6 |
| 5 | behaviour | library (kernel: grant/revoke affordance) | 4, PA-Q10 |
| 6 | behaviour | library (Persona lane, recency marker) | PA-Q2, PA-Q3 |
| 7 | behaviour | library (table vocabulary) | 2, 5, 6, PA-Q12, PA-Q13 |
| 8 | behaviour | Dungeon (play table and turn lifecycle) | 1, 7, PA-Q7, PA-Q8 |
| 9 | behaviour + subtraction | Dungeon (Eve play surface; speak and story deleted) | 8, PA-Q9 |
Cuts 3–5 may land as one commit if Hands prefers one schema bump; the map splits them so each has its own promises. Cut 2 and Cut 6 are independent of 3–5 and may land in either order.
Cut 0. Captures
- Repo/branch: Ghostlight
codex/ghostlight-dungeon-mvpat the map's commit. No commit; output in the session scratchpad. - First:
git statusclean. - Captures:
- test census with
-- --listfor-p ghostlight --lib,--doc,--test external_admission,-p ghostlight-dungeon --bin ghostlight-dungeon,--test build_provenance,-p ghostlight-persona-projection; per-module tally as the stock-lenses map did; base-stimulus.txt: from a temporary test beside the narrative lane's leak tests, the renderedvisible_stimulusfor a subject with oneToldrow, oneSeenrow and one held fact. Cut 6 pins that the new text equals this plus exactly one"new"field per row;base-catalog.txt:patch_tool_signatures()andsha256(serde_json::to_vec(&patch_tools())). Cuts 4 and 5 change it by exactly the added tools;- distinct warnings from a forced rebuild of both crates;
- repo
targetsize.
- test census with
Cut 1. Delete the autonomous drivers and owner controls from Dungeon
- Repo/branch: Ghostlight
codex/ghostlight-dungeon-mvpfrom the map's commit. One commit; builds alone. Library untouched. - Deletes first (
crates/ghostlight-dungeon/src/runtime.rsunless noted; line counts approximate, measured at landing):- the tick driver:
CoverSummary,InterruptedCell,cover_panel,impl CoverSummary(:104-154, ~50);CLOCK_TICK_INTERVAL,CLOCK_TICK_MINUTES,submit_clock_tick(:1747-1770, ~24);configured_cover_budget,configured_tick_interval(:1864-1888,:1908-1922, ~40);drive_cover_tick,drive_one_tick,run_cover_tick(:1924-2125, ~200); the spawn at:408;AppState.cover,AppState.cover_budget(:89-95) and their construction; - the Active elaborator:
ELABORATION_SWEEP_INTERVAL,elaborate_world,run_elaboration_sweep(:1828-1862, ~35);configured_elaboration_ceiling(:1900-1906);AppState.elaboration_permits(:84-86); the spawn at:409; - the owner's "Let X act":
ControllerActPayload(:249-254),dispatch_controller(:1048-1195, ~148),admit_controller_command(:1197-1231),ControllerHttpResultandcontroller_narrative_result,controller_operational_result,controller_pending_result,controller_submission,controller_error_disposition(:1233-1427, ~195), the branch at:1000-1002; crates/ghostlight-dungeon/src/eve.rs:CoverPanel,CoverPanelTick,cover_card(:119-178, ~60), thecoverparameter ofauthenticated_surface(:242), the owner's controller buttons and descriptor (:483-560, ~78),"world.controller.act"inoperation_schema(:633);- tests that pin only deleted behaviour:
a_clock_tick_submits_the_configured_span_and_nothing_measured(:3106),the_tick_driver_never_exceeds_its_controller_permit_pool(:3317),saturating_one_pool_never_delays_the_other(:3353),a_speak_turn_and_a_sweep_draw_only_from_their_own_pools(:3522),the_elaboration_driver_survives_a_panicking_sweep(:3666),quarantine_raised_mid_tick_stops_the_sibling_cell_and_every_later_tick(:3750),a_second_mid_turn_change_reaches_the_drivers_interrupted_arm(:3914),drive_one_tick_runs_every_cell_before_the_clock_and_all_share_one_tick(:4028), the ignoredlive_smoke_seeds_then_ticks_a_world_against_the_connector(:4153), and every fixture only they use (Hands lists them from the compiler's dead-code warnings, not by name).eve.rstests naming cover are updated, not deleted.
- the tick driver:
- Keeps:
controller_permitsandconfigured_controller_concurrency(:1889-1898): Cut 8 draws Persona dispatch from this pool. Between Cut 1 and Cut 8 onlyruntime_readiness(:1712-1716) reads it; that interval is stated here so no one reads it as a leftover.ControllerRunnerstays for seeding andcustody_probe.world.speak, the story card andworld.advance_timestay until Cut 9. - Docs in the same commit:
docs/architecture/ghostlight-dungeon-mvp.md:477-484drops the cover, tick-interval and elaboration-ceiling variables;docs/architecture/ghostlight-world-ontology.md:676-677and the handoff line 311 lose the elaboration pool.gamecult-opssets none of these (grepped). - Authority map:
- Owner: after this cut, nothing in Dungeon runs a Persona, an operational agent or an elaborator on its own; the owner's world commands and seeding remain.
- Forbidden writers (deleted): the wall-clock
AdvanceTimeloop, cover cells, the Active elaboration sweep, owner-requested controller turns. - Derived state:
CoverSummaryis gone with the driver it summarised. - Deletion line: every path above.
- Rules losing their only test (Hands must list them in the report): pool separation (both pool tests) and quarantine-on-tick go with the pools and the tick they described; none survives in code.
- Verification:
- builds:
cargo check -p ghostlight-dungeon --bin ghostlight-dungeon; distinct warnings no larger than Cut 0's. - tests:
cargo test -p ghostlight-dungeon --bin ghostlight-dungeon; the census drops by exactly the listed tests;every_operation_the_panel_emits_has_a_schema(:4558) still passes withworld.controller.actgone. - negative:
rg -n 'derive_cover|drive_cover_tick|elaborate_world|run_elaboration_sweep|elaboration_permits|world\.controller\.act|submit_clock\(' crates/ghostlight-dungeon/src= 0 (submit_clock\(with the paren: the library method name must not match a doc word);rg -n 'GHOSTLIGHT_(COVER_|TICK_INTERVAL|ELABORATION_MAX)' crates docs/architecture/ghostlight-dungeon-mvp.md= 0. - mutation: M1.1 re-add
"world.controller.act" => "ghostlight.world_controller_act.v0"tooperation_schema:removed_legacy_operation_is_denied_before_dispatch(:3052) must be extended in this cut to nameworld.controller.act, and must then fail.
- builds:
- Promises:
- P1.1 No Dungeon code path submits
AdvanceTimeexcept the owner'sworld.advance_timecommand. - P1.2 No Dungeon code path runs
run_cell,run_narrative,run_operationalorElaborationRunner::sweep. - P1.3
world.controller.actis denied before dispatch. - P1.4 The library diff is empty.
- P1.1 No Dungeon code path submits
- Landed: —
Cut 2. The local inference port
- Repo/branch: Ghostlight
codex/ghostlight-dungeon-mvp. One commit. Written for PA-Q1 A. - Deletes first: none.
- Adds:
crates/ghostlight/Cargo.toml:reqwest.workspace = true.crates/ghostlight/src/local_inference.rs(~180 lines plus tests):pub struct LocalBinding { pub endpoint: SocketAddr, pub model_prefix: String, pub caller_runtime_id: String };pub const DEFAULT_LOCAL_MODEL_PREFIX: &str = "local/";struct LocalInferencePort { client, endpoint, prefix, caller_runtime_id }.preparecallsPreparedInference::prepare(the one builder).inferrefuses a foreign caller id and an expired invocation exactly as the SDK port does (sdk_inference.rs:680-690), lowers the request to onePOST /v1/chat/completions(model = name with the prefix stripped,messagesfrom instructions and input,toolswithstrict: true,parallel_tool_calls,max_tokens), and returns text and tool calls as events, inert. It holds no mutex across a request (several slots). Receipt:sha256overrmp_serde::to_vec_namedofLocalInferenceReceipt { schema_id, request_id, conversation_id, caller_runtime_id, native_request_sha256, provider_request_sha256, model, response_id, finish_reason, prompt_tokens, completion_tokens }, the SDK receipt's shape. Faults: connection refused and 429/503 →retryable; 4xx other →recovery_required; a response that is not the declared shape, a tool call naming no offered tool, or an invalid call id →integrity_violation.- Loopback rule:
open_inferencerefuses aLocalBindingwhose endpoint is not loopback (ControllerOpenError::LocalEndpointNotLoopback). No header other than content type is ever sent.
- Per-file changes:
sdk_inference.rs:715-773:RoutedInferencePortgains alocal: Option<(String, Arc<dyn InferencePort>)>slot;routechecks the local prefix first, then the SDK prefix, then the connector. A prefix claimed by two slots is refused at open.controllers.rs:2336-2376:open_inference(connector, sdk, local: Option<LocalBinding>, models: &[&str]);ControllerModels::each(:2294) becomespubso callers pass&models.each()plus the play model (Cut 8).lib.rs:116:pub use local_inference::{DEFAULT_LOCAL_MODEL_PREFIX, LocalBinding};andmod local_inference;.runtime.rs:440-478: readGHOSTLIGHT_LOCAL_ENDPOINTandGHOSTLIGHT_LOCAL_MODEL_PREFIX; no other Dungeon change in this cut.
- Authority map:
- Owner:
RoutedInferencePortstays the one router; the model name still carries the transport. - Forbidden writers: no port reads a credential; no lane chooses a port.
- Owner:
- Verification:
- builds:
cargo check -p ghostlight;cargo check -p ghostlight-dungeon --bin ghostlight-dungeon. - tests (
cargo test -p ghostlight --lib local_inference::), against a scripted HTTP responder on127.0.0.1:0(tokio listener in the test; no new dev-dependency):a_scripted_backend_drives_an_elaboration_round_through_the_existing_evaluatorpins invariant 7 (two rounds, calls inert,evaluate_elaboration_loopre-derives the conversation, the second request carries the first round's tool results);the_request_lowers_every_input_itempins the message mapping item by item;a_non_loopback_endpoint_is_refused_at_open;a_call_to_an_unoffered_tool_is_an_integrity_violation;routing_prefers_the_longest_claim_and_refuses_a_shared_prefix;no_request_carries_an_authorization_header(the responder asserts on the raw header block). - negative:
rg -n -i 'authorization|bearer|api[_-]?key' crates/ghostlight/src/local_inference.rs= 0 outside the test that asserts absence. - mutations: M2.1 drop the loopback check: the open test fails. M2.2
return
ToolCallevents only for the first call: the elaboration-round test fails on the second call. M2.3 map a 4xx toretryable: the fault test fails.
- builds:
- Promises:
- P2.1 A scripted local backend carries a full tool round through the existing evaluator with calls returned inert (invariant 7).
- P2.2 The port refuses non-loopback endpoints and sends no credential.
- P2.3 Each lane routes by its model name to exactly one port.
- Landed: —
Cut 3. The play authority (kernel), schema consumer.v6
- Repo/branch: Ghostlight
codex/ghostlight-dungeon-mvp. One commit. Written for PA-Q5's default. - Deletes first: none.
- Per-file changes:
lib.rs:467-484:SystemCapability::Play, doc: "The play table. Admitted for an unanswered, unconfined, evidence-free Active patch and for the clock; minted only byPlayPort."lib.rs:1703-1720and:4768-4780: add(Play, AdmitPatch)/(Play, PatchAdmitted)and(Play, AdvanceTime)/(Play, TimeAdvanced).lib.rs:1740-1764:require_answer(state, caller, answers, declares):(Active, None)withdeclaresisOkwhencaller == System(Play);Playin Draft isWrongPhase. Both call sites (:1663,:4791) pass the caller.lib.rsAdmitPatcharm (:1655-1685) and its twin: aPlaypatch with nonemptyevidenceisPatchRejected([Mismatch::PlayCarriesEvidence]);Mismatchgains the variant (patch.rs, besideLensWeightsNeverDraw).lib.rs:4284-4315:CallerId::System(SystemCapability::Play) => Ok(None).lib.rs:1725-1731:require_clock_calleradmitsPlay.mailbox.rs:pub struct PlayPortwithnew(WorldMailbox),pub async fn snapshot,pub async fn submit_patch(&self, CommandId, WorldPatch),pub async fn advance_time(&self, CommandId, TickMinutes), both throughsubmit_stampedwithCallerId::System(Play).lib.rs:94: export.lib.rs:172-173:consumer.v5 → consumer.v6;consumer.rspins updated as L1 did.
- Authority map:
- Owner: the kernel's admission functions;
PlayPortis the only minter. - Inputs: caller, phase, answer, patch.
- Outputs: an admitted patch or clock advance attributed
System(Play). - Forbidden writers: every other caller still meets
AnswerRequiredfor an unanswered Active declaration; no other port mintsPlay. - Deletion line: none; admission clauses only.
- Owner: the kernel's admission functions;
- Verification:
- builds: both crates.
- tests (library):
the_play_authority_declares_in_active_without_an_answer;an_elaborator_declaration_in_active_without_an_answer_is_still_refusedandthe_owner_still_cannot_declare_unanswered_in_active(invariant 5, both halves);the_play_authority_is_unconfined(a place outside every jurisdiction);the_play_authority_cannot_carry_evidence;the_play_authority_advances_time;the_play_authority_cannot_approve_activate_or_exercise(each body refusedUnauthorized);the_play_authority_is_refused_in_draft;apply_effect_re_decides_the_play_authority(a forgedPatchAdmittedunderClockis refused, theapply_effect_re_decides_elaborator_authoritypattern,lib.rs:15415); replay of aPlaycommit reproduces the state digest. - external:
tests/external_admission.rsgainsplay_port_is_the_only_play_minter(compile-pass use ofPlayPort) and keeps its refusals. - negative:
rg -n 'SystemCapability::Play' crates/ghostlight/src --glob '!*test*'lists onlylib.rsadmission sites andmailbox.rs's one method. - mutations: M3.1 in
require_answer, admit anySystem(_)caller instead ofPlay: the elaborator test fails. M3.2 drop the evidence refusal: its test fails. M3.3 admit(Play, ActivateWorld): the "cannot approve" test fails. M3.4 dropPlayfrom theapply_effecttwin: the replay test fails.
- Promises:
- P3.1
Playdeclares in Active unanswered and unconfined; no other caller does. - P3.2
Playcannot carry evidence, act in Draft, approve, activate, exercise or decline. - P3.3 Replay re-decides
Playadmission.
- P3.1
- Landed: —
Cut 4. Retirement (kernel)
- Repo/branch: Ghostlight
codex/ghostlight-dungeon-mvpfrom Cut 3. One commit (shares Cut 3'sv6). Written for PA-Q6's default. - Per-file changes:
lib.rs:700-760:ControllerAssignment::Retired;id,mode,consumer,human_principalreturnNone;expected_caller -> Option<CallerId>,NoneforRetiredandExternallyControlledkeepsSome(System(Consumer)); call sites:1613,:1631,:4866,:4897compareSome(&caller).patch.rs:1014:ComponentOp::Retire { subject: Ref<SubjectId> };patch.rs:1689:ResolvedOp::Retire { subject: SubjectId }; resolution besideRelocate(:3613): subject resolves, is not retired (NoOperationEffect), is not externally controlled (Mismatch::RetiresAMirror); lowering at:5093region.lib.rs:2115apply_operations: setRetired, removepositionsandaffordance_grantsentries.lib.rs:4411confine_to_ground: everyRetireunder any confined author isOutsideJurisdiction.lib.rs:966-1015:SubjectSnapshot.retired: bool(pub), set insnapshot.patch.rs:5600:PATCH_TOOLSgainsretire(Operate { variant: "retire" }, one fieldsubject); counts atpatch.rscatalog test go to(7, 31, 40); the sidecar fixture is regenerated (GHOSTLIGHT_WRITE_SIDECAR_FIXTURES=1).controllers.rs:77-78:controller_work.v16 → v17, because an in-flight elaboration or seed row stores the old tool list and would otherwise be refused at open with a less honest error (stock-lenses probe Q7).
- Authority map:
- Owner:
controller_assignmentsstays the sole answer to who may call;Retiredis a value of it, not a second partition. - Derived state: opportunities, audiences and presence are derived and read the assignment and position; none stores "retired" apart from it.
- Forbidden writers: elaborators and consumers.
- Owner:
- Verification:
- tests:
a_retired_subject_holds_no_opportunity_across_a_replay(invariant 6: retire, reopen the journal, assert no opportunity andretired);a_retired_subject_cannot_act(its last opportunity isOpportunityMismatch);a_retired_subject_hears_nothing(speech in its former place gives it no knowledge row);a_retired_subject_keeps_its_history(events and knowledge unchanged);retiring_twice_is_no_effect;a_mirror_cannot_be_retired;an_elaborator_cannot_retire_inside_its_jurisdiction;the_owner_and_the_play_authority_may_retire; the state-shape check accepts a world with a retired subject. - mutations: M4.1 leave the position in place: the "hears nothing" test
fails. M4.2 make
mode()return the old mode forRetired: the opportunity test fails. M4.3 drop the confinement clause: the elaborator test fails.
- tests:
- Promises:
- P4.1 A retired subject gets no opportunity, cannot be an actor, and is never an audience, and replay reproduces it (invariant 6).
- P4.2 Retirement erases no history.
- P4.3 Only the owner and
Playretire.
- Landed: —
Cut 5. Granting and revoking affordances (kernel)
- Repo/branch: from Cut 4. One commit. Written for PA-Q10 A; if B or C is ruled, this cut is rewritten.
- Per-file changes:
ComponentOp::GrantAffordance { subject, affordance: Ref<AffordanceId> }andRevokeAffordance; resolution refuses a retired or external subject, an unknown entry, a grant already held or a revoke not held (NoOperationEffect), and a revoke that leaves a subject with no grant (derive_opportunitiesrequires one,lib.rs:4142-4146); apply writesaffordance_grants;confine_to_groundrefuses both for every confined author.PATCH_TOOLSgainsgrant_affordance,revoke_affordance((7, 33, 42)), fixture regenerated. Samev6/v17as Cuts 3–4 if landed before either ships; otherwise its own bump. - Verification:
the_seed_grants_the_player_a_verb_in_draft;the_play_authority_grants_and_revokes_in_active(the scope digest moves, the old opportunity isScopeChanged);a_revoke_cannot_leave_a_subject_mute;an_elaborator_cannot_grant. Mutations: M5.1 allow the last revoke: its test fails. M5.2 drop the confinement clause: the elaborator test fails. - Promises: P5.1 Grants change only through owner, seed-in-Draft or
Play. P5.2 No subject with a controller is left with no grant. - Landed: —
Cut 6. The Persona lane and the recency marker (library)
- Repo/branch: Ghostlight
codex/ghostlight-dungeon-mvp. One commit. Written for PA-Q2's default and PA-Q3 A. - Deletes first: none. (Moves: the Projector-then-Persona request
building in
run_narrative:2818-2840andrun_projector:3530-3580becomes two private functions both paths call, so the prompts have one builder.) - Adds:
lib.rs:966:SubjectSnapshot.last_acted_at: Option<u64>(pub(crate)), filled insnapshotfrom one pass overstate.events.controllers.rs:4616-4638: each row gains"new": bool.controllers.rs:pub struct PersonaLane { mailbox: ControllerPort, inference: Arc<dyn InferencePort>, projector_model: String, persona_model: String },pub fn new(..)refusing non-canonical models;pub async fn turn(&self, command_id, &DecisionOpportunity) -> Result<PersonaTurn, ControllerError>(refuses any mode butNarrativePersona);pub async fn narrate(&self, command_id, &DecisionOpportunity) -> Result<String, ControllerError>(refuses any mode butHuman). Requests areprojector_request/persona_request(:5934,:5949) under the given command id. No work-store access; the type holds noControllerWorkStore.lib.rs:80-87: exportPersonaLane.
- Authority map:
- Owner: the library builds every Persona and Projector input from the
subject's own slice;
PersonaLanehas no parameter through which a caller can pass text into either prompt. - Forbidden writers: the caller (the play agent) of any Persona input.
- Owner: the library builds every Persona and Projector input from the
subject's own slice;
- Verification:
- tests:
a_persona_turn_carries_no_structured_state(the Persona request's only input item is prose; none of the subject's ids, the scope digest, the revision, or any key of the typed view appears; invariant 2);a_persona_turn_never_sees_a_secret_the_subject_does_not_hold(a fact another subject holds is absent from both requests);the_marker_flags_rows_since_the_last_act(act, then hear two lines: those two arenew, earlier rows are not);a_subject_that_never_acted_sees_every_row_new;narrate_refuses_a_persona_and_turn_refuses_a_human; the stimulus equals Cut 0's capture plus the marker; the existing narrative-lane tests pass unchanged except where they pin stimulus bytes. - negative:
rg -n 'ControllerWorkStore|persist'over thePersonaLaneimpl block = 0. - mutations: M6.1 pass
typed_viewinto the Persona prompt: the no-structured-state test fails. M6.2 computenewwith>=: the marker test fails on the subject's own spoken row. M6.3 takelast_acted_atfromlast_opportunity_at(minutes): the marker test fails.
- tests:
- Promises:
- P6.1 A Persona's input is Projector prose; the Projector's input is the subject's own slice (invariant 2).
- P6.2 The marker is derived from the journal's events and stores nothing.
- P6.3 The player's narration is the same Projector over the player's slice (Q11).
- Landed: —
Cut 7. The table vocabulary and the inference seams (library)
- Repo/branch: from Cuts 2, 5 and 6. One commit. Written for PA-Q12 A and PA-Q13 A.
- Keeps and moves:
render_world_structureandid_text(elaboration.rs:2164-2280) move totable.rs; the seed prompt calls them there. - Adds:
crates/ghostlight/src/table.rswith the functions named in PA-Q12 A.table_viewextends the moved renderer with each subject's place, mode,retired, granted entry names, and the places' occupants, and ends with the clock and the brief.decode_authoring_callisapply_tool_call's decode arm (elaboration.rs:1339-1420) called for one call, so there is one decoder:apply_tool_callcalls it.decode_actor_callisdecode_catalog_call(controllers.rs:6279-6360) plus a verbatim optionaldisplay, and looks the subject's current opportunity up in the snapshot.describe_refusalrendersActionRejectedmismatches through the entry's preconditions and every otherKernelErrorby itsDisplay.controllers.rs:99-112:InferencePurpose::Play;pub fn InferenceRequest::play(command_id, round, model, instructions, input, tools, max_output_tokens)overtool_requestwith parallel calls on;InferenceOutput::events()andreceipt_digest(). - Authority map:
- Owner: the library owns the only renderer and the only decoders of its vocabulary; Dungeon composes them.
- Forbidden writers: Dungeon code building a
ComponentOp,DeclarationorDecisionInvocationby hand.
- Verification:
- tests:
authoring_tools_refuse_an_unknown_name;every_authoring_tool_decodes_its_own_example(reusesfield_example);the_elaborator_and_the_table_share_one_decoder(the same arguments give the same operation through both);an_actor_tool_decodes_to_the_subjects_current_opportunity;describe_refusal_names_the_failed_precondition;table_view_prints_every_id_the_tools_take. - negative: in
crates/ghostlight-dungeon/src,rg -n 'ComponentOp|Declaration|RoleBinding|ProposedEffect'= 0 after Cut 8. - mutations: M7.1 give
decode_actor_callthe snapshot's first opportunity instead of the subject's: its test fails. M7.2 letauthoring_toolsskip unknown names: its test fails.
- tests:
- Promises: P7.1 One renderer and one decoder per vocabulary. P7.2 Dungeon can run an inference and read its output without widening any kernel type.
- Landed: —
Cut 8. The play table and the turn lifecycle (Dungeon)
- Repo/branch: from Cuts 1 and 7. Two commits allowed: (a) the store and
the loop with scripted-port tests; (b) wiring into
AppStateandworld.play. Written for PA-Q7 B and PA-Q8's default. - Deletes first: none beyond Cut 1.
- Adds:
crates/ghostlight-dungeon/src/play.rs(~600 lines plus tests):PlayTurnStoreoverservice/play-turn-v1.cc, theapp_session.rs:56-80pattern; one row,PlayTurnas in PA-Q8.const PLAY_TOOLS: &[&str](PA-Q7 B), pinned ⊆PATCH_TOOLS.PlayTable { play: PlayPort, world: WorldMailbox, personas: PersonaLane, inference, model, permits: Arc<Semaphore>, store }withasync fn run(&self, principal: &VerifiedPrincipalEvidence, text: String). Per round: re-derive the conversation,InferenceRequest::play, infer, persist the output, then execute each call in order:- an authoring tool →
decode_authoring_call→ persist →PlayPort::submit_patch; <handle>__<kind>→ the handle must be the player or a subject dispatched this turn, else refused;decode_actor_call;textanddisplaymustSourceSpan::locatein that actor's prose (the player's texts, or the Persona's turn), else refused; persist the body; submit (submit_principalfor the player,ControllerPort::submit_controllerfor a Persona); onActionRejectedfor the player, setrefusalfromdescribe_refusal;dispatch { subjects }→ for each subject with aNarrativePersonaopportunity,PersonaLane::turnconcurrently underpermits; results are the prose, recorded;advance_time { minutes }→PlayPort::advance_time;ask_player { question }→AwaitingPlayer, loop stops;end_turn→ loop stops. Round budget 12; exhausting it ends the turn. On close,PersonaLane::narratefor the player writesnarration, and the turn isClosed.
- an authoring tool →
- The prompt (instructions) is a Dungeon constant stating the table rules: speech and display are quotes; an actor acts only through its own tools; rulings are authoring tools; ask when an outcome needs negotiating.
- Per-file changes:
runtime.rs:68-103AppState.play: Option<Arc<PlayTable>>plus aMutexguarding one running turn;open_controller(:440-479) readsGHOSTLIGHT_PLAY_MODELand passes it toopen_inference's model list;execute_world(:1439) routesworld.playto the table in a spawned task and returnsaccepted;eve.rs:622-636adds"world.play" => "ghostlight.world_play.v0". - Authority map:
- Owner:
PlayTableowns the turn; the kernel owns every consequence. - Inputs: world snapshot, the turn record, the player's text.
- Outputs: kernel commands (as the actor or as
Play), the turn record. - Derived state: the agent's conversation (from the record);
narration(from the Projector over committed state). - Forbidden writers: nothing but
PlayTableconstructsPlayPort; no transcript crosses turns; the agent never writes a Persona input. - Shared paths: a first run, a resumed run after restart, and a run resumed by the player's answer all execute the same round function over the same record.
- Deletion line: none new.
- Owner:
- Verification (scripted
InferencePortin tests, no model):restart_equivalence_of_the_agent_input(invariant 1: close a turn, drop and reopen the store and the world, start the next turn; the first request is byte-identical to the one built without the restart);a_paraphrased_quote_is_refused(invariant 4, for the player and a Persona; the forgery differs by one word, same length);an_act_for_an_undispatched_subject_is_refusedanda_raw_op_is_journaled_as_play_and_never_as_an_actor(invariant 3: the commit's caller isSystem(Play));a_resumed_call_resubmits_its_recorded_body(kill after persist, before result:AlreadyApplied, one commit);a_question_holds_the_turn_open_across_a_restart;a_refused_player_act_sets_the_refusal_line;the_turn_closes_with_the_players_narration;- negative:
rg -n 'PlayPort::new' crates/ghostlight-dungeon/src= 1. - mutations: M8.1 skip the span check for Personas: the quote test fails.
M8.2 rebuild
opening_prompton resume: the question-across-restart test fails on a moved snapshot. M8.3 rebuild the body from a fresh snapshot on resume: the resume test fails (CommandIdConflict).
- Promises: P8.1–P8.4 invariants 1, 3, 4 and restart survival as pinned
above; P8.5 Persona dispatch draws only from
controller_permits. - Landed: —
Cut 9. The Eve play surface; world.speak and the story card deleted
- Repo/branch: from Cut 8. One commit. Written for PA-Q9's default.
- Deletes first:
SpeakPayload(runtime.rs:225-231), theworld.speakarm (:1520-1538),eve.rs:436-455(story card) and:457-501(speak control),"world.speak"inoperation_schema(:632),current_operator_view's log read for the surface (runtime.rs:1630-1640;operator_logstays in the library),speak_throughand tests that drive speech through Eve (the HTTP journey test is rewritten toworld.play). - Adds: in
eve.rsActive arm, the play card as PA-Q9 describes, read from the store's row and the snapshot;surface_versionalso moves when the turn row changes (the row's own counter), so the SSE path wakes the client. - Verification:
the_play_surface_shows_only_the_projection(no speech the player did not perceive appears: a Persona speaks elsewhere, the surface omits it);every_operation_the_panel_emits_has_a_schema; negativerg -n 'world\.speak|operator_log' crates/ghostlight-dungeon/src= 0; mutation M9.1 render the operator log into the card: the projection test fails. - Operator (the gate, on Raven's machine, local lanes only): create; seed; approve and activate; play the five items; restart mid-session; record seconds per turn and the narration call's share of it.
- Promises: P9.1 Nothing shown is world truth unless committed, except the question and the refusal of the player's own act (invariant 8 with Q13 A).
- Landed: —
Subtraction ledger
Estimates; Actual is filled from each landing diff.
| Cut | Removed (est.) | Added (est.) | Dependencies, formats, targets | Actual |
|---|---|---|---|---|
| 1 | Dungeon ~800 source, ~1,100 test, eve ~150 | ~10 | env vars −6 | |
| 2 | 0 | library ~250 | library +reqwest; routing slot +1 |
|
| 3 | 0 | library ~120 + tests | consumer.v5 → v6 |
|
| 4 | 0 | library ~150 + tests | PATCH_TOOLS 39 → 40; controller_work.v16 → v17; fixture |
|
| 5 | 0 | library ~120 + tests | PATCH_TOOLS → 42; fixture |
|
| 6 | ~40 moved | library ~120 + tests | none | |
| 7 | ~120 moved | library ~300 + tests | InferencePurpose +1 |
|
| 8 | 0 | Dungeon ~600 + tests | store play-turn-v1.cc; env +1 |
|
| 9 | Dungeon ~150 | Dungeon ~120 | Eve op world.speak → world.play |
What Dungeon stops using, and whether it is deleted from Dungeon:
| Surface | Other consumer in Dungeon | Fate |
|---|---|---|
owner-only "Let X act", world.controller.act |
none | deleted (Cut 1) |
| cover tick dispatch and the wall-clock tick | none | deleted (Cut 1) |
| Active elaboration sweep and its pool | none | deleted (Cut 1) |
| Interpreter pass | only through run_narrative/run_cell, both unreached |
unreferenced after Cut 1; library keeps it |
per-subject action catalogs (run_operational) |
none | unreferenced after Cut 1; library exposes the catalog again through table.rs |
world.speak, story card |
none after Cut 9 | deleted (Cut 9) |
ControllerRunner |
seeding, readiness custody_probe |
kept |
interpreter/operational_agent model env |
ControllerRunner::open requires all five |
kept; follow-up PA.f5 |
The library keeps cover, grouped cells, the controller runner, the Interpreter, the elaborator sweep and lenses.
Findings
- PA.f1 (pre-existing, operator, recorded):
state/map.yamlsays every backend shares "one standardized CultNet connector API"; the Body has one in-process trait and a private sidecar pipe. Resolved at5ff1d54(Self): the target's premise and the map's sentence were both corrected there, and the map now records the shared API as operator direction with what is true today. A CultNet connector for credentialed third-party endpoints remains the deployment gate's item. - PA.f2 (new, medium, recorded): strict tool-argument enforcement on llama-server depends on its build and flags; an argument that fails decode is a tool-result string, never a commit, but a model that loops on it burns rounds. Measure on Raven's machine at the gate.
- PA.f3 (new, medium, recorded): the play lane on the SDK sidecar. The SDK
port runs a tool query inside the sidecar and asks a synchronous oracle, and
holds one mutex per query, so a play tool that commits or dispatches (async,
and a Persona dispatch is two more inferences through the same port) cannot
run inside it. A lent oracle with
remaining_rounds() = 1answering a fixed placeholder might make the SDK return one round inert; it is unproven and off the gate's path (every play lane is local). Projector and Persona are prose-only and need no oracle, so they fall back to the SDK as they are. - PA.f4 (introduced by design, low, recorded): a retired subject's commitments, pressures and dependency edges stay, and the clock keeps deriving motion over them.
- PA.f5 (pre-existing, low, recorded):
ControllerRunner::openrequires all five models, so Dungeon keeps configuring the Interpreter and operational lanes it no longer runs. - PA.f6 (pre-existing, low, recorded): the Projector's stimulus is every row the subject has ever held; it grows without bound over a long session. The recency marker does not bound it.
- PA.f7 (pre-existing, superseded by PA-Q15's ruling): the play authority cannot create quantity (no evidence) and cannot state a canonical fact; the agent rules with structure and claimed facts only. Enough for the gate; a table that hands out coin needs a ruling on quantity provenance.
- PA.f8 (pre-existing, info):
PreparedInference::prepare's doc says consumers may implement ports outside the crate; probe B shows they cannot read the request. Cut 2 removes the need for one; the comment is corrected in Cut 2.