The final round is shipped. PR #11 now carries the full arc with a measured metrics chart, side-by-side comparisons, real model outputs, and per-round grades.
Context/VRAM/latency overhaul — the headline engineering
The problem with 256k-class windows on models like Qwen3.5-4B is that KV-cache VRAM and prefill latency scale with the allocated window, not usage. Three layers fix it, each pinned by tests:
- Stable-prefix system prompt. Backend prompt caches (llama.cpp, Ollama) reuse work up to the first differing byte — and our volatile blocks (goal step, continuity note, per-prompt skills, memory wake) sat interleaved high in the prompt, so every single call re-prefilled all ~14.5k tokens (340 seconds per call, observed live on CPU). The prompt now builds stable-first with a
## Session state volatile tail: 57% (~4,150 tokens) measured byte-identical across turns, and within-turn iterations — the dominant cost at 10–30 model calls per turn — cache fully.
cache_prompt: true goes to llama.cpp-family endpoints only (Ollama /v1 plus loopback/LAN custom endpoints), so each iteration prefills just its delta. Public clouds never see the unknown field.
- Adaptive
num_ctx ladder on the native path: each request allocates the smallest power-of-two step (4k→256k) that fits the estimated prompt plus headroom, clamped to the budget — a short chat on a 256k-capable model pays 1/32 the KV memory of a pinned window, growing only as the conversation does. This stacks with the earlier fix where the loop learns the backend's real window from its own overflow error text.
watch-skill — the agent watches its own work
The oxbshw/watch-skill CLI (MIT, credited) is bridged in as THE LOOP: the browser and game verification agents hand any recording the turn produced to it for a timestamped critique (frozen moments, clipping, texture pops — motion truth that still-frames miss); a watch_review {video, question} tool registers only when the binary exists; the self-review nudge points at it after UI edits; and the full 13-tool MCP server is one /mcp add watch-skill away. Targets are contained to workspace files or SSRF-safe URLs, and everything degrades silently offline — the bridge is fully unit-tested with an injectable runner.
Final state
Gates: 2,661 tests / 0 fail (master was 2,552/1), typecheck clean across all four packages, 11/11 smoke, and every contract suite green — including the new prefix-stability, context-ladder, and watch-bridge suites. The PR body leads with a rendered metrics chart (KV economics, prefill before/after, eval rounds r1→r3, test growth over the branch), the wensity-vs-ours widget comparisons, the live Jordan transcript showing autonomous preference learning, and a real artifact the 4B model built under eval. ISSUES.md records this round's accepted tradeoffs honestly — across-turn caching covers the stable head only, ladder steps cost one runner reload each, and watch-skill needs its own install.