Skip to content

feat(workboard): answer node ticket questions in the same session - #41

Merged
tomorrowflow merged 2 commits into
mainfrom
feat/workboard-needs-input-round-trip
Oct 10, 2026
Merged

tomorrowflow merged 2 commits into
mainfrom
feat/workboard-needs-input-round-trip

Conversation

@tomorrowflow

Copy link
Copy Markdown
Owner

Problem

A node ticket session that ended with needs_input blocked its card. Nothing handed the questions to dev, and nothing resumed the session with an answer. This is the loop's "Questions" path (draft D10, D17, D27). Every question also counted as a block in the trust KPIs, so asking cost autonomy even when dev could answer.

Solution

Decided with the user in-session: review plus a questions handoff phase, comment authorship recorded, and dev woken by a board automation job.

  • Report: a needs_input report posts the questions as a card comment, sets the worktree handoff to {phase: "questions", askedAt}, releases the claim and moves the card to review. The node worktree stays.
  • Answer: a comment newer than askedAt plus a move to todo resumes the same session (same session key) in the same worktree. The brief opens with "Answers to your questions". This reuses the D56 reopen path (nodeTicketReopen / reopenNodeTicket), including the slot wait and the start-failure block. A move to todo with no answer, or a move to done, goes back to review with a comment naming the next step. No new status and no new model-facing tool.
  • Who answered: comments record source: operator through workboard.cards.comment, agent:<id> through workboard_comment. New nullable source column on workboard_card_comments, with ensureColumn for existing databases. Existing comments read back without a source.
  • KPIs: answered rounds are counted on the worktree (questions: {rounds, operatorAnswers}). A round with an operator comment among its answers is a human touch, so the ticket is not clean or autonomous. Agent-only rounds stay clean. WorkboardTrustCounts gains questionRounds and operatorAnswers; the Control UI trust table does not show them yet.
  • Turn contract: needs_input questions come with a proposed default, and the answer arrives as the next turn of the session.
  • Waking dev: the agent_end nudge already fires the board's automation job. After deploy, I'll create a voice-diary automation job for dev (with your go-ahead) and add the answering section to the workboard-ticket skill.

Review fix

A fresh review found that a start outside the handoff sweep (scheduled dispatch, or workboard.cards.start) claims the card before it replaces the questions worktree record. The sweep then took the running card for a finished import and deleted the node worktree and branch. handoffCard now skips questions like it already skipped published. The regression test fails without the fix (worktree gone) and passes with it.

Known gaps (not fixed here)

  • If a launch fails after prepare and the card is retried, the brief loses the answers section. The session still has its transcript under the same key. Rework rounds lose their feedback on retry the same way today; both need the cutoff carried past prepare.
  • Any operator.write client can set source on comments through workboard.cards.update metadata. That is within the operator trust boundary; agent tools cannot do it.
  • A mistaken move to done moves the answer cutoff, so an answer written before it must be repeated.
  • Archiving a questions card leaves its node worktree; the notice says so.

Evidence

  • New tests in node-ticket-handoff.test.ts (node ticket questions):
    • needs_input → review with questions → dev answers via workboard_comment → move to todo → same session key and worktree, answers in the brief → done report → import to review.
    • The no-answer and done moves bounce back to review, and an operator answer counts operatorAnswers: 1.
    • The worktree survives a start that claims the card first (red-first, as above).
  • trust-kpis.test.ts: an operator-answered round is not clean or autonomous; an agent-answered one is.
  • Two lifecycle-sync.test.ts cases updated from "needs_input blocks" to the new contract. The oversize-reason case now uses a blocked report.
  • pnpm test extensions/workboard --maxWorkers=1: 30 files, 437 tests passed, 2 m 39 s. node-ticket-handoff.test.ts alone: 19 tests in about 45 s, most of it the compiled build. The new tests run real git in temp repos, like their neighbors.
  • tsgo (extensions, extension tests, ui): no Workboard or UI errors. oxlint and oxfmt are clean.
  • Live proof after deploy: a throwaway voice-diary card whose notes force a question; dev answers it without the user, and the card reaches review.

🤖 Generated with Claude Code

tomorrowflow and others added 2 commits October 10, 2026 17:34
A needs_input report blocked the card, and nothing carried an answer back
to the session. Now the report posts the questions as a card comment and
moves the card to review with a `questions` handoff, keeping the node
worktree. A comment plus a move to todo resumes the same session in the
same worktree, with the answers in the brief; the D56 reopen path does
the start, slot wait, and no-answer bounce. A move to done is sent back to
review, since there is nothing to publish.

Comments now record their source: `operator` through the Gateway,
`agent:<id>` through workboard_comment. Answered question rounds are
counted on the worktree, and a round an operator answered is a human
touch in the trust KPIs; one an agent answered is not.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A start claims the card before it replaces the questions worktree record,
and the handoff sweep took that running card for a finished import and
removed its node worktree and branch.

Co-Authored-By: Claude Opus 5.5 (1M context) <[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.

1 participant