create-pmos 0.693.0 → 0.694.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.693.0",
3
+ "version": "0.694.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": {
@@ -33,6 +33,19 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.694.0",
38
+ "at": "2026-11-22T09:46:19.118Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1514,
43
+ "t": "Discovery in three questions on a new initiative (A459)",
44
+ "s": "Discovery in three questions on a new initiative (A459)",
45
+ "k": "new"
46
+ }
47
+ ]
48
+ },
36
49
  {
37
50
  "v": "0.693.0",
38
51
  "at": "2026-11-22T09:36:04.094Z",
@@ -411,19 +424,6 @@
411
424
  "k": "x"
412
425
  }
413
426
  ]
414
- },
415
- {
416
- "v": "0.652.0",
417
- "at": "2026-11-20T09:04:15.002Z",
418
- "f": 4,
419
- "prs": [
420
- {
421
- "n": 1434,
422
- "t": "A done merge resolves its ✦, merged artefacts fold the old files, stage bars follow task dates",
423
- "s": "A done merge resolves its ✦, merged artefacts fold the old files, stage bars follow task dates",
424
- "k": "fix"
425
- }
426
- ]
427
427
  }
428
428
  ]
429
429
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@08a23b28
1
+ kernel-source: pmos@d4fea2c6
2
2
  assembled: 2026-11-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-11-22T09:36:01Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T09:46:15Z"}
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-11-22T09:36:01Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T09:46:15Z"}
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-11-22T09:36:01Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T09:46:15Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "v": "0.694.0",
4
+ "at": "2026-11-22T09:46:19.118Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1514,
9
+ "t": "Discovery in three questions on a new initiative (A459)",
10
+ "s": "Discovery in three questions on a new initiative (A459)",
11
+ "k": "new"
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  "v": "0.693.0",
4
17
  "at": "2026-11-22T09:36:04.094Z",
@@ -178,7 +178,7 @@ Some features are still not designed. Home keeps each one usable as a plain card
178
178
 
179
179
  ## The other pages
180
180
 
181
- - **Board.** New initiative takes links and files, starts in Triage and asks only the questions that the material does not answer. **Later** keeps the questions as the next step. The Board also has List, By stage and a span picker. Documents are in each initiative's Documents fold and in Search. On a phone, **Metrics** and **Cancelled and archived** are in every view. On a computer, press **Discuss in chat** on an initiative's or a program's panel to open the chat about it in a panel on the Board. It is the same conversation as on Home. At 1600 px and wider the chat opens beside the panel; on a laptop it slides over it.
181
+ - **Board.** New initiative takes links and files, starts in Triage and asks three questions: who has this problem, how do we know, and what would change our mind. The first two answers become the initiative's evidence. The third answer becomes the result that stops the work, its kill condition. If you change an answer, the new answer replaces the old one. **Not sure yet** keeps nothing. **Later** keeps the open questions as the next step. The Board also has List, By stage and a span picker. Documents are in each initiative's Documents fold and in Search. On a phone, **Metrics** and **Cancelled and archived** are in every view. On a computer, press **Discuss in chat** on an initiative's or a program's panel to open the chat about it in a panel on the Board. It is the same conversation as on Home. At 1600 px and wider the chat opens beside the panel; on a laptop it slides over it.
182
182
  - **Dock a panel left or right (Board and Intelligence).** Drag a panel's header to the left or the right half of the window, and drop it when that half turns blue. With the keyboard, press **Arrange** in the panel's header, then **Dock on the left** or **Dock on the right**. Each kind of panel stays on its side after a reload. The divider resizes the panel on either side. The Live pill's list has a grab bar on top: drag it to the left or the right side, or press it to move the list to the other side.
183
183
  - **Meetings.** Replay with screen captures and kept points, Focus, a presenter view, Add material, the After view, a Day, Week and Month calendar, and Notes.
184
184
  - **Reports.** The Brief, the report states, a document reader and a live page reader.
@@ -1,62 +1,55 @@
1
1
  'use strict';
2
2
  /* lib/board-grill.js — the first questions of a new initiative (initiative premium-uncovered-features, Board: BdNew, BdGrill).
3
3
  *
4
- * fold(lines, id) → { id, why, material: { links, files }, answers: { [q]: text }, later, at } PURE
4
+ * fold(lines, id) → { id, why, material: { links, files }, answers: { [q]: text }, refs: { [q]: ref }, later, at } PURE
5
5
  * questionsOf(state) → [{ key, n, of, topic, q, why, chips, answer }] PURE
6
6
  * summaryOf(state) → { open, total, later, took: [line] } PURE
7
7
  *
8
8
  * A new initiative starts in Triage with no lane choice. Right after it is made, the Board shows what PMOS took from the PM's words and
9
- * material, then asks only what they leave open, one question at a time. The questions are the BRD's four parts (the Triage output:
10
- * business case, who asked, problem, success measure). A part the Why already answers is not asked. "Later" keeps the open questions as
11
- * the initiative's next step.
9
+ * material, then asks three questions, one at a time: who has this problem, how do we know, and what would change our mind
10
+ * (discovery-three-questions, bet A459; it replaced the BRD's four parts). POST /api/board-grill/answer turns each answer into the
11
+ * Experiment's evidence or kill condition. "Later" keeps the open questions as the initiative's next step.
12
12
  *
13
13
  * FILE MODE ONLY (D64/D66): one append-only file, <state>/triage-answers.jsonl, with lines
14
14
  * { kind: 'start', initiative, why, links: [{ url, label }] } the New initiative panel's Why and links
15
15
  * { kind: 'file', initiative, name, type, size, path } a file the PM added (its bytes are in <state>/material/<initiative>/)
16
- * { kind: 'answer', initiative, q, answer } one answer (the last one per question wins)
16
+ * { kind: 'answer', initiative, q, answer, ref? } one answer (the last one per question wins); ref is the
17
+ * artefact line it wrote, so a changed answer undoes it
17
18
  * { kind: 'later', initiative } the PM closed the questions with Later
18
19
  * Nothing here reads the material for the PM or sends it anywhere: an agent session reads it during Triage. */
20
+ const DQ = require('./discovery-questions.js');
19
21
 
20
- /** The BRD's parts as questions. `answeredBy` says when the Why already answers one, so it is not asked. */
21
- const QUESTIONS = [
22
- { key: 'problem', topic: 'Problem', q: 'What problem does it solve, and who is stuck today?', why: 'The BRD starts from the problem. Your Why did not name it, so PMOS asks.',
23
- chips: [], answeredBy: (why) => words(why) >= 8 },
24
- { key: 'who', topic: 'Who asked', q: 'Who asked for it, or who feels the problem most?', why: 'The BRD names who asked, so the right people review it.',
25
- chips: ['Customers', 'Partners', 'An internal team', 'Not sure yet'] },
26
- { key: 'case', topic: 'Business case', q: 'What does it win or save if it works?', why: 'The business case decides its rank against the other initiatives.',
27
- chips: ['Revenue', 'Retention', 'Cost', 'Risk', 'Not sure yet'] },
28
- { key: 'success', topic: 'Success', q: 'What would show it worked?', why: 'The success measure becomes the target that Monitor reads after the release.',
29
- chips: ['A metric moves', 'Fewer support tickets', 'A customer renews', 'Not sure yet'] },
30
- ];
22
+ /** The three discovery questions (lib/discovery-questions.js, bet A459). Every one is asked: a Why removes none of them. */
23
+ const QUESTIONS = DQ.QUESTIONS;
31
24
  const KEYS = new Set(QUESTIONS.map((x) => x.key));
32
- const words = (s) => String(s || '').trim().split(/\s+/).filter((w) => w.length > 1).length;
33
25
 
34
26
  /** The state of one initiative from the file's lines. Pure. */
35
27
  function fold(lines, id) {
36
- const st = { id, why: '', material: { links: [], files: [] }, answers: {}, later: false, at: null };
28
+ const st = { id, why: '', material: { links: [], files: [] }, answers: {}, refs: {}, later: false, at: null };
37
29
  for (const l of lines || []) {
38
30
  if (!l || l.initiative !== id) continue;
39
31
  if (l.kind === 'start') {
40
32
  st.why = typeof l.why === 'string' ? l.why : st.why; st.at = st.at || l.at || null;
41
33
  for (const k of Array.isArray(l.links) ? l.links : []) if (k && k.url && !st.material.links.some((x) => x.url === k.url)) st.material.links.push({ url: String(k.url), label: String(k.label || k.url) });
42
34
  } else if (l.kind === 'file' && l.name) st.material.files.push({ name: String(l.name), type: String(l.type || ''), size: Number(l.size) || 0, path: l.path || null });
43
- else if (l.kind === 'answer' && KEYS.has(l.q)) { if (String(l.answer || '').trim()) st.answers[l.q] = String(l.answer).trim(); else delete st.answers[l.q]; }
35
+ else if (l.kind === 'answer' && KEYS.has(l.q)) {
36
+ if (String(l.answer || '').trim()) st.answers[l.q] = String(l.answer).trim(); else delete st.answers[l.q];
37
+ if (l.ref) st.refs[l.q] = String(l.ref); else delete st.refs[l.q];
38
+ }
44
39
  else if (l.kind === 'later') st.later = true;
45
40
  }
46
41
  return st;
47
42
  }
48
- /** The questions PMOS asks: the BRD parts the Why does not answer, numbered, each with its answer when there is one. Pure. */
43
+ /** The questions PMOS asks, numbered, each with its answer when there is one. Pure. */
49
44
  function questionsOf(st) {
50
- const ask = QUESTIONS.filter((x) => !(x.answeredBy && x.answeredBy(st.why)));
51
- return ask.map((x, i) => ({ key: x.key, n: i + 1, of: ask.length, topic: x.topic, q: x.q, why: x.why, chips: x.chips.slice(), answer: st.answers[x.key] || '' }));
45
+ return QUESTIONS.map((x, i) => ({ key: x.key, n: i + 1, of: QUESTIONS.length, topic: x.topic, q: x.q, why: x.why, chips: x.chips.slice(), answer: st.answers[x.key] || '' }));
52
46
  }
53
47
  /** How many questions are still open, and what PMOS took from the Why and the material, in plain lines. Pure. */
54
48
  function summaryOf(st) {
55
49
  const qs = questionsOf(st), open = qs.filter((x) => !x.answer).length, L = st.material.links.length, F = st.material.files.length;
56
50
  const took = [];
57
51
  if (st.why.trim()) took.push('Your Why: ' + st.why.trim());
58
- if (QUESTIONS[0].answeredBy(st.why)) took.push('It names the problem, so PMOS does not ask about it.');
59
- if (L || F) took.push('Material: ' + [L ? L + ' ' + (L === 1 ? 'link' : 'links') : '', F ? F + ' ' + (F === 1 ? 'file' : 'files') : ''].filter(Boolean).join(' and ') + '. An agent reads it in Triage and drafts the BRD from it.');
52
+ if (L || F) took.push('Material: ' + [L ? L + ' ' + (L === 1 ? 'link' : 'links') : '', F ? F + ' ' + (F === 1 ? 'file' : 'files') : ''].filter(Boolean).join(' and ') + '. An agent reads it in Triage for more evidence.');
60
53
  return { open, total: qs.length, later: st.later, took };
61
54
  }
62
55
 
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+ /* lib/discovery-questions.js — discovery in three questions (initiative discovery-three-questions, bet A459).
3
+ *
4
+ * QUESTIONS the three questions a new initiative asks, in order: [{ key, topic, q, why, chips }]
5
+ * lineOf(key, answer) → { artefact: 'experiment', field, text, sources } | null PURE
6
+ *
7
+ * A new initiative on the Board asks only: who has this problem, how do we know, and what would change our mind. There is no
8
+ * template to fill. The first two answers become evidence lines of the initiative's Experiment artefact (lib/artefacts.js), the
9
+ * third becomes its kill condition, and lib/artefact-mirror.js copies the kill condition to the record's `kill:` line, which the
10
+ * gates and the outcome checks read. "Not sure yet" and an empty answer become nothing: the question stays open for discovery.
11
+ * Every line carries the source label TAG, so the health number counts them (the record's health_read). Nothing here writes. */
12
+
13
+ const TAG = '[discovery-questions]';
14
+ const UNSURE = 'Not sure yet';
15
+ const QUESTIONS = Object.freeze([
16
+ Object.freeze({ key: 'who', topic: 'Who has it', q: 'Who has this problem?', field: 'evidence', prefix: 'Who has it: ',
17
+ why: 'Discovery starts with the people who feel it. This becomes the first line of its evidence.',
18
+ chips: Object.freeze(['Customers', 'Partners', 'An internal team', UNSURE]) }),
19
+ Object.freeze({ key: 'know', topic: 'How we know', q: 'How do we know they have it?', field: 'evidence', prefix: 'How we know: ',
20
+ why: 'A guess is fine, if it says so. This becomes its evidence.',
21
+ chips: Object.freeze(['They told us', 'It shows in the data', 'Support tickets', 'A guess for now', UNSURE]) }),
22
+ Object.freeze({ key: 'mind', topic: 'What would change our mind', q: 'What would change our mind?', field: 'kill', prefix: '',
23
+ why: 'This becomes its kill condition: the result that stops the work. A number makes it easy to check.',
24
+ chips: Object.freeze([UNSURE]) }),
25
+ ]);
26
+ const BY_KEY = new Map(QUESTIONS.map((x) => [x.key, x]));
27
+
28
+ /** The artefact set an answer becomes, or null for "Not sure yet", an empty answer or an unknown key. Pure. */
29
+ function lineOf(key, answer) {
30
+ const x = BY_KEY.get(key);
31
+ const a = String(answer == null ? '' : answer).replace(/\s+/g, ' ').trim();
32
+ if (!x || !a || a === UNSURE) return null;
33
+ return { artefact: 'experiment', field: x.field, text: x.prefix + a, sources: [{ label: `${TAG} ${x.key}`, ref: 'triage-answers.jsonl' }] };
34
+ }
35
+
36
+ module.exports = { TAG, UNSURE, QUESTIONS, lineOf };
@@ -5,15 +5,40 @@
5
5
  * GET /api/board-grill?ws=<id>&ids=<id,id,…> → { ok, items: { [id]: summary } } only the initiatives with a line in the file
6
6
  * POST /api/board-grill/start { ws, id, why?, links?: [{ url, label? }] } the New initiative panel's Why and links
7
7
  * POST /api/board-grill/file { ws, id, name, type?, data } one file (base64, at most 4 MB) kept under <state>/material/<id>/
8
- * POST /api/board-grill/answer { ws, id, q, answer } one answer; an empty answer clears it
8
+ * POST /api/board-grill/answer { ws, id, q, answer } one answer; an empty answer clears it. The answer also
9
+ * becomes the Experiment's evidence or kill condition
10
+ * (lib/discovery-questions.js): the line the earlier answer
11
+ * wrote is undone, the new one is set as the PM's, and a
12
+ * kill condition is mirrored onto the record's `kill:` line
9
13
  * POST /api/board-grill/later { ws, id } keep the open questions as the next step
10
14
  * lib/board-grill.js holds the rules. FILE MODE ONLY: <state>/triage-answers.jsonl, append-only. Every POST is a page press
11
- * (pm-guard requirePagePress). Nothing is sent anywhere. */
15
+ * (pm-guard requirePagePress). Nothing is sent anywhere. The answer route also writes the repository's artefact ledger and the record. */
12
16
  const fs = require('fs');
13
17
  const path = require('path');
14
18
  const guard = require('./pm-guard.js');
15
19
  const pmItems = require('./pm-items.js');
16
20
  const G = require('./board-grill.js');
21
+ const DQ = require('./discovery-questions.js');
22
+ const A = require('./artefacts.js');
23
+
24
+ /** An answer into the Experiment artefact: undo the line the earlier answer to the same question wrote, then set the new one (none for
25
+ * "Not sure yet" or an empty answer). → { ref, error? }. Never throws: the answer is kept in triage-answers.jsonl either way. */
26
+ function toArtefact(root, id, q, answer, prevRef, actor) {
27
+ let f;
28
+ try { f = A.file(A.dirOf(root)); } catch (e) { return { ref: null, error: String((e && e.message) || e) }; }
29
+ const mirror = require('./artefact-mirror.js');
30
+ if (prevRef) {
31
+ const u = A.undo(f, { ref: prevRef }, actor);
32
+ if (u.ok) mirror.after(root, u.line, f);
33
+ }
34
+ const want = DQ.lineOf(q, answer);
35
+ if (!want) return { ref: null };
36
+ const r = A.set(f, { scope: 'experiment:' + id, ...want }, actor);
37
+ if (!r.ok) { console.warn(`${DQ.TAG} ${id} ${q}: the answer was kept, but not as ${want.field}: ${r.error}`); return { ref: null, error: r.error }; }
38
+ mirror.after(root, r.line, f);
39
+ console.log(`${DQ.TAG} ${id} ${q} → experiment.${want.field}`);
40
+ return { ref: r.line.id };
41
+ }
17
42
 
18
43
  const ID_RE = /^[a-z0-9][\w.-]{0,80}$/i;
19
44
  const MAX_FILE = 4 * 1024 * 1024;
@@ -80,7 +105,10 @@ module.exports = {
80
105
  pmItems.appendEvent(f, { kind: 'file', initiative: b.id, name, type: str(b.type, 80), size: buf.length, path: path.relative(w.root, path.join(dir, name)).split(path.sep).join('/') }, now);
81
106
  } else if (p === '/api/board-grill/answer') {
82
107
  if (!G.QUESTIONS.some((x) => x.key === b.q)) return bad('q must name a question');
83
- pmItems.appendEvent(f, { kind: 'answer', initiative: b.id, q: b.q, answer: str(b.answer, 500) }, now);
108
+ const answer = str(b.answer, 500), prev = G.fold(read(f), b.id);
109
+ const a = prev.answers[b.q] === answer && (prev.refs[b.q] || !DQ.lineOf(b.q, answer)) ? { ref: prev.refs[b.q] || null } // the same answer again writes no new line
110
+ : toArtefact(w.root, b.id, b.q, answer, prev.refs[b.q], g.actor);
111
+ pmItems.appendEvent(f, { kind: 'answer', initiative: b.id, q: b.q, answer, ...(a.ref ? { ref: a.ref } : {}) }, now);
84
112
  } else if (p === '/api/board-grill/later') {
85
113
  pmItems.appendEvent(f, { kind: 'later', initiative: b.id }, now);
86
114
  } else return bad('no such route', 404);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.693.0",
3
+ "version": "0.694.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.693.0",
9
+ "version": "0.694.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.693.0",
3
+ "version": "0.694.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",
@@ -121,7 +121,7 @@ const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', {
121
121
  await p.click('#czViewer form[data-form="new2"] [type="submit"]');
122
122
  ok('T3 Accept records the accept line and a new initiative, and says so', !!(await toastIs(/accepted in/)) && lines('boards.jsonl').some((l) => l.kind === 'ask-accept' && l.ask === a1.body.ask.id), JSON.stringify(lines('boards.jsonl').map((l) => l.kind)));
123
123
  const g0 = await until(() => lines('triage-answers.jsonl').find((l) => l.kind === 'start'));
124
- ok('T3 the Why and the link start its first questions (BdGrill): one start line, and the questions open in the same panel', !!g0 && /Finance wants a CSV/.test(g0.why) && g0.links.length === 1 && !!(await until(() => p.evaluate(() => !!document.querySelector('#czViewer .bd-qc.on') && /questions? before the BRD/.test(document.querySelector('#czViewer').textContent)))), JSON.stringify(g0));
124
+ ok('T3 the Why and the link start its first questions (BdGrill): one start line, and the questions open in the same panel', !!g0 && /Finance wants a CSV/.test(g0.why) && g0.links.length === 1 && !!(await until(() => p.evaluate(() => !!document.querySelector('#czViewer .bd-qc.on') && /questions? to start discovery/.test(document.querySelector('#czViewer').textContent)))), JSON.stringify(g0));
125
125
  await p.click('#czViewer .bd-qc.on [data-qchip]'); await p.click('#czViewer [data-grill="next"]');
126
126
  ok('T3 an answer is kept per question', await until(() => lines('triage-answers.jsonl').some((l) => l.kind === 'answer' && l.answer)));
127
127
  await p.click('#czViewer [data-grill="later"]');
@@ -9,8 +9,9 @@
9
9
  * says so. Create: POST /api/boards/asks/add then /asks/accept (it starts in the first stage), then POST /api/board-grill/start
10
10
  * and POST /api/proposals/look (Claude looks for it elsewhere; batch 12 item 4)
11
11
  * and /file for the material.
12
- * First questions (BdGrill) the same panel, right after: what PMOS took from the Why and the material, then only the open questions, one at a
13
- * time (POST /api/board-grill/answer). Later (POST /api/board-grill/later) keeps them as the initiative's next step.
12
+ * First questions (BdGrill) the same panel, right after: what PMOS took from the Why and the material, then the three discovery questions
13
+ * (who has this problem, how do we know, what would change our mind; bet A459), one at a time (POST
14
+ * /api/board-grill/answer: each answer becomes the Experiment's evidence or kill condition). Later (POST /api/board-grill/later) keeps them as the initiative's next step.
14
15
  * Nothing is sent to anyone: a decline keeps its reason in the board ledger. */
15
16
  import { pmPost } from './http.js';
16
17
  import { $, $$, esc } from './premium-shell.js';
@@ -303,7 +304,7 @@ function grillHtml() {
303
304
  const last = Q.at >= qs.length - 1;
304
305
  return `<div class="pk-h"><div class="pk-ht"><p class="pk-eye">${esc(Q.stage)} · ${Q.fresh ? 'just created' : 'open questions'}</p><h2 id="pkTitle">${esc(Q.title)}</h2></div><div class="pk-tools"><button type="button" class="bd-ib" data-grill="later" aria-label="Close. The questions stay as this initiative’s next step" title="Close">${SV(I.x)}</button></div></div>`
305
306
  + `<div class="pk-b bd-pl"><div class="bd-box sm"><b>What PMOS took from your material</b>${took.map((t) => `<span>${esc(t)}</span>`).join('')}${names.length ? `<span class="bd-amut">From ${esc(names.join(' and '))}</span>` : ''}</div>`
306
- + (qs.length ? `<div class="bd-qhd"><b>${qs.length} ${qs.length === 1 ? 'question' : 'questions'} before the BRD</b><span class="bd-amut">Only what the material does not answer</span></div>${qs.map(card).join('')}` : '<p class="bd-amut">Nothing is left to ask: the BRD can start from what you gave.</p>')
307
+ + (qs.length ? `<div class="bd-qhd"><b>${qs.length} ${qs.length === 1 ? 'question' : 'questions'} to start discovery</b><span class="bd-amut">Your answers become its evidence and what would stop it</span></div>${qs.map(card).join('')}` : '<p class="bd-amut">Nothing is left to ask.</p>')
307
308
  + `<p class="bd-amsg" id="grM" role="status"></p><div class="bd-arow bd-pfoot">${qs.length ? `<button type="button" class="bd-btn solid" data-grill="next">${last ? 'Done' : 'Next question'}</button>` : ''}<button type="button" class="bd-btn ghost" data-grill="later">Later</button><span class="bd-amut bd-push">${open ? 'Later keeps them as the next step' : 'Every question is answered'}</span></div></div>`;
308
309
  }
309
310
  /** The questions in the Viewer's shell (premium-board.js actsPanel): the shell's Close (×, Escape) is the same as Later. */
@@ -335,7 +336,7 @@ document.addEventListener('click', async (e) => {
335
336
  if (b.dataset.grill === 'next' && Q.at < ((Q.data && Q.data.questions.length) || 0) - 1) { Q.at++; grillPanel(); const i = $('#czViewer .bd-qc.on input'); if (i) i.focus(); return; }
336
337
  if (b.dataset.grill === 'later' && open) await post('/api/board-grill/later', { ws: wsOf(Q.id), id: Q.id }).catch(() => null);
337
338
  Q = null; A.close();
338
- A.say(open ? 'Kept as the next step of ' + title + ': ' + open + ' open ' + (open === 1 ? 'question' : 'questions') + '.' : 'The answers are kept on ' + title + ' for its BRD.');
339
+ A.say(open ? 'Kept as the next step of ' + title + ': ' + open + ' open ' + (open === 1 ? 'question' : 'questions') + '.' : 'Kept on ' + title + '.');
339
340
  A.load();
340
341
  });
341
342
  /** The shell closed the questions while they showed: the answer typed is kept, and the open ones stay as the next step, as Later does. */
@@ -348,7 +349,7 @@ async function later() {
348
349
  if (cur && typed && typed !== (cur.answer || '')) { const r = await post('/api/board-grill/answer', { ws: wsOf(q.id), id: q.id, q: cur.key, answer: typed }).catch(() => null); if (r && r.ok) data = r; }
349
350
  const open = data ? data.questions.filter((x) => !x.answer).length : 0;
350
351
  if (open) await post('/api/board-grill/later', { ws: wsOf(q.id), id: q.id }).catch(() => null);
351
- A.say(open ? 'Kept as the next step of ' + q.title + ': ' + open + ' open ' + (open === 1 ? 'question' : 'questions') + '.' : 'The answers are kept on ' + q.title + ' for its BRD.');
352
+ A.say(open ? 'Kept as the next step of ' + q.title + ': ' + open + ' open ' + (open === 1 ? 'question' : 'questions') + '.' : 'Kept on ' + q.title + '.');
352
353
  A.load();
353
354
  }
354
355
  export const grillOpen = () => !!Q;
@@ -107,7 +107,7 @@ export function statusOf(r, grill, fmt) {
107
107
  const ps = provenStatus(r), from = fromLine(r.signal);
108
108
  if (r.acts && r.acts.life === 'hold') return { tone: 'q', text: 'On hold' + (r.acts.back ? ' · back ' + r.acts.back : '') };
109
109
  if (t.you) return { tone: 'you', text: t.you };
110
- const g = grill; if (g && g.open && !g.later) return { tone: 'you', text: plural(g.open, 'question', 'questions') + ' before the BRD' };
110
+ const g = grill; if (g && g.open && !g.later) return { tone: 'you', text: plural(g.open, 'question', 'questions') };
111
111
  if (r.late) return { tone: 'late', text: r.overDays > 0 ? plural(r.overDays, 'day', 'days') + ' over' : 'Late' };
112
112
  if (ps === 'at risk') return { tone: 'risk', text: 'At risk' + (r.owner ? '' : ' · no owner'), from };
113
113
  if (t.idle != null) return { tone: 'q', text: 'Idle ' + t.idle + ' days' };
@@ -343,7 +343,7 @@ export function iniView(r, ctx = {}) {
343
343
  else if (ctx.ask && ctx.ask.title) wait = { text: '“' + ctx.ask.title + '” needs your answer.', say: 'Can you answer “' + ctx.ask.title + '”? I’ll carry on once you do.', primary: { act: 'ask', label: 'Answer: ' + ctx.ask.title } };
344
344
  else if (you && youKind) wait = { text: youWhy, primary: youKind === 'drift' && it.links && it.links.prd ? { act: 'doc:' + it.links.prd, label: 'Open the PRD' } : youKind === 'commit' ? { act: 'commit', label: 'Send to Jira' } : { act: 'page', label: you } };
345
345
  else if (you) { const opn = tk.filter((k) => k.status !== 'Done').length; wait = { text: opn ? plural(opn, 'ticket is', 'tickets are') + ' still open, so the sign-off can wait until they close.' : 'Every release ticket is done.', primary: { act: 'page', label: you } }; }
346
- else if (ctx.grill && ctx.grill.open && !ctx.grill.later) wait = { text: 'PMOS asks what the BRD needs that the Why does not say yet.', primary: { act: 'grill', label: 'Answer the questions' } };
346
+ else if (ctx.grill && ctx.grill.open && !ctx.grill.later) wait = { text: 'PMOS asks who has this problem, how we know, and what would change our mind.', primary: { act: 'grill', label: 'Answer the questions' } };
347
347
  const summary = wait
348
348
  ? { line: 'Waits on you', tone: 'you', right: progress, text: [wait.text, lateSay].filter(Boolean).join(' '), primary: wait.primary,
349
349
  status: s.tone === 'you' ? null : { tone: s.tone, text: s.tone === 'late' ? 'Late' : s.text } }
@@ -1291,7 +1291,7 @@ async function loadTrail() {
1291
1291
  if (!T) { TR = TR || { usual: {}, themes: [], items: {}, failed: true }; return; }
1292
1292
  TR = T; mergeTrail(); draw();
1293
1293
  }
1294
- /** The first questions still open (GET /api/board-grill?ids=): an initiative started on the Board shows "N questions before the BRD". */
1294
+ /** The first questions still open (GET /api/board-grill?ids=): an initiative started on the Board shows "N questions". */
1295
1295
  async function loadGrill() {
1296
1296
  const B = boardsRead((r) => r.track.k <= 1);
1297
1297
  if (!B.length) return;
@@ -0,0 +1,5 @@
1
+ {
2
+ "_comment": "discovery-three-questions (bet A459): a new initiative on the Board asks who has this problem, how do we know and what would change our mind; the answers become the Experiment's evidence and kill condition (lib/discovery-questions.js, lib/board-grill.js, POST /api/board-grill/answer).",
3
+ "modules": ["discovery-questions.test.js"],
4
+ "seconds": { "discovery-questions.test.js": 2 }
5
+ }