No description
  • JavaScript 98.1%
  • CSS 1.2%
  • HTML 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Neil Hooper 4fdbbe4669 model: pin Fifo's context in the model, not the request
- ollama's OpenAI shim ignores options/num_ctx entirely (measured: model
  loads at 4096 either way), so 8192 tokens live in a derived model:
  deploy/ollama.Modelfile (fifo-gemma FROM gemma3:4b).
- LLM_EXTRA_BODY keeps only what the shim honors: reasoning_effort null,
  keep_alive. Comments/docs re-measured to match.
2026-11-20 09:55:10 -06:00
.omp getting somehwere 2026-11-11 20:22:22 -06:00
bubble-regression shots: symbol-only thought bubble captures, all five states (t_9e1853f6) 2026-11-15 02:17:37 -06:00
bubble-root-verify shots: root verification — live unforced bubble at hunger 0.64 shows heaped-bowl symbol (t_62ddacc7) 2026-11-15 02:40:50 -06:00
bubble-symbol-verify feat(bubble): symbol-only hunger thought bubble — pixel glyphs, key dedupe, no words (t_43de7aa8) 2026-11-15 01:49:39 -06:00
deploy model: pin Fifo's context in the model, not the request 2026-11-20 09:55:10 -06:00
docs RGB565 posterization + haloed, decluttered world labels 2026-11-20 08:53:32 -06:00
openspec Revert "tour guide: a second resident — a black-mage NPC with his own mind" 2026-11-16 08:38:08 -06:00
public RGB565 posterization + haloed, decluttered world labels 2026-11-20 08:53:32 -06:00
scripts fix(narration): third-person seed wake event + broaden pronom guard (t_96889783) 2026-11-14 23:54:39 -06:00
shots dither: ?dither=/__dither() A/B knob + measured verdict (dither is load-bearing) 2026-11-16 20:02:49 -06:00
synth feat(synth): integrate — player render layer, WAV demo, smoke tests (t_496ffe34) 2026-11-15 01:14:16 -06:00
test model: pin Fifo's context in the model, not the request 2026-11-20 09:55:10 -06:00
tools harness: no stand-ins — re-prompt the model on unreadable answers, idle on silence; judge retries and keeps the book open; drop soak tool 2026-11-16 14:14:45 -06:00
world board: paper rots — pinned notes live three days, and a cork he already read comes back as the same paper 2026-11-17 08:27:29 -06:00
.env.example getting somehwere 2026-11-11 20:22:22 -06:00
.gitignore Static-albedo lighting refactor: the clock drives lights, not colors 2026-11-13 11:44:30 -06:00
.keep good checkpoint 2026-11-13 07:32:25 -06:00
.omp-brief-t_7b031d9e.md feat: shrine color+texture palette per SHRINE_PALETTE spec (t_7b031d9e) 2026-11-13 14:24:01 -06:00
.surface-audit-prompt.md world surface audit: wake presence, stop prose teleports, hear every refusal 2026-11-15 02:52:47 -06:00
AGENTS.md model: pin Fifo's context in the model, not the request 2026-11-20 09:55:10 -06:00
decide.mjs decide: the DECIDE phase behind one interface — decide.mjs 2026-11-19 13:01:50 -06:00
demo.mjs feat(synth): integrate — player render layer, WAV demo, smoke tests (t_496ffe34) 2026-11-15 01:14:16 -06:00
GLOSSARY.md docs: name the light rig + space modules in GLOSSARY and AGENTS 2026-11-19 15:38:08 -06:00
IDEA.md checkpoint: world.mjs town refactor + IDEA.md 2026-11-13 08:10:40 -06:00
loop.mjs decide: the DECIDE phase behind one interface — decide.mjs 2026-11-19 13:01:50 -06:00
model.mjs model: pin Fifo's context in the model, not the request 2026-11-20 09:55:10 -06:00
prompt.mjs decide: the DECIDE phase behind one interface — decide.mjs 2026-11-19 13:01:50 -06:00
README.md matt pocock stuff 2026-11-20 07:57:25 -06:00
salience.mjs thought-gate: lift the bubble's decision out of the page — pure module, tested in Node 2026-11-19 14:22:24 -06:00
server.mjs transport: guard server import, cap the wish at the hall's petition limit 2026-11-19 15:37:54 -06:00
world.mjs moves: one row per manifest action — act() dispatches through the MOVES table 2026-11-19 14:01:23 -06:00

Fifo

A kakapo who runs himself. Inspired by Pino, the autonomous kiwi bird — same loop, different bird: Fifo is a flightless nocturnal parrot who lives on a small island you can walk around in 3D, decides his own night, writes a diary you can read, and remembers the people who talk to him and leave him things.

node server.mjs          # Node 20+, nothing to install
# fifo is awake
# visit him: http://localhost:4780

Open the URL. You spawn as a visitor on his island — WASD/arrows to walk, drag the mouse to look, O to fly. You'll find his burrow, the shrine, the noodle shop, the cinema, the library, the town square and the shore, all joined by streets and tracks. Fifo waddles between them doing whatever he decided to do.

You can:

  • walk up to him — he notices you standing there (it lands in his observations and may pull him toward you, or not — his call)
  • say something — it waits on his attention; if he chooses to answer, you see what he actually said. Nothing is scripted.
  • leave an offering at the shrine — it appears in the scene, he can discover and inspect it, and he remembers who left it.
  • give your name — he remembers returning visitors: what they left, what was said.
  • read the diary — the feed card has a link; it's his real state/diary.md.

The top bars are his five feelings — fullness, energy, wonder, joy, calm — read straight from his observation. The left card is "right now": what he's doing and what happened earlier. Bottom left is a minimap (purple = him, red = you).

Copy .env.example to .env. Any OpenAI-shaped chat API works — it's currently set to a local omlx server (Qwen3.8-Flash-Next); the Groq defaults are in .env.example:

LLM_URL=http://localhost:8000/v1/chat/completions
LLM_API_KEY=<your server key>
MODEL=Qwen3.8-Flash-Next-oQ4h-mtp

With no .env he still lives his life on deterministic stand-in decisions (the page says "dry-run"). With a key, the model decides every ~45 s (FIFO_TICK_MS to tune).

How it works

        ┌──────────┐   OBSERVATION   ┌────────┐
        │  world   │ ───────────────▶│  mind  │  prompt: only moves on offer, names not ids
        │ (world.mjs)│               │(model call)│
        │          │◀─────────────── │        │  ACT {action, params}
        │  state + │   ACTION_RESULT └────────┘  JSON only: {consider, do, because}
        │  memory  │   success + words, or refusal + reason
        └────┬─────┘
             │ SSE after every turn
        ┌────┴─────┐
        │  your    │  3D clearing, his speech, his diary
        │ browser  │  you say/offer → into his next observation
        └──────────┘

Every turn: the world says what's true in words → the model picks one move → the world does it or refuses → the result lands in "what happened earlier" and the next observation. Refusals are recorded too, or he'd try the same move again.

  • world/ — manifest (every move he can make) and starting observation
  • world.mjs — the clearing: clock, needs, drives, moon cycle, cooldowns, shrine, open questions
  • prompt.mjs — words for the model, decision back out
  • model.mjs — one fetch, .env loading, dry-run stand-ins
  • loop.mjs — observe → decide → act → broadcast, on a timer
  • server.mjs — node:http, SSE, visitor routes, persistence to state/
  • public/ — Three.js scene + panel, no build step

State (state/world.json, memory.json, diary.md) persists across restarts and is gitignored.