Skip to content

Ask if they're ready to build, instead of pointing at a button that left - #10

Open
debtn wants to merge 1 commit into
mainfrom
claude/plan-build-readiness
Open

Ask if they're ready to build, instead of pointing at a button that left#10
debtn wants to merge 1 commit into
mainfrom
claude/plan-build-readiness

Conversation

@debtn

@debtn debtn commented Sep 3, 2026

Copy link
Copy Markdown

Small, self-contained fix to the plan → build handoff. One commit, four files.

The bug

The invitation outlived the button. A drafted plan lands with Build this plan under it — then the person does what plan mode is for:

"Can we add a way for neighbors to say which tools they lend?"

The refinement comes back as a short conversational reply. The action was pinned to a last message shaped like a plan document, so it vanished with the document — while the prompt kept telling every reply to end by inviting them to press it. The reply said press Build this plan, and there was nothing to press.

(Worth stating, since it was the reported worry: pressing it would not have lost the later edits. The build send carries the whole conversation, so "the plan above" has always meant the plan as it now stands. The edits were always included; there was just no door.)

The action belongs to the plan, not to one message

Once a plan document has been drafted, every settled plan reply carries the action, and it stays until the plan is built. The one exception is a reply that asked questions — that wants answers, not approval. That rule already governed existing projects, so this makes it one rule instead of two.

The better half is not needing the button

Refinement replies now close by asking"Anything else to change, or ready to build?" — as a one-tap card, using the answer-card machinery plan questions already render.

Its yes is not an answer to relay: tapping Ready to build starts the build, rather than spending a whole reply to say "yes" and get a button offered back. So the readiness question hides the action while it's open, and is the press while it stands. "Something else…" sits beside it for another change, and typing a change works as it always did.

Both doors open the same way (build-from-plan.ts): mode flips, the build message rides the queue plan answers already use — one send path, not two. A phrasing the matcher doesn't recognise sends as an ordinary answer, and the action is still underneath, so a miss costs a round trip, never a build nobody asked for.

Files

  • src/components/Chat/build-from-plan.ts — new; one definition of what building the plan means, plus the readiness matcher
  • src/components/Chat/MessageList.tsx — the action survives refinements; the readiness card's yes is the press
  • src/components/Chat/ChatPanel.tsxhandleBuildPlan delegates to the shared definition
  • src/knowledge/context-builder.ts — both plan prompts: ask, don't point at a button

Verification

Driven in Chromium (Playwright) against the dev server — six scenarios, zero page errors:

Scenario Result
Action present after a refinement reply ✅ the reported bug
Still present on the drafted plan ✅ no regression
Absent before any plan exists ✅ nothing to build yet
Readiness card hides it, offers "Something else…" beside the yes
Tapping the yes sends the build prompt, not the words ✅ first-build prompt from scratch, delta prompt on a built project
An ordinary question still relays its answer, stays in plan mode

tsc -b and vite build clean. eslint on the touched files sits at the same pre-existing problems as an untouched tree — none in the new code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RFnFvBZPsVQjc5Xwj7H9nZ


Generated by Claude Code

The invitation outlived the button. A drafted plan landed with "Build this
plan" under it, and then the person did what plan mode is for — "can we add a
way for neighbors to say which tools they lend?" — and the refinement came
back as a short conversational reply. The action was pinned to a last message
shaped like a plan DOCUMENT, so it vanished with the document, while the
prompt kept telling every reply to end by inviting them to press it. The
reply said press Build this plan; there was nothing to press.

Two halves.

The action now belongs to the plan, not to the message it first appeared
under. Once a plan document has been drafted, every settled plan reply
carries it, and it stays until the plan is built — which is honest, because
the build send carries the whole conversation: "the plan above" has always
meant the plan as it now stands, refinements included, not the first draft of
it. The one exception is a reply that asked questions, which wants answers
rather than approval; that rule already governed existing projects and now
governs both, so there is one rule instead of two.

The better half is not needing the button. Refinement replies now close by
asking — "Anything else to change, or ready to build?" — as a one-tap card,
with the answer options the plan-question machinery already renders. Its yes
is not an answer to relay: tapping "Ready to build" starts the build, rather
than spending a whole reply to say "yes" and get a button offered back. So
the readiness question hides the action while it is open and IS the press
while it stands.

Both doors now open the same way (build-from-plan.ts): mode flips, the build
message rides the queue the plan answers already use. A phrasing the matcher
does not recognise sends as an ordinary answer and the action is still
underneath — a miss costs a round trip, never a build nobody asked for.

Driven in Chromium: the action is there after a refinement (the reported
bug), still there on the drafted plan, and absent before any plan exists; the
readiness card hides it, offers "Something else…" beside the yes, and its tap
sends the build prompt rather than the words — the delta prompt on a built
project, the first-build prompt from scratch; an ordinary question still
relays its answer and stays in plan mode. Zero page errors across all six.
tsc -b and vite build clean; lint at the same three pre-existing problems in
MessageList, none in the new code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFnFvBZPsVQjc5Xwj7H9nZ
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
relational-builder Ready Ready Preview Sep 3, 2026 6:01pm UTC

Request Review

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