create-pmos 0.401.0 → 0.402.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 (51) hide show
  1. package/package.json +13 -18
  2. package/payload/KIT-VERSION +2 -2
  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/payload/state/log.md +1 -1
  7. package/workspace/board-programs-test.js +226 -0
  8. package/workspace/board-shot.js +54 -0
  9. package/workspace/briefing-premium-board-test.js +22 -15
  10. package/workspace/briefing-premium-calendar-test.js +6 -3
  11. package/workspace/briefing-premium-sources-test.js +15 -10
  12. package/workspace/briefing-premium-test.js +38 -16
  13. package/workspace/changelog.json +12 -0
  14. package/workspace/fixtures/board-premium-facts.js +20 -3
  15. package/workspace/fixtures/briefing-premium-facts.js +18 -2
  16. package/workspace/fixtures/program-ascent.js +101 -0
  17. package/workspace/guide/home.md +11 -7
  18. package/workspace/guide/index.md +1 -0
  19. package/workspace/guide/programs.md +37 -0
  20. package/workspace/lib/briefing-premium-products.js +4 -4
  21. package/workspace/lib/briefing-premium.js +2 -2
  22. package/workspace/lib/programs.js +129 -0
  23. package/workspace/lib/route-modules.js +1 -0
  24. package/workspace/lib/routes-briefing-premium.js +1 -1
  25. package/workspace/lib/routes-programs.js +122 -0
  26. package/workspace/package-lock.json +2 -2
  27. package/workspace/package.json +1 -1
  28. package/workspace/premium-board-actions-test.js +1 -1
  29. package/workspace/premium-vw-cal-test.js +6 -3
  30. package/workspace/program-panel-test.js +143 -0
  31. package/workspace/public/pm/bd-acts.js +23 -14
  32. package/workspace/public/pm/bd-asks.js +89 -23
  33. package/workspace/public/pm/bd-prog-panel.js +451 -0
  34. package/workspace/public/pm/bd-prog.js +191 -0
  35. package/workspace/public/pm/bd-span.js +98 -15
  36. package/workspace/public/pm/bd-views.js +93 -29
  37. package/workspace/public/pm/cozy-board.css +226 -9
  38. package/workspace/public/pm/cozy-home.css +26 -0
  39. package/workspace/public/pm/cozy-panel.css +178 -0
  40. package/workspace/public/pm/cozy-today.css +189 -0
  41. package/workspace/public/pm/home-app.js +75 -19
  42. package/workspace/public/pm/home-chat.js +8 -4
  43. package/workspace/public/pm/home-data.js +1 -1
  44. package/workspace/public/pm/home-list.js +98 -17
  45. package/workspace/public/pm/home-today.js +137 -59
  46. package/workspace/public/pm/premium-board.js +225 -57
  47. package/workspace/public/pm/program-model.js +192 -0
  48. package/workspace/public/premium-board.html +4 -1
  49. package/workspace/test-lists/board-programs.json +9 -0
  50. package/workspace/test-lists/program-hierarchy.json +11 -0
  51. package/workspace/test-lists/program-panel.json +9 -0
@@ -27,7 +27,7 @@ const moreItem = async (pg, label, sel) => {
27
27
  await pg.click('#czFab'); await pg.click('#czMenu ' + PLACE_ITEM[label]);
28
28
  await pg.waitForSelector('#czViewer ' + sel, { timeout: 15000 });
29
29
  };
30
- const srcRowsOf = (pg) => pg.$$eval('#hmList .hm-r[data-id^="n:src:"]', (els) => els.map((e) => ({ key: e.dataset.id.slice(2), title: e.querySelector('.hm-rt b').textContent, line2: (e.querySelector('.hm-rt em') || {}).textContent || '' })));
30
+ const srcRowsOf = (pg) => pg.$$eval('#hmList .hm-r[data-id^="n:src:"]', (els) => els.map((e) => ({ key: e.dataset.id.slice(2), title: e.querySelector('.hm-rt b').textContent, line2: (e.querySelector('.hm-rt em') || {}).textContent || (e.querySelector('.hm-rm') || { title: '' }).title || '' }))); // Home A + C (HvAC): a row is one line; the second line is the row's title (its tooltip)
31
31
  const allNeeds = async (pg) => { for (let i = 0; i < 20; i++) { const t = await pg.textContent('#hmList [data-hm-allneeds]').catch(() => null); if (t === null || !/Show$/.test(t.trim())) return; await pg.click('#hmList [data-hm-allneeds]', { timeout: 2000 }).catch(() => {}); await sleep(150); } };
32
32
  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); } };
33
33
  const results = [];
@@ -101,7 +101,8 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
101
101
  // the greeting is a morning card (the evening shows the day's recap instead): the page reads a fixed morning clock
102
102
  const am = new Date(); am.setHours(10, 0, 0, 0); await page.clock.setFixedTime(am);
103
103
  await page.goto(BASE + '/premium.html?theme=' + theme, { waitUntil: 'domcontentloaded' });
104
- await page.waitForSelector('#hmList .hm-r[data-id^="n:src:"]', { state: 'attached', timeout: 60000 });
104
+ // the list is drawn: on a phone "Not in an initiative" starts folded (Home A + C, HvAC), so its folded line stands for its rows there
105
+ await page.waitForSelector(w > 760 ? '#hmList .hm-r[data-id^="n:src:"]' : '#hmList .hv-lh', { state: 'attached', timeout: 60000 });
105
106
  return { ctx, page, errors };
106
107
  };
107
108
 
@@ -109,11 +110,11 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
109
110
  const { ctx, page, errors } = await open();
110
111
  await allNeeds(page);
111
112
  const rows = await srcRowsOf(page);
112
- ok('S2 the first row is two lines: the title, then the product, the source and sender · the verb and the prepared line', rows[0] && rows[0].title === 'Confirm the Thursday review' && rows[0].line2 === 'Across products · Mail · Anna Lee · Reply: Confirm Thursday', JSON.stringify(rows[0]));
113
+ ok('S2 the first row is its title, with the product, the source and sender · the verb and the prepared line as its detail', rows[0] && rows[0].title === 'Confirm the Thursday review' && rows[0].line2 === 'Across products · Mail · Anna Lee · Reply: Confirm Thursday', JSON.stringify(rows[0]));
113
114
  ok('S2 a row with a verb and no prepared line shows the verb alone', rows[1] && /Confluence · Budi Santoso · Sign off$/.test(rows[1].line2), JSON.stringify(rows[1]));
114
115
  // premium-uncovered-features (canvas HmMyWork): no Needs you group; the greeting counts the next steps that are yours, the source rows among them
115
- const needN = await page.textContent('#hmList .hm-tc .big'), allRows = await page.$$eval('#hmList .hm-r[data-id^="n:"]', (els) => els.length);
116
- const gn = /(\d+) next steps? (?:is|are) yours/.exec(needN || '');
116
+ const needN = await page.textContent('#hmList .hv-sub'), allRows = await page.$$eval('#hmList .hm-r[data-id^="n:"]', (els) => els.length);
117
+ const gn = /(\d+) (?:is|are) yours/.exec(needN || ''); // "N are yours" (HvAC)
117
118
  ok('S6 Home counts the rows: the four source rows are among the next steps, and the greeting counts them all', rows.length === 4 && !!gn && +gn[1] >= allRows && allRows >= 4, needN + ' / ' + allRows);
118
119
  await page.click(`#hmList [data-hm-sel="n:${rows[0].key}"]`);
119
120
  await page.waitForSelector('#czViewer #srcLink');
@@ -176,16 +177,17 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
176
177
  * (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
177
178
  * nothing scrolls sideways. A source row that drifted off the design's tokens fails here as it failed against the mockup. */
178
179
  {
179
- // re-pointed again for the Agreed design's Home: the source row is a Needs-you row of Home's list, and the digest is a row of New for you
180
- const ROWS = [['row', '.hm-rm'], ['number', '.hm-dot'], ['title', '.hm-rt b'], ['subject', '.hm-rt em']];
180
+ // re-pointed again for the Agreed design's Home: the source row is a Needs-you row of Home's list, and the digest is a row of New for you.
181
+ // Re-pointed for Home A + C (HvAC, HvACDesk): a row is one line, its mark and its title; the subject moved to the row's tooltip and
182
+ // accessible name, and the title is 14.5 px on a desktop, 15 px on a phone, weight 600
183
+ const ROWS = [['row', '.hm-rm'], ['number', '.hv-d'], ['title', '.hm-rt b']];
181
184
  const DIGS = [['event', ''], ['eventTime', '.ev-tx .ev-mut'], ['eventTitle', '.ev-tx b']];
182
185
  const SANS = 'var(--cz-sans)';
183
186
  /* The design's values, as the tokens name them (a value that starts var( is resolved in the page; anything else is literal) */
184
187
  const WANT = {
185
188
  row: { fontFamily: SANS, color: 'var(--cz-ink)', backgroundColor: 'transparent' },
186
- number: { backgroundColor: 'var(--cz-blue)', borderRadius: '50%', width: '7px', height: '7px' }, // the row's dot is blue: it waits on you
187
- title: { fontFamily: SANS, fontSize: '14px', fontWeight: '700', color: 'var(--cz-ink)' },
188
- subject: { fontFamily: SANS, fontSize: '12.5px', color: 'var(--cz-blueink)' }, // the canvas's row line (.lrow .s, premium-uncovered-features)
189
+ number: { backgroundColor: 'var(--cz-blue)', borderRadius: '50%', width: '8px', height: '8px' }, // the row's dot is blue: it waits on you (HvAC .d)
190
+ title: { fontFamily: SANS, fontSize: '14.5px', fontWeight: '600', color: 'var(--cz-ink)' }, // HvACDesk .t; 15px on a phone (HvAC .t b)
189
191
  event: { fontFamily: SANS, color: 'var(--cz-ink)', backgroundColor: 'transparent' }, // a row of New for you's table (cozy-ev.css)
190
192
  eventTime: { fontSize: '12.5px', color: 'var(--cz-ink3)' },
191
193
  eventTitle: { fontFamily: SANS, fontSize: '13.5px', fontWeight: '700', color: 'var(--cz-ink)' },
@@ -217,6 +219,9 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
217
219
  const R = await open({ w, h, theme: th });
218
220
  // on a phone the list is the page (canvas HmPhone)
219
221
  await allNeeds(R.page);
222
+ // on a phone "Not in an initiative" starts folded (HvAC): open it to reach the source row
223
+ if (w === 390) { const lh = await R.page.$('#hmList .hv-lh[aria-expanded="false"]'); if (lh) await lh.click(); }
224
+ WANT.title.fontSize = w === 390 ? '15px' : '14.5px';
220
225
  await sleep(500);
221
226
  const rowSel = '#hmList .hm-r[data-id^="n:src:"]';
222
227
  const diffs = diff(await grab(R.page, ROWS, rowSel, '.hm-pg'), ROWS, 4); // the row fills its group (the group's own inset aside)
@@ -15,6 +15,7 @@
15
15
  * W1-W8 record a decision, put a row off, start an agent; the POST answers are mocked here, the refusals are the real server's
16
16
  * R11 floors: 44 px targets on a phone, no sideways scroll at 390 px in both themes, Escape closes the Viewer
17
17
  * R12 fidelity to the Agreed design at 1440 and 390 px, light and dark: cozy tokens, the 316 px list, the selected row's lift
18
+ * H4 the program panel's links into Home (initiative program-hierarchy): ?item=pt:<program>:<key> and ?ask=program:<id>
18
19
  * Every wait polls the page. */
19
20
  const fs = require('fs');
20
21
  const path = require('path');
@@ -52,7 +53,7 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
52
53
  await T.waitForServer(BASE);
53
54
  browser = await chromium.launch({ executablePath: exe });
54
55
 
55
- const open = async ({ w = 1440, h = 900, theme = 'light', model = MODEL, fail = false, mock = true, touch = false } = {}) => {
56
+ const open = async ({ w = 1440, h = 900, theme = 'light', model = MODEL, fail = false, mock = true, touch = false, programs = null, qs = '' } = {}) => {
56
57
  const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: theme, hasTouch: touch });
57
58
  const page = await ctx.newPage();
58
59
  const errors = [], reqs = [], posts = [];
@@ -61,13 +62,14 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
61
62
  const json = (body, status = 200) => (r) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(body) });
62
63
  await page.route(/\/api\/briefing-premium(\?.*)?$/, fail ? json({ ok: false, error: 'the repository could not be read' }, 500) : json({ ok: true, state: 'ready', model, as_of: Date.now() }));
63
64
  if (fail) await page.route(/\/api\/board-premium(\?.*)?$/, json({ ok: false, error: 'the repository could not be read' }, 500));
65
+ if (programs) await page.route('**/api/programs', json({ ok: true, programs }));
64
66
  await page.route('**/api/briefing-premium/thread**', json({ ok: true, turns: [], working: false }));
65
67
  if (mock) for (const act of ['decide', 'put-off', 'return', 'start']) await page.route('**/api/briefing-premium/' + act + '*', json({ ok: true, session: 's-new' }));
66
68
  if (mock) await page.route('**/api/agent/start*', json({ ok: true, session: 's-new', id: 's-new' })); // Start opens a real agent session: answered here
67
69
  // Home's card depends on the hour (the evening shows the day's recap, not the greeting): the page reads a fixed morning clock, so
68
70
  // the suite gives the same answer at any time of day
69
71
  const am = new Date(); am.setHours(10, 0, 0, 0); await page.clock.setFixedTime(am);
70
- await page.goto(BASE + '/premium.html?theme=' + theme);
72
+ await page.goto(BASE + '/premium.html?theme=' + theme + qs);
71
73
  const up = await until(() => page.evaluate((sel) => document.querySelectorAll(sel).length > 0 || /could not read/.test((document.querySelector('#hmList') || {}).textContent || ''), NEEDS), 20000);
72
74
  return { ctx, page, errors, reqs, posts, up };
73
75
  };
@@ -103,24 +105,26 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
103
105
  /* R2 */
104
106
  { await p.click('[data-hm-new]');
105
107
  const nw = await until(() => p.evaluate(() => { const m = document.querySelector('#hmMenu:not([hidden])'); return m ? [...m.querySelectorAll('[role=menuitem], button')].map((b) => b.textContent.trim()).filter(Boolean) : null; }));
106
- ok('R2 the list head reads Today, and New offers its six choices (A task first since the testing fixes, Record a note now last)', await p.evaluate(() => document.querySelector('#hmList .hm-hd h1').textContent === 'Today') && !!nw && nw.length === 6 && /^A task/.test(nw[0]) && /^Record a note now/.test(nw[5]), JSON.stringify(nw));
108
+ ok('R2 the list head is the greeting (Home A + C, HvAC), and New offers its six choices (A task first since the testing fixes, Record a note now last)', await p.evaluate(() => /^Good (morning|afternoon|evening)$/.test(document.querySelector('#hmList .hm-hd [data-hm-day] b').textContent)) && !!nw && nw.length === 6 && /^A task/.test(nw[0]) && /^Record a note now/.test(nw[5]), JSON.stringify(nw));
107
109
  await p.keyboard.press('Escape');
108
110
  ok('R2 the list head has no fold button (no header chrome, canvas HmMyWork)', await p.evaluate(() => !document.querySelector('[data-hm-fold]'))); }
109
111
 
110
112
  /* R4 */
111
- { const L = await p.evaluate((sel) => ({ rows: [...document.querySelectorAll(sel)].map((r) => ({ id: r.dataset.id, t: r.querySelector('.hm-rt b').textContent, h: r.querySelector('.hm-rt em').textContent, tile: Math.round((r.querySelector('.hm-tile, [class*="tile"]') || r).getBoundingClientRect().width) })), more: (document.querySelector('[data-hm-allneeds]') || {}).textContent || '', sel: (document.querySelector('.hm-r.sel') || {}).dataset ? document.querySelector('.hm-r.sel').dataset.id : null }), NEEDS);
112
- const G = await p.evaluate(() => ({ groups: [...document.querySelectorAll('#hmList [aria-label]')].map((g) => g.getAttribute('aria-label')), greet: (document.querySelector('#hmList .hm-tc .big') || {}).textContent || '' }));
113
+ { const L = await p.evaluate((sel) => ({ rows: [...document.querySelectorAll(sel)].map((r) => ({ id: r.dataset.id, t: r.querySelector('.hm-rt b').textContent, h: (r.querySelector('.hm-rm') || {}).title || '', mark: !!r.querySelector('.hv-mk .hv-d, .hv-mk .hv-ck, .hv-mk svg') })), more: (document.querySelector('[data-hm-allneeds]') || {}).textContent || '', sel: (document.querySelector('.hm-r.sel') || {}).dataset ? document.querySelector('.hm-r.sel').dataset.id : null }), NEEDS);
114
+ const G = await p.evaluate(() => ({ groups: [...document.querySelectorAll('#hmList [aria-label]')].map((g) => g.getAttribute('aria-label')), greet: (document.querySelector('#hmList .hv-sub') || {}).textContent || '' }));
113
115
  ok('R4 Home has no Needs you group and no Your list; every next step of the model is a row of the one list', !G.groups.includes('Needs you') && !G.groups.includes('Your list') && MODEL.list.rows.every((m) => L.rows.some((r) => r.id === 'n:' + m.key)), JSON.stringify({ G, n: L.rows.length, want: MODEL.list.rows.length }));
114
- ok('R4 every row has its tile, its title and a hint', L.rows.every((r) => r.tile >= 30 && r.t.length > 3), JSON.stringify(L.rows));
115
- const gn = /(\d+) next steps? (?:is|are) yours/.exec(G.greet);
116
- ok('R4 the greeting counts the next steps that are yours', !!gn && +gn[1] >= L.rows.length, G.greet);
116
+ ok('R4 every row is one line: its mark (a dot or a check box) and its title (HvAC)', L.rows.every((r) => r.mark && r.t.length > 3), JSON.stringify(L.rows));
117
+ const gn = /(\d+) (?:is|are) yours/.exec(G.greet);
118
+ ok('R4 "N are yours" counts the next steps that are yours', !!gn && +gn[1] >= L.rows.length, G.greet);
117
119
  ok('R4 on a desktop the first next step is selected when Home opens', !!L.sel && L.rows.some((r) => r.id === L.sel), JSON.stringify(L));
118
120
  const r0 = L.rows.find((r) => r.id === 'n:waited:reviews') || L.rows[0];
119
121
  await p.click(`.hm-r[data-id="${r0.id}"] .hm-rm`); // Settings and Search took the Viewer above; selecting the row again opens its own
120
122
  const v0 = await until(() => p.evaluate(vw));
121
123
  ok('R4 the selected row opens its Viewer beside its chat', !!v0 && v0.title === r0.t && await p.evaluate(() => !!document.querySelector('#hmLog')), JSON.stringify(v0));
122
- const lift = await p.evaluate(() => getComputedStyle(document.querySelector('.hm-r.sel')).boxShadow);
123
- ok('R12 the selected row is a card with a lift shadow', lift && lift !== 'none', lift); }
124
+ const selBg = await p.evaluate(() => getComputedStyle(document.querySelector('.hm-r.sel')).backgroundColor);
125
+ ok('R12 the selected row is tinted (HvACDesk .sel)', selBg && !/rgba\(0, 0, 0, 0\)|transparent/.test(selBg), selBg);
126
+ const hd = await p.evaluate(() => { const h = document.querySelector('#hmCh'); return h && !h.hidden ? { t: (h.querySelector('.hm-chb') || {}).textContent || '', mark: !!h.querySelector('.hv-mk .hv-d, .hv-mk .hv-ck'), y: Math.round(h.getBoundingClientRect().top), size: getComputedStyle(h.querySelector('.hm-chb')).fontSize } : null; });
127
+ ok('R12 the chat\'s header line names the open row: its mark and its title, 17 px, at the top of the chat card (HvACDesk .ch)', !!hd && hd.t === r0.t && hd.mark && hd.y === 32 && hd.size === '17px', JSON.stringify(hd)); }
124
128
 
125
129
  /* R10 */
126
130
  ok('R10 a page where nothing was pressed to record sends no POST', A.posts.filter((x) => /briefing-premium\/(decide|put-off|return|start)/.test(x.path)).length === 0, JSON.stringify(A.posts.map((x) => x.path)));
@@ -155,6 +159,7 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
155
159
  ok('W3 "Tomorrow" posts the key and the time', !!(await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/put-off' && x.body.key === k2 && x.body.until === 'tomorrow'))));
156
160
  /* the row's × puts it off until tomorrow */
157
161
  const k3 = 'blocked:onboarding-scan';
162
+ await p.click(`.hm-r[data-id="n:${k3}"] .hm-rm`).catch(() => {}); // Home A + C: the × shows on the open row only
158
163
  await p.click(`.hm-r[data-id="n:${k3}"] [data-hm-end]`).catch(() => {});
159
164
  ok('W3 the row\'s × puts it off until tomorrow', !!(await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/put-off' && x.body.key === k3))));
160
165
  /* W8 start */
@@ -219,10 +224,14 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
219
224
  /* R8, R11, R12 on a phone, both themes */
220
225
  for (const theme of ['light', 'dark']) {
221
226
  const P = await open({ w: 390, h: 844, theme, touch: true });
222
- const rows = await until(() => P.page.evaluate((sel) => { const l = document.querySelector('#hmList'); return l && getComputedStyle(l).display !== 'none' ? document.querySelectorAll(sel).length : 0; }, NEEDS));
223
- const top = await P.page.evaluate(() => (document.querySelector('#hmList .hm-tc .big') || {}).textContent || '');
224
- const tn = /(\d+) next steps? (?:is|are) yours/.exec(top);
225
- ok(`R8 (${theme}) on a phone the list is the page and its greeting counts the next steps it shows`, rows >= MODEL.list.rows.length && !!tn && +tn[1] >= rows && await P.page.evaluate(() => document.body.classList.contains('hm-plist')), JSON.stringify({ top, rows }));
227
+ // Home A + C (HvAC, HvAOpen): the list folds "Not in an initiative" on a phone; every next step is in Your day, which "Good morning" opens
228
+ await until(() => P.page.evaluate(() => { const l = document.querySelector('#hmList'); return l && getComputedStyle(l).display !== 'none' && !!document.querySelector('#hmList .hv-sub'); }));
229
+ const top = await P.page.evaluate(() => (document.querySelector('#hmList .hv-sub') || {}).textContent || '');
230
+ await P.page.click('#hmList [data-hm-day]');
231
+ const rows = await until(() => P.page.evaluate((sel) => document.querySelectorAll('#hmList .hv-sheet ' + sel.replace('#hmList ', '')).length, NEEDS));
232
+ await P.page.click('#hmList .hv-sheet [data-hm-dayx]');
233
+ const tn = /(\d+) (?:is|are) yours/.exec(top);
234
+ ok(`R8 (${theme}) on a phone the list is the page; "N are yours" counts the next steps Your day lists`, rows >= MODEL.list.rows.length && !!tn && +tn[1] >= rows && await P.page.evaluate(() => document.body.classList.contains('hm-plist')), JSON.stringify({ top, rows }));
226
235
  const small = await P.page.evaluate(() => [...document.querySelectorAll('#hmTop button, #hmList .hm-rm, #hmFoot button, #hmFoot label')].filter((b) => b.offsetParent !== null).map((b) => b.getBoundingClientRect()).filter((r) => r.height && r.height < 43.5).length);
227
236
  ok(`R11 (${theme}) every control on the phone's top bar, sheet and composer is 44 px`, small === 0, String(small));
228
237
  const ov = await P.page.evaluate(() => document.documentElement.scrollWidth - innerWidth);
@@ -233,14 +242,27 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
233
242
  await P.ctx.close();
234
243
  }
235
244
 
245
+ /* H4 the program panel's links into Home: ?item=pt:<program>:<key> selects that program task; ?ask=program:<id> opens the chat with the program as its scope */
246
+ { const PR = require('./fixtures/program-ascent.js').programs();
247
+ const T1 = await open({ programs: PR, qs: '&item=pt:project-ascent:pt-vendor-form' });
248
+ const s1 = await until(() => T1.page.evaluate(() => { const r = document.querySelector('.hm-r.sel'); const h = document.querySelector('#hmCh'); return r && h && !h.hidden ? { id: r.dataset.id, head: h.textContent, chip: ((document.querySelector('#hmFoot [data-hm-scope]') || {}).textContent || '') } : null; }));
249
+ ok('H4 ?item=pt:<program>:<key> selects that program task in its group, and its chat is the program\'s', !!s1 && s1.id === 'pt:project-ascent:pt-vendor-form' && /Sign the CIAM vendor order form/.test(s1.head) && /Project Ascent/.test(s1.head) && /In: Project Ascent/.test(s1.chip), JSON.stringify(s1));
250
+ await T1.ctx.close();
251
+ const T2 = await open({ programs: PR, qs: '&ask=program:project-ascent&label=Project%20Ascent' });
252
+ const s2 = await until(() => T2.page.evaluate(() => { const c = document.querySelector('#hmFoot [data-hm-scope]'); return c && /Project Ascent/.test(c.textContent) ? { chip: c.textContent, head: (document.querySelector('#hmCh .hm-chb') || {}).textContent || '', sel: !!document.querySelector('.hm-r.sel') } : null; }));
253
+ ok('H4 ?ask=program:<id> opens the chat with the program as its scope, and selects no row', !!s2 && s2.head === 'Project Ascent' && !s2.sel, JSON.stringify(s2));
254
+ ok('0 no page error on the program links', T1.errors.length === 0 && T2.errors.length === 0, T1.errors.concat(T2.errors).join(' | '));
255
+ await T2.ctx.close();
256
+ }
257
+
236
258
  /* R12 fidelity at 1440, light and dark */
237
259
  for (const theme of ['light', 'dark']) {
238
260
  const D = await open({ theme });
239
261
  const f = await D.page.evaluate(() => {
240
- const desk = document.querySelector('#hmDesk'), list = document.querySelector('#hmList'), cs = getComputedStyle(desk), r = desk.getBoundingClientRect();
262
+ const desk = document.querySelector('#hmDesk'), list = document.querySelector('#hmList'), cs = getComputedStyle(document.querySelector('#hmChat')), r = list.getBoundingClientRect();
241
263
  return { inset: Math.round(r.left), radius: cs.borderTopLeftRadius, list: Math.round(list.getBoundingClientRect().width), font: getComputedStyle(document.body).fontFamily, theme: document.documentElement.dataset.theme || '', bg: getComputedStyle(document.body).backgroundColor, rail: !!document.querySelector('nav.rail'), menu: !!document.querySelector('#czMenu, .cz-nav') };
242
264
  });
243
- ok(`R12 Home follows the Agreed design at 1440 px, ${theme}: the desk at 16 px with a 28 px radius, the 316 px list, Nunito, the floating place menu, no rail`, f.inset === 16 && f.radius === '28px' && f.list === 316 && /Nunito/.test(f.font) && f.menu && !f.rail, JSON.stringify(f));
265
+ ok(`R12 Home follows the Home A + C design at 1440 px (HvACDesk), ${theme}: the list at 16 px and 360 px wide, the chat a card with a 24 px radius, Nunito, the floating place menu, no rail`, f.inset === 16 && f.radius === '24px' && f.list === 360 && /Nunito/.test(f.font) && f.menu && !f.rail, JSON.stringify(f));
244
266
  await D.ctx.close();
245
267
  }
246
268
  return finish();
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.402.0",
4
+ "at": "2026-10-24T03:05:59.743Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1031,
9
+ "t": "Build the Ready for development page (Home A+C, Programs, 60% panel)",
10
+ "s": "Build the Ready for development page (Home A+C, Programs, 60% panel)"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.401.0",
4
16
  "at": "2026-10-23T23:36:01.429Z",
@@ -1,6 +1,10 @@
1
1
  'use strict';
2
2
  /* fixtures/board-premium-facts.js — the facts lib/board-premium.js builds from, for a plausible board on 17 Oct 2026, 09:12 local. Shapes follow the routes
3
- * of lib/routes-boards.js and lib/routes-core-docs.js. Seven initiatives are loaded of nine open; one is late with a recorded end date in the past. */
3
+ * of lib/routes-boards.js and lib/routes-core-docs.js. Seven initiatives are loaded of nine open; one is late with a recorded end date in the past.
4
+ *
5
+ * Programs (initiative program-hierarchy): programFacts(ws) is the board of one product of Project Ascent (fixtures/program-ascent.js), ws 'idpf'
6
+ * or 'microsites', and programs() what GET /api/programs answers for it. The Board fetches /api/programs on its own, so a shot routes both:
7
+ * /api/board-premium?ws=idpf → build(programFacts('idpf')) /api/programs → { ok: true, programs: programs() } */
4
8
  const NOW = new Date(2026, 9, 17, 9, 12).getTime();
5
9
  // The eight lifecycle steps (premium-agreed-design L1): six stages and two milestones, as scripts/boards.js SELF_LADDER draws them.
6
10
  const WF = ['Triage', 'Discover', 'Plan', 'Prioritize', 'Build', 'Deliver', 'Monitor', 'Evaluate'].map((name, i) => ({ name, cat: ['Discover', 'Discover', 'Plan', 'Plan', 'Do', 'Do', 'Learn', 'Learn'][i], ...(name === 'Deliver' || name === 'Evaluate' ? { milestone: true } : {}) }));
@@ -14,7 +18,7 @@ const ROWS = [
14
18
  row('refund-reason-codes', 'Refund reason codes', { stage: 'Evaluate', cat: 'Learn', status: 'on track', progress: 100, dupOf: 'refund-flow' }),
15
19
  row('docs-search', 'Docs search', { lane: 'chore', stage: 'Build', status: 'on track', warnings: ['no recorded owner'] }),
16
20
  ];
17
- const columns = () => WF.map((s) => { const rs = ROWS.filter((r) => r.stage === s.name); return { stage: s.name, cat: s.cat, hint: 'Derived by scripts/workflow-state.js; not moved by hand.', count: rs.length + (s.name === 'Evaluate' ? 20 : 0), rows: rs }; });
21
+ const columns = (rows = ROWS) => WF.map((s) => { const rs = rows.filter((r) => r.stage === s.name); return { stage: s.name, cat: s.cat, hint: 'Derived by scripts/workflow-state.js; not moved by hand.', count: rs.length + (s.name === 'Evaluate' ? 20 : 0), rows: rs }; });
18
22
  const doc = (key, title, o = {}) => ({ key, title, ic: 'doc', for: 'What ' + title + ' is for.', reader: 'Team', cadence: 'Every two weeks', by: 'drafts', kind: 'doc', st: 'missing', act: { label: 'Draft it', do: 'draft' }, running: false, open: null, ...o });
19
23
  const DOCS = [
20
24
  doc('charter', 'Board charter', { cadence: 'When the board changes' }),
@@ -36,4 +40,17 @@ function facts(o = {}) {
36
40
  nextRelease: null, ...o,
37
41
  };
38
42
  }
39
- module.exports = { NOW, facts, row, ROWS, WF, doc };
43
+ const ASCENT = require('./program-ascent.js');
44
+ /** One product of Project Ascent as a board: its rows, its stage columns, both products in the switcher. */
45
+ function programFacts(ws = 'idpf', o = {}) {
46
+ const prod = ASCENT.PRODUCTS.find((p) => p.ws === ws) || ASCENT.PRODUCTS[0];
47
+ const rows = ASCENT.ROWS[prod.ws].map((r) => ({ ...r }));
48
+ const open = rows.length;
49
+ return facts({
50
+ boards: ASCENT.PRODUCTS.map((p) => ({ ws: p.ws, id: p.ws, name: p.name })),
51
+ board: { ws: prod.ws, id: prod.ws, name: prod.name, product: prod.name, workflow: WF },
52
+ counts: { total: open + 12, open, byStage: {}, byStatus: { 'on track': rows.filter((r) => r.status === 'on track').length, 'at risk': rows.filter((r) => r.status === 'at risk').length, late: 0, 'on hold': 0, done: 12, cancelled: 0 } },
53
+ rows, total: open, columns: columns(rows), ...o,
54
+ });
55
+ }
56
+ module.exports = { NOW, facts, row, ROWS, WF, doc, programFacts, programs: ASCENT.programs, ASCENT };
@@ -1,7 +1,13 @@
1
1
  'use strict';
2
2
  /* fixtures/briefing-premium-facts.js — the facts the premium Briefing suites build the page from (initiative briefing-premium).
3
3
  * They reproduce the shape of the mockup's snapshot: two blocked initiatives, a prototype waiting for a disposition with a meeting that
4
- * needs it, one missed kill-condition date, five failed reviews, merges and runs today, one meeting ahead and one earlier. */
4
+ * needs it, one missed kill-condition date, five failed reviews, merges and runs today, one meeting ahead and one earlier.
5
+ *
6
+ * Programs (initiative program-hierarchy; canvas PgHomePhone, PgHomeDesk): Home with Project Ascent (fixtures/program-ascent.js) across IDPF and
7
+ * Microsites. Home reads three answers for it, so a shot routes:
8
+ * /api/briefing-premium → { ok, model: B.buildMany(programFacts()) } both products, IDPF the home one
9
+ * /api/board-premium?ws=<ws> → { ok, model: BP.build(programBoard(ws)) } each product's rows (ws idpf or microsites)
10
+ * /api/programs → { ok: true, programs: programs() } */
5
11
  const NOW = new Date(2026, 9, 15, 18, 5).getTime();
6
12
  const at = (h, m) => new Date(2026, 9, 15, h, m).getTime();
7
13
  const day = (d) => NOW - d * 86400000;
@@ -29,4 +35,14 @@ function facts() {
29
35
  missing: [],
30
36
  };
31
37
  }
32
- module.exports = { facts, NOW };
38
+ const ASCENT = require('./program-ascent.js');
39
+ /** The several-products input of lib/briefing-premium.js buildMany: IDPF and Microsites, each product's initiatives being Ascent's rows. */
40
+ function programFacts() {
41
+ const part = (p) => ({ product: { ws: p.ws, name: p.name }, state: 'ready',
42
+ f: { initiatives: ASCENT.ROWS[p.ws].map((r) => init(r.id, { title: r.title, lane: r.lane, stage: String(r.stage).toLowerCase(), anchor: r.anchor })), runs: [], merges: [], evals: [], tripwires: [], missing: [] } });
43
+ const base = facts();
44
+ return { now: NOW, asOf: NOW, meetings: base.meetings, defers: {}, available: ASCENT.PRODUCTS.map((p, i) => ({ ws: p.ws, name: p.name, home: i === 0, on: true, ...(p.ws === 'microsites' ? { initials: 'MS' } : {}) })), parts: ASCENT.PRODUCTS.map(part) };
45
+ }
46
+ /** Each product's board facts, for /api/board-premium?ws=<ws> (lib/board-premium.js build), from the Board fixture. */
47
+ const programBoard = (ws) => require('./board-premium-facts.js').programFacts(ws, { now: NOW });
48
+ module.exports = { facts, NOW, programFacts, programBoard, programs: ASCENT.programs, ASCENT };
@@ -0,0 +1,101 @@
1
+ 'use strict';
2
+ /* fixtures/program-ascent.js — Project Ascent, the CIAM migration, as a program across two products (initiative program-hierarchy; canvas PgModel,
3
+ * PgProgram, PgMilestones, PgTimeline, PgBoard, PgHomePhone). The Home fixture (briefing-premium-facts.js) and the Board fixture
4
+ * (board-premium-facts.js) both read it, so a screenshot of either page shows the same program.
5
+ *
6
+ * PRODUCTS the two products: IDPF (ws idpf, where the charter is) and Microsites (ws microsites)
7
+ * ledgers() [{ ws, lines }] each workspace's <state>/programs.jsonl, as lib/programs.js merge reads them
8
+ * programs() [program] what GET /api/programs answers (merge of ledgers()); a shot routes { ok: true, programs: programs() }
9
+ * ROWS { [ws]: [row] } each product's initiative rows in the Board model's shape (id, title, stage, anchor, status, end …)
10
+ * KRS { [anchor]: { name } } the KR names the goal row shows (pm/program-model.js goalsByPeriod krsOf)
11
+ * ANCHORS · GOALS · ITEMS { [ws]: [...] } what the program panel reads per product: the declared KRs, the Insights goals, the PMOS tasks
12
+ *
13
+ * Eight milestones: two done (program checks the PM marked), Pilot live waiting on two initiatives, three more close to it in November (they merge on
14
+ * the timeline), two program checks still open. The span is Sep 2026 to Jun 2028. Two program tasks sit on the program itself. */
15
+ const P = require('../lib/programs.js');
16
+
17
+ const PRODUCTS = [{ ws: 'idpf', name: 'IDPF' }, { ws: 'microsites', name: 'Microsites' }];
18
+
19
+ const row = (id, title, o = {}) => ({ id, title, lane: 'feature', stage: 'Triage', cat: 'Discover', owner: null, anchor: 'q4-2026:o2:kr1', horizon: 'now', status: 'on track',
20
+ start: null, end: null, progress: null, warnings: [], rank: 0, health: 'on', updated: '2026-10-15T08:00:00.000Z', reading: 'triage', stageSource: 'derived', dupOf: null, ...o });
21
+ const ROWS = {
22
+ idpf: [
23
+ row('legacy-idp-sunset', 'Legacy IdP sunset', { owner: 'Dara', anchor: 'q4-2026:o2:kr3', start: '2026-10-11', end: '2027-02-20', progress: 10 }),
24
+ row('descope-parity', 'Descope feature parity', { owner: 'Wawan', stage: 'Discover', anchor: 'q4-2026:o2:kr1', start: '2026-10-05', end: '2026-11-12', progress: 40, reading: 'discover' }),
25
+ row('usage-billing', 'Usage-based billing', { anchor: 'q4-2026:o3:kr1', status: 'at risk', warnings: ['no recorded owner'] }),
26
+ row('eshop-inline-login', 'Inline login for eShop checkout', { owner: 'Wawan', stage: 'Monitor', cat: 'Learn', anchor: 'q4-2026:o3:kr1', start: '2026-08-01', end: '2026-12-05', progress: 100, reading: 'monitor' }),
27
+ ],
28
+ microsites: [
29
+ row('microsite-signin', 'Microsite sign-in on CIAM', { owner: 'Rina', stage: 'Plan', cat: 'Plan', anchor: 'q4-2026:o1:kr2', start: '2026-10-12', end: '2026-11-14', progress: 25, reading: 'plan' }),
30
+ row('psle-refresh', 'PSLE microsite refresh', { lane: 'content', owner: 'Mei', stage: 'Build', cat: 'Do', anchor: 'q4-2026:o1:kr1', start: '2026-10-01', end: '2026-11-28', progress: 60, reading: 'build' }),
31
+ ],
32
+ };
33
+
34
+ const KRS = {
35
+ 'q4-2026:o2:kr1': { name: 'Sign-in success 99.5%' },
36
+ 'q4-2026:o2:kr3': { name: 'Retire legacy IdP' },
37
+ 'q4-2026:o1:kr2': { name: 'Microsite conversion +8%' },
38
+ 'q4-2026:o1:kr1': { name: 'Microsite reach' },
39
+ 'q4-2026:o3:kr1': { name: 'Checkout conversion' },
40
+ };
41
+
42
+ /** What the program panel reads per product besides the board (pm/bd-prog-panel.js): the KRs the OKR files declare (GET /api/boards/anchors),
43
+ * the goals Insights reads (GET /api/insights-premium model.goals: whether a KR is met, on course or behind) and the PMOS tasks (GET
44
+ * /api/boards/items). Legacy IdP sunset holds the tasks from before the split; one of them sits on its epic IDPF-188. */
45
+ const ANCHORS = {
46
+ idpf: [['O2.KR1', 'KR1 Sign-in success 99.5%'], ['O2.KR3', 'KR3 Retire legacy IdP.'], ['O3.KR1', 'KR1 Checkout conversion']].map(([value, label]) => ({ value, kind: 'kr', group: value.split('.')[0], label })),
47
+ microsites: [['O1.KR1', 'KR1 Microsite reach'], ['O1.KR2', 'KR2 Microsite conversion +8%']].map(([value, label]) => ({ value, kind: 'kr', group: value.split('.')[0], label })),
48
+ };
49
+ const GOALS = {
50
+ idpf: [{ id: 'kr-signin', title: 'Sign-in success', pace: { tone: 'ok', head: '≈99.6% by Dec 31' }, moves: [{ id: 'descope-parity' }] },
51
+ { id: 'kr-legacy', title: 'Legacy IdP logins', pace: { tone: 'late', head: '≈40% by Feb 27' }, moves: [{ id: 'legacy-idp-sunset' }] }],
52
+ microsites: [{ id: 'kr-ms-conv', title: 'Microsite conversion', pace: { tone: 'ok', head: 'Reached' }, moves: [{ id: 'microsite-signin' }] }],
53
+ };
54
+ const task = (uid, ini, title, o = {}) => ({ uid, key: '', kind: 'Task', src: 'pmos', title, status: 'To do', blocked: false, owner: null, ini, epic: null, start: null, end: null, ref: uid, board: '', ...o });
55
+ const ITEMS = {
56
+ idpf: [
57
+ { uid: 'IDPF-188', key: 'IDPF-188', kind: 'Epic', src: 'jira', title: 'Tenant and user import', status: 'In progress', ini: 'legacy-idp-sunset', epic: null },
58
+ task('t-cutover', 'legacy-idp-sunset', 'Draft the cutover plan', { end: '2026-11-02' }),
59
+ task('t-comms', 'legacy-idp-sunset', 'Tell support about the sunset', { owner: 'Dara' }),
60
+ task('t-import', 'legacy-idp-sunset', 'Check the import of 40k users', { epic: 'IDPF-188', owner: 'Dara' }),
61
+ task('t-parity', 'descope-parity', 'List the Descope flows we use', { end: '2026-10-30' }),
62
+ task('t-done', 'descope-parity', 'Read the Descope docs', { status: 'Done' }),
63
+ task('t-billing', 'usage-billing', 'Not in the program'),
64
+ ],
65
+ microsites: [task('t-widget', 'microsite-signin', 'Pick the sign-in widget', { owner: 'Rina', end: '2026-11-05' })],
66
+ };
67
+
68
+ const CHARTER = {
69
+ kind: 'program', id: 'project-ascent', title: 'Project Ascent', owner: 'Wawan', goal: 'CIAM migration', why: 'Move every product sign-in to one CIAM tenant and switch the legacy IdP off.',
70
+ start: '2026-09-01', target: '2028-06-30', jira: '',
71
+ milestones: [
72
+ { id: 'vendor-picked', name: 'Vendor picked', date: '2026-09-20', waits: [], done: false },
73
+ { id: 'charter-approved', name: 'Charter approved', date: '2026-10-03', waits: [], done: true },
74
+ { id: 'pilot-live', name: 'Pilot live', date: '2026-11-18', waits: ['descope-parity', 'microsite-signin'] },
75
+ { id: 'pilot-users', name: 'Pilot users invited', date: '2026-11-20', waits: ['microsite-signin'] },
76
+ { id: 'support-ready', name: 'Support ready', date: '2026-11-21', waits: [], done: false },
77
+ { id: 'legacy-idp-off', name: 'Legacy IdP off', date: '2027-02-27', waits: ['legacy-idp-sunset'] },
78
+ { id: 'microsites-on-ciam', name: 'All microsites on CIAM', date: '2027-03-20', waits: ['microsite-signin'] },
79
+ { id: 'program-review', name: 'Program review', date: '2027-06-05', waits: [], done: false },
80
+ ],
81
+ at: '2026-09-01T09:00:00.000Z',
82
+ };
83
+
84
+ /** Each workspace's ledger. The charter and the IDPF members are in idpf; the Microsites member is in its own workspace. "Vendor picked" is done
85
+ * by a check line, the way the page marks it (POST /api/programs/check), and "Charter approved" by the charter itself. */
86
+ function ledgers() {
87
+ return [
88
+ { ws: 'idpf', lines: [
89
+ JSON.parse(JSON.stringify(CHARTER)),
90
+ { kind: 'member', program: 'project-ascent', initiative: 'descope-parity' },
91
+ { kind: 'member', program: 'project-ascent', initiative: 'legacy-idp-sunset' },
92
+ { kind: 'task', program: 'project-ascent', key: 'pt-vendor-form', title: 'Sign the CIAM vendor order form', owner: 'Wawan', due: '2026-10-28' },
93
+ { kind: 'task', program: 'project-ascent', key: 'pt-security', title: 'Security review of tenant setup', owner: 'Dara', due: '2026-11-06' },
94
+ { kind: 'check', program: 'project-ascent', milestone: 'vendor-picked', done: true },
95
+ ] },
96
+ { ws: 'microsites', lines: [{ kind: 'member', program: 'project-ascent', initiative: 'microsite-signin' }] },
97
+ ];
98
+ }
99
+ const programs = () => P.merge(ledgers());
100
+
101
+ module.exports = { PRODUCTS, ROWS, KRS, ANCHORS, GOALS, ITEMS, CHARTER, ledgers, programs, row };
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Home (/premium.html) and the designed features"
4
4
  description: "Home in the Agreed design: the list grouped by product, the Viewer, the place menu, New for you, Search, and the initiative, meeting, report, Board and Insights features designed after it."
5
- timestamp: 2026-10-23
5
+ timestamp: 2026-10-24
6
6
  ---
7
7
 
8
8
  # Home
@@ -11,13 +11,17 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
11
11
 
12
12
  ## The list
13
13
 
14
- - The list is grouped by **product**. The product's header shows its goals, for example "2 of 4 goals on track". Press a header to close or open the product.
15
- - Each next step sits under its **initiative**. An initiative where the next step is yours comes first and shows **your turn**. The first one is open. Press an initiative to open or close it.
16
- - **Not in an initiative** holds only the items that have no initiative: loose notes, mentions and meetings.
17
- - The greeting says how many next steps are yours today, for example "Good morning. 2 next steps are yours today."
18
- - **Kept** and **Done** are filters on the same list, on a desktop only. A phone shows the list itself. There is no Today or Waiting filter, no separate Needs you list and no Your list.
19
- - On Fridays, **Weekly review** at the top of the list opens four short steps.
14
+ - The top line has **Good morning**, the product picker, the filter icon (on a desktop) and **New**. The line under it says how many items are yours, for example "4 are yours".
15
+ - Press **Good morning** to open **Your day**. Your day shows the date, the meetings of the day, **Your move** (the items that wait on you, with their count) and **This week** (the Weekly review). Your move shows only in Your day, not in the list.
16
+ - A **program** comes first, above the products. Its header shows the program icon, its name, the next milestone (◆ and the date) and how many of its initiatives are ready for that milestone. Inside it, the program's own tasks come first, then its initiatives under a small heading for each product. Each initiative shows once. Press the program's name to open the program on the Board. Press the chevron to close or open the group.
17
+ - Then the list is grouped by **product**. A product header shows a tile with the product's short name, the product name, one dot for each goal (green on track, amber off track) and a chevron. You set the short name in Settings.
18
+ - Each row is one line. A dot is a session: blue when it waits on you, a ring while it runs. A check box is a task: amber when it is late. The stage track on the right shows where the initiative is. A session that runs under an initiative shows indented under it. An initiative shows its 3 most urgent tasks, and **N more** shows the rest.
19
+ - **Not in an initiative** is one line at the end, with a blue dot, an amber square and a count. Press it to open the items that have no initiative.
20
+ - **Kept** and **Done** are in the filter icon's menu, on a desktop only.
21
+ - Every group stays open or closed after you reload the page.
22
+ - On a desktop, the chat has a header line with the open item's name and where it sits (its initiative, product or program).
20
23
  - The microphone in the chat box turns what you say into text. Nothing is sent until you press send.
24
+ - A link can open Home at one item: `?item=pt:<program>:<key>` selects a program task, and `?ask=program:<id>` opens the chat about that program.
21
25
 
22
26
  ## An initiative
23
27
 
@@ -71,6 +71,7 @@ On a desktop the workspace is one frame. [Layout](layout.md) explains each part.
71
71
  - [PM-only lines: how the workspace checks your acts](pm-only-lines.md): how each act is recorded, what the Today card "A PM-only line is not attested" means, and the grants for a bulk lifecycle change and a Release.
72
72
  - [Breakdown › Timeline](timeline.md): an initiative's items on a time axis, split by stage, with milestones, today, and the at-risk flag when an item starts before its predecessor ends.
73
73
  - [Initiatives › Timeline](initiatives-timeline.md): when each initiative runs, one row per initiative, and how to reorder rows by their grip.
74
+ - [Programs on the Board](programs.md): All products, programs first then products, By product, the program panel and its milestones, and the 60 % side panels.
74
75
  - [Board](board.md): one Kanban for the items of every initiative, its filters, Release, and `pmos board`.
75
76
  - [The lifecycle](lifecycle.md): the six stages and two milestones of an initiative, what each makes, which steps each lane uses, and how the step is read from the records.
76
77
  - [Integrated work](integrated-work.md): how `pmos verify-work` turns a merged commit into Done, and what "Done · your call · not merged" means.
@@ -0,0 +1,37 @@
1
+ ---
2
+ type: Guide
3
+ title: "Programs on the Board: All products, groupings and the program panel"
4
+ description: "A program groups initiatives across products. How it shows on the Board (stage track, Kanban, timeline and List), the All products mode, the By product grouping, the program panel and the side panel width."
5
+ timestamp: 2026-10-24
6
+ ---
7
+
8
+ # Programs on the Board
9
+
10
+ A **program** groups initiatives across products, for example a migration that touches two products. A program has no stages of its own. Its state comes from its initiatives: **Shaping** while no initiative is past Triage, **Closing** when every initiative is at Monitor or later, and **Running** otherwise. A program has milestones. A milestone waits on initiatives that must reach ◆ Deliver, or it is a program check that you mark as done.
11
+
12
+ Programs do not change how Insights, the weekly update or sprints count initiatives. An initiative counts once, in its own product.
13
+
14
+ ## The Board
15
+
16
+ - The product picker has **All products** when you have more than one product. All products shows the initiatives of every product on one Board (`/premium-board.html?all=1`).
17
+ - A program comes first. Its band shows the stage spread of its initiatives, the next milestone and how many initiatives are ready for it. Under the band, the initiatives sit under a small heading for each product. Then each product has its own group.
18
+ - To group by product only, open **Filter** and choose **By product**. A program member then shows a small layers icon. A chip shows while By product is on.
19
+ - **Kanban** shows programs as swimlanes, then products. Press a column header to fold the column to a strip with its count. An empty column starts folded. The Board remembers each fold.
20
+ - The **timeline** draws a program row that brackets its initiatives' bars, on every span. Program milestones are diamonds. Milestones that are close together merge into one diamond with a count.
21
+ - **List** has a Product column and a Program column. Press a column header to sort by it.
22
+ - **New** opens a menu: **New initiative** or **New program**.
23
+
24
+ ## The program panel
25
+
26
+ Press a program's name on the Board to open its panel. Home links to it with `?program=<id>`.
27
+
28
+ - The top shows the program's name, its owner and its span (for example "Sep 2026 to Jun 2028").
29
+ - The goal row shows the KRs of its initiatives for one half year, each with its name and a dot (met, on course or behind). Use the half-year picker to see another half. Earlier halves fold into one chip.
30
+ - The milestone track shows the next 3 milestones. The done cluster and the **N more** cluster open the **Milestones** tab, which lists Done, Next and Later.
31
+ - The rows that wait on you open in Home.
32
+ - After **Turn into a program**, a card counts the tasks that have no level yet. Press the arrow to ask Claude in Home to suggest a level for each task.
33
+ - The tabs are **Tree**, **Tasks**, **Milestones** and **Documents**. The panel has no chat box: use Home to talk about the program.
34
+
35
+ ## Side panels
36
+
37
+ On a desktop, the initiative panel and the program panel use 60 % of the width. Drag the grip on the panel's edge to set a width from 50 % to 70 %. The Board remembers the width. On a phone, a panel opens as a sheet.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
  /* lib/briefing-premium-products.js — the premium Briefing across products (initiative briefing-premium-products).
3
3
  *
4
- * choose({ workspaces, include }) → { available[{ ws, name, root, home, on }], ignored[] } PURE. Which workspaces the Briefing reads.
4
+ * choose({ workspaces, include }) → { available[{ ws, name, root, home, initials?, on }], ignored[] } PURE. Which workspaces the Briefing reads.
5
5
  * splitKey(key) → { base, ws } | null PURE. A merged row's key is kind:id:ws.
6
6
  * modelOfMany({ available, engine, runtimeDir }) → { state, model, as_of, ... } the route's answer, one workspace read and kept at a time.
7
7
  * rebuildOne({ root, runtimeDir }) after a write: that workspace's quick facts again, without the slow read.
@@ -22,12 +22,12 @@ const W = require('./briefing-premium-writes.js');
22
22
  const STALE_MS = 5 * 60 * 1000;
23
23
  const RETRY_AFTER_ERROR_MS = 2 * 60 * 1000;
24
24
 
25
- /** workspaces: [{ id, name, root, home }]. include: an array of ids, or null for the default. */
25
+ /** workspaces: [{ id, name, root, home, initials? }] (initials: the workspace's own abbreviation, set in Settings; Home's product tile shows it). include: an array of ids, or null for the default. */
26
26
  function choose({ workspaces, include, only }) {
27
27
  const list = (workspaces || []).filter((w) => w && w.id && w.root);
28
28
  const ids = new Set(list.map((w) => w.id));
29
29
  const pick = Array.isArray(include) ? new Set(include) : null;
30
- const available = list.map((w) => ({ ws: w.id, name: w.name || w.id, root: w.root, home: !!w.home, on: only ? w.id === only : pick ? pick.has(w.id) : !w.home }));
30
+ const available = list.map((w) => ({ ws: w.id, name: w.name || w.id, root: w.root, home: !!w.home, ...(w.initials ? { initials: String(w.initials) } : {}), on: only ? w.id === only : pick ? pick.has(w.id) : !w.home }));
31
31
  return { available, ignored: Array.isArray(include) ? include.filter((x) => !ids.has(x)) : [] };
32
32
  }
33
33
 
@@ -98,7 +98,7 @@ async function modelOfMany({ available, engine, runtimeDir, sources, agent, agen
98
98
  const settled = parts.filter((p) => p.state === 'ready').length;
99
99
  if (on.length && !settled && parts.every((p) => p.state === 'reading')) return { state: 'reading', elapsed_ms: elapsed };
100
100
  if (on.length && !settled && parts.every((p) => p.state === 'error')) return { state: 'error', error: parts.map((p) => p.product.name + ': ' + p.error).join('; ').slice(0, 300) };
101
- const model = BP.buildMany({ now, asOf: asOf || now, meetings: BP.readMeetings(runtimeDir, now), defers: Object.fromEntries(W.readDefers(runtimeDir, now)), available: (available || []).map((a) => ({ ws: a.ws, name: a.name, home: a.home, on: a.on })), parts, sources, agent, agentAside });
101
+ const model = BP.buildMany({ now, asOf: asOf || now, meetings: BP.readMeetings(runtimeDir, now), defers: Object.fromEntries(W.readDefers(runtimeDir, now)), available: (available || []).map((a) => ({ ws: a.ws, name: a.name, home: a.home, on: a.on, ...(a.initials ? { initials: a.initials } : {}) })), parts, sources, agent, agentAside });
102
102
  last = model;
103
103
  return { state: 'ready', model, as_of: asOf || now, refreshing, pending: model.pending, ...(error ? { error } : {}) };
104
104
  }
@@ -397,7 +397,7 @@ const KIND_RANK = { blocked: 0, decision: 1, waited: 2 };
397
397
  const longest = (r) => { const d = (r.detail && r.detail.days) || []; return d.length ? d[d.length - 1] : 0; };
398
398
 
399
399
  /** Several products' facts → ONE model, in the same shape build() makes.
400
- * g = { now, asOf, meetings (shared, or null), defers { key: until }, available: [{ ws, name, home, on }],
400
+ * g = { now, asOf, meetings (shared, or null), defers { key: until }, available: [{ ws, name, home, on, initials? }],
401
401
  * parts: [{ product: { ws, name }, f (that product's facts) | null, state: 'ready' | 'reading' | 'error', error? }] }
402
402
  * A row belongs to one product (its key ends with the workspace id) and the rows are put in one order: blocked first, then decisions, then reviews.
403
403
  * A count is never summed across products: each product gets its own failed-review row. The hero and Today read the merged facts. */
@@ -451,7 +451,7 @@ function buildMany(g) {
451
451
  list: { title: 'What you need to do', rows, more, count: rows.length + more, pendingNote: pending ? 'Blocked work, prototypes waiting for you and failed reviews appear when the initiative state has been read.' : null, putOff: putOff.map((x) => ({ key: x.key, title: x.title, ...(x.product ? { product: x.product } : {}), until: x.until, text: (x.product ? x.product + ': ' : '') + x.title + ' · back ' + backAt(x.until, now) })), order: 'In this order: blocked work first, then decisions only you can make, then what has waited longest.' },
452
452
  today: todayOf(cf),
453
453
  dock: { needs: pending ? null : rows.length + more, label: plural(rows.length + more, 'needs you', 'need you'), next: rows[0] ? rows[0].title : null },
454
- products: { available: available.map((a) => ({ ws: a.ws, name: a.name, home: !!a.home, on: !!a.on })), none },
454
+ products: { available: available.map((a) => ({ ws: a.ws, name: a.name, home: !!a.home, on: !!a.on, ...(a.initials ? { initials: a.initials } : {}) })), none },
455
455
  ...(g.agentAside ? { agent: { rows: dx, goals: [] } } : {}),
456
456
  };
457
457
  }