@mrciphersmith/roomyx 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,97 @@ patch and never a minor. The rule, the reason, and an audit of the four of seven
13
13
  releases that followed it are in
14
14
  [`docs/roomyx/versioning.md`](docs/roomyx/versioning.md) and decision D-13.
15
15
 
16
+ ## [0.11.3] — 2026-09-11
17
+
18
+ A patch, and a deliberately partial one: it makes a known gap visible instead of
19
+ pretending it is closed.
20
+
21
+ ### Added
22
+
23
+ - **`roomyx room append` says when a live room is serving the log.** One line on
24
+ stderr, naming the room. It does not refuse.
25
+
26
+ 0.11.2 recorded that the D-18 writer guard cannot engage for the agent
27
+ workflow: a dispatcher runs `roomyx serve` and writes with `roomyx room
28
+ append`, a fresh process each time, so it never holds a lease and the room
29
+ never reports a dispatcher. What went unsaid is that `append` had already
30
+ worked out that a room was serving the log — and, when no lease was held,
31
+ threw that away without a word. So every append into a room an agent was
32
+ running looked, from the command line, exactly like an append into an
33
+ unattended file.
34
+
35
+ A note rather than a refusal, because nothing at that point can tell a
36
+ dispatcher from a stranger; refusing would block the legitimate writer, which
37
+ was tried in 0.11.2 and reverted. The log is safe either way — `seq`
38
+ allocation is under a lock and three racing writers are tested. What the note
39
+ protects is the conversation: two dispatchers produce a transcript where every
40
+ message is intact and the discussion is nonsense.
41
+
42
+ It goes to stderr because stdout carries `Appended seq N from X` and is
43
+ parsed. Both facts — that the note appears, and that it stays off stdout — are
44
+ pinned by a test and mutation-checked.
45
+
46
+ ### Still open
47
+
48
+ The underlying decision is unchanged: there are two dispatcher models and only
49
+ the embedder one is expressible. Closing it means a dispatcher identity that
50
+ survives across processes — a token minted at `serve` and carried by every
51
+ `append`, or a lease refreshed by the write itself rather than by a heartbeat.
52
+ Either is a protocol change and wants its own decision record.
53
+
54
+ ## [0.11.2] — 2026-09-11
55
+
56
+ A patch. The bundled skill had drifted behind the server it drives, and the
57
+ symptom was visible from the outside: a room that gets created, then waits for a
58
+ second command to be populated, then retells itself into the chat.
59
+
60
+ ### Fixed
61
+
62
+ - **The skill no longer narrates the room into the conversation.** Step 5 of the
63
+ turn loop ordered a report after essentially every substantive exchange, with
64
+ quotes. That was right when a chat message was the only way to see a room.
65
+ roomyx exists now: the owner watches the transcript live, with scrolling,
66
+ search and per-participant filtering, so the retelling is the same text twice
67
+ on top of whatever else that conversation was for. Appending the turn to the
68
+ log *is* the report. Three things still reach the chat, one line each — goal
69
+ met, stuck and needs an owner decision, participant lost — plus a full answer
70
+ whenever the owner asks for status.
71
+ - **Setup is one uninterrupted sequence.** It used to create the log and then
72
+ wait to be told to populate it, turning one instruction into three and leaving
73
+ a room that exists but is empty. It now casts the room and hands back the room
74
+ ID and the attach command as its whole reply.
75
+ - **The skill names the tools this project built for it.** It mentioned
76
+ `room.post_owner_command` once and `room.get_delta_for`,
77
+ `room.get_pending_owner_commands` and `room.ack_owner_command` not at all, so
78
+ the delta was re-derived by hand on every turn and an owner command posted
79
+ from the TUI went into a queue nobody was told to read. Nothing failed — a
80
+ stale skill still produces a working room, just a worse one, which is why it
81
+ went unnoticed.
82
+ - **`roomyx serve` no longer passes an argument that was always discarded.**
83
+ `writerLeasePath` was computed on every start, and `serve()` takes the lease
84
+ only when an `onOwnerCommand` callback is present — which the CLI never
85
+ supplies. It read like a lease was being taken and none ever was.
86
+
87
+ ### Added
88
+
89
+ - **The dispatcher may be a background subagent**, so a room stops occupying the
90
+ chat for as long as it runs. Verified rather than assumed: a subagent has the
91
+ `Agent` tool loaded, can reach `SendMessage`, and a nested spawn was confirmed
92
+ to work.
93
+ - **A test pins the skill against the server**: the four dispatcher-facing tools
94
+ must be named, and the hand-composed delta and the per-exchange chat report
95
+ must stay gone.
96
+
97
+ ### Known, recorded rather than fixed
98
+
99
+ There are two dispatcher models and only one is expressible. An embedder
100
+ dispatches in-process and can hold the writer lease; an *agent* dispatches by
101
+ running `roomyx serve` and writing with `roomyx room append`, a different
102
+ process each time. Making the CLI declare a dispatcher was tried and reverted:
103
+ the lease would sit with the server while the writer is elsewhere, so the
104
+ dispatcher would be refused from its own room. Until that is decided, the D-18
105
+ writer guard does not engage for the agent workflow.
106
+
16
107
  ## [0.11.1] — 2026-09-10
17
108
 
18
109
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/roomyx",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "description": "MCP server + terminal UI for startup-room: live room status, chat, per-agent modal, an installable room registry, and skill-sync.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: startup-room
3
- description: Runs a persistent multi-persona discussion/brainstorm room cheaply — each persona is spawned once as a named subagent and kept alive across turns via SendMessage (so it remembers its own history instead of re-reading the whole transcript every time), every message is broadcast to every participant (not just @-addressed ones), participants self-moderate against tunneling too deep into one narrow thread, and the full dialogue is logged verbatim to a shared markdown file the participants never write to directly. The room is goal-driven, not round-driven: it runs until an explicit, measurable goal is met (by default, for startup-idea rooms: find an idea, score it against a 50-criteria rubric, and reach participant convergence) or the owner stops it — not until some fixed number of turns has elapsed. Use whenever the user wants several persona/character subagents (founders, experts, interview personas, judges) to discuss, debate, brainstorm, or interview each other over multiple rounds toward a concrete goal, especially when they've asked for this to be done without burning tokens by re-pasting the whole conversation into a fresh agent each round.
3
+ description: Runs a persistent multi-persona discussion/brainstorm room cheaply — each persona is spawned once as a named subagent and kept alive across turns via SendMessage (so it remembers its own history instead of re-reading the whole transcript every time), every message is broadcast to every participant (not just @-addressed ones), participants self-moderate against tunneling too deep into one narrow thread, and the full dialogue is logged verbatim to a shared append-only log the participants never write to directly. The room is goal-driven, not round-driven: it runs until an explicit, measurable goal is met (by default, for startup-idea rooms: find an idea, score it against a 50-criteria rubric, and reach participant convergence) or the owner stops it — not until some fixed number of turns has elapsed. Use whenever the user wants several persona/character subagents (founders, experts, interview personas, judges) to discuss, debate, brainstorm, or interview each other over multiple rounds toward a concrete goal, especially when they've asked for this to be done without burning tokens by re-pasting the whole conversation into a fresh agent each round.
4
4
  ---
5
5
 
6
6
  # Startup Room
@@ -24,6 +24,16 @@ The room is **goal-driven, not round-driven**: there is no fixed number of round
24
24
  ## Roles in this pattern
25
25
 
26
26
  - **The dispatcher** — you (the orchestrating Claude instance). Your job is transport, not judgment: relay deltas, append to the log, spawn new participants when told to. You never let participants write to the shared log file themselves; you are the only writer. This is a deliberate safety choice: it guarantees nothing gets deleted or corrupted by a subagent, and it lets you enforce formatting and catch a participant going off the rails before it's committed to the record. See **Dispatcher discipline** below — this role is narrower than it sounds, and it is easy to accidentally overstep it.
27
+ **The dispatcher can be a background subagent rather than the main
28
+ conversation, and usually should be.** A room run by the main agent occupies
29
+ the chat for as long as it lasts; run as a subagent it occupies nothing, and
30
+ the owner watches the room in the TUI while the conversation stays theirs.
31
+ This was verified rather than assumed: a subagent has the `Agent` tool loaded
32
+ and can reach `SendMessage`, so it can cast participants and drive them
33
+ exactly as the main agent would, and a nested spawn was confirmed to work.
34
+ The main agent then does only three things — spawn the dispatcher, relay the
35
+ attach command, and pass on any instruction the owner types in chat.
36
+
27
37
  - **The participants** — one persistent named subagent per persona. They decide everything substantive: what to research, whether an idea is good, when to pivot, who should speak next, when to converge. This is the actual point of the room — if you (the dispatcher) are making these calls instead of them, the room has stopped being a room.
28
38
  - **The session owner** — the human running the session. They can inject an instruction at any point (a veto, a new constraint, a topic to explore, a request to add participants, a reminder like "we're a small startup"). See **The owner-injection channel** below for how this differs from a participant's suggestion.
29
39
  - **The log file** — a single markdown file (e.g. `<project>/brainstorm/<topic>-room.md`) that is the append-only source of truth for the whole session.
@@ -50,7 +60,7 @@ The session owner is not a participant, and their messages are not "just another
50
60
  - **Requests to add participants** are handled via the mid-session spawn pattern below.
51
61
  - **The owner can edit the goal contract itself** (tighten/loosen the threshold, add a "must also" criterion, change the goal entirely) — this is a goal-injection, distinct from a veto on content. Relay it to the room as an authoritative update to what "done" means, and re-run the scoring/convergence check under the new terms if a candidate was already mid-evaluation.
52
62
  - **Status requests ("what's happening in the room?") get a real status, not a decision.** Report what's been found, who's arguing what, what's still open — do not use the opportunity to steer. If the owner explicitly asks "which should we pursue," that's their call to make (possibly by asking the room, via you), not yours to answer.
53
- - **Owner instructions may also arrive over roomyx.** If you started a room server and attached a dispatcher handler to it, a veto / constraint / add-participant / goal-edit posted through `room.post_owner_command` is an owner injection exactly like one typed in chat — same standing authority, same handling as above. It reaches you as a command to act on; roomyx itself never writes to the log.
63
+ - **Owner instructions also arrive over roomyx, and you have to look.** The owner presses `o` in the TUI and posts a veto / constraint / add-participant / goal-edit; it goes into the room's queue and `room.post_owner_command` answers `queued`. Nothing pushes it to you. **Poll `room.get_pending_owner_commands` between turns** — every turn is cheap and right — and call `room.ack_owner_command` with the id once you have acted, so `pending` keeps meaning "not yet dealt with" instead of growing forever. A queued command carries exactly the standing authority of one typed in chat. roomyx itself never writes to the log; you do.
54
64
  - **Do not ask the owner "what should we do next" as your default move.** Once the room's goal is set, keep it running and report status; only surface a genuine fork to the owner if it's a decision only they can make (scope, budget, willingness to accept a risk) — not a decision participants should be making themselves.
55
65
 
56
66
  ## Mid-session participant addition
@@ -101,6 +111,21 @@ When the owner says "save this idea" (or a candidate clearly survives enough rou
101
111
 
102
112
  ## Setup
103
113
 
114
+ **Do the whole of this in one go, and do not stop to ask.** Casting the room is
115
+ not a decision the owner needs to confirm a second time — "start a room about X"
116
+ already said it. A setup that creates the log, then waits to be told to populate
117
+ it, then waits again to be told to start, turns one instruction into three and
118
+ leaves a room that exists but is empty. Pick the participants yourself from the
119
+ goal, spawn them, and hand back the attach command.
120
+
121
+ Ask only if the goal itself is missing or contradictory — a room with nothing to
122
+ converge on is the one thing worth a question.
123
+
124
+ **What to hand back, as the whole of your reply:** the room ID and
125
+ `roomyx-client --room <id>`, plus one line naming who is in the room. Not the
126
+ opening contributions — those are in the room, which is what the attach command
127
+ is for.
128
+
104
129
  1. Identify the persona profile files to use. **roomyx ships a library — install it with `roomyx personas`.** Look in `.roomyx/personas/` first and fall back to `~/.roomyx/personas/`; a project copy overrides the machine-wide one, the same order every runtime uses for skills. Either directory holds: fifty numbered interview personas (ordinary people in ordinary jobs, one per file), plus `founders/`, `tech/` and `panel/` for founder, engineering and judging roles, plus `questionnaire-50.md`, a fifty-question interview script for use with any of them. Pick a subset that fits the room's goal — a room does not need fifty voices, it needs the right three to six. If the project keeps its own profiles instead, use those; each profile should be a neutral biography/expertise sheet with no pre-baked opinions or conclusions.
105
130
  2. Write the **goal contract** (see above): goal statement, success criteria (default to the 50-criteria rubric for a startup-idea room), and the convergence requirement.
106
131
  3. Create the log. **If roomyx is available, create it with `roomyx room new` (JSONL) — see below.** Otherwise create a markdown file with a header: the goal contract in full (not just a one-line goal — include the criteria/threshold so anyone reading the log later can check whether it was actually met), list of participants (name + one-line role), and the ground rule that only the moderator writes to it.
@@ -209,10 +234,16 @@ Capture the `agentId` (or assigned name) returned by each spawn — this is what
209
234
  For each subsequent turn:
210
235
 
211
236
  1. Decide whose turn it is. Options: round-robin, or reactive (whoever was just @-mentioned or most directly challenged goes next), or "whoever has something to add" if you asked participants to signal that. Mix these — a real room isn't strictly round-robin.
212
- 2. Compose the delta: only the messages posted since that participant's last turn (typically: everything since you last messaged them). Do not re-paste anything they already said or already received — they remember it.
237
+ 2. Get the delta from the room, do not compose it: `room.get_delta_for` with the participant's id returns exactly the messages they have not seen, and reports `since_seq` and `cursor_from` so an empty delta is distinguishable from a wrong cursor. This arithmetic used to be re-derived in the dispatcher's own context on every turn; it was moved into the server precisely so the dispatcher stops carrying it. Without roomyx, compose it by hand: everything since that participant last spoke, minus their own words — they remember those.
213
238
  3. Send it via `SendMessage` to their `agentId`/name, with a short prompt: "Here's what's happened since your last turn: [delta]. Your turn — react, build, refute, research, or pass."
214
239
  4. Append their reply verbatim to the log file, prefixed with their name.
215
- 5. Report to the session owner after essentially every substantive exchange, not just every few turns — in practice, "frequent" means after each participant's reply that adds something new, not on a fixed cadence. Use real quotes from the transcript, not paraphrases, so the owner can judge the room's reasoning quality directly. If the owner has explicitly asked for frequent updates, treat that as the floor, not a suggestion to pace yourself against.
240
+ 5. **Do not narrate the room into the chat.** Appending the turn to the log *is* the report: the owner is watching the room in `roomyx-client`, where they get the transcript live, with scrolling, search and per-participant filtering — everything a chat retelling would flatten. Duplicating it into the chat is not extra service, it is the same text twice, and it buries whatever else the owner was using that conversation for.
241
+
242
+ This instruction used to say the opposite — report after essentially every substantive exchange, with quotes. That was right when a chat message was the only way the owner could see anything. It is wrong now, and re-reading the room into the chat is the single most common complaint about how this skill runs.
243
+
244
+ Without roomyx there is no live view, so fall back to the old behaviour: summarise into the chat, with real quotes rather than paraphrase.
245
+
246
+ What still goes to the chat, in one line each and nowhere near every turn: the room reached its goal, the room is stuck and needs a decision only the owner can make, or a participant died and could not be replaced. Status on request is always fine — if the owner asks what is happening, answer fully.
216
247
 
217
248
  **Mechanical note:** `SendMessage` to a previously-spawned agent runs it in the background and returns immediately; the agent's reply arrives later as a separate task-notification event, not as this tool call's return value. Don't block waiting for it — end your turn, and act on the reply when the notification arrives. Multiple participants can be messaged in parallel this way; their replies will arrive as separate notifications, in whatever order they finish.
218
249
 
package/src/cli.ts CHANGED
@@ -411,6 +411,32 @@ const COMMANDS: Record<string, Command> = {
411
411
  );
412
412
  }
413
413
 
414
+ // A live room, and no evidence of a writer — say so rather than drop it.
415
+ //
416
+ // `serving` was already computed for the refusal above and, when nothing
417
+ // holds a lease, was silently discarded. That silence is wrong in exactly
418
+ // the case that matters: an agent dispatcher runs `roomyx serve` and
419
+ // writes with `roomyx room append`, a fresh process each time, so it
420
+ // never holds a lease and the room never reports a dispatcher. Every
421
+ // append into a room an agent is running therefore looks, from here, like
422
+ // an append into an unattended log.
423
+ //
424
+ // A note, not a refusal: there is nothing here that can tell a dispatcher
425
+ // from a stranger, so refusing would block the legitimate writer — which
426
+ // was tried and reverted. The log itself is safe either way; `seq`
427
+ // allocation is under a lock and that is tested. What is at risk is the
428
+ // conversation reading as one when it was two, and a line on stderr is
429
+ // what lets a second writer notice before adding to it.
430
+ //
431
+ // stderr, because stdout carries `Appended seq N from X` and is parsed.
432
+ if (serving !== undefined && !writerPresent && !writerWasThere) {
433
+ console.error(
434
+ `Note: room ${serving.id} is serving ${absolute}. Nothing holds the writer lease, so this append is ` +
435
+ `allowed — but roomyx cannot see whether an agent is dispatching that room. If one is, you are writing ` +
436
+ `into a conversation it is also writing into.`,
437
+ );
438
+ }
439
+
414
440
  // Parsed only after the refusal: an operator whose command is going to be
415
441
  // rejected should not be made to pipe a batch in first, and a reader that
416
442
  // blocks on stdin while holding a decision helps nobody.
@@ -475,7 +501,22 @@ const COMMANDS: Record<string, Command> = {
475
501
  port: typeof flags.port === "number" ? flags.port : undefined,
476
502
  host: typeof flags.host === "string" ? flags.host : undefined,
477
503
  acknowledgeNonLoopback: flags["acknowledge-non-loopback"] === true,
478
- writerLeasePath: writerLeasePathFor(resolve(registryPath), absoluteLogPath),
504
+ // No `writerLeasePath`, deliberately, and this is worth stating because
505
+ // it was passed here and silently discarded on every serve.
506
+ //
507
+ // `serve()` takes the lease only when a dispatcher is attached, and
508
+ // "attached" means an *embedder* supplied an `onOwnerCommand` callback.
509
+ // `roomyx serve` never supplies one — an agent dispatcher has no
510
+ // callback to give; it reads `room.get_pending_owner_commands` instead.
511
+ // So the argument could never be used, while reading like a lease was
512
+ // being taken.
513
+ //
514
+ // Making the CLI declare a dispatcher was tried and is WRONG: the lease
515
+ // would be held by the server process, while the writer is the agent
516
+ // running `roomyx room append` in a different process each time — so
517
+ // the dispatcher would be locked out of its own room. Two dispatcher
518
+ // models exist (embedder writes in-process; agent writes by CLI) and
519
+ // only the first is expressible today. Recorded rather than patched.
479
520
  });
480
521
 
481
522
  const entry = registerRoom(registryPath, {