Skip to content

chat: a question opens into a page you can read, compare, annotate and ask back at - #737

Merged
santoshkumarradha merged 3 commits into
devfrom
feat/questions-s2
Sep 9, 2026
Merged

santoshkumarradha merged 3 commits into
devfrom
feat/questions-s2

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Lane S2 of the questions wave. Builds the room form from docs/design/questions/DESIGN.md on top of lane E1's session.Question (#712).

What lands

The page (internal/tui3/questionroom.go) — a view over the conversation in the task-room idiom. Head with the amber ?, the four attribution facts (asked by · why now · what waits on it · what goes on without it), answers as ▸/▾ sections opening on the asker's pick with its reason, confidence and would switch if…, and a foot pinned above the box exactly where every other question on this surface sits.

It is never modal: the turn keeps streaming, the box stays live, a bare letter is an answer only over an empty box, esc is later and restores the conversation with its scroll untouched. The settle guard drops the first 250ms of keys.

x compare (questioncompare.go) — the asker's Dimensions as a table, differences only, with the fallback deriving rows from the +/− consequence lines askers actually write. Stacks under 80 columns. Not offered at all where there is nothing to compare.

c comment · ? ask back — a note under the part it was pressed on in the person's ink led by ›; one exchange per answer sent through the ordinary turn with the question still open, the reply drawn in place with ↳ and read live off the transcript rather than frozen on the first frame. Both ride the answer into the record.

d you decide shows the pick and the asker's reason before the second press hands over, and records DecidedBy: asker. n returns Answer.Reframe.

The four input shapes (questioninput.go) — blanks as a sentence with holes validated by their kinds, a checklist that ticks/suggests/orders, pairs whose third answer is = (it does not matter), and a dial with a sentence under it saying what the setting does — drawn as a number on the reader tier.

Six block kinds (questionblocks.go) — text, diagram (never reflowed), table, diff (the diff glyphs and tokens), image (reuses app.pictureRowsFor; path + o open where it cannot paint), layout (two panes above 100 cols, stacked below).

The key table (questionkeys.go) — DESIGN.md's ONE KEY GRAMMAR spelled once, read by the offer row and filtered by the emptiness law. Lane S1 should import this rather than write a second one.

Beyond the lane, and why

  • internal/remote gains ResolveQuestion — one wire frame carrying session.Answer whole, with the optional-door pattern the task and sub-harness frames already use. Every local chat window holds a *remote.Agent; without this the page could be read and answered nowhere. Found by running the real binary.
  • tokens.GReplyIn (↳) — a new prompt slot, geometry, one cell under both rulers, with the icons DESIGN.md table updated in the same change.
  • welcomeFits returns false under the page, or the greeting is drawn through it.

Manual

internal/manual/chat/questions.md gains ten sections and loses the denial that said no such page existed. Nine new probes; task-rooms-after-restart.md got the asker's own words back into one heading so it says aforge is deciding still reaches it.

Verified

go test ./internal/tui3/ -count=1 -timeout 15m (419s), ./internal/remote/, ./internal/manual/, ./internal/tui2/tokens/, make test-laws, make test-quick, go vet ./... — all green. Thirteen screens captured from bin/aforge in tmux against deepseek/deepseek-v4-flash and rendered to PNG (screens/, not committed): reading, compare wide + narrow, comment + a live ask-back reply, composing, you decide, blanks, checklist, pairs, dial, layout wide + narrow.

Two bugs were found by looking at the screens, not by the tests: the page ate the first two letters of every comment (c then only… lost the o to the fold and the n to the reframe), and an ask-back reply froze on ↳ Let me because it was snapshotted out of a still-streaming entry. Both are fixed and pinned.

Owed

  • D (decide this kind from now on) says it is not built. The dial lives in lane E2's autonomy.json.
  • AnswerOption has no Suggested bool, so a on a checklist takes the pick and whatever is marked Safe — the closest honest reading of the object as it stands.
  • internal/tui3/questiondemo.go is a fixture door (AFORGE_QUESTION_DEMO) in the spirit of make demo-home, so the page could be looked at before anything raises a real room-form question. It goes when E2's ask tool and S1's cards land.

🤖 Generated with Claude Code

santoshkumarradha and others added 2 commits September 9, 2026 17:36
…d ask back at

A question whose evidence is three paragraphs, a diagram and a diff per answer
does not fit on a card. This is the room form from docs/design/questions/DESIGN.md:
a page over the conversation, head and attribution, answers as sections, `x`
compare on the asker's own dimensions, `c` comment, `?` ask back with the question
still open, a foot that composes `pick · with · notes · scope`, `d` that shows the
pick and its reason before it hands the decision over, and the four structured
input shapes below a question — blanks, checklist, pairs, dial.

It is a view and never a modal: the turn keeps streaming, the box stays live, and
`esc` restores the conversation with its scroll untouched.

`internal/remote` gains `ResolveQuestion` — one wire frame carrying `session.Answer`
whole — because every local chat window holds a `*remote.Agent`, and without it the
page could be read and answered nowhere.

Co-Authored-By: Claude Opus 5 <[email protected]>
S1 (#734) landed the block and the ONE KEY GRAMMAR table. The room now reads
that table rather than the one it had — its own five keys (`a`, `b`, `=`, `n`,
`shift+↑↓`) moved into it, along with a second `←→` row for the shapes whose
arrows move a value rather than a cursor — and `app.openQuestionRoom`, which
folded the question to the chip because the page did not exist, opens the page.

`ONE KEY, ONE MEANING` becomes `one meaning at a time`: two rows may share a key
where their forms cannot overlap or their conditions can never both hold, and
the law's test proves that against every shape a question can take.

`questionToggleKey` was `" "` and bubbletea spells the space bar `space`, so the
comparison matched no press at all — found the moment the room became the first
form to route it.

`D` keeps both halves of its promise now that E2's autonomy door (#728) has
landed: it writes the shape into the project's settings through
`session.Agent.SetAutonomy` — carried over the wire by a new `MethodSetAutonomy`
— and answers the question in front of the person.

Co-Authored-By: Claude Opus 5 <[email protected]>
@santoshkumarradha
santoshkumarradha merged commit 41489e6 into dev Sep 9, 2026
3 checks passed
@santoshkumarradha
santoshkumarradha deleted the feat/questions-s2 branch September 9, 2026 22:55
santoshkumarradha added a commit that referenced this pull request Sep 9, 2026
…ame-either-way

Rebasing the reach lane over the room (#737) put two keys under one name:
the room's `=` (same either way, on a pair) and the sheet's `g` (the same
answer for every row like this). The sheet's is now questionSpreadKey, so the
one key table still has one name per act.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Sjru7qi9iUmnXZexBDRxJE
santoshkumarradha added a commit that referenced this pull request Sep 9, 2026
Rebasing onto the room (#737) put two lanes' answers to the same two questions
beside each other:

- `D` wrote this project's rule twice — once silently through the room's
  `questionDialDoor` and once through `dialKind`, which also SAYS what it wrote
  and reports the engine's refusal. The silent write is gone and `autonomyAgent`
  widens `questionDialDoor` rather than sitting beside it, so the key and the
  sheet cannot ask two different objects whether this project keeps rules.
- `questionSameKey` was taken by the room for `=`. The sheet's key is
  `questionAlikeKey` (`g`), and the two are genuinely different acts: `=` is a
  rule about the future, `g` is these rows taking the answer just given.
santoshkumarradha added a commit that referenced this pull request Sep 9, 2026
…answer-wins (#733)

* Questions: reach — one delivery rule, the sheet, /autonomy and first-answer-wins

Lane S3 of the questions wave. Where a question is seen and answered away from
the conversation that raised it, and when it arrives.

- questiondelivery.go is the ONE presence rule: on the page, on another page,
  or away (ten minutes without a key) — the dial takes what it may, the rest
  reach home, the notification and one bell for a blocking question.
- questionsheet.go is the batch form: quiet questions raised inside one step
  arrive together at its boundary, grouped by shape, with `enter`, `s` and `g`.
- The `ask` lane is drawn: a real run had two ask calls waiting with nothing on
  any screen to answer them with.
- /autonomy reads and writes this project's rules; `D` writes the rule its word
  promises; a row under one wears `· your rule` beside its clock.
- Confirmation and clarification are refused a clock at the engine's own door,
  on the write and on the read.
- First answer wins, drawn: another window's answer says so, and two answers
  inside a second are both shown rather than merged.
- Home answers every lane through ResolveQuestion rather than the three it knew.

* Questions: the sheet is answerable in place, and a batch cannot deadlock

Three things a real run against deepseek/deepseek-v4-flash found, all of them
in this lane's own half:

- A question held for "the model speaking again" was held forever when the
  question was the thing holding that step open — the `ask` tool blocks its
  turn. The hold is bounded by three seconds now and fires on whichever comes
  first, so a batch always arrives.
- The sheet had no way to answer a row: `enter` took the row OUT of it, so the
  ✓ mark, `s`'s count and `g` were all unreachable. Every row wears its own
  answers now and the digits answer the focused row in that question's own
  keys, walking on to the next row still waiting. `g` spreads the last answer
  GIVEN rather than the focused row's, which is the same row one keystroke ago.
- `AskQuestion` banked the word book and not the presence row, so home drew a
  conversation with three questions waiting on it as `working`.

And the sheet's answers column is set by the longest sentence on the sheet
rather than by the right edge: right-aligning put `allow once` a hundred cells
from the question it answered on a 160-column terminal.

* Questions: one autonomy door and one name for the sheet's spread key

Rebasing onto the room (#737) put two lanes' answers to the same two questions
beside each other:

- `D` wrote this project's rule twice — once silently through the room's
  `questionDialDoor` and once through `dialKind`, which also SAYS what it wrote
  and reports the engine's refusal. The silent write is gone and `autonomyAgent`
  widens `questionDialDoor` rather than sitting beside it, so the key and the
  sheet cannot ask two different objects whether this project keeps rules.
- `questionSameKey` was taken by the room for `=`. The sheet's key is
  `questionAlikeKey` (`g`), and the two are genuinely different acts: `=` is a
  rule about the future, `g` is these rows taking the answer just given.

* Questions: the change entry names the D-writes-once fix

* Questions: D needs somewhere to keep a rule, not a reader for it

Collapsing the two autonomy interfaces made `dialKind` ask for the READ as
well as the write, which took `D` away from a session that can keep a rule and
whose surface has no reader on it — the exact narrowing questionDialDoor's own
comment exists to protect, and `TestDecideThisKindShowsTheShapeAndAnswersNothing`
named it. `D` asserts the write door; only `/autonomy` asserts both.
@santoshkumarradha santoshkumarradha added the area:chat The v3 surface a person sits in front of (internal/tui3) label Oct 3, 2026
@santoshkumarradha santoshkumarradha added this to the Chat & connections milestone Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:chat The v3 surface a person sits in front of (internal/tui3)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant