create-pmos 0.827.0 → 0.828.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 (43) hide show
  1. package/package.json +86 -32
  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/bin/pmos.js +19 -9
  7. package/workspace/changelog.json +85 -12
  8. package/workspace/guide/cli.md +29 -0
  9. package/workspace/lib/board-cli.js +5 -1
  10. package/workspace/lib/features.json +2 -0
  11. package/workspace/lib/five-action-cap.js +84 -0
  12. package/workspace/lib/people-cli.js +43 -2
  13. package/workspace/lib/pmos-verbs.js +7 -1
  14. package/workspace/lib/portfolio-cli.js +64 -0
  15. package/workspace/lib/portfolio.js +168 -0
  16. package/workspace/lib/review-reasons.js +357 -0
  17. package/workspace/lib/route-modules.js +2 -0
  18. package/workspace/lib/routes-portfolio.js +50 -0
  19. package/workspace/lib/routes-stakeholders.js +42 -0
  20. package/workspace/lib/routes-strategy-card.js +29 -1
  21. package/workspace/lib/routes-use-log.js +6 -1
  22. package/workspace/lib/stakeholder-map.js +232 -0
  23. package/workspace/lib/voice-cli.js +7 -0
  24. package/workspace/package-lock.json +2 -2
  25. package/workspace/package.json +1 -1
  26. package/workspace/premium-vw-jira-test.js +6 -2
  27. package/workspace/public/pm/bd-principles.js +12 -1
  28. package/workspace/public/pm/cozy-pick.css +1 -0
  29. package/workspace/public/pm/cozy-pop-work.js +6 -1
  30. package/workspace/public/pm/cozy-today-app.js +48 -1
  31. package/workspace/public/pm/cozy-today-view.js +12 -4
  32. package/workspace/public/pm/five-action-cap.js +104 -0
  33. package/workspace/public/pm/portfolio.js +67 -0
  34. package/workspace/public/pm/product-switcher.js +7 -1
  35. package/workspace/public/pm/review-reasons.js +75 -0
  36. package/workspace/public/pm/stakeholder-map.js +125 -0
  37. package/workspace/public/premium-portfolio.html +48 -0
  38. package/workspace/server.js +1 -1
  39. package/workspace/stage-card-tasks-test.js +11 -5
  40. package/workspace/test-lists/five-action-cap.json +9 -0
  41. package/workspace/test-lists/portfolio.json +9 -0
  42. package/workspace/test-lists/review-reasons.json +9 -0
  43. package/workspace/test-lists/stakeholder-map.json +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.827.0",
3
+ "version": "0.828.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -33,6 +33,88 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.828.0",
38
+ "at": "2026-11-25T12:42:22.052Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1951,
43
+ "t": "Reviews grouped by reason — Customer voice on Work and pmos voice (job #1913, A427)",
44
+ "s": "Reviews grouped by reason — Customer voice on Work and pmos voice (job #1913, A427)",
45
+ "k": "new",
46
+ "h": "Reviews grouped by reason — Customer voice on Work and pmos voice (job #1913, A427)",
47
+ "try": {
48
+ "steps": [
49
+ "Ask PMOS in the chat: add three reviews about checkout failing on old Android, score 1 of 5, reason Checkout fails on old Android",
50
+ "Open Work for that product and find Customer voice under the strategy",
51
+ "Press ✦ on the fastest-growing complaint, then Undo in the toast"
52
+ ],
53
+ "see": "Customer voice lists each reason with its comments, how it moved in 30 days and the score in one line under the reasons. ✦ files the complaint as a triage item and the toast offers Undo, which takes…",
54
+ "open": "/premium-board.html"
55
+ },
56
+ "i": "review-reasons"
57
+ },
58
+ {
59
+ "n": 1977,
60
+ "t": "Work and Today get the popup's five-action limit (job #1917, A529)",
61
+ "s": "Work and Today get the popup's five-action limit (job #1917, A529)",
62
+ "k": "new",
63
+ "h": "Work and Today get the popup's five-action limit (job #1917, A529)",
64
+ "try": {
65
+ "steps": [
66
+ "Open Today and point at a row in Today's log",
67
+ "See at most three buttons: Done, Put off a day and ⋯",
68
+ "Press ⋯ and find Set a date in the Change group"
69
+ ],
70
+ "see": "Each Today row shows three buttons at most. ⋯ opens a short menu that starts with Change and holds every action the row does not show, so nothing is lost. Work's header keeps five actions and its ⋯.",
71
+ "open": "/today.html"
72
+ },
73
+ "i": "five-action-cap"
74
+ },
75
+ {
76
+ "n": 1959,
77
+ "t": "The Portfolio puts every product side by side (job #1894, A56)",
78
+ "s": "The Portfolio puts every product side by side (job #1894, A56)",
79
+ "k": "new",
80
+ "h": "The Portfolio puts every product side by side (job #1894, A56)",
81
+ "try": {
82
+ "steps": [
83
+ "With two or more products, open Today or Work and press the Portfolio button at the end of the product tiles",
84
+ "Read one row per product: bets, odds, spend and outcome so far",
85
+ "Press a product's row to open it in Work"
86
+ ],
87
+ "see": "One row per product with its open bets, the share of its checked outcomes that held, what its agent runs cost in 30 days and its latest outcome that held. At most one ✦ recommendation with its…",
88
+ "open": "/premium-portfolio.html"
89
+ },
90
+ "i": "portfolio"
91
+ },
92
+ {
93
+ "n": 1967,
94
+ "t": "Who decides, who must agree, who needs to know on each initiative (job #1896)",
95
+ "s": "Who decides, who must agree, who needs to know on each initiative (job #1896)",
96
+ "k": "new",
97
+ "h": "Who decides, who must agree, who needs to know on each initiative (job #1896)",
98
+ "try": {
99
+ "steps": [
100
+ "Open Work and open an initiative that has people on it",
101
+ "Find the People block under the Overview: each name says decides, must agree or needs to know, and when they last heard from you",
102
+ "On a name over 3 weeks, press ✦ to read the draft update, copy it and send it yourself, then press I sent it"
103
+ ],
104
+ "see": "One People block with the names PMOS found in Jira, meeting notes, mail and sign-offs, each a draft until you keep it. A name not updated in 3 weeks shows a warning and a ✦ draft update. PMOS sends…",
105
+ "open": "/premium-board.html"
106
+ },
107
+ "i": "stakeholder-map"
108
+ },
109
+ {
110
+ "n": 1887,
111
+ "t": "Day-run and stage-card-tasks hold under load, pmos uses the pinned port, Viewer phone floors wait for the pane",
112
+ "s": "Day-run and stage-card-tasks hold under load, pmos uses the pinned port, Viewer phone floors wait for the pane",
113
+ "k": "fix",
114
+ "i": "ci-main-unblock"
115
+ }
116
+ ]
117
+ },
36
118
  {
37
119
  "v": "0.827.0",
38
120
  "at": "2026-11-25T12:10:57.880Z",
@@ -43,6 +125,7 @@
43
125
  "t": "Starter goals from your own product, under the fundamentals card (job #1916, A84)",
44
126
  "s": "Starter goals from your own product, under the fundamentals card (job #1916, A84)",
45
127
  "k": "new",
128
+ "i": "starter-goals",
46
129
  "h": "Starter goals from your own product, under the fundamentals card (job #1916, A84)",
47
130
  "try": {
48
131
  "steps": [
@@ -52,24 +135,14 @@
52
135
  ],
53
136
  "see": "Up to 3 drafts appear, each with 'from: <source>'. ✓ writes the goal to planning/okrs/okrs-starter.md and the row leaves the block; Undo puts the row back and takes the line out again. A product…",
54
137
  "open": "/today.html"
55
- },
56
- "i": "starter-goals"
138
+ }
57
139
  },
58
140
  {
59
141
  "n": 1984,
60
142
  "t": "One warning when an initiative names risky code (A54)",
61
143
  "s": "One warning when an initiative names risky code (A54)",
62
144
  "k": "new",
63
- "i": "arch-warns",
64
- "try": {
65
- "steps": [
66
- "On Work, open an initiative of a product whose repository PMOS has read, whose record names a part the Code panel tints as risky",
67
- "Read the ✦ line above the plan: it names the part and why it is risky",
68
- "Press ✓ to add the test task, then Undo in the toast; press ✕ for Not now"
69
- ],
70
- "see": "One ✦ line at most, naming the risky part and its reason in the code map's own words. ✓ adds the task 'Add tests for <part>' to the initiative and the toast's Undo removes it. ✕ hides the line for…",
71
- "open": "/work.html"
72
- }
145
+ "i": "arch-warns"
73
146
  }
74
147
  ]
75
148
  },
@@ -600,25 +673,6 @@
600
673
  "k": "fix"
601
674
  }
602
675
  ]
603
- },
604
- {
605
- "v": "0.798.0",
606
- "at": "2026-11-24T23:17:36.353Z",
607
- "f": 4,
608
- "prs": [
609
- {
610
- "n": 1822,
611
- "t": "The merge station runs the strict guardrail on every merge (A508)",
612
- "s": "The merge station runs the strict guardrail on every merge (A508)",
613
- "k": "new"
614
- },
615
- {
616
- "n": 1823,
617
- "t": "Use it in the status editor keeps the whole text in the log (job #1817, A505)",
618
- "s": "Use it in the status editor keeps the whole text in the log (job #1817, A505)",
619
- "k": "fix"
620
- }
621
- ]
622
676
  }
623
677
  ]
624
678
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@8e47b1e6a
1
+ kernel-source: pmos@30b42f4c0
2
2
  assembled: 2026-11-25
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-25T12:10:54Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T12:42:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-11-25T12:10:54Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T12:42:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-11-25T12:10:54Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-25T12:42:18Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -84,7 +84,8 @@ function probe(port, ms = PROBE_MS) {
84
84
  }
85
85
  // How long a `pmos` command waits for the workspace server to answer. A server that is not running refuses at once, so this only
86
86
  // matters when it is busy: while several agent sessions start in tmux at once, a request on a 2-CPU machine took over 5 s, and the
87
- // old 5 s limit made `pmos proactive day show` say the server was not running (day-run D8b, 2026-11-25).
87
+ // old 5 s limit made `pmos proactive day show` say the server was not running (day-run D8b, 2026-11-25). The same commands find the
88
+ // server with discover(API_TIMEOUT_MS): the 2.5 s launcher probe alone still read a busy server as not running (Checker, 2026-11-25).
88
89
  const API_TIMEOUT_MS = 30000;
89
90
  function api(port, method, pathname, body, extraHeaders) {
90
91
  return new Promise((res) => {
@@ -119,11 +120,22 @@ function pressApi(port, method, pathname, body) {
119
120
  });
120
121
  }
121
122
 
122
- /** Every workspace server that answers, in candidate order (the default port first). */
123
- async function discover() {
123
+ /** The server a command that only asks a running server talks to (schedule, proactive, the verbs). Inside a workspace session
124
+ * PMOS_WS_PORT names it, so it is used as it is: the request itself shows whether the server is there, and a probe first only adds
125
+ * a second wait. /api/sessions, which the probe reads, took over 30 s on a busy runner while five job sessions started (day-run D8b,
126
+ * 2026-11-25). Without a pin, the first server that answers, probed as long as the request would wait. */
127
+ async function serverPort() {
128
+ if (PINNED) return PINNED;
129
+ const live = await discover(API_TIMEOUT_MS);
130
+ return live.length ? live[0].port : null;
131
+ }
132
+ /** Every workspace server that answers, in candidate order (the default port first). `ms` is how long each probe waits: the
133
+ * launcher keeps the short probe, and a command that only asks a running server (schedule, proactive, the verbs) waits as long
134
+ * as its request would (API_TIMEOUT_MS). A port with no server refuses at once, so the longer wait only costs time on a busy one. */
135
+ async function discover(ms = PROBE_MS) {
124
136
  const ports = D.candidatePorts({ stateDir: STATE, pinned: PINNED });
125
137
  const hits = await Promise.all(ports.map(async (port) => {
126
- const s = await probe(port);
138
+ const s = await probe(port, ms);
127
139
  return s ? { port, sessions: s.sessions, version: s.version || null } : null;
128
140
  }));
129
141
  return hits.filter(Boolean);
@@ -589,14 +601,12 @@ function doctor() {
589
601
  else if (cmd === 'phone') code = await phone(process.argv[3] && !process.argv[3].startsWith('-') ? path.resolve(process.argv[3]) : process.cwd());
590
602
  else if (cmd === 'schedule' || cmd === 'skill') {
591
603
  // Thin client of the running server's own routes (lib/schedule-cli.js): one store, one validator.
592
- const live = await discover();
593
- const port = live.length ? live[0].port : null;
604
+ const port = await serverPort();
594
605
  code = await require('../lib/schedule-cli').run(process.argv.slice(2), {
595
606
  say, call: async (m, p, b) => (port ? api(port, m, p, b) : null) });
596
607
  }
597
608
  else if (cmd === 'proactive') {
598
- const live = await discover();
599
- const port = live.length ? live[0].port : null;
609
+ const port = await serverPort();
600
610
  code = await require('../lib/proactive-cli').run(process.argv.slice(2), {
601
611
  say, call: async (m, p, b) => (port ? pressApi(port, m, p, b) : null) });
602
612
  }
@@ -613,7 +623,7 @@ function doctor() {
613
623
  else if (require('../lib/pmos-verbs.js').has(cmd)) {
614
624
  // pm-os-absorb Runs 2–5: one module per verb (lib/pmos-verbs.js). A verb whose run has not built it says so.
615
625
  code = await require('../lib/pmos-verbs.js').run(cmd, process.argv.slice(2), {
616
- say, call: async (m, p, b) => { const live = await discover(); return live.length ? api(live[0].port, m, p, b) : null; } });
626
+ say, call: async (m, p, b) => { const port = await serverPort(); return port ? api(port, m, p, b) : null; } });
617
627
  await new Promise((r) => process.stdout.write('', r));
618
628
  }
619
629
  else if (cmd === 'upgrade') {
@@ -1,4 +1,86 @@
1
1
  [
2
+ {
3
+ "v": "0.828.0",
4
+ "at": "2026-11-25T12:42:22.052Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1951,
9
+ "t": "Reviews grouped by reason — Customer voice on Work and pmos voice (job #1913, A427)",
10
+ "s": "Reviews grouped by reason — Customer voice on Work and pmos voice (job #1913, A427)",
11
+ "k": "new",
12
+ "h": "Reviews grouped by reason — Customer voice on Work and pmos voice (job #1913, A427)",
13
+ "try": {
14
+ "steps": [
15
+ "Ask PMOS in the chat: add three reviews about checkout failing on old Android, score 1 of 5, reason Checkout fails on old Android",
16
+ "Open Work for that product and find Customer voice under the strategy",
17
+ "Press ✦ on the fastest-growing complaint, then Undo in the toast"
18
+ ],
19
+ "see": "Customer voice lists each reason with its comments, how it moved in 30 days and the score in one line under the reasons. ✦ files the complaint as a triage item and the toast offers Undo, which takes…",
20
+ "open": "/premium-board.html"
21
+ },
22
+ "i": "review-reasons"
23
+ },
24
+ {
25
+ "n": 1977,
26
+ "t": "Work and Today get the popup's five-action limit (job #1917, A529)",
27
+ "s": "Work and Today get the popup's five-action limit (job #1917, A529)",
28
+ "k": "new",
29
+ "h": "Work and Today get the popup's five-action limit (job #1917, A529)",
30
+ "try": {
31
+ "steps": [
32
+ "Open Today and point at a row in Today's log",
33
+ "See at most three buttons: Done, Put off a day and ⋯",
34
+ "Press ⋯ and find Set a date in the Change group"
35
+ ],
36
+ "see": "Each Today row shows three buttons at most. ⋯ opens a short menu that starts with Change and holds every action the row does not show, so nothing is lost. Work's header keeps five actions and its ⋯.",
37
+ "open": "/today.html"
38
+ },
39
+ "i": "five-action-cap"
40
+ },
41
+ {
42
+ "n": 1959,
43
+ "t": "The Portfolio puts every product side by side (job #1894, A56)",
44
+ "s": "The Portfolio puts every product side by side (job #1894, A56)",
45
+ "k": "new",
46
+ "h": "The Portfolio puts every product side by side (job #1894, A56)",
47
+ "try": {
48
+ "steps": [
49
+ "With two or more products, open Today or Work and press the Portfolio button at the end of the product tiles",
50
+ "Read one row per product: bets, odds, spend and outcome so far",
51
+ "Press a product's row to open it in Work"
52
+ ],
53
+ "see": "One row per product with its open bets, the share of its checked outcomes that held, what its agent runs cost in 30 days and its latest outcome that held. At most one ✦ recommendation with its…",
54
+ "open": "/premium-portfolio.html"
55
+ },
56
+ "i": "portfolio"
57
+ },
58
+ {
59
+ "n": 1967,
60
+ "t": "Who decides, who must agree, who needs to know on each initiative (job #1896)",
61
+ "s": "Who decides, who must agree, who needs to know on each initiative (job #1896)",
62
+ "k": "new",
63
+ "h": "Who decides, who must agree, who needs to know on each initiative (job #1896)",
64
+ "try": {
65
+ "steps": [
66
+ "Open Work and open an initiative that has people on it",
67
+ "Find the People block under the Overview: each name says decides, must agree or needs to know, and when they last heard from you",
68
+ "On a name over 3 weeks, press ✦ to read the draft update, copy it and send it yourself, then press I sent it"
69
+ ],
70
+ "see": "One People block with the names PMOS found in Jira, meeting notes, mail and sign-offs, each a draft until you keep it. A name not updated in 3 weeks shows a warning and a ✦ draft update. PMOS sends…",
71
+ "open": "/premium-board.html"
72
+ },
73
+ "i": "stakeholder-map"
74
+ },
75
+ {
76
+ "n": 1887,
77
+ "t": "Day-run and stage-card-tasks hold under load, pmos uses the pinned port, Viewer phone floors wait for the pane",
78
+ "s": "Day-run and stage-card-tasks hold under load, pmos uses the pinned port, Viewer phone floors wait for the pane",
79
+ "k": "fix",
80
+ "i": "ci-main-unblock"
81
+ }
82
+ ]
83
+ },
2
84
  {
3
85
  "v": "0.827.0",
4
86
  "at": "2026-11-25T12:10:57.880Z",
@@ -9,6 +91,7 @@
9
91
  "t": "Starter goals from your own product, under the fundamentals card (job #1916, A84)",
10
92
  "s": "Starter goals from your own product, under the fundamentals card (job #1916, A84)",
11
93
  "k": "new",
94
+ "i": "starter-goals",
12
95
  "h": "Starter goals from your own product, under the fundamentals card (job #1916, A84)",
13
96
  "try": {
14
97
  "steps": [
@@ -18,24 +101,14 @@
18
101
  ],
19
102
  "see": "Up to 3 drafts appear, each with 'from: <source>'. ✓ writes the goal to planning/okrs/okrs-starter.md and the row leaves the block; Undo puts the row back and takes the line out again. A product…",
20
103
  "open": "/today.html"
21
- },
22
- "i": "starter-goals"
104
+ }
23
105
  },
24
106
  {
25
107
  "n": 1984,
26
108
  "t": "One warning when an initiative names risky code (A54)",
27
109
  "s": "One warning when an initiative names risky code (A54)",
28
110
  "k": "new",
29
- "i": "arch-warns",
30
- "try": {
31
- "steps": [
32
- "On Work, open an initiative of a product whose repository PMOS has read, whose record names a part the Code panel tints as risky",
33
- "Read the ✦ line above the plan: it names the part and why it is risky",
34
- "Press ✓ to add the test task, then Undo in the toast; press ✕ for Not now"
35
- ],
36
- "see": "One ✦ line at most, naming the risky part and its reason in the code map's own words. ✓ adds the task 'Add tests for <part>' to the initiative and the toast's Undo removes it. ✕ hides the line for…",
37
- "open": "/work.html"
38
- }
111
+ "i": "arch-warns"
39
112
  }
40
113
  ]
41
114
  },
@@ -136,6 +136,8 @@ None of these briefs an agent or takes an item. Do that from the item's card on
136
136
  - `pmos people record --file <sightings.json>` records the people a session saw. Agent sessions run it. It must name who recorded it: in a workspace session the session token does this; outside the workspace, add `--by <profile>`. A sighting already recorded is skipped and counted.
137
137
  - `pmos people settings` prints `calendar names: on` or `calendar names: off`. The morning brief reads it before it records attendees.
138
138
  - `pmos people help` prints the commands.
139
+ - `pmos people map <initiative>` lists who decides, who must agree and who needs to know on one initiative, and when each last heard from you. The names come from the record's `decider`, `owner` or `sponsor`, the initiative's sign-offs and objections, and the people whose Jira, meeting notes or mail name it. Each is a draft until you keep it. A name not updated in 3 weeks shows a ✦ draft update for you to send. Add `--json` for the rows. The People block of the initiative on Work shows the same map.
140
+ - `pmos people keep <initiative> <person> [--group decides|agree|know]` keeps a name on the map, in that group. `pmos people drop <initiative> <person>` takes it off for good. `pmos people told <initiative> <person>` records that you sent them an update today. `pmos people undo <initiative> <person>` takes back the last of these. PMOS never sends an update itself.
139
141
 
140
142
  The sightings file holds `{ "sightings": [...], "merges": [...] }`. A sighting is `{ "source": "gather" | "calendar" | "live" | "jira" | "plan" | "notes", "handle": { "kind": "mail" | "slack" | "jira" | "confluence" | "speaker" | "name", "value": "…" }, "name": "…", "role"?, "org"?, "external"?: true, "interaction"?: { "date": "YYYY-MM-DD", "kind": "Mail", "text": "one line, at most 200 characters", "pointer": "where it came from, at most 200 characters", "tone"?: "warm", "initiative"?: "<id>" } }`. A merge is `{ "a": <handle>, "b": <handle>, "why": "one line" }`.
141
143
 
@@ -400,6 +402,18 @@ Show where the team is short before you ask for headcount. Run it in the product
400
402
  - PMOS never writes over a brief. It calls no model and sends nothing. Edit the brief and share it yourself.
401
403
  - `pmos hire count [--days 7]` prints how many briefs were drafted in the last days. Its last line is the number.
402
404
 
405
+ ### pmos voice: customer comments grouped by reason
406
+
407
+ Act on the reason behind a score, not on the score. Run it in the product's repository, or pass `--root <dir>`, or ask the chat to "import these reviews" or "group the survey comments". No running workspace is needed. Work shows the same reasons as Customer voice, under the strategy, on a Board that shows one product.
408
+
409
+ - `pmos voice import <file>` reads an export from a survey tool or an app store: a CSV with a header row, or a JSON list. The columns are `text`, `reason`, `score` (or `rating`), `scale` (5 for stars, 10 for an NPS survey), `source` (survey, review or other) and `at` (or `date`). A comment imported twice counts once.
410
+ - `pmos voice add --text "<comment>" [--reason "<reason>"] [--score 2] [--scale 5]` adds one comment.
411
+ - `pmos voice reason <comment id> "<reason>"` names the reason of a comment. A comment with no reason joins a reason it shares 2 words with; otherwise it stays unsorted, and `pmos voice list` shows its id.
412
+ - `pmos voice list [--json]` shows each reason of the last 90 days with its comments and how it moved in 30 days (up 3×, up, new, flat, down), most growth first, then the score line and the ✦.
413
+ - `pmos voice file "<reason>"` files a reason as a triage item, the same as ✦ on Work. `pmos voice undo <capture id>` takes it back, unless an initiative was already made from it.
414
+ - `pmos voice count` prints how many reasons had a comment in the last 30 days. Its last line is the number.
415
+ - PMOS calls no model and sends nothing. A reason is a complaint when most of its scored comments are low (3 or less of 5, 6 or less of 10).
416
+
403
417
  ### pmos why: why the work exists, in three lines
404
418
 
405
419
  Anyone can run it, not only the PM: an engineer or a stakeholder who wants to know why an initiative or a task exists. Run it in the product's repository, or pass `--root <dir>`. It reads the records on disk, needs no running workspace and changes nothing.
@@ -722,8 +736,11 @@ pmos board the Active filter
722
736
  pmos board --mine your own items
723
737
  pmos board --init <initiative> one initiative
724
738
  pmos board --json the same answer as GET /api/board, for scripts
739
+ pmos board actions [--json] what Work and Today show, and what ⋯ holds
725
740
  ```
726
741
 
742
+ `pmos board actions` prints the five-action limit for each place: a page header shows five actions at most, and a row on Today shows three at most (two actions and ⋯). It names the actions shown, and the groups under ⋯, which start with Change. The shown actions are the ones you used most in the last 30 days, worked out at most once a week; before 30 days of use they are the defaults (Done and Put off a day on a Today row). It reads the local use log only.
743
+
727
744
  The text form prints one column per block, then one line for each card: the initiative, the stage, the title and the owner, and what needs your notice. The command only reads. It writes no line to any ledger.
728
745
 
729
746
  `pmos board` exits with 0 when it printed Work, 1 when the initiative is not on Work, and 2 when the command line is wrong.
@@ -746,6 +763,18 @@ pmos signal count [<checkout>]
746
763
 
747
764
  `pmos signal` exits with 0 when it is done, 1 when it refused, and 2 when the command line is wrong.
748
765
 
766
+ ### pmos portfolio
767
+
768
+ The Portfolio puts every product side by side, for a head of product. It is a page too: press the Portfolio button at the end of the product tiles on Today or Work. The page and the button show only when the workspace has two or more products.
769
+
770
+ - `pmos portfolio` prints one line per product: its open bets, its odds, its spend and its latest outcome that held. Then it prints PMOS's one recommendation, if there is one, with its reason. `--json` prints the rows.
771
+ - Bets are the product's work initiatives that are not stopped and whose outcome is not judged yet. Odds are the share of its judged outcome checks that held (validated of validated plus refuted). With fewer than 3 judged, the odds are not known and stay empty. Spend is what the product's agent runs cost in the last 30 days. Outcome is the evidence of its latest check that held.
772
+ - PMOS recommends one thing at most: the product with 2 or more outcome checks due needs help. When another product has more open bets and none due, PMOS says to move one person from it.
773
+ - `pmos portfolio keep <key>` keeps the recommendation: it stays hidden until its facts change. `pmos portfolio not-now <key>` hides it for 7 days. `pmos portfolio undo <key>` takes the last answer back. The page's Keep and Not now write the same store (`portfolio.jsonl` in the state folder).
774
+ - Reading the Portfolio changes no file of any product. A row on the page opens that product in Work.
775
+
776
+ `pmos portfolio` exits with 0 when it is done, 1 when it refused, and 2 when the command line is wrong.
777
+
749
778
  ### pmos program
750
779
 
751
780
  `pmos program suggest` is the only write of the milestone review run. It files a suggestion for you to keep, change or drop.
@@ -25,6 +25,7 @@ const USAGE = [
25
25
  ' pmos board --mine your own items',
26
26
  ' pmos board --init <initiative> one initiative',
27
27
  ' pmos board --json the answer of GET /api/board, for scripts',
28
+ ' pmos board actions [--json] what Work and Today show (five in a header, three on a row) and what ⋯ holds',
28
29
  'Done shows the last 14 days. Tasks and breakdown items both show; `pmos task list <initiative>` lists one initiative\'s tasks with their dates.',
29
30
  ];
30
31
  const BOOL = new Set(['json', 'mine', 'help']);
@@ -93,8 +94,11 @@ function addTasks(out, root, now) {
93
94
  out.counts = { todo: out.board.todo.length, doing: out.board.doing.length, review: out.board.review.length, done: out.board.done.length, doneOlder: out.board.doneOlder };
94
95
  }
95
96
 
96
- async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), now } = {}) {
97
+ async function run(argv, io = {}) {
98
+ const { say = (s) => console.log(s), cwd = process.cwd(), now } = io;
97
99
  const args = argv[0] === 'board' ? argv.slice(1) : argv.slice();
100
+ // five-action-cap (A529): what Work and Today show, and what ⋯ holds (lib/five-action-cap.js reads the local use log)
101
+ if (args[0] === 'actions') return require('./five-action-cap.js').run(args, { out: say, err: say, ...(io.dir !== undefined ? { dir: io.dir } : {}), ...(now ? { now } : {}) });
98
102
  const { pos, flags } = parse(args);
99
103
  if (flags.help) { for (const l of USAGE) say(l); return 0; }
100
104
  for (const k of Object.keys(flags)) {
@@ -43,6 +43,7 @@
43
43
  {"id": "mention", "audience": "user", "status": "ga", "group": "Catch up", "name": "Mentions that wait on you", "say": "What waits on you in your tools, with a reply PMOS drafts for you to send.", "cmd": "/mention", "verb": "mention"},
44
44
  {"id": "workflow", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Workflows", "say": "The workflows of this product, a new workflow draft, and moving an initiative to another one.", "cmd": "/workflow", "verb": "workflow"},
45
45
  {"id": "blueprint", "audience": "user", "status": "ga", "group": "Your product", "name": "Every feature and its state", "say": "Every feature of the product with a status worked out from its evidence.", "cmd": "/blueprint", "verb": "blueprint"},
46
+ {"id": "portfolio", "audience": "user", "status": "ga", "group": "Your product", "name": "Portfolio", "say": "Every product side by side: bets, odds, spend and outcomes, with one recommendation.", "cmd": "/portfolio", "verb": "portfolio"},
46
47
  {"id": "program", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Programs", "say": "Make and change programs: charter, milestones, order, capacity and steering.", "cmd": "/program", "verb": "program"},
47
48
  {"id": "extension", "audience": "user", "status": "ga", "group": "Find your way", "name": "Google Meet extension", "say": "The folder of the Chrome extension for Google Meet and the three steps to load it.", "cmd": "/extension", "verb": "extension"},
48
49
  {"id": "team", "audience": "user", "status": "ga", "group": "What PMOS did", "name": "The role agents", "say": "Who owns what among the role agents, what each works on, and pause or resume them.", "cmd": "/team", "verb": "team"},
@@ -71,6 +72,7 @@
71
72
  {"id": "artefacts", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "The seven artefacts", "say": "Intent, Goal, Narrative, Experiment, Specimens, Done test and Lessons of an initiative.", "cmd": "/artefacts", "verb": "artefacts", "hint": "<initiative>"},
72
73
  {"id": "forecast", "audience": "user", "status": "ga", "group": "Your product", "name": "Goal forecasts", "say": "A goal forecast's kept baseline, and the forecasts that turned.", "cmd": "/forecast", "verb": "forecast"},
73
74
  {"id": "git-identity", "audience": "user", "status": "ga", "group": "Find your way", "name": "Your git identity", "say": "Which git identity and GitHub login this repository uses.", "cmd": "/git-identity", "verb": "git-identity"},
75
+ {"id": "voice", "audience": "user", "status": "ga", "group": "Your product", "name": "Customer voice", "say": "Survey comments and app-store reviews grouped by reason, the fastest-growing first.", "cmd": "/voice", "verb": "voice"},
74
76
  {"id": "signal", "audience": "user", "status": "ga", "group": "Your product", "name": "Customer signals", "say": "The customer signals behind each roadmap item.", "cmd": "/signal", "verb": "signal", "hint": "<item>"},
75
77
  {"id": "launcher", "audience": "user", "status": "ga", "group": "Find your way", "name": "Start without a terminal", "say": "A PMOS app and a login item, so the workspace starts by itself.", "cmd": "/launcher", "verb": "launcher"},
76
78
  {"id": "verify-work", "audience": "agent", "status": "ga", "group": "What PMOS did", "name": "Mark integrated work", "say": "A build run marks work items integrated from the default branch.", "cmd": "/verify-work", "verb": "verify-work"},
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+ /* five-action-cap.js — the server side of the five-action limit on Work and Today (five-action-cap, idea A529; the rule is
3
+ * public/pm/five-action-cap.js). It reads the local use log only; it writes nothing.
4
+ *
5
+ * fold(lines, place, now) → { counts: { done: n, … }, span } PURE: the `<place>-<action>` presses of the last 30 days, and span = the
6
+ * whole days since the log's oldest line (the shown ones are worked out only at 30 or more). GET /api/use-log/cap?place=
7
+ * shownRate(lines, days, now) → { shown, more, pct } PURE: Today row presses on a shown button (`today-row-<act>`) and under ⋯
8
+ * (`today-row-more-<act>`) in the last `days` days; pct = shown out of both, 100 with none (the health number)
9
+ * actions(lines, now) → [{ place, label, shown, more, from }] PURE: each place's shown actions and what ⋯ holds, for `pmos board actions`
10
+ * run(argv, io) → exit code: `pmos board actions [--json]`
11
+ *
12
+ * node lib/five-action-cap.js count [--days 7] the health number: the percent of Today row presses on a shown button (last line)
13
+ */
14
+ const UL = require('./use-log.js');
15
+
16
+ const DAY = 864e5;
17
+ const KEEP_DAYS = 30;
18
+ const PLACE_RE = /^[a-z][a-z-]{1,30}$/;
19
+ let CAP = null;
20
+ /** The pure rule (ESM) loaded once. */
21
+ async function rule() { if (!CAP) CAP = await import('../public/pm/five-action-cap.js'); return CAP; }
22
+
23
+ function fold(lines, place, now = Date.now()) {
24
+ if (!PLACE_RE.test(String(place || ''))) return { counts: {}, span: 0 };
25
+ const from = now - KEEP_DAYS * DAY, counts = {}, re = new RegExp('^' + place + '-(?:more-)?([a-z]{1,20})$');
26
+ let first = Infinity;
27
+ for (const l of lines || []) {
28
+ const t = Date.parse(l && l.at);
29
+ if (t < first) first = t; // the span is the whole log's age, so a full log reads as full (pm/five-action-cap.js FULL_DAYS)
30
+ if (!(t >= from)) continue;
31
+ const m = l.kind === 'use' && re.exec(l.control || '');
32
+ if (m) counts[m[1]] = (counts[m[1]] || 0) + 1;
33
+ }
34
+ return { counts, span: first === Infinity ? 0 : Math.floor((now - first) / DAY) };
35
+ }
36
+
37
+ function shownRate(lines, days = 7, now = Date.now()) {
38
+ const from = now - Math.max(1, Number(days) || 7) * DAY;
39
+ let shown = 0, more = 0;
40
+ for (const l of lines || []) {
41
+ if (!l || l.kind !== 'use' || !(Date.parse(l.at) >= from)) continue;
42
+ const c = String(l.control || '');
43
+ if (/^today-row-more-[a-z]+$/.test(c)) more++;
44
+ else if (/^today-row-(?!more$)[a-z]+$/.test(c)) shown++;
45
+ }
46
+ return { shown, more, pct: shown + more ? Math.round((shown / (shown + more)) * 100) : 100 };
47
+ }
48
+
49
+ async function actions(lines, now = Date.now()) {
50
+ const C = await rule();
51
+ return Object.entries(C.PLACES).map(([place, P]) => {
52
+ const f = fold(lines, place, now), shown = C.pick(place, f.counts, f.span);
53
+ const more = place === 'today-row' ? C.todayRow(P.acts, shown).more : [];
54
+ return { place, label: P.label, max: P.max, shown, more, from: f.span >= C.FULL_DAYS ? 'use' : 'default' };
55
+ });
56
+ }
57
+
58
+ async function run(argv, io = {}) {
59
+ const out = io.out || ((s) => process.stdout.write(s + '\n')), err = io.err || ((s) => process.stderr.write(s + '\n'));
60
+ const json = argv.includes('--json');
61
+ const bad = argv.filter((a) => a !== '--json' && a !== 'actions');
62
+ if (bad.length) { err('usage: pmos board actions [--json] — what Work and Today show, and what ⋯ holds'); return 2; }
63
+ const dir = io.dir !== undefined ? io.dir : require('./state-root.js').defaultRoot({ env: process.env });
64
+ const rows = await actions(UL.readLines(dir), io.now || Date.now());
65
+ if (json) { out(JSON.stringify({ ok: true, places: rows }, null, 2)); return 0; }
66
+ for (const r of rows) {
67
+ const C = await rule();
68
+ const words = (k) => C.WORDS[k] || k;
69
+ out(`${r.label} (${r.max} at most, ${r.from === 'use' ? 'from your use in 30 days' : 'the defaults until 30 days of use'}): ${r.shown.map(words).join(', ')}${r.more.length ? ' · ⋯ ' + r.more.map((g) => g.group + ': ' + g.items.map(words).join(', ')).join(' · ') : ''}`);
70
+ }
71
+ return 0;
72
+ }
73
+
74
+ module.exports = { fold, shownRate, actions, run, KEEP_DAYS };
75
+
76
+ if (require.main === module) {
77
+ const cmd = process.argv[2];
78
+ if (cmd !== 'count') { console.error('usage: node lib/five-action-cap.js count [--days 7] (the percent of Today row presses on a shown button)'); process.exit(2); }
79
+ const i = process.argv.indexOf('--days'), days = i > 0 ? Number(process.argv[i + 1]) || 7 : 7;
80
+ const dir = require('./state-root.js').defaultRoot({ env: process.env });
81
+ const r = shownRate(UL.readLines(dir), days);
82
+ console.log(`[five-action-cap] shown ${r.shown}, under ⋯ ${r.more}, last ${days} days`);
83
+ console.log(String(r.pct));
84
+ }