create-pmos 0.410.0 → 0.412.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.
Files changed (131) hide show
  1. package/package.json +25 -30
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-adddoc-test.js +2 -2
  7. package/workspace/briefing-premium-initiative-test.js +9 -15
  8. package/workspace/briefing-premium-insights-test.js +2 -2
  9. package/workspace/briefing-premium-test.js +3 -3
  10. package/workspace/changelog.json +24 -0
  11. package/workspace/chat-asks-test.js +146 -0
  12. package/workspace/guide/board.md +1 -1
  13. package/workspace/guide/breakdown.md +6 -13
  14. package/workspace/guide/briefing-premium.md +1 -1
  15. package/workspace/guide/home.md +24 -0
  16. package/workspace/guide/index.md +1 -1
  17. package/workspace/guide/initiative-driver.md +1 -1
  18. package/workspace/guide/initiatives-screen.md +1 -1
  19. package/workspace/guide/pm-only-acts.md +23 -24
  20. package/workspace/guide/today.md +1 -1
  21. package/workspace/home-rows-test.js +149 -56
  22. package/workspace/ini-workflow-test.js +4 -4
  23. package/workspace/lib/briefing-premium-agent.js +8 -1
  24. package/workspace/lib/briefing-premium-writes.js +5 -4
  25. package/workspace/lib/coredoc-cli.js +1 -1
  26. package/workspace/lib/driver-cli.js +2 -1
  27. package/workspace/lib/driver-decide.js +3 -2
  28. package/workspace/lib/driver.js +2 -1
  29. package/workspace/lib/engine/boards.js +3 -1
  30. package/workspace/lib/goal-chat.js +94 -30
  31. package/workspace/lib/grant-mint.js +3 -2
  32. package/workspace/lib/initiative-cli.js +9 -9
  33. package/workspace/lib/issues.js +5 -4
  34. package/workspace/lib/mention-cli.js +70 -0
  35. package/workspace/lib/mention-store.js +307 -0
  36. package/workspace/lib/people-store.js +1 -1
  37. package/workspace/lib/people.js +3 -1
  38. package/workspace/lib/placements.js +13 -15
  39. package/workspace/lib/plan-items.js +17 -48
  40. package/workspace/lib/pm-guard.js +18 -5
  41. package/workspace/lib/pm-lines-needs.js +9 -5
  42. package/workspace/lib/pmos-verbs.js +3 -0
  43. package/workspace/lib/report-cli.js +2 -2
  44. package/workspace/lib/routes-board-metric-targets.js +0 -1
  45. package/workspace/lib/routes-boards.js +12 -0
  46. package/workspace/lib/routes-briefing-premium.js +5 -7
  47. package/workspace/lib/routes-core-docs.js +0 -1
  48. package/workspace/lib/routes-custom-docs.js +0 -1
  49. package/workspace/lib/routes-driver.js +0 -1
  50. package/workspace/lib/routes-home-desk.js +1 -1
  51. package/workspace/lib/routes-home-review.js +1 -1
  52. package/workspace/lib/routes-initiative-layout.js +1 -1
  53. package/workspace/lib/routes-insights-records.js +0 -1
  54. package/workspace/lib/routes-meeting-material.js +0 -1
  55. package/workspace/lib/routes-mentions.js +62 -9
  56. package/workspace/lib/routes-onboarding.js +3 -1
  57. package/workspace/lib/routes-orchestrator.js +0 -1
  58. package/workspace/lib/routes-premium-charts.js +0 -1
  59. package/workspace/lib/routes-premium-dashboards.js +0 -1
  60. package/workspace/lib/routes-programs.js +1 -1
  61. package/workspace/lib/routes-records.js +1 -1
  62. package/workspace/lib/routes-report-design.js +7 -3
  63. package/workspace/lib/routes-report-setups.js +0 -1
  64. package/workspace/lib/routes-report-structure.js +0 -1
  65. package/workspace/lib/routes-runs.js +2 -5
  66. package/workspace/lib/routes-scan.js +0 -1
  67. package/workspace/lib/routes-sources.js +1 -1
  68. package/workspace/lib/run-answers.js +14 -5
  69. package/workspace/lib/scan-cli.js +2 -1
  70. package/workspace/lib/scan.js +2 -1
  71. package/workspace/lib/session-files.js +132 -0
  72. package/workspace/lib/session-name.js +103 -0
  73. package/workspace/lib/source-reads.js +4 -1
  74. package/workspace/lib/vendor/scripts/onboarding/proposals.js +7 -3
  75. package/workspace/package-lock.json +2 -2
  76. package/workspace/package.json +1 -1
  77. package/workspace/premium-board-actions-test.js +10 -8
  78. package/workspace/premium-chat-goal-setup-test.js +203 -0
  79. package/workspace/premium-chat-goal-view-test.js +28 -23
  80. package/workspace/premium-chat-line-test.js +189 -0
  81. package/workspace/premium-core-doc-issue-test.js +1 -1
  82. package/workspace/premium-viewer-share-test.js +5 -2
  83. package/workspace/premium-vw-backlog-test.js +1 -1
  84. package/workspace/premium-vw-item-test.js +1 -1
  85. package/workspace/premium-vw-jira-test.js +1 -1
  86. package/workspace/public/pm/chat-ask.js +17 -9
  87. package/workspace/public/pm/cozy-home-rows.css +39 -1
  88. package/workspace/public/pm/cozy-home.css +112 -12
  89. package/workspace/public/pm/cozy-search.js +2 -1
  90. package/workspace/public/pm/cozy-steps.css +69 -0
  91. package/workspace/public/pm/cozy-steps.js +90 -0
  92. package/workspace/public/pm/goal-chat.js +141 -23
  93. package/workspace/public/pm/home-app.js +68 -35
  94. package/workspace/public/pm/home-ask.js +121 -0
  95. package/workspace/public/pm/home-chat.js +120 -68
  96. package/workspace/public/pm/home-data.js +10 -2
  97. package/workspace/public/pm/home-goal.js +159 -0
  98. package/workspace/public/pm/home-ini.css +35 -0
  99. package/workspace/public/pm/home-ini.js +50 -19
  100. package/workspace/public/pm/home-line.css +59 -0
  101. package/workspace/public/pm/home-line.js +200 -0
  102. package/workspace/public/pm/home-list.js +2 -2
  103. package/workspace/public/pm/home-mentions.js +303 -111
  104. package/workspace/public/pm/home-ses-name.js +65 -0
  105. package/workspace/public/pm/home-stage-card.js +94 -0
  106. package/workspace/public/pm/home-sweep.js +112 -0
  107. package/workspace/public/pm/home-today.js +7 -2
  108. package/workspace/public/pm/premium-initiative-head.js +8 -4
  109. package/workspace/public/pm/rename-press.js +24 -0
  110. package/workspace/public/pm/wf-page.css +3 -0
  111. package/workspace/public/pm/wf-page.js +2 -1
  112. package/workspace/public/premium-workflows.html +1 -0
  113. package/workspace/replaced-tests.json +101 -0
  114. package/workspace/server.js +133 -20
  115. package/workspace/session-names-test.js +144 -0
  116. package/workspace/skills/jira-push.skill +1 -0
  117. package/workspace/skills/morning-brief.skill +2 -1
  118. package/workspace/skills/report-daily.skill +1 -0
  119. package/workspace/skills/report-monthly.skill +1 -0
  120. package/workspace/skills/report-weekly.skill +1 -0
  121. package/workspace/skills/sources-read.skill +3 -2
  122. package/workspace/stage-card-test.js +203 -0
  123. package/workspace/test-lists/chat-asks.json +13 -0
  124. package/workspace/test-lists/chat-progress.json +13 -0
  125. package/workspace/test-lists/mentions-a-plus.json +9 -0
  126. package/workspace/test-lists/premium-chat-goal-setup.json +9 -0
  127. package/workspace/test-lists/session-files.json +5 -0
  128. package/workspace/test-lists/session-names.json +13 -0
  129. package/workspace/test-lists/stage-card.json +6 -0
  130. package/workspace/tk-tasks-test.js +1 -1
  131. package/workspace/workflows-setup-test.js +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.410.0",
3
+ "version": "0.412.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,30 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.412.0",
37
+ "at": "2026-10-25T06:20:40.812Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1041,
42
+ "t": "Agents finish the work they were asked to do (D98)",
43
+ "s": "Agents finish the work they were asked to do"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "v": "0.411.0",
49
+ "at": "2026-10-25T04:42:12.945Z",
50
+ "f": 2,
51
+ "prs": [
52
+ {
53
+ "n": 1042,
54
+ "t": "Stage card, chat progress line, asks, goal setup, Mentions, session names, outside files",
55
+ "s": "Stage card, chat progress line, asks, goal setup, Mentions, session names, outside files"
56
+ }
57
+ ]
58
+ },
35
59
  {
36
60
  "v": "0.410.0",
37
61
  "at": "2026-10-25T04:00:26.037Z",
@@ -252,35 +276,6 @@
252
276
  "s": "Show Claude's questions in the chat as a card, not a picker the panel cannot show"
253
277
  }
254
278
  ]
255
- },
256
- {
257
- "v": "0.392.0",
258
- "at": "2026-10-22T04:00:27.581Z",
259
- "f": 2,
260
- "prs": [
261
- {
262
- "n": 1006,
263
- "t": "Files Claude wrote in a git worktree open in the chat viewer",
264
- "s": "Files Claude wrote in a git worktree open in the chat viewer"
265
- }
266
- ]
267
- },
268
- {
269
- "v": "0.391.0",
270
- "at": "2026-10-22T03:35:32.308Z",
271
- "f": 2,
272
- "prs": [
273
- {
274
- "n": 1004,
275
- "t": "Hide archived report cycles on Insights",
276
- "s": "Hide archived report cycles on Insights"
277
- },
278
- {
279
- "n": 1005,
280
- "t": "Keep recording through a phone lock",
281
- "s": "Keep recording through a phone lock"
282
- }
283
- ]
284
279
  }
285
280
  ]
286
281
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@9849ee4d
1
+ kernel-source: pmos@ab4f6312
2
2
  assembled: 2026-10-25
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-25T04:00:23Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T06:20:38Z"}
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-25T04:00:23Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T06:20:38Z"}
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-25T04:00:23Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T06:20:38Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -35,7 +35,7 @@ const CUSTOM = [
35
35
  const PAGES = {
36
36
  board: { file: '/premium-board.html', api: '**/api/board-premium*', scope: 'board:w1', mk: (custom) => BP.build(BF.facts({ custom })), ready: '#ibBody .ini2', btn: '#addDoc', qs: '?theme=' },
37
37
  // the initiative is a layout inside Home (premium-agreed-design): Add a document is in its Overview, a minimal form in the Viewer (Waiting for design)
38
- initiative: { file: '/premium.html', api: '**/api/initiative-premium*', scope: 'initiative:self-serve-v2', mk: (custom) => IP.build(IF.facts({ custom })), ready: '.hm-card [data-hm-ov]', btn: '#czViewer [data-hi-v="docs"]', qs: '?ini=self-serve-v2&ws=w1&board=w1&theme=' },
38
+ initiative: { file: '/premium.html', api: '**/api/initiative-premium*', scope: 'initiative:self-serve-v2', mk: (custom) => IP.build(IF.facts({ custom })), ready: '.hm-card .cz-sl', btn: '#czViewer [data-hi-v="docs"]', qs: '?ini=self-serve-v2&ws=w1&board=w1&theme=' },
39
39
  };
40
40
 
41
41
  (async () => {
@@ -176,7 +176,7 @@ const PAGES = {
176
176
  const noNonce = await send({ scope: 'board:nope', title: 'A' }, { 'Content-Type': 'application/json' });
177
177
  ok('A3 a request without the page headers is refused with 403', noNonce.status === 403, JSON.stringify(noNonce));
178
178
  const agent = await send({ scope: 'board:nope', title: 'A' }, Object.assign({}, H, { 'x-pmos-session': 'abc' }));
179
- ok('A3 an agent session is refused with 403', agent.status === 403, JSON.stringify(agent));
179
+ ok('A3 D98: an agent session is not refused as an agent: its press is checked like the PM\'s (an unknown board is 404)', agent.status === 404, JSON.stringify(agent));
180
180
  const empty = await send({ scope: 'board:nope', title: ' ' }, H);
181
181
  ok('A4 an empty title is refused with 400 and a reason', empty.status === 400 && /title/.test(empty.body.error), JSON.stringify(empty));
182
182
  const orphan = await send({ scope: 'board:no-such-board-xyz', title: 'A' }, H);
@@ -72,7 +72,7 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
72
72
  const V = '#czViewer:not([hidden])';
73
73
  // ready: the initiative's page is open in the Viewer (canvas HbC), its kind line from the board's row (kind · anchor) and, when the
74
74
  // initiative reads, its card from the record (the ladder). Before the record reads, the page says it is reading.
75
- async function ready(page, full = true) { return until(() => page.evaluate((f) => /·/.test((document.querySelector('#czViewer:not([hidden]) .cz-vw-kind') || {}).textContent || '') && (!f || (!!document.querySelector('#czViewer .hm-card [data-hm-ov]') && !!((document.querySelector('#czViewer .hm-card .hm-lad b') || {}).textContent || '').trim())), full), 30000); }
75
+ async function ready(page, full = true) { return until(() => page.evaluate((f) => /·/.test((document.querySelector('#czViewer:not([hidden]) .cz-vw-kind') || {}).textContent || '') && (!f || (!!document.querySelector('#czViewer .hm-card .cz-sl') && !!((document.querySelector('#czViewer .hm-card .hm-sch > b') || {}).textContent || '').trim())), full), 30000); }
76
76
  const txt = (p, s) => p.evaluate((q) => ((document.querySelector(q) || {}).textContent || '').replace(/\s+/g, ' ').trim(), s);
77
77
  // the Overview opens on Tasks; a phone keeps the Tasks, Documents and Stage switch, and in shell A on a desktop the other views sit under ⋯ (XvATasks); view names the one to show
78
78
  const LABEL = { tasks: 'Tasks', docs: 'Documents', stage: 'Stage' };
@@ -119,23 +119,18 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
119
119
  ok('I1 Menu > Home closes the page and clears the selection, without a reload', await until(() => p.evaluate(() => window.__noReload === 1 && !document.querySelector('#czViewer:not([hidden])') && !document.querySelector('#hmList .sel, #hmList [aria-current="true"]') && /^Message Claude$/.test(document.querySelector('#hmIn').placeholder))));
120
120
  await p.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=light'); await ready(p);
121
121
 
122
- /* I3 header: the card */
122
+ /* I3 header: the card (stage card D: the stage as a live step list, canvas XscDDesk; stage-card-test.js holds its full behaviour) */
123
123
  const card = await p.evaluate(() => { const c = document.querySelector('#czViewer .hm-card'); const q = (s) => ((c.querySelector(s) || {}).textContent || '').replace(/\s+/g, ' ').trim(), d = (s) => ((document.querySelector(s) || {}).textContent || '').trim();
124
- return { kind: d('#czViewer .cz-vw-kind'), title: d('#czVwTitle'), turn: q('.hm-turn'), stage: q('.hm-br .st'), lad: q('.hm-lad'), cur: q('.hm-lad b'), bars: c.querySelectorAll('.hm-bars i').length, now: c.querySelectorAll('.hm-bars i.now').length, ckh: q('.hm-ckh'), items: [...c.querySelectorAll('.hm-it')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()), then: q('.hm-then'), time: q('.hm-time'), cta: q('[data-hm-cta]') }; });
124
+ return { kind: d('#czViewer .cz-vw-kind'), title: d('#czVwTitle'), stage: q('.hm-sch > b'), of: q('.hm-sch .of'), bars: c.querySelectorAll('.hm-bars i').length, now: c.querySelectorAll('.hm-bars i.now').length, items: [...c.querySelectorAll('.cz-sl > li:not(.tail)')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()), go: c.querySelectorAll('.cz-gob').length, tail: q('.cz-sli.tail'), cta: !!c.querySelector('[data-hm-cta]') }; });
125
125
  ok('I3 the page\'s header names the initiative, its workflow and its anchor (D99)', card.title === 'Self-serve onboarding v2' && /^Product feature · \S/.test(card.kind), JSON.stringify(card));
126
- ok('I3 the card shows the stage the workflow engine derives, with the ladder\'s current step and one bar a step', /Build/.test(card.stage + card.cur) && card.bars === 8 && card.now === 1, JSON.stringify(card));
127
- ok('I1 the card lists what finishes the step, says whose turn it is, and has one CTA', card.items.length > 0 && !!card.turn && !!card.cta && !/pull request|builder agent/i.test(card.items.join(' ')), JSON.stringify(card));
128
- ok('I1 the card has the payoff line and the time in the stage when the record has them', (!card.then || /^Then:/.test(card.then)) && (card.then || card.time), JSON.stringify(card));
126
+ ok('I3 the card shows the stage the workflow engine derives, with one bar a step and the current one marked', card.stage === 'Build' && card.bars === 8 && card.now === 1, JSON.stringify(card));
127
+ ok('I1 the card lists what finishes the step, with the PM\'s step as its one primary', card.items.length > 0 && card.go === 1 && !card.cta && /^\d+ of \d+ done$/.test(card.of) && !/pull request|builder agent/i.test(card.items.join(' ')), JSON.stringify(card));
128
+ ok('I1 the card ends on the next stage and its payoff', /^Deliver/.test(card.tail) && /Moves /.test(card.tail), JSON.stringify(card));
129
129
  if (await p.evaluate(() => !!document.querySelector('.hm-card [data-hm-done]'))) {
130
130
  await p.click('.hm-card [data-hm-done]');
131
131
  ok('I1 the done items open from their summary row', await until(() => p.evaluate(() => document.querySelector('.hm-card [data-hm-done]').getAttribute('aria-expanded') === 'true')));
132
132
  }
133
- ok('I3 Deliver is a milestone: the ladder and the checklist title carry the ◆ mark before it (Agreed design AgInitAgents)', await p.evaluate(() => !!document.querySelector('.hm-card .hm-lad .nx .cz-ms') && !!document.querySelector('.hm-card .hm-ckh .cz-ms') && /To reach Deliver/.test(document.querySelector('.hm-card .hm-ckh').textContent)));
134
- await p.click('.hm-card [data-hm-cfold]');
135
- const fold = await until(() => p.evaluate(() => { const c = document.querySelector('.hm-card'), f = c.querySelector('[data-hm-cfold]'); return f && f.getAttribute('aria-expanded') === 'false' ? { sum: f.textContent.replace(/\s+/g, ' ').trim(), items: c.querySelectorAll('.hm-it').length, then: !!c.querySelector('.hm-then'), time: !!c.querySelector('.hm-time'), cta: !!c.querySelector('[data-hm-cta]') } : null; }));
136
- ok('I3 the checklist folds to one line with its summary; Then and the time line hide, the CTA stays (AgInitSpec)', fold && /^To reach Deliver ?\d+ of \d+ done/.test(fold.sum) && fold.items === 0 && !fold.then && !fold.time && fold.cta, JSON.stringify(fold));
137
- await p.click('.hm-card [data-hm-cfold]');
138
- ok('I3 it unfolds again', await until(() => p.evaluate(() => document.querySelector('.hm-card [data-hm-cfold]').getAttribute('aria-expanded') === 'true' && document.querySelectorAll('.hm-card .hm-it').length > 0)));
133
+ ok('I3 Deliver is a milestone: the card\'s last node carries the ◆ mark before it (Agreed design AgInitAgents)', await p.evaluate(() => !!document.querySelector('.hm-card .cz-sli.tail .cz-ms')));
139
134
  ok('I1 the card wrote nothing on its own', writes(A).length === 0, JSON.stringify(writes(A)));
140
135
 
141
136
  /* I7 documents: the page's Documents shows the ones that need a look and "Show all N" drills into them all (HbCDesk, InDocs) */
@@ -152,8 +147,7 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
152
147
  const tk = await p.evaluate((v) => { const o = document.querySelector(v); return { tasks: [...o.querySelectorAll('[data-ov-tkrow]')].map((r) => r.dataset.ovTkrow).sort(), checks: [...o.querySelectorAll('button[data-hi-chk]')].map((b) => b.dataset.hiChk).sort() }; }, V);
153
148
  await p.click('#czViewer [data-cz-vw="back"]');
154
149
  ok('I4 ← from Tasks comes back to the page (HbCDrill)', await until(() => p.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V)));
155
- await p.click(`${V} .hm-card [data-hm-ov]`);
156
- ok('I4 Overview with Claude types the ask into the chat box and sends nothing', await until(() => p.evaluate(() => /^Give me an overview of Self-serve onboarding v2/.test(document.querySelector('#hmIn').value))));
150
+ ok('I4 the card has no Overview tile: the chat box on the page talks about the initiative (stage card D)', await p.evaluate((v) => !document.querySelector(v + ' .hm-card [data-hm-ov]') && /^Message Claude about Self-serve onboarding v2/.test(document.querySelector('#hmIn').placeholder), V));
157
151
  const pm = await moreLabels(p);
158
152
  ok('I4 the page\'s ⋯ holds the stage switch, the stakeholder, the program, the Board and the record, then hold and cancel last (HbCMore)', ['Moves on by itself', 'Add a stakeholder', 'Turn into a program', 'Open on the Board', 'The record', 'Put on hold', 'Cancel the initiative'].every((l) => pm.includes(l)) && pm[pm.length - 1] === 'Cancel the initiative', JSON.stringify(pm));
159
153
  await p.click(`${V} .hi-pgh [data-hi-addtask]`);
@@ -271,7 +265,7 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
271
265
  const cs = (s) => { const e = document.querySelector(s); return e ? getComputedStyle(e) : null; };
272
266
  const fab = document.querySelector('#czFab'), fr = fab && fab.getBoundingClientRect();
273
267
  const c = document.querySelector('.hm-card').getBoundingClientRect();
274
- return { font: cs('body').fontFamily, cta: cs('.hm-card [data-hm-cta]').backgroundColor, ctaAlt: document.querySelector('.hm-card [data-hm-cta]').classList.contains('alt'), solid: tok('--cz-solid'), blue: tok('--cz-blue'), well: tok('--cz-well'), card: tok('--cz-card'), box: cs('.hm-card .hm-box').backgroundColor, rad: parseFloat(cs('.hm-card .hm-box').borderTopLeftRadius), fab: fr ? [Math.round(fr.width), Math.round(fr.height)] : null, over: document.documentElement.scrollWidth - innerWidth, cardW: Math.round(c.width) };
268
+ return { font: cs('body').fontFamily, cta: (cs('.hm-card .cz-gob') || cs('.hm-card .cz-mvb') || {}).backgroundColor, ctaAlt: !document.querySelector('.hm-card .cz-gob, .hm-card .cz-mvb'), solid: tok('--cz-solid'), blue: tok('--cz-blue'), well: tok('--cz-well'), card: tok('--cz-card'), box: cs('.hm-card .hm-box').backgroundColor, rad: parseFloat(cs('.hm-card .hm-box').borderTopLeftRadius), fab: fr ? [Math.round(fr.width), Math.round(fr.height)] : null, over: document.documentElement.scrollWidth - innerWidth, cardW: Math.round(c.width) };
275
269
  });
276
270
  const d = [];
277
271
  if (!/^Nunito/.test(g.font)) d.push('font ' + g.font);
@@ -487,7 +487,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
487
487
  const asAgent = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { ...H, 'x-pmos-session': 's1' }, body }).then((x) => x.status);
488
488
  const noNonce = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { 'Content-Type': 'application/json', Origin: base2 }, body }).then((x) => x.status);
489
489
  const unknown = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: H, body: JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'Other', purpose: 'x', charts: ['krm-none'] }) }).then((x) => x.status);
490
- ok('E9 the real save route refuses an agent session (403), a press without the nonce (403) and a chart no record holds (400)', asAgent === 403 && noNonce === 403 && unknown === 400, [asAgent, noNonce, unknown].join());
490
+ ok('E9 the real save route refuses a press without the nonce (403) and a chart no record holds (400); an agent session saves (D98)', asAgent === 200 && noNonce === 403 && unknown === 400, [asAgent, noNonce, unknown].join());
491
491
  /* New goal against the real route: the record lands in the scratch repository with every field the page sent */
492
492
  await pg.click('#newB'); await pg.click('#newMenu [data-new="goal"]'); await pg.fill('#ngName', 'Weekly partners'); await pg.fill('#ngBase', '5'); await pg.fill('#ngTgt', '9');
493
493
  await pg.click('#sideBody [data-seg="Type"] [data-v="Count"]'); await pg.fill('#ngOwner', 'Lee'); await pg.click('#sideBody [data-src="file"]'); await pg.click('#sideGo');
@@ -508,7 +508,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
508
508
  const tg = await post('target', { key: 'scope', target: 3 });
509
509
  const asAgent2 = await post('verdict', { ini: 'x', verdict: 'Keep', learned: 'y' }, { ...H, 'x-pmos-session': 's1' });
510
510
  const j3 = await (await fetch(base2 + '/api/insights-premium')).json(), m3 = j3.model;
511
- ok('E12 describe reads the goals and writes nothing; the dashboard, its chart settings, the pin, a verdict and a tile target land in the ledger and come back in the model', dsc.status === 200 && dsc.body.goals.join() === 'krm-a' && dsh.status === 200 && dsh.body.pinned === dsh.body.id && chs.status === 200 && vd.status === 200 && tg.status === 200 && asAgent2.status === 403
511
+ ok('E12 describe reads the goals and writes nothing; the dashboard, its chart settings, the pin, a verdict and a tile target land in the ledger and come back in the model', dsc.status === 200 && dsc.body.goals.join() === 'krm-a' && dsh.status === 200 && dsh.body.pinned === dsh.body.id && chs.status === 200 && vd.status === 200 && tg.status === 200 && asAgent2.status === 200
512
512
  && m3.pinned === dsh.body.id && m3.chartSet[dsh.body.id]['krm-a'].form === 'Number' && m3.chartSet[dsh.body.id]['krm-a'].note === 'After the kit' && m3.trends.targets.scope === 3, JSON.stringify([dsc.body, dsh.status, chs.body, vd.status, tg.body, asAgent2.status, m3.chartSet]));
513
513
  const csv = await fetch(base2 + '/api/insights-records/export?ws=' + m.board.ws).then(async (x) => ({ status: x.status, type: x.headers.get('content-type'), text: await x.text() }));
514
514
  ok('E13 Export answers the goals as CSV, one row each', csv.status === 200 && /^text\/csv/.test(csv.type) && /^id,goal,objective,type/.test(csv.text) && /krm-a,Partner activation,Growth,Percentage/.test(csv.text) && /Weekly partners/.test(csv.text), csv.text.slice(0, 200));
@@ -195,7 +195,7 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
195
195
  const nonce = await T.nonce(BASE);
196
196
  ok('W5 a press without the launch nonce is refused', !nonce || noN.s === 403, JSON.stringify(noN));
197
197
  const ag = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, good);
198
- ok('W5 an agent session is refused with 403', ag.s === 403, JSON.stringify(ag));
198
+ ok('W5 D98: an agent session is not refused as an agent: its press is checked like the PM\'s (an unknown prototype is 404)', ag.s === 404, JSON.stringify(ag));
199
199
  const wf = await send(hdr, { ...good, by: 'pm' });
200
200
  ok('W5 a body with a writer field is refused with 400', wf.s === 400, JSON.stringify(wf));
201
201
  const before = fs.readFileSync(path.join(__dirname, '..', 'pm-decisions.md'), 'utf8');
@@ -204,10 +204,10 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
204
204
  const after = fs.readFileSync(path.join(__dirname, '..', 'pm-decisions.md'), 'utf8');
205
205
  ok('W6 a bad key and an unknown prototype are refused and pm-decisions.md is unchanged', bad.s === 400 && none.s === 404 && before === after, JSON.stringify([bad, none]));
206
206
  const askBad = await send(hdr, { key: '../x', text: 'q' }, 'ask');
207
- const askAgent = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, { key: 'decision:KC5', text: 'q' }, 'ask');
207
+ const askAgent = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, { key: '../x', text: 'q' }, 'ask');
208
208
  const askNoNonce = await send({ 'Content-Type': 'application/json', Origin: BASE }, { key: 'decision:KC5', text: 'q' }, 'ask');
209
209
  const askWriter = await send(hdr, { key: 'decision:KC5', text: 'q', by: 'pm' }, 'ask');
210
- ok('A7 the ask route refuses an agent session (403), a missing nonce (403), a writer field (400) and a bad key (400), and starts nothing', askAgent.s === 403 && (!nonce || askNoNonce.s === 403) && askWriter.s === 400 && askBad.s === 400, JSON.stringify([askAgent, askNoNonce, askWriter, askBad]));
210
+ ok('A7 the ask route refuses a missing nonce (403), a writer field (400) and a bad key (400), for an agent session too (D98: checked, not refused as an agent), and starts nothing', askAgent.s === 400 && (!nonce || askNoNonce.s === 403) && askWriter.s === 400 && askBad.s === 400, JSON.stringify([askAgent, askNoNonce, askWriter, askBad]));
211
211
  const thr = await fetch(BASE + '/api/briefing-premium/thread?key=../x').then((r) => r.status);
212
212
  const thrGet = await fetch(BASE + '/api/briefing-premium/ask').then((r) => r.status);
213
213
  ok('A7 the thread route refuses a bad key and the ask route refuses GET', thr === 400 && thrGet === 405, JSON.stringify([thr, thrGet]));
@@ -1,4 +1,28 @@
1
1
  [
2
+ {
3
+ "v": "0.412.0",
4
+ "at": "2026-10-25T06:20:40.812Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1041,
9
+ "t": "Agents finish the work they were asked to do (D98)",
10
+ "s": "Agents finish the work they were asked to do"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "v": "0.411.0",
16
+ "at": "2026-10-25T04:42:12.945Z",
17
+ "f": 2,
18
+ "prs": [
19
+ {
20
+ "n": 1042,
21
+ "t": "Stage card, chat progress line, asks, goal setup, Mentions, session names, outside files",
22
+ "s": "Stage card, chat progress line, asks, goal setup, Mentions, session names, outside files"
23
+ }
24
+ ]
25
+ },
2
26
  {
3
27
  "v": "0.410.0",
4
28
  "at": "2026-10-25T04:00:26.037Z",
@@ -0,0 +1,146 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* chat-asks-test.js — every kind of ask as one card in Home's chat, and a stopped run's divider (initiative premium-agreed-design; canvas
4
+ * XcbOptions "Every kind of ask" and "Routine · a failed run says where and what to do"). Serves the real Home from the real server; the
5
+ * conversation is routed, so each ask is drawn as the session would give it.
6
+ * A1 a file change: Allow and No icons, before → after, the press reaches the session · A2 something that leaves PMOS: Send and No
7
+ * A3 a choice: the recommended answer first, a tap sends it · A4 a point only the PM can judge: Yes, it's done sends the answer
8
+ * A5 something it cannot reach: Sign in opens Settings › Connectors, the paperclip opens the file picker
9
+ * A6 a run that stopped: the amber divider over Claude's last message, the fix under it, no second card · A7 phone, both themes */
10
+ const path = require('path');
11
+ const { spawn } = require('child_process');
12
+ const { findBrowser } = require('./lib/find-browser');
13
+ const T = require('./test-run').configure({ name: 'chat-asks' });
14
+
15
+ const BASE = T.BASE;
16
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
17
+ const until = async (fn, ms = 8000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
18
+ const results = [];
19
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 400) : ''}`); };
20
+ let srv = null; let browser = null;
21
+ const finish = async (code) => {
22
+ if (browser) await browser.close().catch(() => {});
23
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
24
+ T.killTmux();
25
+ const bad = results.filter((x) => !x.cond).length;
26
+ console.log(`\n${results.length - bad}/${results.length} chat-asks assertions passed`);
27
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
28
+ };
29
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
30
+ const SHOTS = process.env.ASKS_SHOTS || ''; // a folder: the suite also saves screenshots there for review
31
+ const shot = async (page, n) => { if (SHOTS) await page.screenshot({ path: path.join(SHOTS, n + '.png'), fullPage: false }); };
32
+ const KEY = 'work:asks-1';
33
+ const block = (tag, o) => '```' + tag + '\n' + JSON.stringify(o) + '\n```';
34
+ const OPTS = [{ n: '1', label: 'Yes' }, { n: '2', label: 'Yes, and don’t ask again' }, { n: '3', label: 'No, and tell Claude what to do differently' }];
35
+ const STEPS = [{ text: 'Calendar', state: 'done' }, { text: 'Mail', state: 'done' }, { text: 'Slack', state: 'done' }, { text: 'Jira', state: 'now' }, { text: 'Write the brief', state: 'next' }];
36
+
37
+ (async () => {
38
+ const exe = findBrowser();
39
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
40
+ let chromium;
41
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
42
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
43
+ await T.waitForServer(BASE);
44
+ browser = await chromium.launch({ executablePath: exe });
45
+
46
+ const open = async ({ w = 1280, h = 900, scheme = 'light' } = {}) => {
47
+ const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: scheme, hasTouch: w < 1000 });
48
+ const page = await ctx.newPage();
49
+ const errors = [], posts = [], st = { conv: { state: 'conv', turn: 'user', messages: [] } };
50
+ page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
51
+ await page.route('**/api/briefing-premium/**', (r) => { const rq = r.request(); if (rq.method() !== 'GET') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false, session: 's-asks' }) }); });
52
+ await page.route('**/api/sessions/conversation**', (r) => r.fulfill({ json: { ok: true, ...st.conv } }));
53
+ await page.goto(BASE + '/premium-chat.html?about=' + encodeURIComponent(KEY), { waitUntil: 'domcontentloaded' });
54
+ await page.waitForFunction(() => !!document.querySelector('#hmIn'), null, { timeout: 15000 });
55
+ return { page, ctx, errors, posts, st };
56
+ };
57
+ const card = (page, kind) => until(async () => page.evaluate((k) => { const c = document.querySelector(`#hmLog .hm-askk[data-ask-kind="${k}"]`); if (!c) return null; const w = c.closest('.hm-askw, .hm-askc');
58
+ return { text: c.textContent.replace(/\s+/g, ' ').trim(), wrap: w ? w.className : '', btns: [...c.querySelectorAll('button')].map((b) => ({ label: b.getAttribute('aria-label') || '', title: b.title, words: b.textContent.trim(), h: Math.round(b.getBoundingClientRect().height), pri: b.classList.contains('pri') })) }; }, kind));
59
+
60
+ let { page, ctx, errors, posts, st } = await open();
61
+ /* A1 a change to the PM's files */
62
+ st.conv = { state: 'conv', turn: 'tool', messages: [{ role: 'user', text: 'Move SSO out of scope', at: '2026-10-25T03:00:00Z' }, { role: 'assistant', text: 'Moving SSO out of scope in the PRD.', at: '2026-10-25T03:00:05Z' }],
63
+ ask: { question: 'Do you want to make this edit to descope-parity.md?', options: OPTS }, change: { system: 'File', what: 'planning/prd/descope-parity.md', from: 'SSO: in scope', to: 'SSO: out of scope', tool: 'Edit' } };
64
+ const a1 = await card(page, 'file');
65
+ ok('A1 a file change: "Asks before it goes on", Edit <path>, before → after', !!a1 && /Asks before it goes on/.test(a1.text) && /Edit planning\/prd\/descope-parity\.md/.test(a1.text) && /SSO: in scope → SSO: out of scope/.test(a1.text), JSON.stringify(a1));
66
+ ok('A1 the answers are icons with names: Allow first and primary, then No, each a 44px target with no words', !!a1 && a1.btns[0].label === 'Allow' && a1.btns[0].title === 'Allow' && a1.btns[0].pri && a1.btns[1].label === 'No' && a1.btns.slice(0, 2).every((b) => b.words === '' && b.h >= 44), JSON.stringify(a1 && a1.btns));
67
+ ok('A1 the card sits in .hm-askw, the place the progress line scrolls to', !!a1 && /hm-askw/.test(a1.wrap));
68
+ await shot(page, 'ask-file-1280');
69
+ await page.click('#hmLog .hm-askk [aria-label="Allow"]');
70
+ ok('A1 Allow presses the prompt\'s first choice in the session', !!(await until(async () => posts.find((p) => p.path.endsWith('/press') && p.body.press === '1'))), JSON.stringify(posts));
71
+ /* A2 something that leaves PMOS */
72
+ st.conv = { ...st.conv, change: { system: 'Jira', what: 'Send 14 tickets to Jira PAY', from: '', to: '', tool: 'mcp__atlassian__createJiraIssue' }, ask: { question: 'Allow?', options: [OPTS[0], OPTS[2]] } };
73
+ const a2 = await card(page, 'send');
74
+ ok('A2 a write to Jira: "Asks before it sends to Jira", ✓ Send and × No', !!a2 && /Asks before it sends to Jira/.test(a2.text) && /Send 14 tickets to Jira PAY/.test(a2.text) && a2.btns[0].label === 'Send' && a2.btns[1].label === 'No', JSON.stringify(a2));
75
+ await page.click('#hmLog .hm-askk [aria-label="No"]');
76
+ ok('A2 No presses the prompt\'s No', !!(await until(async () => posts.find((p) => p.path.endsWith('/press') && p.body.press === '3'))));
77
+ /* A3 a choice only the PM can make */
78
+ st.conv = { state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'Plan the Okta sync', at: '2026-10-25T03:01:00Z' },
79
+ { role: 'tool', at: '2026-10-25T03:01:05Z', tools: { AskUserQuestion: 1 }, calls: [{ tool: 'AskUserQuestion', target: '' }], ask: [{ question: 'Okta group sync: in this release or the next?', options: [{ label: 'This release' }, { label: 'Next release (Recommended)', detail: 'keeps Friday' }] }] }] };
80
+ const a3 = await card(page, 'choice');
81
+ ok('A3 a choice: the question, the recommended answer first with "recommended · keeps Friday"', !!a3 && /Okta group sync/.test(a3.text) && a3.btns[0].words.startsWith('Next release') && /recommended · keeps Friday/.test(a3.btns[0].words) && a3.btns[1].words === 'This release' && a3.btns.every((b) => b.h >= 44), JSON.stringify(a3));
82
+ ok('A3 the card sits in .hm-askc, with no avatar of its own', !!a3 && /hm-askc/.test(a3.wrap) && await page.evaluate(() => !document.querySelector('#hmLog .hm-askc .hm-av')));
83
+ await shot(page, 'ask-choice-1280');
84
+ await page.click('#hmLog .hm-askk[data-ask-kind="choice"] .chip2.rec');
85
+ ok('A3 a tap sends the answer without the "(Recommended)" mark', !!(await until(async () => posts.find((p) => p.path.endsWith('/ask') && p.body.text === 'Next release'))), JSON.stringify(posts.slice(-2)));
86
+ /* A4 a point only the PM can judge */
87
+ st.conv = { state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'Start', at: '2026-10-25T03:02:00Z' },
88
+ { role: 'assistant', at: '2026-10-25T03:09:00Z', text: 'The draft is written; two open questions have owners.\n\n' + block('pmos-ask', { kind: 'judge', point: 'Ready for Dita\'s review', question: 'Is the draft ready for Dita?' }) }] };
89
+ const a4 = await card(page, 'judge');
90
+ ok('A4 a point Claude cannot check: the question, ✓ "Yes, it’s done" and × "Not yet"', !!a4 && /Is the draft ready for Dita\?/.test(a4.text) && a4.btns[0].label === 'Yes, it’s done' && a4.btns[1].label === 'Not yet', JSON.stringify(a4));
91
+ ok('A4 the block is not shown as text in the message', await page.evaluate(() => !/pmos-ask|"kind"/.test(document.querySelector('#hmLog').textContent)));
92
+ await page.click('#hmLog .hm-askk [aria-label="Yes, it’s done"]');
93
+ ok('A4 Yes sends the answer with the point', !!(await until(async () => posts.find((p) => p.path.endsWith('/ask') && p.body.text === 'Yes, it’s done: Ready for Dita\'s review'))), JSON.stringify(posts.slice(-2)));
94
+ /* A5 something it cannot reach */
95
+ st.conv = { state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'Pull the PAY tickets', at: '2026-10-25T03:03:00Z' },
96
+ { role: 'assistant', at: '2026-10-25T03:03:20Z', text: 'I could not read Jira.\n' + block('pmos-ask', { kind: 'reach', what: 'Jira', why: 'sign-in expired' }) }] };
97
+ const a5 = await card(page, 'reach');
98
+ ok('A5 something it cannot reach: "Jira · sign-in expired", the key signs in, the paperclip attaches', !!a5 && /Jira · sign-in expired/.test(a5.text) && a5.btns[0].label === 'Sign in to Jira' && a5.btns[0].pri && a5.btns[1].label === 'Attach a file', JSON.stringify(a5));
99
+ await shot(page, 'ask-reach-1280');
100
+ const chooser = page.waitForEvent('filechooser', { timeout: 4000 }).catch(() => null);
101
+ await page.click('#hmLog .hm-askk [aria-label="Attach a file"]');
102
+ ok('A5 the paperclip opens the file picker of the chat', !!(await chooser));
103
+ await page.click('#hmLog .hm-askk [aria-label="Sign in to Jira"]');
104
+ ok('A5 Sign in opens Settings at Connectors', !!(await until(async () => page.evaluate(() => { const s = document.querySelector('#evSettings'); return !!s && !s.hidden; }))));
105
+ await page.keyboard.press('Escape');
106
+ /* A6 a run that stopped */
107
+ st.conv = { state: 'conv', turn: 'user', steps: STEPS, messages: [{ role: 'user', text: 'Run the morning brief.', at: '2026-10-25T03:04:00Z' },
108
+ { role: 'assistant', at: '2026-10-25T03:06:00Z', text: 'The brief has your calendar and mail; the Jira part is missing.\n' + block('pmos-ask', { kind: 'reach', what: 'Jira', why: 'sign-in expired', need: 'signin' }) }] };
109
+ const a6 = await until(async () => page.evaluate(() => { const d = document.querySelector('#hmLog .pl-dv.stop'); if (!d) return null; const next = d.nextElementSibling;
110
+ const fix = document.querySelector('#hmLog .hm-fix'); return { text: d.textContent.trim(), before: !!next && next.classList.contains('hm-a'), fix: fix ? [...fix.querySelectorAll('button')].map((b) => b.getAttribute('aria-label')) : [], cards: document.querySelectorAll('#hmLog .hm-askk').length, retry: !!document.querySelector('#hmLog .hm-tools [data-hm-retry]') }; }));
111
+ ok('A6 the amber divider says where and why, over Claude\'s last message', !!a6 && a6.text === 'Stopped at 3 of 5: Jira sign-in expired' && a6.before, JSON.stringify(a6));
112
+ ok('A6 the fix sits under the message as icons: Sign in to Jira, Run again; no second card or Retry says it again', !!a6 && a6.fix.join('|') === 'Sign in to Jira|Run again' && a6.cards === 0 && !a6.retry, JSON.stringify(a6));
113
+ await shot(page, 'run-stopped-1280');
114
+ await page.click('#hmLog .hm-fix [aria-label="Run again"]');
115
+ ok('A6 Run again sends the run\'s request again', !!(await until(async () => posts.find((p) => p.path.endsWith('/ask') && p.body.text === 'Run the morning brief.'))), JSON.stringify(posts.slice(-2)));
116
+ st.conv = { state: 'conv', turn: 'user', steps: STEPS, messages: [{ role: 'user', text: 'Run the morning brief.', at: '2026-10-25T03:04:00Z' }, { role: 'assistant', at: '2026-10-25T03:05:00Z', text: 'Which calendar should I read?' }] };
117
+ ok('A6 a pause to ask the PM is not a stop: no divider', !!(await until(async () => page.evaluate(() => /Which calendar/.test(document.querySelector('#hmLog').textContent) && !document.querySelector('#hmLog .pl-dv')))));
118
+ /* A8 the progress line: blue while a pmos-ask waits, a clock while Claude chases people */
119
+ st.conv = { state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'Start', at: '2026-10-25T03:02:00Z' },
120
+ { role: 'assistant', at: '2026-10-25T03:09:00Z', text: 'The draft is written.\n' + block('pmos-ask', { kind: 'judge', point: 'Ready for Dita', question: 'Is the draft ready for Dita?' }) }] };
121
+ ok('A8 a point only the PM can judge turns the line blue: "Claude asks before it goes on"', !!(await until(async () => page.evaluate(() => { const l = document.querySelector('#hmPl .hm-pl'); return !!l && l.classList.contains('you') && /Claude asks before it goes on/.test(l.textContent); }))));
122
+ const chase = { state: 'chasing', what: 'Sign-off on the descope PRD', next: new Date(Date.now() + 2 * 86400000).toISOString(), people: [{ name: 'Dita', status: 'signed off', note: 'Fri 16:40, in Slack', replied: true }, { name: 'Raj', status: 'asked twice', note: 'last nudge Fri 10:00 · no reply' }, { name: 'Mei', status: 'asked once', note: 'out of office until Tue' }] };
123
+ st.conv = { state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'Chase the sign-off', at: '2026-10-25T03:10:00Z' }, { role: 'assistant', at: '2026-10-25T03:10:30Z', text: 'I asked all three.\n' + block('pmos-chase', chase) }] };
124
+ const a8 = await until(async () => page.evaluate(() => { const l = document.querySelector('#hmPl .hm-pl[data-kind="chase"]'); return l ? { text: l.textContent.replace(/\s+/g, ' '), clock: !!l.querySelector('.pl-clk'), stop: (l.querySelector('[data-pl="stop"]') || {}).getAttribute('aria-label') } : null; }));
125
+ ok('A8 chasing people: a clock, "1 of 3 replied", Stop reads "Stop chasing"', !!a8 && a8.clock && /Sign-off on the descope PRD/.test(a8.text) && /1 of 3 replied/.test(a8.text) && a8.stop === 'Stop chasing', JSON.stringify(a8));
126
+ ok('A8 the pmos-chase block is not shown as text', await page.evaluate(() => !/pmos-chase|"people"/.test(document.querySelector('#hmLog').textContent)));
127
+ await shot(page, 'chase-1280');
128
+ await page.click('#hmPl [data-pl="stop"]');
129
+ ok('A8 Stop chasing tells Claude to stop, as a message', !!(await until(async () => posts.find((p) => p.path.endsWith('/ask') && /^Stop chasing: Sign-off on the descope PRD\./.test(p.body.text)))), JSON.stringify(posts.slice(-2)));
130
+ ok('A1-A6 no page errors', errors.length === 0, errors.join(' | '));
131
+ await ctx.close();
132
+
133
+ /* A7 phone, both themes */
134
+ for (const scheme of ['light', 'dark']) {
135
+ ({ page, ctx, errors, st } = await open({ w: 390, h: 844, scheme }));
136
+ st.conv = { state: 'conv', turn: 'tool', messages: [{ role: 'user', text: 'Move SSO out of scope', at: '2026-10-25T03:00:00Z' }, { role: 'assistant', text: 'Moving SSO out of scope in the PRD.', at: '2026-10-25T03:00:05Z' }],
137
+ ask: { question: 'Edit?', options: OPTS }, change: { system: 'File', what: 'planning/prd/a-rather-long-folder-name/descope-feature-parity-review-draft.md', from: 'SSO: in scope', to: 'SSO: out of scope', tool: 'Edit' } };
138
+ await card(page, 'file');
139
+ await shot(page, 'ask-file-390-' + scheme);
140
+ ok(`A7 ${scheme}: on a phone the card and its icons stay inside the width`, await page.evaluate(() => { const w = innerWidth; const c = document.querySelector('#hmLog .hm-askk'); const r = c.getBoundingClientRect(); return r.left >= 0 && r.right <= w + 1 && [...c.querySelectorAll('.acts > button')].every((b) => { const q = b.getBoundingClientRect(); return q.right <= w + 1 && q.height >= 36; }) && document.documentElement.scrollWidth <= w; }));
141
+ ok(`A7 ${scheme}: the primary icon reads against the card`, await page.evaluate(() => { const b = document.querySelector('#hmLog .hm-askk .hm-icb.pri'); const cs = getComputedStyle(b); return cs.backgroundColor !== cs.color; }));
142
+ ok(`A7 ${scheme}: no page errors`, errors.length === 0, errors.join(' | '));
143
+ await ctx.close();
144
+ }
145
+ finish();
146
+ })();
@@ -65,7 +65,7 @@ Today shows three things from the Board:
65
65
  | no evidence | an agent marked the item Done and gave no evidence |
66
66
  | late | the due date passed and the item is not Done |
67
67
  | moved by you | you moved a card that an agent owns |
68
- | Proposed | an agent proposed the item and you did not keep it |
68
+ | Proposed | an item an agent added before D98 that was never kept (since D98 an agent's item is live at once) |
69
69
 
70
70
  ## From a terminal
71
71
 
@@ -38,7 +38,7 @@ The Tree shows the stages of the initiative in order, for example Intake, Spec,
38
38
  | late | The due date is in the past and the item is not Done. |
39
39
  | Doing, Review | The state of the item, in the Tree only. On the Board, the column shows the state. |
40
40
  | moved by you | You moved an item that an agent owns. The agent sees the same signal. |
41
- | Proposed | An agent added the item and you did not keep it yet. A proposed item does not count in the progress. |
41
+ | Proposed | Only on an item an agent added before D98 that was never kept. Since D98 an agent's item is live at once. |
42
42
 
43
43
  ### Keys in the Tree
44
44
 
@@ -72,7 +72,7 @@ If you move an item that an agent owns, the item shows "moved by you". The agent
72
72
  The sheet shows every field of one item, from top to bottom:
73
73
 
74
74
  1. The state: Todo, Doing, Review or Done. Under it, two lines show only when they apply:
75
- - "Proposed by agent · sess-3 on 5 Oct." with **Keep all**, for an item that an agent proposed. Keep all keeps every item of that agent's card.
75
+ - "Added by agent · sess-3 on 5 Oct." for an item that an agent added. It is live; withdraw it if you do not want it.
76
76
  - **Add evidence**, for an item that reads Done with no evidence. Type `commit:<sha>`, `pr:<number>`, `file:<path>` or `note:<text>` and press Enter. If the workspace refuses the reference, a message tells you why and your text stays in the field to correct.
77
77
  2. Title.
78
78
  3. Owner: You, Agent, a person (type the name) or a tracker (type the reference).
@@ -93,18 +93,11 @@ Done and Withdraw wait 8 seconds before they are saved. A message shows at the b
93
93
 
94
94
  A tick back from Done to Todo is saved at once.
95
95
 
96
- ## Items an agent proposes
96
+ ## Items an agent adds
97
97
 
98
- An agent can add items with `pmos item add`. Its items arrive as proposed. They show in the Tree and on the Board, but they do not count in the progress until you keep them.
98
+ An agent can add items with `pmos item add`. Since D98 its items are live at once: they show in the Tree and on the Board and count in the progress, with no Keep card. Each item names the agent that added it, so you can withdraw it if you do not want it. A Keep line from before D98 has no effect any more and is not flagged.
99
99
 
100
- The Tree shows one card for each agent session, named by the session: "Agent · sess-3 proposed 9 items on 5 Oct." Today shows the same card in its needs-you list, and the Today count in the navigation counts it.
101
-
102
- - **Keep** keeps all the items of the card. Only you can keep items, and only from the workspace page. There is no command for it.
103
- - **Withdraw all** withdraws all the items of the card, with Undo.
104
-
105
- If the agent adds more items after the card shows, they stay proposed. The card shows the new count when it refreshes.
106
-
107
- Today also shows two other breakdown cards:
100
+ Today shows two breakdown cards:
108
101
 
109
102
  - **no evidence**: an agent marked an item Done without evidence, such as a commit or a pull request. Open the item and add the evidence, or ask the agent to run its move again with `--evidence`.
110
103
  - **check**: a line in `plan-items.jsonl` that has no effect, for example a Keep that the workspace page did not write.
@@ -133,7 +126,7 @@ Each line in the file names who wrote it. The workspace shows it as:
133
126
 
134
127
  The file records an agent with its full session token, for example `agent:sess-3.0a1b2c3d`. The workspace page gets only `agent:sess-3` and shows "agent · sess-3".
135
128
 
136
- An agent cannot keep its own items. An agent can withdraw only the items that it added; the items you added, only you can withdraw.
129
+ An agent can change, move and withdraw any item, the items you added included. Each of those lines names the agent, so the history of the item shows who did what.
137
130
 
138
131
  A terminal that the workspace starts for an agent is marked as that agent's, so its commands are recorded as the agent even when they run at a terminal. Your own shell terminals are not marked, so their commands are recorded as you.
139
132
 
@@ -187,7 +187,7 @@ Not built in premium: translation, Present and the slides stage, Ask PMOS quietl
187
187
  Under Today, the **Around you** card holds what the agents and the outside world have left for you. It has six rows. A row opens a dialog and states what it found in one line. The caption says how many rows wait on you, or "quiet". If a source cannot be read, its row says so and gives the reason. It never reads as empty.
188
188
 
189
189
  - **Agent proposals.** Every open draft of the Initiative Driver, for initiatives and for Work items, when the agent mode for that kind is Approve. Each draft is one card: what it is, its target, and the draft in two lines, with **Read more** for the why and the sources. Press a card to choose it. The bar at the bottom acts on the chosen card. **Keep** is the main press, and **Send back** and **Drop** sit next to it. The notes about undo and the agent mode are behind the ⓘ line. **Keep** records that you accept it and applies it (a problem statement, a stage move, a next step). **Send back** needs a note and starts a new run. **Drop** counts as a correction. None of the three can be undone. A decided proposal stays in the list and says what was recorded.
190
- - **Mentions.** The people who named you in Slack, Jira, Confluence or mail, from today's morning brief. The row names who waits on a reply. **Make it a task** adds one Work item. **Mark read** hides the mention, and **Mark unread** brings it back. **Open in Slack** (or Jira, Confluence, mail) opens the original in a new tab. Nothing here replies, reacts or posts. The Mentions dialog has its own chat, like every popup.
190
+ - **Mentions.** The people who named you in Slack, Jira, Confluence or mail, from today's morning brief. (Home's own Mentions row keeps every unanswered ask and the last 7 days: see [Home](home.md).) The row names who waits on a reply. **Make it a task** adds one Work item. **Mark read** hides the mention, and **Mark unread** brings it back. **Open in Slack** (or Jira, Confluence, mail) opens the original in a new tab. Nothing here replies, reacts or posts. The Mentions dialog has its own chat, like every popup.
191
191
  - **Portfolio pulse.** How many initiatives are late or at risk, by the Calendar's own status: the promised date against the forecast, or the Jira read. It is read only and it is not a forecast of its own. **Open the initiative** goes to its page.
192
192
  - **Horizon scan.** When the scan last ran, when it runs next, its reports and their proposals. Each proposal says what **Approve** does before you press it. **Dismiss** asks for a reason and counts as a correction, and **Undo** takes a dismissal back. **Scan now** starts an agent that reads the public web and the repository, and says how many manual scans are left. The row on the card says it too, before you open the dialog. A scan that is switched off says so and the button stays off.
193
193
  - **Report found.** What the report finder found in your calendar, Slack and the subjects of mail you sent: each finding with its name, why, its evidence lines and how sure it is (Likely or Not sure). **Set up** creates the recurring report and drafts its first cycle on this machine. **Not a report** tells the finder not to raise it again. PMOS drafts only and nothing is sent. **Change first** and the finder settings stay in Insights and the console. A finder that is off says so.
@@ -24,6 +24,21 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
24
24
  - The microphone in the chat box turns what you say into text. Nothing is sent until you press send.
25
25
  - A link can open Home at one item: `?item=pt:<program>:<key>` selects a program task, and `?ask=program:<id>` opens the chat about that program. **Discuss in chat** on a program in the Board opens the same program chat. **New session** on an initiative starts a new chat about that initiative.
26
26
 
27
+ ## Mentions
28
+
29
+ **Mentions** is the first row of the list. Its badge counts the asks that wait on your reply. Reading a mention does not clear the badge: answering it does. When a new ask came in since you last opened Mentions, one line under the name says who asks what. With nothing waiting the row stays, with no badge.
30
+
31
+ Press the row to open Mentions in the Viewer (full screen on a phone).
32
+
33
+ - The summary says how many asks wait on you and how old the oldest one is, and who asks what. The round reply button opens the oldest ask.
34
+ - **Waiting on you** lists every ask you have not answered, whatever its age, oldest first. The age is the only signal: it turns amber after 2 days. The same person asking twice in one thread is one row with a count. With more than 5, the oldest 5 show and **Show all** shows the rest. An ask that waited 30 days or more asks once: "Did you answer this already?" ✓ clears it, × keeps it waiting and asks again in 30 days.
35
+ - **Last 7 days** lists what does not wait on you, by day: Today, Yesterday with its date, then dated days. An FYI has a blue dot until you open it. A mention to @channel, @here, a team or from a bot is for your information and never counts as an ask. A mention you answered says how: you replied in the thread, or you marked it answered.
36
+ - What PMOS could not read is said once at the end: a source that is not connected (with Connect), and a check that has not run today (with Check now). When the workspace does not answer, Mentions keeps the last list and says when it is from. It never says that nobody mentioned you because a read failed.
37
+
38
+ One mention shows what is asked and by when, where it is, and its initiative and stage. Four icons act in one press, each with Undo in the toast: **Mark answered** (you answered it somewhere PMOS cannot see), **Remind me tomorrow** (hidden until 09:00 tomorrow, then back with its age), **Make it a task** ("Reply to <name>" on the mention's initiative, or in your own tasks when it has none; the task closes itself when you reply in the source) and **Not an ask**. **What I found** lists what the brief found that answers it. **Proposed reply** is the reply Claude proposes. The pencil opens the chat "Reply to <name>" to change it with Claude; the reply in the Viewer updates while you talk. The send button copies the reply and opens the source. PMOS never posts: the mention keeps waiting, with "Your draft is ready", until you send it there. The messages of the source are folded at the bottom.
39
+
40
+ A reply PMOS sees in the thread clears the ask on the next read. A new ask after your reply makes it wait again, and its age counts from the new ask. Mentions has its own store, so the brief's limit of 30 items cannot crowd a mention out. `pmos mention list` prints what waits on you and the last 7 days. Claude saves a changed reply with `pmos mention draft <id> --text "<reply>"`. Neither command posts anything.
41
+
27
42
  ## An initiative
28
43
 
29
44
  Press an initiative's name in the list, or open `?ini=<id>`. The list stays as it is and the initiative's row is selected. The chat talks about the initiative, and its page opens in the Viewer.
@@ -50,6 +65,15 @@ Press the name in the Viewer's header. The name becomes a field.
50
65
  - A program has no Jira box. Its goal stays as it is.
51
66
  - A Jira ticket keeps its Jira name. Rename it in Jira.
52
67
 
68
+ ## Session names
69
+
70
+ Claude names a session after its first real answer. It does not ask. It changes the name again only when the job changes.
71
+
72
+ - To rename a session, press its name in the chat header. On a phone, press the name in the top bar. Enter saves and Esc cancels, as above.
73
+ - Your name always wins. After you rename a session, Claude does not rename it again.
74
+ - **Undo** gives back the name that Claude gave, and Claude names the session again.
75
+ - The Home row shows the same name.
76
+
53
77
  Some features are still not designed. Home keeps each one usable as a plain card in the Viewer with the label **Waiting for design**. The label means that the card works, but its look is not final.
54
78
 
55
79
  ## New for you, Search, Sources and Settings
@@ -67,7 +67,7 @@ On a desktop the workspace is one frame. [Layout](layout.md) explains each part.
67
67
  - [The Initiative Driver: drafts the agent files for you](initiative-driver.md): when the driver runs, the unblock sweep, the limits, Keep, Send back and Drop, the board modes, and `pmos driver`.
68
68
  - [Core documents: what each level keeps](core-documents.md): the core documents of the portfolio, a board and an initiative, their states, how PMOS drafts them, Issue it, and `pmos coredoc write`.
69
69
  - [The Horizon scan: the agent looks outside your initiatives](horizon-scan.md): how often it runs, the watch list you keep, what a scan does, where findings land, what it cannot do, and `pmos scan`.
70
- - [PM-only acts: what only you can do](pm-only-acts.md): which acts are yours, how the workspace checks that a press comes from your page or your terminal, and what to do when one is refused.
70
+ - [PM-only acts: what you and your agents can do](pm-only-acts.md): the acts that were yours alone, how the workspace checks that a press comes from your page, your terminal or an agent session, how an agent's act is logged under its name (D98), and what to do when a press is refused.
71
71
  - [PM-only lines: how the workspace checks your acts](pm-only-lines.md): how each act is recorded, what the Today card "A PM-only line is not attested" means, and the grants for a bulk lifecycle change and a Release.
72
72
  - [Breakdown › Timeline](timeline.md): an initiative's items on a time axis, split by stage, with milestones, today, and the at-risk flag when an item starts before its predecessor ends.
73
73
  - [Initiatives › Timeline](initiatives-timeline.md): when each initiative runs, one row per initiative, and how to reorder rows by their grip.
@@ -66,7 +66,7 @@ Open proposals appear in Needs you as one row for each initiative or task: "Agen
66
66
  - **Send back** needs a note. The note starts a new run. It counts as a correction.
67
67
  - **Drop** closes the proposal. It counts as a correction.
68
68
 
69
- The agent cannot keep, send back, drop, pause or change the mode. Those acts need your page or your terminal.
69
+ An agent session can keep, send back, drop, pause or change the mode too, with no typed confirmation (D98). Each line names the agent, so you see who decided.
70
70
 
71
71
  ## Board modes
72
72
 
@@ -75,7 +75,7 @@ Only you can move an initiative into Now. The workspace writes the line as yours
75
75
  ### Unconfirmed, proposed and dormant
76
76
 
77
77
  - **unconfirmed.** An initiative that reads Now only because it is active, with no line from you. Confirm it in the Cycle review.
78
- - **proposed.** An agent proposed a move. It changes nothing until you keep it in the Cycle review.
78
+ - **proposed.** A move an agent proposed before D98. It changes nothing until you or an agent keep it in the Cycle review. Since D98 an agent's move applies at once and names the agent.
79
79
  - **Dormant.** An initiative with no activity for a long time. Press the dormant line under Later to show them.
80
80
  - **No record yet.** A PRD, rubric or prototype folder that no initiative record points at. Press the "with no record" line under Later to show them. In List they are the last group. Press one to open its PRD. Only a record can be placed, so these have no menu.
81
81