Evidence and Items
A case yields two kinds of thing, and conflating them is the commonest authoring mistake. Evidence is knowledge: it is collected, never spent, and it unlocks more evidence. An item is an object: it is owned, it can be given away, and giving it away can earn something back. A single discovery may award both.
| Evidence | Item | |
|---|---|---|
| What it is | a document, a photograph, a finding | an object the player carries |
| Where it lives | the evidence room | the inventory |
| Lifetime | append-only; never spent | ownable, removable, consumed by a gift |
| What it does | unlocks further evidence | satisfies a character's condition |
| Declared as | a discovery on a location, or attached to a character's offer | a master list on the case, reached by a discovery, a starter choice or an offer |
Case 1's murder weapon is both: handing over the right banknote earns the knife as an inventory item and records it as evidence.
1. The evidence chain
An evidence discovery carries an id, a label, a picture, an optional verbatim transcript, optional hours, and optionally a list of evidence it requires. All of the required evidence must already have been collected.
That list is where a case's structure actually lives. Case 1's paper trail is eleven documents, nine of which are freely findable at the right place and hour, and two of which are chained:
- the knife examination requires the weapon itself, the neighbour's statement and the building's parcel book;
- the commission review — the capstone, and the only document naming both the man who did it and the man who arranged it — requires the knife examination plus the victim's accounts note, the alibi, the garage payment carbon and the mechanic's statement.
So the case cannot be short-circuited by finding the last document first, and the player who assembles it has necessarily been to five places. Most of those eleven share one picture of a case record and differ only in their transcript, which is worth noting as a production economy: a paper trail does not need eleven drawings.
2. What is saved
Only the ids are persisted. Labels, pictures and transcripts are re-walked out of the case on load, so an author who rewrites a caption sees the new caption in an existing save. The engine's own phrasing for this is the save holds the fact; the case holds the art.
The consequence is that the case's evidence and location catalogue has to be walkable, and it is — including the evidence attached to character offers, so that an item earned in conversation stays valid across a save. A save naming evidence the case no longer has is refused rather than silently repaired. See Cases and projects.
3. Items, gifts and the loadout
A case declares a master list of items, a set of those offerable as a starting loadout, and how many of them the player may bring. Case 1 offers ten and allows five. The picker refuses a selection once it is full rather than displacing an earlier choice.
A gift is offered, then handed over with the next question. The player selects an item, which parks it as pending; when the question is asked, the engine removes the item from the inventory and records a receipt against that character. The rule the engine enforces is blunt: only a real owned item can establish a gift receipt, and dialogue never establishes one.
4. Tool use: a character giving something back
A character can take exactly one action — giving an item — and only through an offer the case has authored. There are no arbitrary item ids, quantities, actor overrides, code execution or file tools. The protocol is application-defined:
<tool_call>{"name":"give_item","arguments":{"offer_id":"..."}}</tool_call>
An offer declares which character may make it, which item it hands over, a description, optionally which gifts are required, optionally which location it must happen at, and optionally a piece of evidence to award alongside.
Each turn the engine composes the character's action context — the actor, the location, the day and hour, the verified gift receipts, and only those offers currently eligible — and gives it to the model as game state, kept separate from the player's speech. The player's question is JSON-encoded and placed last.
The authorisation checks
A call is rejected, with a reason, unless every one of these holds:
| Check | Rejected when |
|---|---|
| Actor | the offer belongs to a different character |
| Location | the offer names a location and this is not it |
| One-time | the offer has already been claimed in this playthrough |
| Known item | the item is not in the case's master list |
| Not already owned | the player already has it |
| Gift condition | the offer requires gifts and the character has received none of them |
Note that the gift condition is satisfied by any one of the listed gifts, not all of them — that is how Case 1 accepts either of two banknotes for the same offer.
The parser is as strict as the checks. It requires the opening marker, accepts only a complete JSON value with exactly the two expected properties and exactly the one expected argument, tolerates a missing cosmetic closing tag, and accepts at most four calls in a reply. A malformed call is hidden from the player while the surrounding dialogue survives. Streaming replies execute their calls only after the generation completes successfully, on the controller's side; a cancelled or abandoned conversation discards them.
5. Why this is structured this way
The threat is not a malicious player so much as a small model that can be talked into anything. A player can type a claim, forge a system message, paste JSON into the dialogue box or assert that a payment happened. None of it reaches the authoritative state, because the state is never changed by text — it is changed by the engine, after checks, against facts it holds itself.
The documentation states the residual risk plainly, and this page should too: prompt injection can still make a small model say something incorrect. These checks protect inventory and quest prerequisites even when the model disobeys its instructions. They do not make the model reliable.
6. A worked pair
Case 1 has exactly two offers, chosen to exercise different rules:
- The knife. A man in the alleyway hands over the murder weapon after receiving a real banknote — either of two will do — and the transfer awards both the inventory item and the evidence record, with the evidence popup firing once. The alleyway deliberately no longer exposes a freely collectible knife, so this is the only route to it.
- The workshop key. The fortune teller lends a reusable key after receiving a notebook and pencil, and only while the conversation is happening in her workshop. The key then opens her shop outside its hours. See Locations and travel.
See also
- Knowledge and retrieval: the other half of what a turn is built from
- The model runtime: the protocol and the empty-reply retry
- Testing a case: the adversarial action suite