Repository navigation
Make Build a document view that drafts its own tasks - #450
Merged
Merged
Conversation
`implementation:draft` starts a Planner turn from an instruction the server writes from the plan, the way an accepted comment does: Chat records a system line saying who asked, never a member message, and a queued draft stays out of the visible queue. The handler rechecks write access and the room exactly as a Chat message to the Planner does (both now share `plannerWritable`), refuses child documents, unsettled plans and active implementations, and persists the notice before the turn starts or queues. One draft per document is live, whatever revision it was asked for, since its instruction reads the latest document; asking again returns it, so collaborators asking together start one turn. Drafts share Chat's send and queue limits even while the Planner is idle. `implementation:drafting` broadcasts queued, running and ended, after the turn's own save, and a reply says `ended` when the turn finished before the request was answered. The implementation snapshot also carries `startedBy`, the requester's login, so a build in progress can say who started it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Build panel keeps its place beside Document and Decisions but no longer carries the old dialog's controls. It shows one status line with at most one action, then the tasks: drafting, blocked (links to Decisions or the Document), review with "Build on my laptop", building (started by whom, for how long), needs attention (try again before the claim, or return to planning while the run holds the lock), and built. Rows are disclosures; active and blocked rows open themselves, and a #task link opens Build on that task once the document has content. Opening Build asks the Planner for tasks through `implementation:draft`, at most once per visit and only for the need the first read of that visit saw, after the Chat transcript has loaded and never while the Planner is in a turn. A document edited while Build stays open keeps its old tasks, dimmed, with Update tasks. The request is followed by id until its turn ends; a refusal the server explains appears as plain copy, anything else as a failed draft with Try again. Without a connected local agent, the build button shows the connector command to start. Build stays focusable when the document is empty, with an accessible reason, in both the segment control and the compact navigation. The panel replaces ImplementationPanel and its stylesheet. The workspace.tsx design-contract hash is renewed: its ChatToggle and chat presence class owners are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Build becomes a calm third view (Document · Decisions · Build) in place of the old implementation panel, and asking the Planner for tasks no longer posts a message in Chat.
#123PR capsule, and expand to the goal and acceptance criteria.implementation:draft(new wire request, declared inpackages/protocol/implementation.d.ts). The server writes the Planner instruction itself, checks write access the same waychat:senddoes, and keeps one live draft per document under the same send and queue caps. Chat shows only a system note such as “@ana asked Chopin to break the plan into tasks.”startedBy(the GitHub login).This builds on main’s
05555f7b(Build as a workspace panel) and keeps itsWorkspaceDocumentViewplumbing and the Chat-left layout.Not in this PR
Progress count on the segment, sync status, the one-click Build plan button, the builder role, and Jev auto-spikes. The living-document work will build those on top of this.
Review notes
workspace.tsxsourceHashinscripts/design-contract/exceptions/dynamic-web.jsonis renewed. The ChatToggle and chat-presence classes it covers are unchanged. Maggie approved this.plannerWritable()), a server-written instruction, persisting before broadcasting, and turn spam (dedupe plus caps).Tests
bun test: 4463 pass, 4 skipped.bun run ciandbun run types: pass.implementation-launcher,harness,responsive-workspace,experiments,conversation-plan-layoutandshell: 59 passed, 1 skipped (the opt-in live test).Screenshots
How drafting works
sequenceDiagram participant B as Browser (Build view) participant S as Server participant P as Planner participant C as Chat B->>B: Open Build (once per visit, snapshot fetched this visit, chat history loaded) B->>S: implementation:draft {requestId, planRevision} S->>S: plannerWritable() — same write/role checks as chat:send alt a draft is already live for this document S-->>B: existing draft (deduped) else S->>C: persist system notice "@ana asked Chopin to break the plan into tasks." S->>P: queue Planner turn with server-authored instruction (send + queue caps) S-->>B: {state: queued | running} P->>S: edit_implementation_graph (draft tasks) S-->>B: implementation:drafting ended (after turn persisted) B->>S: GET snapshot → Review: "N tasks · Build on my laptop" end🤖 Generated with Claude Code