Give your game a memory
Curate project context and retrieval so collaborators receive the right facts at the right moment.
- Separate canonical game facts from temporary working context.
- Retrieve a small context packet for a specific development task.
- Record a context checkpoint that survives a fresh session.
Bring with you Lesson 4 and its workbench templates.
Memory is a designed system
An AI collaborator does not “know the project” in the human sense. It receives a temporary context assembled for the current run. Treating that window as a filing cabinet leads to bloated prompts, conflicting instructions, and stale facts.
Context engineering asks four questions: What is authoritative? What is relevant now? What can be retrieved later? What must be written back after the run? Anthropic's context engineering guide frames context as a limited resource to curate, not a space to fill.
Build a context map
Give Signal Garden four layers:
| Layer | Examples | Authority |
|---|---|---|
| Product | core loop, offline rule, accessibility commitments | scope brief |
| World | relay names, region vocabulary, visual motifs | world guide |
| Implementation | schemas, file paths, engine constraints | code and contracts |
| Run | current task, recent errors, candidate draft | task contract and log |
Product and implementation facts outrank an improvised suggestion. A generated draft is never canonical merely because it is recent. Record where each kind of truth lives so retrieval can return the source, not a paraphrase of a paraphrase.
Give every canonical document an owner and review date. Retrieval quality cannot compensate for a source nobody maintains.
Retrieve for the task
Suppose the task is “write repair feedback for Relay Moss.” A useful packet includes the repair-state fields, the tone rule (“hopeful field notes, no fantasy prophecy”), accessibility requirements, and the required JSON shape. It does not need map-generation code, export instructions, or every earlier conversation.
Retrieval can be manual: a short index that points to exact headings. Search can be keyword-based. Embeddings may help when a collection becomes large, but they introduce ranking and staleness problems. Start with transparent selection. Log which sources and versions entered each run.
Write back a context checkpoint
After a run, persist only durable changes:
verified: relay feedback schema v2 passes local validator
decision: repaired towers use text + shape + sound, never color alone
rejected: unique schema per tower; unnecessary variation
open: final sound cue awaits playtest
next: create three fixture records using schema v2
Do not save chain-of-thought or every draft. Save decisions, evidence, and unresolved work. The long-running harness guidance supports durable progress artifacts because a summarized conversation is not a substitute for verified state.
Failure modes and tradeoffs
Context stuffing gives the collaborator too much irrelevant material. Authority collapse treats a brainstorm, an approved rule, and executable code as equal. Stale retrieval returns an old schema after migration. Lossy write-back records “finished relay content” without the file, version, or validation.
Smaller context can omit an important dependency; larger context can bury it. The answer is not a magic token count. Use task-specific packets, source labels, and checks that expose missing facts. When the collaborator cannot find an authoritative answer, “unknown” is better than invented continuity.
Build task: two packets
Create a context index with the four layers above. Then assemble one packet for writing relay feedback and another for reviewing map reachability. Each packet should fit on one screen, link or name its authoritative sources, and omit at least three irrelevant project areas.
Build a context packet for the task below using only the provided context index.
Select the minimum authoritative excerpts needed to act safely.
For each excerpt, state why it is needed and its source version.
List important unknowns separately. Do not solve the task and do not fill gaps.
TASK: [paste one bounded Signal Garden task]
Completion evidence
Give each packet to a fresh collaborator with no chat history. It should be able to restate the constraints and identify missing information without contradicting the canonical scope. Change one source version, then verify that your index exposes which packet is stale. You are done when memory is inspectable and replaceable, not when a prompt feels comprehensive.
A context map and two task-specific context packets for Signal Garden.
What is the best context packet for drafting relay repair feedback?
Go a little deeper.
Primary sources behind this chapter. Signal Garden is our original teaching example.
AnthropicEffective context engineering for AI agentsAnthropicEffective harnesses for long-running agents