@a-t-h-i/bot-lobby 0.5.0 → 0.6.0

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/README.md CHANGED
@@ -67,15 +67,19 @@ recorded in the task.
67
67
  pi install npm:@juicesharp/rpiv-ask-user-question
68
68
  ```
69
69
 
70
- It is optional. Without it `clarify` still works through Pi's built-in
71
- `select`/`input` prompts (or the Master asks in plain text), just with less
72
- structure.
70
+ It is optional for the Master. Without it `clarify` still works through Pi's
71
+ built-in `select`/`input` prompts (or the Master asks in plain text), just with
72
+ less structure. The lobby's planning panel uses the same questionnaire on its
73
+ own — the library ships as a bot-lobby dependency, so each round's questions
74
+ arrive together in one dialog with options whether or not you install the tool
75
+ for the Master (see [The lobby](#the-lobby)).
73
76
 
74
77
  ## Usage
75
78
 
76
79
  ```
77
- /bot-lobby Open the lobby (alt+l): tasks, planning, quick fixes, issues, metrics
80
+ /bot-lobby Open the lobby (alt+l): tasks, planning, quick fixes, metrics
78
81
  /bot-lobby <request> Start a task and hand it to the Master
82
+ /bot-lobby --task [--auto] <request> Start a task even when the request begins with a subcommand word
79
83
  /bot-lobby status [taskId] Active task, state, approvals, blockers, legal next states
80
84
  /bot-lobby tasks Task list (plus any unreadable task state)
81
85
  /bot-lobby pause | resume Stop or allow further workflow steps
@@ -90,51 +94,79 @@ structure.
90
94
  /bot-lobby-settings Same as the settings subcommand
91
95
  /bot-lobby minimize|restore Hide or restore bot-lobby for this session (ctrl+shift+m)
92
96
  /bot-lobby claim <taskId> Take ownership of an orphaned task
97
+ /bot-lobby auto [on|off] Auto mode: the oracle drives this session's task to completion (alt+g)
98
+ /bot-lobby start-plan PLAN-… [auto] Start a saved plan here; its agreed plan needs no approval
93
99
  /bot-lobby lobby | help Open the lobby, or show this list
94
100
  ```
95
101
 
96
102
  ## The lobby
97
103
 
98
104
  The lobby is bot-lobby's full-screen home: a tabbed view over every task in the
99
- project, your planning, quick fixes, GitHub issues and model performance, with
100
- one prompt at the bottom whose target follows the tab. It opens by itself when
105
+ project, your planning, quick fixes and model performance, with one prompt at
106
+ the bottom whose target follows the tab. It opens by itself when
101
107
  this session starts (or resumes) a task — the small zen widget returns whenever
102
108
  you hide it — and `alt+l` or `/bot-lobby` opens and hides it at any time, with
103
109
  or without a task.
104
110
 
105
111
  ```
106
- ◆ bot-lobby │ 1 Lobby 2 Tasks 2 3 Plan 4 Quick fix ⠋ 5 Issues 6 Metrics ⠋ TASK-add-login implementing
107
- ───────────────────────────────────────────────────────────────────────────────────────────────────────────
108
- (the zen scene: the oracle, DEV · DESIGN · RESEARCH · QA, the plan checklist)
109
- ── Conversation · TASK-add-login ──────────────────── ┬ ── Activity ───────────────────────────────────────
110
- you ▸ add a login page with email + password │ 12:04 MASTER ✓ scouting designer, backend
111
- oracle ▸ Proposal: │ 12:06 DEV ⠋ reading auth.ts…
112
- - LoginForm component │ 12:06 DESIGN ⠋ editing LoginForm.tsx…
113
- - POST /api/login with rate limiting │ 12:06 QUICK FIX ✓ done: rename getUser
114
- ── Thinking ───────────────────────────────────────────────────────────────────────── DEV · 12s ago ──
115
- The auth module already exposes a session helper; reuse it rather than adding a new one.
116
- ── message the oracle ─────────────────────────────────────────────────────────────────────────────────
112
+ ◆ bot-lobby │ 1 Lobby 2 Tasks 2 3 Plan 2? 4 Quick fix ⠋ 5 Metrics ⠋ TASK-add-login implementing Alt+H keys
113
+ (the task's status: state, what the agents are doing, the plan checklist)
114
+ ╭ Conversation ──────────────────────────────── Alt+C ╮ ╭ Activity ──────────────────────────────── Alt+A ╮
115
+ │ ──────── task started · add login · 12:04 ───────── │ │ 12:04 MASTER ✓ scouting designer, backend │
116
+ │ ● You 12:04 │ │ 12:06 DEV ⠋ reading auth.ts… │
117
+ │ ▌ add a login page with email + password │ │ 12:06 DESIGN ⠋ editing LoginForm.tsx… │
118
+ │ ◆ Oracle 12:06 │ │ 12:06 QUICK FIX ✓ done: rename getUser │
119
+ │ Proposal │ │ │
120
+ │ • LoginForm component │ │ │
121
+ │ • POST /api/login with rate limiting │ │ │
122
+ ╰─────────────────────────────────────────────────────╯ ╰─────────────────────────────────────────────────╯
123
+ ╭ Thinking ────────────────────────────────────────────────────────────────────────────────── DEV · 12s ago ╮
124
+ │ The auth module already exposes a session helper; reuse it rather than adding a new one. │
125
+ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯
126
+ ── message the oracle ───────────────────────────────────────────────────────────────────────────────────────
117
127
  _
118
- TYPE enter send · shift+enter newline · esc browse · tab next tab · alt+l hide lobby
128
+ TYPE enter send esc browse alt+l hide
119
129
  ```
120
130
 
121
- - **1 Lobby** — the task's zen scene, then the conversation with the oracle
122
- (its text only: no tool rows, no thinking), an activity log that narrates
131
+ - **1 Lobby** — the task's status (its state box, what the agents are
132
+ doing and the plan checklist), then the conversation with the oracle
133
+ (its text only: no tool rows, no thinking; each turn under a `● You` or
134
+ `◆ Oracle` line with its time, your words in pi's user-message band, the
135
+ oracle's replies as Markdown, and events such as a task starting as a
136
+ rule), an activity log that narrates
123
137
  every tool call in plain words (`reading index.html…`, `searching for
124
138
  "router" in src`, `running npm test`, `delegating to backend: Step 2 …`) from
125
139
  the Master and every subagent, and a single **Thinking** pane — the one place
126
140
  thoughts show up: the oracle's live thought as it streams, and each finished
127
141
  thought from a subagent, quick fix or the planner (pi's own transcript,
128
142
  behind the lobby, still carries the oracle's thinking blocks; `ctrl+t`
129
- collapses them there). The prompt talks to the
143
+ collapses them there). The oracle's replies render as Markdown. To keep
144
+ the lobby clean, the animated oracle and agents stay out of it by default:
145
+ they show above pi's editor while the lobby is hidden, and `alt+z` brings
146
+ them into the lobby too (the status box names the key in its corner). `alt+c`, `alt+a` and `alt+k` hide or bring back the conversation,
147
+ the activity log and thinking, and the rest take their room; every choice is
148
+ remembered (`lobby.panels`). Each pane scrolls on
149
+ its own (see **Scrolling** below), and a pane scrolled back stays on what
150
+ you are reading while new lines arrive. The prompt talks to the
130
151
  oracle (while it works, enter steers the running turn; `esc` stops it); with
131
152
  no task, it starts one.
132
- - **2 Tasks** — every task in the project: this session's, the ones other pi
133
- sessions are driving, pending plans saved from the planner, and recently
134
- finished ones. The detail pane shows the request, the approved plan with its
135
- step checklist, your comments on it, amendments, what the task waits on and
136
- its recent runs. `c` comments on the selected task's plan (see below), `s`
137
- starts a pending plan as a task in this session, `d` twice discards one.
153
+ - **2 Tasks** — every task in the project as a checklist: this session's, the
154
+ ones other pi sessions are driving, pending plans saved from the planner, and
155
+ recently finished ones, each section under a rule with its count. A task or
156
+ plan still to do wears an empty box `☐` (coloured by its state) with its
157
+ state, auto mode and owner beneath and its plan progress as pips
158
+ (`▰▰▱▱ 2/4`); a completed task is ticked `☑`, and an abandoned one is crossed
159
+ `☒` with its title struck through. The detail pane shows the task's box,
160
+ state and progress bar, then the request, the plan's steps (`☑` done, `☐`
161
+ to do, `◂ now` on the current one), the approved plan, your comments on it,
162
+ amendments, what the task waits on and its recent runs. `c` comments on the selected task's plan (see below), `s`
163
+ starts a pending plan as a task **in a new session** and `h` starts it
164
+ here, in this window (either way its agreed plan needs no approval), `d`
165
+ twice discards one. `n` types a new task that starts in its own session, `o`
166
+ shows the session driving the selected task, `x` twice stops a background
167
+ session, and `alt+g` switches auto mode for the selected task. Rows say who
168
+ drives each task (`this session`, `background`, another session's id) and
169
+ mark auto mode `⟳ auto`.
138
170
  - **3 Plan** — task planning mode with a planning panel. Describe what you
139
171
  want and every seat grills you from its own domain, on the model and
140
172
  thinking level its settings name: **DEV** (APIs, data, errors, security,
@@ -142,44 +174,116 @@ or without a task.
142
174
  accessibility), **QA** (acceptance criteria, test strategy, edge cases,
143
175
  definition of done) and **RESEARCH** (libraries, versions, docs and prior
144
176
  art, with the web tools when `pi-web-access` is installed). The **oracle**
145
- chairs on the Planner model: it reads the seats' questions and notes, folds
146
- every answer into the draft plan (with a *Decisions by domain* section) and
147
- asks only what no single seat owns. Each round the seats run in parallel,
148
- read-only, then the oracle; the questions arrive numbered and attributed
149
- (`3. QA Which browsers must pass?`), you answer them all in one message,
150
- and every seat reads every answer the next round — so the agents that later
151
- build the task start aligned. A roster shows what each seat is doing and
152
- whether it is READY; the plan is READY only when every seat and the oracle
153
- agree, and the draft pane lists what each seat said the plan must respect.
154
- While browsing, `1`–`4` seat or unseat DEV, DESIGN, QA and RESEARCH for the
155
- next round, `enter` switches between the conversation and the draft, `s`
156
- saves the plan to the pending tasks list, `n` starts over, `r` retries a
157
- round that failed or lost a seat, and `x` stops one.
177
+ chairs on the Planner model: it reads the seats' questions and notes and
178
+ folds every answer into the draft plan (with a *Decisions by domain*
179
+ section). Each round the seats run in parallel, read-only, then the oracle,
180
+ which **chooses at most four questions** for you from the seats' and its own
181
+ — merged, in plain words, the most decisive first — and decides the rest
182
+ with the recommended option, listed under *Assumptions* in the draft so you
183
+ can see and overrule them (comment on the line). The round's questions come
184
+ in **one** ask-user-question dialog: a tab per question labelled with the
185
+ seat it serves (`QA`, `DEV`…), two to four options with what each means,
186
+ the recommendation first (so `enter` on each accepts it), a row to type your
187
+ own answer or add a note, and a Submit tab that reviews everything and lets
188
+ you leave a question blank (the oracle then takes its recommendation). It opens by itself when a
189
+ round ends while the Plan tab is showing (`lobby.autoAsk`), and otherwise
190
+ when you press `enter` on the empty prompt or `a` while browsing; `esc` puts
191
+ it away with your answers so far kept, and `enter` resumes. Your answers go
192
+ back attributed (`3. [QA] Which browsers must pass? → evergreen only`), and
193
+ every seat reads every answer the next round — so the agents that later
194
+ build the task start aligned. You can still type a free reply instead.
195
+ Without the library the same questions come through pi's own select and
196
+ input dialogs. A roster shows what each seat is doing and whether it is
197
+ READY; the plan is READY only when every seat and the oracle agree. The
198
+ draft plan renders as Markdown (headings, lists, code, tables) beside the
199
+ conversation, followed by what each seat said the plan must respect.
200
+ **Comment on any line of the draft**: click it, or press `enter` to move to
201
+ the draft, pick a line with `↑↓` and press `c`, then type the comment. The
202
+ line is marked `◆` with your comment beneath it, and the comment goes to the
203
+ panel with your answers — or starts a round by itself when no question is
204
+ open. While browsing, `1`–`4` seat or unseat DEV, DESIGN, QA and RESEARCH
205
+ for the next round, `n` starts over, `r` retries a round that failed or lost a seat, `x` stops one, and `m`
206
+ opens the oracle's (Planner) settings.
158
207
  - **4 Quick fix** — a direct prompt, the way you would ask pi, that skips the
159
208
  whole workflow: one coding agent (full tools) makes the change right away
160
209
  while any task keeps running. Quick fixes run one at a time in the order you
161
210
  send them; each shows its steps and final report, and `x` cancels one. A
162
211
  request that turns out to be large is reported back instead of attempted.
163
- - **5 Issues** — the repository's open GitHub issues through the `gh` CLI (it
164
- owns sign-in; bot-lobby stores no token). `enter` reads one with its
165
- comments, `n` files a new one (first line is the title), `r` refreshes, and
166
- `p` plans it: the Plan tab opens seeded with the issue, and the saved plan
167
- keeps a link to it, so an issue becomes a task only after it has been
168
- planned.
169
- - **6 Metrics** — model performance across every Master turn, subagent run,
170
- quick fix, planning seat and oracle planning turn: per model and thinking level, the number of runs,
171
- success rate, mean/median/p90 time, turns, tools, tokens, output tokens per
172
- second and cost (columns drop from the right on narrow terminals); how long a
173
- task takes from request to done by the oracle's model and thinking level; and
174
- where the time goes by agent. `g` splits the table by agent, `s` cycles the
175
- sort (runs, average time, success, cost).
212
+ `m` opens the quick fix agent's settings — model, thinking level, time
213
+ limit and instructions — right there (the same entry as in
214
+ `/bot-lobby settings`); the tab shows what it runs on.
215
+ - **5 Metrics** — model performance across every Master turn, subagent run,
216
+ quick fix, planning seat and oracle planning turn, as a dashboard: tiles for
217
+ runs (with a sparkline of recent run times), success rate, average and p90
218
+ run time, cost and tasks; average run time per model and thinking level as
219
+ bars; success rate per model as meters marked `✓` (≥90%), `!` (≥70%) or `✗`;
220
+ where the time goes as one bar split by agent, with a legend, and how long a
221
+ task takes from request to done by the oracle's model; then the full table —
222
+ runs, success, mean/median/p90 time, turns, tools, tokens, output tokens per
223
+ second and cost (columns drop from the right on narrow terminals). `g`
224
+ splits the table by agent, `s` cycles the sort (runs, average time, success,
225
+ cost).
226
+
227
+ The **Issues** tab (GitHub issues through the `gh` CLI, planned into tasks
228
+ through the Plan tab) is switched off for now; `"lobby": { "issues": true }`
229
+ brings it back as tab 5.
176
230
 
177
231
  **Keys.** Like a modal editor, the lobby has a typing mode (keys go to the
178
232
  prompt) and a browsing mode (`esc`; arrows move through lists, single keys run
179
233
  the tab's commands, and on Lobby, Plan and Quick fix any other key resumes
180
- typing). Everywhere: `tab`/`shift+tab` or `alt+1`…`alt+6` switch tabs,
181
- `pageup`/`pagedown` scroll, `ctrl+c` clears the prompt (or hides the lobby
182
- when it is empty) and `alt+l` hides the lobby. Anything that needs pi itself —
234
+ typing). These work in both modes:
235
+
236
+ | Key | Does |
237
+ | --- | --- |
238
+ | `alt+l` | hide the lobby (back to pi) |
239
+ | `alt+h` (or `?` while browsing) | show every key, and the current tab's |
240
+ | `alt+s` | bot-lobby settings: every agent's model, thinking and time limit, and the lobby's switches |
241
+ | `ctrl+f` (or `/` while browsing) | search the current tab |
242
+ | `ctrl+s` | save the plan from the Plan tab to the pending tasks — while typing too, from any tab |
243
+ | `alt+o` | the session switcher: this window, its background sessions, and tasks other terminals drive |
244
+ | `alt+n` | type a new task that starts in its own session, named after it |
245
+ | `alt+g` | auto mode on or off for the task in view (the selected one on Tasks) |
246
+ | `tab` / `shift+tab`, `alt+1`…`alt+5` | switch tabs |
247
+ | `alt+z` | show or hide the oracle and agent animations in the lobby (off by default; the task's status always shows) |
248
+ | `alt+c` / `alt+a` / `alt+k` | show or hide the conversation / activity log / thinking |
249
+ | `pageup` / `pagedown` | scroll the focused pane a page |
250
+ | `ctrl+c` | clear the prompt, or hide the lobby when it is empty |
251
+
252
+ Every shortcut can be rebound under `lobby.keys` in the config, by action name:
253
+ `hide`, `help`, `settings`, `search`, `savePlan`, `sessions`, `newSession`,
254
+ `toggleAuto`, `nextTab`, `prevTab`, `toggleScene`,
255
+ `toggleConversation`, `toggleActivity`, `toggleThinking`, `scrollUp`,
256
+ `scrollDown` — e.g. `"keys": { "toggleThinking": "alt+t" }`. Pick keys that
257
+ never type a character (`alt+…`, `ctrl+…`, `f1`…).
258
+
259
+ **Scrolling.** Every pane scrolls on its own and shows a scrollbar in its
260
+ right border when it holds more than fits. While browsing, `←`/`→` move
261
+ between the tab's panes (the conversation, activity log and thinking on
262
+ Lobby; the conversation and draft on Plan; the list and detail on Tasks and
263
+ Quick fix) and the focused one lights up; `↑`/`↓` scroll it a line (or move
264
+ a list's selection, or the draft's cursor), `pageup`/`pagedown` a page, and
265
+ `home`/`end` jump to its oldest line or back to its newest. The conversation,
266
+ activity log and thinking are newest-last: scrolled back, a pane shows `↓N`
267
+ for the lines below it and holds still while new ones arrive; `end` follows
268
+ the newest again. Details stop at their last line. The Thinking pane keeps
269
+ every recent thought, so earlier ones are a scroll away.
270
+
271
+ **Search.** `ctrl+f` opens a search bar above the prompt; as you type, the tab
272
+ narrows to what matches and every match is highlighted: the conversation,
273
+ activity log and thoughts on Lobby; tasks and plans (by id, title, request,
274
+ proposal or plan) on Tasks; the conversation on Plan (the draft stays whole,
275
+ highlighted); jobs on Quick fix; runs (by agent, model, thinking level, kind or
276
+ task) on Metrics. `enter` keeps the search while you browse the results,
277
+ `esc` clears it, and each tab keeps its own.
278
+
279
+ **Mouse.** Clicking a tab opens it, clicking a pane gives it the keys,
280
+ clicking a draft plan line comments on it, clicking the prompt starts typing,
281
+ and the wheel scrolls whichever pane is under the pointer. In pi's regular
282
+ screen the lobby turns mouse reporting on only while it is showing (hold
283
+ `shift` to select text with the mouse); in full-screen pi, pi reports the
284
+ mouse itself. `"lobby": { "mouse": false }` turns clicks off.
285
+
286
+ Anything that needs pi itself —
183
287
  built-in slash commands, `/model`, the tool-row toggle — works with the lobby
184
288
  hidden; bot-lobby's own `/bot-lobby …` commands also work from the Lobby
185
289
  prompt. When the Master asks you something (an approval, a clarifying
@@ -195,6 +299,70 @@ approved plan while implementing or reviewing, keeps finished steps done and
195
299
  marks the comments addressed (`○` waiting, `◐` sent to the oracle, `✓` plan
196
300
  amended). Before a plan exists, a comment asks for a revised proposal instead.
197
301
 
302
+ ## Several sessions from one window
303
+
304
+ Start a task in a new session without leaving your terminal, and switch
305
+ between sessions from the lobby.
306
+
307
+ - **Start one.** `alt+n` (or `n` on the Tasks tab) opens the prompt for a new
308
+ task; `enter` starts it in its own pi session. `s` on a saved plan does the
309
+ same for the plan. The new session is a headless pi (`pi --mode rpc`) this
310
+ window launches with the same pi build, model and extensions, and it is an
311
+ ordinary saved session **named after its task** — `/resume` lists it by
312
+ that name. Sessions a task starts are named after it too (`/bot-lobby
313
+ <request>` in a fresh session names that session).
314
+ - **Watch and talk to it.** The Lobby tab then shows that session: its task's
315
+ status, its conversation, activity log and thoughts, live. The tab bar names
316
+ the session in view (`◆ add signup form · working`), the prompt messages
317
+ its oracle (steering it while it works) and `esc` stops its running turn.
318
+ - **Answer it.** When a background session asks something — an approval, a
319
+ clarifying question — the tab bar shows `● 1 waiting`, and `enter` on the
320
+ empty prompt puts the question to you in this window with pi's own dialog
321
+ (`esc` there cancels it, as it would in that session). With the lobby
322
+ hidden, a notice says who is waiting.
323
+ - **Switch.** `alt+o` opens the switcher: this window, every background
324
+ session it started (working, idle, ended; `⟳ auto`; questions waiting), and
325
+ tasks that sessions in other terminals drive. `enter` shows one in the Lobby
326
+ tab, `n` starts a new one, `x` twice stops a background session. For a task
327
+ another terminal drives, the Lobby shows its conversation from its session
328
+ file, and your messages go to its task inbox (`inbox.jsonl`) — its own
329
+ session passes them to its oracle within a few seconds — while its live
330
+ activity stays in that terminal.
331
+
332
+ Background sessions belong to the window that started them: they keep running
333
+ while you switch pi sessions there, and stop when that pi exits. Their tasks
334
+ keep their state, so `/resume` (by the task's name) or `/bot-lobby claim`
335
+ picks one up later.
336
+
337
+ ## Auto mode
338
+
339
+ Auto mode lets the oracle drive a task to completion without asking you
340
+ anything. Switch it with `alt+g` — in the lobby for the task in view (or the
341
+ one selected on Tasks), outside it for this session's task — or with
342
+ `/bot-lobby auto [on|off]`; `/bot-lobby --task --auto <request>` and
343
+ `/bot-lobby start-plan PLAN-… auto` start a task with it on. The tab bar shows
344
+ `⟳ AUTO`. While it is on:
345
+
346
+ - clarifying questions are not asked: the oracle decides from the request,
347
+ the plan and its reconnaissance, and each decision is recorded
348
+ (`Not asked (auto mode): …`); the ask-user-question tool is blocked with the
349
+ same instruction;
350
+ - the proposal is approved without asking, and dependency and architecture
351
+ approvals a worker asks for are granted and recorded;
352
+ - when the oracle's turn ends before the task is done, the session nudges it
353
+ to keep going. A nudge that changes nothing counts; after three in a row
354
+ auto mode pauses and says the task needs you, and it resumes as soon as the
355
+ task moves again.
356
+
357
+ The switch lives beside the task (`auto.json`), so any session can flip it for
358
+ any task and the session that drives it follows within a few seconds.
359
+
360
+ **Agreed plans skip approval.** A task started from a plan saved in the Plan
361
+ tab (`s`/`h` on Tasks, or `/bot-lobby start-plan`) records the plan it came
362
+ from, and its proposal is approved without asking you again — you agreed the
363
+ plan with the panel already. Clarifying questions are still decided by the
364
+ oracle for such a task, since the plan answered them.
365
+
198
366
  ## Sessions and ownership
199
367
 
200
368
  A task is owned by the pi session that started it (`ctx.sessionManager` id,
@@ -220,8 +388,8 @@ every in-flight subagent process.
220
388
 
221
389
  While the owning session has a task active, its transcript switches to a zen view: `orchestrate` rows
222
390
  and the built-in spinner are hidden, and a widget above the editor animates the
223
- task (the same scene heads the lobby's first tab; the widget shows while the
224
- lobby is hidden). At 72 columns and wider it draws a large scene: a header box with the task
391
+ task (the widget shows while the lobby is hidden; inside the lobby the same
392
+ scene shows only with `alt+z`, its status box otherwise). At 72 columns and wider it draws a large scene: a header box with the task
225
393
  title and state in its top border, a progress bar, and a metadata row with
226
394
  elapsed time, quiet-mode hint and task id; an oracle tower with a twinkling
227
395
  aura (drifting z's while dormant), a radiant orb crown, two window eyes, a
@@ -446,7 +614,7 @@ top-level `/bot-lobby-settings`) and persist globally to
446
614
  "researcher": { "model": "anthropic/claude-sonnet-5", "thinking": "low", "instructions": "", "timeoutMs": 600000 },
447
615
  "quickFix": { "model": "anthropic/claude-sonnet-5", "thinking": "low", "instructions": "", "timeoutMs": 600000 },
448
616
  "planner": { "model": "anthropic/claude-sonnet-5", "thinking": "high", "instructions": "", "timeoutMs": 300000 },
449
- "lobby": { "autoOpen": true, "planningPanel": ["backend", "designer", "qa", "researcher"] },
617
+ "lobby": { "autoOpen": true, "planningPanel": ["backend", "designer", "qa", "researcher"], "autoAsk": true, "issues": false, "mouse": true },
450
618
  "workflow": {
451
619
  "maxReviewIterations": 2,
452
620
  "maxParallelScouts": 3,
@@ -489,10 +657,31 @@ take custom instructions, and run on the session's model until you pin one.
489
657
  Planning seats reuse their domain's entry — DEV the Backend's, DESIGN the
490
658
  Designer's, QA the QA's, RESEARCH the Researcher's model, thinking and
491
659
  instructions — so a seat plans on the model that will later build its part.
492
- `lobby.planningPanel` names the seats a new planning session starts with
493
- (every seat by default; `[]` lets the oracle plan alone), and
494
- `lobby.autoOpen` (default `true`) opens the lobby by itself when this session
495
- starts or resumes a task.
660
+ The `lobby` entry shapes the lobby itself; `/bot-lobby settings` → **Lobby**
661
+ flips its switches, and key rebinding lives in the file:
662
+
663
+ ```json
664
+ "lobby": {
665
+ "autoOpen": true,
666
+ "planningPanel": ["backend", "designer", "qa", "researcher"],
667
+ "autoAsk": true,
668
+ "issues": false,
669
+ "mouse": true,
670
+ "panels": { "animations": false, "conversation": true, "activity": true, "thinking": true },
671
+ "keys": { "toggleThinking": "alt+t" }
672
+ }
673
+ ```
674
+
675
+ `planningPanel` names the seats a new planning session starts with (every
676
+ seat by default; `[]` lets the oracle plan alone); `autoOpen` opens the lobby
677
+ by itself when this session starts or resumes a task; `autoAsk` puts the
678
+ panel's questions to you as soon as a round ends while the Plan tab is
679
+ showing (otherwise `enter` on the empty prompt does); `issues` shows the
680
+ GitHub Issues tab (off for now); `mouse` turns clicks and the wheel on;
681
+ `panels` is which Lobby panes show, with `animations: true` bringing the
682
+ animated oracle and agents into the lobby (off by default; the older
683
+ `scene` key is no longer read, and the pane keys update it); `keys` rebinds
684
+ shortcuts by action name.
496
685
 
497
686
  `thinking` must be one of `off`, `minimal`, `low`, `medium`, `high`, `xhigh`,
498
687
  `max`; a legacy `inherit` or unknown value falls back to `medium`. The thinking
@@ -542,6 +731,8 @@ and the output contract — and an empty layer is dropped.
542
731
  └── tasks/TASK-<stamp>/
543
732
  ├── state.json the task record (kept after completion)
544
733
  ├── comments.jsonl your lobby comments on the plan and their delivery (append-only)
734
+ ├── inbox.jsonl messages for the oracle from other sessions and their delivery (append-only)
735
+ ├── auto.json auto mode, when switched on for the task
545
736
  ├── proposal.md scratchpads: deleted on completion
546
737
  ├── plan.md
547
738
  ├── designer.md backend.md qa.md
@@ -590,17 +781,22 @@ src/
590
781
  ├── knowledge/ Paths, store (single write path), selector, compactor
591
782
  ├── prompts/ Layer loader + compiler
592
783
  ├── lobby/
593
- │ ├── runtime.ts Mounts the full-screen lobby on pi's TUI, dialogs hand-off, comment delivery, Master metrics
594
- │ ├── view.ts The tabbed view: tab bar, per-tab prompt, typing/browsing modes, keys
784
+ │ ├── runtime.ts Mounts the full-screen lobby on pi's TUI, dialogs hand-off, background sessions, Master metrics
785
+ │ ├── view.ts The tabbed view: tab bar, per-tab prompt, typing/browsing modes, session switcher, search, help, mouse
786
+ │ ├── sessions.ts Background sessions: headless pi children driven over RPC, their feeds and questions
787
+ │ ├── session-files.ts Other sessions' conversations, read from their saved session files
788
+ │ ├── keys.ts The shortcut table and its config overrides
789
+ │ ├── ask.ts The panel's questions through the ask-user-question questionnaire (or pi's dialogs)
790
+ │ ├── markdown.ts Markdown through pi's renderer, cached per theme and width
595
791
  │ ├── tabs/ Pure renderers: home, tasks, plan, quickfix, issues, metrics
596
792
  │ ├── feed.ts Activity log, thinking pane and conversation store
597
793
  │ ├── quickfix.ts Direct-change jobs, one at a time
598
794
  │ ├── planner.ts The planning panel: seats and the oracle per round, reply parsing, saving a plan
599
795
  │ ├── issues.ts GitHub issues through the gh CLI
600
- │ └── layout.ts Exact-width columns, rules, wrapping and scroll windows
601
- ├── state/ Project root, config, task persistence, state mutation, comments, backlog, metrics
796
+ │ └── layout.ts Boxes, exact-width columns, wrapping, highlights, bars, meters and sparklines
797
+ ├── state/ Project root, config, task persistence, state mutation, comments, inbox, auto mode, backlog, metrics
602
798
  ├── schemas/ Task, agent, findings, configuration types
603
- └── pi/ Commands, lifecycle, orchestrate tool, status widget
799
+ └── pi/ Commands, lifecycle, orchestrate tool, status widget, the owner's clock (deliveries, auto mode)
604
800
  prompts/ global, master, designer, backend, qa, scout, worker, reviewer, researcher, quickfix, planner, panel
605
801
  ```
606
802
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a-t-h-i/bot-lobby",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Structured multi-agent software engineering orchestrator for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -38,11 +38,14 @@
38
38
  "typebox": "*"
39
39
  },
40
40
  "devDependencies": {
41
- "@earendil-works/pi-coding-agent": "0.87.0",
42
41
  "@earendil-works/pi-ai": "0.87.0",
42
+ "@earendil-works/pi-coding-agent": "0.87.0",
43
43
  "@earendil-works/pi-tui": "0.87.0",
44
44
  "@types/node": "^22.10.0",
45
45
  "typebox": "1.3.27",
46
46
  "typescript": "^5.7.0"
47
+ },
48
+ "dependencies": {
49
+ "@juicesharp/rpiv-ask-user-question": "^2.11.0"
47
50
  }
48
51
  }
package/prompts/panel.md CHANGED
@@ -16,8 +16,14 @@ questions and the user's answers, and the oracle's current draft plan.
16
16
  - Ask only what your seat owns (below), and only what would change how the
17
17
  task is built or verified. Never repeat a question that has been answered,
18
18
  or one another member already asked this round.
19
- - Ask at most two questions, the most important first. Make each specific and
20
- answerable; offer options (`a) … b) …`) and say which you would pick.
19
+ - Ask at most two questions, the most important first. They go to the
20
+ oracle, who picks at most four for the user each round across the whole
21
+ panel and decides the rest with your recommendation, so make each one
22
+ short, plain and specific, and give it two to four options, your
23
+ recommendation first with `(Recommended)` after its label. The user can
24
+ always type their own answer instead, so do not add an "Other" option.
25
+ - Read the draft's Assumptions: if one the oracle made for your seat is
26
+ wrong, say so under Notes and ask about it again.
21
27
  - If an answer from the user is vague or conflicts with what you see in the
22
28
  repository, say so and ask again.
23
29
  - Report what the plan must respect from your seat under Notes: facts from
@@ -31,9 +37,12 @@ questions and the user's answers, and the oracle's current draft plan.
31
37
  OPEN or READY
32
38
 
33
39
  ## Questions
34
- 1. …
40
+ 1. The question, ending with a question mark?
41
+ - Short label (Recommended) — what choosing it means
42
+ - Another label — what choosing it means
35
43
 
36
- (Omit Questions when READY.)
44
+ (Two to four options per question, labels of one to five words. Omit
45
+ Questions when READY.)
37
46
 
38
47
  ## Notes
39
48
  - …
@@ -3,9 +3,11 @@
3
3
  You are the oracle chairing a planning panel: you help the user turn an idea
4
4
  (or a GitHub issue) into a task plan that the team of agents can execute
5
5
  without guessing. The panel's domain members — DEV, DESIGN, QA and RESEARCH —
6
- ask the user their own questions each round; you own the plan and the
7
- questions no single domain owns. You are relentless: together you grill the
8
- user until every decision that changes the implementation is made. You never
6
+ bring you their questions each round, and you decide which ones reach the
7
+ user: you own the plan and the questions. You are thorough but you spare the
8
+ user: every decision that changes the implementation gets made, either by the
9
+ user or by you with the recommended option, written down as an assumption the
10
+ user can overrule. You never
9
11
  write code and never change files; you may read the repository to ask
10
12
  informed questions and to ground the plan in what exists.
11
13
 
@@ -17,14 +19,24 @@ and notes. Read the repository when it helps, then reply in the output format
17
19
  below.
18
20
 
19
21
  - Fold every member's notes and every answer into the draft plan, so each
20
- domain's decisions are written down where all agents will read them. When
21
- members disagree, say so and ask the user to decide.
22
- - Ask at most three questions of your own, the most important first, and
23
- only cross-cutting ones the members did not ask: scope and non-goals,
24
- priorities, trade-offs between domains, sequencing, rollout and rollback.
25
- Never repeat a member's question. Each one must be specific and answerable.
26
- - Offer concrete options when they help (`a) … b) …`), and say which you
27
- would pick and why.
22
+ domain's decisions are written down where all agents will read them.
23
+ - Choose the round's questions: **at most four in all**, from the members'
24
+ questions and your own cross-cutting ones (scope and non-goals, priorities,
25
+ trade-offs between domains, sequencing, rollout). Merge duplicates, drop
26
+ what the repository or an earlier answer already settles, and keep only the
27
+ ones whose answer changes what gets built. Put the most important first and
28
+ start each with the seat it serves — `[DEV]`, `[DESIGN]`, `[QA]`,
29
+ `[RESEARCH]`, or `[ORACLE]` for your own. When members disagree, make that
30
+ one of the questions.
31
+ - Keep each question short and plain: one line the user can answer at a
32
+ glance. Give it two to four options — labels of one to five words and a
33
+ short clause on what each means — your recommendation first with
34
+ `(Recommended)` after its label. The user answers all of them together in
35
+ one dialog and can type their own answer, so never add an "Other" option.
36
+ - Decide every question you do not ask, and any the user leaves unanswered,
37
+ with its recommended option, and list those decisions under
38
+ `### Assumptions` in the plan, one line each, so the user can see and
39
+ overrule them.
28
40
  - Challenge answers that are vague, contradictory or risky, and ask again.
29
41
  Do not accept "whatever you think" for a decision with real trade-offs:
30
42
  propose one and ask the user to confirm it.
@@ -44,10 +56,14 @@ GRILLING or READY
44
56
  Three to six words naming the task.
45
57
 
46
58
  ## Questions
47
- 1. The most important open question.
59
+ 1. [DEV] The most important open question?
60
+ - Short label (Recommended) — what choosing it means
61
+ - Another label — what choosing it means
48
62
  2. …
49
63
 
50
- (Omit the Questions section when READY.)
64
+ (At most four questions, each tagged with its seat; two to four options per
65
+ question, labels of one to five words. Omit the Questions section when READY
66
+ or when you decided everything yourself.)
51
67
 
52
68
  ## Plan
53
69
  The current draft, in Markdown:
@@ -59,6 +75,8 @@ The current draft, in Markdown:
59
75
  (files, modules and domains: designer, backend, qa)
60
76
  ### Decisions by domain
61
77
  (what the user decided for DEV, DESIGN, QA and RESEARCH, one bullet each)
78
+ ### Assumptions
79
+ (what you decided without asking, each with its seat: "[QA] Test in evergreen browsers only")
62
80
  ### Steps
63
81
  1. …
64
82
  ### Risks and open points
@@ -348,7 +348,7 @@ export function parsePiStream(stdout: string): ParsedStream {
348
348
  * every child process, including test runners and scripts, where argv[1] is
349
349
  * not pi at all.
350
350
  */
351
- function resolvePiInvocation(args: string[]): { command: string; args: string[] } {
351
+ export function resolvePiInvocation(args: string[]): { command: string; args: string[] } {
352
352
  const launcher = process.argv[1];
353
353
  if (launcher && existsSync(launcher) && isPiLauncher(launcher)) {
354
354
  return { command: launcher, args };
package/src/index.ts CHANGED
@@ -3,16 +3,18 @@ import { registerCommands } from "./pi/commands.ts";
3
3
  import { registerLifecycle } from "./pi/events.ts";
4
4
  import { registerOrchestrateTool } from "./pi/tools.ts";
5
5
  import { onTransition } from "./state/task-state.ts";
6
- import { ping } from "./pi/notify.ts";
6
+ import { pingTransition } from "./pi/notify.ts";
7
7
  import { isSubagentProcess } from "./pi/quiet.ts";
8
8
  import { registerDeskClient } from "./desk/client-extension.ts";
9
9
  import { registerLobbyEvents } from "./lobby/runtime.ts";
10
+ import { registerOwner } from "./pi/owner.ts";
10
11
 
11
12
  export default function (pi: ExtensionAPI): void {
12
13
  registerLifecycle(pi, CONFIG_DIR_NAME);
13
14
  // After the lifecycle, so the lobby opens over a task the widget state already knows.
14
15
  registerLobbyEvents(pi, CONFIG_DIR_NAME);
15
- onTransition((task) => ping(task.state, task.title));
16
+ registerOwner(pi, CONFIG_DIR_NAME);
17
+ onTransition((task) => pingTransition(task));
16
18
  registerCommands(pi, CONFIG_DIR_NAME);
17
19
  registerOrchestrateTool(pi, CONFIG_DIR_NAME);
18
20
  // Parallel workers share files through the master's file desk.