create-pmos 0.433.0 → 0.435.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 (89) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-insights-test.js +63 -58
  7. package/workspace/changelog.json +24 -0
  8. package/workspace/fixtures/ready-reports.js +145 -0
  9. package/workspace/guide/index.md +2 -0
  10. package/workspace/guide/metric-drafts.md +21 -1
  11. package/workspace/guide/ready-made-dashboards.md +62 -0
  12. package/workspace/guide/your-impact.md +58 -0
  13. package/workspace/impact-screens-test.js +149 -0
  14. package/workspace/intel-report-ui-test.js +1 -1
  15. package/workspace/intelligence-gaps-ui-test.js +13 -9
  16. package/workspace/lib/board-premium.js +1 -1
  17. package/workspace/lib/engine/outbox.js +1 -1
  18. package/workspace/lib/engine/records/index.js +11 -3
  19. package/workspace/lib/goal-status.js +199 -0
  20. package/workspace/lib/goal-watch.js +71 -0
  21. package/workspace/lib/headless.js +24 -2
  22. package/workspace/lib/impact-cli.js +72 -0
  23. package/workspace/lib/impact-runs.js +114 -0
  24. package/workspace/lib/impact.js +195 -0
  25. package/workspace/lib/insights-premium.js +43 -4
  26. package/workspace/lib/intel-report.js +36 -5
  27. package/workspace/lib/metric-draft-runs.js +33 -10
  28. package/workspace/lib/metric-drafts.js +118 -15
  29. package/workspace/lib/metric-read-runs.js +132 -0
  30. package/workspace/lib/metric-reads.js +129 -0
  31. package/workspace/lib/metrics-cli.js +100 -5
  32. package/workspace/lib/pmos-verbs.js +4 -1
  33. package/workspace/lib/ready-reports.js +616 -0
  34. package/workspace/lib/report-dashboards.js +5 -0
  35. package/workspace/lib/report-setups.js +16 -7
  36. package/workspace/lib/route-modules.js +4 -0
  37. package/workspace/lib/routes-board-premium.js +5 -0
  38. package/workspace/lib/routes-boards.js +1 -1
  39. package/workspace/lib/routes-goal-status.js +111 -0
  40. package/workspace/lib/routes-impact-views.js +58 -0
  41. package/workspace/lib/routes-impact.js +91 -0
  42. package/workspace/lib/routes-insights-premium.js +20 -0
  43. package/workspace/lib/routes-metric-drafts.js +55 -4
  44. package/workspace/lib/routes-ready-reports.js +455 -0
  45. package/workspace/lib/routes-records.js +2 -0
  46. package/workspace/lib/routes-report-setups.js +4 -3
  47. package/workspace/lib/settings-store.js +3 -0
  48. package/workspace/okr-goals-ui-test.js +175 -0
  49. package/workspace/package-lock.json +2 -2
  50. package/workspace/package.json +1 -1
  51. package/workspace/program-charter-test.js +11 -7
  52. package/workspace/program-panel-test.js +1 -1
  53. package/workspace/public/pm/bd-ini-panel.js +33 -8
  54. package/workspace/public/pm/bd-prog-panel.js +58 -10
  55. package/workspace/public/pm/cozy-adler.css +5 -0
  56. package/workspace/public/pm/cozy-adler.js +17 -9
  57. package/workspace/public/pm/cozy-insights.css +84 -0
  58. package/workspace/public/pm/cozy-settings.js +11 -1
  59. package/workspace/public/pm/cozy-viewer.js +2 -2
  60. package/workspace/public/pm/cozy-vw-rp.css +13 -0
  61. package/workspace/public/pm/dash-view.css +111 -0
  62. package/workspace/public/pm/dash-view.js +261 -0
  63. package/workspace/public/pm/home-app.js +87 -8
  64. package/workspace/public/pm/home-data.js +3 -2
  65. package/workspace/public/pm/home-impact.css +16 -0
  66. package/workspace/public/pm/home-impact.js +72 -0
  67. package/workspace/public/pm/home-ini.js +19 -1
  68. package/workspace/public/pm/home-today.js +4 -2
  69. package/workspace/public/pm/impact.css +37 -0
  70. package/workspace/public/pm/impact.js +201 -0
  71. package/workspace/public/pm/okr-list.js +249 -0
  72. package/workspace/public/pm/premium-insights.js +232 -240
  73. package/workspace/public/pm/premium-report-read.js +36 -5
  74. package/workspace/public/pm/premium-vw-mtg.js +4 -1
  75. package/workspace/public/pm/ready-lib.css +29 -0
  76. package/workspace/public/pm/ready-lib.js +62 -0
  77. package/workspace/public/premium-intelligence.html +3 -2
  78. package/workspace/public/premium.html +1 -0
  79. package/workspace/ready-dash-ui-test.js +227 -0
  80. package/workspace/server.js +58 -2
  81. package/workspace/skills/impact-detect.skill +46 -0
  82. package/workspace/skills/metric-read.skill +32 -0
  83. package/workspace/test-lists/batch17-ready-reports.json +9 -0
  84. package/workspace/test-lists/goal-watch.json +9 -0
  85. package/workspace/test-lists/impact-screens.json +5 -0
  86. package/workspace/test-lists/impact-ui.json +9 -0
  87. package/workspace/test-lists/impact.json +9 -0
  88. package/workspace/test-lists/okr-goals-ui.json +5 -0
  89. package/workspace/test-lists/ready-reports-ui.json +6 -0
@@ -0,0 +1,145 @@
1
+ 'use strict';
2
+ /* fixtures/ready-reports.js — the ready-made dashboards and the library, in the shape GET /api/ready-reports/dashboard and /library answer
3
+ * (batch 17 item 1; agreed between the backend and UI threads). The words are the canvas frames' (PbA1, PbA2, PbA3, PbS1, PbS2, PbG2, PbG6,
4
+ * PbG7, PbG8, PbG10, PbA6), so a screenshot can be held beside its frame. dash-view.test.mjs and ready-dash-ui-test.js read them. */
5
+
6
+ const OWN = (n) => ({ name: n });
7
+ /** PbA2: the program at Build, one decision, the sponsor update drafted. */
8
+ const program = (id = 'project-ascent') => ({
9
+ ok: true, scope: 'program:' + id, level: 'program', name: 'One login', sub: 'Program · 2 products · 5 initiatives', opens: 'work',
10
+ handled: { lead: '3 of 4 milestones hold their dates. I drafted the sponsor update for Thursday.', rest: 'Descope is three weeks ahead of its line. Thanks, Dewi.', tone: 'calm' },
11
+ goals: [
12
+ { id: 'g-checkout', title: 'More shoppers finish signing in at checkout', owner: OWN('Raka'), dot: 'behind', sub: '+1.2 of +5 points · behind its line' },
13
+ { id: 'g-descope', title: 'Half of all logins run on Descope', owner: OWN('Dewi'), dot: 'ahead', sub: '41% of 50% · ahead of its line' },
14
+ ],
15
+ drafts: null,
16
+ stage: { kind: 'milestones', items: [
17
+ { id: 'm1', name: 'Staff sign in with Descope', dot: 'ok', done: true, when: 'done 12 Oct' },
18
+ { id: 'm2', name: 'Inline login at checkout', dot: 'risk', when: '18 Nov → 28 Nov–5 Dec' },
19
+ { id: 'm3', name: 'MAGW off Java', dot: 'q', when: 'on line · 15 Jan' },
20
+ { id: 'm4', name: 'All logins on Descope', dot: 'q', when: 'on line · 31 Mar' },
21
+ ], note: 'From each initiative\'s Jira and stage dates · read 07:02' },
22
+ guardrails: [],
23
+ needs: { id: 'n1', q: 'Ship checkout 2 Dec, or 18 Nov without passkeys?', sub: 'From Inline login. The milestone holds with my pick.', pick: '18 Nov without passkeys', from: 'inline-login', ini: 'descope-parity', keep: { ids: ['p-dates-1'] }, drop: { sig: 'sig-dates-1' } },
24
+ reports: [
25
+ { id: 'r-sponsor', kind: 'weekly', name: 'Sponsor update', state: 'drafted', sub: 'Drafted · Thu 10:00 to Lee and 3 sponsors', path: 'reports/one-login-sponsor/2026-10-29.md', cadence: 'one-login-sponsor', slot: '2026-10-29', sha: 'abc123' },
26
+ { id: 'r-ms', kind: 'checkpoint', name: 'Milestone review', state: 'scheduled', sub: 'Drafts on 18 Nov' },
27
+ { id: 'r-did', kind: 'did-it-work', name: 'Did it work?', state: 'scheduled', sub: 'Drafts when the program closes' },
28
+ ],
29
+ heldBy: null, trust: null, products: [],
30
+ done: { title: 'Done this week', text: 'Staff login fully on Descope · 11 tickets closed · thanks to Dewi, Sari and Raka' },
31
+ });
32
+ /** PbA1: the initiative at Build, ships late of its promise. */
33
+ const initiative = (id = 'descope-parity') => ({
34
+ ok: true, scope: 'initiative:' + id, level: 'initiative', name: 'Inline login for eShop checkout', sub: 'pmos-idpf · Build', opens: 'work',
35
+ handled: { lead: 'I read Jira and Amplitude at 07:02 and drafted your Monday update.', rest: 'Six tickets closed since Friday; thanks, Raka and Dewi.', tone: 'calm' },
36
+ goals: [{ id: 'g-checkout', title: 'More shoppers finish signing in at checkout', owner: OWN('Raka'), dot: 'behind', sub: '+1.2 of +5 points · its line says +2.0' }],
37
+ drafts: null,
38
+ stage: { kind: 'ships', lo: '28 Nov', hi: '5 Dec', promised: '18 Nov', dot: 'risk', today: 'day 19',
39
+ steps: [{ name: 'Spec', state: 'done' }, { name: 'Design', state: 'done' }, { name: 'Build', state: 'now' }, { name: 'Deliver', state: 'next' }],
40
+ jira: { done: 14, total: 23, at: '07:02' } },
41
+ guardrails: [],
42
+ needs: { id: 'n1', q: 'Ship 2 Dec, or 18 Nov without passkeys?', sub: 'Passkeys are 6 of the 9 open tickets. The goal needs sign-in, not passkeys.', pick: '18 Nov without passkeys, passkeys in v1.1', ini: id, keep: { ids: ['p-dates-1'] }, drop: { sig: 'sig-dates-1' } },
43
+ reports: [
44
+ { id: 'r-weekly', kind: 'weekly', name: 'Weekly update', state: 'drafted', sub: 'Drafted · goes Mon 09:00 to 6 people', path: 'reports/inline-login-weekly/2026-11-02.md', cadence: 'inline-login-weekly', slot: '2026-11-02', sha: 'def456' },
45
+ { id: 'r-stage', kind: 'checkpoint', name: 'Stage review', state: 'scheduled', sub: 'when Build ends' },
46
+ { id: 'r-did', kind: 'did-it-work', name: 'Did it work?', state: 'scheduled', sub: '4 weeks after launch' },
47
+ ],
48
+ heldBy: null, trust: null, done: null,
49
+ });
50
+ /** PbG2: the same initiative while Jira cannot be read: the weekly update is held. */
51
+ const held = (id = 'descope-parity') => ({
52
+ ...initiative(id),
53
+ handled: { lead: 'I can\'t read Jira since Sat 09:12, so I\'m holding Monday\'s update.', rest: 'Its ship date and tickets would be 2 days old. The rest of the dashboard is fresh.', tone: 'warn' },
54
+ goals: [], needs: null, heldBy: { source: 'jira', since: 'Sat 09:12', why: 'Jira says the sign-in token expired.' },
55
+ reports: [{ id: 'r-weekly', kind: 'weekly', name: 'Weekly update', state: 'held', sub: 'Send it now with "Jira as of Saturday" written on it, or wait until Jira reads again. It goes out by itself once Jira reads, if nothing changed.' }],
56
+ });
57
+ /** PbS1: the initiative at Spec, ready for build 5 of 7. */
58
+ const discover = (id = 'passkey') => ({
59
+ ok: true, scope: 'initiative:' + id, level: 'initiative', name: 'Passkey sign-in', sub: 'pmos-idpf · Spec · week 3', opens: 'work',
60
+ handled: { lead: 'I chased the two sign-offs and drafted the stage review.', rest: 'Spec is 5 of 7 done. Security replied this morning; thanks, Sari.', tone: 'calm' },
61
+ goals: [{ id: 'g-pass', title: 'Half of returning shoppers sign in with a passkey', owner: OWN('Raka'), dot: 'none', sub: 'Kept 27 Oct · first reading after launch' }],
62
+ stage: { kind: 'ready', done: 5, total: 7, day: 16, usual: 18, stage: 'Spec', items: [
63
+ { text: 'Problem statement', done: true }, { text: 'Success measure', done: true }, { text: 'Scope agreed', done: true },
64
+ { text: 'PRD written', done: true }, { text: 'Security review', done: true, who: 'Sari', when: 'today' },
65
+ { text: 'Design sign-off', done: false, who: 'Lee', when: 'asked Mon' }, { text: 'Rough size from engineering', done: false, who: 'Raka' },
66
+ ] },
67
+ guardrails: [], needs: null,
68
+ reports: [{ id: 'r-stage', kind: 'checkpoint', name: 'Stage review', state: 'drafted', sub: 'Drafted · opens when the last 2 are done', path: 'reports/passkey-stage/2026-11-04.md' },
69
+ { id: 'r-weekly', kind: 'weekly', name: 'Weekly update', state: 'off', sub: 'Off for now · nothing for stakeholders to decide yet' }],
70
+ heldBy: null, trust: null, done: null,
71
+ });
72
+ /** PbS2: after launch, Did it work? and a guardrail. */
73
+ const monitor = (id = 'descope-parity') => ({
74
+ ...initiative(id), sub: 'pmos-idpf · Monitor · launched 18 Nov',
75
+ handled: { lead: 'It shipped on 18 Nov, and the goal is already moving.', rest: 'Sign-in at checkout is +3.4 points in 12 days. Thanks to Raka and the whole team.', tone: 'calm' },
76
+ goals: [], needs: null,
77
+ stage: { kind: 'did-it-work', head: '+3.4 of +5 points', day: 12, window: 28, dot: 'on', promise: 'Promise in the PRD: +5 points within 4 weeks · Amplitude · read 07:02', note: 'On this line it lands near +5 on 16 Dec. I draft the verdict then: Keep, Iterate or Stop.' },
78
+ guardrails: [{ id: 'gr', title: 'Login errors under 0.5%', owner: OWN('Sari'), dot: 'on', sub: '0.24% · held since launch' }],
79
+ reports: [{ id: 'r-did', kind: 'did-it-work', name: 'Did it work?', state: 'scheduled', sub: 'Drafts 16 Dec · to the team and 4 stakeholders' }, { id: 'r-weekly', kind: 'weekly', name: 'Weekly update', state: 'scheduled', sub: 'Monthly now · nothing ships until v1.1' }],
80
+ done: { title: 'Shipped', text: '18 Nov, on its promised date · 23 of 23 tickets' },
81
+ });
82
+ /** PbA3 + PbG8: the product page, the weekly update late. */
83
+ const product = () => ({
84
+ ok: true, scope: 'product', level: 'product', name: 'pmos-idpf', sub: 'Product', opens: 'dashboard',
85
+ handled: { lead: 'Your weekly update was due at 09:00 and still waits for your ✓.', rest: 'Nothing went out: I never send without you. It is still true as of 07:02; if you send by 14:00 I won\'t change a word.', tone: 'calm' },
86
+ goals: [
87
+ { id: 'a', title: 'Half of all logins run on Descope', dot: 'ahead', owner: OWN('Dewi') }, { id: 'b', title: 'Staff on Descope', dot: 'on' },
88
+ { id: 'c', title: 'Merchant logins', dot: 'on' }, { id: 'd', title: 'More shoppers finish signing in at checkout', short: 'checkout sign-in', dot: 'behind', owner: OWN('Raka') },
89
+ ],
90
+ stage: { kind: 'ships-next', items: [
91
+ { id: 'i1', name: 'Inline login for eShop checkout', dot: 'risk', lo: '28 Nov', hi: '5 Dec', promised: '18 Nov', owner: OWN('Raka') },
92
+ { id: 'i2', name: 'Concurrency management', dot: 'on', when: '9 Dec', promised: '9 Dec', owner: OWN('Wawan') },
93
+ ], more: { count: 3, text: '3 more, all on their dates', items: [{ id: 'i3', name: 'Passkey sign-in', dot: 'on', when: '15 Jan' }] } },
94
+ guardrails: [], needs: null,
95
+ reports: [
96
+ { id: 'r-weekly', kind: 'weekly', name: 'Weekly update', state: 'late', sub: 'Waits for you since 09:00 · 9 readers', path: 'reports/weekly/2026-11-02.md', cadence: 'weekly', slot: '2026-11-02', sha: 'aaa111' },
97
+ { id: 'r-metrics', kind: 'metrics', name: 'Metrics review', state: 'scheduled', sub: 'With Strategist' },
98
+ { id: 'r-q', kind: 'checkpoint', name: 'Quarter review', state: 'scheduled', sub: 'on 17 Dec' },
99
+ ],
100
+ heldBy: null, trust: null, done: null,
101
+ });
102
+ /** PbG6: the product after 4 unchanged sends: Send by itself is offered. */
103
+ const trusted = () => ({ ...product(), handled: { lead: 'You sent the last 4 weekly updates exactly as I drafted them.', rest: 'Shall I send it by itself on Mondays? I will still hold any week with a miss or a decision, and show you what went.', tone: 'calm' }, trust: { reportId: 'r-weekly' } });
104
+ /** PbG10: three products, one not read. */
105
+ const multi = (id = 'project-ascent') => ({
106
+ ...program(id), sub: 'Program · 3 products · 8 initiatives', needs: null, done: null,
107
+ handled: { lead: '2 of 3 products read fine. eShop\'s checkout numbers can\'t be read yet.', rest: 'I asked eShop\'s PM for Amplitude on 27 Oct; reports say so in What we don\'t know yet.', tone: 'calm' },
108
+ goals: [
109
+ { id: 'a', title: 'Half of all logins run on Descope', owner: OWN('Dewi'), dot: 'ahead', sub: '41% of 50% · ahead', product: { tag: 'PI', name: 'pmos-idpf', ws: 'idpf' } },
110
+ { id: 'b', title: 'More shoppers finish signing in at checkout', owner: OWN('Raka'), dot: 'none', sub: 'Can\'t read yet · Amplitude not connected for eShop', product: { tag: 'ES', name: 'eShop', ws: 'microsites' } },
111
+ ],
112
+ stage: { kind: 'milestones', items: [
113
+ { id: 'm1', name: 'Staff sign in with Descope', product: { tag: 'PI', name: 'pmos-idpf' }, when: 'done 12 Oct' },
114
+ { id: 'm2', name: 'Inline login at checkout', product: { tag: 'ES', name: 'eShop' }, when: '28 Nov–5 Dec' },
115
+ ], note: 'Each product read from its own board and Jira · 07:02' },
116
+ reports: [{ id: 'r-sponsor', kind: 'weekly', name: 'Sponsor update', state: 'drafted', sub: 'Drafted · Thu 10:00 · one update across all 3 products', path: 'reports/one-login-sponsor/2026-10-29.md' }],
117
+ products: [{ ws: 'idpf', name: 'pmos-idpf', read: true }, { ws: 'microsites', name: 'eShop', read: false, why: 'Amplitude not connected', asked: '27 Oct' }],
118
+ });
119
+ /** An empty scope: nothing on record. Zero is silence. */
120
+ const empty = (scope = 'initiative:x') => ({ ok: true, scope, level: 'initiative', name: 'x', opens: 'work', handled: null, goals: [], drafts: null, stage: null, guardrails: [], needs: null, reports: [], heldBy: null, trust: null, done: null });
121
+ /** PbA5: thin data, a drafted goal and promise date. */
122
+ const thin = (id = 'passkey') => ({ ...empty('initiative:' + id), name: 'Passkey sign-in', handled: { lead: 'This one is new, so there is little to read yet. I drafted what it needs to start.', rest: 'Keep both and its weekly update starts by itself once something moves.', tone: 'calm' },
123
+ drafts: { goal: { title: 'Half of returning shoppers sign in with a passkey by 31 Mar', sub: 'Read from Amplitude, like checkout sign-in. Anchors to KR-A1.' }, promise: { date: '15 Jan', sub: 'Your Spec to Deliver usually takes 11 weeks. No Jira tickets yet, so this is a guess, and I say so in reports' } },
124
+ note: 'Reports start when there is something to say: the weekly update after the first change, the stage review when Spec ends.' });
125
+ /** PbA6: the library. */
126
+ const library = () => ({
127
+ ok: true,
128
+ lead: { text: 'Your program, product and 5 initiatives each have a dashboard and 3 ready reports.', rest: 'That is 21 reports. To keep your week light I\'d schedule only 3; the rest draft when their moment comes, never on a timer.' },
129
+ groups: [
130
+ { scope: 'program:project-ascent', level: 'program', name: 'One login', rows: [
131
+ { kind: 'weekly', name: 'Sponsor update', sub: 'Thursdays · Lee and 3 sponsors · you sent this by hand 4 times', pick: true, on: true },
132
+ { kind: 'checkpoint', name: 'Milestone review', sub: 'Drafts at each milestone', on: true }, { kind: 'did-it-work', name: 'Did it work?', sub: 'Drafts when the program closes', on: true }] },
133
+ { scope: 'product', level: 'product', name: 'pmos-idpf', rows: [
134
+ { kind: 'weekly', name: 'Weekly update', sub: 'Mondays · 9 people', pick: true, on: true }, { kind: 'checkpoint', name: 'Quarter review', sub: 'Drafts 17 Dec from the Q4 score', on: true },
135
+ { kind: 'did-it-work', name: 'Did it work?', sub: 'Drafts after each launch', on: true }] },
136
+ { scope: 'initiatives', level: 'initiative', name: '5 initiatives', rows: [
137
+ { kind: 'weekly', name: 'Weekly update', sub: 'Only Inline login: it has a decision and a slip', pick: true, on: true },
138
+ { kind: 'checkpoint', name: 'Stage review', sub: 'Drafts when a stage\'s checklist is done', on: true }, { kind: 'did-it-work', name: 'Did it work?', sub: 'Drafts 4 weeks after each launch', on: true }],
139
+ more: { count: 4, text: '4 more weekly updates', sub: 'Off · they draft only in a week with news', rows: [{ kind: 'weekly:passkey', name: 'Passkey sign-in · weekly update', on: false }] } },
140
+ ],
141
+ yours: [{ id: 'mon', name: 'Monday metrics for Lee', sub: 'Made from Intelligence · Mondays' }],
142
+ overlap: null,
143
+ });
144
+
145
+ module.exports = { program, initiative, held, discover, monitor, product, trusted, multi, empty, thin, library };
@@ -68,7 +68,9 @@ On a desktop the workspace is one frame. [Layout](layout.md) explains each part.
68
68
  - [The Initiative Driver: drafts the agent files for you](initiative-driver.md): when the driver runs, the unblock sweep, the limits, Keep, Send back and Drop, the board modes, and `pmos driver`.
69
69
  - [Claude proposes: the one ✦ on each initiative](claude-proposes.md): what Claude finds when you add an initiative, new dates, done and tidy names for late tasks, ✓, ✕, Undo, and `pmos propose`.
70
70
  - [Claude drafts metrics without being asked](metric-drafts.md): when Claude drafts the metrics of a product, a program or an initiative, keep, drop, Undo, and `pmos metrics draft`.
71
+ - [Your impact](your-impact.md): what counts as your impact, the weekly check in Home's chat, the switch, and `pmos impact`. Private to you.
71
72
  - [Adler, Claude's face](adler.md): who Adler is, where he shows, what his six moods mean, and Settings › Adler.
73
+ - [Ready-made dashboards and reports](ready-made-dashboards.md): the dashboard and reports every program, product and initiative has, the Work | Dashboard icon, the Sponsors and Team cuts, late and held reports.
72
74
  - [Core documents: what each level keeps](core-documents.md): the core documents of the portfolio, a board and an initiative, their states, how PMOS drafts them, Issue it, and `pmos coredoc write`.
73
75
  - [The Horizon scan: the agent looks outside your initiatives](horizon-scan.md): how often it runs, the watch list you keep, what a scan does, where findings land, what it cannot do, and `pmos scan`.
74
76
  - [PM-only acts: what you and your agents can do](pm-only-acts.md): the acts that were yours alone, how the workspace checks that a press comes from your page, your terminal or an agent session, how an agent's act is logged under its name (D98), and what to do when a press is refused.
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Claude drafts metrics without being asked"
4
4
  description: "When Claude drafts the metrics of a product, a program or an initiative, what each draft says, how you keep, edit or drop it, Undo, how to turn it off, and the pmos metrics draft commands."
5
- timestamp: 2026-10-27
5
+ timestamp: 2026-10-28
6
6
  ---
7
7
 
8
8
  # Claude drafts metrics without being asked
@@ -45,5 +45,25 @@ Claude's background run files its drafts with these commands. The server pins th
45
45
  - `pmos metrics draft row --json <file|->`: one drafted row, or a list of rows.
46
46
  - `pmos metrics draft end --head "<line>" --sub "<line>" --src "<sources>"`: the run is done, with what the page says on top.
47
47
  - `pmos metrics draft status`: what is open, kept and dropped.
48
+ - `pmos metrics draft fix --json <file|->`: one fix for a goal, or a list of fixes (see "Claude runs the OKRs" below).
48
49
 
49
50
  The run writes no record and sends nothing.
51
+
52
+ ## Claude runs the OKRs
53
+
54
+ Claude also reads your goals and repairs them. You see the result on Intelligence and on the product page. You do not fill in a form.
55
+
56
+ - **Each goal has a recipe:** a connector, a query and a cadence (daily, weekly or monthly). When the cadence comes round, Claude reads the goal and files the value with where it read it and when.
57
+ - **A goal Claude cannot read** says so plainly, and comes with a drafted fix: connect the source, or read it another way. If no connector reads it, upload a CSV or sheet export with a date and a number on each line.
58
+ - **The dot of a goal comes from its latest reading only:** on its line, behind it, close to a limit, or a broken limit. A goal with no reading has a hollow dot. A late initiative never sets a goal's dot.
59
+ - **Fixes sit under the goal they repair:** an outcome for a goal that names a project, a recipe, connect a source, a thankful note to the owner, a rollback ticket, next quarter's goal, carry on, and an owner. Press ✓ to keep one, or ✓✓ to keep them all. A note or a ticket goes to the outbox. Nothing is sent until you send it. Undo puts it back.
60
+ - **An owner** is proposed from the Jira assignees of the work that moves the goal. If two people hold as much, Claude proposes nobody.
61
+ - **A broken limit** is the only red line on Intelligence. It tells you once, in the bell, when the goal is set to Notify me. It says one more line when the goal is back within its limit. Set this per goal: Notify me, Only in Intelligence (the default) or Quiet.
62
+
63
+ The reading run files with these commands, pinned by the server to the run and its goals:
64
+
65
+ - `pmos metrics reading list`: the goals of this run, with their recipes.
66
+ - `pmos metrics reading <rid> <value> --source "<connector · what>" [--day YYYY-MM-DD]`: one value read.
67
+ - `pmos metrics reading <rid> --cant "<why>" [--fix connect|recipe --connector <name>]`: Claude could not read it, and the fix it drafted.
68
+
69
+ To turn the reading runs off, set `PMOS_METRIC_READ=off`.
@@ -0,0 +1,62 @@
1
+ ---
2
+ type: Guide
3
+ title: "Ready-made dashboards and reports"
4
+ description: "The dashboard and the reports that every program, product and initiative has without a set-up: where they show, what each one reads, the Sponsors and Team cuts, late and held reports, and what Claude never does by itself."
5
+ timestamp: 2026-10-28
6
+ ---
7
+
8
+ # Ready-made dashboards and reports
9
+
10
+ You do not build a dashboard or a report from blank. Every program, product and initiative has the same small set, ready when you open it. The set reads only what all of them have: goals and health budgets with their readings, stage and milestone dates, tasks, Jira tickets, decisions and outcomes.
11
+
12
+ ## The set
13
+
14
+ Each level has the same four things:
15
+
16
+ - **Dashboard.** The live view of the program, product or initiative.
17
+ - **Weekly update.** A short written update, drafted each week.
18
+ - **Checkpoint review.** Drafted at a program milestone, at a product quarter end, or when an initiative finishes a stage.
19
+ - **Did it work?** Drafted when shipped work reaches the end of its outcome window.
20
+
21
+ Claude puts only a few of these on a schedule by itself. The others draft when their moment comes.
22
+
23
+ ## Where the dashboard shows
24
+
25
+ - **Program and initiative.** One icon in the header switches between **Work** and **Dashboard**. The page remembers your last choice for each program and initiative. Until you choose, a Board row opens on Work. The charter is still under the **Milestones** pencil and in **Documents**.
26
+ - **Product.** The product page is the dashboard. Its reports are in **This week**.
27
+
28
+ The dashboard shows these blocks, in this order:
29
+
30
+ 1. The **✦** line: what Claude already did.
31
+ 2. **Goals**: the goal rows. Press a row to open the goal in Intelligence.
32
+ 3. **Ships** (initiative and product) or **Milestones** (program): the promised date against the forecast range.
33
+ 4. **Needs you**: one decision, with Claude's pick.
34
+ 5. **Reports**: the drafts of the set.
35
+
36
+ The blocks follow the lifecycle. An initiative in Discover shows what it must learn. An initiative in Monitor shows its outcome window.
37
+
38
+ A goal with no readings yet shows a hollow dot and the date of its first reading. An initiative with no goal shows a drafted goal and a promise date for you to keep or change. A program that spans several products shows which product each row belongs to. A product that is not connected is said so, never guessed.
39
+
40
+ ## Reports
41
+
42
+ A ready report opens in the same report Viewer as a report from Intelligence. One draft gives two cuts over the same numbers: **Sponsors · 1 minute** (the answer first) and **Team · full** (the whole document). You edit the Team cut; the Sponsors cut is read from it.
43
+
44
+ - A bad week is said plainly. The mood of the words is never better than the numbers.
45
+ - When a source is stale, the report is held, and Reports and dashboards says why.
46
+ - One person gets at most one update a week. When two reports would reach the same person, Claude proposes to fold them.
47
+ - A late report shows one quiet line in Reports and dashboards. Claude does not send it late without your ✓.
48
+ - After four sends that changed nothing, Claude offers to get calm weeks ready by itself. You still press **Issue**.
49
+
50
+ On Intelligence, **⋯** › **Reports and dashboards** lists the ready-made reports in a Ready-made group for each program, product and initiative, with their late and held lines.
51
+
52
+ ## What Claude never does by itself
53
+
54
+ - Claude never sends or issues a report. Issuing is your press.
55
+ - Thanks in a report are plain words. A report never reads your private **Your impact** log.
56
+
57
+ ## Known limits
58
+
59
+ - Reports and dashboards can take some time to load on a repository with many initiatives. The page shows the last content until the new one is ready.
60
+ - A late report that is refreshed after 14:00 keeps the numbers of its first draft.
61
+ - The wider report does not yet carry the narrower ones as sections.
62
+ - Test readings are not marked apart from real readings.
@@ -0,0 +1,58 @@
1
+ ---
2
+ type: Guide
3
+ title: "Your impact"
4
+ description: "What Your impact is, what counts and what never counts, the weekly check in Home's chat, the switch in Settings, and the pmos impact commands."
5
+ timestamp: 2026-10-28
6
+ ---
7
+
8
+ # Your impact
9
+
10
+ Your impact shows you what happened because of your work: a thanks, a ticket that moved after your decision, a spec another team used, a key result that moved after your initiative delivered. It is private. Only you see it, and nothing leaves PMOS.
11
+
12
+ ## What counts
13
+
14
+ An item counts only when a person or a system outside you reacted to your work, and Claude can link the source. Claude reads Slack, mail, Jira, your meeting notes, your documents and your key results.
15
+
16
+ These never count: logins, ticks, time spent, messages you sent, documents you wrote, and anything Claude or an agent did on its own.
17
+
18
+ There are no numbers. You see no points, scores, counts, streaks, levels or ranks.
19
+
20
+ ## The weekly check
21
+
22
+ Once a day, Claude reads your sources and files what it found. After the week ends, Claude lists that week's items in Home's chat and asks whether each one is real:
23
+
24
+ - ✓ keeps one item. Only a kept item counts.
25
+ - ✕ drops it. Claude does not file anything like it again.
26
+ - ✓✓ keeps every item that is not checked yet.
27
+
28
+ Each row has its source, so you can open the message or the ticket before you choose.
29
+
30
+ Adler's sprout and your impact log stay hidden until two weekly checks show that at least 9 of 10 items are real. Then Adler's sprout grows a leaf for each week's kept items, and the log in the Viewer shows your weeks, newest first. A quiet week says "A quiet week". Nothing wilts and nothing resets.
31
+
32
+ ## Where you see it
33
+
34
+ When the check has passed, Your impact shows in these places. Each item opens its source.
35
+
36
+ - **Home.** Adler's face next to "Good morning" is a press of its own. His sprout grows with your kept items. Press it to open "Your impact this week" in the Viewer. The list icon in its header opens your impact log.
37
+ - **Your impact log.** This week is open. Past weeks fold. A quiet week says "A quiet week".
38
+ - **Once, on a real event.** Adler's newest leaf grows once. A thanks also shows in a toast, for example "Chen thanked you". Then the item is marked as read. Settings › Adler › Celebrations: Never stops this.
39
+ - **A meeting.** Under the decisions: "Recorded. If it unblocks someone, it goes in your impact log."
40
+ - **Intelligence.** A key result that moved after your work is one more ✦ line, with its source.
41
+ - **The Board.** An initiative with a milestone delivered in the last 30 days names the people on its tickets, by name, each with its ticket. There is no thank-you press, and nothing is sent.
42
+ - **Your day, on a Friday.** When a stage of one of your initiatives closed this week, a card shows where it started and where it is now, with a link to it.
43
+
44
+ ## Turn it off
45
+
46
+ Settings › General › Your impact. Off hides the leaf, the log and the weekly check, and Claude stops reading. `PMOS_IMPACT=off` also stops the daily read.
47
+
48
+ ## Where it is kept
49
+
50
+ In your own runtime folder, `impact/impact.jsonl`, outside every repository. No commit, sync or teammate reads it.
51
+
52
+ ## Commands
53
+
54
+ Only Claude's impact run uses these. The server pins each run to your ledger. Outside such a run, they refuse.
55
+
56
+ - `pmos impact add --json <file|->` files one item or a list: `{ "kind", "text", "who", "at", "source": { "url", "type", "label" } }`. The kind is thanks, unblock, used or kr. An item with no source, or with a count in its text, is refused.
57
+ - `pmos impact end` ends the run. `--error "<why>"` says why it could not finish.
58
+ - `pmos impact status` lists what is filed for this week and the last.
@@ -0,0 +1,149 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ /* impact-screens-test.js — Your impact in the real pages (feedback batch 16 item 7, Phases 2 to 4; canvas GmA1Home, GmA3Garden, GmA2Board).
4
+ * The real Home and Board from the real server; GET /api/impact/week and /weeks are stubbed in the contract's shape (7-impact-api.md), and
5
+ * every POST is recorded so the test can say nothing left for anywhere but /api/impact/seen.
6
+ * H1 Home: the greeting's Adler is its own press, beside "Good morning", which still opens Your day
7
+ * H2 the one celebration: a thanks says itself in the toast once and is marked read
8
+ * H3 a press opens "Your impact this week" in the Viewer: a row per item, each with its source to open, and the lock line; no digit
9
+ * H4 the log icon opens "Your impact": this week open, a quiet week in plain words, past weeks folded
10
+ * H5 off (or gated): no face press; the greeting is as it was
11
+ * B1 Board: an initiative with a milestone delivered this month shows who made it happen, unranked, each with a ticket; no send press
12
+ * N every POST went to /api/impact/seen, and no page error
13
+ * PMOS_SHOTS=<dir> also saves the screenshots. */
14
+ const path = require('path');
15
+ const fs = require('fs');
16
+ const { spawn } = require('child_process');
17
+ const { findBrowser } = require('./lib/find-browser');
18
+ const T = require('./test-run').configure({ name: 'impact-screens' });
19
+ const BP = require('./lib/board-premium.js');
20
+ const BF = require('./fixtures/board-premium-facts.js');
21
+ const BRP = require('./lib/briefing-premium.js');
22
+ const BRF = require('./fixtures/briefing-premium-facts.js');
23
+
24
+ const BASE = T.BASE;
25
+ const SHOTS = process.env.PMOS_SHOTS || '';
26
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
27
+ const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
28
+ const results = [];
29
+ const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
30
+ let srv = null; let browser = null;
31
+ const finish = async (code) => {
32
+ if (browser) await browser.close().catch(() => {});
33
+ if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
34
+ T.killTmux();
35
+ const bad = results.filter((x) => !x.cond).length;
36
+ console.log(`\n${results.length - bad}/${results.length} impact-screens assertions passed`);
37
+ process.exit(code !== undefined ? code : (bad ? 1 : 0));
38
+ };
39
+ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
40
+
41
+ const item = (id, kind, text, who, type, label, url, at) => ({ id, week: '2026-10-26', kind, text, who, source: { type, label, url }, at, real: true, read: false });
42
+ const ITEMS = [
43
+ item('a', 'thanks', 'Chen: “the drop-off spec saved us a day”', 'Chen', 'slack', 'Slack · #idpf-data', 'https://acme.slack.com/archives/C1/p1', '2026-10-27T09:12:00Z'),
44
+ item('b', 'unblock', 'Your scope call unblocked the login team', '', 'jira', 'Jira ticket moved to In progress', 'https://acme.atlassian.net/browse/IDPF-212', '2026-10-28T10:00:00Z'),
45
+ item('c', 'used', 'Descope rollout delivered from your PRD', '', 'initiative', 'Deliver', '/premium.html?ini=descope', '2026-10-29T10:00:00Z'),
46
+ ];
47
+ const WEEK = (o = {}) => ({ ok: true, on: true, live: true, week: '2026-10-26', label: 'This week', grow: 'full', celebrate: 'a', quiet: false, items: ITEMS, ...o });
48
+ const WEEKS = { ok: true, on: true, live: true, weeks: [
49
+ { week: '2026-10-26', label: 'This week', quiet: false, items: ITEMS },
50
+ { week: '2026-10-19', label: 'Last week', quiet: false, items: [item('d', 'used', 'Your Scarlet PRD was signed off', '', 'doc', 'PRD · Scarlet', '/premium.html?ini=scarlet', '2026-10-21T10:00:00Z')] },
51
+ { week: '2026-10-12', label: 'Week of Oct 12', quiet: true, items: [] },
52
+ ] };
53
+
54
+ (async () => {
55
+ const exe = process.env.PMOS_CHROME || findBrowser();
56
+ if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the impact-screens suite cannot run'); return finish(1); }
57
+ let chromium;
58
+ try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
59
+ srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
60
+ await T.waitForServer(BASE);
61
+ browser = await chromium.launch({ executablePath: exe });
62
+ if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
63
+ const shot = async (p, name) => { if (SHOTS) { await sleep(500); await p.screenshot({ path: path.join(SHOTS, name + '.png') }); } };
64
+ const BRIEF = BRP.build(BRF.facts());
65
+ const BOARD = BP.build(BF.facts());
66
+ { // a milestone delivered five days before the board's today, and the people on its tickets
67
+ const r = BOARD.rows.find((x) => x.id === 'self-serve-v2'), t = new Date(BOARD.today + 'T00:00:00'); t.setDate(t.getDate() - 5);
68
+ const d = t.getFullYear() + '-' + String(t.getMonth() + 1).padStart(2, '0') + '-' + String(t.getDate()).padStart(2, '0');
69
+ r.milestones = [{ id: 'm1', name: 'Self-serve launch', date: d, done: true }];
70
+ r.track.tickets = (r.track.tickets || []).concat([
71
+ { key: 'SS-31', title: 'Ran the release on Thursday', status: 'Done', assignee: 'Suhas', url: 'https://acme.atlassian.net/browse/SS-31' },
72
+ { key: 'SS-12', title: 'Wrote the drop-off query', status: 'Done', assignee: 'Chen', url: 'https://acme.atlassian.net/browse/SS-12' },
73
+ { key: 'SS-20', title: 'Fixed the login test', status: 'Done', assignee: 'Lee', url: 'https://acme.atlassian.net/browse/SS-20' },
74
+ ]);
75
+ }
76
+
77
+ const open = async ({ w = 1440, h = 900, week = WEEK(), url = '/premium.html' } = {}) => {
78
+ const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: w < 500 });
79
+ const page = await ctx.newPage();
80
+ const errors = [], posts = [];
81
+ page.on('pageerror', (e) => errors.push(String(e)));
82
+ page.on('request', (rq) => { if (rq.method() === 'POST') posts.push(new URL(rq.url()).pathname); });
83
+ const json = (rq, b) => rq.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify(b) });
84
+ await page.route(/\/api\/board-premium(\?.*)?$/, (rq) => json(rq, { ok: true, state: 'ready', model: BOARD, as_of: Date.now() }));
85
+ await page.route(/\/api\/briefing-premium(\?.*)?$/, (rq) => json(rq, { ok: true, state: 'ready', model: BRIEF, as_of: Date.now() }));
86
+ await page.route('**/api/briefing-premium/**', (rq) => json(rq, { ok: true, turns: [], working: false }));
87
+ await page.route(/\/api\/impact\/week(\?.*)?$/, (rq) => json(rq, week));
88
+ await page.route(/\/api\/impact\/weeks(\?.*)?$/, (rq) => json(rq, WEEKS));
89
+ await page.route(/\/api\/impact\/seen$/, (rq) => json(rq, { ok: true }));
90
+ await page.route(/\/api\/impact-views\/chapter(\?.*)?$/, (rq) => json(rq, { ok: true, week: '2026-10-26', chapters: [] }));
91
+ await page.goto(BASE + url);
92
+ return { ctx, page, errors, posts };
93
+ };
94
+
95
+ /* H1-H4 */
96
+ {
97
+ const { ctx, page, errors, posts } = await open();
98
+ const face = await until(() => page.evaluate(() => { const b = document.querySelector('#hmList [data-hm-impact]'); return b ? { label: b.getAttribute('aria-label'), next: !!(b.nextElementSibling && b.nextElementSibling.matches('[data-hm-day]')), dayFace: !!document.querySelector('#hmList [data-hm-day] .ad-svg') } : null; }), 30000);
99
+ ok('H1 the greeting\'s Adler is its own press, "Your impact this week", right before "Good morning"', face && face.label === 'Your impact this week' && face.next && !face.dayFace, JSON.stringify(face));
100
+ const toastSaid = await until(() => page.evaluate(() => { const t = document.getElementById('toast'); return t && /thanked you/.test(t.textContent) ? t.textContent : null; }));
101
+ ok('H2 the one celebration: Chen\'s thanks says itself in the toast, and it is marked read', /Chen thanked you · Chen: “the drop-off spec saved us a day”/.test(toastSaid || '') && (await until(() => posts.includes('/api/impact/seen'))), toastSaid);
102
+ await shot(page, 'home-face');
103
+ await page.click('#hmList [data-hm-impact]');
104
+ const vw = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); const c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.id !== 'impact-week') return null; const rows = [...v.querySelectorAll('.im-row')]; return rows.length ? { title: c.title, rows: rows.map((r) => ({ t: r.querySelector('.im-t').textContent, href: r.querySelector('a.im-ib') && r.querySelector('a.im-ib').getAttribute('href') })), text: v.querySelector('.cz-vw-body').innerText } : null; }));
105
+ ok('H3 the Viewer "Your impact this week": a row per item, each opening its own source', vw && vw.title === 'Your impact this week' && vw.rows.length === 3 && vw.rows[0].href === 'https://acme.slack.com/archives/C1/p1' && vw.rows[2].href === '/premium.html?ini=descope', JSON.stringify(vw));
106
+ const chrome = vw ? vw.text.replace(/IDPF-\d+/g, '') : '';
107
+ ok('H3 the lock line, and no digit anywhere on the page body (no count, no score)', /Only you see this\. Nothing leaves PMOS\./.test(chrome) && !/\d/.test(chrome), chrome);
108
+ await shot(page, 'impact-week');
109
+ await page.click('#czViewer [data-cz-vw-p="log"]');
110
+ const log = await until(() => page.evaluate(() => { const c = window.czViewer && window.czViewer.current(); const b = document.querySelector('#czViewer .cz-vw-body'); if (!c || c.id !== 'impact-log' || !b || !b.querySelector('.im-wk')) return null; return { sections: b.querySelectorAll('section.im-wk').length, folded: [...b.querySelectorAll('details.im-wk')].map((d) => d.open), quiet: [...b.querySelectorAll('.im-wk.quiet')].map((q) => q.innerText.replace(/\s+/g, ' ').trim()), adler: !!b.querySelector('.im-log .ad-svg') }; }));
111
+ ok('H4 the log: this week open, last week folded, a quiet week in plain words, Adler at the top', log && log.sections === 1 && log.folded.length === 1 && log.folded[0] === false && log.quiet[0] === 'Week of Oct 12 A quiet week' && log.adler, JSON.stringify(log));
112
+ await shot(page, 'impact-log');
113
+ ok('N Home: every POST went to /api/impact/seen or the page\'s own reads, and no page error', !posts.some((p) => /slack|mail|jira|outbox|share|send/i.test(p)) && !errors.length, JSON.stringify({ posts, errors }));
114
+ await ctx.close();
115
+ }
116
+ /* H5 */
117
+ for (const [name, week] of [['off', { ok: true, on: false }], ['gated', WEEK({ live: false, items: [], grow: 'rest', celebrate: null })]]) {
118
+ const { ctx, page } = await open({ week });
119
+ await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-day]')), 30000);
120
+ await sleep(800);
121
+ const st = await page.evaluate(() => ({ face: !!document.querySelector('#hmList [data-hm-impact]'), dayFace: !!document.querySelector('#hmList [data-hm-day] .ad-svg') }));
122
+ ok(`H5 ${name}: no impact press; the greeting keeps its own face`, !st.face && st.dayFace, JSON.stringify(st));
123
+ await ctx.close();
124
+ }
125
+ /* H6 a phone */
126
+ {
127
+ const { ctx, page } = await open({ w: 390, h: 844, week: WEEK({ celebrate: null }) });
128
+ await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hm-impact]')), 30000);
129
+ await shot(page, 'home-face-phone');
130
+ await page.click('#hmList [data-hm-impact]');
131
+ const full = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden && v.querySelectorAll('.im-row').length === 3 ? v.getBoundingClientRect().width : null; }));
132
+ ok('H6 a phone: the press opens the week full screen', full >= 380, String(full));
133
+ await shot(page, 'impact-week-phone');
134
+ await ctx.close();
135
+ }
136
+ /* B1 */
137
+ {
138
+ const { ctx, page, errors, posts } = await open({ url: '/premium-board.html' });
139
+ await until(() => page.evaluate(() => !!document.querySelector('#ibBody .ini2[data-key="board:self-serve-v2"]')), 30000);
140
+ await page.click('#ibBody .ini2[data-key="board:self-serve-v2"]');
141
+ const made = await until(() => page.evaluate(() => { const s = document.querySelector('#czViewer .im-made'); return s ? { head: s.querySelector('.im-mh b').textContent, people: [...s.querySelectorAll('.im-row b')].map((b) => b.textContent), links: [...s.querySelectorAll('a.im-ib')].map((a) => a.getAttribute('href')), buttons: s.querySelectorAll('button').length, text: s.innerText } : null; }), 15000);
142
+ ok('B1 the Board: "Self-serve launch delivered on …", then who made it happen, by name, each with a ticket to open', made && /^Self-serve launch delivered on [A-Z][a-z]{2} \d{1,2}\.$/.test(made.head) && made.people.join(',') === 'Chen,Lee,Suhas' && made.links[0] === 'https://acme.atlassian.net/browse/SS-12', JSON.stringify(made));
143
+ ok('B1 private: no press in the section at all (no thanks, no send), and the lock line', made && made.buttons === 0 && /Only you see this\. Nothing leaves PMOS\./.test(made.text));
144
+ await shot(page, 'board-made');
145
+ ok('N Board: no send, no page error', !posts.some((p) => /slack|mail|outbox|share|send/i.test(p)) && !errors.length, JSON.stringify({ posts, errors }));
146
+ await ctx.close();
147
+ }
148
+ return finish();
149
+ })();
@@ -158,7 +158,7 @@ const FINDING = { id: 'rf-0123456789', name: 'Partner numbers to Lee', why: 'You
158
158
  await vClose(p);
159
159
 
160
160
  /* ── G: a key result's Viewer carries the press ── */
161
- await p.click('#goalTbl .ins-row');
161
+ await p.click('#goalTbl .okr-main');
162
162
  const gp = await until(() => p.evaluate(() => { const b = document.querySelector('#czViewer:not([hidden]) [data-cz-vw-p="report"]'); return b ? { label: b.getAttribute('aria-label'), text: b.textContent.trim() } : null; }), 4000);
163
163
  ok('G a key result\'s Viewer has the report icon', !!gp && gp.label === 'Make a report from this' && !gp.text, JSON.stringify(gp));
164
164
  if (gp) { await p.click('#czViewer [data-cz-vw-p="report"]'); await until(() => A.gets.some((g) => /^goal:/.test(g.scope)), 3000); ok('G it opens the draft for that one goal', A.gets.some((g) => /^goal:/.test(g.scope))); }
@@ -82,13 +82,15 @@ const WEEKLY = { view: 'view', weeks: 3, day: 'Mon', opens: 4 };
82
82
  });
83
83
  await page.route('**/api/report-setups?*', (r) => json(r, { setups: [], findings: [], asks: [], finder: {} }));
84
84
  await page.goto(BASE + '/premium-intelligence.html');
85
- await until(() => page.evaluate(() => document.querySelectorAll('#goalTbl .ins-row').length > 0), 20000);
85
+ await until(() => page.evaluate(() => document.querySelectorAll('#goalTbl .okr-row, #goalTbl .ins-row').length > 0), 20000);
86
86
  return { page, ctx: c, errors, posts, st };
87
87
  };
88
88
 
89
89
  /* ── S: the strip's drafted move ── */
90
90
  const A = await open();
91
91
  const p = A.page;
92
+ // the ✦ line about the goals comes first (batch 16 item 6, GsM1–M5); the finding with its drafted move is the next page
93
+ await until(() => p.evaluate(() => !!document.querySelector('#insPg [data-ins="1"]')), 5000); await p.click('#insPg [data-ins="1"]');
92
94
  const s0 = await until(() => p.evaluate(() => { const m = document.querySelector('#insMv'); const b = document.querySelector('#insAct [data-mv="apply"]'); return m && !m.hidden && b ? { mv: m.textContent, label: b.getAttribute('aria-label'), text: b.textContent.trim(), solid: b.classList.contains('solid'), two: document.querySelector('#insHero').classList.contains('mv') } : null; }), 5000);
93
95
  ok('S the drafted move is said under the finding, with a solid ✓ that is icon-only', !!s0 && s0.mv === MOVE.text && s0.label === MOVE.label && !s0.text && s0.solid && s0.two, JSON.stringify(s0));
94
96
  await shot(p, 'gap1-strip-move', '#insHero');
@@ -113,18 +115,19 @@ const WEEKLY = { view: 'view', weeks: 3, day: 'Mon', opens: 4 };
113
115
  await shot(p, 'gap3-strip-weekly', '#insHero');
114
116
 
115
117
  /* ── E: a drafted metric edited in place ── */
116
- await until(() => p.evaluate(() => !!document.querySelector('#draftBox [data-dr="edit"]')), 4000);
117
- await p.click('#draftBox [data-dr="edit"][data-row="md-ns"]');
118
- const e0 = await p.evaluate(() => { const r = document.querySelector('[data-dred="md-ns"]'); return r ? { f: [...r.querySelectorAll('[data-drf]')].map((x) => x.dataset.drf + '=' + x.value), acts: [...r.querySelectorAll('.ins-act a, .ins-act button')].map((b) => b.getAttribute('aria-label') + (b.textContent.trim() ? '!' : '')), focus: document.activeElement && document.activeElement.dataset.drf } : null; });
118
+ // a drafted North Star is the North Star card's hollow row now (batch 16 item 6), its ✎ beside its ✓
119
+ await until(() => p.evaluate(() => !!document.querySelector('#nsRow [data-okd="edit"][data-row="md-ns"]')), 4000);
120
+ await p.click('#nsRow [data-okd="edit"][data-row="md-ns"]');
121
+ const e0 = await p.evaluate(() => { const r = document.querySelector('[data-dred="md-ns"]'); return r ? { f: [...r.querySelectorAll('[data-drf]')].map((x) => x.dataset.drf + '=' + x.value), acts: [...r.querySelectorAll('.acts a, .acts button')].map((b) => b.getAttribute('aria-label') + (b.textContent.trim() ? '!' : '')), focus: document.activeElement && document.activeElement.dataset.drf } : null; });
119
122
  ok('E ✎ turns the row into fields: name, target, source; ask in Home, ×, ✓, all icon-only; the name has the focus', !!e0 && e0.f.join('|') === 'name=Weekly signed-in shoppers|target=45000|source=Amplitude'
120
123
  && e0.acts.join() === 'Ask Claude in Home to change something else,Cancel the edit,Save Weekly signed-in shoppers' && e0.focus === 'name', JSON.stringify(e0));
121
- await shot(p, 'gap2-draft-edit', '#draftBox');
124
+ await shot(p, 'gap2-draft-edit', '#nsRow');
122
125
  await p.keyboard.press('Escape');
123
- ok('E Escape puts the row back', await until(() => p.evaluate(() => !document.querySelector('[data-dred]') && !!document.querySelector('#draftBox [data-dr="edit"][data-row="md-ns"]')), 2000));
124
- await p.click('#draftBox [data-dr="edit"][data-row="md-ns"]');
126
+ ok('E Escape puts the row back', await until(() => p.evaluate(() => !document.querySelector('[data-dred]') && !!document.querySelector('#nsRow [data-okd="edit"][data-row="md-ns"]')), 2000));
127
+ await p.click('#nsRow [data-okd="edit"][data-row="md-ns"]');
125
128
  await p.fill('[data-dred="md-ns"] [data-drf="name"]', 'Weekly shoppers');
126
129
  await p.fill('[data-dred="md-ns"] [data-drf="target"]', '48000');
127
- await p.click('[data-dred="md-ns"] [data-dr="save"]');
130
+ await p.click('[data-dred="md-ns"] [data-okd="save"]');
128
131
  const ed = await until(() => A.posts.find((x) => x.path === '/api/metric-drafts/edit'), 3000);
129
132
  ok('E ✓ posts the edit with what was typed', !!ed && ed.body.row === 'md-ns' && ed.body.name === 'Weekly shoppers' && ed.body.target === '48000' && ed.body.source === 'Amplitude' && ed.body.scope === 'product', JSON.stringify(ed));
130
133
 
@@ -153,12 +156,13 @@ const WEEKLY = { view: 'view', weeks: 3, day: 'Mon', opens: 4 };
153
156
 
154
157
  /* ── T: the type scale ── */
155
158
  const SCALE = new Set(['11px', '12px', '14px', '16px', '20px', '28px']);
156
- const sizes = await p.evaluate(() => [...new Set([...document.querySelectorAll('#insHero, #insHero *, #draftBox, #draftBox *')].filter((e) => e.childNodes.length && [...e.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim())).map((e) => getComputedStyle(e).fontSize))]);
159
+ const sizes = await p.evaluate(() => [...new Set([...document.querySelectorAll('#insHero, #insHero *, #nsRow, #nsRow *')].filter((e) => e.childNodes.length && [...e.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim())).map((e) => getComputedStyle(e).fontSize))]);
157
160
  ok('T the strip and the drafts use the type scale only', sizes.every((s) => SCALE.has(s)), sizes.join());
158
161
  ok('no page errors', !A.errors.length, A.errors.join(' | '));
159
162
 
160
163
  /* ── M: on a phone ── */
161
164
  const B = await open({ w: 390, h: 844 });
165
+ await until(() => B.page.evaluate(() => !!document.querySelector('#insPg [data-ins="1"]')), 5000); await B.page.click('#insPg [data-ins="1"]');
162
166
  const m = await until(() => B.page.evaluate(() => { const m0 = document.querySelector('#insMv'); return m0 && !m0.hidden && !!document.querySelector('#insAct [data-mv="apply"]'); }), 5000);
163
167
  ok("M on a phone the move and its ✓ show, the move in full", !!m && await B.page.evaluate(() => { const r = document.querySelector("#insMv").getBoundingClientRect(), t = document.querySelector("#insText").getBoundingClientRect(); return r.height > 0 && r.bottom <= t.bottom + 1; }));
164
168
  ok('M no sideways scroll', await B.page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 1));
@@ -453,4 +453,4 @@ function build(f) {
453
453
  return model;
454
454
  }
455
455
 
456
- module.exports = { build, peekModel, STEPS, stepIndex, themeOf };
456
+ module.exports = { build, peekModel, STEPS, stepIndex, themeOf, krShort };
@@ -9,7 +9,7 @@ const T = require('./trust/outbox.js');
9
9
  const { checkReport } = require('./trust/trust.js');
10
10
  const RULES = require('./trust/claim-rules.json');
11
11
 
12
- const CHANNELS = ['jira-write', 'calendar-hold', 'customer-note'];
12
+ const CHANNELS = ['jira-write', 'calendar-hold', 'customer-note', 'team-note']; // team-note: a note to a teammate (batch 16 item 6: the thankful chase to a goal's owner)
13
13
  const ORIGINS = ['agent', 'pm'];
14
14
  const SENDERS = {}; // channel -> function. Empty on purpose.
15
15
  const BASES = Object.keys(RULES.basis);
@@ -10,7 +10,8 @@
10
10
  * EVENTS. Every line is written by scripts/trust/ledger.js append (the PM's validated writer; this file has no appender of
11
11
  * its own). A line is { id (ULID), kind: 'add'|'edit'|'reading', rid, fields, why, by, via }.
12
12
  * add creates record `rid` with `fields` edit merges `fields` into it (latest edit wins per field)
13
- * reading (kr-metrics only) one actual reading { at, value } of the KR metric `rid`
13
+ * reading (kr-metrics only) one actual reading { at, value } of the KR metric `rid`, with where it was read when the caller knows it:
14
+ * source (one line: "Amplitude · checkout_login_success / checkout_view"), via (run | csv | pm), read_at (ISO time of the read)
14
15
  * The actor comes from the call path (ledger.actorFrom), never from a field.
15
16
  *
16
17
  * LINKS. ideas, hypotheses, decisions and bets carry `initiative` (initiative id) and `parent_kr`; signals link by those.
@@ -66,7 +67,11 @@ function fold(kind, lines) {
66
67
  if (!e || !e.rid) continue;
67
68
  if (e.kind === 'add') by.set(e.rid, { rid: e.rid, ...e.fields, created: e.id, updated: e.id, readings: [] });
68
69
  else if (e.kind === 'edit' && by.has(e.rid)) Object.assign(by.get(e.rid), e.fields, { updated: e.id });
69
- else if (e.kind === 'reading' && by.has(e.rid) && e.fields) by.get(e.rid).readings.push({ at: e.fields.at, value: e.fields.value });
70
+ else if (e.kind === 'reading' && by.has(e.rid) && e.fields) {
71
+ const x = { at: e.fields.at, value: e.fields.value };
72
+ for (const k of PROVENANCE) if (typeof e.fields[k] === 'string' && e.fields[k]) x[k] = e.fields[k];
73
+ by.get(e.rid).readings.push(x);
74
+ }
70
75
  }
71
76
  const out = [...by.values()];
72
77
  if (kind !== 'kr-metrics') out.forEach((r) => delete r.readings);
@@ -98,10 +103,13 @@ function edit(root, kind, rid, fields, actor, why) {
98
103
  if (!v.ok) return { ok: false, reasons: v.reasons };
99
104
  return write(root, kind, { kind: 'edit', rid, fields, why: why || 'edited' }, actor);
100
105
  }
106
+ const PROVENANCE = ['source', 'via', 'read_at'];
101
107
  function addReading(root, rid, reading, actor, why) {
102
108
  if (!reading || !DATE.test(String(reading.at)) || !num(reading.value)) return { ok: false, reasons: ['a reading needs at (YYYY-MM-DD) and value (number)'] };
103
109
  if (!list(root, 'kr-metrics').some((r) => r.rid === rid)) return { ok: false, reasons: ['no such KR metric: ' + rid] };
104
- return write(root, 'kr-metrics', { kind: 'reading', rid, fields: { at: reading.at, value: reading.value }, why: why || 'reading' }, actor);
110
+ const fields = { at: reading.at, value: reading.value };
111
+ for (const k of PROVENANCE) if (typeof reading[k] === 'string' && reading[k].trim()) fields[k] = reading[k].replace(/\s+/g, ' ').trim().slice(0, 200);
112
+ return write(root, 'kr-metrics', { kind: 'reading', rid, fields, why: why || 'reading' }, actor);
105
113
  }
106
114
 
107
115
  /** All five folds for nineStages and readRepoFacts. Missing files give empty lists. */