create-pmos 0.388.0 → 0.390.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 (44) hide show
  1. package/package.json +25 -30
  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/briefing-premium-insights-test.js +22 -27
  8. package/workspace/changelog.json +24 -0
  9. package/workspace/guide/briefing-premium.md +38 -19
  10. package/workspace/lib/briefing-premium-agent.js +3 -0
  11. package/workspace/lib/insights-premium.js +10 -8
  12. package/workspace/lib/report-chat.js +37 -0
  13. package/workspace/lib/routes-insights-premium.js +3 -1
  14. package/workspace/package-lock.json +2 -2
  15. package/workspace/package.json +1 -1
  16. package/workspace/premium-chat-chart-tab-test.js +150 -0
  17. package/workspace/premium-chat-report-tab-test.js +127 -0
  18. package/workspace/premium-report-read-test.js +99 -59
  19. package/workspace/premium-vw-slides-test.js +17 -19
  20. package/workspace/public/pm/goal-chat.js +2 -1
  21. package/workspace/public/pm/premium-chart-draw.js +58 -0
  22. package/workspace/public/pm/premium-chart-tab.js +157 -0
  23. package/workspace/public/pm/premium-chat.js +8 -2
  24. package/workspace/public/pm/premium-insights.js +39 -85
  25. package/workspace/public/pm/premium-report-brief.js +132 -0
  26. package/workspace/public/pm/premium-report-read.js +276 -103
  27. package/workspace/public/pm/premium-report-tab.js +235 -0
  28. package/workspace/public/pm/premium-shell.js +35 -3
  29. package/workspace/public/pm/premium-vw-doc.js +9 -1
  30. package/workspace/public/pm/premium-vw-report.css +60 -0
  31. package/workspace/public/pm/premium-vw-slides.js +14 -5
  32. package/workspace/public/pm/premium.css +71 -122
  33. package/workspace/public/pm/report-chat.js +89 -0
  34. package/workspace/test-lists/premium-chat-chart-tab.json +12 -0
  35. package/workspace/test-lists/premium-chat-report-tab.json +12 -0
  36. package/workspace/premium-studio-chart-test.js +0 -193
  37. package/workspace/premium-studio-report-test.js +0 -277
  38. package/workspace/premium-studio-test.js +0 -185
  39. package/workspace/public/pm/premium-studio-design.js +0 -298
  40. package/workspace/public/pm/premium-studio-report.js +0 -291
  41. package/workspace/public/pm/premium-studio.js +0 -453
  42. package/workspace/test-lists/premium-studio-chart.json +0 -13
  43. package/workspace/test-lists/premium-studio-report.json +0 -9
  44. package/workspace/test-lists/premium-studio.json +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.388.0",
3
+ "version": "0.390.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,6 +32,30 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.390.0",
37
+ "at": "2026-10-22T02:01:40.673Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1003,
42
+ "t": "One report editor with Brief tab and one Insights row per report",
43
+ "s": "One report editor with Brief tab and one Insights row per report"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "v": "0.389.0",
49
+ "at": "2026-10-21T22:57:56.719Z",
50
+ "f": 2,
51
+ "prs": [
52
+ {
53
+ "n": 1001,
54
+ "t": "Reports, charts and dashboards from any chat; the Insight Studio is removed",
55
+ "s": "Reports, charts and dashboards from any chat; the Insight Studio is removed"
56
+ }
57
+ ]
58
+ },
35
59
  {
36
60
  "v": "0.388.0",
37
61
  "at": "2026-10-21T22:35:51.404Z",
@@ -272,35 +296,6 @@
272
296
  "s": "Quiet the standing chat note until the box has focus (calmer first screen 3/5)"
273
297
  }
274
298
  ]
275
- },
276
- {
277
- "v": "0.370.0",
278
- "at": "2026-10-21T02:31:23.574Z",
279
- "f": 2,
280
- "prs": [
281
- {
282
- "n": 975,
283
- "t": "Sources is one list: sources by where they are read, then derived content (briefing-source-flow, slice 4)",
284
- "s": "One list in the shape of the approved mockup, following Wawan's split (2026-10-21) into main sources (raw) and derived content."
285
- },
286
- {
287
- "n": 977,
288
- "t": "The Chat button draws cleanly on the Chat page",
289
- "s": "The Chat button draws cleanly on the Chat page"
290
- }
291
- ]
292
- },
293
- {
294
- "v": "0.369.0",
295
- "at": "2026-10-21T02:18:50.229Z",
296
- "f": 2,
297
- "prs": [
298
- {
299
- "n": 974,
300
- "t": "Insights' first screen shows the list, not the empty card (calmer first screen 2/5)",
301
- "s": "Insights' first screen shows the list, not the empty card (calmer first screen 2/5)"
302
- }
303
- ]
304
299
  }
305
300
  ]
306
301
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@e49a7af3
2
- assembled: 2026-10-21
1
+ kernel-source: pmos@553436a5
2
+ assembled: 2026-10-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-10-21T22:35:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-22T02:01:37Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-10-21T22:35:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-22T02:01:37Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-10-21T22:35:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-22T02:01:37Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  Newest first, ISO dates.
4
4
 
5
- ## 2026-10-21
5
+ ## 2026-10-22
6
6
 
7
7
  - Adopted OKF v0.2 (D73).
@@ -129,10 +129,10 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
129
129
  }
130
130
  /* I8 reports */
131
131
  await (async (pg, sel) => { if (await pg.locator('#listSeg').isHidden()) await pg.click('#listF'); await pg.click(sel); })(p, '#listSeg [data-f="rep"]'); await sleep(100);
132
- const rp = await p.evaluate(() => ({ rows: [...document.querySelectorAll('#listRows [data-rep]')].map((r) => r.querySelector('.dmn b').textContent + ' / ' + r.querySelector('.s').textContent), note: document.querySelector('#cRep .mhint').textContent, cap: document.querySelector('#repCap').textContent, setups: document.querySelectorAll('#listRows [data-setup]').length, dash: document.querySelectorAll('#listRows [data-d]').length }));
133
- ok('I8 the Reports filter lists the set-up reports, then the report files: cadence, slot, draft or issued', rp.rows.join() === 'biweekly · 14 Oct / Draft,monthly · 30 Sep / Issued 1 Oct' && rp.setups === 1 && rp.dash === 0 && /Nothing is sent from here/.test(rp.note) && rp.cap === '7', JSON.stringify(rp));
132
+ const rp = await p.evaluate(() => ({ rows: [...document.querySelectorAll('#listRows [data-rpt]')].map((r) => r.querySelector('.dmn b').textContent + ' / ' + r.querySelector('.s').textContent), note: document.querySelector('#cRep .mhint').textContent, cap: document.querySelector('#repCap').textContent, setups: document.querySelectorAll('#listRows [data-setup]').length, dash: document.querySelectorAll('#listRows [data-d]').length }));
133
+ ok('I8 the Reports filter lists the set-up reports, then one row per report with its cycles counted (PM 2026-10-22)', rp.rows.join() === 'biweekly / 1 draft,monthly / 1 issued' && rp.setups === 1 && rp.dash === 0 && /Nothing is sent from here/.test(rp.note) && rp.cap === '7', JSON.stringify(rp));
134
134
  await (async (pg, sel) => { if (await pg.locator('#listSeg').isHidden()) await pg.click('#listF'); await pg.click(sel); })(p, '#listSeg [data-f="all"]');
135
- { const R = await open(); await (async (pg, sel) => { if (await pg.locator('#listSeg').isHidden()) await pg.click('#listF'); await pg.click(sel); })(R.page, '#listSeg [data-f="rep"]'); await R.page.locator('#listRows [data-rep]').first().click(); ok('I8 a report opens in the page\'s reader, not the console (premium-report-read R1)', await until(() => R.page.evaluate(() => document.querySelector('#dlg').classList.contains('rdrd') && document.querySelector('#dlg').classList.contains('on')), 5000) && /premium-insights\.html/.test(R.page.url()), R.page.url());
135
+ { const R = await open(); await (async (pg, sel) => { if (await pg.locator('#listSeg').isHidden()) await pg.click('#listF'); await pg.click(sel); })(R.page, '#listSeg [data-f="rep"]'); await R.page.locator('#listRows [data-rpt]').first().click(); ok('I8 a report opens in the page\'s reader, not the console (premium-report-read R1)', await until(() => R.page.evaluate(() => document.querySelector('#dlg').classList.contains('rdrd') && document.querySelector('#dlg').classList.contains('on')), 5000) && /premium-insights\.html/.test(R.page.url()), R.page.url());
136
136
  ok('I8 a draft report has Issue in the reader, so nothing sends you to the console to issue it', await until(() => R.page.evaluate(() => !!document.querySelector('#oMain [data-rr="issue"]')), 8000) && await R.page.evaluate(() => !document.querySelector('#repOpen') && !document.querySelector('#oMain a[href*="console.html"]')));
137
137
  await R.ctx.close(); }
138
138
  /* I9 labels */
@@ -141,7 +141,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
141
141
  /* I10 empty */
142
142
  {
143
143
  const R = await open({ model: mk({ outcomes: [] }) });
144
- ok('I10 with no KR metric the page says there is no insight yet, draws nothing, and the list still holds the report files', await R.page.evaluate(() => /No KR metric is recorded/.test(document.querySelector('#brief').textContent) && /No KR metric is recorded for this workspace/.test(document.querySelector('#dashBody').textContent) && document.querySelectorAll('#listRows [data-rep]').length === 2 && document.querySelectorAll('#dashBody .mch').length === 0 && /There is no insight yet/.test(document.querySelector('#brief').textContent) && document.querySelectorAll('#insAct button').length === 0));
144
+ ok('I10 with no KR metric the page says there is no insight yet, draws nothing, and the list still holds the report files', await R.page.evaluate(() => /No KR metric is recorded/.test(document.querySelector('#brief').textContent) && /No KR metric is recorded for this workspace/.test(document.querySelector('#dashBody').textContent) && document.querySelectorAll('#listRows [data-rpt]').length === 2 && document.querySelectorAll('#dashBody .mch').length === 0 && /There is no insight yet/.test(document.querySelector('#brief').textContent) && document.querySelectorAll('#insAct button').length === 0));
145
145
  ok('I10 with nothing to chart the top card is hidden (All measures stays a row of the list), and the hero\'s explanation waits behind an ⓘ (premium-calmer-first-screen)', await R.page.evaluate(() => document.querySelector('#cDash').hidden && document.querySelector('#insWhy').hidden && !!document.querySelector('#insEye .infob[aria-controls="insWhy"]') && !/Shown above/.test(document.querySelector('#repBody').textContent)));
146
146
  await R.ctx.close();
147
147
  const R2 = await open({ model: mk({ reportsOk: false, reports: [], missing: ['reports'] }) });
@@ -169,21 +169,16 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
169
169
  await q.click('#repBody [data-d="pd-1"]'); await sleep(200);
170
170
  const sv = await q.evaluate(() => ({ tiles: [...document.querySelectorAll('#dashBody .mch .mlab')].map((e) => e.firstChild.textContent), gone: [...document.querySelectorAll('#dashBody .dplist .nempty')].map((e) => e.textContent.replace(/\s+/g, ' ')), bar: document.querySelector('#dashBar').textContent, purpose: document.querySelector('#dashPurpose').textContent }));
171
171
  ok('R1 a saved dashboard draws its charts in its order and says which chart is gone, in its place', sv.tiles.join() === 'Partner activation,Time to first call' && sv.gone.length === 1 && /krm-gone.*No KR metric record is called krm-gone/.test(sv.gone[0]) && /Monday partner review/.test(sv.purpose) && /Pin.*Back to All measures.*Edit/.test(sv.bar), JSON.stringify(sv));
172
- await (async (pg, sel) => { if (await pg.locator('#dashBar').isHidden()) await pg.click('#dashMore'); await pg.click(sel); })(q, '#pdEdit'); await dlgOn();
173
- const chipv = (k) => q.evaluate((x) => (document.querySelector(`#oMain [data-st="chip|${x}"] b`) || {}).textContent || '', k);
174
- await q.click('#oMain [data-st="chip|charts"]');
175
- const ed = await q.evaluate(() => ({ eye: document.querySelector('#dEye').textContent, rows: [...document.querySelectorAll('#stTr .sul li > span:first-child')].map((b) => b.childNodes[0].textContent) }));
176
- ok('R2 Edit opens the Studio with the name, Main and the charts in order', /^Insight Studio · /.test(ed.eye) && await chipv('name') === 'Weekly partner review' && await chipv('main') === 'Yes' && ed.rows.join() === 'Partner activation,Time to first call,krm-gone', JSON.stringify(ed));
177
- await q.click('#stTr [data-st="mv|1|-1"]'); await q.click('#stTr [data-st="rm|2"]'); await q.click('#oMain [data-st="lib"]'); await q.click('#stLb [data-st="libc|krm-up"]');
178
- await q.click('#oMain [data-st="chip|name"]'); await q.fill('#stI', 'Monday review'); await q.click('#oMain [data-st="save"]'); await sleep(400);
179
- ok('R2 Save posts the dashboard with the new order, name and Main to the one save route', last()[0] === '/api/premium-dashboards/save' && JSON.stringify(last()[1]) === JSON.stringify({ ws: 'w1', board: 'w1', id: 'pd-1', name: 'Monday review', purpose: 'The measures the Monday partner review reads.', charts: ['krm-ttfc', 'krm-act', 'krm-up'], main: true }), JSON.stringify(last()));
180
- await q.click('#listNew'); await q.click('#pdNew'); await dlgOn(); await q.click('#oMain [data-st="save"]'); await sleep(200);
181
- ok('R2 a new dashboard without a name says so and posts nothing', /Give the dashboard a name/.test(await qt('#stMsg')) && last()[1].id === 'pd-1');
182
- answer = () => ({ ok: false, error: '“Weekly partner review” is already a dashboard on this board.' });
183
- await q.click('#oMain [data-st="chip|name"]'); await q.fill('#stI', 'Weekly partner review'); await q.click('#oMain [data-st="chip|use"]'); await q.fill('#stI', 'x'); await q.click('#oMain [data-st="save"]'); await sleep(300);
184
- ok('R7 the server\'s refusal is shown in words and the dialog stays open', /already a dashboard on this board/.test(await qt('#stMsg')) && await q.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !document.querySelector('#oMain [data-st="save"]').disabled));
185
- answer = (u, b) => ({ ok: true, dashboard: { id: b.id || 'pd-9' }, dashboards: [], setup: {}, drafted: { slot: '2026-10-23', path: 'planning/reports/release-readiness/2026-10-23.md' } });
186
- await shut();
172
+ await q.route('**/premium-chat.html*', (r) => r.fulfill({ status: 200, contentType: 'text/html', body: '<!doctype html><title>chat</title>' }));
173
+ await Promise.all([q.waitForURL(/premium-chat\.html/), (async (pg, sel) => { if (await pg.locator('#dashBar').isHidden()) await pg.click('#dashMore'); await pg.click(sel); })(q, '#pdEdit')]);
174
+ const u1 = new URL(q.url());
175
+ ok('R2 Edit opens the Chat page with the saved dashboard in its tab: the Insight Studio is removed', u1.searchParams.get('open') === 'dashboard:pd-1' && u1.searchParams.get('ws') === 'w1', u1.search);
176
+ await q.goBack(); await until(() => q.evaluate(() => !!document.querySelector('#repBody [data-d="pd-1"]')));
177
+ await q.click('#listNew'); await Promise.all([q.waitForURL(/premium-chat\.html/), q.click('#pdNew')]);
178
+ const u2 = new URL(q.url());
179
+ ok('R2 New, then Dashboard, opens the Chat page with a first message for the PM to send, and posts nothing', u2.searchParams.get('say') === 'Make a dashboard of ' && !u2.searchParams.get('open') && !sent.length, u2.search);
180
+ await q.goBack(); await until(() => q.evaluate(() => !!document.querySelector('#repBody [data-d="pd-1"]')));
181
+ await q.click('#repBody [data-d="pd-1"]'); await sleep(200);
187
182
  await (async (pg, sel) => { if (await pg.locator('#dashBar').isHidden()) await pg.click('#dashMore'); await pg.click(sel); })(q, '#pdBack'); await q.locator('#dashBody .lk[data-open="ins:krm-up"]').click(); await dlgOn(); await q.click('#oMain [data-pdsw="pd-1"]'); await sleep(300);
188
183
  ok('R3 the chart dialog\'s switch saves that dashboard with the chart added', last()[0] === '/api/premium-dashboards/save' && JSON.stringify(last()[1].charts) === JSON.stringify(['krm-act', 'krm-ttfc', 'krm-gone', 'krm-up']) && /Added to Weekly partner review/.test(await qt('#pdSwM')), JSON.stringify(last()));
189
184
  await shut();
@@ -214,7 +209,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
214
209
  await shut();
215
210
  await q.click('#repBody [data-setup="partner-update"]'); await dlgOn();
216
211
  const su = await q.evaluate(() => ({ kv: document.querySelector('#oMain .kv2').textContent, acts: [...document.querySelectorAll('#oMain [data-rx]')].map((b) => b.dataset.rx).join() }));
217
- ok('R4 a set-up report shows its schedule and next draft, with Draft it now, Pause and Shape it in the Studio', /ScheduleEvery other Monday at 09:00/.test(su.kv) && /Next draft26 Oct/.test(su.kv) && su.acts === 'draft,pause,studio', JSON.stringify(su));
212
+ ok('R4 a set-up report shows its schedule and next draft, with Draft it now, Pause and Shape it in a chat', /ScheduleEvery other Monday at 09:00/.test(su.kv) && /Next draft26 Oct/.test(su.kv) && su.acts === 'draft,pause,studio', JSON.stringify(su));
218
213
  await q.click('#oMain [data-rx="pause"]'); await sleep(300);
219
214
  ok('R4 Pause posts that report', last()[0] === '/api/report-setups/pause' && last()[1].id === 'partner-update', JSON.stringify(last()));
220
215
  ok('R7 every press went to the dashboard save route or an existing report-setups route; an opened popup is only recorded (seen)', R.posts.every((x) => /^POST \/api\/(premium-dashboards\/save|report-setups\/(ask|change|cancel|setup|dismiss|pause|resume|draft)|briefing-premium\/seen)$/.test(x)), R.posts.join());
@@ -241,11 +236,11 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
241
236
  const pg1 = await q.evaluate(() => ({ rows: document.querySelectorAll('#listRows .dmr').length, pager: document.querySelector('#listPager').textContent }));
242
237
  await q.click('#listPager [data-pg="2"]'); await sleep(100);
243
238
  const pg2 = await q.evaluate(() => ({ rows: [...document.querySelectorAll('#listRows .dmo b')].map((b) => b.textContent), cur: document.querySelector('#listPager [aria-current="page"]').textContent }));
244
- ok('L5 six rows to a page with page numbers; page 2 holds the rest', pg1.rows === 6 && /1–6 of 7/.test(pg1.pager) && pg2.cur === '2' && pg2.rows.join() === 'monthly · 30 Sep', JSON.stringify([pg1, pg2]));
239
+ ok('L5 six rows to a page with page numbers; page 2 holds the rest', pg1.rows === 6 && /1–6 of 7/.test(pg1.pager) && pg2.cur === '2' && pg2.rows.join() === 'monthly', JSON.stringify([pg1, pg2]));
245
240
  await R.ctx.close();
246
241
  const lead = { 'planning/reports/biweekly/2026-10-14.md': 'Activation slipped to 28% this fortnight.' };
247
242
  const R2 = await open({ model: mk({ leads: lead }) });
248
- const ln = await R2.page.evaluate(() => ({ dash: [...document.querySelectorAll('#listRows [data-d] .nil')].map((e) => e.textContent), rep: [...document.querySelectorAll('#listRows [data-rep] .nil')].map((e) => e.textContent), su: document.querySelector('#listRows [data-setup] small').textContent }));
243
+ const ln = await R2.page.evaluate(() => ({ dash: [...document.querySelectorAll('#listRows [data-d] .nil')].map((e) => e.textContent), rep: [...document.querySelectorAll('#listRows [data-rpt] .nil')].map((e) => e.textContent), su: document.querySelector('#listRows [data-setup] small').textContent }));
249
244
  ok('L6 each dashboard row shows its top finding, a report row quotes its file, a setup with no file says no draft is written yet', ln.dash[0] === 'Time to first call will miss its 3 days target on 31 Dec unless it turns.' && ln.rep[0] === '“Activation slipped to 28% this fortnight.”' && /^No draft is written yet/.test(ln.su), JSON.stringify(ln));
250
245
  await R2.ctx.close();
251
246
  }
@@ -297,13 +292,13 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
297
292
  await pg.goto(base2 + '/premium-insights.html');
298
293
  ok('E7 the real page draws that chart with the record\'s numbers and no script error', await until(() => pg.evaluate(() => { const t = document.querySelector('#dashBody .mch'); return !!t && t.querySelector('.mval').textContent === '30%' && /Partner activation/.test(t.textContent); }), 20000) && errs.length === 0, errs.join(' | '));
299
294
  /* briefing-premium-reports against the real server: New dashboard, Save, the switch, then the ledger answers it back */
300
- await pg.click('#listNew'); await pg.click('#pdNew'); await until(() => pg.evaluate(() => document.querySelector('#dlg').classList.contains('on')));
301
- await pg.click('#oMain [data-st="chip|name"]'); await pg.fill('#stI', 'Partner review'); await pg.click('#oMain [data-st="chip|use"]'); await pg.fill('#stI', 'The Monday partner review.');
302
- await pg.click('#stLb [data-st="libc|' + m.charts[0].id + '"]'); await pg.click('#oMain [data-st="chip|main"]'); await pg.click('#stTr [data-st="set|main|1"]'); await pg.click('#oMain [data-st="save"]');
303
- ok('E8 a dashboard made on the real page as the main one is saved, pinned and drawn at the top', await until(() => pg.evaluate(() => !document.querySelector('#dlg').classList.contains('on') && document.querySelector('#hDash').textContent === 'Partner review' && document.querySelector('#dashTag').textContent === 'Pinned' && document.querySelectorAll('#dashBody .mch').length === 1), 10000), await pg.evaluate(() => (document.querySelector('#pdM') || {}).textContent + ' / ' + document.querySelector('#hDash').textContent + ' ' + document.querySelector('#dashTag').textContent));
295
+ const H = await T.pressHeaders(base2);
296
+ const made = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: H, body: JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'Partner review', purpose: 'The Monday partner review.', charts: [m.charts[0].id], main: true }) }).then((x) => x.status);
297
+ await pg.reload();
298
+ ok('E8 a dashboard saved as the main one (a press in the Chart tab) is pinned and drawn at the top of the real page', made === 200 && await until(() => pg.evaluate(() => document.querySelector('#hDash').textContent === 'Partner review' && document.querySelector('#dashTag').textContent === 'Pinned' && document.querySelectorAll('#dashBody .mch').length === 1), 10000), await pg.evaluate(() => (document.querySelector('#pdM') || {}).textContent + ' / ' + document.querySelector('#hDash').textContent + ' ' + document.querySelector('#dashTag').textContent));
304
299
  const j2 = await (await fetch(base2 + '/api/insights-premium')).json(), d2 = j2.model.dashboards.find((d) => d.saved);
305
300
  ok('E8 the model reads it back from the ledger', !!d2 && d2.name === 'Partner review' && d2.main && d2.charts.join() === m.charts[0].id, JSON.stringify(d2));
306
- const H = await T.pressHeaders(base2), body = JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'From an agent', purpose: 'x', charts: [] });
301
+ const body = JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'From an agent', purpose: 'x', charts: [] });
307
302
  const asAgent = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { ...H, 'x-pmos-session': 's1' }, body }).then((x) => x.status);
308
303
  const noNonce = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: { 'Content-Type': 'application/json', Origin: base2 }, body }).then((x) => x.status);
309
304
  const unknown = await fetch(base2 + '/api/premium-dashboards/save', { method: 'POST', headers: H, body: JSON.stringify({ ws: m.board.ws, board: m.board.id, name: 'Other', purpose: 'x', charts: ['krm-none'] }) }).then((x) => x.status);
@@ -1,4 +1,28 @@
1
1
  [
2
+ {
3
+ "v": "0.390.0",
4
+ "at": "2026-10-22T02:01:40.673Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1003,
9
+ "t": "One report editor with Brief tab and one Insights row per report",
10
+ "s": "One report editor with Brief tab and one Insights row per report"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "v": "0.389.0",
16
+ "at": "2026-10-21T22:57:56.719Z",
17
+ "f": 2,
18
+ "prs": [
19
+ {
20
+ "n": 1001,
21
+ "t": "Reports, charts and dashboards from any chat; the Insight Studio is removed",
22
+ "s": "Reports, charts and dashboards from any chat; the Insight Studio is removed"
23
+ }
24
+ ]
25
+ },
2
26
  {
3
27
  "v": "0.388.0",
4
28
  "at": "2026-10-21T22:35:51.404Z",
@@ -213,12 +213,11 @@ The right side can hold more than one item. When the dialog opens a related item
213
213
 
214
214
  ### The document page
215
215
 
216
- Every markdown document opens as one page in a tab: a report, a PRD, a new document or any other `.md` file. On a document sheet, click **Open as a page**. On a report, click **Edit**.
216
+ Every markdown document opens as one page in a tab: a PRD, a new document or any other `.md` file. On a document sheet, click **Open as a page**. A report is edited in its own dialog instead (see **Report files** under Insights).
217
217
 
218
218
  - **Page** shows the document as it reads. **Edit** lets you type on the page itself, with a toolbar, a **/** menu for blocks, and Ctrl+S to save. **Markdown** shows the source text. Only the sections you changed are written; the other sections and the front matter keep their exact text. A line that is only an HTML comment, such as `<!-- pmos:note … -->` or `<!-- pmos:slide … -->`, is not shown on the page, and a save writes it back as it was.
219
219
  - When the agent proposes an edit, the page shows it applied and highlighted. Click a highlight to see the old text, and click **Put it back** to restore it. The bar above the page has **Keep as vN**, which keeps the changes that remain, and **Undo all**, which asks first and then rejects the whole edit.
220
220
  - **Health**, **Links** and **Copies** under the toolbar show the document's checks, the documents it links to, and its linked copies. The checks only read the file.
221
- - A report also shows **Present**, **Print** and **Download** on the same toolbar.
222
221
 
223
222
  ### Confluence pages and Google Docs
224
223
 
@@ -358,27 +357,29 @@ Insights is the fifth place on the rail, at `/premium-insights.html`. It reads t
358
357
  - **Charts.** One chart for each KR metric that holds at least two readings. The line runs through the readings at their dates, so a month with no reading is a gap and not a zero. The dashed line is the metric's target. The chip is the record's own line status: on its line, behind it, or well behind it. Pressing a chart, or its Details link, opens the metric's record in the dialog with the read-only agent beside it.
359
358
  - **The insight.** The page opens with one finding across the board's measures, in a large line, with the reason and its numbers under it, up to two more findings, **Ask PMOS why** (opens the measure's dialog on the Conversation tab) and **See the chart**. A measure that is short of its target, with a target date after its last reading, gets a projection: a straight line through its last four readings (all, when fewer), carried to the target date. When the line lands short, the finding says the measure will miss its target on that date at this pace, where it lands, how far short, and when it would get there. When the line lands on or past the target, it says the measure is on course. The page says how the projection is made, and no forecast line is drawn on a chart. With no KR metric, or none with two readings, the page says there is no insight yet and why.
360
359
  - **The pinned dashboard.** The card under the insight shows the pinned dashboard: its insight band (the next findings on it, past the one the page leads with), and its charts. Its **⋯** holds **Unpin** (or **Pin**, with Not pinned when nothing is pinned), **Back to** the pinned one, **Edit** and **New chart**, and its **ⓘ** says what the dashboard is for. When nothing can be charted yet, the card is hidden and All measures is a row of the list; the insight's explanation is then behind the **ⓘ** next to Insight. Pressing a dashboard in the list shows it in this card. One dashboard per board is pinned, All measures included; pillar groups cannot be pinned. The pin is a line in `premium-dashboards.jsonl` and shows on Insights only.
361
- - **Dashboards and reports.** One list holds the dashboards (All measures, your saved ones, then the pillars the metrics name) and then the reports (your set-up reports, then the report files). One chip in the card's head (**All** with its count) opens **All**, **Dashboards** and **Reports**, and shows only when the list holds both kinds; it shows six rows to a page, with page numbers. A dashboard row shows its top finding and a pin. A report row quotes the opening sentence of its latest file; a set-up report with no file says no draft is written yet. **New** offers **Dashboard** or **Report**. Your requests and what PMOS found in your work stay at the top of the list. A saved dashboard draws its charts in the order you saved them. A chart whose record is gone, or that has fewer than two readings, is listed in its place with the reason and is not drawn.
362
- - **Open the Studio.** **New**, then **Dashboard**, opens the Insight Studio on a new dashboard, and **Edit** in the dashboard's **⋯** opens it on the saved dashboard you are looking at. Chat in the rail opens the Chat page, not the Studio.
363
- - **Make or edit a dashboard.** **+** (at the left of the report input), then **Dashboard**, or **Edit** on a saved one, opens the **Insight Studio**, a wide dialog. On the right, the brief shows the Name, Purpose, Charts and Main dashboard; press a chip to change it. **Library** lists the board's measures and saved dashboards to add. The preview draws the dashboard as the page will, and lists a measure with no series as not drawn. The checks (a name, a purpose, a chart, six or fewer, no repeat, a main dashboard on the board) say what fails, with a one-press fix. On the left you can say it instead: "add Partner activation", "remove …", "move … first", "call it …", "it is for …", "make it the main dashboard", "undo" or "start a new one". A turn changes the draft only. **Undo** steps back one change. **Save the dashboard** records it; **Remove the dashboard** asks once more and then removes it. In a chart's dialog, **On your dashboards** has a switch for each saved dashboard, which adds the chart to it or takes it off.
364
- - **Make your own chart.** **New chart**, or **Edit** on one of your charts, opens the Insight Studio in **Chart** mode; the switch at the top moves between Chart and Dashboard, and each keeps its own draft. The brief shows the Question, Measure, Form (line, bars, number or meter), Range (all readings or the last few) and Target; **More** adds the Title, Better when, Note and Add to (a dashboard). The Studio suggests a form from the question and says why. The checks (a question, a target, enough readings, a form that fits the question, one scale) say what fails, with a one-press fix. You can say it instead: "show it as bars", "last 4 readings", "target 35", "lower is better", "call it …", "note: …", "add it to Weekly", or a question. A pie is declined, with the reason. **Save the chart** records it in the workspace's state folder, and adds it to the dashboard you named. Your charts are listed under **All measures**, and a dashboard can hold them beside the measures. **Remove the chart** asks once more; a dashboard that held it then says it was removed.
365
- - **Set up a report in the Studio.** **+**, then **Report**, opens the Insight Studio in **Report** mode. The brief shows the Title, What it answers, Audience, Format, Schedule, Draw from (your work, or the board's dashboard) and the Sections. A new report always has the same sections, in the same order, so they are listed, not edited. The checks (what it answers, an audience, a format that fits the audience, a new title, the answer first) say what fails, with a one-press fix. You can say it instead: "it answers: …", "for leadership", "slides", "monthly", "every two weeks on Thursday", "call it …". **Set it up** records the report and writes its first draft as a file.
366
- - **Change the size of the Studio.** On a wide window, **Normal**, **Half**, **3/4** and **Whole** sit beside **Library**. Whole is the full screen. At Half, the conversation and the Studio are two tabs. The Studio opens on Whole, and PMOS remembers your choice on this browser.
367
- - **Shape a report's sections.** On a report drawn from your work, **Shape it in the Studio** opens Report mode on it. Tell PMOS how to shape the sections in your own words; PMOS proposes the next version and says what it changed. **Leave out** on a section makes the next version without it; the headline, Needs your call and Sources are always in. **Undo** goes back one version. **Use this structure** saves the version shown, and the next cycle follows it.
368
- - **Design how a report looks.** A set-up report in the Studio has two tabs: **1 Structure** (what it says) and **2 Design** (how it looks). The Design tab shows the versions D1 to Dn, the slides of the one shown (a large preview, previous and next, and thumbnails), and the samples the look follows. **Add a file** (PDF, PowerPoint, Word or an image) or **Add the link** (Google or Confluence) adds a sample, and PMOS says what it took from it. Say how it should look, for example "use the theme of my picture", and PMOS makes the next version. Pick a version to look at it. **Undo** goes back one version. **This is it** saves the version shown as the design, and each new cycle is drawn to it. When you open a report again, both tabs show what was said before.
369
- - **Choose a deck or a document, and read the design brief.** On the Design tab, the **Format** chip offers **Deck** and **Document** for the next version. Versions you already made keep their form. Once a design is saved, a **Design brief** chip shows what PMOS reads each cycle: your description, your samples, the reference version, and what stays the same, what changes and what PMOS learned. The cycles drafted to match it are checked on the report itself.
370
- - **Point, make the next version, compare.** On the Design tab, click any part of a slide to attach a request to that spot: a numbered pin appears, and you type the request under the preview (**Point and say**; the switch turns pointing off). **Make the next version** sends the typed line and every pinned request to PMOS, which makes the next version; the pins are cleared once it starts. **Compare two** shows the same slide of two versions side by side; pick the version on each side.
360
+ - **Dashboards and reports.** One list holds the dashboards (All measures, your saved ones, then the pillars the metrics name) and then the reports (your set-up reports, then the report files). One chip in the card's head (**All** with its count) opens **All**, **Dashboards** and **Reports**, and shows only when the list holds both kinds; it shows six rows to a page, with page numbers. A dashboard row shows its top finding and a pin. A report has one row, whatever number of cycles it has: the row quotes the opening sentence of its latest cycle and counts its cycles (for example **1 draft**, **3 issued**, **1 archived**). A set-up report with no file says no draft is written yet. **New** offers **Dashboard** or **Report**. Your requests and what PMOS found in your work stay at the top of the list. A saved dashboard draws its charts in the order you saved them. A chart whose record is gone, or that has fewer than two readings, is listed in its place with the reason and is not drawn.
361
+ - **Make or change a dashboard, a chart or a report in a chat.** There is no Insight Studio. **+**, then **Dashboard** or **Report**, and **New chart** in the dashboard's **⋯**, open the Chat page with a first line in the message box ("Make a dashboard of ") for you to finish and send. **Edit** on a saved dashboard or one of your charts, and **Shape it in a chat** on a report drawn from your work, open the Chat page with it in its tab beside the conversation. See [Reports from a chat](#reports-from-a-chat).
371
362
  - **The findings.** Each finding is one sentence with its reason, taken from the series: will miss its target at this pace, on course, behind its line for three readings in a row, behind and still moving away from the target, closing in, slipped, reached its target, or a large one-step move. No cause is given.
372
363
  - **Board measures.** The same four tiles as the Board's Metrics card, counted from the board's repository and drawn the same way. Choose **8 weeks**, **26 weeks** or **52 weeks**; the page keeps your choice. Press a measure to read its definition and values and to set its target: type a number and press **Save target**, or press **Clear target**. For Corrections, Blocked and Idle, lower is better, so the target is the most you accept; for Merged a week it is the least. The target goes to the workspace's state folder (`board-metric-targets.jsonl`) and the Board draws it too. An agent session cannot set one.
373
364
  - **No series recorded.** A KR metric with one reading or none is listed with the reason and is not drawn.
374
365
  - **Ask PMOS to set up a report.** The card has one rounded input, under the list. Type what the report is for and press the round send button inside it. The **+** at its left offers Dashboard or Report. The line under the input says it only proposes; its **ⓘ** shows the longer note. A background run proposes a report and does nothing else. The request is listed as Working, then Ready to review. A ready request opens with its proposal: **Set it up**, **Change it** (say what to change; the run revises it), or **Cancel**.
375
366
  - **Found in your work.** Up to three reports PMOS found in your calendar, mail or documents, each with why and what it saw. **Set it up** records the report and drafts its first cycle as a file. **Not a report** hides it and records it after 5 seconds, unless you press **Undo**. If the finding changed while the window was open, the window says what happened. It was already set up, it was marked not a report, or a new scan replaced it. The list is read again. Close the window and open the report from the list. If PMOS does not hear back, the window says nothing was recorded. Press the button to try again.
376
- - **Set up.** Your recurring reports, with their schedule and next draft. A report opens with **Draft it now** (for a report drawn from your work) and **Pause** or **Resume**.
377
- - **Report files.** The report files of the workspace, in the list, with cadence, slot and whether each is a draft or issued. Pressing one opens it on the page at the normal dialog size, with a status line (Draft or Issued, the saved design version, the file). The **slide deck / Document** menu picks the view: a deck is a title slide, then one slide for each section, with the arrow keys and a strip of slides; a document is a page. The **Read** menu holds **Present**, which shows the slide on the whole screen (the arrow keys move and Escape stops), and **Print or save as PDF**, which prints one slide to a page. **Download** gives PowerPoint, Word, Excel, CSV or the Markdown file; the files carry the words, not the look. **Edit** opens the words as a page. On a draft, **Issue** first says what it does, then **Issue it** freezes the cycle as you read it, through the console's own route; if the file changed since you opened it, nothing is issued and the reader shows the new words. Copies in Confluence or other tools are made in the console. Nothing is sent from this page.
378
- - **Edit the slides.** In the **Read** menu of a draft, **Edit the slides** opens the same file as a **Slides** tab beside the report. The rail on the left lists the slides. Drag a slide to move it, or use the up and down buttons on it; the buttons also duplicate and delete a slide, and **+ Slide** adds one from a layout. On the slide, click an item to select it, drag it to move it (a line shows when it is centred), and drag a corner to resize it. Double-click text to type. The toolbar adds text, an image, a chart, a table or a shape, and changes the layout of the slide or the theme of the deck. The bar under it changes the selected item: text style, alignment and colour; bars or a line and **Edit data** for a chart; rows and columns for a table. An image is a file that is already in the workspace: type its path, such as `planning/design/screen.png`. Speaker notes go in the box under the slide. **Undo** and **Redo** cover every change. **Present** opens the presenter view: the slide, the next slide, your speaker notes (you can type in them) and a timer. The arrow keys move, and Escape stops. **Slides only** hides the notes. **Audience window** opens a second window with the slide alone, for the screen you share; it follows your slide and closes when you stop. **Save** asks why the slides change, then writes the file; the reason goes in the Edit log. The file stays markdown: each slide is a heading with its text under it, and a hidden comment keeps the layout and the notes. If someone changed the text of a slide in the file, the editor shows the file's text and says so. If the file changed while the slides were open, Save stops and tells you to open the slides again. An issued report opens its slides read-only, with **Open the slides**.
379
- - **Shape a report's look.** On a draft, **Add a sample** takes a PDF, PowerPoint, Word, PNG or JPG file to follow. Each sample has an **×**: press it to remove that sample, and the next version, the design brief and each new cycle stop following it. Say how it should look in the conversation; PMOS draws the next design version (D1, D2, …) and says what it changed. Press a version to go back to it. **This is it** saves the version shown as the report's design, and PMOS draws the cycle to match. An issued cycle is frozen with its look.
380
-
381
- Not built: a second measure next to a chart, bar highlights, speaker notes and notes on a slide, changing a set-up report's audience, format or schedule, tile sizes and free layout, the finder's settings, and any measure no record holds. The console's own dashboards are separate and unchanged. KR metric records belong to a workspace, so every board of a workspace shows the same charts.
367
+ - **Set up.** A recurring report with no cycle yet, with its schedule and next draft. It opens with **Draft it now** (for a report drawn from your work) and **Pause** or **Resume**. Once it has a cycle, its row opens the report itself.
368
+ - **A report.** Pressing a report row opens its latest cycle on the page. Under the report's name, the cycle chip (for example **12 Oct · 4 cycles**) lists every cycle of the report, grouped **Draft**, **Issued** and **Archived**; pick one to read it. Over the report there is one row of icon buttons. Hold the pointer on a button, or focus it, to see its name:
369
+ - **Slides** and **Page** pick the view. Slides is a title slide, then one slide for each section, with the arrow keys and a strip of slides. Page is the document as it reads.
370
+ - **Brief** opens the report's brief in its own tab (see below).
371
+ - The state (**Draft**, **Issued** or **Archived**) and the schedule (for example **Mon 09:00**, **Off** or **None**). Press the schedule to change it: daily, weekly or every two weeks on a day, monthly, or **Off**, which pauses it. A report drawn from your work also has **Draft the next cycle now** there. A report with no template has no schedule; its menu says so and opens a chat to set one up.
372
+ - **Edit** (a draft only) edits in the same place: on Slides the slide editor, on Page the words. **Save** or **Cancel** brings the report back. No other tab opens.
373
+ - **Present** shows the slide on the whole screen; the arrow keys move and Escape stops.
374
+ - **Share** makes a link to a copy of the report as it is now, with a password if you want one, and an end date. The Brief is never shared.
375
+ - **Issue** (a draft only) first says what it does, then **Issue it** freezes the cycle as you read it. If the file changed since you opened it, nothing is issued and the reader shows the new words.
376
+ - **⋯** names the file, then has **Download** (PowerPoint, Word, Excel, CSV or the Markdown file; the files carry the words, not the look), **Print or save as PDF** (one slide to a page), and **Discard this draft** or, for an issued cycle, **Archive** and **Bring back**. Discard and Archive ask once. An issued report is never deleted.
377
+ - Copies in Confluence or other tools are made in the console. Nothing is sent from this page.
378
+ - **Edit the slides.** **Edit** on Slides opens the slide editor in the report's place. The rail on the left lists the slides. Drag a slide to move it, or use the up and down buttons on it; the buttons also duplicate and delete a slide, and **+ Slide** adds one from a layout. On the slide, click an item to select it, drag it to move it (a line shows when it is centred), and drag a corner to resize it. Double-click text to type. The toolbar adds text, an image, a chart, a table or a shape, and changes the layout of the slide or the theme of the deck. The bar under it changes the selected item: text style, alignment and colour; bars or a line and **Edit data** for a chart; rows and columns for a table. An image is a file that is already in the workspace: type its path, such as `planning/design/screen.png`. Speaker notes go in the box under the slide. **Undo** and **Redo** cover every change. **Present** opens the presenter view: the slide, the next slide, your speaker notes (you can type in them) and a timer. The arrow keys move, and Escape stops. **Slides only** hides the notes. **Audience window** opens a second window with the slide alone, for the screen you share; it follows your slide and closes when you stop. **Save** asks why the slides change, then writes the file and brings the report back; the reason goes in the Edit log. **Cancel** asks first if you changed something. The file stays markdown: each slide is a heading with its text under it, and a hidden comment keeps the layout and the notes. If someone changed the text of a slide in the file, the editor shows the file's text and says so. If the file changed while the slides were open, Save stops and tells you to open the slides again.
379
+ - **Shape a report's look.** On a draft, say how it should look in the box under the conversation. The clip in the box attaches a sample (a PDF, PowerPoint, Word, PNG or JPG file) to follow; each sample is a chip above the box, with an **×** that removes it. When PMOS has drawn a new look, one line over the report says **New look ready**, with the request it came from, and shows it. **Use it** saves it as the report's design, and PMOS draws the cycle to match. **Keep current** goes back to the look you had. An issued cycle is frozen with its look.
380
+ - **The Brief.** The Brief explains how the report is made. It is not part of the report. It reads what PMOS keeps for the report and says it in words: **At a glance** (what it is, who it is for, the decision, the schedule, the format, what makes it), **Questions it answers**, **In and out of scope**, **How it is structured**, **Where the data comes from** (with whether each source was reached), **How each number is worked out** (from where, how, compared with what, and when it is flagged), **Checks and caveats**, **Why it looks like this** (the samples, what stays the same, what changes, what it learned from you, and the earlier looks, each with **Go back to it**), **What changed**, and **Please confirm**. Where a record says nothing, the Brief says **not said** and lists the question under Please confirm; the head counts them (**2 to confirm**). **Correct** on a section puts `Correct "<section>":` in the box; finish the sentence and send it. PMOS writes a new version of the brief, and **Use it** at the top of the Brief keeps it. A report with no template has no brief to correct yet. PMOS keeps no glossary of terms, so the Brief has no section for what the words mean.
381
+
382
+ Not built: a second measure next to a chart, bar highlights, speaker notes and notes on a slide, changing a set-up report's audience or format, tile sizes and free layout, the finder's settings, and any measure no record holds. The console's own dashboards are separate and unchanged. KR metric records belong to a workspace, so every board of a workspace shows the same charts.
382
383
 
383
384
  ## Welcome
384
385
 
@@ -425,7 +426,7 @@ A document opens in one sheet on both the Board and the initiative page. Its sta
425
426
 
426
427
  The conversation beside every premium dialog is a real Claude Code session. Anything you can do in a Claude Code chat, you can do here.
427
428
 
428
- Every popup has this chat, including the ones that have no row of their own: a task, a document with no file, a set-up report, a measure, a meeting on another day, Sources, Settings, the Around-you rows and the forms (Add a task, Add a document, the board actions). Its conversation belongs to that one thing, so it is there again the next time you open it. Opening a popup starts nothing; the session starts when you send the first message, and Claude starts from what the popup shows: its title, its sub line and its facts. A draft report keeps its own **Say how it should look** box, and Insight Studio keeps its brief.
429
+ Every popup has this chat, including the ones that have no row of their own: a task, a document with no file, a set-up report, a measure, a meeting on another day, Sources, Settings, the Around-you rows and the forms (Add a task, Add a document, the board actions). Its conversation belongs to that one thing, so it is there again the next time you open it. Opening a popup starts nothing; the session starts when you send the first message, and Claude starts from what the popup shows: its title, its sub line and its facts. A draft report keeps its own **Say how it should look** box.
429
430
 
430
431
  - **Your first message** in a dialog starts one session for that row, the page or the initiative, in its repository. Claude gets the row as the page shows it: the title, what the page says, the facts and the files to start from. Then it gets your words.
431
432
  - **The message box** takes several lines. **Enter** sends; **Shift+Enter** starts a new line. The box grows as you type, up to about eight lines, and then scrolls. The send button stays at its foot, also with a phone keyboard open.
@@ -445,6 +446,24 @@ Every popup has this chat, including the ones that have no row of their own: a t
445
446
 
446
447
  Sending and the option presses need the page's launch nonce, so an agent session cannot type into your chat.
447
448
 
449
+ ### Reports from a chat
450
+
451
+ Any chat can become a report. There is no button for it: say it in the chat, for example "make this a report for the growth leads" or "make it weekly on Wednesdays". Claude answers in a few lines, and the **Report** tab opens beside the conversation (on a phone, a bar over the message box offers it). The chip under Claude's answer opens the tab again.
452
+
453
+ - **A new report** shows its name, what it answers, who reads it, its format and the seven sections every new report has. **Set it up** records it and writes its first draft. If you did not say a schedule, its **Schedule** is **Off**: it runs once, and you can give it a schedule later.
454
+ - **Schedule** is a chip on the tab. Press it to pick **Off**, **Daily**, **Weekly**, **Every two weeks** or **Monthly**, and a day for a weekly one. Or say it in the chat; Claude's proposal shows with **Change the schedule**. Off pauses the template and keeps its schedule for later.
455
+ - **Structure** and **Design** show the report's versions (S1, S2, … and D1, D2, …). Say a change in the chat ("leave out the timeline", "use the theme of my sample"); the tab shows it with **Make the next version**. **Use this** or **This is it** saves the version shown, and **Undo** goes back one.
456
+ - **Reports** lists the template's cycles. A **draft** can be discarded until it is issued. An **issued** report is kept for good: it can be archived (hidden) and brought back, never deleted.
457
+ - **Delete template** stops its schedule now. Its issued reports and its open draft stay, with its name.
458
+
459
+ Charts and dashboards work the same way. Say "chart partner activation as bars" or "make a dashboard for the Monday partner review", and the **Chart** or **Dashboard** tab opens beside the conversation.
460
+
461
+ - **A chart** is drawn from the readings of one KR metric record, as Insights draws it. **Line**, **Bars**, **Number** and **Meter** redraw it; a meter needs a target. **Save chart** saves it, and it shows on Insights under Your charts. A saved chart has **Delete chart**, which asks first.
462
+ - **A dashboard** draws its charts in order and names any measure with fewer than two readings. **Save dashboard** saves it to the list on Insights, where you pin it. A saved dashboard has **Delete dashboard**, which asks first. Its charts and records stay.
463
+ - To change a saved one, ask in the chat; the tab shows the change with **Save the change**.
464
+
465
+ Claude never sets up, schedules or deletes a report, a chart or a dashboard itself. Every change is a press on the tab, and the routes refuse an agent session.
466
+
448
467
  ### Notes
449
468
 
450
469
  Notes is a notepad for each conversation. Open it from **+** › **Notes**. It opens in the viewer beside the conversation. On a phone, it opens on the viewer tab.
@@ -15,6 +15,7 @@ const path = require('path');
15
15
  const crypto = require('crypto');
16
16
  const headless = require('./headless.js');
17
17
  const Goal = require('./goal-chat.js');
18
+ const ReportChat = require('./report-chat.js');
18
19
 
19
20
  const THREADS = 'briefing-premium-threads.jsonl';
20
21
  const KEY_RE = /^(decision|blocked|waited|src|ev|work|board|init|doc|ins|chat|pop):[A-Za-z0-9][A-Za-z0-9._:-]{0,100}$/; // chat: the PM's own chat on the Chat page (premium-chat-page); pop: a popup with no row of its own (premium-popup-context P1)
@@ -193,6 +194,8 @@ function chat({ runtimeDir, key, text, model, context, sessions, wsId, now = new
193
194
  let msg = q, goal = null;
194
195
  const cmd = Goal.parseCommand(q);
195
196
  if (cmd) { const b = Goal.begin({ runtimeDir, key, text: cmd.text, now }); if (b.error) return fail(400, b.error); msg = b.prompt; goal = b.id; }
197
+ // premium-reports-from-chat R1: a message about a report, a chart or a dashboard carries the pmos-report rule (lib/report-chat.js)
198
+ else if (ReportChat.isAsk(q)) msg = ReportChat.wrap(q);
196
199
  const extra = goal ? { goal } : {};
197
200
  if (alive) {
198
201
  if (!sessions.type(live, msg)) return fail(409, 'The message did not reach the session. Open it in Sessions.');
@@ -2,7 +2,8 @@
2
2
  /* lib/insights-premium.js — the premium Insights page's model, built from the KR metric records and the report files the console's Reports tab reads
3
3
  * (initiative briefing-premium-insights).
4
4
  *
5
- * build(facts) → model PURE. facts = { now, board, boards, outcomes, reports, reportsOk, missing[], saved, setups, pinned, leads }
5
+ * build(facts) → model PURE. facts = { now, board, boards, outcomes, reports, reportsOk, missing[], saved, setups, pinned, leads, archived }
6
+ * archived = the ids (cadence/slot) of the issued reports the PM archived: they are marked Archived and listed last
6
7
  * peekModel() → the last model built, for the agent to find a chart in (null before the first)
7
8
  *
8
9
  * facts come from the routes of lib/routes-c3-strategy.js and lib/routes-reports.js:
@@ -150,14 +151,15 @@ function dashInsightOf(L) {
150
151
 
151
152
  const REPORTS_MAX = 60;
152
153
  /** The report files, newest first. `lead` is the opening sentence of the file as the route read it (insights-one-list L6), '' when it has none. */
153
- function reportRows(reports, leads) {
154
- const L = leads || {};
155
- return (reports || []).slice().sort((a, b) => String(b.slot).localeCompare(String(a.slot)) || String(a.cadence).localeCompare(String(b.cadence))).slice(0, REPORTS_MAX).map((r) => {
156
- const issued = !!r.issued;
154
+ function reportRows(reports, leads, archived) {
155
+ const L = leads || {}, A = new Set(archived || []);
156
+ const gone = (r) => !!r.issued && A.has(r.cadence + '/' + r.slot);
157
+ return (reports || []).slice().sort((a, b) => (gone(a) - gone(b)) || String(b.slot).localeCompare(String(a.slot)) || String(a.cadence).localeCompare(String(b.cadence))).slice(0, REPORTS_MAX).map((r) => {
158
+ const issued = !!r.issued, arch = gone(r);
157
159
  return {
158
160
  key: 'rep:' + r.cadence + ':' + r.slot, cadence: r.cadence, slot: r.slot, date: shortDate(r.slot), state: issued ? 'issued' : r.status === 'draft' ? 'draft' : 'file',
159
- stateLabel: issued ? 'Issued' + (r.issued.at ? ' ' + shortDate(r.issued.at) : '') : r.status === 'draft' ? 'Draft' : 'Report file', path: r.path || '',
160
- lead: typeof L[r.path] === 'string' ? clip(L[r.path], 240) : '',
161
+ stateLabel: arch ? 'Archived' : issued ? 'Issued' + (r.issued.at ? ' ' + shortDate(r.issued.at) : '') : r.status === 'draft' ? 'Draft' : 'Report file', path: r.path || '',
162
+ lead: typeof L[r.path] === 'string' ? clip(L[r.path], 240) : '', archived: arch,
161
163
  };
162
164
  });
163
165
  }
@@ -266,7 +268,7 @@ function build(facts) {
266
268
  const dash = (id, name, L) => ({ id, name, keys: L.map((c) => c.key), total: L.length, off: offOf(L), chip: !L.length ? '' : offOf(L) ? offOf(L) + ' off its line' : 'On their lines' });
267
269
  const dashboards = [dash('all', 'All measures', charts)].concat(savedOf(f.saved, outcomes, charts.concat(mine), mineAll), pillars.length > 1 ? pillars.map((p) => dash('p:' + p, p, charts.filter((c) => c.pillar === p))) : []);
268
270
  const findings = findingsOf(charts);
269
- const rep = reportRows(f.reports, f.leads);
271
+ const rep = reportRows(f.reports, f.leads, f.archived);
270
272
  for (const d of dashboards) Object.assign(d, { insight: dashInsightOf(d.keys.map((k) => charts.concat(mine).find((c) => c.key === k)).filter(Boolean)) });
271
273
  const pin0 = f.pinned !== undefined ? f.pinned : ((f.saved || []).find((d) => d.main) || {}).id, pinned = pin0 && dashboards.some((d) => d.id === pin0) ? pin0 : null;
272
274
  const off = offOf(charts);
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+ /* report-chat — reports, charts and dashboards from any chat (initiative premium-reports-from-chat, slices B and C; PRD R1–R4, C1–C3).
3
+ * There is no button: the PM says "make this a report" in the chat. When a message asks for a report, a chart or a dashboard, the chat route
4
+ * types it into the session with a PMOS rule first. The rule asks Claude to end its answer with one fenced `pmos-report` JSON block. The page
5
+ * (public/pm/report-chat.js) splits that block off and shows it in the Report or Chart tab beside the conversation.
6
+ * Claude never sets up, schedules, changes or deletes a report, a chart or a dashboard itself. Every write is the PM's press in the tab, through the
7
+ * report-setups, report-structure, report-design, premium-charts and premium-dashboards routes, which refuse an agent session (D65: propose-only). */
8
+
9
+ // The first line of every message PMOS wraps. The page reads it to show the PM's turn as typed (public/pm/goal-chat.js shownUser).
10
+ const MARK = '[PMOS report]';
11
+ const SAYS = 'The PM says: ';
12
+ // A message about a report, a chart or a dashboard. Other messages go to the session as typed.
13
+ const ASK_RE = /\b(reports?|charts?|graphs?|dashboards?)\b/i;
14
+
15
+ const isAsk = (text) => ASK_RE.test(String(text == null ? '' : text)) && !String(text).trim().startsWith('/');
16
+
17
+ const RULE = [
18
+ 'If the PM asks for a report, a chart or a dashboard, or asks to change, schedule or stop one, do the reading yourself and answer in a few lines.',
19
+ 'Then end your message with ONE fenced code block with the language tag pmos-report, holding one JSON object. The page shows it in a Report or Chart tab beside this chat.',
20
+ 'You never set up, schedule, change or delete a report yourself, and you never write report-setups.jsonl: the PM presses in the tab.',
21
+ '- A new report: {"kind":"report","proposal":{"name":"short name","purpose":"what it answers, one line","audience":"who reads it","output":"google-doc|google-slides|google-sheets|confluence|pdf","schedule":null,"sources":["what it draws from"]}}',
22
+ ' schedule stays null unless the PM named one; then it is {"cadence":"daily|weekly|bi-weekly|monthly","day":"Mon","dayOfMonth":1,"time":"09:00"}. A report with no schedule runs once.',
23
+ '- A report that is set up already: {"kind":"report","id":"<its id>"} and, only when the PM asked for it, "schedule": {…} or "off", "structure": "the change to its sections, in the PM\'s words", "design": "the change to its look, in the PM\'s words".',
24
+ ' The set-up reports are the setup lines of report-setups.jsonl (planning/ or pmos/state/); a later change line wins, a remove line deletes one.',
25
+ '- A chart of one measure: {"kind":"chart","proposal":{"measure":"<KR metric id>","title":"short title","question":"what it answers","form":"line|bars|number|meter","range":null,"target":null,"better":"higher|lower","note":""}}',
26
+ ' measure is the id of a KR metric record (planning/records/kr-metrics.jsonl). range is how many of the latest readings to draw, or null for all. A meter needs a target.',
27
+ ' To change a saved chart, add its "id" (pc-…, from premium-charts.jsonl in the state folder) and put the whole changed chart in proposal; {"kind":"chart","id":"pc-…"} alone opens it.',
28
+ '- A dashboard: {"kind":"dashboard","proposal":{"name":"short name","purpose":"the routine it serves","charts":["KR metric ids or saved chart ids, in order"]}}. Six charts or fewer serve one routine.',
29
+ ' To change a saved dashboard, add its "id" (from premium-dashboards.jsonl in the state folder); {"kind":"dashboard","id":"…"} alone opens it.',
30
+ ' You never save, change or delete a chart or a dashboard yourself either: the PM presses Save in the Chart tab.',
31
+ 'If the message is not about a report, a chart or a dashboard, answer it and add no block.',
32
+ ].join('\n');
33
+
34
+ /** The message as PMOS types it into the session: the rule, then the PM's words. */
35
+ function wrap(text) { return MARK + ' ' + RULE + '\n\n' + SAYS + String(text == null ? '' : text); }
36
+
37
+ module.exports = { MARK, isAsk, wrap, RULE };
@@ -65,6 +65,8 @@ module.exports = {
65
65
  const missing = reportsOk ? [] : ['reports'];
66
66
  let saved = [], mine = [], pinned = null;
67
67
  if (pick && pick.id) { try { const root = require('path').resolve(ctx.getWs(pick.ws).root); saved = PD.list(root, pick.id); pinned = PD.pinned(root, pick.id); } catch { missing.push('dashboards'); } }
68
+ let archived = [];
69
+ if (pick) { try { archived = [...require('./report-setups.js').stateOf(require('path').resolve(ctx.getWs(pick.ws).root)).archived]; } catch { archived = []; } }
68
70
  if (pick && pick.id) { try { mine = require('./premium-charts.js').list(require('path').resolve(ctx.getWs(pick.ws).root), pick.id); } catch { missing.push('saved charts'); } }
69
71
  const su = await via(setups, '/api/report-setups' + q, req, ctx).catch(() => ({ status: 500, body: null }));
70
72
  const setupsOk = su.status === 200 && !!su.body && Array.isArray(su.body.setups);
@@ -73,7 +75,7 @@ module.exports = {
73
75
  const model = Insights.build({
74
76
  now: Date.now(), board: pick ? { ws: pick.ws, id: pick.id, name: pick.name } : { ws, id: null, name: 'Insights' }, boards: all.map((x) => ({ ws: x.ws, id: x.id, name: x.name })),
75
77
  outcomes, reports: reportsOk ? rp.body.reports || [] : [], reportsOk, missing, saved, mine,
76
- setups: setupsOk ? su.body : null, pinned, leads,
78
+ setups: setupsOk ? su.body : null, pinned, leads, archived,
77
79
  });
78
80
  ctx.json(res, { ok: true, state: 'ready', model, as_of: Date.now() });
79
81
  return true;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.388.0",
3
+ "version": "0.390.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.388.0",
9
+ "version": "0.390.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.388.0",
3
+ "version": "0.390.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",