Speed round shipped — measured first, then attacked the real bottlenecks. Same checks, same recall, same harness intelligence; only the waiting overlaps and the repeated work is memoized. 2,304 tests green (+8 new), typecheck clean, smoke 10/10, pushed to PR #9.
What I found when profiling: turn prep was already fast from earlier cache rounds (36ms cold prompt build, 0.1ms warm), so the real costs were the verify pipeline (sequential subprocess spawns) and repeated I/O on prompt-cache misses. That's where the round went:
Verify pipeline — now parallel:
- The coding-domain verify used to run floor → design floor → adapters → lint commands → test commands → LLM tester strictly in sequence. All of those are read-only against the workspace (verify never mutates), so they now run under one
Promise.all, with lint commands at concurrency 3 and test commands at 2 overlapped with the LLM tester scan. Findings still append in the original deterministic order, so reports are byte-identical to before — a test proves two 700ms lint scripts finish in ~710ms of wall clock instead of 1.4s.
- New
runCommandAsync kills the whole process group at timeout and resolves on exit rather than close — found the hard way that a killed shell's surviving grandchild holding the stdio pipe would otherwise hang verification.
- The verify parallel-mode probe was paying an
/api/show network round-trip before every verify's LLM reviewers; the decision is now cached per model.
Cache work (each targeting a measured repeat):
loadConfig gets an mtime-keyed parsed-file memo — it ran 2–3 full disk read + JSON.parse cycles per registry build.
- The design gate's workspace probe gets a 10s TTL like every other gate (it was doing 3×
existsSync at ~5 call sites per turn).
- The graphics floor's scorecard is keyed by a stat-only content signature, so an unchanged tree skips up to 400 file reads per game verify while an in-place edit still invalidates instantly — a plain TTL broke the edit-then-rescan test, which is exactly why the signature approach is right.
- Cross-chat recall was loading every chat JSON (up to 200 files) on each prompt-cache miss. The fast path now pre-selects candidates from the index — title-keyword hits anywhere in the archive plus the 20 most recent chats for full-text — with a bounded record cache. Critically, the
recall_chats tool passes deep:true and still searches the entire archive, so the model's deliberate recall lost nothing.
- The per-iteration context-fill math (which JSON.stringifies every tool schema) is pre-gated on a cheap character estimate that provably can't change the verdict below 50% fill.
Already optimal, verified rather than touched: keep_alive: 24h rides both Ollama wire paths (matching your never-unload preference), model capability probes are cached with inflight dedup, read-only tool batches already execute concurrently at 6 with call-order results, and MCP connects/listTools are parallel with a 4s fail-fast.