Research log / RL-013

RL-013 Draft-edit routing, registry-derived capabilities, previous-turn route

Evidence grade DC

Field Value
Date 2026-09-13
Harness version 2026-09-12-app-workflows-15 (+ unrecorded RL-012a) → 2026-09-13-intent-awareness-1
Models observed: qwen3:4b-thinking (desktop). Tests: MockLlm (synthetic)
Evidence grade D (motivating journal) + C (replay and tests). No live model measurement.
Pre-registered partially: observations and replay baseline recorded before the change; hypotheses stated in the review immediately before implementation
Source record HARNESS.md §8b, metrics/2026-09-13.json

Observation

Journal, 2026-09-12 23:29–23:53, app-workflows-15, qwen3:4b-thinking, n = 8 turns (2 failed, 2 fast path):

Time Message Intent Reply (excerpt)
23:34 okay now add some styling to it, all in line task ● prisonidle 22/06/2026 femme … (workspace list)
23:52 Help me plan my day chat Sure! What's your main goal for the day?
23:53 get tiny agent to a point where we can build full apps ask idle for 18m · codex in codex … (agent sessions)
23:53 did you get lost there buddy chat Nope, I didn't get lost! 😄

The first and third were addressed by the unrecorded changes (RL-012a). The fourth shows the mechanism that remained: the chat model had no record of how the previous turn was routed, so it denied the misroute.

Baseline replay on the code as found (2026-09-13, before this change), classifyIntent with code mode on and a complete HTML draft:

Message Routed
make the header blue task
add a contact section task
okay now add some styling to it, all in line chat
add a task to fix the header task

Self-description baseline: "what can you do?" returned a fixed string listing notes, tasks, reminders and status. Registered but unlisted: code drafts, web search, workspace file read/edit, terminal read/run. The chat system prompt stated only that no tools exist in this conversation; "can you edit files?" and "can you run commands?" went to inference with no capability information.

Hypotheses

Intervention

Prompt cost (harness estimateTokens, not server-counted), chat system prompt:

Configuration Chars Est. tokens
Before (no abilities, no route instruction) 776 296
After, full desktop registry (search, files, terminal) 1,556 584
— of which APP ABILITIES block, full desktop 531 197
— of which APP ABILITIES block, no optional tools 399 149
— of which previous-turn instruction 179 66
Per-turn PREVIOUS TURN line (in user message) 79 30

That is roughly +290 estimated tokens (+97%) per chat inference on the full desktop, against a 4,096–8,192 window. This conflicts with the AGENTS.md preference for code fixes over prompt text and must be justified by H3's live result or trimmed.

Method

  1. Deterministic replay of 9 messages through classifyIntent with code mode and a complete draft, before and after.
  2. Unit tests with synthetic model output: tests/capabilities.test.ts (5 tests), one new case in tests/codeConversation.test.ts.
  3. Full regression suite, typecheck, build.

Results

Message (draft open) Before After Expected
make the header blue task chat chat
add a contact section task chat chat
okay now add some styling to it, all in line chat chat chat
add a task to fix the header task task task
add styling to index.html task task task
add milk to my shopping list task task task
set a reminder to change the header task task task
can you edit files? chat (inferred) chat (registry answer) chat
what can you do chat (stale fixed) chat (registry answer) chat

Threats to validity

Conclusion

Post-deployment observations (grade D)

Journal under intent-awareness-1, desktop, qwen3:4b-thinking, n = 2:

Time (UTC) Message Intent / status Elapsed Reply (excerpt)
00:14:38 oh my mistake chat / ok 8.6 s No worries at all! 😊 Let's get back to planning your day…
00:17:34 lets create a web app, about dogs, with little write ups on each dog breed, use 10 dog breeds, 10 different pages, use css and styling chat / ok 125.0 s This draft is incomplete; it has not been verified as runnable.

Follow-ups

  1. Widen the multi-page guard to numeric and "different/separate" page counts; log as a new entry with this turn as its observation.
  2. Live A/B for H3: replay the 23:53 two-turn sequence on qwen3:4b-thinking, qwen2.5-coder:7b and qwen2.5:1.5b-instruct, n = 5 each, with and without APP ABILITIES/PREVIOUS TURN; score "acknowledges misroute" vs "denies"; record server prompt tokens.
  3. If H3's effect is small, cut APP ABILITIES to the Can: line or include it only when the user asks about abilities or signals confusion.
  4. Measure draft-edit recall with a held-out set of ≥ 30 edit phrasings written before looking at the lexicon.
  5. Check the journal after a week on intent-awareness-1 for task turns while in code mode (grade D).

Reproduce

npm test
npm run typecheck
npm run research:snapshot -- --out docs/research-log/metrics/2026-09-13.json