Wiki Depot β Game Surface Integration Design
Status: PROPOSAL
Agent: PERISCOPE (design agent)
Date: 2026-05-12
Target: RG40XXV (640Γ480, D-pad + A/B/X/Y)
Backend: LangGraph state machine β file-based markdown wiki on Raspberry Pi
Scope: 5 views, button mapping, API contracts, ASCII mockups at 80Γ30 (8Γ16 font)
Architecture Overview
βββββββββββββββββββββββ HTTP GET ββββββββββββββββββββββββ
β RG40XXV Client β ββββββββββββββββ β Raspberry Pi β
β β β β
β Renders wiki views β β LangGraph state β
β Reads state only β β machine β
β No local storage β β β β
β Sends "open on Mac"β β ββ writes .md files β
β command to Mozart β β ββ serves JSON API β
β Bridge :8318 β β β
βββββββββββββββββββββββ ββββββββββββββββββββββββ
Data Model (Wiki Index JSON)
Every wiki page carries this metadata (served by Pi API as wiki_index.json):
{
"pages": [
{
"id": "architecture-pod",
"title": "Architecture Pod",
"path": "concept/architecture-pod.md",
"category": "concept",
"status": "draft",
"producer_node": "arch-pod-design",
"producer_unit": "HERON",
"phase": "drafting",
"created": "2026-05-12T14:30:00Z",
"updated": "2026-05-12T16:45:00Z",
"tags": ["architecture", "level-design"],
"references": ["core-loop", "combat-loop", "level-design"],
"referenced_by": ["combat-system", "entity-map"],
"harvester_flags": [],
"trail_context_ids": ["ctx-042", "ctx-051"]
}
],
"graph": {
"nodes": [
{
"node_id": "arch-pod-design",
"unit": "HERON",
"phase": "drafting",
"status": "in_progress",
"produced_pages": ["architecture-pod"],
"referenced_pages": ["core-loop", "combat-loop", "level-design"],
"trail": ["ctx-042", "ctx-051", "ctx-067", "ctx-089"]
}
],
"trail_context": [
{
"id": "ctx-042",
"type": "wiki_ref",
"page_id": "core-loop",
"section": "phase-structure",
"summary": "Core loop defines three progression phases",
"timestamp": "2026-05-12T14:31:00Z"
}
]
},
"harvester": {
"flags": [
{
"id": "flag-12",
"text": "Combat flow rate suggests pod density max 5 active per zone",
"source_unit": "PROPHET",
"suggested_for_node": "arch-pod-design",
"topic_tag": "combat-balance",
"status": "pending",
"timestamp": "2026-05-12T15:22:00Z"
}
]
}
}
View 1: Graph-Correlated TOC
Purpose
Browse all wiki pages organized by their relationship to the game graph. Understand at a glance: which phase produced what, which unit wrote what, what's stale, what's disputed.
Layout Strategy
- Top bar: Title + live filter chips (Phase / Unit / Status / Sort)
- Scrollable list: Grouped by primary sort key (default: Phase)
- Per entry: Title (truncated to 45 chars) + unit tag + status badge + relative time
- Bottom bar: Counts + button hints
Interaction Flow
| Input | Action |
|---|---|
| D-pad β/β | Move cursor through list entries |
| D-pad β/β | Jump between filter chips in top bar |
| A | Open selected page detail (View 2) |
| B | Back to game |
| X | Cycle sort/filter mode: Phase β Unit β Status β Recency |
| Y | Send "open on Mac" command for selected page |
| L1/R1 | Jump between group headers |
ASCII Mockup (80Γ30)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WIKI DEPOT Β· TOC SORT:[PHASE β²] [U] [S] [REC] [T] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βΈ PHASE: RESEARCH (3) ββββββββββ β
β β βΈ PodΒ·Architecture [HERON] draft 2h β² scroll β
β β CombatΒ·BaseΒ·Loop [TRIDENT] final 5h β position β
β β LevelΒ·Topology [KUJO] draft 1d β β
β β βΌ β
β βΈ PHASE: DRAFTING (5) ββββββββββ β
β β βΈ StoryΒ·ArcΒ·Act1 [HERON] draft 1h β
β β NPCΒ·RelationΒ·Graph [RANGER] final 3h β
β β DialogueΒ·Tree [ARCHITECT] disputed 6h β
β β EconomyΒ·Model [TRIDENT] draft 1d β
β β ItemΒ·Manifest [KUJO] final 2d β
β β
β βΈ PHASE: REVIEW (1) ββββββββββ β
β β CombatΒ·Balance [ACE] draft 4h β
β β
β βΈ PHASE: FINAL (2) ββββββββββ β
β β CoreΒ·Loop [HERON] final 1d β
β β WinΒ·Condition [TRIDENT] final 2d β
β β
β βΈ RECENCY (last 24h) ββββββββββ β
β β 1h StoryΒ·ArcΒ·Act1 HERON DRAFTING draft β
β β 2h PodΒ·Architecture HERON RESEARCH draft β
β β 4h CombatΒ·Balance ACE REVIEW draft β
β β 5h CombatΒ·BaseΒ·Loop TRIDENT RESEARCH final β
β β 6h DialogueΒ·Tree ARCHITECT DRAFTING disputed β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [A:Open] [X:Sort] [Y:Mac] 12 pages Β· 4 phases Β· 6 units [B:Back] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Sort Modes (X cycles through)
| Mode | Group By | Description |
|---|---|---|
| Phase | phase label | Research β Drafting β Review β Final |
| Unit | producer_unit | ACE β ARCHITECT β HERON β KUJO β RANGER β TRIDENT |
| Status | status | Final β Draft β Disputed |
| Recency | updated (desc) | Flat list, newest first, time buckets (1h, 6h, 24h, 7d, older) |
| Tags | tags[0] | Group by primary topic tag |
API Endpoint
GET /wiki-index.json
β Returns full graph + wiki index (cached by Pi, invalidated on state change)
β Client filters locally (data set is small enough: <200 pages, <50 nodes)
View 2: Per-Node Pointer Links
Purpose
When inspecting a node's work, see everything connected to it: pages it produced, pages it referenced, and nodes that cross-reference the same pages.
Layout Strategy
- Top bar: Node name + unit + phase + status
- Section 1 β Produced: Pages this node wrote (always present, may be empty)
- Section 2 β Referenced: Pages this node used as context (input links)
- Section 3 β Related Nodes: Other nodes that reference the same pages (discover connections)
- Preview panel: Bottom β of screen shows first ~8 lines of selected page
Interaction Flow
| Input | Action |
|---|---|
| D-pad β/β | Move cursor through entries (all sections are one flat list) |
| A | Open selected page β full-screen wiki reader on RG |
| B | Back to TOC or previous view |
| X | Toggle preview panel on/off (maximize list space) |
| Y | Send "open on Mac" for selected page |
| Select (hold A) | Jump to Cross-Reference View for selected page (View 5) |
ASCII Mockup (80Γ30)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NODE: arch-pod-design [HERON] PHASE:drafting STATUS:in_progress [β£ prev]β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β PRODUCED (1) β
β βΊ PodΒ·Architecture ........... draft concept 2h βββββββββββββββββββ β
β <this page was produced here> β
β REFERENCED (3) β
β CoreΒ·Loop .................. final concept 1d β
β CombatΒ·BaseΒ·Loop ........... final research 5h β
β LevelΒ·Topology ............. draft concept 1d β
β β
β RELATED NODES (2) β
β combat-system [TRIDENT] β also refs CoreΒ·Loop, CombatΒ·BaseΒ·Loop β
β entity-map [RANGER] β also refs LevelΒ·Topology β
β β
β β PREVIEW: CoreΒ·Loop ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β # Core Loop concept Β· final β β
β β β β
β β The player enters through the initial zone and must β β
β β progress through three major phases: exploration, β β
β β combat, and narrative resolution. Each phase feeds β β
β β into the next via a gated transition system... β β
β β β β
β β ## Phase Structure β β
β β 1. Exploration β open world traversal, discovery β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [A:Open] [X:Preview] [Y:Mac] [Hold A:Crossref] 1 produced + 3 refs [B:Back]β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
View 3: Trail Context as Navigable Links
Purpose
Walk through a unit's accumulated context step by step. Each context item (seed prompt, wiki reference, memory recall, harvester feed) is a tappable link that opens the relevant wiki section.
Layout Strategy
- Top bar: Unit + phase + step counter (e.g., "Step 3/7")
- Context chain: Scrollable vertical list, each item numbered
- Context types (icon prefix):
[S]SEED β initial prompt given to the unit[R]REF β wiki page reference[M]MEM β memory recall / prior context[F]FEED β harvester intel flag[O]OUT β output produced (final step)- Detail panel: Bottom β shows expanded context for selected item
- Jump bar: L1/R1 to jump between major context items (skip seeds/mem)
Interaction Flow
| Input | Action |
|---|---|
| D-pad β/β | Move through context chain entries |
| A | Open linked wiki page (for REF type) / expand detail (for other types) |
| B | Back to node view |
| X | Toggle detail panel |
| Y | Open linked page on Mac |
| L1/R1 | Jump to next/previous REF or OUT entry (skip SEED and MEM) |
ASCII Mockup (80Γ30)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TRAIL: HERON Β· arch-pod-design STEP [β 3/7 βΊ] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β [S] 1 "Design a pod-based architecture system for modular level β
β construction." ββββββββββ β
β [R] 2 CoreΒ·Loop (concept, final) β refs Β§phase-structure β position β
β [R] 3 CombatΒ·BaseΒ·Loop (research, final) β refs Β§pacing β β
β [M] 4 "Previous pod designs used 3Γ3 grid β consider hex..." β β
β [R] 5 LevelΒ·Topology (concept, draft) β refs Β§zones βΌ β
β [F] 6 Harvester Flag #12: "Pod density max 5/zone" ββββββββββ β
β [O] 7 PodΒ·Architecture (concept, draft) β
β β
β β STEP 2 ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β TYPE: Wiki Reference PAGE: CoreΒ·Loop β β
β β PHASE: Research UNIT: HERON β β
β β SECTION: Β§phase-structure STATUS: final β β
β β β β
β β "The player enters through the initial zone and must progress β β
β β through three major phases: exploration, combat, and narrative β β
β β resolution. Each phase feeds into the next via a gated..." β β
β β β β
β β [A:Open Wiki Page] [Y:Mac] [X:Close Detail] β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [A:Open] [X:Detail] [Y:Mac] [L1/R1:Skip] 7 context items [B:Back] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
View 4: Harvester Intel Feed
Purpose
Review flagged intel items from harvester units (PROPHET, ACE). Triage pending items, review accepted/routed items, dismiss rejected items.
Layout Strategy
- Top bar: Feed title + live status filter chips
- List: Flag items with compact card layout
- Status indicators:
β³Pending β needs reviewβAccepted β routed to a nodeβRejected β dismissed with reason- Filter bar (X cycles): Status β Suggested Node β Topic Tag β Source Unit
- Flag card: Quote text + metadata line (source, target node, time)
Interaction Flow
| Input | Action |
|---|---|
| D-pad β/β | Move through flag list |
| D-pad β/β | When status filter active, cycle status tabs |
| A | Expand flag detail (full text + related pages) |
| B | Back to game |
| X | Cycle filter mode: Pending/All β By Node β By Tag β By Unit |
| Y | Send flag to Mac clipboard (for external triage) |
| Select (hold A) | Mark as accepted / rejected (confirmation dialog) |
ASCII Mockup (80Γ30)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HARVESTER FEED [β³PENDING 3] [βACCEPTED 5] [βREJECTED 2] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β³ "Combat flow rate from CoreΒ·Loop suggests pod density max of β
β 5 active per zone." β
β β for: arch-pod-design | #combat-balance | PROPHET | 2h β
β β
β β³ "Architecture pod grid should support diagonal connections, β
β not just cardinal β increases expressiveness 40%." β
β β for: arch-pod-design | #architecture | ACE | 3h β
β β
β β "Level topology must account for verticality in zone 3 β β
β current flat model won't support bridge encounters." βββ β
β β for: level-topology | #level-design | PROPHET | 5h β² β
β β β
β β "NPC relation graph needs a 'betrayal' edge type β current β β
β model only supports ally/neutral/hostile." β β
β β for: npc-relation | #npc | ACE | 6h β β
β β β
β β "Economy model should use logarithmic scaling for high-level β β
β items β prevents inflation in late game." β β
β β for: economy-model | #economy | PROPHET | 8h β β
β β β
β β "Use real-time clock for day/night cycle" β β
β β for: core-loop | #time | ACE | 1d β β
β Reason: "Game uses in-game time, not real-time β rejected by βΌ β
β TRIDENT on review." βββ β
β β
β β "Combat balance needs diminishing returns on dodge stacking β β
β currently possible to reach 95% dodge with 3 items." β
β β for: combat-balance | #combat-balance | PROPHET | 1d β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [A:Expand] [X:Filter] [Y:Clipboard] [Hold A:Triage] 10 flags [B:Back] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Triage Dialog (hold A on a pending flag)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β TRIAGE FLAG #7 ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β "Combat flow rate from CoreΒ·Loop suggests pod density max of β β
β β 5 active per zone." β β
β β β β
β β Source: PROPHET | Topic: #combat-balance β β
β β Suggested for: arch-pod-design β β
β β β β
β β [A:ACCEPT] [X:REJECT] [B:CANCEL] β β
β β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
View 5: Cross-Reference View
Purpose
Bidirectional link browsing. From any wiki page or node, discover what else connects to it and what it connects to.
Layout Strategy
- Top bar: Current page/node title + view mode indicator
- Split view: "Referenced By" (incoming) on left, "References" (outgoing) on right
- OR toggle between the two (if too cramped)
- Each entry shows: page title + node/unit that created the link + link context
Interaction Flow
| Input | Action |
|---|---|
| D-pad β/β | Move through entries in active column |
| D-pad β/β | Switch between incoming / outgoing column |
| A | Open selected page |
| B | Back to previous view |
| X | Toggle between split view and full-width single column |
| Y | Open selected page on Mac |
| L1/R1 | Jump between columns |
ASCII Mockup β Split View (80Γ30)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CROSS-REF: CoreΒ·Loop (concept Β· final Β· HERON) [β βΊ] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β REFERENCED BY (4) REFERENCES (3) β
β βββββββββββββββββ βββββββββββββ β
β β
β βΊ CombatΒ·System CombatΒ·BaseΒ·Loop β
β via TRIDENT Β· drafting research Β· TRIDENT β
β Β§combat-flow-rate β
β LevelΒ·Topology β
β ArchΒ·PodΒ·Design concept Β· KUJO β
β via HERON Β· drafting β
β Β§phase-structure WinΒ·Condition β
β final Β· TRIDENT β
β EconomyΒ·Model β
β via TRIDENT Β· drafting β
β Β§resource-pacing β
β β
β NPCΒ·RelationΒ·Graph β
β via RANGER Β· review β
β Β§faction-tiers β
β β
β β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [A:Open] [X:1-Col] [Y:Mac] [ββ:Col] 4 incoming Β· 3 outgoing [B:Back] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ASCII Mockup β Single Column (X toggles; 80Γ30)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CROSS-REF: CoreΒ·Loop β INCOMING β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Pages that REFERENCE CoreΒ·Loop (4): β
β β
β βΊ CombatΒ·System draft TRIDENT Β§combat-flow-rate β
β β
β ArchΒ·PodΒ·Design draft HERON Β§phase-structure β
β β
β EconomyΒ·Model draft TRIDENT Β§resource-pacing β
β β
β NPCΒ·RelationΒ·Graph review RANGER Β§faction-tiers β
β β
β β
β β
β β
β β
β β
β β
β β
β β
β β
β β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [A:Open] [X:Split] [Y:Mac] [L/R:Outgoing] 4 incoming [B:Back] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Button Mapping: Full Reference
| Button | Context | Action |
|---|---|---|
| D-pad β/β | All views | Move cursor through list |
| D-pad β/β | TOC | Navigate filter chips in top bar |
| Cross-Ref | Switch between incoming/outgoing column | |
| Harvester | Cycle status tabs (when filter bar focused) | |
| A | All views | Select / open / confirm |
| A (hold) | Node View | Jump to Cross-Reference for selected page |
| Harvester | Open triage dialog for selected flag | |
| B | All views | Back β return to previous view or game |
| X | TOC | Cycle sort mode (Phase β Unit β Status β Recency) |
| Node View | Toggle preview panel | |
| Trail | Toggle detail panel | |
| Harvester | Cycle filter mode | |
| Cross-Ref | Toggle split/single-column | |
| Y | All views | Send "open on Mac" command (via Mozart Bridge :8318) |
| L1 | All views | Jump to previous group / section / column |
| R1 | All views | Jump to next group / section / column |
"Open on Mac" Protocol (Y button)
When Y is pressed, the RG sends a POST to Mozart Bridge:
POST http://<mac-ip>:8318/wiki/open
{
"page_id": "core-loop",
"page_path": "concept/core-loop.md",
"source_view": "toc"
}
Mozart Bridge opens the file in Typora or the default markdown editor on the Mac. This handles dense wiki content that's hard to read at 640Γ480.
Navigation Map (View Transitions)
βββββββββββββββββββ
β GAME SURFACE β
ββββββββββ¬βββββββββ
β Menu β "Wiki Depot"
βΌ
βββββββββββββββββββ
ββββββββ TOC (View 1) ββββββββ
β ββββββββββ¬βββββββββ β
β β A β X (filter to unit)
β βΌ β
β βββββββββββββββββββ β
β β NODE (View 2) β β
β βββββ¬βββββββ¬βββββββ β
β A β β Hold A β
β (wiki) β βΌ β
β β ββββββββββββββββ β
β β β CROSS-REF β β
β β β (View 5) β β
β β ββββββββββββββββ β
β β β
β β A (on REF item) β
β βΌ β
β βββββββββββββββββββ β
β β TRAIL (View 3) β β
β ββββββββββ¬βββββββββ β
β β A (on FEED item) β
β βΌ β
β βββββββββββββββββββ β
ββββ HARVESTER ββββββββββββ
β (View 4) β
βββββββββββββββββββ
API Contract (Pi Endpoints)
GET /api/wiki-index.json
Full wiki index + graph state. Cached in-memory on Pi, invalidated on state change. Client filters locally.
{
"version": "1",
"generated": "2026-05-12T16:45:00Z",
"pages": [ /* see Data Model above */ ],
"graph": { /* nodes + trail_context */ },
"harvester": { "flags": [ /* ... */ ] }
}
GET /api/wiki-page/{page_id}
Returns full markdown content of a single page, plus its metadata block.
{
"id": "core-loop",
"title": "Core Loop",
"content": "# Core Loop\n\nThe player enters through...",
"metadata": { /* same as in index */ }
}
GET /api/wiki-crossref/{page_id}
Bidirectional references for a page.
{
"page_id": "core-loop",
"referenced_by": [
{ "page_id": "combat-system", "node_id": "combat-system", "unit": "TRIDENT", "section": "combat-flow-rate" }
],
"references": [
{ "page_id": "combat-base-loop", "node_id": "combat-base-loop", "unit": "TRIDENT" }
]
}
POST /api/harvester/triage
Triage a harvester flag (mark accepted or rejected). Pi writes back to LangGraph state.
// Request
{ "flag_id": "flag-12", "action": "accept", "routed_to_node": "arch-pod-design" }
// or
{ "flag_id": "flag-12", "action": "reject", "reason": "Out of scope for current phase" }
Error Responses
All endpoints return { "error": "message" } with appropriate HTTP status. Client displays errors inline in the status bar.
Implementation Notes
Font & Rendering
- Target: 8Γ16 pixel monospace font β 80 columns Γ 30 rows
- Use bitmap font from RG40XXV firmware (no TTF needed)
- Render loop: fetch JSON β build display buffer β blit to framebuffer
- No scrolling animation needed (instant redraw on D-pad)
Caching Strategy
- Fetch
wiki-index.jsonon view entry, cache for 5 seconds - Invalidate cache on B-button exit from any wiki view
- All filtering/sorting is client-side (data set fits in RAM)
- Page content fetch (
/api/wiki-page/{id}) is lazy β only when preview or full page is opened
Performance Budget
wiki-index.json: <50KB (estimated for 200 pages, 50 nodes, 100 flags)- Page content fetch: <10KB per page
- Render budget: 16ms per frame (60fps) β should be trivial for JSONβtext rendering
- Network: all over local WiFi, <5ms ping
Fallback States
| State | Display |
|---|---|
| Loading | "Fetching wiki..." centered text with spinner animation |
| Empty (no pages) | "No wiki pages yet. Run a graph cycle to generate content." |
| Network error | "Cannot reach Pi at |
| Page not found | "Page deleted or not yet generated." |
"Open on Mac" Implementation
- RG sends POST to Mozart Bridge (Mac IP hardcoded or discovered via mDNS)
- Mozart Bridge runs a small HTTP server on :8318
- Receives
{ "action": "open_wiki_page", "page_path": "..." } - Opens file in Typora:
open -a Typora /workcell/llm-wiki/wiki/<page_path>
End of design. Ready for review.