Skip to content

The lens: one transcript grammar for chat and the task room #252

Closed

Description

@santoshkumarradha

Status (checked 2026-09-12)

Landed

  • L1 — feed extraction: PR #259 — internal/tui3/feed.go; chat on the feed. Change entry: docs/changes/unreleased/259-lens-l1-feed.md.

Still open

  • L2 — room adopts feed; delete room.go mirrors.
  • L3 — one shaper + elbows.
  • L4 — lens + altitude.

(Lane checkboxes in the body below still list L1 open — treat L1 as done; L2–L4 remain.)


The chat and the task room were meant to be one conversation surface pointed at two speakers. The renderer is genuinely shared (deckRows has exactly three callers), but everything upstream drifted: room.go mirrors eleven event-ingestion functions from app.go and is the copy that fell behind — a room never learns a tool finished (EventToolFinished unhandled, so no "took 4s"), never sees retries or notices, pairs tool-ends by a different rule than chat, parses raw JSONL itself with hand-copied caps, and renders a steer as an ordinary new question so that on replay a correction is indistinguishable from the brief.

The full design — philosophy, decisions, rejected alternatives, and the owner's four rulings (2026-09-01) — is docs/design/lens/DESIGN.md (lands with lane L1).

The one-sentence design: one reducer and one renderer produce every transcript; a page differs from another only by a declared lens — the participant's (chat: dialogue at full fidelity, work folded) or the overseer's (task: trajectory at a glance, machinery one gesture down) — and a correction typed into running work is an elbow on both.

Rulings, settled:

  1. The task page folds settled work into phase chips by default; the machinery stays one keypress away (reverses the written no-fold law in workfold.go:26-52 and its three pinning tests).
  2. A room steer is an elbow (└ , drawn where said, opens no turn); the node journal gains a steer mark so replay stops lying.
  3. Args-match tool-end pairing on both surfaces (chat drops oldest-of-name).
  4. Every task steer confirms delivery: a short fading · delivered clause (the woke-a-parked-node sentence when that is the truer fact).

Lanes:

  • L1 — feed extraction. A feed type owns event → []entry for chat; no behavior change; tests stay green. Ships with the design doc.
  • L2 — room adopts feed. Delete the room.go:1098-1485 mirrors; room gains the missing events, durations, args-match pairing (ruling 3); the salience contract test lands ("a lens may lower salience; it may never drop a fact").
  • L3 — one shaper + elbows. Journal steer mark, room shaping moves beside the engine's rebuild, shapeRoomJournal and the copied caps die, room steers render as elbows with the delivery clause (rulings 2, 4).
  • L4 — lens + altitude. The lens struct replaces the scattered deck knobs; phase folds, header instrument, room spend into the HUD walk (ruling 1); rewrites roomwork_test.go with the design.

Each lane owes its docs/changes/unreleased/ entry and manual pages in the same change — the corpus currently describes the no-fold room and chat-only steering, and both claims stop being true along the way.


Drafted with CodeAF · reviewed and owned by the author

Activity

  1. santoshkumarradha commented on Sep 1, 2026

    @santoshkumarradha
    MemberAuthor

    L1 merged: #259 (design doc + feed extraction, dev @ ea25a27) with follow-up findings recorded on the PR. The steer-swallow fix (#273/#275) is also merged — its 'every task state answers a steer' law feeds Decision 2. L2-L4 remain open.

  2. santoshkumarradha commented on Sep 2, 2026

    @santoshkumarradha
    MemberAuthor

    Headless benchmark of this issue's L2–L4 brief (2026-09-02, dev @ 779ed01)

    Question asked: does aforge do on the dev binary land L2–L4 cheaper and faster than the Opus lanes (#337, #351, L4 pending)? Answer: no on both axes; nothing usable was produced. Crew: plan moonshotai/kimi-k3:high, work deepseek/deepseek-v4-pro, --yes-spend, 90-minute wall, stopped by hand at 32 minutes once the shape was clear.

    attempt brief wall spend files changed outcome
    1 the issue's lane text, 416 words 229 s $0.02 0 died at compile: compile intent: empty goal (#335)
    2 same content, one paragraph, ~230 words 31m53s, stopped $2.18 logged (+ the compile, whose row the log lost, #334) 0 one leaf, three budget exhaustions, zero writes

    The first attempt failed on brief shape. A brief in the form a person actually pastes did not compile; "headless is cheaper" means nothing when the ordinary brief does not get past the door.

    Where attempt 2's 32 minutes went

    phase wall note
    compile 2m22s first token 5 s, then 137 s writing 5,393 tokens; think ledger 99.6 s at effort low
    planning (kimi, 9 call kinds) ~6 min plan of one step for three lanes
    leaf attempt 1 2m24s 22 turns, all reads, 263K of 150K billed, 0 writes
    replan + gate ~1.5 min one step again
    leaf attempt 2 ~11 min 24 turns + restarts, 180K billed, 0 writes; runner: "nothing is changing, twice over"
    gate + resume 3 ~8 min gate refused an unchanged tree; leaf resumed anyway; 17 turns, 195K billed, 0 writes at stop

    Logged spend: kimi-k3 $1.29 (planning and five gate calls), deepseek-v4-pro $0.89 (113 calls, 44.6K output tokens). Between-call gaps inside a leaf were 0.1 s; no time was lost to routing or waiting.

    Findings, by cost (handed to the coordinator for assignment, not filed here)

    1. The planner collapsed a three-lane brief into one leaf, twice. Three lanes over a 3,508-line file to a single worker with the 150K default leaf budget; every later failure follows from this shape.
    2. Observation decay evicts reads the model has not acted on, so the leaf re-reads instead of writes. "prefix rewritten … this turn re-reads cold" 12 times across the traces; 200 shell calls, 186 unique; feed.go and workfold.go read six times each, the design doc and the issue three times each. Three budgets bought zero writes.
    3. The resume loop has no stop. After printing that carrying on changed nothing twice over, the runner paid a gate on an unchanged tree and resumed the same leaf a third time.
    4. The compile runs on the work model and thinks for ~100 s at effort low (already headless: a compile that comes back with a blank goal ends the run instead of using the person's own words #335's optional acceptance). Kimi answered planning calls in 10–20 s.

    Side findings from the same run, filed before the standing order: #334 (call log silently drops end rows carrying +Inf), #335 (blank goal ends the run instead of using the person's words).

    Comparison point

    The Opus lanes running the same three lanes in parallel opened draft PRs for L2 (#337) and L3 (#351) in the same window, each with real diffs against the design. The headless arm is the lower bound this issue's work should never be compared against favourably: it is the measurement that the harness, on this brief and this crew, does not write.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01QM1syvGCs7y5wRiXDD9xzy

  3. 5 remaining items

  4. santoshkumarradha commented on Sep 3, 2026

    @santoshkumarradha
    MemberAuthor

    L2, L3 and L4 merged into dev on 2026-09-02, in that order, each squash-merged after a full -count=1 suite on the rebased tip and a real-model e2e against the shipped default:

    Manual pages and change entries landed in each PR. Follow-ups recorded for after the freeze: #398 (hold-hint keys) and the missing decline on the switch to auto? offer. Once #341 puts the call id on tool-end events, feed.claimRunning can retire its by-order fallback.

    🤖 Generated with Claude Code

  5. added
    feature
    area:chat
    sev:serious
    on Sep 10, 2026
  6. added this to the Chat polish milestone on Sep 12, 2026
  7. AbirAbbas commented on Sep 16, 2026

    @AbirAbbas
    Collaborator

    Closing as completed. The four lens lanes landed as #259, #337, #351 and #355, and this issue's own 2026-09-02 comment records L2–L4 merged in that order.

    Checked on dev at 77293538c: the shared event reducer is internal/tui3/feed.go, the participant and overseer projections are internal/tui3/lens.go, and the task room draws a steer as a delivered elbow through internal/tui3/room.go. The salience, pairing, folding, elbow and delivery rulings are each pinned by a test (TestALensLowersSalienceAndNeverDropsAFact, TestAnEndPairsByArgumentsInTheConversationToo, TestATaskPageIsOneTurnWithElbowsAndTheConversationCountsQuestions, TestALandedRoomFoldsItsStretchOfWorkAndKeepsTheReply, TestEveryTaskSteerConfirmsDelivery). No acceptance item remains open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:chatfeaturesev:serious

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions