Skip to content

Make Build a document view that drafts its own tasks - #450

Merged
MaggieAppleton merged 4 commits into
mainfrom
redesign-explore-build
Oct 10, 2026
Merged

MaggieAppleton merged 4 commits into
mainfrom
redesign-explore-build

Conversation

@MaggieAppleton

@MaggieAppleton MaggieAppleton commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

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.

  • One status line, then a checklist. Drafting → blocked (links to the decisions or comments to resolve) → review (Build on my laptop) → building (“started by @login”) → stopped (Try again / Return to planning) → “Built · N pull requests”. Rows show a state dot, the title and a #123 PR capsule, and expand to the goal and acceptance criteria.
  • Tasks are drafted automatically, once each time someone opens Build. If the document changes while Build is open, it offers Update tasks instead of redrafting.
  • No bookkeeping in the UI: no Refresh, no Prepare tasks, no workspace picker, no session IDs or raw state names. The viewer’s own available workspace is picked automatically (the server already filters to it).
  • implementation:draft (new wire request, declared in packages/protocol/implementation.d.ts). The server writes the Planner instruction itself, checks write access the same way chat:send does, 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.”
  • The implementation snapshot gains startedBy (the GitHub login).

This builds on main’s 05555f7b (Build as a workspace panel) and keeps its WorkspaceDocumentView plumbing 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

  • Design contract: the workspace.tsx sourceHash in scripts/design-contract/exceptions/dynamic-web.json is renewed. The ChatToggle and chat-presence classes it covers are unchanged. Maggie approved this.
  • Security: reviewed for authorization (shared plannerWritable()), a server-written instruction, persisting before broadcasting, and turn spam (dedupe plus caps).

Tests

  • bun test: 4463 pass, 4 skipped.
  • bun run ci and bun run types: pass.
  • E2E: implementation-launcher, harness, responsive-workspace, experiments, conversation-plan-layout and shell: 59 passed, 1 skipped (the opt-in live test).

Screenshots

Review: two tasks and Build on my laptop Drafting: Breaking the plan into tasks, with Chat showing only a one-line notice
Blocked: Answer 1 decision first Building: started by you, one task done with PR #412, one in progress and expanded
Done: Built · 2 pull requests A task row expanded to its goal, acceptance criteria and dependency

Phone layout with Build in the bottom navigation

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
Loading

🤖 Generated with Claude Code

MaggieAppleton and others added 3 commits October 10, 2026 09:32
`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>
@MaggieAppleton
MaggieAppleton enabled auto-merge (rebase) October 10, 2026 11:09
@MaggieAppleton
MaggieAppleton merged commit f15133a into main Oct 10, 2026
3 checks passed
@MaggieAppleton
MaggieAppleton deleted the redesign-explore-build branch October 10, 2026 11:21
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.

1 participant