githubnext/chopinPublic

Let's compose rich plans together

Let people talk without the agent answering

Every message was a prompt, which is fine for one person driving a planner and
wrong for the two-person room this exists to demonstrate: "should we ask about
auth first?" is a question for a colleague, and it was starting a turn.

The agent now acts only when addressed with @chopin. Not @plan — plan is the
most common noun in the product, and "rewrite the plan section" would fire
every time.

What it is not addressed in still reaches it. Anything said since the last turn
is carried into the next one, so a room can settle something between themselves
and the agent turns up already knowing. A bare mention after a discussion means
act on that, which is how somebody says "ok, go" once the argument is over.

The rule lives with the protocol because both ends need it. The server decides
whether a turn runs and the composer says which it will be before anything is
sent — a prediction that disagreed with the decision would be worse than no
prediction, and the failure worth designing out is typing into what looks like
a prompt and being met with silence.

Verified against the real agent: two plain messages started no turn, then a
bare mention produced a plan recording the decision one of them had made,
attributed to the person who made it.
KCKrzysztof Cieslak authored
6d30eb3Patch
Parent735f346
7 files changed+309-17
StackedSplit
apps/server/src/chat/address.test.ts+129 −0
apps/server/src/chat/address.ts+54 −0
apps/server/src/chat/service.ts+42 −12
apps/web/src/chat/chat.tsx+36 −4
packages/protocol/address.ts+42 −0
packages/protocol/package.json+4 −0
packages/protocol/tsconfig.json+2 −1