create-pmos 0.392.0 → 0.393.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.392.0",
3
+ "version": "0.393.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,18 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.393.0",
37
+ "at": "2026-10-22T04:08:26.227Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1007,
42
+ "t": "Show Claude's questions in the chat as a card, not a picker the panel cannot show",
43
+ "s": "Show Claude's questions in the chat as a card, not a picker the panel cannot show"
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.392.0",
37
49
  "at": "2026-10-22T04:00:27.581Z",
@@ -284,18 +296,6 @@
284
296
  "s": "The item keeps its whole conversation after the session ends, in the item dialog and in the session's own view, with a line saying the session ended."
285
297
  }
286
298
  ]
287
- },
288
- {
289
- "v": "0.373.0",
290
- "at": "2026-10-21T03:11:16.462Z",
291
- "f": 2,
292
- "prs": [
293
- {
294
- "n": 982,
295
- "t": "Calmer Briefing first screen: mic, calendar ⋯, pin on hover (calmer first screen 5/5)",
296
- "s": "Calmer Briefing first screen: mic, calendar ⋯, pin on hover (calmer first screen 5/5)"
297
- }
298
- ]
299
299
  }
300
300
  ]
301
301
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@a30f40d4
1
+ kernel-source: pmos@ce9db16a
2
2
  assembled: 2026-10-22
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-22T04:00:24Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-22T04:08:23Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-22T04:00:24Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-22T04:08:23Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-22T04:00:24Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-22T04:08:23Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.393.0",
4
+ "at": "2026-10-22T04:08:26.227Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1007,
9
+ "t": "Show Claude's questions in the chat as a card, not a picker the panel cannot show",
10
+ "s": "Show Claude's questions in the chat as a card, not a picker the panel cannot show"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.392.0",
4
16
  "at": "2026-10-22T04:00:27.581Z",
@@ -432,7 +432,8 @@ Every popup has this chat, including the ones that have no row of their own: a t
432
432
  - **The message box** takes several lines. **Enter** sends; **Shift+Enter** starts a new line. The box grows as you type, up to about eight lines, and then scrolls. The send button stays at its foot, also with a phone keyboard open.
433
433
  - **Later messages** in the same dialog go to the same session. Write `/compact`, `/clear` or any other slash command, and Claude Code runs it.
434
434
  - **What it may do** is set by your own Claude Code settings. Claude can change files and run commands. When your settings say to ask first, the question shows in the panel with its options; press one to answer.
435
- - **Stop** shows while Claude works. It presses Esc in the session.
435
+ - **Claude's questions** show as a card in the conversation. Claude Code's question picker cannot show in the panel, so the session does not open it: the card shows each question with its options as buttons. Press an option to answer a single question. When Claude asks several questions, or a question takes more than one answer, press the options and then **Send answers**. You can also write your own answer in the box. A session that started before this change still opens the picker: end it in the session list, and your next message resumes the same conversation without it.
436
+ - **Stop** shows while Claude works. It presses Esc in the session. If Claude was stopped, the conversation shows a grey "Stopped" line.
436
437
  - **The conversation** is Claude Code's own record, word for word. Claude's answers are formatted as Claude Code formats them: headings, bold, lists, code, tables, quotes and links (links open in a new tab). Your messages keep their line breaks, and a paste shows without the tags Claude Code wraps around it. A run of tool calls shows as one small grey line, for example "Used Read ×2, slack_read_thread". A connector tool shows its short name.
437
438
  - **While a session runs**, the panel reads it again every 2 seconds and changes only when there is something new. The messages already on screen stay still, so nothing blinks beside the viewer.
438
439
  - **A file Claude names** (a path such as `briefs/drafts/plan.md`, or a link to one) is underlined. Press it to read the file beside the conversation, as a tab in the viewer; on a phone, the Detail side shows it (on the Chat page, the viewer opens over the conversation). Markdown shows as a page, an HTML file shows as the page it draws (press **Source** for its code), and other text files show as code. An HTML page runs its own scripts, so its toggles and charts work, but it cannot reach PMOS or the internet: a web font falls back to the system font. It is read-only. While the tab is open it shows the newest version, so a file Claude is still writing stays current. A file in a workspace PMOS serves, in a git worktree of one, or in the folder a session runs in opens here. Any other file says "Not in a workspace" and is not read.
@@ -192,9 +192,21 @@ function withGoalRows(model, rows) {
192
192
  const count = (model.list.count || 0) + add.length;
193
193
  return { ...model, list: { ...model.list, rows: list, count }, dock: model.dock && model.dock.needs != null ? { ...model.dock, needs: count, label: count === 1 ? 'needs you' : 'need you', next: list[0].title } : model.dock };
194
194
  }
195
- /** The Claude Code --settings for a chat session: one Stop hook that posts to this workspace with the session's token. */
195
+ /** The Claude Code --settings for a chat session: a Stop hook and an AskUserQuestion hook, each posting to this workspace with the session's token. */
196
196
  function hookSettings(port, host = '127.0.0.1') {
197
- return { hooks: { Stop: [{ hooks: [{ type: 'http', url: 'http://' + host + ':' + port + '/api/briefing-premium/goal-stop', headers: { 'x-pmos-session': '$PMOS_SESSION' }, allowedEnvVars: ['PMOS_SESSION'], timeout: 10 }] }] } };
197
+ const hook = (route) => ({ type: 'http', url: 'http://' + host + ':' + port + '/api/briefing-premium/' + route, headers: { 'x-pmos-session': '$PMOS_SESSION' }, allowedEnvVars: ['PMOS_SESSION'], timeout: 10 });
198
+ return { hooks: { Stop: [{ hooks: [hook('goal-stop')] }], PreToolUse: [{ matcher: ASK_TOOL, hooks: [hook('ask-tool')] }] } };
199
+ }
200
+ /* chat-ask-card (bug 2026-10-22): Claude Code's question tool draws a picker in the terminal, and the chat panel cannot show it. The panel
201
+ * showed "Claude is working", the PM pressed Stop (Esc) and the question ended as "[Request interrupted by user for tool use]", again and
202
+ * again. Now the PreToolUse hook refuses the picker with this reason: the panel draws the questions from the transcript as a card with
203
+ * answer buttons, and the PM's answer comes back as their next message. */
204
+ const ASK_TOOL = 'AskUserQuestion';
205
+ const ASK_REASON = 'The PM is in the PMOS chat panel, not a terminal. The panel already shows these questions and their options as buttons, '
206
+ + 'and the PM\'s answer comes as their next message. Do not ask again and do not guess the answer: end your turn now with one short line. '
207
+ + 'If you are working on a /goal, end with a pmos-goal progress block whose state is needs-you.';
208
+ function askToolReply() {
209
+ return { hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'deny', permissionDecisionReason: ASK_REASON } };
198
210
  }
199
211
 
200
212
  /** chat() hands a `/goal` message here: { error } or { id, prompt } with the grilling line already on record. */
@@ -229,4 +241,4 @@ function decide({ runtimeDir, key, id, act, draft, session, sessions, now = new
229
241
  return { status: 200, body: { ok: true, id, state: act === 'start' ? 'started' : 'cancelled' } };
230
242
  }
231
243
 
232
- module.exports = { parseCommand, grillPrompt, startMessage, cancelMessage, cleanDraft, goalOf, statesAt, begin, decide, onStop, resume, briefingRows, goalRowsAt, withGoalRows, blockOf, keyOfSession, hookSettings, MARK, RUNS, LIMIT, NO_PROGRESS, REASON };
244
+ module.exports = { parseCommand, grillPrompt, startMessage, cancelMessage, cleanDraft, goalOf, statesAt, begin, decide, onStop, resume, briefingRows, goalRowsAt, withGoalRows, blockOf, keyOfSession, hookSettings, askToolReply, ASK_TOOL, MARK, RUNS, LIMIT, NO_PROGRESS, REASON };
@@ -191,6 +191,16 @@ module.exports = {
191
191
  ctx.json(res, key ? Goal.onStop({ runtimeDir: ctx.runtimeDir, key, message: body.last_assistant_message }) : {});
192
192
  return true;
193
193
  }
194
+ if (url.pathname === '/api/briefing-premium/ask-tool') {
195
+ // chat-ask-card: Claude Code's PreToolUse hook for AskUserQuestion in a chat session. The panel draws the question; the picker is refused.
196
+ if (req.method !== 'POST') { ctx.json(res, { ok: false, error: 'POST only' }, 405); return true; }
197
+ await ctx.readJson(req);
198
+ const tok = req.headers && req.headers['x-pmos-session'];
199
+ const who = actor.sessionForToken(Array.isArray(tok) ? tok[0] : tok, { sessDir: ctx.sessDir || path.join(ctx.runtimeDir || '', 'sessions') });
200
+ if (!who) { ctx.json(res, { ok: false, error: 'no valid session token' }, 401); return true; }
201
+ ctx.json(res, Goal.askToolReply());
202
+ return true;
203
+ }
194
204
  if (url.pathname === '/api/briefing-premium/seen') {
195
205
  // popup context slice 3b: a popup the PM opened, with what it showed, so the leads session after a refresh writes its lead. Starts nothing.
196
206
  if (req.method !== 'POST') { ctx.json(res, { ok: false, error: 'POST only' }, 405); return true; }
@@ -438,6 +438,16 @@ function callTarget(input, root) {
438
438
  return t.length > TARGET_MAX ? t.slice(0, TARGET_MAX - 1) + '…' : t;
439
439
  }
440
440
 
441
+ /* The questions of one AskUserQuestion call, as the chat panel draws them: [{ question, header, multi, options:[{ label, detail }] }].
442
+ * At most 4 questions of at most 6 options; a question with fewer than 2 options is dropped. Every string goes through `clean`. */
443
+ function askQuestions(input, clean = (x) => x) {
444
+ const s = (v, n) => clean(String(v == null ? '' : v).replace(/\s+/g, ' ').trim()).slice(0, n);
445
+ return (input && Array.isArray(input.questions) ? input.questions : []).slice(0, 4).map((q) => ({
446
+ question: s(q && q.question, 300), header: s(q && q.header, 40), multi: !!(q && q.multiSelect),
447
+ options: (q && Array.isArray(q.options) ? q.options : []).slice(0, 6).map((o) => ({ label: s(o && o.label, 120), detail: s(o && o.description, 240) })).filter((o) => o.label),
448
+ })).filter((q) => q.question && q.options.length >= 2);
449
+ }
450
+
441
451
  function readConversation(file, clean = (x) => x, limit = CONV_LIMIT, root = null) {
442
452
  let raw;
443
453
  try {
@@ -466,6 +476,8 @@ function readConversation(file, clean = (x) => x, limit = CONV_LIMIT, root = nul
466
476
  if (last.calls.length < CALLS_MAX) last.calls.push(call);
467
477
  last.at = at || last.at;
468
478
  } else out.push({ role: 'tool', tools: { [n]: 1 }, calls: [call], at: at || null });
479
+ // chat-ask-card: Claude Code's question tool keeps its questions, so the chat panel can draw them as a card with answer buttons
480
+ if (name === 'AskUserQuestion') { const q = askQuestions(input, clean); if (q.length) out[out.length - 1].ask = q; }
469
481
  };
470
482
  for (const line of raw.split('\n')) {
471
483
  if (!line) continue;
@@ -492,7 +504,7 @@ function readConversation(file, clean = (x) => x, limit = CONV_LIMIT, root = nul
492
504
  }
493
505
  }
494
506
  const messages = out.slice(-limit).map((x) => (x.role === 'tool'
495
- ? { role: 'tool', tools: x.tools, calls: x.calls, at: x.at }
507
+ ? { role: 'tool', tools: x.tools, calls: x.calls, at: x.at, ...(x.ask ? { ask: x.ask } : {}) }
496
508
  : { role: x.role, text: x.text, at: x.at }));
497
509
  return { messages };
498
510
  }
@@ -518,5 +530,5 @@ function permissionAsk(screen, clean = (x) => x) {
518
530
  return options.length >= 2 ? { question: clean(lines[at]).slice(0, 200), options } : null;
519
531
  }
520
532
 
521
- module.exports = { permissionAsk, claudeHomes, callTarget, findTranscript, readHarness, readConversation, CONV_LIMIT, prettyTool, slugFor, resolvePid, descendants,
533
+ module.exports = { permissionAsk, askQuestions, claudeHomes, callTarget, findTranscript, readHarness, readConversation, CONV_LIMIT, prettyTool, slugFor, resolvePid, descendants,
522
534
  MAX_BYTES, MAX_WALK_DEPTH, PS_SNAPSHOT_MS, defaultChildren };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.392.0",
3
+ "version": "0.393.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.392.0",
9
+ "version": "0.393.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.392.0",
3
+ "version": "0.393.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -0,0 +1,35 @@
1
+ /* chat-ask — Claude Code's question tool (AskUserQuestion) as a card in the chat panel (bug 2026-10-22, chat-ask-card).
2
+ * The terminal picker cannot be shown in the panel, so a chat session's hook refuses it (lib/goal-chat.js askToolReply) and the panel draws
3
+ * the questions from the transcript here. One question with one answer: each option is a button that sends it. Several questions, or a
4
+ * question that takes several answers: the options toggle, and Send answers sends them all as one message. Pure: no DOM, so Node tests it. */
5
+ const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
6
+
7
+ /** True when one press answers the whole card: one question that takes one answer. */
8
+ export const oneTap = (ask) => Array.isArray(ask) && ask.length === 1 && !ask[0].multi;
9
+
10
+ /** The PM's answer as one message. picked: { '<q>': [option index, …] }. Empty when a question has no answer yet. */
11
+ export function answerText(ask, picked) {
12
+ const qs = Array.isArray(ask) ? ask : [];
13
+ const parts = qs.map((q, i) => (picked && picked[i] || []).map((k) => q.options[k] && q.options[k].label).filter(Boolean));
14
+ if (!qs.length || parts.some((p) => !p.length)) return '';
15
+ if (qs.length === 1) return parts[0].join(', ');
16
+ return qs.map((q, i) => (q.header || q.question) + ': ' + parts[i].join(', ')).join('; ');
17
+ }
18
+
19
+ /** The card. live: the PM can still answer (nothing was written after the question); picked: the toggled options of a multi card. */
20
+ export function askCardHtml(ask, { live = false, picked = {}, at = '' } = {}) {
21
+ const qs = Array.isArray(ask) ? ask : [];
22
+ if (!qs.length) return '';
23
+ const one = oneTap(qs);
24
+ const body = qs.map((q, i) => {
25
+ const opts = q.options.map((o, k) => {
26
+ const on = (picked[i] || []).includes(k);
27
+ const act = one ? `data-chat-say="${esc(o.label)}"` : `data-ask-pick="${i}:${k}" aria-pressed="${on}"`;
28
+ return `<button type="button" class="chip${on ? ' on' : ''}" ${act}${o.detail ? ` title="${esc(o.detail)}"` : ''}${live ? '' : ' disabled'}>${esc(o.label)}</button>`;
29
+ }).join('');
30
+ return `<div class="askq">${q.header ? `<p class="askh">${esc(q.header)}${q.multi ? ' · pick any' : ''}</p>` : ''}<p class="tt"><b>${esc(q.question)}</b></p><div class="chips">${opts}</div></div>`;
31
+ }).join('');
32
+ const send = !one && live ? `<div class="chatopts"><button type="button" class="cta" data-ask-send="${esc(at)}"${answerText(qs, picked) ? '' : ' disabled'}>Send answers</button></div>` : '';
33
+ const foot = live ? '<p class="askfoot">Or write your own answer below.</p>' : '';
34
+ return `<p class="agtag">Claude asks</p>${body}${send}${foot}`;
35
+ }
@@ -10,6 +10,7 @@ import { lineItems, behindOf, whenRead } from './freshness-words.js';
10
10
  import { splitGoal, shownUser, goalBlockHtml, goalProgressHtml, goalChipHtml, goalViewHtml, goalNow, slashMatches } from './goal-chat.js';
11
11
  import { mdHtml, userHtml, toolLine, webKind } from './chat-md.js';
12
12
  import { splitReport, reportChipHtml, blockSig } from './report-chat.js';
13
+ import { askCardHtml, answerText } from './chat-ask.js';
13
14
  import { openReportTab } from './premium-report-tab.js';
14
15
  import { openChartTab } from './premium-chart-tab.js';
15
16
  /** A pmos-report block opens the Report tab, or the Chart tab for a chart or a dashboard (premium-reports-from-chat, slice C). */
@@ -423,7 +424,9 @@ export function threadHtml(th) {
423
424
  export { toolLine }; // "Used Read ×2, slack_read_thread": chat-md.js shortens a connector tool's long name
424
425
  /** The session's part of the panel: its turns, the permission question with its options, and Stop while Claude works. Pure, for Node. */
425
426
  /** goal: the key's /goal record (GET /thread), so the newest grilling message can be pressed (slice 2, PRD G4, G5). */
426
- export function sessionHtml(c, goal = null) {
427
+ /** answer: the panel can answer Claude's questions (a chat key's session; a session opened from the list answers in its terminal). */
428
+ const INTERRUPT = /^\[Request interrupted by user/;
429
+ export function sessionHtml(c, goal = null, { answer = false } = {}) {
427
430
  if (!c) return '';
428
431
  if (c.state === 'ended' && !(c.messages || []).length) return turnAgent('<p class="tt" role="status">This session has ended. Your next message starts a new one.</p>');
429
432
  if (c.state !== 'conv' && c.state !== 'ended') return turnAgent(`<p class="tt" role="status">${esc(c.missing || 'Claude is starting.')}</p>`);
@@ -431,8 +434,14 @@ export function sessionHtml(c, goal = null) {
431
434
  const waiting = !c.ask && c.turn !== 'agent' && c.turn !== 'tool';
432
435
  const ctx = new Map(turnsOf(msgs, waiting || c.state === 'ended').filter((t) => t.done).map((t) => [t.at, t.items])); // premium-chat-viewer slice 2
433
436
  const out = msgs.map((m, i) => {
434
- if (m.role === 'user') return turnUser(shownUser(m.text));
435
- if (m.role !== 'assistant') return `<p class="toolline" title="${esc((m.calls || []).map((x) => x.tool + (x.target ? ' ' + x.target : '')).join('\n'))}">${esc(toolLine(m.tools))}</p>`;
437
+ if (m.role === 'user') return INTERRUPT.test(m.text || '') ? '<p class="toolline">Stopped</p>' : turnUser(shownUser(m.text));
438
+ if (m.role !== 'assistant') {
439
+ const line = `<p class="toolline" title="${esc((m.calls || []).map((x) => x.tool + (x.target ? ' ' + x.target : '')).join('\n'))}">${esc(toolLine(m.tools))}</p>`;
440
+ if (!m.ask) return line;
441
+ // chat-ask-card: Claude's question is a card; it can be answered until the PM writes again
442
+ const live = answer && c.state !== 'ended' && !msgs.slice(i + 1).some((x) => x.role === 'user');
443
+ return line + turnAgent(askCardHtml(m.ask, { live, picked: live ? (ASKS.picked[askId(m)] || {}) : {}, at: askId(m) }));
444
+ }
436
445
  const g = splitGoal(m.text), rp = splitReport(g.text); // premium-reports-from-chat: a pmos-report block becomes a chip that opens the Report tab
437
446
  const live = i === last && waiting && !!goal && goal.state === 'grilling';
438
447
  return turnAgent(`<p class="agtag">Claude</p>${rp.text ? mdHtml(rp.text) : ''}${goalBlockHtml(g.block, { live, state: goal && goal.state })}${reportChipHtml(rp.block, i)}${chipsHtml(ctx.get(i))}`);
@@ -479,7 +488,8 @@ export function drawThread(th, key, conv) {
479
488
  drawLead(box, th);
480
489
  let t = $('#thr', box); if (!t) { box.insertAdjacentHTML('beforeend', '<div id="thr"></div>'); t = $('#thr', box); }
481
490
  const b = $('#dBody'), atEnd = b.scrollHeight - b.scrollTop - b.clientHeight < 80;
482
- putHtml(t, threadHtml(th) + sessionHtml(conv, th.goal));
491
+ S.conv = conv;
492
+ putHtml(t, threadHtml(th) + sessionHtml(conv, th.goal, { answer: true }));
483
493
  ctxAuto(key, conv);
484
494
  S.goal = th.goal || null; S.draft = readyDraft(conv); S.session = th.session || null;
485
495
  goalView(key, conv);
@@ -640,6 +650,27 @@ async function sendText(key, text, files) {
640
650
  loadThread(key);
641
651
  return true;
642
652
  }
653
+ /* chat-ask-card: the options of a card with several questions toggle, and Send answers sends them as one message */
654
+ const ASKS = { picked: {} };
655
+ const askId = (m) => String(m.at || '') + ':' + (m.ask || []).map((q) => q.question).join('|').slice(0, 80);
656
+ function askOf(id) { const m = ((S.conv && S.conv.messages) || []).find((x) => x.role === 'tool' && x.ask && askId(x) === id); return m ? m.ask : null; }
657
+ $('#dBody').addEventListener('click', async (e) => {
658
+ const pick = e.target.closest('[data-ask-pick]'), send = e.target.closest('[data-ask-send]');
659
+ if (!S.key || (!pick && !send)) return;
660
+ if (pick) {
661
+ const card = pick.closest('.tc'), btn = card && card.querySelector('[data-ask-send]');
662
+ const at = btn ? btn.dataset.askSend : null, ask = at != null && askOf(at); if (!ask) return;
663
+ const [q, k] = pick.dataset.askPick.split(':').map(Number);
664
+ const cur = (ASKS.picked[at] = ASKS.picked[at] || {}), had = cur[q] || [];
665
+ cur[q] = had.includes(k) ? had.filter((x) => x !== k) : ask[q].multi ? had.concat(k) : [k];
666
+ card.innerHTML = askCardHtml(ask, { live: true, picked: cur, at }); // the next poll draws the same picks
667
+ return;
668
+ }
669
+ const ask = askOf(send.dataset.askSend), text = ask && answerText(ask, ASKS.picked[send.dataset.askSend]);
670
+ if (!text) return;
671
+ send.disabled = true;
672
+ if (await sendText(S.key, text)) delete ASKS.picked[send.dataset.askSend];
673
+ });
643
674
  async function onGoalPress(e) {
644
675
  const say = e.target.closest('[data-chat-say]'), gb = e.target.closest('[data-goal]'), mi = e.target.closest('[data-slash]');
645
676
  if (mi) { pickSlash(mi.dataset.slash); return; }
@@ -2675,3 +2675,9 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
2675
2675
  .plead p{margin:0 0 6px;font-size:var(--fs-3);line-height:1.5;overflow-wrap:anywhere}
2676
2676
  .plead .fine2{color:var(--ink-3)}
2677
2677
  .plead.none{display:flex;align-items:center;gap:10px;justify-content:space-between}.plead.none p{margin:0}
2678
+
2679
+ /* ── chat-ask-card (bug 2026-10-22): Claude's question in the chat panel, with its options as buttons. public/pm/chat-ask.js ── */
2680
+ .askq+.askq{margin-top:14px}
2681
+ .askh{margin:0 0 2px;font:600 var(--t-micro) var(--mono);color:var(--ink-3);text-transform:uppercase;letter-spacing:.04em}
2682
+ .chip.on{background:var(--solid);color:var(--on-solid);border-color:transparent}
2683
+ .askfoot{margin:8px 0 0;font-size:var(--t-small);color:var(--ink-3)}
@@ -39,6 +39,7 @@
39
39
  "briefing-premium-writes.test.js",
40
40
  "briefing-premium-agent.test.js",
41
41
  "goal-chat.test.js",
42
+ "chat-ask.test.js",
42
43
  "chat-md.test.js",
43
44
  "md-table.test.js",
44
45
  "chat-file-locate.test.js",
@@ -217,6 +218,7 @@
217
218
  "briefing-premium-writes.test.js": 1,
218
219
  "briefing-premium-agent.test.js": 1,
219
220
  "goal-chat.test.js": 1,
221
+ "chat-ask.test.js": 1,
220
222
  "chat-md.test.js": 1,
221
223
  "md-table.test.js": 1,
222
224
  "chat-file-locate.test.js": 1,