89 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. Rulings recorded at 37be2ce (PA-Q1, Q3, Q7, Q10, Q12, Q13
accepted; PA-Q15 new) were folded in the same day: PA-Q5, PA-Q7, PA-Q10,
PA-Q12, PA-Q13, Cuts 3, 4, 5 and 7, the ledger and the findings were revised,
and superseded text is kept only under History.
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. This core was measured before PA-Q15 replacedadmitwithmint; the ruled starting list is under PA-Q7. 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);require_clock_calleradmitsPlay;Play, and no other caller, may declare aRuledfact andMintquantity (PA-Q15, ruled; shape under PA-Q15 "Design").Playcarries no evidence receipts, so itsAdmitis refused by the existing gate like anyone's without a receipt; it usesMintinstead.
- History (superseded by PA-Q15): this default first refused any
Playpatch carrying evidence (PlayCarriesEvidence), so thatPlaycould not mint quantity. The operator ruled the opposite. - "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. - Revised by PA-Q15 (the starting list Cut 8 pins):
admitleaves the list, becausePlayholds no receipts and everyAdmitit wrote would be refused;minttakes its place.declare_factstays, and itsstandingnow offersruled.witnessandacquire_knowledge(Witnessed) stay, because they are how a ruled fact reaches a subject and so the Projector. The list:relocate, transfer, consume, mint, bind, release, communicate, witness, acquire_knowledge, forget, create_commitment, discharge_commitment, advance_pressure, reduce_pressure, open_route, close_route, declare_place, declare_route, declare_resource, declare_fact, declare_subject, set_persona_material, retire, grant_affordance, revoke_affordance(25 tools). Its size is re-measured from the fixture after Cut 5. - 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. - Design (ruled A):
ComponentOp::GrantAffordance { subject, affordance }andRevokeAffordancewriteaffordance_grantsfor an existing subject and an existing catalog entry. The owner (including the seed lane, which is the owner in Draft) andPlaymay use them. Confined authors are refused, because a grant is authority, not structure. The seed grants the player the world's verbs in Draft, and the agent grants or takes verbs in play (bound hands). Cut 5 specifies it. - History (not taken): 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, which violates invariant 3. - 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). -
Design (ruled A): a consumer-neutral table module in the library,
crates/ghostlight/src/table.rs. It holds 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. It grows fromrender_world_structure, which moves here and which the seed lane then calls here. It must print every id an authoring tool takes, which today's renderer does not: resources are printed by label only (elaboration.rs:2257-2263) and facts not at all.table_viewprints resource ids and holdings, and every fact with its id, its standing (canonical | claimed by X | ruled) and who knows it.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, and the one decoderapply_tool_callitself then calls.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.- Two inference seams:
pub fn InferenceRequest::play(..), which wrapstool_requestunder a newInferencePurpose::Play, andpub fn InferenceOutput::events(&self)/receipt_digest(&self).
It is a fourth library piece the target's first draft did not list. Cut 7 specifies it.
-
History (not taken): B, widen
pub(crate)topuband let Dungeon render and decode. That gives one vocabulary two renderers and two decoders, one on each side of the boundary, which is split authority. C, move the loop into the library as a table runner, which contradicts the operator's ownership ruling. -
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. (When this was
asked, the play authority could not state a world truth at all. PA-Q15 has
since given it
Ruledfacts, which is option C's vocabulary; see "After PA-Q15" below.) - 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.
- After PA-Q15: A stands, and it remains the only way the gate's "sees
why" is guaranteed: the kernel's refusal is shown whatever the agent does.
The agent may also rule a consequence. For example, it declares a
Ruledfact, "the cellar door is barred from inside", andwitnesses it at the player's place. That fact is committed, so the next narration renders it as world truth. It is an agent choice, not a Dungeon rule, and it adds nothing to this cut map beyond Cut 3. - 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.
- Body facts the design rests on (read at
5ff1d54):- The evidence gate is structural in the types, not a caller check.
FactStandingisCanonical { evidence }orClaimed { by }(patch.rs:298-303), withFactStandingRefas its proposal twin (:308-311).ComponentOp::AdmitandResolvedOp::Admitcarry a requiredevidence: EvidenceRef(patch.rs:1055-1060,:1721-1726). The resolver refuses a canonical fact or anAdmitwhose receipt is not in the same patch'sevidencelist (FactWithoutEvidence,:3046-3052;AdmitWithoutEvidence,:3938-3944). Apply re-checks both (lib.rs:2044-2060,:2373-2390), and so does replay's shape check (journal.rs:580-590). - The resolver is actor-blind.
resolve_patch(state, command_id, patch, scale_intent, lens_weights)(patch.rs:2947-2953) is never told the caller. Every per-author rule runs after it, inreduce, and is re-decided inapply_effect:require_patch_authorandconfine_to_ground(lib.rs:1655-1685,:4786-4802). - The quantity ledger has one owner:
check_ledger(patch.rs:1877-1891) creditsadmitted, andapply_operationsrecomputes the deltas (lib.rs:2124-2150). FactCandidate(patch.rs:2111) is the resolver's view of a fact's standing. Its only standing-dependent rule is "evidenced knowledge is knowledge of canon" (:4288-4296), which apply repeats (lib.rs:2638-2646).- Subjects never see standing in prose. The snapshot lowers standing to
FactStandingView { Canonical, Claimed { by } }(lib.rs:1056-1059, written at:3660-3663). The Projector's stimulus rendershow(said | seen_doing | known, fromKnowledgeSource), certainty and text, never standing (controllers.rs:4616-4638). Only the typed views (Interpreter, operational) print it (controllers.rs:4675-4695).
- The evidence gate is structural in the types, not a caller check.
- Design (for Cut 3): two additive variants plus one author rule.
Admitis not reshaped.- Facts:
FactStanding::RuledandFactStandingRef::Ruled, both unit variants. There is exactly one play authority and the journal's commit records its caller, so a field naming the ruler would be a second copy of the caller that could disagree with it. Lowering mapsFactStandingRef::Ruled → FactStanding::Ruled(patch.rs:4965-4972), andFactCandidategainsRuled(:2111,:3184,:3340). Canonical stays the only standing that evidenced knowledge may name, so aRuledfact can be knownWitnessedbut neverEvidenced. - Quantity: a new
ComponentOp::Mint { holder, resource, qty }andResolvedOp::Mint. It resolves likeAdmitwithout the receipt clause: holder and resource must resolve andqtymust be nonzero. It credits the ledger asadmitted(the ledger has no "minted" term to add; the equationbefore + admitted + gained - consumed - spent = afteris unchanged), andoperation_groundtreats it likeAdmit(lib.rs:4604-4606). - One author rule:
require_ruler(caller, &ResolvedPatch) -> Result<(), Vec<Mismatch>>collects everyRuledfact and everyMintop and refuses them withMismatch::RuledWithoutAuthority { site }unlesscaller == System(Play). It is called inreduce'sAdmitPatcharm afterresolve_patch, besideconfine_to_ground, and re-decided inapply_effect'sPatchAdmittedarm as anInvarianterror, like confinement. - Why this shape keeps the gate for everyone else:
CanonicalandAdmitkeep their required receipts in the type, so every other author's evidence gate is exactly as it is today: the same predicate, at the same three sites, still reached for every author includingPlay. WhatPlaygains is two new spellings that onlyrequire_rulercan admit. Neither existing check becomes "evidence or else". - Subjects: the snapshot maps
FactStanding::RuledtoFactStandingView::Canonical(lib.rs:3660-3663). A ruled fact is world truth inside the fiction. Which door admitted it is non-fictional provenance, just as a receipt is (lib.rs:1036-1039), so no subject-facing surface distinguishes it. The Projector needs no change: a subject told or shown a ruled fact renders itknownwith certainty.
- Facts:
- Option not taken: turning
Admit.evidenceinto an enum orOption(Evidence(EvidenceRef) | Ruled). That changes the wire shape of a consumer'sAdmit(consumer.rs:547-552,ghostlight.consumer_patch.v0) and theadmittool schema. It also moves the evidence gate out of the type and into a caller check, so every author's gate would depend on one condition that stays right.
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, Ruled facts, Mint; schema v6, work rows v17) |
PA-Q5, PA-Q15 |
| 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, except exactly one hit forworld\.controller\.act: M1.1's required test. The paren insubmit_clock\(keeps the library method name from matching a doc word. Corrected after Soul, 2026-09-22 (PA.f11 replaces this grep with a source-scan test).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:
d69e9d4(Hands, 2026-09-22). −2184 net lines; the Dungeon bin census went 56 → 46 (ten tests, one more than listed:no_proposal_projection_carries_the_canonical_world_committested the deletedcontroller_submission).controller_quarantinedwent too, because its only writers were deleted. Its readiness arm and seed-gate filter went with it. The negative grep'sworld\.controller\.actterm conflicts with M1.1's required test, so it holds with exactly one hit, at that test. M1.1 failed under mutation. Distinct warnings: 19 before, 19 after. -
Verdicts (Soul, 2026-09-22, against
d69e9d4, Windows):Promise Verdict Note P1.1 HOLDS By grep and inspection; unguarded: a startup submit_clockloop passed 46/46 (PA.f11)P1.2 HOLDS By grep and inspection; unguarded: a seed-spawned sweeppassed 46/46 (PA.f11)P1.3 HOLDS M1.1 caught at runtime.rs:2226P1.4 HOLDS Library diff empty The negative grep's
world\.controller\.actterm is corrected to exclude the test module. It must hit only the M1.1 test (removed_legacy_operation_is_denied_before_dispatch). -
Soul findings, triaged: PA.f11 and PA.f12 are fix; PA.f13 and PA.f14 are assigned to Cut 8; PA.f15 is fix.
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:
182f803(Hands, Sonnet, 2026-09-22).- Lines: +985 / −34.
local_inference.rsis 860 lines, the scripted HTTP responder and its tests included, against an estimate of ~180 plus tests. - Lib census: 466 → 473 (472 pass, 1 ignored). A seventh test pins M2.3's fault dispositions, which the list of six did not cover.
- The lock gained one line;
reqwest 0.12.28was already resolved with the same features. - Hands caught its own draft falling back to the connector on a claimed but
unconfigured prefix. The existing
soul_routing_refuses_rather_than_falling_backtest andan_unroutable_model_fails_at_opencaught it.
- Lines: +985 / −34.
- Verdicts: pending Soul.
Cut 3. The play authority, Ruled facts and Mint (kernel), schema consumer.v6
- Repo/branch: Ghostlight
codex/ghostlight-dungeon-mvp. One commit. Written for PA-Q5's default and PA-Q15's ruling and design. The state, commit and tool-catalog changes land together because they are one bump: a schema bump without its shape change would be a lie, and so would a shape change without one. - First: Cut 0's captures.
git statusclean. - Deletes first: none. Everything here is an admission clause or an additive variant.
- Per-file changes (line numbers against
5ff1d54):- The capability.
lib.rs:467-484:SystemCapability::Play, with the doc "The play table. Admitted for unanswered, unconfined Active patches, the only author ofRuledfacts andMint, and for the clock. Minted only byPlayPort." lib.rs:1703-1720and:4768-4780: admit(Play, AdmitPatch)/(Play, PatchAdmitted)and(Play, AdvanceTime)/(Play, TimeAdvanced), and nothing else.lib.rs:1740-1764:require_answer(state, caller, answers, declares).(Active, None)withdeclaresisOkexactly whencaller == System(Play).Playin Draft isWrongPhase. Both call sites (:1663,:4791) pass the caller.lib.rs:4284-4315:CallerId::System(SystemCapability::Play) => Ok(None)(unconfined).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)andpub async fn advance_time(&self, CommandId, TickMinutes), both throughsubmit_stamped(:267) underCallerId::System(Play).lib.rs:94: exportPlayPort.- Ruled facts.
patch.rs:298-303:FactStanding::Ruled, doc "Stated by the play table. The kernel does not evaluate it; onlyPlaymay write it."patch.rs:308-311:FactStandingRef::Ruled.patch.rs:2111:FactCandidate::Ruled, set at:3184and:3340. The evidenced-knowledge clause at:4288-4296is untouched: it compares againstCanonical, so a ruled fact still cannot be knownEvidenced.patch.rs:4965-4972lowersRuled → Ruled.patch.rs:3046-3052is untouched (anif letonCanonical). lib.rs:2044-2060(apply's fact check): theRuledarm isfalse, which is not a stranger.journal.rs:580-590(verify_state_shape): aRuledstanding is live.lib.rs:4500-4515(confine_to_ground, facts):Ruledunder any confined author isOutsideJurisdiction. This is redundant withrequire_rulerand exists only so the match stays total.lib.rs:3660-3663:FactStanding::Ruled => FactStandingView::Canonical.lib.rs:2638-2646is untouched.- Mint.
patch.rs:1014-1188:ComponentOp::Mint { holder: Ref<SubjectId>, resource: Ref<EntityId>, qty: Quantity }, doc "Creates quantity with no receipt. OnlyPlaymay write it; every other author creates quantity throughAdmitand its evidence."patch.rs:1689-1780:ResolvedOp::Mint { holder, resource, qty }. Resolution besideAdmit(:3913-3960): the same holder and resource resolution, theZeroQuantityandQuantityOverflowchecks, the samecandidate_setandadmitteddelta, and no receipt clause. Lowering beside:5138-5148.lib.rs:2124-2150: Mint creditsadmitted.lib.rs:2178: Mint's referent is its resource.lib.rs:2373-2390: apply Mint like Admit without theevidence.containscheck.lib.rs:4604-4606:operation_groundtreats Mint like Admit.patch.rs:6922:"mint". - The author rule.
lib.rs, besideconfine_to_ground(:4411):fn require_ruler(caller: &CallerId, resolved: &ResolvedPatch) -> Result<(), Vec<Mismatch>>. It returnsOkwhen the caller isSystem(Play). Otherwise it returns oneMismatch::RuledWithoutAuthority { site }perRuledfact (Site::Declaration(handle)) and perMint(Site::Operation(index)), andOkif there are none. Called inreduce'sAdmitPatcharm (:1655-1685) right afterresolve_patchand before confinement, mapped toPatchRejected. Re-decided inapply_effect'sPatchAdmittedarm (:4786-4802), mapped toKernelError::Invariant("admitted patch rules or mints without the play authority").patch.rs:1285:Mismatch::RuledWithoutAuthority { site: Site }. - Catalog.
patch.rs:5799region:PATCH_TOOLSgainsmint(Operate { variant: "mint" }, fieldsholder,resource,qty, the same field kinds asadmitwithoutevidence). Its description says only the play table may mint.patch.rs:6270-6282: theFactStandingRefcomposite gains("ruled", vec![]), anddeclare_fact's description says only the play table may rule. The catalog test (patch.rs:6837) goes to(7, 31, 40).assert_exhaustiveand the round-trip test cover the new variants. The sidecar fixture is regenerated (GHOSTLIGHT_WRITE_SIDECAR_FIXTURES=1,sdk_inference.rs:1898). - Row version.
controllers.rs:77-78:controller_work.v16 → v17. An in-flight elaboration or seed row stores its tool list, and this cut is the first to change that list (stock-lenses probe Q7). The bump moved here from Cut 4. Cuts 4 and 5 ride thisv17if they land before av17store exists anywhere; otherwise each bumps again. - Schema.
lib.rs:172-173:consumer.v5 → consumer.v6.consumer.rs:2237and the length pin are updated as in L1.CONSUMER_PATCH_SCHEMAstaysghostlight.consumer_patch.v0. A consumer can now decodeMintandruled, but admission refuses both for it, so nothing a consumer could have sent before changes meaning.
- The capability.
- Authority map:
- Owner: the kernel's admission functions.
PlayPortis the only minter ofSystem(Play).require_ruleris the only admitter of aRuledfact or aMint. - Inputs: caller, phase, answer, the resolved patch.
- Outputs: patches and clock advances attributed
System(Play),Ruledfacts and minted quantity. Every one is journaled with the caller, which is the provenance. - Derived state:
FactStandingView::Canonicalfor a ruled fact is display only. It decides nothing, and the kernel readsFactStandingitself. - Forbidden writers: the owner, the seed lane (which is the owner in Draft),
elaborators and consumers may not write
RuledorMint. They keepCanonical { evidence }andAdmit { evidence }with the receipt check exactly as it is. Every caller exceptPlaystill meetsAnswerRequiredfor an unanswered Active declaration. - Shared paths:
reduceandapply_effect(and replay through it) call the samerequire_ruler. The resolver stays actor-blind. - Deletion line: none. PA-Q5's
PlayCarriesEvidencewas never built.
- Owner: the kernel's admission functions.
- Verification (Windows; proves Windows only):
- builds:
cargo check -p ghostlight;cargo check -p ghostlight-dungeon --bin ghostlight-dungeon; distinct warnings compared with Cut 0. - tests (library), each pinning one rule:
the_play_authority_declares_in_active_without_an_answer;an_elaborator_declaration_in_active_without_an_answer_is_still_refused;the_owner_still_cannot_declare_unanswered_in_active(invariant 5, both halves);the_play_authority_is_unconfined(a place outside every jurisdiction);the_play_authority_is_refused_in_draft;the_play_authority_advances_time;the_play_authority_cannot_approve_activate_exercise_or_decline(eachUnauthorized);the_play_authority_rules_a_fact_and_a_witness_knows_it_as_canon: aRuledfact, witnessed at a place, appears in the subject's snapshot asFactStandingView::Canonical, and in its Projector stimulus asknownwith no author;the_play_authority_mints_and_the_ledger_balances:before + qty = after, andcheck_ledgerpasses on replay;no_one_else_may_rule_a_fact, table-driven over the owner in Draft (the seed's caller), the owner in Active, an elaborator with a valid answer, and a consumer on its own mirror. Each is refused withRuledWithoutAuthority, carrying the fact's declaration site;no_one_else_may_mint, the same four callers, refused withRuledWithoutAuthorityat the op's index;the_evidence_gate_is_unchanged_for_every_author: for the same four callers and forPlay, aCanonicalfact orAdmitwhose receipt is not inevidenceis stillFactWithoutEvidence/AdmitWithoutEvidence, and with the receipt inevidenceis admitted for the owner in Draft and for an answered elaborator, as today;a_ruled_fact_cannot_be_known_evidenced(EvidencedKnowledgeOfClaim);apply_effect_re_decides_the_ruler: a forgedPatchAdmittedunder an elaborator caller, carrying aRuledfact that the resolver would accept, is refused at apply. This follows theapply_effect_re_decides_elaborator_authoritypattern (lib.rs:15415);a_journal_holding_a_ruled_fact_and_a_mint_replays: reopen the journal and compare the state digest;- the existing suite, including the catalog, fixture and consumer pins, with counts updated.
- external:
tests/external_admission.rsgainsplay_port_is_the_only_play_minter(compile-pass use ofPlayPort) and a consumer document carryingMint, refused. - negative:
rg -n 'SystemCapability::Play' crates/ghostlight/srcoutside#[cfg(test)]lists only the admission sites (require_system_capability, its twin,require_answer,require_patch_author,require_clock_caller,require_ruler) andPlayPort's two methods.rg -n 'PlayCarriesEvidence' crates docs/architecture/ghostlight-play-agent.md= 0 (the cut map keeps the name only in History). Tested: the pattern matches no other identifier. - mutations (each a loosening, not only a revert):
- M3.1
require_answer: admit anySystem(_)instead ofPlay. Killed by the elaborator test. - M3.2
require_ruler:caller == System(Play)→matches!(caller, CallerId::System(_)). Killed byno_one_else_may_rule_a_fact(elaborator and consumer rows). - M3.3
require_ruler: collectRuledfacts only, notMint. Killed byno_one_else_may_mint. - M3.4
require_ruler: admitPrincipal(owner)too. Killed by the owner rows of both tests; this is the seed's caller, which the ruling keeps gated. - M3.5
apply_effect: drop therequire_rulerre-decision. Killed byapply_effect_re_decides_the_ruler. - M3.6 Admit resolution (
patch.rs:3938):evidenced = trueforPlay. Killed bythe_evidence_gate_is_unchanged_for_every_author(Playrow). This is the spelling that would turn Admit into "evidence or else". - M3.7 Mint apply: credit
consumedinstead ofadmitted. Killed by the ledger test. - M3.8 snapshot (
lib.rs:3650-3668): filter out knowledge rows whose fact isRuled, which is how a view could hide a ruling from the subjects who hold it. Killed by the witness test. - M3.9
require_system_capability: admit(Play, ActivateWorld). Killed by the "cannot approve" test.
- M3.1
- builds:
- Promises:
- P3.1
Playdeclares in Active unanswered and unconfined; no other caller does. - P3.2
Playalone writesRuledfacts andMintquantity. The owner, seed, elaborators and consumers are refused both atreduceand atapply_effect. - P3.3 The evidence gate on
Canonicalfacts andAdmitis byte-for-byte the same predicate at the same sites for every author,Playincluded. - P3.4 A ruled fact is world truth to every subject that knows it: its view
is
Canonical, and the Projector renders it as known. - P3.5 Minted quantity balances the ledger, and replay reproduces it.
- P3.6
Playcannot act in Draft, approve, activate, exercise or decline.
- 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, 32, 41)(Cut 3 addedmint); the sidecar fixture is regenerated (GHOSTLIGHT_WRITE_SIDECAR_FIXTURES=1).- Row version: rides Cut 3's
controller_work.v17(see Cut 3 for when a second bump is due).
- 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 (ruled).
- 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, 34, 43)), 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's design.table_viewextends the moved renderer with each subject's place, mode,retired, granted entry names and holdings, and the places' occupants. It prints resource ids (the moved renderer prints labels only,elaboration.rs:2257-2263) and every fact with its id, its standing (canonical | claimed by <label> | ruled) and who knows it, becausemint,transfer,witnessandacquire_knowledgeall take those ids. It ends with the clock and the brief. This is the agent's whole-world view. Standing is printed here and nowhere subject-facing.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, andPatchRejectedmismatches by site with the offending tool call's index, so the agent can repair it; every otherKernelErrorrenders by itsDisplay. The agent holdsPlay, so it never meetsRuledWithoutAuthorityorAdmitWithoutEvidencefor its ownmint. It does meetAdmitWithoutEvidenceif it callsadmit, which is whyadmitis not in its list (PA-Q7).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. M7.3 print resources by label only, as the moved renderer does:table_view_prints_every_id_the_tools_takefails on amintexample's resource id. (That test takes one generated example per listed tool and asserts that every referenced id appears in the view.)
- 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;a_mint_and_a_ruled_fact_commit_as_play(the agent'smintand adeclare_factwithruledstanding commit with callerSystem(Play);admitis not inPLAY_TOOLS);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 ~220 + tests | consumer.v5 → v6; controller_work.v16 → v17; PATCH_TOOLS 39 → 40 (mint); declare_fact schema +ruled; fixture; FactStanding/FactStandingRef/FactCandidate +1 variant each; Mismatch +1 |
|
| 4 | 0 | library ~150 + tests | PATCH_TOOLS 40 → 41; fixture (rides Cut 3's v6/v17) |
|
| 5 | 0 | library ~120 + tests | PATCH_TOOLS 41 → 43; 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 (superseded by PA-Q15's ruling; history): the play authority
could neither create quantity nor state a canonical fact. PA-Q15 gave it
Ruledfacts andMint; Cut 3 builds them. - PA.f9 (introduced by PA-Q15, low, recorded):
PATCH_TOOLShas one owner and is every authoring lane's catalog, so the elaborator's and the seed's prompts now listmintand aruledfact standing, which admission refuses them. The descriptions say "only the play table". A lane that reaches for either earns aRuledWithoutAuthorityrefusal and one repair round. If the gate's seed runs show it happening, a per-lane exclusion list is the follow-up; a second catalog is not. - PA.f10 (introduced by PA-Q15, info): minted quantity has no provenance
besides the commit's
System(Play)caller. The quantity has the same shape as admitted quantity once held. A consumer contract that must tell loot from evidenced custody (Njordr's outbound batch) reads the commit's caller, or asks for a distinct holding kind. That is the outbound pass's question, not this map's. - PA.f11 (introduced by Cut 1, medium, fix): no test pins P1.1 or P1.2.
Soul re-added a 30-second
submit_clockloop besidemaintain_mesh_projection, and asweepspawned fromseed_once, and both passed 46/46. Fix: a source-scan test, on the precedent ofsoul_no_credential_name_appears_in_the_runtimes_own_source. It banssubmit_clock(,.elaborator(,run_narrative(,run_operational(,run_cell(andElaborationRunnerfrom Dungeon's non-test source. Cut 8's Persona dispatch goes throughPersonaLane, which the ban does not name. - PA.f12 (introduced by Cut 1, low, fix): the dropped
no_proposal_projection_carries_the_canonical_world_commitwas the only test ofsubmit_receipt'sapplied/already_appliedkinds and revision (runtime.rs:1124). The fix is a test that submits a principal command twice with one idempotency key and asserts both kinds and the revision. - PA.f13 (introduced by Cut 1, low, Cut 8): the route-observation test
(
runtime.rs:1966-1984) drainscontroller_permitsas a provider barrier. Nothing in Dungeon draws that pool until Cut 8, so for now the barrier guards nothing, and readiness's"active"arm is unreachable. Cut 8 restores the draw and must make this test meaningful again, or delete it. - PA.f14 (pre-existing, low, Cut 8): nothing in Dungeon quarantines.
ControllerError::requires_quarantinehas no reader, and the seed lane has always turned every error into a payload string. The library still refusesCustodyUncertainitself. Cut 8 decides whether a Persona dispatch whose error requires quarantine closes that world's play table. - PA.f15 (introduced by Cut 1, medium, fix): stale docs.
notes/local-live-smoke.md:3-8, 64, 195is a runbook for the deleted live smoke. Its command now runs zero tests and exits 0.docs/architecture/ghostlight-dungeon-mvp.md:584-595(Verification contract).notes/ghostlight-implementation-plan.md:412-427(ControllerHttpResult::Interrupted,run_cover_tick).docs/architecture/ghostlight-stock-lenses.md:61(Dungeon's elaboration pool).- The handoff line about concurrent elaboration under Dungeon's ceiling.
- 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.