create-pmos 0.552.0 → 0.554.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 (180) hide show
  1. package/package.json +33 -27
  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-board-test.js +4 -4
  7. package/workspace/briefing-premium-initiative-test.js +2 -2
  8. package/workspace/briefing-premium-test.js +1 -1
  9. package/workspace/changelog.json +32 -0
  10. package/workspace/chat-asks-test.js +5 -5
  11. package/workspace/ev-everywhere-test.js +2 -2
  12. package/workspace/goals-clear-ui-test.js +1 -1
  13. package/workspace/guide/agent-capabilities.md +31 -31
  14. package/workspace/guide/claude-proposes.md +68 -68
  15. package/workspace/guide/cli.md +22 -22
  16. package/workspace/guide/cloud.md +3 -3
  17. package/workspace/guide/home.md +38 -38
  18. package/workspace/guide/index.md +5 -5
  19. package/workspace/guide/intelligence-okr-goals.md +4 -4
  20. package/workspace/guide/layout.md +23 -23
  21. package/workspace/guide/notes.md +8 -8
  22. package/workspace/guide/programs.md +18 -18
  23. package/workspace/guide/reports.md +16 -16
  24. package/workspace/guide/settings-and-switches.md +37 -37
  25. package/workspace/guide/statuses.md +3 -3
  26. package/workspace/home-other-product-test.js +8 -8
  27. package/workspace/home-pill-test.js +3 -3
  28. package/workspace/home-rows-test.js +7 -7
  29. package/workspace/intel-report-ui-test.js +1 -1
  30. package/workspace/intelligence-gaps-ui-test.js +2 -2
  31. package/workspace/lib/agent-roles.js +1 -1
  32. package/workspace/lib/autonomy.js +1 -1
  33. package/workspace/lib/bg-queue.js +1 -1
  34. package/workspace/lib/board-pack-route.js +18 -2
  35. package/workspace/lib/briefing-premium-agent.js +2 -2
  36. package/workspace/lib/decision-memory.js +2 -2
  37. package/workspace/lib/driver-decide.js +2 -2
  38. package/workspace/lib/driver.js +6 -2
  39. package/workspace/lib/folder-needs.js +1 -1
  40. package/workspace/lib/goal-chat.js +5 -5
  41. package/workspace/lib/goal-watch.js +1 -1
  42. package/workspace/lib/grill-runs.js +5 -5
  43. package/workspace/lib/idle-lab.js +5 -5
  44. package/workspace/lib/impact-runs.js +2 -2
  45. package/workspace/lib/job-graph.js +2 -2
  46. package/workspace/lib/metric-draft-runs.js +4 -4
  47. package/workspace/lib/metric-read-runs.js +5 -5
  48. package/workspace/lib/news-for-you.js +1 -1
  49. package/workspace/lib/proposal-runs.js +6 -6
  50. package/workspace/lib/refresh.js +1 -1
  51. package/workspace/lib/routes-board-premium.js +1 -1
  52. package/workspace/lib/routes-goal-status.js +4 -4
  53. package/workspace/lib/routes-impact.js +1 -1
  54. package/workspace/lib/routes-insight-moves.js +1 -1
  55. package/workspace/lib/routes-loose.js +2 -2
  56. package/workspace/lib/routes-mentions.js +1 -1
  57. package/workspace/lib/routes-metric-drafts.js +9 -9
  58. package/workspace/lib/routes-proposals.js +8 -8
  59. package/workspace/lib/routes-ready-reports.js +1 -1
  60. package/workspace/lib/routes-slash.js +1 -1
  61. package/workspace/lib/source-heal.js +3 -3
  62. package/workspace/lib/state-root.js +22 -1
  63. package/workspace/lib/task-items.js +1 -1
  64. package/workspace/lib/task-links.js +2 -2
  65. package/workspace/lib/today.js +2 -2
  66. package/workspace/live-pill-round-test.js +1 -1
  67. package/workspace/metric-drafts-ui-test.js +1 -1
  68. package/workspace/milestone-suggest-test.js +5 -5
  69. package/workspace/news-viewers-test.js +3 -3
  70. package/workspace/okr-goals-ui-test.js +1 -1
  71. package/workspace/package-lock.json +2 -2
  72. package/workspace/package.json +1 -1
  73. package/workspace/premium-chat-chart-tab-test.js +1 -1
  74. package/workspace/premium-chat-context-test.js +4 -4
  75. package/workspace/premium-chat-goal-setup-test.js +3 -3
  76. package/workspace/premium-chat-goal-view-test.js +1 -1
  77. package/workspace/premium-chat-line-test.js +6 -6
  78. package/workspace/premium-chat-notes-test.js +4 -4
  79. package/workspace/premium-chat-report-tab-test.js +4 -4
  80. package/workspace/premium-rec-now-test.js +2 -2
  81. package/workspace/public/pm/batch-press.js +4 -4
  82. package/workspace/public/pm/bd-fc-card.js +1 -1
  83. package/workspace/public/pm/bd-goal.js +39 -2
  84. package/workspace/public/pm/bd-next.js +10 -10
  85. package/workspace/public/pm/bd-prog-panel.js +5 -5
  86. package/workspace/public/pm/bd-views.js +9 -4
  87. package/workspace/public/pm/chat-ask.js +1 -1
  88. package/workspace/public/pm/chat-context.js +3 -3
  89. package/workspace/public/pm/cozy-board.css +15 -0
  90. package/workspace/public/pm/cozy-evmodel.js +1 -1
  91. package/workspace/public/pm/cozy-home.css +1 -1
  92. package/workspace/public/pm/cozy-lab-ins.js +4 -4
  93. package/workspace/public/pm/cozy-lab.js +1 -1
  94. package/workspace/public/pm/cozy-news.js +2 -2
  95. package/workspace/public/pm/cozy-onboard.js +2 -2
  96. package/workspace/public/pm/cozy-rec-now.js +5 -5
  97. package/workspace/public/pm/cozy-rec-present.js +1 -1
  98. package/workspace/public/pm/cozy-reveal.js +2 -2
  99. package/workspace/public/pm/cozy-settings.js +19 -19
  100. package/workspace/public/pm/cozy-steps.js +2 -2
  101. package/workspace/public/pm/cozy-viewer.js +1 -1
  102. package/workspace/public/pm/ctx-wedge.js +1 -1
  103. package/workspace/public/pm/dash-view.js +1 -1
  104. package/workspace/public/pm/goal-chat.js +6 -6
  105. package/workspace/public/pm/good-morning.js +2 -2
  106. package/workspace/public/pm/grill-words.js +1 -1
  107. package/workspace/public/pm/home-app.js +19 -19
  108. package/workspace/public/pm/home-ask.js +1 -1
  109. package/workspace/public/pm/home-chat.js +6 -6
  110. package/workspace/public/pm/home-data.js +2 -2
  111. package/workspace/public/pm/home-day.js +3 -3
  112. package/workspace/public/pm/home-drift.js +1 -1
  113. package/workspace/public/pm/home-goal.js +1 -1
  114. package/workspace/public/pm/home-impact.js +1 -1
  115. package/workspace/public/pm/home-ini.js +1 -1
  116. package/workspace/public/pm/home-line.js +5 -5
  117. package/workspace/public/pm/home-mentions.js +4 -4
  118. package/workspace/public/pm/home-moment.js +1 -1
  119. package/workspace/public/pm/home-need.js +1 -1
  120. package/workspace/public/pm/home-phone-card.js +1 -1
  121. package/workspace/public/pm/home-stage-card.js +2 -2
  122. package/workspace/public/pm/home-sweep.js +1 -1
  123. package/workspace/public/pm/home-today.js +2 -2
  124. package/workspace/public/pm/ini-about.js +2 -2
  125. package/workspace/public/pm/ini-agent.js +5 -5
  126. package/workspace/public/pm/ini-links.js +5 -5
  127. package/workspace/public/pm/ini-props.js +11 -11
  128. package/workspace/public/pm/ini-view-model.js +1 -1
  129. package/workspace/public/pm/ini-view.js +2 -2
  130. package/workspace/public/pm/intent.js +3 -3
  131. package/workspace/public/pm/loose-props.js +5 -5
  132. package/workspace/public/pm/metric-drafts.js +1 -1
  133. package/workspace/public/pm/ms-suggest.js +3 -3
  134. package/workspace/public/pm/next-prompt-ui.js +2 -2
  135. package/workspace/public/pm/okr-list.js +1 -1
  136. package/workspace/public/pm/page-chat.js +2 -2
  137. package/workspace/public/pm/premium-attach.js +1 -1
  138. package/workspace/public/pm/premium-board.js +15 -8
  139. package/workspace/public/pm/premium-initiative-head.js +1 -1
  140. package/workspace/public/pm/premium-insights.js +3 -3
  141. package/workspace/public/pm/premium-meeting.js +1 -1
  142. package/workspace/public/pm/premium-mtg-replay.js +1 -1
  143. package/workspace/public/pm/premium-notes.js +2 -2
  144. package/workspace/public/pm/premium-report-read.js +6 -6
  145. package/workspace/public/pm/premium-report-tab.js +7 -7
  146. package/workspace/public/pm/premium-shell.js +18 -18
  147. package/workspace/public/pm/premium-vw-ctx.js +3 -3
  148. package/workspace/public/pm/premium-vw-jira.js +1 -1
  149. package/workspace/public/pm/premium-welcome.js +1 -1
  150. package/workspace/public/pm/prog-order.js +2 -2
  151. package/workspace/public/pm/program-charter.js +3 -3
  152. package/workspace/public/pm/program-model.js +1 -1
  153. package/workspace/public/pm/ready-lib.js +4 -4
  154. package/workspace/public/pm/report-flow.js +7 -7
  155. package/workspace/public/pm/report-orders-ui.js +2 -2
  156. package/workspace/public/pm/split-merge.js +5 -5
  157. package/workspace/public/pm/story.js +1 -1
  158. package/workspace/public/pm/task-card.js +1 -1
  159. package/workspace/public/pm/tk-draft.js +1 -1
  160. package/workspace/public/pm/tk-send.js +2 -2
  161. package/workspace/public/pm/wf-page.js +2 -2
  162. package/workspace/ready-dash-ui-test.js +1 -1
  163. package/workspace/rec-present-test.js +2 -2
  164. package/workspace/server.js +12 -8
  165. package/workspace/session-names-test.js +3 -3
  166. package/workspace/skills/doc-check.skill +2 -0
  167. package/workspace/skills/idle-lab-prototype.skill +2 -0
  168. package/workspace/skills/measure.skill +2 -0
  169. package/workspace/skills/metric-read.skill +2 -0
  170. package/workspace/skills/milestone-review.skill +2 -0
  171. package/workspace/skills/report-biweekly.skill +2 -0
  172. package/workspace/skills/report-daily.skill +2 -0
  173. package/workspace/skills/report-design.skill +2 -0
  174. package/workspace/skills/report-monthly.skill +2 -0
  175. package/workspace/skills/report-weekly.skill +2 -0
  176. package/workspace/split-merge-ui-test.js +3 -3
  177. package/workspace/stage-card-test.js +4 -4
  178. package/workspace/task-links-test.js +1 -1
  179. package/workspace/task-views-test.js +7 -7
  180. package/workspace/tk-tasks-test.js +2 -2
@@ -93,7 +93,7 @@ const look = () => {
93
93
  ok('P1 a goal at work: one line with the point it is on, "1 of 4 done" and Stop', /Open questions, each with an owner/.test(s0.line || '') && /1 of 4 done/.test(s0.line || '') && s0.stop && !s0.open, JSON.stringify(s0));
94
94
  ok('P1 the line replaces the run strip, the live card, the goal chip and the goal bar', !s0.strip && !s0.live && !s0.chip && !s0.peek, JSON.stringify(s0));
95
95
  ok('P1 the box has no @ and no / button, and a phone chat has no floating menu', !s0.at && !s0.slash && !s0.fab, JSON.stringify(s0));
96
- ok('P1 a message sent while it works says Claude reads it after this tool call, with × to take it back', /reads it after this tool call, in seconds/.test(s0.queued || '') && s0.qx, JSON.stringify(s0));
96
+ ok('P1 a message sent while it works says PMOS reads it after this tool call, with × to take it back', /reads it after this tool call, in seconds/.test(s0.queued || '') && s0.qx, JSON.stringify(s0));
97
97
  const s7 = await until(async () => { const v = await p.evaluate(look); return v.rec ? v : null; }) || await p.evaluate(look);
98
98
  ok('P7 a meeting records: the pill with its clock is in the chat\'s top bar, which shows the title only', /^\d+:\d\d/.test(s7.rec || '') && s7.sub === 'none', JSON.stringify(s7));
99
99
  if (shots) await p.screenshot({ path: `${shots}/line-390.png` });
@@ -117,7 +117,7 @@ const look = () => {
117
117
  { const st = { conv: { turn: 'agent', messages: BASE } };
118
118
  const { p, ctx, errs } = await open(390, st);
119
119
  const s0 = await until(async () => { const v = await p.evaluate(look); return v.line ? v : null; }) || await p.evaluate(look);
120
- ok('P3 a session with no step list: Claude\'s newest status line and the clock, never the raw call or an invented count (batch 25 item 14)', /SSO goes on the out-of-scope list; the date stays\.\s*\d+:\d\d/.test(s0.line || '') && !/Edit · planning/.test(s0.line || '') && !/ of \d+ done/.test(s0.line || ''), JSON.stringify(s0));
120
+ ok('P3 a session with no step list: PMOS\'s newest status line and the clock, never the raw call or an invented count (batch 25 item 14)', /SSO goes on the out-of-scope list; the date stays\.\s*\d+:\d\d/.test(s0.line || '') && !/Edit · planning/.test(s0.line || '') && !/ of \d+ done/.test(s0.line || ''), JSON.stringify(s0));
121
121
  st.conv = { turn: 'agent', messages: BASE, steps: [{ text: 'Read the funnel export', state: 'done' }, { text: 'Find the step that moved', state: 'now', call: 'Read · funnel.csv' }, { text: 'Write it up', state: 'next' }] };
122
122
  const s1 = await until(async () => { const v = await p.evaluate(look); return /Find the step/.test(v.line || '') ? v : null; }) || await p.evaluate(look);
123
123
  ok('P3 a session with its own steps: its step and "1 of 3 done"', /Find the step that moved/.test(s1.line || '') && /1 of 3 done/.test(s1.line || ''), JSON.stringify(s1));
@@ -134,13 +134,13 @@ const look = () => {
134
134
  { const st = { goal: goal('waiting'), conv: { turn: 'pm', messages: LONG.concat(BASE, [{ role: 'assistant', text: 'Is the draft ready for Dita?', at: ago(0.5) }]) } };
135
135
  const { p, ctx, errs } = await open(390, st);
136
136
  const s0 = await until(async () => { const v = await p.evaluate(look); return v.line ? v : null; }) || await p.evaluate(look);
137
- ok('P4 Claude needs the PM: the line is blue and says "Claude asks before it goes on", Stop stays', /\byou\b/.test(s0.cls) && /Claude asks before it goes on/.test(s0.line || '') && s0.stop && !/ of \d+ done/.test(s0.line || ''), JSON.stringify(s0));
137
+ ok('P4 PMOS needs the PM: the line is blue and says "PMOS asks before it goes on", Stop stays', /\byou\b/.test(s0.cls) && /PMOS asks before it goes on/.test(s0.line || '') && s0.stop && !/ of \d+ done/.test(s0.line || ''), JSON.stringify(s0));
138
138
  if (shots) await p.screenshot({ path: `${shots}/line-390-ask.png` });
139
139
  await p.click('#hmPl [data-pl="toggle"]'); await sleep(500);
140
140
  const s1 = await p.evaluate(look);
141
141
  ok('P4 a tap goes to the ask in the conversation, not to a panel', !s1.open && !s1.vw, JSON.stringify(s1));
142
142
  const fl = await p.evaluate(() => { const f = document.querySelector('#hmLog .hm-flash'); return f ? f.textContent : ''; });
143
- ok('P4b the tap is never silent: Claude\'s newest message, where the goal asks, pulses once (feedback batch 4, item 3)', /Is the draft ready for Dita\?/.test(fl), fl);
143
+ ok('P4b the tap is never silent: PMOS\'s newest message, where the goal asks, pulses once (feedback batch 4, item 3)', /Is the draft ready for Dita\?/.test(fl), fl);
144
144
  ok('F1 (ask) no page error', !errs.length, errs.join(' | '));
145
145
  await ctx.close(); }
146
146
 
@@ -148,10 +148,10 @@ const look = () => {
148
148
  { const st = { goal: goal('done', { met: DRAFT.done, at: ago(0.2) }), conv: { turn: 'pm', messages: BASE.concat([{ role: 'assistant', text: 'The draft is ready for Dita; 2 open questions have owners.', at: ago(0.5) }]) } };
149
149
  const { p, ctx, errs } = await open(1280, st);
150
150
  const s0 = await until(async () => { const v = await p.evaluate(look); return v.divider ? v : null; }) || await p.evaluate(look);
151
- ok('P5 a goal that is done: no line; "Goal done" sits over Claude\'s result', !s0.line && /Goal done/.test(s0.divider || '') && /The draft is ready for Dita/.test(s0.dividerNext || ''), JSON.stringify(s0));
151
+ ok('P5 a goal that is done: no line; "Goal done" sits over PMOS\'s result', !s0.line && /Goal done/.test(s0.divider || '') && /The draft is ready for Dita/.test(s0.dividerNext || ''), JSON.stringify(s0));
152
152
  await p.click('#hmLog .pl-dv [data-goal-open]');
153
153
  const s1 = await until(async () => { const v = await p.evaluate(look); return v.vw ? v : null; }) || await p.evaluate(look);
154
- ok('P5 a tap opens the points, with the note that Claude checked them itself', /4 of 4 done points met/.test(s1.vw || '') && /Claude checked its own points/.test(s1.vw || ''), JSON.stringify(s1));
154
+ ok('P5 a tap opens the points, with the note that PMOS checked them itself', /4 of 4 done points met/.test(s1.vw || '') && /PMOS checked its own points/.test(s1.vw || ''), JSON.stringify(s1));
155
155
  st.goal = goal('stopped', { reason: 'deadline', at: ago(0.2) });
156
156
  const s2 = await until(async () => { const v = await p.evaluate(look); return /Goal stopped/.test(v.divider || '') ? v : null; }) || await p.evaluate(look);
157
157
  ok('P6 a goal that stopped: the amber divider says why, and the box says how to go on', /Goal stopped: the deadline passed/.test(s2.divider || '') && s2.ph === 'Reply to go on, or /goal for a new goal' && !s2.line, JSON.stringify(s2));
@@ -92,7 +92,7 @@ const notes = (key = KEY) => lib.listNotes({ runtimeDir: T.STATE_DIR, key }).not
92
92
  await page.click('#ntM [data-ntgo]:nth-child(2)');
93
93
  ok('N4 picking a note shows it', /call Dana/.test(await page.textContent('#ntEd')) && (await page.textContent('#ntSw')).trim() === 'call Dana');
94
94
  /* N5 */
95
- ok('N5 New note, Add selection and Share with Claude are icons with a name and a tooltip, no words', await page.evaluate(() => ['new', 'sel', 'share'].every((k) => { const b = document.querySelector(`[data-nt="${k}"]`); return b && !b.textContent.trim() && b.querySelector('svg') && b.getAttribute('aria-label') && b.title; })));
95
+ ok('N5 New note, Add selection and Share with PMOS are icons with a name and a tooltip, no words', await page.evaluate(() => ['new', 'sel', 'share'].every((k) => { const b = document.querySelector(`[data-nt="${k}"]`); return b && !b.textContent.trim() && b.querySelector('svg') && b.getAttribute('aria-label') && b.title; })));
96
96
  /* N6 */
97
97
  await page.evaluate(() => { const p = [...document.querySelectorAll('#ntEd p')].find((x) => /ask about/.test(x.textContent)); const r = document.createRange(); r.selectNodeContents(p); getSelection().removeAllRanges(); getSelection().addRange(r); });
98
98
  await page.click('[data-nt="sel"]');
@@ -102,14 +102,14 @@ const notes = (key = KEY) => lib.listNotes({ runtimeDir: T.STATE_DIR, key }).not
102
102
  await page.fill('#hmIn', 'Plan the deck from my note');
103
103
  await page.click('#ntSw'); await page.click('#ntM [data-ntgo]:nth-child(1)');
104
104
  await page.click('[data-nt="share"]');
105
- ok('N7 Share with Claude puts the note on the message as a chip', !!(await until(async () => page.evaluate(() => { const c = document.querySelector('#hmFiles .hm-att'); return c && /Q4 review prep/.test(c.textContent) && /Note/.test(c.textContent); }))));
105
+ ok('N7 Share with PMOS puts the note on the message as a chip', !!(await until(async () => page.evaluate(() => { const c = document.querySelector('#hmFiles .hm-att'); return c && /Q4 review prep/.test(c.textContent) && /Note/.test(c.textContent); }))));
106
106
  await shot(page, 'shared-1280-light');
107
107
  await page.click('#hmForm [type=submit]');
108
108
  const ask = await until(async () => asks.find((a) => a.path.endsWith('/ask')));
109
109
  const q4 = notes().find((x) => x.title === 'Q4 review prep');
110
110
  ok('N7 send names the note as notes/<id>.md', !!ask && ask.body.text === 'Plan the deck from my note' && JSON.stringify(ask.body.files) === JSON.stringify(['notes/' + q4.id + '.md']), JSON.stringify(ask && ask.body));
111
111
  const paths = lib.pathsOf({ runtimeDir: T.STATE_DIR, key: KEY, names: ask.body.files });
112
- ok('N7 the name resolves to the note file Claude reads', paths.ok && paths.paths[0] === q4.path);
112
+ ok('N7 the name resolves to the note file PMOS reads', paths.ok && paths.paths[0] === q4.path);
113
113
  ok('N7 the note stays after the send', notes().length === 2);
114
114
  /* N8 */
115
115
  st.messages = [{ role: 'user', text: lib.withFiles('Plan the deck from my note', paths.paths), at: '2026-10-21T08:00:00Z' }]; st.session = 's-notes';
@@ -134,7 +134,7 @@ const notes = (key = KEY) => lib.listNotes({ runtimeDir: T.STATE_DIR, key }).not
134
134
  await until(async () => page.evaluate(() => !document.getAnimations().some((a) => a.playState === 'running'))); // the popup's entrance scales it: measure once it has settled
135
135
  { const ic = await page.evaluate(() => [...document.querySelectorAll('.ntic')].map((b) => (b.dataset.nt || b.id || b.className) + ':' + Math.round(b.getBoundingClientRect().height))); ok(`N10 ${scheme}: the icon buttons are 44px targets`, ic.length > 0 && ic.every((x) => +x.split(':').pop() >= 44), ic.join()); }
136
136
  await page.click('[data-nt="share"]');
137
- ok(`N10 ${scheme}: Share with Claude goes back to the conversation with the chip`, !!(await until(async () => (await page.isVisible('#hmFiles .hm-att')) && (await page.$('#czViewer:not([hidden])')) === null)));
137
+ ok(`N10 ${scheme}: Share with PMOS goes back to the conversation with the chip`, !!(await until(async () => (await page.isVisible('#hmFiles .hm-att')) && (await page.$('#czViewer:not([hidden])')) === null)));
138
138
  ok(`N10 ${scheme}: no page errors`, errors.length === 0, errors.join(' | '));
139
139
  await ctx.close();
140
140
  }
@@ -80,11 +80,11 @@ const look = () => {
80
80
 
81
81
  { const { p, ctx, errs, st } = await open(1280, 'light', [ASK, ANSWER]);
82
82
  const s0 = await p.evaluate(look);
83
- ok('R1 the block is a chip under Claude\'s words, never JSON; the PM\'s turn shows as typed', /Social login weekly/.test(s0.chip || '') && /New report/.test(s0.chip || '') && !s0.json && s0.user.includes('make this a report for the growth leads'), JSON.stringify(s0));
83
+ ok('R1 the block is a chip under PMOS\'s words, never JSON; the PM\'s turn shows as typed', /Social login weekly/.test(s0.chip || '') && /New report/.test(s0.chip || '') && !s0.json && s0.user.includes('make this a report for the growth leads'), JSON.stringify(s0));
84
84
  ok('R1 opening the chat opens no tab by itself', s0.tabs.length === 0, JSON.stringify(s0));
85
85
  await p.click('#hmLog [data-report-open]');
86
86
  const s1 = await until(async () => { const v = await p.evaluate(look); return v.pane ? v : null; }) || await p.evaluate(look);
87
- ok('R3 a new report asks its questions first (RfH4): Waits on your answers, Claude\'s picks filled in (Slides, Growth leads, Once), the standard look, its sources, Nothing goes out and Draft it', /Report · Growth leads/.test(s1.tabs.join(' ')) && /Social login weekly/.test(s1.title)
87
+ ok('R3 a new report asks its questions first (RfH4): Waits on your answers, PMOS\'s picks filled in (Slides, Growth leads, Once), the standard look, its sources, Nothing goes out and Draft it', /Report · Growth leads/.test(s1.tabs.join(' ')) && /Social login weekly/.test(s1.title)
88
88
  && /Waits on your answers/.test(s1.pane || '') && /my pick/.test(s1.pane || '') && /Standard PMOS look/.test(s1.pane || '') && /GA4/.test(s1.pane || '') && /Nothing goes out/.test(s1.pane || '')
89
89
  && await p.evaluate(() => document.querySelector('#czViewer [data-rt="fmt|google-slides"]').getAttribute('aria-checked') === 'true' && document.querySelector('#czViewer [data-rt="rep|0"]').getAttribute('aria-checked') === 'true' && document.querySelector('#czViewer input[data-rt="aud"]').value === 'Growth leads' && !!document.querySelector('#czViewer [data-rt="draftit"]:not([disabled])'))
90
90
  && !/Customer service|Follow a sample deck/.test(s1.pane || '') && !(await p.$('#czViewer .rt, #czViewer .obody, #dlg:not([hidden])')), JSON.stringify(s1));
@@ -98,12 +98,12 @@ const look = () => {
98
98
  const L = ledger(), setup = L.find((l) => l.ev === 'setup');
99
99
  const T1 = setup ? require('./lib/report-templates.js').fold(require('./lib/report-templates.js').readLines(F.team, setup.id)) : null;
100
100
  ok('R4 Draft it records the report, pauses it (Once) and records T1', !!setup && setup.output === 'google-slides' && setup.audience === 'Growth leads' && L.some((l) => l.ev === 'pause' && l.id === setup.id) && T1 && T1.current === 1, JSON.stringify([L.map((l) => l.ev), T1]));
101
- ok('R4 the report\'s current state opens: its first draft in the reader, Claude\'s review under it (RfH2), the template icon in the header', s3.reader && /I read it as your readers would/.test(s3.review || '') && s3.tpl, JSON.stringify(s3).slice(0, 600));
101
+ ok('R4 the report\'s current state opens: its first draft in the reader, PMOS\'s review under it (RfH2), the template icon in the header', s3.reader && /I read it as your readers would/.test(s3.review || '') && s3.tpl, JSON.stringify(s3).slice(0, 600));
102
102
  if (shots) await p.screenshot({ path: `${shots}/draft-1280-light.png` });
103
103
  // the chat icon (Wawan, 2026-11-02): the report's own conversation opens in Home's chat, the report stays beside it
104
104
  await p.click('#czViewer [data-cz-vw-p="chat"]');
105
105
  const ch = await until(() => p.evaluate(() => { const i = document.getElementById('hmIn'); return i && i.placeholder === 'Change the report' ? { ph: i.placeholder, log: (document.getElementById('hmLog') || {}).textContent || '', reader: !!document.querySelector('#czViewer .vz-slide, #czViewer .vz-rp0') } : null; }), 8000);
106
- ok('R4 the chat icon opens the report\'s own conversation beside it: Claude asks what to change, the report stays open', !!ch && /Tell me what to change in/.test(ch.log) && ch.reader, JSON.stringify(ch));
106
+ ok('R4 the chat icon opens the report\'s own conversation beside it: PMOS asks what to change, the report stays open', !!ch && /Tell me what to change in/.test(ch.log) && ch.reader, JSON.stringify(ch));
107
107
  await p.click('#czViewer [data-cz-vw-p="template"]');
108
108
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz[data-panel="template"] [data-rt="fmt|google-doc"]')));
109
109
  await p.click('#czViewer [data-rt="fmt|google-doc"]');
@@ -105,9 +105,9 @@ async function context(o = {}) {
105
105
 
106
106
  /* N4 a question */
107
107
  await p.fill('.rn-mine textarea', 'Did Ana give a date?');
108
- ok('N4 a line that ends with ? asks Claude', await p.$eval('.rn-send', (b) => b.getAttribute('aria-label')) === 'Ask Claude');
108
+ ok('N4 a line that ends with ? asks PMOS', await p.$eval('.rn-send', (b) => b.getAttribute('aria-label')) === 'Ask PMOS');
109
109
  await p.press('.rn-mine textarea', 'Enter');
110
- ok('N4 the question goes to Claude with the note, and shows at once with Claude at work', await until(() => posted(A.S, '/api/meeting-focus/ask').some((x) => x.body.question === 'Did Ana give a date?' && x.body.note === 'n2') && p.evaluate(() => /Did Ana give a date\?/.test(document.querySelector('.rn-chx .q').textContent) && !!document.querySelector('.rn-chx [aria-label="Claude is answering"]'))));
110
+ ok('N4 the question goes to PMOS with the note, and shows at once with PMOS at work', await until(() => posted(A.S, '/api/meeting-focus/ask').some((x) => x.body.question === 'Did Ana give a date?' && x.body.note === 'n2') && p.evaluate(() => /Did Ana give a date\?/.test(document.querySelector('.rn-chx .q').textContent) && !!document.querySelector('.rn-chx [aria-label="PMOS is answering"]'))));
111
111
  A.M.asks[0].state = 'answered';
112
112
  A.M.notes.push({ ask: 'fa1', cat: 'Answer', body: 'Yes: Friday (she said it at 4:05).', from: ['talk', 'last'], show: 'now' });
113
113
  ok('N4 the answer arrives above the box with its source, without waiting for the tab\'s 15 s read', await until(() => p.evaluate(() => { const a = document.querySelector('.rn-chx .ca'); return !!a && /Yes: Friday/.test(a.textContent) && /From the talk and last time/.test(a.textContent); }), 10000));
@@ -69,7 +69,7 @@ export function batchOf(props) {
69
69
  const sure = live.reduce((n, g) => n + g.lines.length, 0);
70
70
  return { groups: live, check, sure, n: sure + check.length };
71
71
  }
72
- const CHECK_WORD = { outcome: 'Expected outcome', description: 'Description', found: 'Found elsewhere', grill: 'Grill finding', prototyped: 'Claude prototyped it', improved: 'Claude improved it', scanned: 'Claude scanned for it' };
72
+ const CHECK_WORD = { outcome: 'Expected outcome', description: 'Description', found: 'Found elsewhere', grill: 'Grill finding', prototyped: 'PMOS prototyped it', improved: 'PMOS improved it', scanned: 'PMOS scanned for it' };
73
73
  const checkTitle = (p) => clip(p.title || (p.group === 'outcome' && p.items && p.items[0] ? p.items[0].title : '') || (p.data && p.data.text) || CHECK_WORD[p.group] || p.group, 110);
74
74
 
75
75
  /* ── the Viewer ── */
@@ -95,7 +95,7 @@ function bodyHtml() {
95
95
  const phone = isPhone();
96
96
  const secs = B.groups.map((g) => ({ id: g.group, title: g.title, count: g.lines.length, open: !phone, html: g.lines.map((l) => lineHtml(g.group, l)).join('') }));
97
97
  if (B.check.length) secs.push({ id: 'check', title: 'Check these', count: B.check.length, open: !phone || !B.sure, html: '<p class="bp-sub">Each one needs its own answer.</p>' + B.check.map(checkHtml).join('') });
98
- return `<div class="pp bp">${lead}${VW.czSections(secs, { key: 'batch' })}<button type="button" class="bp-full" data-bp-full>${SVG(I.more, 16, 2.4)} Open everything Claude proposes on ${esc(S.at.title)}</button></div>`;
98
+ return `<div class="pp bp">${lead}${VW.czSections(secs, { key: 'batch' })}<button type="button" class="bp-full" data-bp-full>${SVG(I.more, 16, 2.4)} Open everything PMOS proposes on ${esc(S.at.title)}</button></div>`;
99
99
  }
100
100
  const presses = () => { const B = batchOf(S.props); return B.sure ? [{ act: 'all', label: 'Keep all ' + B.sure, icon: I.check, solid: true }] : []; };
101
101
  function draw() {
@@ -172,10 +172,10 @@ export function openBatch(at, H) {
172
172
  const VW = window.czViewer; if (!VW || !at || !at.ini) return;
173
173
  sheet();
174
174
  S.at = at; S.H = H; S.props = at.props || null; S.left = new Map(); // at.props: the ✦ the page already read (as the full ✦ seeds from it)
175
- VW.open({ id: 'bp:' + at.ini, kind: 'Claude proposes', title: at.title, sub: 'One press keeps all of it', icon: I.spark, presses: [],
175
+ VW.open({ id: 'bp:' + at.ini, kind: 'PMOS proposes', title: at.title, sub: 'One press keeps all of it', icon: I.spark, presses: [],
176
176
  onPress: (act) => { if (act === 'all') keepAll(); },
177
177
  render: (body) => {
178
- body.innerHTML = '<p class="pp-none">Reading what Claude proposes…</p>'; body.onclick = onPress;
178
+ body.innerHTML = '<p class="pp-none">Reading what PMOS proposes…</p>'; body.onclick = onPress;
179
179
  body.onkeydown = (e) => { if (e.key === 'Enter' && e.target.matches('[data-bp-in]')) { e.preventDefault(); giveWhy(e.target.dataset.bpIn, e.target.value.trim()); } };
180
180
  if (S.props) draw();
181
181
  if (!S.props || S.props.look) fresh();
@@ -27,7 +27,7 @@ export function cardWords(r) {
27
27
  function cardHtml(r) {
28
28
  const w = cardWords(r); if (!w) return '';
29
29
  // no count on the ✦ (chief-of-staff C4, the UI grill's delete list): it opens the initiative and its one-press summary
30
- const go = w.n ? `<div class="bd-fc-go"><button type="button" class="bd-fc-sp" data-fc-props aria-label="See what Claude proposes" title="What Claude proposes">${SPARK}</button></div>` : '';
30
+ const go = w.n ? `<div class="bd-fc-go"><button type="button" class="bd-fc-sp" data-fc-props aria-label="See what PMOS proposes" title="What PMOS proposes">${SPARK}</button></div>` : '';
31
31
  return `<p class="bd-pc-h">${esc(w.head)}</p>${w.why ? `<p class="bd-amut bd-pc-sub">${esc(w.why)}</p>` : ''}${go}`;
32
32
  }
33
33
 
@@ -5,6 +5,12 @@
5
5
  * then "No goal yet". null when no row's anchor names a goal (zero is silence)
6
6
  * goalHeadHtml(g, o) → the Track's goal row: the goal icon, its name, "KR-A1 · no reading yet", the spread of its initiatives over the steps,
7
7
  * and in the Next column its target and where the reading comes from. o: { steps, plain, open }
8
+ * asGroups(rows, R, sort) → [{ kind: 'goal', key, goal, name, rows }] | null goalGroups shaped as the Board's groups, so every view draws them
9
+ * (batch 29 item 4): By stage, the Timeline and the List, and the shared Board link, as the Track does
10
+ * laneHtml(g, open) → By stage: a goal's swimlane head (the goal icon, its name, its meta, its target), and its fold
11
+ * cellHtml(g, dots) → the Timeline: a goal's name cell (pm/bd-span.js laneRow, as a product's prodCell), the fold over the whole of it
12
+ * listHeadHtml(g, open) → the List: a goal's head row over its initiatives
13
+ * labelHtml(g) → a phone's By stage: the small label over a goal's cards
8
14
  *
9
15
  * A goal is never typed here: it is read from the OKR file and the health budgets (lib/board-goals.js). The stages stay derived. */
10
16
  import { pmGet } from './http.js';
@@ -15,6 +21,7 @@ const TARGET = 'M12 4a8 8 0 1 0 0 16a8 8 0 0 0 0-16zM12 8.5a3.5 3.5 0 1 0 0 7a3.
15
21
  const CHEV_D = 'M7 10l5 5 5-5', CHEV_R = 'M10 7l5 5-5 5';
16
22
  const plural = (n, a, b) => (n === 1 ? a : b);
17
23
  const NONE = 'goal:none';
24
+ const NONE_META = 'PMOS anchors each one to a goal';
18
25
 
19
26
  const CACHE = new Map(); // ws|anchors → { goals, of }
20
27
  /** Each open row's anchor goes once per row, so a budget's share counts the rows. */
@@ -22,7 +29,9 @@ export async function readGoals(ws, rows) {
22
29
  const A = (rows || []).filter((r) => r && !r.ended).map((r) => String(r.anchor || ''));
23
30
  const key = (ws || '') + '|' + A.join(',');
24
31
  if (CACHE.has(key)) return CACHE.get(key);
25
- const q = new URLSearchParams(); if (ws) q.set('ws', ws); for (const a of A) q.append('a', a);
32
+ // a shared Board link (pm/readonly.js): its pack holds one goals answer for the rows it keeps, asked by ws alone (lib/board-pack-route.js)
33
+ const ro = typeof window !== 'undefined' && !!window.PMOS_READONLY;
34
+ const q = new URLSearchParams(); if (ws) q.set('ws', ws); if (!ro) for (const a of A) q.append('a', a);
26
35
  const r = await pmGet('/api/artefacts/goals?' + q.toString()).catch(() => null);
27
36
  const v = r && r.ok ? { goals: r.goals || [], of: r.of || {} } : null;
28
37
  if (v) CACHE.set(key, v);
@@ -51,7 +60,7 @@ export function goalHeadHtml(g, o = {}) {
51
60
  const band = lo >= 0 && !o.plain ? `<span class="bd-spb" style="left:calc(${pc(lo)} + 4px);width:calc(${pc(hi - lo + 1)} - 8px)"></span>` : '';
52
61
  const lab = `<span class="bd-spl" style="left:calc(${pc(lo >= 0 && !o.plain ? lo : 0)} + 14px)">${esc(words)}</span>`;
53
62
  const title = x ? x.title : 'No goal yet';
54
- const meta = x ? x.meta : 'Claude anchors each one to a goal';
63
+ const meta = x ? x.meta : NONE_META;
55
64
  const dl = x ? `<div class="bd-pm"><b>${esc(x.target || '')}</b></div>${x.from ? `<div class="t3">${esc(x.from)}</div>` : ''}` : '';
56
65
  return `<div class="bt-r bt-pg bt-goal${x && x.over ? ' over' : ''}" role="row" data-goal="${esc(g.key)}">`
57
66
  + `<div class="bt-pgn" role="rowheader"><span class="bt-pgo bt-gln" title="${esc(x && x.objective ? x.objective : title)}"><span class="bd-pti">${SV(TARGET)}</span><span class="tt"><b>${esc(title)}</b><span class="m">${esc(meta)}</span></span></span>`
@@ -59,3 +68,31 @@ export function goalHeadHtml(g, o = {}) {
59
68
  + `<div class="bt-spread" role="cell">${band}${lab}</div>`
60
69
  + `<div class="bt-dl" role="cell">${dl}</div></div>`;
61
70
  }
71
+
72
+ /** goalGroups as the Board's groups (pm/bd-prog.js groupsOf shape): kind 'goal', the goal's name as the group's name. sort(rows) orders each goal's rows. */
73
+ export function asGroups(rows, R, sort) {
74
+ const G = goalGroups(rows, R);
75
+ return G ? G.map((g) => ({ kind: 'goal', key: g.key, goal: g.goal, name: g.goal ? g.goal.title : 'No goal yet', rows: sort ? sort(g.rows) : g.rows })) : null;
76
+ }
77
+ export const goalIcon = (n) => `<span class="bd-pti">${SV(TARGET, n)}</span>`;
78
+ const words = (g) => { const x = g.goal; return { title: x ? x.title : 'No goal yet', meta: x ? x.meta : NONE_META, target: x ? x.target || '' : '', tip: x && x.objective ? x.objective : '' }; };
79
+ const foldBtn = (g, open, label, cls = 'bd-ib sm bd-fold') => `<button type="button" class="${cls}" data-fold="${esc(g.key)}" aria-expanded="${open}" aria-label="${open ? 'Fold' : 'Show'} ${esc(label)}" title="${open ? 'Fold' : 'Show'}">${SV(open ? CHEV_D : CHEV_R)}</button>`;
80
+ /** By stage: the goal's swimlane head. The name opens nothing (a goal's page is in Intelligence), so it is plain text. */
81
+ export function laneHtml(g, open) {
82
+ const w = words(g);
83
+ return `<span class="bd-gln${g.goal && g.goal.over ? ' over' : ''}"${w.tip ? ` title="${esc(w.tip)}"` : ''}>${goalIcon()}<span class="tt"><b>${esc(w.title)}</b><span class="m">${esc(w.meta)}</span></span></span>`
84
+ + `<span class="bd-sp"></span>${w.target ? `<span class="bd-glt">${esc(w.target)}</span>` : ''}${foldBtn(g, open, w.title)}`;
85
+ }
86
+ /** The Timeline: the goal's name cell. The whole of it folds, as a product's fold part does; folded, it counts its initiatives. */
87
+ export function cellHtml(g, open, dots) {
88
+ const w = words(g), n = g.rows.length;
89
+ return `<span class="bd-prdb bd-glb"><button type="button" class="bd-prdf bd-fold" data-fold="${esc(g.key)}" aria-expanded="${open}" aria-label="${esc(w.title)}, ${n} ${plural(n, 'initiative', 'initiatives')}. ${open ? 'Fold' : 'Show'}" title="${esc(w.tip || (open ? 'Fold' : 'Show'))}">`
90
+ + `${goalIcon()}<span class="tt"><b>${esc(w.title)}</b><span class="m">${esc(w.meta)}</span></span><span class="bd-sp"></span>${dots || ''}${open || dots !== undefined ? '' : `<span class="n">${n}</span>`}${SV(open ? CHEV_D : CHEV_R)}</button></span>`;
91
+ }
92
+ /** The List: the goal's head row over its rows. */
93
+ export function listHeadHtml(g, open) {
94
+ const w = words(g);
95
+ return `<div class="bd-lt gh${g.goal && g.goal.over ? ' over' : ''}" role="row"><span role="rowheader" class="bd-gln"${w.tip ? ` title="${esc(w.tip)}"` : ''}>${goalIcon()}<span class="tt"><b>${esc(w.title)}</b><span class="m">${esc(w.meta)}${w.target ? ' · ' + esc(w.target) : ''}</span></span></span>${foldBtn(g, open, w.title)}</div>`;
96
+ }
97
+ /** A phone's By stage: the small label over a goal's cards in a stage. */
98
+ export const labelHtml = (g) => `<p class="bd-sl gl">${goalIcon(14)}${esc(words(g).title)}</p>`;
@@ -23,8 +23,8 @@ const IC = {
23
23
  const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
24
24
  const dm = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
25
25
  // what Claude does with the parts of a step: the documents became the seven artefacts (D107); Claude writes them by itself
26
- const CLAUDE = { triage: 'Claude writes the experiment', discover: 'Claude writes the experiment', plan: 'Claude writes the done test', prioritize: 'Claude ranks it against its goal' };
27
- const ANCHOR = 'Claude anchors it to a goal';
26
+ const CLAUDE = { triage: 'PMOS writes the experiment', discover: 'PMOS writes the experiment', plan: 'PMOS writes the done test', prioritize: 'PMOS ranks it against its goal' };
27
+ const ANCHOR = 'PMOS anchors it to a goal';
28
28
  const OPEN_TK = ['In review', 'In progress', 'To do'];
29
29
  const CLOSED = new Set(['Done', "Won't do", 'Archived']);
30
30
 
@@ -40,7 +40,7 @@ const yours = (words, x = {}) => ({ who: 'you', words, ...x });
40
40
  function moveLine(r, ctx, count) {
41
41
  const to = nextStage(r);
42
42
  if (!to) return null;
43
- return canMove(r, ctx) ? yours('move it to ' + to + '?', { count, act: { kind: 'move', label: 'Move to ' + to } }) : claude('Claude moves it to ' + to + ' when its files land', { count });
43
+ return canMove(r, ctx) ? yours('move it to ' + to + '?', { count, act: { kind: 'move', label: 'Move to ' + to } }) : claude('PMOS moves it to ' + to + ' when its files land', { count });
44
44
  }
45
45
  /** A task title as the team's line: "Score vendor B's POC". */
46
46
  const taskLine = (title) => ({ who: 'team', words: String(title || '').trim() });
@@ -55,7 +55,7 @@ export function nextOf(r, ctx = {}) {
55
55
  const mine = (r.tasks || []).filter((k) => sectionOf(k, list, r.wfMap) === st.key && k.status !== 'Archived')
56
56
  .map((k, i) => ({ k, i })).sort((a, b) => (Number.isFinite(a.k.order) ? a.k.order : 1e9 + a.i) - (Number.isFinite(b.k.order) ? b.k.order : 1e9 + b.i)).map((x) => x.k);
57
57
  const counted = mine.filter((k) => k.status !== "Won't do"), done = counted.filter((k) => k.status === 'Done').length;
58
- if (!mine.length) return claude('Claude plans what finishes ' + st.name, { act: { kind: 'add', label: 'Add a task to ' + st.name, stage: st.key } });
58
+ if (!mine.length) return claude('PMOS plans what finishes ' + st.name, { act: { kind: 'add', label: 'Add a task to ' + st.name, stage: st.key } });
59
59
  const open = mine.find((k) => !CLOSED.has(k.status));
60
60
  const count = counted.length ? done + '/' + counted.length + ' tasks' : '';
61
61
  return open ? { ...taskLine(open.title), count } : moveLine(r, ctx, count);
@@ -69,16 +69,16 @@ export function nextOf(r, ctx = {}) {
69
69
  const open = tk.filter((k) => k.status !== 'Done');
70
70
  const pick = open.find((k) => k.blocked) || OPEN_TK.map((s) => open.find((k) => !k.blocked && k.status === s)).find(Boolean);
71
71
  const more = open.length > 1 ? ' · ' + (open.length - 1) + ' more' : '';
72
- if (pick) return claude((pick.blocked ? 'Claude chases ' : 'Claude follows ') + pick.key + more, { tone: pick.blocked ? 'red' : '', count, title: pick.key + ' · ' + pick.title + (pick.blocked ? ' · blocked' : '') });
72
+ if (pick) return claude((pick.blocked ? 'PMOS chases ' : 'PMOS follows ') + pick.key + more, { tone: pick.blocked ? 'red' : '', count, title: pick.key + ' · ' + pick.title + (pick.blocked ? ' · blocked' : '') });
73
73
  if (key === 'deliver') return yours('sign off the release?', { count });
74
74
  return moveLine(r, ctx, count);
75
75
  }
76
76
  const epic = (it.links && it.links.epic) || (r.epics || [])[0] || null;
77
- return epic ? claude('Claude reads Jira', { act: { kind: 'jira', label: 'Read Jira again for ' + epic } }) : claude('Claude finds the Jira epic', { act: { kind: 'epic', label: 'Link the Jira epic' } });
77
+ return epic ? claude('PMOS reads Jira', { act: { kind: 'jira', label: 'Read Jira again for ' + epic } }) : claude('PMOS finds the Jira epic', { act: { kind: 'epic', label: 'Link the Jira epic' } });
78
78
  }
79
79
  const past = r.end && /^\d{4}-\d{2}-\d{2}/.test(r.end) && String(r.end).slice(0, 10) < new Date().toISOString().slice(0, 10);
80
80
  const due = (key === 'monitor' || key === 'evaluate') && r.end ? (past ? 'was due ' : 'due ') + dm(r.end) : '';
81
- if (key === 'monitor') return claude('Claude reads the outcome', { when: due });
81
+ if (key === 'monitor') return claude('PMOS reads the outcome', { when: due });
82
82
  // the parts of the step: the trail's (the documents' headings, the tickets drafted), else what the model counts (Prioritize's anchor and rank)
83
83
  let parts = Array.isArray(it.parts) && it.parts.length ? it.parts : null;
84
84
  if (!parts && (key === 'plan' || key === 'prioritize')) parts = (t.segs || []).filter((s) => s.st === 'done' || s.st === 'to do').map((s) => ({ name: key === 'prioritize' && /^kr/i.test(s.name) ? 'KR or health budget' : s.name.toLowerCase(), done: s.st === 'done' }));
@@ -91,9 +91,9 @@ export function nextOf(r, ctx = {}) {
91
91
  const tickets = open.find((p) => /tickets/.test(p.name) && p.you);
92
92
  if (tickets) return yours(/pushed/.test(tickets.name) ? 'push the drafted tickets to Jira?' : 'send the drafted tickets to Jira?');
93
93
  if (open.some((p) => /^kr or health budget$/i.test(p.name))) return claude(ANCHOR);
94
- if (open[0] && /tickets/.test(open[0].name)) return claude('Claude drafts the tickets');
95
- if (key === 'evaluate') return claude('Claude writes the lessons', { when: due });
96
- return claude(CLAUDE[key] || 'Claude writes the experiment');
94
+ if (open[0] && /tickets/.test(open[0].name)) return claude('PMOS drafts the tickets');
95
+ if (key === 'evaluate') return claude('PMOS writes the lessons', { when: due });
96
+ return claude(CLAUDE[key] || 'PMOS writes the experiment');
97
97
  }
98
98
 
99
99
  const SPARK = 'M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z';
@@ -313,7 +313,7 @@ function openCharter(p, at, suggest) {
313
313
  rename.value = p.title;
314
314
  charterForm({ VW, pmPost, p, st, rename, title: titleOf(p), nameOf, at, suggest, reload: () => O.reload(), say: (m) => O.say(m),
315
315
  // the charter's Check now (canvas XmsgB): Claude reviews the milestones at the next tick; the line says it is checking until it ends
316
- checkNow: async () => { const r = await pmPost('/api/programs/review', { program: p.id }).catch(() => null); if (!r || !r.ok) { O.say((r && r.error) || 'Claude could not start the check. The server did not say why.'); return false; } O.reload(); return true; },
316
+ checkNow: async () => { const r = await pmPost('/api/programs/review', { program: p.id }).catch(() => null); if (!r || !r.ok) { O.say((r && r.error) || 'PMOS could not start the check. The server did not say why.'); return false; } O.reload(); return true; },
317
317
  review: () => (progOf(p.id) || p).review || null });
318
318
  }
319
319
 
@@ -325,7 +325,7 @@ const changesOf = (p, st) => (st.milestones.length ? MSG.openOf(p) : []);
325
325
  function summaryOf(p, st) {
326
326
  const N = needs(p, st).concat(changesOf(p, st)), n = unsorted(p, st), nx = st.next;
327
327
  const meta = [p.owner, st.span.label].filter(Boolean).join(' · ');
328
- const sortText = n ? n + ' ' + plural(n, 'task', 'tasks') + ' from before the split ' + (n === 1 ? 'has' : 'have') + ' no level yet. Claude suggests a home for each: the program, an initiative or an epic.' : '';
328
+ const sortText = n ? n + ' ' + plural(n, 'task', 'tasks') + ' from before the split ' + (n === 1 ? 'has' : 'have') + ' no level yet. PMOS suggests a home for each: the program, an initiative or an epic.' : '';
329
329
  const primary = n ? { label: 'Review the suggested homes', href: homeHref({ ws: p.home, ask: 'program:' + p.id, q: 'Suggest a home for each task of ' + p.title + ' that has no level yet' }) } : null;
330
330
  const next = nx ? 'Next: ' + nx.name + (nx.day ? ' · ' + nx.day : '') : '';
331
331
  // The Waits on you row already counts what waits on you (say it once), so the line is the next milestone while there is one.
@@ -365,7 +365,7 @@ function tasksTab(p, st, N, T) {
365
365
  }
366
366
  function reportsTab(d, x) {
367
367
  const R = d ? DB.reportsHtml(d, { open: x.open }) : '';
368
- if (!R) return `<section class="pv-card" aria-label="Reports"><div class="pv-ch"><h4>Reports</h4></div><p class="pv-none">${d ? 'Claude writes these for you. One shows here when it is due.' : 'The reports could not be read.'}</p></section>`;
368
+ if (!R) return `<section class="pv-card" aria-label="Reports"><div class="pv-ch"><h4>Reports</h4></div><p class="pv-none">${d ? 'PMOS writes these for you. One shows here when it is due.' : 'The reports could not be read.'}</p></section>`;
369
369
  return `<div class="db" data-level="program">${RO ? '' : DB.trustHtml(d)}${R}</div>`;
370
370
  }
371
371
  /** The program's one page. Each part draws only when a record holds something for it. */
@@ -390,7 +390,7 @@ function viewHtml(p) {
390
390
  { id: 'documents', label: 'Documents', n: D.length + 1, html: () => docsHtml(p, st) },
391
391
  ];
392
392
  // Home on a phone (O.talk gives a function): the program's own chat is not beside the panel, so the page ends with the way to it
393
- const talk = !RO && O && O.talk && O.talk() ? `<button type="button" class="hi-talk" data-pp="talk">Message Claude about ${esc(p.title)}</button>` : '';
393
+ const talk = !RO && O && O.talk && O.talk() ? `<button type="button" class="hi-talk" data-pp="talk">Message PMOS about ${esc(p.title)}</button>` : '';
394
394
  // after Turn into a program: the tasks from before the split that have no level yet, and the way to Claude's suggested homes (kept from the summary card)
395
395
  const s = RO ? null : summaryOf(p, st);
396
396
  const sort = s && s.primary ? `<section class="pv-card" aria-label="Tasks with no level"><p class="czs-p">${esc(s.text)}</p><a class="czs-pri" href="${esc(s.primary.href)}">${esc(s.primary.label)}</a></section>` : '';
@@ -542,7 +542,7 @@ async function suggestPress(b) {
542
542
  // one at a time: each keep writes the whole charter, so the next one reads the charter the last one wrote
543
543
  for (const k of keys) { const r = await MSG.answer(pmPost, progOf(p.id) || p, k, how); if (!r.ok) { err = r.error; break; } done++; if (keys.length > 1) await O.reload(); }
544
544
  if (err) O.say(err);
545
- else O.say(how === 'keep' ? (done === 1 ? 'Kept. The charter has it.' : done + ' kept. The charter has them.') : (done === 1 ? 'Dropped. Claude will not suggest it again from this source.' : done + ' dropped.'));
545
+ else O.say(how === 'keep' ? (done === 1 ? 'Kept. The charter has it.' : done + ' kept. The charter has them.') : (done === 1 ? 'Dropped. PMOS will not suggest it again from this source.' : done + ' dropped.'));
546
546
  await O.reload(); draw();
547
547
  }
548
548
  async function submit(e) {
@@ -11,6 +11,7 @@
11
11
  import { nameHtml } from './split-merge.js'; // Claude suggests a split or a merge: the purple dot after the name (batch 11 item 14)
12
12
  import { esc } from './premium-shell.js';
13
13
  import * as WF from './bd-wf.js';
14
+ import * as GL from './bd-goal.js'; // By goal in every view (batch 29 item 4): a goal's head over its rows
14
15
  import { nextHtml } from './bd-next.js';
15
16
  import { stageName, stageChip } from './stage-chip.js'; // W1: the one stage
16
17
  import { provenStatus, NO_SIGNAL } from './status-proof.js'; // T3: a status renders only with its source and read time
@@ -92,7 +93,9 @@ function listRow(r, pg) {
92
93
  }
93
94
  export function listHtml(L, filtered) {
94
95
  const S = M().steps || [];
95
- const pg = !!(A.groups && A.groups(L)), C = pg ? PCOLS : COLS;
96
+ // the Product and Program columns: when a program holds a row here. By goal (batch 29 item 4) puts each goal's rows under its head row
97
+ const G = A.groups ? A.groups(L) : null, GG = G && G[0] && G[0].kind === 'goal' ? G : null;
98
+ const pg = !!(GG ? A.progGroups && A.progGroups(L) : G), C = pg ? PCOLS : COLS;
96
99
  if (!pg && (sortBy === 'product' || sortBy === 'program')) sortBy = 'need';
97
100
  const by = sortBy || (pg && M().board.all ? 'product' : 'need');
98
101
  const all = L.slice().sort(SORTS[by] || SORTS.need);
@@ -103,7 +106,9 @@ export function listHtml(L, filtered) {
103
106
  const fold = meTotal ? (meOpen
104
107
  ? me.map((r) => listRow(r, pg)).join('') + `<div class="bd-lt foot" role="row"><span class="bd-amut">Monitor and Evaluate · ${meTotal}${meTotal > me.length ? ' · ' + (meTotal - me.length) + ' more are not loaded' : ''}</span><button type="button" class="bd-btn sm" data-me aria-expanded="true">Fold them</button></div>`
105
108
  : `<div class="bd-lt foot" role="row"><span class="bd-amut">${meTotal} more in Monitor and Evaluate · sorted below</span><button type="button" class="bd-btn sm" data-me aria-expanded="false">Show them</button></div>`) : '';
106
- return `<div class="bd-ltw${pg ? ' pg' : ''}" role="table" aria-label="Initiatives">${head}${top.map((r) => listRow(r, pg)).join('')}${fold}</div><p class="bd-foot">${by === 'product' ? 'Sorted by product. Press Program to sort by program instead; a row with no program leaves the cell empty.' : 'Press a column title to sort. Press a row to open its panel, the same panel as the stage track.'}</p>`;
109
+ const body = GG ? GG.map((g) => { const rs = top.filter((r) => g.rows.includes(r)), open = !A.folded(g.key); return rs.length ? GL.listHeadHtml(g, open) + (open ? rs.map((r) => listRow(r, pg)).join('') : '') : ''; }).join('')
110
+ : top.map((r) => listRow(r, pg)).join('');
111
+ return `<div class="bd-ltw${pg ? ' pg' : ''}${GG ? ' gg' : ''}" role="table" aria-label="Initiatives">${head}${body}${fold}</div><p class="bd-foot">${by === 'product' ? 'Sorted by product. Press Program to sort by program instead; a row with no program leaves the cell empty.' : 'Press a column title to sort. Press a row to open its panel, the same panel as the stage track.'}</p>`;
107
112
  }
108
113
 
109
114
  /* ── By stage (BdByStage, PgKanban; WfABoard, WfABoardOne, WfAPhone): programs as swimlanes, then the product; any column folds to a strip ──── */
@@ -170,7 +175,7 @@ const msI = (ms) => (ms ? '<i class="cz-ms" aria-hidden="true"></i>' : '');
170
175
  function phoneStages(L, C) {
171
176
  const { cur } = WFS();
172
177
  const G = A.groups ? A.groups(L) : null;
173
- const lanes = G ? G.map((g) => ({ g, label: g.kind === 'program' ? `<p class="bd-sl pg">${A.progTile('bd-pti s')}${esc(g.program.title)}</p>` : `<p class="bd-sl">${A.subTile(g.name)}${esc(g.name)}</p>`, rows: g.rows })) : [{ g: null, label: '', rows: L }];
178
+ const lanes = G ? G.map((g) => ({ g, label: g.kind === 'program' ? `<p class="bd-sl pg">${A.progTile('bd-pti s')}${esc(g.program.title)}</p>` : g.kind === 'goal' ? GL.labelHtml(g) : `<p class="bd-sl">${A.subTile(g.name)}${esc(g.name)}</p>`, rows: g.rows })) : [{ g: null, label: '', rows: L }];
174
179
  const empty = [];
175
180
  const secs = C.filter((c) => !c.end).map((c) => {
176
181
  const at = (rows) => rows.filter(c.has).sort((a, b) => needOf(a) - needOf(b));
@@ -225,7 +230,7 @@ export function stagesHtml(L, o = {}) {
225
230
  let body = '';
226
231
  lanes.forEach((ln, li) => {
227
232
  const g = ln.g, open = !g || !A.folded(g.key);
228
- if (g) { body += `<div class="bd-lh ${g.kind === 'program' ? 'pg' : 'pd'}" style="grid-row:${row}">${A.laneHead(g)}</div>`; row++; }
233
+ if (g) { body += `<div class="bd-lh ${g.kind === 'program' ? 'pg' : g.kind === 'goal' ? 'pd gl' : 'pd'}" style="grid-row:${row}">${A.laneHead(g)}</div>`; row++; }
229
234
  if (!open) return;
230
235
  ln.subs.forEach((sub, si) => {
231
236
  if (sub.sub) { body += `<div class="bd-ls" style="grid-row:${row}">${A.subTile(sub.name)}${esc(sub.name)}</div>`; row++; }
@@ -36,7 +36,7 @@ export function askCardHtml(ask, { live = false, picked = {}, at = '' } = {}) {
36
36
  const small = rec ? `<small>recommended${o.detail ? ' · ' + esc(o.detail) : ''}</small>` : '';
37
37
  return `<button type="button" class="chip chip2${rec ? ' rec' : ''}${on ? ' on' : ''}" ${act}${o.detail ? ` title="${esc(o.detail)}"` : ''}${live ? '' : ' disabled'}>${esc(bare(o))}${small}</button>`;
38
38
  }).join('');
39
- return `<div class="askq"><p class="k">${esc(q.header || 'Claude asks')}${q.multi ? ' · pick any' : ''}</p><b class="q">${esc(q.question)}</b><div class="chips2">${opts}</div></div>`;
39
+ return `<div class="askq"><p class="k">${esc(q.header || 'PMOS asks')}${q.multi ? ' · pick any' : ''}</p><b class="q">${esc(q.question)}</b><div class="chips2">${opts}</div></div>`;
40
40
  }).join('');
41
41
  const send = !one && live ? `<div class="chatopts"><button type="button" class="cta" data-ask-send="${esc(at)}"${answerText(qs, picked) ? '' : ' disabled'}>Send answers</button></div>` : '';
42
42
  return `${body}${send}`;
@@ -58,10 +58,10 @@ function fromText(text, projects) {
58
58
  const RANK = { wrote: 0, named: 1, read: 2 };
59
59
  /** The title and the small line a chip shows. */
60
60
  export function labelOf(it) {
61
- if (it.kind === 'file') return { title: clip(base(it.path), 48), sub: it.how === 'wrote' ? 'Claude wrote this' : it.how === 'named' ? 'File' : 'Claude read this' };
61
+ if (it.kind === 'file') return { title: clip(base(it.path), 48), sub: it.how === 'wrote' ? 'PMOS wrote this' : it.how === 'named' ? 'File' : 'PMOS read this' };
62
62
  if (it.kind === 'jira') return { title: it.key, sub: 'Jira ticket' };
63
- if (it.kind === 'slack') return { title: it.channel ? 'Slack channel' : 'Slack message', sub: it.how === 'wrote' ? 'Claude posted here' : 'Slack' };
64
- return { title: it.web === 'artifact' ? 'Claude artifact' : it.web === 'google' ? 'Google file' : 'Confluence page', sub: it.how === 'named' ? 'Link' : 'Claude read this' };
63
+ if (it.kind === 'slack') return { title: it.channel ? 'Slack channel' : 'Slack message', sub: it.how === 'wrote' ? 'PMOS posted here' : 'Slack' };
64
+ return { title: it.web === 'artifact' ? 'Claude artifact' : it.web === 'google' ? 'Google file' : 'Confluence page', sub: it.how === 'named' ? 'Link' : 'PMOS read this' };
65
65
  }
66
66
  /**
67
67
  * What one turn worked with, the main item first. calls: [{ tool, target }] in order; text: Claude's words in the turn; projects: Jira project
@@ -1565,3 +1565,18 @@ span.tg-ng { cursor: default; }
1565
1565
  #moreMenu #bdPublish .bpn[hidden] { display: none; }
1566
1566
  /* a row the Board takes out of the shared ⋯ (UI grill U2) stays out: the shell draws its rows as flex */
1567
1567
  #moreMenu [hidden] { display: none !important; }
1568
+
1569
+ /* batch 29 item 4: By goal in every view. A goal's head on By stage (a swimlane), the Timeline (a name cell) and the List (a head row).
1570
+ * A goal opens nothing here, so its name is plain text and the head folds */
1571
+ .bd-gln { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
1572
+ .bd-gln .tt, .bd-glb .tt { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; text-align: left; }
1573
+ .bd-gln .tt b, .bd-glb .tt b { font-size: var(--fs-row); font-weight: var(--fw-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cz-ink); line-height: var(--lh-row); }
1574
+ .bd-gln .tt .m, .bd-glb .tt .m { font-size: var(--fs-badge); color: var(--cz-ink2); font-weight: var(--fw-strong); line-height: var(--lh-badge); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1575
+ .over > .bd-gln .tt .m, .bd-gln.over .tt .m { color: var(--cz-late); }
1576
+ .bd-lh.gl .bd-glt { font-size: var(--fs-meta); color: var(--cz-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: var(--lh-meta); }
1577
+ .bd-glb .bd-prdf { justify-content: flex-start; min-width: 0; }
1578
+ .bd-glb .bd-sp { flex: 1; }
1579
+ .bd-glb .bd-prdf > svg { margin-left: 6px; }
1580
+ .bd-lt.gh { grid-template-columns: minmax(0, 1fr) auto; min-height: 50px; background: var(--bd-row); }
1581
+ .bd-ltw.pg .bd-lt.gh { grid-template-columns: minmax(0, 1fr) auto; }
1582
+ .bd-gln .bd-pti, .bd-glb .bd-pti { background: var(--bd-progbg); }
@@ -144,7 +144,7 @@ export function connectorRows(sources, health, now = Date.now()) {
144
144
  const behind = (s.state === 'stale' || s.state === 'never') && s.id !== 'repository' && !mend;
145
145
  out.push({ id: s.id, name, trouble: 0, why: '', when, act: behind ? read : null });
146
146
  }
147
- for (const i of alone) out.push({ id: 'issue:' + i.key, name: i.name || 'Background work', trouble: 3, why: i.why, when: '', act: i.key === 'signedout' ? { kind: 'sec', label: 'Open Settings › Claude', sec: 'claude' } : null });
147
+ for (const i of alone) out.push({ id: 'issue:' + i.key, name: i.name || 'Background work', trouble: 3, why: i.why, when: '', act: i.key === 'signedout' ? { kind: 'sec', label: 'Open Settings › PMOS', sec: 'claude' } : null });
148
148
  return out.map((r, k) => ({ r, k })).sort((a, b) => (a.r.trouble || 9) - (b.r.trouble || 9) || a.k - b.k).map((x) => x.r);
149
149
  }
150
150
 
@@ -152,7 +152,7 @@ body.cz-home { min-height: 100vh; overflow: hidden; }
152
152
  .hm-av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: var(--fw-strong); font-size: var(--fs-badge); line-height: 1; background: var(--cz-bluebg); color: var(--cz-blueink); font-family: var(--cz-sans); }
153
153
  .hm-av.s20 { width: 20px; height: 20px; font-size: var(--fs-meta); line-height: var(--lh-meta); } .hm-av.s24 { width: 24px; height: 24px; font-size: var(--fs-meta); line-height: var(--lh-meta); }
154
154
  .hm-av.s28 { width: 28px; height: 28px; font-size: var(--fs-meta); line-height: var(--lh-meta); } .hm-av.s30 { width: 30px; height: 30px; }
155
- .hm-av.t-C { background: var(--cz-c-2f5fb3); color: var(--cz-c-ffffff); }
155
+ .hm-av.t-C, .hm-av.t-P { background: var(--cz-c-2f5fb3); color: var(--cz-c-ffffff); }
156
156
  .hm-av.t-St { background: var(--cz-c-eef1f8); color: var(--cz-c-34508a); } .hm-av.t-Re { background: var(--cz-c-faf0e4); color: var(--cz-c-8a5212); }
157
157
  .hm-av.t-Sp { background: var(--cz-c-e9f4ee); color: var(--cz-c-2e6e48); } .hm-av.t-Ev { background: var(--cz-c-faecef); color: var(--cz-c-9a3b55); }
158
158
  .hm-av.t-De { background: var(--cz-c-f1ecf8); color: var(--cz-c-6b4fa3); } .hm-av.t-Dl { background: var(--cz-c-f1ecf8); color: var(--cz-c-6b4fa3); }
@@ -25,7 +25,7 @@ function looseHtml(p) {
25
25
  return `<div class="lab-card lab-lo" data-lab-id="${id}"><div class="lab-bar"><span class="lab-sp" aria-hidden="true">✦</span><b>${esc(p.title)}</b><span class="lab-acts">`
26
26
  + ib(`data-lab-why="${id}" aria-expanded="${why}"`, 'Drop it', LC.I.x) + ib(`data-lab-keep="${id}"`, p.type === 'start' ? 'Start it' : 'Keep it', LC.I.check, 'ok') + '</span></div>'
27
27
  + `<p class="lab-tx">${esc(p.why)}${ask}</p><small class="lab-ok">Read: ${(p.sources || []).length} ${(p.sources || []).length === 1 ? 'page' : 'pages'}${p.data && p.data.refreshed ? ' · ' + esc(p.data.refreshed) : ''}${src ? ' · ' + src : ''}</small>`
28
- + (why ? `<div class="lab-why"><label class="vh" for="labLw-${id}">Why drop it? Claude learns from it</label><input id="labLw-${id}" data-lab-reason="${id}" maxlength="200" placeholder="Why not? Claude learns from it (you can leave it empty)">${ib(`data-lab-drop="${id}"`, 'Drop it now', LC.I.x, 'solid')}</div>` : '')
28
+ + (why ? `<div class="lab-why"><label class="vh" for="labLw-${id}">Why drop it? PMOS learns from it</label><input id="labLw-${id}" data-lab-reason="${id}" maxlength="200" placeholder="Why not? PMOS learns from it (you can leave it empty)">${ib(`data-lab-drop="${id}"`, 'Drop it now', LC.I.x, 'solid')}</div>` : '')
29
29
  + '</div>';
30
30
  }
31
31
  function pillOf(r) {
@@ -51,9 +51,9 @@ export function recRow(r, now = Date.now()) {
51
51
  }
52
52
  function html(L) {
53
53
  const k = L.kept;
54
- const keptCard = k ? `<div class="lab-card"><small>You kept</small><b class="lab-big">${k.kept} of ${k.filed}</b><small>${[k.proto[1] ? 'prototypes ' + k.proto[0] + ' of ' + k.proto[1] : '', k.scan[1] ? 'scans ' + k.scan[0] + ' of ' + k.scan[1] : ''].filter(Boolean).join(' · ')}. Claude learns from each reason you give.</small></div>` : '';
55
- const next = L.next.length ? `<div class="lab-card"><b>Next time you step away</b>${L.next.map((x) => `<div class="lab-row"><span class="lab-dot open"></span><span class="w">${esc(x.title)}${x.why ? `<small>${esc(x.why)}</small>` : ''}</span></div>`).join('')}<small>Claude picks these by itself. To skip one, say so in chat.</small></div>` : '';
56
- const rec = L.record.length ? `<div class="lab-card lab-rec"><div class="lab-bar"><b>What Claude did in the background</b><small>this week, every job</small></div>${L.record.map((r) => recRow(r)).join('')}${L.more ? `<small>and ${L.more} more</small>` : ''}</div>` : '';
54
+ const keptCard = k ? `<div class="lab-card"><small>You kept</small><b class="lab-big">${k.kept} of ${k.filed}</b><small>${[k.proto[1] ? 'prototypes ' + k.proto[0] + ' of ' + k.proto[1] : '', k.scan[1] ? 'scans ' + k.scan[0] + ' of ' + k.scan[1] : ''].filter(Boolean).join(' · ')}. PMOS learns from each reason you give.</small></div>` : '';
55
+ const next = L.next.length ? `<div class="lab-card"><b>Next time you step away</b>${L.next.map((x) => `<div class="lab-row"><span class="lab-dot open"></span><span class="w">${esc(x.title)}${x.why ? `<small>${esc(x.why)}</small>` : ''}</span></div>`).join('')}<small>PMOS picks these by itself. To skip one, say so in chat.</small></div>` : '';
56
+ const rec = L.record.length ? `<div class="lab-card lab-rec"><div class="lab-bar"><b>What PMOS did in the background</b><small>this week, every job</small></div>${L.record.map((r) => recRow(r)).join('')}${L.more ? `<small>and ${L.more} more</small>` : ''}</div>` : '';
57
57
  return `<h2 class="ins-h3" id="hLab">Lab</h2>`
58
58
  + (L.say ? `<p class="lab-say"><span aria-hidden="true">✦</span> ${esc(L.say)}</p>` : '')
59
59
  + L.loose.map(looseHtml).join('')
@@ -62,7 +62,7 @@ export function cardHtml(p, { why = false } = {}) {
62
62
  head = p.title || 'Attach as evidence';
63
63
  body = `<p class="lab-tx">${esc(p.why)}</p><small class="lab-ok">${srcLine(p)}</small>`;
64
64
  }
65
- const ask = why ? `<div class="lab-why"><label class="vh" for="labWhy-${id}">Why drop it? Claude learns from it</label><input id="labWhy-${id}" data-lab-reason="${id}" maxlength="200" placeholder="Why not? Claude learns from it (you can leave it empty)">${ib(`data-lab-drop="${id}"`, 'Drop it now', I.x, 'solid')}</div>` : '';
65
+ const ask = why ? `<div class="lab-why"><label class="vh" for="labWhy-${id}">Why drop it? PMOS learns from it</label><input id="labWhy-${id}" data-lab-reason="${id}" maxlength="200" placeholder="Why not? PMOS learns from it (you can leave it empty)">${ib(`data-lab-drop="${id}"`, 'Drop it now', I.x, 'solid')}</div>` : '';
66
66
  const icon = p.group === 'prototyped' ? I.proto : p.group === 'improved' ? I.round : I.scan;
67
67
  return `<div class="pp-p lab" data-pp="${id}"><div class="pp-ph1"><span class="pp-ic gr">${SVG(icon, 16)}</span><span class="w"><b>${esc(head)}</b>${body}${ask}</span><span class="pp-gacts">${acts}</span></div></div>`;
68
68
  }
@@ -183,7 +183,7 @@ function openOverlap(it, o = {}) {
183
183
  html: `<ul class="nv-parts">${O.items.map((x) => `<li>${esc(x)}</li>`).join('')}</ul>` }], { key: 'news-overlap' }) : '';
184
184
  body.innerHTML = `<div class="nv">${czSummary({ line: parts, tone: parts ? 'you' : '', text, meta: sure })}${card(one)}${card(two)}${opts}${go}${items}</div>`;
185
185
  };
186
- vwOpen({ id, kind: 'Claude proposes', title: 'Possible overlap', icon: SPARK, sub: ['Claude noticed', when].filter(Boolean).join(' · '), fresh: !!o.fresh,
186
+ vwOpen({ id, kind: 'PMOS proposes', title: 'Possible overlap', icon: SPARK, sub: ['PMOS noticed', when].filter(Boolean).join(' · '), fresh: !!o.fresh,
187
187
  more: [{ label: 'Open ' + nameOf('a'), on: () => goIni(it.a.id) }, { label: 'Open ' + nameOf('b'), on: () => goIni(it.b.id) }],
188
188
  onClose: () => { if (o.fresh) seen([it.id]); },
189
189
  render: (body) => {
@@ -250,7 +250,7 @@ function openBridge(it, o = {}) {
250
250
  } });
251
251
  return true;
252
252
  };
253
- vwOpen({ id, kind: 'Claude proposes', title: it.title || 'Move to the new workflow', icon: SPARK, sub: ['Claude noticed', it.at ? ago(new Date(it.at).toISOString()) : ''].filter(Boolean).join(' · '), fresh: !!o.fresh,
253
+ vwOpen({ id, kind: 'PMOS proposes', title: it.title || 'Move to the new workflow', icon: SPARK, sub: ['PMOS noticed', it.at ? ago(new Date(it.at).toISOString()) : ''].filter(Boolean).join(' · '), fresh: !!o.fresh,
254
254
  more: [{ label: 'Change the bridge in Settings', on: () => import('./cozy-settings.js').then((M) => M.openSettings('workflows', { wf: it.wf.id })) }], // Settings › Workspaces › Workflows, in place (UI grill U1)
255
255
  render: (body) => {
256
256
  body.classList.add('ev-card-b');