Repository navigation
feat: rooms, promise badges, handoff and decision cards on threads - #202
nullStack65 wants to merge 3 commits into
Conversation
A thread can now facilitate a room of two or more bot threads. The room's own agent fans each founder message out with t3_thread_send / wait / read, and on close it returns a Linear comment and a memory entry for the facilitator to write. Threads can also carry promises with due times (red when overdue), a handoff (from, to, what, due), and a founder decision can list options with effects and a recommendation. All of it is one optional `collaboration` field on the thread, written through the existing thread.metadata.update command and the t3_thread_update MCP tool (new `collaborate` action). No new event types, services or migrations. The web shows it as composer banner cards. Model: claude-opus-5-5 Task: feat Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
The collaborate path refused missing, deleted and self room members without a test. Cover those refusals, open then close with the returned Linear and memory record, and the refused second close. Model: claude-opus-5-5 Task: test Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note 🤖 grok-4.7 responding on behalf of nullStack65 Independent review of Forks and subagents copy an open room and then fan out as if they facilitated it. Opening a room again after close deletes the close record. One Important
Nits
Checked
Tests Node 26.13.1 for the web test. Node 22.22.1 for the rest.
Checks On |
- Forks and subagents no longer copy the source thread's room, promises or handoff, so their turns carry no facilitator note. - open_room is refused once a room is closed, so the close record stays. - collaborate command ids include the sub-action, so one clientRequestId can open and then close a room. - The thread shell built from a projection carries collaboration. - Decision option labels are single-line, and a pick drafts Decision, Review or Approval to match the ask. Model: claude-opus-5-5 Task: fix Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Repair note for the review above, pinned to head Important
Nits
Checks run on Node 26.13.1: typecheck passes for contracts, server, web and provider-core. Tests: contracts 40 of 40; |
Hold merging until the release-line freeze lifts at 2026-11-25 22:00 UTC.
A founder can now talk to several bots in one place, the bots can show what they promised and when it is due, and a founder decision can show its options. Until now each bot conversation was separate, and nothing on a thread showed promises, handoffs or decision options.
What it adds
t3_thread_send, waits witht3_thread_wait, reads the replies witht3_thread_read, and answers with each member's view by name plus a short synthesis. On close,t3_thread_update(actioncollaborate,close_room) stores the summary and decisions and returnsroomRecord: a Markdown Linear comment for the named issue and a memory entry. The facilitator then writes both with its own Linear and memory tools.set_promise/keep_promise. The card turns red when a promise is overdue. It re-renders once at each due time with no polling (newuseNowAcross, built on the existing deadline store).set_handoff: from → to, what, and an optional due time (red once overdue).nullclears it.request_decisionaccepts optionaloptions(2 to 5{label, effect}) and arecommendationthat must name one of them. The asked founder sees the options with their effects, and the recommended one is highlighted. Picking one insertsDecision: <label>(orReview:/Approval:, to match the ask) into the composer, so the founder still sends the reply, and the reply closes the ask as it does today.Design note
Data model. There is one optional
collaborationfield on the thread (packages/contracts/src/threadCollaboration.ts):{ room?, promises?, handoff? }. A room is{topic, members: ThreadId[], linearIssue?, openedAt, closedAt?, close?: {summary, decisions[{text, owner?, dueAt?}]}}. Promises are{id, text, dueAt, owner?, keptAt?}, with at most 10 open at once. A pureapplyCollaborationUpdateruns in the decider and leaves the state unchanged on an invalid update, so a replayed command can't fail. A stored value that a later rule rejects decodes as{}.What it reuses.
thread.metadata.updatecommand andthread.metadata-updatedevent, with no new event types. The thread row stores its payload as JSON, so there is no migration.t3_thread_updateMCP tool, with one new action.Tradeoffs.
t3_thread_sendalready does. The cost is that turn-taking is only as fair as the facilitator's prompt. A server-driven fan-out would be stricter and much larger.close_roomreturns the exact text, and the facilitator posts it with its own connectors. If the agent stops between closing and posting, the record is still on the thread but not yet in Linear or memory.t3_thread_updateinput schema grows by 1,437 bytes. See "Needs sign-off".Needs sign-off: agent context budget
src/provider/AgentContextBudget.test.tsfails on this branch. I did not changeagentContextBudget.json. That is a maintainer decision. The release line was already over before this change: the base measures 61,917 bytes against a committed 61,564. That 353-byte gap came from the sidebar change for standing bots (#160, 858979b), which grew thecreate_threadsandt3_thread_launchinbox text without updating the budget. This PR adds 1,437 bytes: 1,172 for the typedcollaborationproperty, 212 for the decision options, 39 for the tool description sentence and 14 for the new action name. Only about 140 of those bytes are description text. Shortening my own descriptions saves 81 (measured, not applied). Trimming the five longest or duplicated existing tool texts saves 868 more (measured, not applied), which still leaves the total 841 bytes over.Not in this PR
Verification
ProjectionStore.tscode this PR doesn't touch.threadCollaboration.test.ts,threadInbox.test.tsandthreadMetadataMcp.test.tspass, 38 of 38.Orchestrator.control-reads(including a new room round-trip through the decider and the shell),ProviderTurnStartService,McpToolAccess, orchestratortools,DelegationNudgeandAgentContextBudget. 200 of 201 pass; the one failure is the budget test above.useDeadline.browser.test.tsxpasses, 2 of 2.ThreadMetadataMcpService.test.ts(new) coverst3_thread_updatecollaborate: refusing missing, deleted and self members before dispatch; opening and closing a room with the returned record; and refusing a second close. 3 of 3 pass. The member test fails when the member check is disabled.open_room, andcollaboratecommand ids include the sub-action. Each has a test that fails without its fix. Contracts 40 of 40, andThreadMetadataMcpService,SubagentProjection,ThreadForkServiceandOrchestrator.control-reads70 of 70.Deploy: fleet
Model: claude-opus-5-5
Task: feat
🤖 Generated with Claude Code