Record comment threads, and accept them as decisions
A thread is a server-owned record beside the plan, like a questionnaire's: a comment must not be undoable with the document, and the agent must not be able to rewrite what somebody said about its work. Notes are append-only, so there is no shared draft and no CRDT — only the two-phase claim, because accepting has to reach the record and the plan or neither. Anchors and passages are now rebased on the snapshot debounce, on an epoch rotation, and on open. Only edit_plan used to do it, so a block somebody moved stayed broken until the agent next happened to edit, and everything restored from disk was expressed in a history the new document did not have. Opening rebases before returning so a client joining a millisecond later resolves something; the flush broadcasts only when the snapshot actually moved. Chat.instruct lets a button start a turn: accepting is an instruction in a way prose is not, and the system entry it writes is what stops the agent appearing to move for no reason. A queued turn is asked whether its work is already done before it runs, so four accepted comments need not cost four passes. DEV_COMMENTS=1 marks a real phrase on room open.
Parent5e4c730
11 files changed+1224-23
StackedSplit