create-pmos 0.691.0 → 0.693.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 (111) hide show
  1. package/package.json +20 -14
  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/adler-moments-test.js +3 -35
  7. package/workspace/adler-seasons-test.js +1 -1
  8. package/workspace/briefing-premium-adddoc-test.js +1 -1
  9. package/workspace/briefing-premium-board-test.js +1 -1
  10. package/workspace/briefing-premium-doc-edit-test.js +1 -1
  11. package/workspace/briefing-premium-work-test.js +2 -2
  12. package/workspace/changelog.json +19 -0
  13. package/workspace/chat-asks-test.js +1 -1
  14. package/workspace/core-docs-workflow-test.js +1 -1
  15. package/workspace/ev-everywhere-test.js +3 -14
  16. package/workspace/guide/cli.md +3 -1
  17. package/workspace/guide/home.md +1 -1
  18. package/workspace/guide/layout.md +2 -2
  19. package/workspace/guide/settings-and-switches.md +0 -1
  20. package/workspace/impact-screens-test.js +2 -47
  21. package/workspace/ini-workflow-test.js +1 -1
  22. package/workspace/lib/board-premium.js +10 -2
  23. package/workspace/lib/initiative-cli.js +31 -4
  24. package/workspace/lib/initiative-origin.js +131 -0
  25. package/workspace/lib/initiative-writer.js +35 -2
  26. package/workspace/lib/routes-boards.js +4 -1
  27. package/workspace/live-pill-round-test.js +6 -18
  28. package/workspace/milestone-suggest-test.js +4 -28
  29. package/workspace/news-viewers-test.js +3 -29
  30. package/workspace/package-lock.json +2 -2
  31. package/workspace/package.json +1 -1
  32. package/workspace/premium-board-actions-test.js +2 -2
  33. package/workspace/premium-briefing-depth-test.js +4 -4
  34. package/workspace/premium-chat-attach-test.js +3 -2
  35. package/workspace/premium-chat-chart-tab-test.js +8 -7
  36. package/workspace/premium-chat-context-test.js +3 -1
  37. package/workspace/premium-chat-goal-view-test.js +3 -1
  38. package/workspace/premium-chat-line-test.js +8 -6
  39. package/workspace/premium-chat-report-tab-test.js +13 -5
  40. package/workspace/premium-chat-term-test.js +2 -2
  41. package/workspace/premium-chat-viewer-test.js +10 -16
  42. package/workspace/premium-core-doc-issue-test.js +7 -2
  43. package/workspace/premium-discuss-landing-test.js +9 -5
  44. package/workspace/premium-html-viewer-test.js +7 -3
  45. package/workspace/premium-link-suggest-test.js +6 -10
  46. package/workspace/premium-phone-card-test.js +2 -2
  47. package/workspace/premium-viewer-download-test.js +1 -1
  48. package/workspace/premium-viewer-flicker-test.js +1 -1
  49. package/workspace/premium-viewer-share-test.js +2 -2
  50. package/workspace/premium-viewer-test.js +1 -1
  51. package/workspace/premium-vw-cal-test.js +1 -1
  52. package/workspace/premium-vw-copy-test.js +3 -3
  53. package/workspace/premium-vw-doc-test.js +1 -1
  54. package/workspace/premium-vw-item-test.js +1 -1
  55. package/workspace/premium-work-depth-test.js +2 -2
  56. package/workspace/program-charter-test.js +1 -12
  57. package/workspace/program-leave-test.js +2 -2
  58. package/workspace/program-order-test.js +3 -65
  59. package/workspace/project-onboard-flow-test.js +5 -5
  60. package/workspace/public/pm/bd-work.js +24 -5
  61. package/workspace/public/pm/cozy-home.css +0 -6
  62. package/workspace/public/pm/cozy-panels.js +2 -6
  63. package/workspace/public/pm/cozy-popup.css +1 -0
  64. package/workspace/public/pm/cozy-popup.js +15 -2
  65. package/workspace/public/pm/cozy-today-page.css +1 -1
  66. package/workspace/public/pm/cozy-today.css +0 -14
  67. package/workspace/public/pm/cozy-viewer.js +14 -38
  68. package/workspace/public/pm/goal-chat.js +2 -2
  69. package/workspace/public/pm/home-app.js +8 -67
  70. package/workspace/public/pm/home-chat.js +1 -1
  71. package/workspace/public/pm/home-ses-name.js +3 -2
  72. package/workspace/public/pm/home-today.js +4 -18
  73. package/workspace/public/premium-intelligence.html +1 -1
  74. package/workspace/public/premium-viewer.html +1 -1
  75. package/workspace/public/premium-workflows.html +1 -1
  76. package/workspace/ready-dash-ui-test.js +1 -1
  77. package/workspace/rename-test.js +2 -2
  78. package/workspace/server.js +11 -12
  79. package/workspace/session-names-test.js +34 -56
  80. package/workspace/sort-order-test.js +2 -71
  81. package/workspace/split-merge-ui-test.js +1 -1
  82. package/workspace/stage-card-tasks-test.js +1 -1
  83. package/workspace/stage-card-test.js +1 -1
  84. package/workspace/task-card-test.js +1 -1
  85. package/workspace/task-press-test.js +1 -1
  86. package/workspace/task-views-test.js +1 -1
  87. package/workspace/test-lists/adler-seasons-art.json +3 -6
  88. package/workspace/test-lists/batch18-asks.json +1 -1
  89. package/workspace/test-lists/briefing-premium.json +1 -11
  90. package/workspace/test-lists/premium-agreed-viewer.json +1 -1
  91. package/workspace/test-lists/who-raised-each-idea.json +5 -0
  92. package/workspace/test-run.js +0 -2
  93. package/workspace/test-timings.json +0 -4
  94. package/workspace/tk-tasks-test.js +3 -17
  95. package/workspace/viewer-trail-test.js +2 -2
  96. package/workspace/workflows-setup-test.js +4 -2
  97. package/workspace/adler-seasons-art-test.js +0 -116
  98. package/workspace/briefing-premium-initiative-test.js +0 -289
  99. package/workspace/briefing-premium-products-test.js +0 -209
  100. package/workspace/briefing-premium-sources-test.js +0 -250
  101. package/workspace/briefing-premium-test.js +0 -282
  102. package/workspace/home-other-product-test.js +0 -197
  103. package/workspace/home-pill-test.js +0 -138
  104. package/workspace/home-railcard-test.js +0 -196
  105. package/workspace/home-rows-test.js +0 -389
  106. package/workspace/panels-test.js +0 -454
  107. package/workspace/public/premium.html +0 -48
  108. package/workspace/test-lists/batch18-panels.json +0 -9
  109. package/workspace/test-lists/home-railcard.json +0 -9
  110. package/workspace/test-lists/home-sessions-pill.json +0 -6
  111. package/workspace/test-lists/viewer-home-rows.json +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.691.0",
3
+ "version": "0.693.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -33,6 +33,25 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.693.0",
38
+ "at": "2026-11-22T09:36:04.094Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1515,
43
+ "t": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
44
+ "s": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
45
+ "k": "new"
46
+ },
47
+ {
48
+ "n": 1490,
49
+ "t": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
50
+ "s": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
51
+ "k": "imp"
52
+ }
53
+ ]
54
+ },
36
55
  {
37
56
  "v": "0.691.0",
38
57
  "at": "2026-11-22T09:21:12.074Z",
@@ -405,19 +424,6 @@
405
424
  "k": "fix"
406
425
  }
407
426
  ]
408
- },
409
- {
410
- "v": "0.651.0",
411
- "at": "2026-11-20T07:19:20.677Z",
412
- "f": 4,
413
- "prs": [
414
- {
415
- "n": 1433,
416
- "t": "Quick edit in a row and full popups for a task and a milestone",
417
- "s": "Quick edit in a row and full popups for a task and a milestone",
418
- "k": "new"
419
- }
420
- ]
421
427
  }
422
428
  ]
423
429
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@b0fe23dc
1
+ kernel-source: pmos@08a23b28
2
2
  assembled: 2026-11-22
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-22T09:21:09Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T09:36:01Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-11-22T09:21:09Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T09:36:01Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-11-22T09:21:09Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T09:36:01Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,12 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* adler-moments-test.js — Adler on the phone and in Settings, in the real pages (feedback batch 17 item 4-B; canvas AdP2, AdP5, AdP6, AdM4).
4
- * The real Home from the real server, at 390 px with touch; the board and briefing are the fixtures, and GET /api/sources is stubbed with
4
+ * Today from the real server (Your day's checks, F1, F2 and P1, went with Home's list: home-desk-layout-delete), at 390 px with touch; the board and briefing are the fixtures, and GET /api/sources is stubbed with
5
5
  * Jira failed. POST /api/sources/refresh is recorded.
6
6
  * E1 no ears over the menu button (chief-of-staff delete list); the button's name says a call is the PM's
7
- * F1 Your day (Good morning) says "Jira isn't answering." in one quiet line with its read-again icon; no rain cloud
8
- * F2 its icon reads Jira again (POST /api/sources/refresh with source jira)
9
- * P1 a pull from the top of Your day lets Adler peek up, says it reads again, and reads Home again
10
7
  * S1 Settings > Updates: a face on the updates card; General: one face only
11
8
  * N no page error
12
9
  * PMOS_SHOTS=<dir> also saves the screenshots. */
@@ -75,8 +72,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
75
72
  await page.route(/\/api\/sources\/refresh$/, (rq) => json(rq, { ok: true, started: 'local' }));
76
73
  // the night scene would hide nothing here, but keep the test on the day: Quiet after off
77
74
  await page.addInitScript(() => { try { localStorage.setItem('pmos.adler', JSON.stringify({ 'adler.quiet': 'never' })); } catch { /* none */ } });
78
- await page.goto(BASE + '/premium.html');
79
- await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-day]')), 30000);
75
+ await page.goto(BASE + '/today.html');
76
+ await until(() => page.evaluate(() => !!document.getElementById('czFab')), 30000);
80
77
 
81
78
  /* E1 — chief-of-staff (UI grill delete list): no ears over the menu button; the one dot says a call is the PM's, and the name says it */
82
79
  await page.evaluate(() => document.dispatchEvent(new CustomEvent('cz:calls', { detail: { count: 1 } })));
@@ -84,35 +81,6 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
84
81
  ok('E1 no ears over the menu button; its name says one call is yours', !!ears && !ears.ears, JSON.stringify(ears));
85
82
  await shot(page, 'ears');
86
83
 
87
- /* F1-F2 */
88
- await page.click('#hmList [data-hm-day]');
89
- // Good morning (batch 27 item 10, frames G1-G3): a failed source is one quiet line under the lead, never the lead and never the rain cloud
90
- const f1 = await until(() => page.evaluate(() => { const b = document.querySelector('#czViewer .gm-lead .yd-open'); const q = b && b.querySelector('.gm-src'); if (!q) return null; return { quiet: q.querySelector('span').textContent, line: b.querySelector('.yd-ht b').textContent, rain: !!b.querySelector('.k-rain, .yd-scene'), sync: !!q.querySelector('[data-yd="sync"][aria-label="Read Jira again"]') }; }), 15000);
91
- ok('F1 Your day says "Jira isn\'t answering." in one quiet line with its read-again icon; no rain cloud, and the lead is the day\'s own line', f1 && /^Jira isn’t answering\./.test(f1.quiet) && !/answering/.test(f1.line) && !f1.rain && f1.sync, JSON.stringify(f1));
92
- await shot(page, 'sync-fail');
93
- await page.click('#czViewer [data-yd="sync"]');
94
- const f2 = await until(() => posts.find((p) => p.path === '/api/sources/refresh'));
95
- ok('F2 the icon reads Jira again', f2 && /"source":"jira"/.test(f2.body), JSON.stringify(f2));
96
-
97
- /* P1 — a pull from the top of the body, as a finger would */
98
- const reads = () => page.evaluate(() => performance.getEntriesByType('resource').filter((e) => /\/api\/home-review/.test(e.name)).length);
99
- const before = await reads();
100
- const peek = await page.evaluate(async () => {
101
- const body = document.querySelector('#czViewer .cz-vw-body') || document.querySelector('#czViewer [data-cz-pull]');
102
- const el = document.querySelector('[data-cz-pull]') || body;
103
- const t = (y) => new Touch({ identifier: 1, target: el, clientX: 200, clientY: y });
104
- el.dispatchEvent(new TouchEvent('touchstart', { touches: [t(120)], bubbles: true }));
105
- for (let y = 130; y <= 300; y += 20) el.dispatchEvent(new TouchEvent('touchmove', { touches: [t(y)], bubbles: true }));
106
- const mid = !!el.querySelector('.cz-pull .ad-svg');
107
- el.dispatchEvent(new TouchEvent('touchend', { touches: [], changedTouches: [t(300)], bubbles: true }));
108
- await new Promise((r) => setTimeout(r, 50));
109
- const p = el.querySelector('.cz-pull'); return { mid, reading: p ? p.querySelector('.cz-pull-t').textContent : '' };
110
- });
111
- ok('P1 a pull lets Adler peek up, and he says he reads your day again', peek.mid && peek.reading === 'Reading your day again', JSON.stringify(peek));
112
- await shot(page, 'pull');
113
- const after = await until(async () => ((await reads()) > before ? true : null), 15000);
114
- ok('P1 and Home reads again', after);
115
-
116
84
  /* S1 */
117
85
  await page.evaluate(() => import('/pm/cozy-settings.js').then((M) => M.openSettings('updates')));
118
86
  const s1 = await until(() => page.evaluate(() => { const m = document.querySelector('#evSettings .ev-st-main'); return m && m.querySelector('.ev-upd') ? { faces: m.querySelectorAll('.ev-ad svg, .ev-ad .ad-dot').length } : null; }), 15000);
@@ -53,7 +53,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
53
53
  page.on('request', (rq) => { if (rq.method() === 'POST' && new URL(rq.url()).pathname === '/api/settings') { try { posts.push(JSON.parse(rq.postData() || '{}')); } catch { /* not JSON */ } } });
54
54
  // the clock: Date.now and new Date() read 3 Nov 2026 (timers keep running)
55
55
  await page.addInitScript((t) => { const D = Date, off = t - D.now(); class F extends D { constructor(...a) { super(...(a.length ? a : [D.now() + off])); } static now() { return D.now() + off; } } window.Date = F; }, NOW);
56
- await page.goto(BASE + '/premium.html');
56
+ await page.goto(BASE + '/today.html');
57
57
  await until(() => page.evaluate(() => !!document.querySelector('#hmList')), 30000);
58
58
  // each viewport starts from the defaults (the server keeps a press between the two)
59
59
  await page.evaluate(() => import('/pm/http.js').then((M) => Promise.all(['adler.dress.days', 'adler.dress.wear', 'adler.dress.on'].map((key) => M.pmPost('/api/settings', { key, reset: true })))));
@@ -36,7 +36,7 @@ const CUSTOM = [
36
36
  ];
37
37
  const PAGES = {
38
38
  // 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)
39
- initiative: { file: '/premium.html', api: '**/api/initiative-premium*', scope: 'initiative:self-serve-v2', mk: (custom) => IP.build(IF.facts({ custom })), ready: '#czViewer .iv-mc', btn: '#czViewer [data-hi-v="docs"]', qs: '?ini=self-serve-v2&ws=w1&board=w1&theme=' },
39
+ initiative: { file: '/today.html', api: '**/api/initiative-premium*', scope: 'initiative:self-serve-v2', mk: (custom) => IP.build(IF.facts({ custom })), ready: '#czViewer .iv-mc', btn: '#czViewer [data-hi-v="docs"]', qs: '?ini=self-serve-v2&ws=w1&board=w1&theme=' },
40
40
  };
41
41
 
42
42
  (async () => {
@@ -308,7 +308,7 @@ const IVREAD = () => {
308
308
  const pri = await q.evaluate(() => [...document.querySelectorAll('#czViewer [data-iv-primary]')].map((b) => ({ act: b.dataset.ivPrimary, label: b.getAttribute('aria-label'), text: b.textContent.trim() })));
309
309
  ok('B1 the panel puts the sign-off first, with the sign-off as the one icon-only primary', !!nb && /sign-off can wait|Every release ticket is done/.test(nb.why || '') && pri.length === 1 && pri[0].act === 'page' && pri[0].label === 'Your sign-off · v2.4' && pri[0].text === '', JSON.stringify([nb && nb.why, pri]));
310
310
  await Promise.all([q.waitForURL(/[?&]ini=sso-partners/, { timeout: 8000 }).catch(() => {}), q.click('#czViewer [data-iv-primary]')]);
311
- ok('B1 signing off goes to the initiative\'s page on Home, where the sign-off is', /\/premium\.html\?.*\bini=sso-partners/.test(q.url()), q.url());
311
+ ok('B1 signing off goes to the initiative\'s page on Home, where the sign-off is', /\/today\.html\?.*\bini=sso-partners/.test(q.url()), q.url());
312
312
  await R.ctx.close();
313
313
  }
314
314
 
@@ -78,7 +78,7 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
78
78
  });
79
79
  await page.route('**/api/docs/library*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, kinds: [], files: [{ path: PATH, title: 'Self-serve PRD' }], edges: [] }) }));
80
80
  await page.route('**/api/docs?*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, docs: [{ path: PATH, links: [] }] }) }));
81
- await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&theme=' + theme);
81
+ await page.goto(BASE + '/today.html?ini=self-serve-v2&ws=w1&theme=' + theme);
82
82
  if (w <= 760) await everyPart(page);
83
83
  // the initiative's page in the Viewer (canvas HbC): its Documents' "Show all N" opens every document there
84
84
  await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-iv-docs]')), 15000);
@@ -57,7 +57,7 @@ const view = () => { const v = document.querySelector('#czViewer:not([hidden])')
57
57
  await page.route('**/api/pm-items/**', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); r.fulfill({ status: answer.status, contentType: 'application/json', body: JSON.stringify(answer.body) }); });
58
58
  }
59
59
  await page.goto(BASE + '/premium-work.html?theme=' + theme);
60
- await until(() => page.evaluate(() => /\/premium\.html$/.test(location.pathname) && !!document.querySelector('#czFab')), 15000);
60
+ await until(() => page.evaluate(() => /\/today\.html$/.test(location.pathname) && !!document.querySelector('#czFab')), 15000);
61
61
  await sleep(600);
62
62
  await page.evaluate(() => import('/pm/home-work.js').then((M) => { M.openMyWork(); })); // the page itself: Home no longer opens it (testing fixes); an item and Focus open alone
63
63
  const up = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); return !!v && /My work/.test(v.textContent) && !/Reading your list/.test(v.textContent); }), 15000);
@@ -70,7 +70,7 @@ const view = () => { const v = document.querySelector('#czViewer:not([hidden])')
70
70
  ok('0 My work opens in the Viewer', !!A.up);
71
71
  if (!A.up) return finish(1);
72
72
  /* M1 */
73
- ok('M1 /premium-work.html opens Today (Home), the place menu marks Today and nothing on the page is the old My work page', await p.evaluate(() => /\/premium\.html$/.test(location.pathname) && /Today/.test((document.querySelector('#czMenu [aria-current="page"]') || {}).textContent || '') && !document.querySelector('#qBody, #capIn, nav.rail')));
73
+ ok('M1 /premium-work.html opens Today (Home), the place menu marks Today and nothing on the page is the old My work page', await p.evaluate(() => /\/today\.html$/.test(location.pathname) && /Today/.test((document.querySelector('#czMenu [aria-current="page"]') || {}).textContent || '') && !document.querySelector('#qBody, #capIn, nav.rail')));
74
74
  ok('M1 the page is still served at /premium-work and /premium-work.html', (await fetch(BASE + '/premium-work', { redirect: 'manual' })).status === 302 && (await fetch(BASE + '/premium-work.html')).status === 200);
75
75
  /* M4 */
76
76
  const v0 = await p.evaluate(view);
@@ -1,4 +1,23 @@
1
1
  [
2
+ {
3
+ "v": "0.693.0",
4
+ "at": "2026-11-22T09:36:04.094Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1515,
9
+ "t": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
10
+ "s": "Show who raised each initiative (Raised by column, group, sort and filter on Work)",
11
+ "k": "new"
12
+ },
13
+ {
14
+ "n": 1490,
15
+ "t": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
16
+ "s": "Delete Home's desk page, its fold and its rail card (home-page-retire slice 1b)",
17
+ "k": "imp"
18
+ }
19
+ ]
20
+ },
2
21
  {
3
22
  "v": "0.691.0",
4
23
  "at": "2026-11-22T09:21:12.074Z",
@@ -51,7 +51,7 @@ const STEPS = [{ text: 'Calendar', state: 'done' }, { text: 'Mail', state: 'done
51
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
52
  await page.route('**/api/sessions/conversation**', (r) => r.fulfill({ json: { ok: true, ...st.conv } }));
53
53
  await page.goto(BASE + '/premium-chat.html?about=' + encodeURIComponent(KEY), { waitUntil: 'domcontentloaded' });
54
- await page.waitForFunction(() => !!document.querySelector('#hmIn'), null, { timeout: 15000 });
54
+ await page.waitForFunction(() => { const i = document.querySelector('#hmIn'); return !!i && !!i.offsetParent; }, null, { timeout: 15000 }); // on a desktop the chat is the popup's: wait until it shows
55
55
  return { page, ctx, errors, posts, st };
56
56
  };
57
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');
@@ -102,7 +102,7 @@ const OLD = new Map([['initiative:' + ID + '|risks', { drafts: [], issued: { at:
102
102
  await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
103
103
  await page.route(/\/api\/workflows(\?.*)?$/, (r) => json(r, { ok: true, workflows: WF.list(LIB) }));
104
104
  await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
105
- await page.goto(BASE + '/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
105
+ await page.goto(BASE + '/today.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
106
106
  if (w <= 760) await everyPart(page);
107
107
  let up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 30000);
108
108
  if (up) {
@@ -5,7 +5,7 @@
5
5
  * U1 the place menu: Home, Board, Intelligence, then Search and Settings as icons (feedback batch 16 item 5, FmA1Menu); no More anywhere
6
6
  * S1 Ctrl K opens Search over the page; typing finds a document on main and a draft on the worktree; the kind chips narrow; Escape closes
7
7
  * S2 the worktree chip lists the worktree and leaving it out drops its draft; S3 a result opens in the Viewer
8
- * N1 Good morning opens Your day with the calendar icon; New for you is its fold (FmA2Day); nothing is posted on open
8
+ * N1 the place menu opens no New for you page
9
9
  * R1 Settings › Connectors lists each source with when it was read (was Sources, FmA3Settings); R2 Settings opens on General with its
10
10
  * sections (on Connectors while a source is stale), and Escape closes it
11
11
  * B1 the Board's Settings and Sources open Settings; B2 Ctrl K on Board opens the same Search
@@ -70,7 +70,7 @@ const put = (root, rel, text) => { fs.mkdirSync(path.dirname(path.join(root, rel
70
70
  browser = classicBoard(await chromium.launch({ executablePath: exe, headless: true, args: ['--no-sandbox'] }));
71
71
  const shot = process.env.EV_SHOTS || '';
72
72
  const snap = async (pg, name) => { if (!shot) return; fs.mkdirSync(shot, { recursive: true }); await sleep(400); await pg.screenshot({ path: path.join(shot, name + '.png') }); };
73
- const open = async ({ w = 1440, h = 900, page = 'premium.html', theme = '' } = {}) => {
73
+ const open = async ({ w = 1440, h = 900, page = 'today.html', theme = '' } = {}) => {
74
74
  const ctx = await browser.newContext({ viewport: { width: w, height: h } });
75
75
  const pg = await ctx.newPage(); const errors = [], posts = [];
76
76
  pg.on('pageerror', (e) => errors.push(String(e)));
@@ -111,19 +111,8 @@ const put = (root, rel, text) => { fs.mkdirSync(path.dirname(path.join(root, rel
111
111
  await pg.keyboard.press('Escape');
112
112
  await until(() => pg.evaluate(() => !document.querySelector('#czViewer:not([hidden])')));
113
113
 
114
- /* N: New for you, a fold of Your day (feedback batch 16 item 5b, canvas FmA2Day) */
115
- posts.length = 0;
116
- const nfy = (await json('GET', '/api/news-for-you?ws=' + encodeURIComponent(ws))).body || {};
117
- await pg.click('#hmList [data-hm-day]');
118
- const yd = await until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); if (!v || !v.querySelector('.yd')) return null; const f = v.querySelector('.gm-since');
119
- return { cal: !!v.querySelector('.cz-vw-hd [data-cz-vw-p="cal"]'), more: !!v.querySelector('.cz-vw-hd [data-cz-vw="more"]'), fold: !!f, rows: f ? f.querySelectorAll('[data-yd="news"]').length : 0, all: !!(f && f.querySelector('[data-yd="seen"]')) }; }), 20000);
120
- ok('N1 Good morning opens Your day, with the calendar as an icon in its header and no ⋯', !!yd && yd.cal && !yd.more, JSON.stringify(yd));
121
- ok('N1 New for you is Good morning’s Since yesterday (nyt-ui GM2): the newest 3 at most, with ✓✓; nothing new draws no block', !!yd && (nfy.count > 0 ? yd.fold && yd.rows === Math.min(3, nfy.count) && yd.all : !yd.fold), JSON.stringify({ yd, count: nfy.count }));
114
+ /* N: the place menu no longer opens a New for you page (Your day's own checks went with Home's list: home-desk-layout-delete) */
122
115
  ok('N1 the place menu no longer opens a New for you page', await pg.evaluate(() => !document.querySelector('#czMenu [data-cz-news]')));
123
- const own = posts.filter((u) => u !== '/api/loose-props/rows');
124
- ok('N1 opening Your day posted nothing', own.length === 0, JSON.stringify(posts));
125
- await snap(pg, 'day-1440-light');
126
- await pg.keyboard.press('Escape');
127
116
 
128
117
  /* R: Sources and Settings */
129
118
  await until(() => pg.evaluate(() => !document.querySelector('#czViewer:not([hidden])')));
@@ -367,7 +367,7 @@ A page that keeps breaking should get fixed before it gets a new feature. This c
367
367
 
368
368
  | Command | What it does |
369
369
  |---|---|
370
- | `pmos initiative new "<title>" --lane <lane> --anchor <anchor> [--intent "<text>"] [--id <id>]` | Makes the record and puts it at the end of the Roadmap. |
370
+ | `pmos initiative new "<title>" --lane <lane> --anchor <anchor> [--intent "<text>"] [--id <id>] [--raised-by "<who>"]` | Makes the record and puts it at the end of the Roadmap. |
371
371
  | `pmos initiative new --from <capture> [--anchor <anchor>]` | Adds the initiative a capture proposes. |
372
372
  | `pmos initiative top <id>` | Ranks it first. |
373
373
  | `pmos initiative up <id>` | Moves it one place up. |
@@ -381,6 +381,8 @@ A page that keeps breaking should get fixed before it gets a new feature. This c
381
381
  | `pmos initiative export <id>` | Writes the breakdown as markdown to the terminal. |
382
382
  | `pmos initiative describe <id>` | Shows the description, and the lines PMOS can draft it from. |
383
383
  | `pmos initiative describe <id> "<text>"` | Saves the description. PMOS runs this only after your yes. |
384
+ | `pmos initiative raised-by <id>` | Shows who raised it: you, a teammate, a customer, PMOS or the tracker. |
385
+ | `pmos initiative raised-by <id> "<who>"` | Saves who raised it: `you`, `pmos`, `tracker`, `"teammate: <name>"` or `"customer: <name>"`. `none` removes it. |
384
386
 
385
387
  Every command takes `--json` and `--root <dir>`. The command does not accept `--by` or `--via`. `pmos initiative now`, `next` and `later` are retired: they write nothing, say what to use instead and exit 2.
386
388
 
@@ -162,7 +162,7 @@ Press the name in the Viewer's header. The name becomes a field.
162
162
 
163
163
  PMOS names a session after its first real answer. It does not ask. It changes the name again only when the job changes.
164
164
 
165
- - 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.
165
+ - To rename a session on a desk, press ⋯ in the chat's top bar, then Rename session. The name becomes a field. On a phone, press the name in the top bar. Enter saves and Esc cancels, as above.
166
166
  - Your name always wins. After you rename a session, PMOS does not rename it again.
167
167
  - **Undo** gives back the name that PMOS gave, and PMOS names the session again.
168
168
  - The Home row shows the same name.
@@ -43,7 +43,7 @@ On a phone, **⋯** at the top right of every screen opens the menu: Today, Work
43
43
 
44
44
  ## Today
45
45
 
46
- On a computer, Today is one page that starts at the left of the panel. At the top are the day and the time, and a greeting. Under them, the Overview and Today's log take the left (at most about 1100 px wide). Today's agenda is in one grey box on the right, about 340 px wide, with the meeting you recorded under it. Today is built from the parts of the PMOS design system: the Overview is a summary card, the log a list card, and the agenda a timeline. Today reads every product. Home's old address on a computer (`/premium.html`, and a link that names one item) opens Today.
46
+ On a computer, Today is one page that starts at the left of the panel. At the top are the day and the time, and a greeting. Under them, the Overview and Today's log take the left (at most about 1100 px wide). Today's agenda is in one grey box on the right, about 340 px wide, with the meeting you recorded under it. Today is built from the parts of the PMOS design system: the Overview is a summary card, the log a list card, and the agenda a timeline. Today reads every product. Home's old address (`/premium.html`, and a link that names one item) opens Today; Home's own page is gone.
47
47
 
48
48
  The **Overview** is one card written by PMOS (✦). It says how many lines are open, the ones to start with and why, how much free time today has and when your first or next meeting is. It names only what the lines themselves say. The names of the lines to start with are links: press one to open it. Under it, PMOS suggests what to clean up with ✓ ✕, only when it is true, for example "Drop the 2 checks carried more than 60 days".
49
49
 
@@ -278,7 +278,7 @@ A chat on a phone uses the full width of the screen:
278
278
 
279
279
  Setup is a conversation in Home. It replaces the chat on the right while it runs, and the list of your work stays on the left. There is no separate setup page.
280
280
 
281
- Today starts setup when PMOS has no project yet; on a desk it opens in the popup's chat. `pmos` also starts it on a first run. To start it again, open `/premium.html?onboard=1`. The old addresses `/welcome` and `/premium-welcome.html` open the same conversation; the three-step Welcome page they once served is gone.
281
+ Today starts setup when PMOS has no project yet; on a desk it opens in the popup's chat. `pmos` also starts it on a first run. To start it again, open `/today.html?onboard=1`. The old addresses `/welcome`, `/premium.html?onboard=1` and `/premium-welcome.html` open the same conversation; the three-step Welcome page they once served is gone.
282
282
 
283
283
  Setup saves its progress on this computer, outside any project folder. A reload continues from the same step.
284
284
 
@@ -241,7 +241,6 @@ Do not set these on your own computer. The suites set them to make a run short o
241
241
  | Variable | What it does | Default | Same in Settings |
242
242
  |---|---|---|---|
243
243
  | `PMOS_TEST` | `1` allows the test seam of the audit sink. | off | — |
244
- | `PMOS_DESK_HOME` | `keep` keeps Home at `/premium.html` (the suites set it). Without it, every `/premium.html` address opens Today with the same query; on a desk the chat, session or setup it names opens in the popup. | Today | — |
245
244
  | `PMOS_OFFLOOP` | `0` runs the board fold in the server thread, not in a worker. | worker | — |
246
245
  | `PMOS_TICK_MS` | The server's tick. | 1 minute | — |
247
246
  | `PMOS_LIVENESS_MS` | How often the session list is sent again. | 2 seconds | — |
@@ -3,11 +3,7 @@
3
3
  /* impact-screens-test.js — Your impact in the real pages (feedback batch 16 item 7, Phases 2 to 4; canvas GmA1Home, GmA3Garden, GmA2Board).
4
4
  * The real Home and Board from the real server; GET /api/impact/week and /weeks are stubbed in the contract's shape (7-impact-api.md), and
5
5
  * every POST is recorded so the test can say nothing left for anywhere but /api/impact/seen.
6
- * H1 Home: the greeting's Adler is its own press, beside "Good morning", which still opens Your day
7
- * H2 the one celebration: a thanks says itself in the toast once and is marked read
8
- * H3 a press opens "Your impact this week" in the Viewer: a row per item, each with its source to open, and the lock line; no digit
9
- * H4 the log icon opens "Your impact": this week open, a quiet week in plain words, past weeks folded
10
- * H5 off (or gated): no face press; the greeting is as it was
6
+ * (H1 to H6, Your impact from Home's greeting, went with Home's list: home-desk-layout-delete)
11
7
  * B1 Board: an initiative with a milestone delivered this month shows who made it happen, unranked, each with a ticket; no send press
12
8
  * N every POST went to /api/impact/seen, and no page error
13
9
  * PMOS_SHOTS=<dir> also saves the screenshots. */
@@ -76,7 +72,7 @@ const WEEKS = { ok: true, on: true, live: true, weeks: [
76
72
  ]);
77
73
  }
78
74
 
79
- const open = async ({ w = 1440, h = 900, week = WEEK(), url = '/premium.html' } = {}) => {
75
+ const open = async ({ w = 1440, h = 900, week = WEEK(), url = '/today.html' } = {}) => {
80
76
  const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: w < 500 });
81
77
  const page = await ctx.newPage();
82
78
  const errors = [], posts = [];
@@ -94,47 +90,6 @@ const WEEKS = { ok: true, on: true, live: true, weeks: [
94
90
  return { ctx, page, errors, posts };
95
91
  };
96
92
 
97
- /* H1-H4 */
98
- {
99
- const { ctx, page, errors, posts } = await open();
100
- const face = await until(() => page.evaluate(() => { const b = document.querySelector('#hmList [data-hm-impact]'); return b ? { label: b.getAttribute('aria-label'), next: !!(b.nextElementSibling && b.nextElementSibling.matches('[data-hm-day]')), dayFace: !!document.querySelector('#hmList [data-hm-day] .ad-svg') } : null; }), 30000);
101
- ok('H1 the greeting\'s Adler is its own press, "Your impact this week", right before "Good morning"', face && face.label === 'Your impact this week' && face.next && !face.dayFace, JSON.stringify(face));
102
- const toastSaid = await until(() => page.evaluate(() => { const t = document.getElementById('toast'); return t && /thanked you/.test(t.textContent) ? t.textContent : null; }));
103
- ok('H2 the one celebration: Chen\'s thanks says itself in the toast, and it is marked read', /Chen thanked you · Chen: “the drop-off spec saved us a day”/.test(toastSaid || '') && (await until(() => posts.includes('/api/impact/seen'))), toastSaid);
104
- await shot(page, 'home-face');
105
- await page.click('#hmList [data-hm-impact]');
106
- const vw = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); const c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.id !== 'impact-week') return null; const rows = [...v.querySelectorAll('.im-row')]; return rows.length ? { title: c.title, rows: rows.map((r) => ({ t: r.querySelector('.im-t').textContent, href: r.querySelector('a.im-ib') && r.querySelector('a.im-ib').getAttribute('href') })), text: v.querySelector('.cz-vw-body').innerText } : null; }));
107
- ok('H3 the Viewer "Your impact this week": a row per item, each opening its own source', vw && vw.title === 'Your impact this week' && vw.rows.length === 3 && vw.rows[0].href === 'https://acme.slack.com/archives/C1/p1' && vw.rows[2].href === '/premium.html?ini=descope', JSON.stringify(vw));
108
- const chrome = vw ? vw.text.replace(/IDPF-\d+/g, '') : '';
109
- ok('H3 the lock line, and no digit anywhere on the page body (no count, no score)', /Only you see this\. Nothing leaves PMOS\./.test(chrome) && !/\d/.test(chrome), chrome);
110
- await shot(page, 'impact-week');
111
- await page.click('#czViewer [data-cz-vw-p="log"]');
112
- const log = await until(() => page.evaluate(() => { const c = window.czViewer && window.czViewer.current(); const b = document.querySelector('#czViewer .cz-vw-body'); if (!c || c.id !== 'impact-log' || !b || !b.querySelector('.im-wk')) return null; return { sections: b.querySelectorAll('section.im-wk').length, folded: [...b.querySelectorAll('details.im-wk')].map((d) => d.open), quiet: [...b.querySelectorAll('.im-wk.quiet')].map((q) => q.innerText.replace(/\s+/g, ' ').trim()), adler: !!b.querySelector('.im-log .ad-svg') }; }));
113
- ok('H4 the log: this week open, last week folded, a quiet week in plain words, Adler at the top', log && log.sections === 1 && log.folded.length === 1 && log.folded[0] === false && log.quiet[0] === 'Week of Oct 12 A quiet week' && log.adler, JSON.stringify(log));
114
- await shot(page, 'impact-log');
115
- ok('N Home: every POST went to /api/impact/seen or the page\'s own reads, and no page error', !posts.some((p) => /slack|mail|jira|outbox|share|send/i.test(p)) && !errors.length, JSON.stringify({ posts, errors }));
116
- await ctx.close();
117
- }
118
- /* H5 */
119
- for (const [name, week] of [['off', { ok: true, on: false }], ['gated', WEEK({ live: false, items: [], grow: 'rest', celebrate: null })]]) {
120
- const { ctx, page } = await open({ week });
121
- await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-day]')), 30000);
122
- await sleep(800);
123
- const st = await page.evaluate(() => ({ face: !!document.querySelector('#hmList [data-hm-impact]'), dayFace: !!document.querySelector('#hmList [data-hm-day] .ad-svg') }));
124
- ok(`H5 ${name}: no impact press; the greeting keeps its own face`, !st.face && st.dayFace, JSON.stringify(st));
125
- await ctx.close();
126
- }
127
- /* H6 a phone */
128
- {
129
- const { ctx, page } = await open({ w: 390, h: 844, week: WEEK({ celebrate: null }) });
130
- await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-impact]')), 30000);
131
- await shot(page, 'home-face-phone');
132
- await page.click('#hmList [data-hm-impact]');
133
- const full = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden && v.querySelectorAll('.im-row').length === 3 ? v.getBoundingClientRect().width : null; }));
134
- ok('H6 a phone: the press opens the week full screen', full >= 380, String(full));
135
- await shot(page, 'impact-week-phone');
136
- await ctx.close();
137
- }
138
93
  /* B1 */
139
94
  {
140
95
  const { ctx, page, errors, posts } = await open({ url: '/premium-board.html' });
@@ -89,7 +89,7 @@ const BRIEF = BRP.build(BRF.facts());
89
89
  await page.route(/\/api\/workflows(\?.*)?$/, (r) => json(r, { ok: true, workflows: LIB }));
90
90
  for (const p of ['ini-wf', 'wontdo', 'archive', 'ini-auto', 'move']) await page.route('**/api/boards/' + p, (r) => json(r, { ok: true, row: {} }));
91
91
  if (!fresh) await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
92
- await page.goto(BASE + '/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
92
+ await page.goto(BASE + '/today.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
93
93
  if (w <= 760) await everyPart(page);
94
94
  const up = await until(() => page.evaluate(() => /Tender/.test((document.querySelector('#czViewer:not([hidden]) .cz-vw-kind') || {}).textContent || '') && !!document.querySelector('#czViewer [data-hi-v="page"] .iv-meta [data-iv-wf]')), 30000);
95
95
  return { ctx, page, errors, posts, up, S };
@@ -275,6 +275,14 @@ const gapsOf = (r) => (Array.isArray(r.gaps) ? r.gaps : []).filter((g) => g && d
275
275
  /** Where the dated work of each stage runs (batch 11 item 13): the » of a skipped stage sits between two of them. */
276
276
  const stageSpansOf = (r) => (Array.isArray(r.stageSpans) ? r.stageSpans : []).filter((x) => x && stageKey(x.stage) && dayOr(x.start) && dayOr(x.due)).slice(0, 40)
277
277
  .map((x) => ({ stage: stageKey(x.stage), start: x.start, due: x.due }));
278
+ /** Who raised the row (lib/initiative-origin.js, built by the route): kept only in its known shape, else null (a row with none shows nothing). */
279
+ const ORIGIN_KINDS = ['you', 'teammate', 'customer', 'pmos', 'tracker'];
280
+ function originOf(r) {
281
+ const o = r && r.origin;
282
+ if (!o || !ORIGIN_KINDS.includes(o.kind) || typeof o.label !== 'string' || typeof o.group !== 'string') return null;
283
+ return { kind: o.kind, name: typeof o.name === 'string' ? clip(o.name, 60) : null, label: clip(o.label, 80), group: o.group, source: o.source === 'record' ? 'record' : 'roadmap' };
284
+ }
285
+
278
286
  function rowOf(r0, wf, today) {
279
287
  // T3 (lib/status-proof.js): a status word the row cannot prove (no source, no read time) says No signal, on every surface that reads it
280
288
  const r = r0 && r0.status ? { ...r0, status: SP.provenStatus(r0) } : r0;
@@ -282,7 +290,7 @@ function rowOf(r0, wf, today) {
282
290
  const bad = r.status === 'late' || r.status === 'at risk';
283
291
  const facts = [
284
292
  ['Lane', r.lane], ['Stage', r.stage ? r.stage + (r.stageSource ? ' (' + r.stageSource + ')' : '') : ''], ['Anchor', r.anchor], ['Rank', Number.isInteger(r.rank) ? '#' + (r.rank + 1) + ' on the Roadmap' : ''],
285
- ['Status', STATUS_LABEL[r.status] || (r.status ? r.status.charAt(0).toUpperCase() + r.status.slice(1) : '')], ['Owner', r.owner],
293
+ ['Status', STATUS_LABEL[r.status] || (r.status ? r.status.charAt(0).toUpperCase() + r.status.slice(1) : '')], ['Owner', r.owner], ['Raised by', originOf(r) ? originOf(r).label : ''],
286
294
  ['Progress', pctOf(r.progress) != null ? pctOf(r.progress) + '%' : ''], ['Starts', r.start ? shortDate(r.start) : ''], ['Ends', r.end ? shortDate(r.end) : ''],
287
295
  ['Last changed', r.updated ? shortDate(String(r.updated).slice(0, 10)) : ''], ['Possible duplicate of', r.dupOf], ['Warnings', (r.warnings || []).map((w) => (typeof w === 'string' ? w : w && (w.text || w.message || w.id)) || '').filter(Boolean).join('; ')],
288
296
  ].filter((x) => x[1]);
@@ -294,7 +302,7 @@ function rowOf(r0, wf, today) {
294
302
  stage: r.stage || null, cat: r.cat || null, stageNote: r.stageSource === 'derived' ? 'derived' : null,
295
303
  seg: names.map((n, j) => (j < cur ? 'p' : j === cur ? 'n' : '')), progress: pctOf(r.progress),
296
304
  finish: r.end ? shortDate(r.end) : 'Not planned', over: !!over, start: r.start || null, end: r.end || null,
297
- owner: r.owner || null, lane: r.lane || null, kind: KINDS.includes(r.kind) ? r.kind : 'product', anchor: r.anchor || null, kr: krShort(r.anchor), rank: Number.isInteger(r.rank) ? r.rank : null, warnings: (r.warnings || []).filter((w) => typeof w === 'string').slice(0, 12), epics: Array.isArray(r.epics) ? r.epics.filter((e) => typeof e === 'string').slice(0, 6) : [], updated: r.updated || null, reading: r.reading || null, overDays: over ? days(r.end, today) : 0,
305
+ owner: r.owner || null, origin: originOf(r), lane: r.lane || null, kind: KINDS.includes(r.kind) ? r.kind : 'product', anchor: r.anchor || null, kr: krShort(r.anchor), rank: Number.isInteger(r.rank) ? r.rank : null, warnings: (r.warnings || []).filter((w) => typeof w === 'string').slice(0, 12), epics: Array.isArray(r.epics) ? r.epics.filter((e) => typeof e === 'string').slice(0, 6) : [], updated: r.updated || null, reading: r.reading || null, overDays: over ? days(r.end, today) : 0,
298
306
  acts: actsOf(r, names),
299
307
  // the PM's standing verdict on the outcome (launch simulation W2): the Next cell stops asking "did it work?" once it is answered
300
308
  outcome: r.outcome && r.outcome.verdict ? { verdict: r.outcome.verdict, current: !!r.outcome.current, ...(r.outcome.next ? { next: r.outcome.next } : {}) } : null,
@@ -13,6 +13,8 @@
13
13
  * pmos initiative export <id> the breakdown as markdown on stdout; nothing is written
14
14
  * pmos initiative describe <id> ["<text>"] no text: its description and the cited lines PMOS can draft it from; with text: write
15
15
  * its `description:` line (initiative-description-field). An agent writes only after the PM's yes
16
+ * pmos initiative raised-by <id> ["<who>"|none] no value: who raised it and where that is read from; with a value: write its `raised_by:`
17
+ * line (who-raised-each-idea): you, pmos, tracker, "teammate: <name>" or "customer: <name>"
16
18
  * every command: [--json] [--root <dir>]
17
19
  *
18
20
  * The SAME writers the workspace page uses (lib/initiative-writer.js, lib/placements.js) — no server is needed. Who
@@ -61,12 +63,12 @@ function docNote(docs) {
61
63
  return `Not on the Roadmap · ${docs.length} on a document lane: ${names}. A document lane does not show on Home or the Board. If it is work, set lane: in its record to ${WORK_LANES}.`;
62
64
  }
63
65
 
64
- const COMMANDS = { initiative: ['new', 'top', 'up', 'down', 'bottom', 'after', 'check-by', 'adopt', 'drop', 'list', 'export', 'describe'] };
66
+ const COMMANDS = { initiative: ['new', 'top', 'up', 'down', 'bottom', 'after', 'check-by', 'adopt', 'drop', 'list', 'export', 'describe', 'raised-by'] };
65
67
  /** The horizon verbs D105 retired: they answer with what to use instead. */
66
68
  const RETIRED = Object.freeze(['now', 'next', 'later']);
67
69
  const USAGE = [
68
- 'usage: pmos initiative new|top|up|down|bottom|after|check-by|adopt|drop|list|export|describe — initiatives on the Roadmap',
69
- ' pmos initiative new "<title>" --lane <lane> --anchor <KR|health:id> [--intent "<text>"] [--id <id>] [--kind product|sdlc|project]',
70
+ 'usage: pmos initiative new|top|up|down|bottom|after|check-by|adopt|drop|list|export|describe|raised-by — initiatives on the Roadmap',
71
+ ' pmos initiative new "<title>" --lane <lane> --anchor <KR|health:id> [--intent "<text>"] [--id <id>] [--kind product|sdlc|project] [--raised-by "<who>"]',
70
72
  ' pmos initiative new --from capture-YYYY-MM-DD-<n> [--anchor <anchor>] [--lane <lane>] [--title "<title>"]',
71
73
  ' pmos initiative top|up|down|bottom <id> reorder it on the Roadmap',
72
74
  ' pmos initiative after <id> <other-id> rank it right after another initiative',
@@ -76,6 +78,7 @@ const USAGE = [
76
78
  ' pmos initiative list the Roadmap, ranked, with each lifecycle stage',
77
79
  ' pmos initiative export <id> the breakdown as markdown on stdout',
78
80
  ' pmos initiative describe <id> ["<text>"] read its description and what to draft it from; with text, save it (after the PM\'s yes)',
81
+ ' pmos initiative raised-by <id> ["<who>"|none] who raised it; with a value, save it: you, pmos, tracker, "teammate: <name>", "customer: <name>"',
79
82
  ' --lane is a work lane of this repository: new-feature, improvement, bug-fix, discovery or chore in a product repository',
80
83
  ' (scripts/lane-defs.js; the PMOS repository itself uses feature, discovery, chore, incident, content and prototype)',
81
84
  ' every command: [--json] [--root <dir>]',
@@ -83,7 +86,7 @@ const USAGE = [
83
86
  'Now, Next and Later are retired (D105): the rank says what comes first, the lifecycle stage says where it is.',
84
87
  ];
85
88
  const BOOL = new Set(['json', 'top', 'help']); // --top is kept so an old script gets the retired answer, not a usage error
86
- const VALUE = new Set(['lane', 'anchor', 'intent', 'id', 'from', 'title', 'root', 'kind']);
89
+ const VALUE = new Set(['lane', 'anchor', 'intent', 'id', 'from', 'title', 'root', 'kind', 'raised-by']);
87
90
  const DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
88
91
 
89
92
  function parse(argv) {
@@ -150,6 +153,7 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
150
153
  }
151
154
  if (flags.title) input.title = flags.title;
152
155
  for (const k of ['lane', 'anchor', 'intent', 'id', 'kind']) if (flags[k]) input[k] = flags[k];
156
+ if (flags['raised-by']) input.raised_by = flags['raised-by'];
153
157
  const actor = actorLib.fromCli(who);
154
158
  const r = writer.createInitiative(root, input, { actor, now });
155
159
  if (!r.ok) return fail(r.error);
@@ -214,6 +218,29 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
214
218
  return done({ written: r.written }, `✓ proposal ${eid} ${verb === 'adopt' ? 'kept' : 'dropped'}`);
215
219
  }
216
220
 
221
+ if (verb === 'raised-by') {
222
+ // who-raised-each-idea (bet A445): read who raised an initiative, or write its raised_by line
223
+ const rid = pos[0];
224
+ if (!rid || pos.length > 2) { say('usage: pmos initiative raised-by <id> ["<who>"|none]'); return 2; }
225
+ const ORIGIN = require('./initiative-origin.js');
226
+ if (pos.length === 2) {
227
+ const r = writer.setRaisedBy(root, rid, pos[1], { actor: actorLib.fromCli(who) });
228
+ if (!r.ok) return fail(r.error, r.status === 400 ? 2 : 1);
229
+ const o = ORIGIN.originOf({ raised_by: r.to, created: ORIGIN.createdBy(root).get(rid) });
230
+ return done({ id: rid, from: r.from || null, raised_by: r.to || null, origin: o, same: !!r.same },
231
+ r.same ? `${rid} says that already.` : `✓ ${rid}: raised by ${o ? o.label : 'not recorded'}. Commit the record to keep it.`);
232
+ }
233
+ const fs = require('fs');
234
+ let text = null;
235
+ for (const rel of ['planning/initiatives', 'pmos/state/initiatives']) { try { text = fs.readFileSync(path.join(root, rel, rid + '.md'), 'utf8'); break; } catch { /* the other layout */ } }
236
+ if (text == null) return fail(`no initiative ${rid} here`);
237
+ const o = ORIGIN.originOf({ raised_by: ORIGIN.raisedByOfText(text), created: ORIGIN.createdBy(root).get(rid) });
238
+ if (json) { say(JSON.stringify({ ok: true, id: rid, origin: o })); return 0; }
239
+ say(o ? `${rid}: raised by ${o.label} (${o.source === 'record' ? 'its raised_by line' : 'the Roadmap line that added it'}).` : `${rid}: who raised it is not recorded.`);
240
+ if (!o || o.source !== 'record') say(`Ask the PM who raised it; after the answer: pmos initiative raised-by ${rid} "<you|pmos|tracker|teammate: name|customer: name>"`);
241
+ return 0;
242
+ }
243
+
217
244
  if (verb === 'describe') {
218
245
  // initiative-description-field: the record's own description. Read with no text; write with text, only after the PM said yes.
219
246
  const did = pos[0];