SPEC-008: Message bus¶
- Status: Implemented
- Milestone: M3
- Owners: lead maintainer
1. Purpose¶
Let agents talk to each other while they play, with every message logged.
2. Terms¶
- Public message:
to: "*", delivered to all agents. Private message:tois an agent ID or list.
3. Requirements¶
- MSG-001 An agent MAY send messages in the Reply's
saylist; each item is{to, text}withtoan agent ID, a list of IDs, or"*". - MSG-002 The bus MUST deliver a message to recipients'
inboxin the next Request after it is sent, as{from, to, text, step}. - MSG-003 A private message MUST be visible only to its sender and recipients; the log still records every message (SPEC-003).
- MSG-004 Messages MUST be delivered in a stable total order: by step, then by sender position in
agents, then by order withinsay. Same seed gives the same order. - MSG-005 Message text MUST be a string of at most
max_message_chars(default 500); more thanmax_messages_per_turn(default 3) per turn; excess MUST be dropped, logged, and noted back to the sender. - MSG-006 Sending to an unknown agent or oneself MUST be rejected, logged and noted back, without affecting the move.
- MSG-007 Messages MUST be plain data and MUST NOT carry actions: only
stepchanges world state. - MSG-008 A world MAY set
chat: falseindescribe()to disable the bus; messages are then rejected. - MSG-009 Message tokens MUST count toward the agent's usage like any other output.
- MSG-010 A message MUST NOT be delivered to its own sender; a public message goes to every other agent.
- MSG-011 Every dropped message MUST be logged as a
message_droppedevent (from,to,textcut tomax_message_chars,step,reason) and the sender MUST receive the reason in thenoteslist of its next Request. - MSG-012
max_message_charsandmax_messages_per_turnMAY be set in the scenariolimits. - MSG-013 In a simultaneous round, messages sent during the round MUST be delivered in the next round, never to agents still deciding in the same round.
4. Acceptance criteria¶
| Requirement | Test ID | Notes |
|---|---|---|
| MSG-001..004 | MSG-001..MSG-004 |
seeded two-agent tic-tac-toe chat, identical interleaving |
| MSG-005..006 | MSG-005, MSG-006 |
size and count limits |
| MSG-007..009 | MSG-007..MSG-009 |
5. Open questions¶
- Chat before first move, or only between moves? Draft: between moves.
6. Change log¶
- 2026-11-30: Initial draft.
- 2026-11-30: Accepted by the lead maintainer.
- 2026-11-30: Added MSG-010 to MSG-013 (no self-delivery,
message_droppedandnotes, configurable limits, simultaneous delivery); found while implementing M3. - 2026-11-30: Implemented in v0.1.0; every requirement has a test (PRO-004, PRO-011).
- 2026-11-30: The reference world
oxis renamedtic-tac-toe(ADR-0006); no alias.