Skip to content

Make lf-ask a widget that asks in words, and retire the prose ask - #3114

Merged
max-sixty merged 3 commits into
mainfrom
ask-vs-on-me-vocabulary
Oct 17, 2026
Merged

max-sixty merged 3 commits into
mainfrom
ask-vs-on-me-vocabulary

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Second stage of taking "ask" out of Leaf's core: a widget registers what waits on the user, and the widget names its kind. Prose asks were the one source that wasn't a widget (a reply sent with --ask, or any thread an agent opened); they go, and lf-ask takes their place.

  • x-awaits gains reply and yields. With reply, the user's words answer the ask instead of its state: in a thread message, their next message there or a reaction whose token settles it; on the page, a user message in a thread opened inside it. The agent ends one answered elsewhere with leaf task end <page> widget:<id> done|dropped. With yields, a widget asks nothing while it holds another that declares x-awaits, so a frame around lf-options stays one ask.
  • lf-ask declares both, and x-word: "question". x-word now takes a fixed word as well as module, so a widget without a module can name its kind. The walk and the On panel read "Question".
  • --ask leaves leaf response reply and leaf thread reply. An answer that declares neither --done nor --todo must hold a widget that asks in its --markup (undeclared-answer). An agent-opened thread no longer waits on the user unless its markup holds an lf-ask.
  • An lf-ask with a heading and no widget is still refused as an empty frame, so a revision that drops the decision a frame held doesn't quietly turn it into a question.
  • A rewritten page question marked restated is asked again: only a message after the stamp that restated it answers it.

Behaviour that changes:

  • Each open question in a thread is its own item on On me (only the latest prose ask was).
  • An open question blocks sign-off like any widget ask.
  • Editing the words around a question no longer raises fresh news, since its markup is frozen.
  • Moving a thread after the user answered a page question doesn't unsay the answer.

The shipped instructions (threads.md, conversation-loop.md, authoring-asks.md, module-reading.md, the registry's handling text), events.md, CLI help, How it works, the galleries' seeded question and the eval cases follow; askedInWords joins the widget API. The reply event's ask field stays in the schema, written by nothing, until the next change renames the served ask records under a protocol bump.

Evals (Claude Code, 2 repeats, base = main): prose-review-handoff 2/2 vs 2/2; settled-review 0/2 vs 2/2, base failing because its instructions end only reply: ids; remaining-review 1/2 vs 0/2, both arms missing the case's per-proposal registration rather than anything about asking.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 17, 2026 00:52
The user's direction is that "ask" leaves Leaf's core: a widget registers
what waits on the user, and the widget names its kind. Prose asks were the
one source that wasn't a widget: a reply sent with `--ask`, or any thread
an agent opened. They go, and lf-ask takes their place.

- `x-awaits` gains `reply` and `yields`. With `reply`, the user's words
  answer the ask instead of its state: in a thread message, their next
  message there or a reaction whose token settles it; on the page, a user
  message in a thread opened inside it. The agent ends one answered
  elsewhere with `leaf task end <page> widget:<id> done|dropped`. With
  `yields`, a widget asks nothing while it holds another that declares
  x-awaits, so a frame around lf-options stays one ask.
- lf-ask declares both, and `x-word: "question"`: `x-word` now takes a fixed
  word as well as `module`, so a widget without a module can name its kind.
  The walk and the On panel read "Question".
- `--ask` leaves `leaf response reply` and `leaf thread reply`. An answer
  that declares neither `--done` nor `--todo` must hold a widget that asks
  in its `--markup` (`undeclared-answer`). An agent-opened thread no longer
  waits on the user unless its markup holds an lf-ask.
- An lf-ask with a heading and no widget is still refused as an empty frame,
  so a revision that drops the decision a frame held doesn't quietly turn it
  into a question; a question is its words alone.
- Behaviour that changes: each open question in a thread is its own item on
  On me (only the latest prose ask was); an open question blocks sign-off
  like any widget ask; editing the words around a question no longer raises
  fresh news, since the question's markup is frozen; moving a thread after
  the user answered a page question doesn't unsay the answer.
- The shipped instructions (threads.md, conversation-loop.md,
  authoring-asks.md, module-reading.md, the registry's handling text),
  events.md, CLI help, how-it-works, the galleries' seeded question and the
  eval cases follow; `askedInWords` joins the widget API.

The reply event's `ask` field stays in the schema, written by nothing,
until the next change renames the served ask records under a protocol bump.

Evals (Claude Code, 2 repeats, base = main): prose-review-handoff 2/2 vs
2/2; settled-review 0/2 vs 2/2, base failing because its instructions end
only `reply:` ids; remaining-review 1/2 vs 0/2, both arms missing the case's
per-proposal registration rather than anything about asking.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page question needs a way to withdraw an earlier word answer when its question is restated; the inline finding identifies the missing boundary.

Comment thread skills/leaf/scripts/leaf/asks.py Resolved
A comment answered a page question once and for good, so a version that
rewrote the question kept the old answer and never asked the revised one.
lf-ask now takes `restated`, and only a message after the stamp that last
restated it answers it (review on #3114).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 0d11a31 into main Oct 17, 2026
5 checks passed
@max-sixty
max-sixty deleted the ask-vs-on-me-vocabulary branch October 17, 2026 08:35
max-sixty added a commit that referenced this pull request Oct 17, 2026
The banner, chrome-layout.js, queue-panel.js, test_banner.py and
test_shortcut_bar.py stay deleted; main's changes to them move to where
that code now lives. The approval refusal ("Answer every open widget
before approving this work", #3112) is in page-status.js, and the
Layout-box wording of #3110 in page-layout.js's header. queue-panel.js's
row word has no successor, since the On view's cards name no kind, so
askWord serves the walk and the ask view only. test_banner's agent
question and test_shortcut_bar's walk words ("· Options", "Next item
waiting on me") are carried into test_key_surfaces.py.

In conflicted tests the branch's panel selectors stand and main's
fixtures and words apply: lf-ask questions in place of `ask: true`
replies, and walk positions naming the widget ("Options", "Question").
The registry and events.md keep the branch's panel wording with #3114's
x-awaits `reply`/`yields` and question-in-words rows. The status
explanation the leaf's menu shows counts what waits on the user as
"N to answer" rather than "N asks", which #3112 left only because the
banner was going. The kernel and the layer-contract snapshot are
regenerated.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 17, 2026
Since #3114 an agent's opening comment waits on the user only when its
markup holds an lf-ask, so the On view's message card and the `m` walk to
a thread the page draws nowhere had nothing to show. Their fixtures now
carry the question. The ask walk's command-reference line reads "Next
item waiting on me" since #3112.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 17, 2026
The `lf-ask` cutover in #3114 left browser tests expecting implicit
prose questions and the old “ask” label. This updates those tests to
register questions with `lf-ask` and read the widget’s “Question” label,
so the tests continue to cover the intended navigation, reply, and queue
behavior. It also checks the feature gallery’s one waiting thread and
keeps one question open while testing the On me filter.

The [failed main
run](https://github.com/max-sixty/leaf/actions/runs/39017954731)
reported 13 browser failures. Eleven are the stale expectations
addressed here; #3116 already corrected the command-reference wording
failure. The remaining viewport assertion in
`test_comment_follows_a_thread_standing_instead_of_an_earlier_draft[]`
passed on the unchanged runtime in the focused rerun, so this PR does
not claim to repair its intermittent failure; #3118 tracks that case.

Verification: the focused browser run passed 13 selected cases and
parameter variants. The remaining two had stale assertions; both passed
on a focused rerun after correction. The viewport test passed for both
parameter variants on the unchanged runtime.

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 19, 2026
…3171)

An audit after #3158 found names and prose that still used "ask" for an
On me item, and a few places that described the model before #3114.
Almost all of it is wording; the parts an agent or reader sees are
below.

**What an agent or reader sees**

- The `empty-question` and `untitled-question` findings said "an
enclosing lf-ask", but they fire for any widget declaring
`x-awaits.encloses`. They now say "this enclosing widget"; the element
is already named before the colon.
- `docs/how-it-works.html` said questions answered in words don't block
approval. Since #3114 such a question is an `lf-ask` item, and
`items.approval_blocking` counts it. The page now says so, lists resends
on On me, and no longer treats a thread's question as separate from
items. The feature gallery's On me paragraph says the same.
- Shipped references:
  - "an `lf-ask`" instead of "an Ask" (`module-scroll-and-motion.md`);
- "update or to-do" where "item" meant what `leaf task start` takes
(`event-batches.md`, `harness-codex-app-server.md`, `leaf task start
--help`);
  - `resend` added to `module-reading.md`'s row kinds;
  - "My turn to answer" in `threads.md`.
- Eval prompts and grader criteria say `lf-ask`, item or decision where
they said Ask; the `detail_names_ask` metric is `detail_names_item`.
These cases weren't re-scored.

**Names and comments**

- #3158's codemod renamed `thread_titles.ASK`, the line that asks for a
thread title, to `ITEM`. It is `ASK` again.
- `x-ask-context`'s "context" survived as `item_context_errors` /
`context_of` and in prose in `items.py`, `events.md` and `instances.py`.
Those now name the enclosing widget.
- Renamed or reworded:
  - `lf-tabs`' item watcher;
  - `version.js`'s item standing;
  - `application.ts`'s inventory order;
  - `events.md`'s plan steps;
- the `queues.py` header, which now says rows, since a to-do is never an
item;
  - test names, docstrings and JS variables that held an item.
- Notes now cite `readItems`, `itemActions`, `items.py` and
`authoring-decisions.md` instead of the removed names.
- A test line checking that `--ask` is refused is gone; the option no
longer exists.

**Checks run:** runtime (496 passed), browser framework (115), `pnpm run
check`, `tests/model` + `tests/smoke` (1602), and the six browser tests
whose strings changed.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 26, 2026
The reaction test creates two threads through the same fixture, which
bypasses markup admission and reused `id="forty-enough"`. This produced
two widget obligations with the same identity; opening On me then
nominated the same thread message twice and failed presentation. Each
fixture ask now derives its id from its thread root.

The reported test fails with the duplicate-nomination diagnostic before
this change and passes after it. All four tests using the helper pass,
with their reaction assertions unchanged. Ruff 0.16.1 lint and
formatting checks pass.

The fixed id entered the helper in #3114 when prose asks became widgets.
This preserves that intent and leaves runtime behavior and the
primary-reader uniqueness guarantee unchanged.

Closes #4165 — automated triage

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants