create-pmos 0.396.0 → 0.397.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 (98) hide show
  1. package/package.json +13 -13
  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/scripts/nine-stages.js +49 -20
  6. package/payload/state/discoveries.md +1 -1
  7. package/workspace/briefing-premium-adddoc-test.js +20 -40
  8. package/workspace/briefing-premium-board-test.js +145 -107
  9. package/workspace/briefing-premium-calendar-2-test.js +5 -2
  10. package/workspace/briefing-premium-calendar-3-test.js +13 -8
  11. package/workspace/briefing-premium-calendar-test.js +16 -5
  12. package/workspace/briefing-premium-initiative-test.js +50 -41
  13. package/workspace/briefing-premium-insights-test.js +104 -85
  14. package/workspace/briefing-premium-metrics-test.js +11 -32
  15. package/workspace/briefing-premium-sources-test.js +42 -21
  16. package/workspace/briefing-premium-test.js +112 -98
  17. package/workspace/briefing-premium-work-test.js +78 -64
  18. package/workspace/changelog.json +12 -0
  19. package/workspace/fixtures/board-premium-facts.js +2 -1
  20. package/workspace/fixtures/board-premium-jira.js +28 -0
  21. package/workspace/fixtures/initiative-premium-facts.js +2 -1
  22. package/workspace/fixtures/initiatives-api/list.json +30 -42
  23. package/workspace/fixtures/initiatives-api/roadmap.json +40 -56
  24. package/workspace/fixtures/initiatives-api/sheet.json +10 -14
  25. package/workspace/fixtures/insights-premium-facts.js +11 -2
  26. package/workspace/guide/index.md +1 -0
  27. package/workspace/guide/lifecycle.md +51 -0
  28. package/workspace/home-shot.js +38 -0
  29. package/workspace/lib/board-premium.js +92 -1
  30. package/workspace/lib/engine/boards.js +15 -14
  31. package/workspace/lib/engine/nine-stages.js +49 -20
  32. package/workspace/lib/engine/signals/detectors.js +13 -11
  33. package/workspace/lib/insights-premium.js +78 -1
  34. package/workspace/lib/routes-board-premium.js +3 -2
  35. package/workspace/lib/routes-initiatives.js +1 -1
  36. package/workspace/lib/routes-insights-premium.js +8 -1
  37. package/workspace/lib/vendor/scripts/nine-stages.js +49 -20
  38. package/workspace/package-lock.json +2 -2
  39. package/workspace/package.json +1 -1
  40. package/workspace/premium-agreed-viewer-shots.js +76 -0
  41. package/workspace/premium-board-actions-test.js +2 -0
  42. package/workspace/premium-chat-chart-tab-test.js +6 -5
  43. package/workspace/premium-chat-context-test.js +8 -6
  44. package/workspace/premium-chat-goal-view-test.js +9 -7
  45. package/workspace/premium-chat-notes-test.js +3 -2
  46. package/workspace/premium-chat-report-tab-test.js +8 -2
  47. package/workspace/premium-chat-term-test.js +3 -1
  48. package/workspace/premium-chat-viewer-test.js +23 -17
  49. package/workspace/premium-core-doc-issue-test.js +2 -0
  50. package/workspace/premium-html-viewer-test.js +4 -2
  51. package/workspace/premium-phone-card-test.js +1 -0
  52. package/workspace/premium-phone-room-test.js +16 -11
  53. package/workspace/premium-report-read-test.js +1 -1
  54. package/workspace/premium-vw-backlog-test.js +2 -0
  55. package/workspace/premium-vw-cal-test.js +9 -4
  56. package/workspace/premium-vw-doc-test.js +1 -1
  57. package/workspace/premium-vw-item-test.js +1 -0
  58. package/workspace/premium-vw-jira-test.js +4 -1
  59. package/workspace/premium-vw-notes-test.js +2 -1
  60. package/workspace/premium-vw-rec-test.js +3 -2
  61. package/workspace/premium-vw-slides-test.js +2 -2
  62. package/workspace/premium-work-depth-test.js +7 -3
  63. package/workspace/public/pm/bd-span.js +120 -0
  64. package/workspace/public/pm/bd-stages.js +33 -0
  65. package/workspace/public/pm/cozy-board.css +373 -0
  66. package/workspace/public/pm/cozy-home.css +152 -0
  67. package/workspace/public/pm/cozy-home.js +170 -0
  68. package/workspace/public/pm/cozy-initiative.css +138 -0
  69. package/workspace/public/pm/cozy-insights.css +292 -0
  70. package/workspace/public/pm/cozy-nav.js +54 -0
  71. package/workspace/public/pm/cozy-viewer.css +143 -0
  72. package/workspace/public/pm/cozy.css +172 -0
  73. package/workspace/public/pm/lifecycle-lens-model.js +45 -27
  74. package/workspace/public/pm/lifecycle-lens.js +22 -11
  75. package/workspace/public/pm/premium-board.js +329 -67
  76. package/workspace/public/pm/premium-brief.js +1 -1
  77. package/workspace/public/pm/premium-chat.js +17 -10
  78. package/workspace/public/pm/premium-initiative-head.js +138 -0
  79. package/workspace/public/pm/premium-initiative.js +28 -4
  80. package/workspace/public/pm/premium-insights.js +530 -244
  81. package/workspace/public/pm/premium-shell.js +40 -10
  82. package/workspace/public/pm/premium-viewer.js +5 -0
  83. package/workspace/public/pm/premium-vw-jira-model.js +22 -5
  84. package/workspace/public/pm/premium-vw-jira.css +11 -0
  85. package/workspace/public/pm/premium-vw-jira.js +11 -4
  86. package/workspace/public/pm/premium-vw-rec.js +5 -2
  87. package/workspace/public/pm/premium-work.js +18 -8
  88. package/workspace/public/pm/premium.js +19 -6
  89. package/workspace/public/premium-board.html +82 -47
  90. package/workspace/public/premium-chat.html +7 -33
  91. package/workspace/public/premium-initiative.html +15 -8
  92. package/workspace/public/premium-insights.html +82 -43
  93. package/workspace/public/premium-work.html +6 -72
  94. package/workspace/public/premium.html +61 -15
  95. package/workspace/public/vendor/nunito-var.woff2 +0 -0
  96. package/workspace/server.js +7 -0
  97. package/workspace/test-lists/premium-agreed-viewer.json +9 -0
  98. package/workspace/third-party/README.md +1 -0
@@ -4,19 +4,16 @@
4
4
  * The real server with one product repository and a made-up morning brief written to <state>/briefs/<today>.json. Nothing here touches the PM's real briefs.
5
5
  * S1/S8 no brief for today: the header says so S2/S5 the rows, each tagged Across products (the brief names no included initiative)
6
6
  * S3 the dialog opens an https link and records nothing S7 the digests in Today S9 the writes refuse a source key; the agent answers
7
- * S11 the source row and the digest look like the mockup's own row and Today item at 1280 and 390 px, light and dark; no sideways scroll
7
+ * S11 the source row and the digest are drawn in the Agreed design's tokens at 1280 and 390 px, light and dark; no sideways scroll
8
8
  * Every wait polls the page; no fixed sleep stands in for a state. */
9
9
  const fs = require('fs');
10
10
  const os = require('os');
11
11
  const path = require('path');
12
12
  const { spawn, spawnSync } = require('child_process');
13
13
  const { findBrowser } = require('./lib/find-browser');
14
- const CT = require('./lib/premium-console-type'); // the mockup is read with the console's type (PM, 2026-10-19), as premium.css is
15
- const CT_VENDOR = 'file://' + path.join(__dirname, 'public', 'vendor') + '/';
16
14
  const T = require('./test-run').configure({ name: 'briefing-premium-sources' });
17
15
 
18
16
  const BASE = T.BASE;
19
- const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'briefing-artifact.html');
20
17
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
21
18
  const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { let v = null; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
22
19
  const results = [];
@@ -157,33 +154,57 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
157
154
  ok('S9 a message about a source row starts a Claude Code session', r3.status === 200 && r3.body.ok && r3.body.started === true, JSON.stringify(r3));
158
155
  }
159
156
 
160
- /* S11 fidelity: the source row against the mockup's second row, the digest against the mockup's Today item */
161
- if (!fs.existsSync(MOCKUP)) ok('S11 the mockup is in the repository', false, MOCKUP);
162
- else {
157
+ /* S11 fidelity: the source row and the digest are drawn in the Agreed design's own type and colours.
158
+ * Re-pointed for premium-agreed-design: the reference was the old mockup (prototype/premium-ux-concept/briefing-artifact.html: Space Grotesk,
159
+ * ember, a numbered rank). The Agreed design replaced that look on purpose, so each property is now pinned to the cozy token the design names
160
+ * (cozy.css, cozy-home.css), resolved in the page itself for the theme under test; the row and the digest still fill their column, and still
161
+ * nothing scrolls sideways. A source row that drifted off the design's tokens fails here as it failed against the mockup. */
162
+ {
163
163
  const PAIRS = [['row', '#rank .rr:nth-child(2)'], ['number', '#rank .rr:nth-child(2) .rn'], ['title', '#rank .rr:nth-child(2) .rt'], ['subject', '#rank .rr:nth-child(2) .rs'], ['event', '#tl .ev:not(:first-of-type)'], ['eventTime', '#tl .ev:not(:first-of-type) time'], ['eventTitle', '#tl .ev:not(:first-of-type) b']];
164
- const PROPS = ['fontSize', 'fontWeight', 'fontFamily', 'color', 'backgroundColor', 'borderRadius', 'paddingTop', 'paddingLeft', 'letterSpacing', 'lineHeight', 'boxShadow', 'borderTopColor'];
165
- const grab = (pg, sel) => pg.evaluate(([pairs, props]) => { const o = {}; for (const [n, s] of pairs) { const e = /^#tl/.test(s) && window.__ev ? window.__ev(s) : document.querySelector(s); if (!e) { o[n] = null; continue; } const cs = getComputedStyle(e), r = e.getBoundingClientRect(), v = { left: Math.round(r.left), width: Math.round(r.width) }; props.forEach((k) => { v[k] = cs[k]; }); o[n] = v; } return o; }, [sel, PROPS]);
164
+ const SANS = 'var(--cz-sans)';
165
+ /* The design's values, as the tokens name them (a value that starts var( is resolved in the page; anything else is literal) */
166
+ const WANT = {
167
+ row: { fontFamily: SANS, color: 'var(--cz-ink)', backgroundColor: 'transparent' },
168
+ number: { backgroundColor: 'var(--cz-blue)', borderRadius: '50%', width: '8px', height: '8px' }, // the rank is a blue dot, not a number
169
+ title: { fontFamily: SANS, fontSize: '14px', fontWeight: '700', color: 'var(--cz-ink)' },
170
+ subject: { fontFamily: SANS, fontSize: '12px', fontWeight: '500', color: 'var(--cz-blueink)' },
171
+ event: { fontFamily: SANS, color: 'var(--cz-ink)', borderTopColor: 'var(--hair)' },
172
+ eventTime: { color: 'var(--ink-2)' },
173
+ eventTitle: { fontFamily: SANS, color: 'var(--cz-ink)' },
174
+ };
175
+ const grab = (pg) => pg.evaluate(([pairs, want]) => {
176
+ const o = {};
177
+ const probe = document.createElement('div'); probe.style.position = 'absolute'; probe.style.visibility = 'hidden'; document.body.appendChild(probe);
178
+ const resolve = (k, v) => { if (!/^var\(/.test(v) && v !== 'transparent') return v; probe.removeAttribute('style'); probe.style.position = 'absolute'; probe.style.visibility = 'hidden'; probe.style.setProperty(k.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()), v); return getComputedStyle(probe)[k]; };
179
+ for (const [n, s] of pairs) {
180
+ const e = /^#tl/.test(s) && window.__ev ? window.__ev(s) : document.querySelector(s);
181
+ if (!e) { o[n] = null; continue; }
182
+ const cs = getComputedStyle(e), v = {};
183
+ for (const [k, w] of Object.entries(want[n])) v[k] = [resolve(k, w), cs[k]];
184
+ o[n] = v;
185
+ }
186
+ probe.remove();
187
+ const box = (s) => { const e = document.querySelector(s); return e ? Math.round(e.getBoundingClientRect().width) : null; };
188
+ const ev = window.__ev && window.__ev('#tl .ev');
189
+ o.fit = { row: [box('#rank'), box('#rank .rr:nth-child(2)')], event: [ev && ev.parentElement ? Math.round(ev.parentElement.getBoundingClientRect().width) : null, ev ? Math.round(ev.getBoundingClientRect().width) : null] };
190
+ return o;
191
+ }, [PAIRS, WANT]);
166
192
  for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
167
- const m = await (await browser.newContext({ viewport: { width: w, height: h } })).newPage();
168
- await m.goto('file://' + MOCKUP); await CT.applyToPage(m, CT_VENDOR);
169
- await until(() => m.evaluate(() => document.querySelectorAll('#rank .rr').length > 1 && document.querySelectorAll('#tl .ev').length > 0));
170
- await m.evaluate((t) => { document.documentElement.dataset.theme = t; }, th);
171
193
  const R = await open({ w, h, theme: th });
172
194
  if (w === 390) { await R.page.click('#todayCard .folds').catch(() => {}); await R.page.evaluate(() => scrollTo(0, 0)); } // the Calendar card starts hidden on a phone (premium-calendar-card); measure it open
173
195
  await R.page.evaluate(() => { window.__ev = (s) => { const d = document.querySelector('#tl .ev.src-digest'); return !d ? null : / time$/.test(s) ? d.querySelector('time') : / b$/.test(s) ? d.querySelector('b') : d; }; });
174
196
  await sleep(500);
175
- const a = await grab(m, PAIRS), c = await grab(R.page, PAIRS), diffs = [];
197
+ const c = await grab(R.page, PAIRS), diffs = [];
176
198
  for (const [n] of PAIRS) {
177
- if (!a[n] || !c[n]) { diffs.push(n + ' missing'); continue; }
178
- for (const k of Object.keys(a[n])) {
179
- if (k === 'left' || k === 'width') { if (['row', 'number', 'title', 'subject', 'event', 'eventTime', 'eventTitle'].includes(n) && (k === 'left' || n !== 'row' && n !== 'event' && n !== 'eventTime')) continue; }
180
- if ((k === 'left' || k === 'width') ? Math.abs(a[n][k] - c[n][k]) > 2 : a[n][k] !== c[n][k]) diffs.push(`${n}.${k} ${a[n][k]} | ${c[n][k]}`);
181
- }
199
+ if (!c[n]) { diffs.push(n + ' missing'); continue; }
200
+ for (const [k, [want, got]] of Object.entries(c[n])) if (want !== got) diffs.push(`${n}.${k} ${want} | ${got}`);
182
201
  }
183
- ok(`S11 the source row and the digest look like the mockup's at ${w} px, ${th}`, diffs.length === 0, diffs.join(' ; '));
202
+ // the row fills its list; the digest fills its column plus the hover bleed premium.css gives every Today item (margin 0 -10px, width 100% + 20px)
203
+ for (const [n, [col, got]] of Object.entries(c.fit)) if (col == null || got == null || got < col - 2 || got > col + (n === 'event' ? 22 : 2)) diffs.push(`${n}.width fills ${col} | ${got}`);
204
+ ok(`S11 the source row and the digest look like the Agreed design's at ${w} px, ${th}`, diffs.length === 0, diffs.join(' ; '));
184
205
  const ov = await R.page.evaluate(() => document.documentElement.scrollWidth - innerWidth);
185
206
  ok(`S11 no sideways scroll at ${w} px, ${th}`, ov <= 0, String(ov));
186
- await m.context().close(); await R.ctx.close();
207
+ await R.ctx.close();
187
208
  }
188
209
  }
189
210
  return finish();