create-pmos 0.827.0 → 0.829.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 (103) hide show
  1. package/package.json +217 -45
  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/board-deliveries-test.js +2 -2
  8. package/workspace/changelog.json +216 -12
  9. package/workspace/guide/cli.md +62 -0
  10. package/workspace/guide/home.md +1 -0
  11. package/workspace/guide/settings-and-switches.md +1 -0
  12. package/workspace/lib/board-cli.js +5 -1
  13. package/workspace/lib/board-premium.js +1 -0
  14. package/workspace/lib/critical-needs.js +162 -0
  15. package/workspace/lib/deps-cli.js +102 -0
  16. package/workspace/lib/engine/boards.js +13 -2
  17. package/workspace/lib/features.json +5 -0
  18. package/workspace/lib/five-action-cap.js +84 -0
  19. package/workspace/lib/needs-providers.js +1 -0
  20. package/workspace/lib/page-one-answer.js +86 -0
  21. package/workspace/lib/pages-cli.js +6 -2
  22. package/workspace/lib/people-cli.js +43 -2
  23. package/workspace/lib/pmos-verbs.js +15 -1
  24. package/workspace/lib/portfolio-cli.js +64 -0
  25. package/workspace/lib/portfolio.js +168 -0
  26. package/workspace/lib/prototype-cli.js +86 -0
  27. package/workspace/lib/report-cli.js +12 -2
  28. package/workspace/lib/report-readers.js +5 -3
  29. package/workspace/lib/review-pack.js +348 -0
  30. package/workspace/lib/review-reasons.js +357 -0
  31. package/workspace/lib/route-modules.js +6 -0
  32. package/workspace/lib/routes-boards.js +25 -2
  33. package/workspace/lib/routes-portfolio.js +50 -0
  34. package/workspace/lib/routes-review-pack.js +42 -0
  35. package/workspace/lib/routes-roadmap-ops.js +53 -1
  36. package/workspace/lib/routes-sim-users.js +66 -0
  37. package/workspace/lib/routes-stakeholders.js +42 -0
  38. package/workspace/lib/routes-strategy-card.js +29 -1
  39. package/workspace/lib/routes-team-waits.js +24 -0
  40. package/workspace/lib/routes-use-log.js +6 -1
  41. package/workspace/lib/sim-users.js +329 -0
  42. package/workspace/lib/stakeholder-map.js +232 -0
  43. package/workspace/lib/task-store.js +1 -1
  44. package/workspace/lib/team-waits.js +167 -0
  45. package/workspace/lib/tradeoff-cards.js +258 -0
  46. package/workspace/lib/tradeoff-cli.js +83 -0
  47. package/workspace/lib/voice-cli.js +7 -0
  48. package/workspace/package-lock.json +2 -2
  49. package/workspace/package.json +1 -1
  50. package/workspace/premium-vw-jira-test.js +6 -2
  51. package/workspace/public/pm/bd-backlog.js +44 -6
  52. package/workspace/public/pm/bd-principles.js +12 -1
  53. package/workspace/public/pm/cozy-library.css +5 -0
  54. package/workspace/public/pm/cozy-pick.css +1 -0
  55. package/workspace/public/pm/cozy-pop-work.js +8 -2
  56. package/workspace/public/pm/cozy-proto.css +5 -0
  57. package/workspace/public/pm/cozy-proto.js +11 -3
  58. package/workspace/public/pm/cozy-today-app.js +53 -3
  59. package/workspace/public/pm/cozy-today-view.js +12 -4
  60. package/workspace/public/pm/day-time.js +8 -0
  61. package/workspace/public/pm/five-action-cap.js +104 -0
  62. package/workspace/public/pm/home-ini.js +3 -2
  63. package/workspace/public/pm/ini-links.js +2 -1
  64. package/workspace/public/pm/ini-tasks.js +5 -2
  65. package/workspace/public/pm/ini-view-model.js +14 -6
  66. package/workspace/public/pm/ini-view.js +12 -2
  67. package/workspace/public/pm/library-model.js +1 -1
  68. package/workspace/public/pm/page-one-answer.css +18 -0
  69. package/workspace/public/pm/page-one-answer.js +134 -0
  70. package/workspace/public/pm/pop-work-model.js +8 -6
  71. package/workspace/public/pm/portfolio.js +67 -0
  72. package/workspace/public/pm/premium-board.js +19 -6
  73. package/workspace/public/pm/premium-library.js +27 -3
  74. package/workspace/public/pm/product-switcher.js +7 -1
  75. package/workspace/public/pm/range-pick.css +12 -0
  76. package/workspace/public/pm/range-pick.js +30 -6
  77. package/workspace/public/pm/review-pack.js +47 -0
  78. package/workspace/public/pm/review-reasons.js +75 -0
  79. package/workspace/public/pm/sim-users.js +34 -0
  80. package/workspace/public/pm/sort-order.js +3 -0
  81. package/workspace/public/pm/stakeholder-map.js +125 -0
  82. package/workspace/public/pm/task-card.js +10 -7
  83. package/workspace/public/pm/team-waits.js +56 -0
  84. package/workspace/public/pm/tradeoff-cards.css +27 -0
  85. package/workspace/public/pm/tradeoff-cards.js +183 -0
  86. package/workspace/public/premium-board.html +1 -0
  87. package/workspace/public/premium-portfolio.html +48 -0
  88. package/workspace/public/today.html +1 -0
  89. package/workspace/run-tests.js +9 -1
  90. package/workspace/server.js +1 -1
  91. package/workspace/stage-card-tasks-test.js +11 -5
  92. package/workspace/test-lists/critical-needs.json +9 -0
  93. package/workspace/test-lists/five-action-cap.json +9 -0
  94. package/workspace/test-lists/page-one-answer.json +9 -0
  95. package/workspace/test-lists/portfolio.json +9 -0
  96. package/workspace/test-lists/review-pack.json +9 -0
  97. package/workspace/test-lists/review-reasons.json +9 -0
  98. package/workspace/test-lists/sim-users.json +9 -0
  99. package/workspace/test-lists/stakeholder-map.json +9 -0
  100. package/workspace/test-lists/task-time-optional.json +9 -0
  101. package/workspace/test-lists/team-waits.json +9 -0
  102. package/workspace/test-lists/tradeoff-cards.json +9 -0
  103. package/workspace/test-timings.json +25 -0
@@ -0,0 +1,102 @@
1
+ 'use strict';
2
+ /* deps-cli.js — `pmos deps`: what the product's work waits on outside the team (Work › Dependencies). Initiative team-waits (bet A364);
3
+ * lib/team-waits.js is the store the page reads (GET /api/team-waits), so what the chat writes here shows on Work › Dependencies.
4
+ *
5
+ * pmos deps waits [--json] every open wait on another team, oldest first, with the day it started
6
+ * pmos deps wait --team "<team>" [--what "<what>"] [--ini <id>] [--since YYYY-MM-DD] [--who "<name>"] [--email <address>]
7
+ * [--key <JIRA-1>] [--sprint "<name>" --sprint-end YYYY-MM-DD]
8
+ * add one wait (from a Jira link: pass --key; one open wait per key)
9
+ * pmos deps done <wait id> the wait is over
10
+ * pmos deps undo <wait id> Undo of done: the wait is open again
11
+ * every command: [--root <dir>] (default: this repository)
12
+ *
13
+ * Waits that come from the initiative itself (a parked hold "waiting on <team>", or `waiting_on:` in its record) are listed too; change them
14
+ * with `pmos parked` or in the record. Exit codes: 0 done, 1 refused, 2 usage. Nothing is sent. */
15
+ const path = require('path');
16
+ const fs = require('fs');
17
+ const TW = require('./team-waits.js');
18
+ const { todayOf } = require('./parked-reasons.js');
19
+
20
+ const COMMANDS = { deps: ['waits', 'wait', 'done', 'undo'] };
21
+ const USAGE = [
22
+ 'usage: pmos deps waits|wait|done|undo — what your work waits on outside the team (Work › Dependencies)',
23
+ ' pmos deps waits [--json] every open wait on another team, oldest first, with the day it started',
24
+ ' pmos deps wait --team "<team>" [--what "<what>"] [--ini <id>] [--since YYYY-MM-DD] [--who "<name>"] [--email <address>]',
25
+ ' [--key <JIRA-1>] [--sprint "<name>" --sprint-end YYYY-MM-DD]',
26
+ ' add a wait; from a Jira link pass --key (one open wait per key)',
27
+ ' pmos deps done <wait id> the wait is over',
28
+ ' pmos deps undo <wait id> the wait is open again',
29
+ 'Run it in the product\'s repository, or pass --root <dir>.',
30
+ ];
31
+ const ALLOWED = {
32
+ waits: ['json', 'root'],
33
+ wait: ['json', 'root', 'team', 'what', 'ini', 'since', 'who', 'email', 'key', 'sprint', 'sprint-end'],
34
+ done: ['json', 'root'], undo: ['json', 'root'],
35
+ };
36
+ const BOOL = new Set(['json']);
37
+
38
+ function parse(args) {
39
+ const pos = [], flags = {};
40
+ for (let i = 0; i < args.length; i++) {
41
+ const a = args[i];
42
+ if (!a.startsWith('--')) { pos.push(a); continue; }
43
+ const k = a.slice(2);
44
+ if (BOOL.has(k)) flags[k] = true;
45
+ else flags[k] = args[i + 1] !== undefined && !String(args[i + 1]).startsWith('--') ? args[++i] : '';
46
+ }
47
+ return { pos, flags };
48
+ }
49
+ function repoRoot(cwd) {
50
+ for (let d = path.resolve(cwd); ; d = path.dirname(d)) {
51
+ if (fs.existsSync(path.join(d, '.git'))) return d;
52
+ if (path.dirname(d) === d) return path.resolve(cwd);
53
+ }
54
+ }
55
+
56
+ async function run(argv, { say = (s) => console.log(s), env = process.env, cwd = process.cwd(), now = Date.now(), isTTY } = {}) {
57
+ const args = argv[0] === 'deps' ? argv.slice(1) : argv.slice();
58
+ const sub = args[0];
59
+ if (!sub || ['help', '--help', '-h'].includes(sub)) { for (const l of USAGE) say(l); return sub ? 0 : 1; }
60
+ if (!COMMANDS.deps.includes(sub)) { say(`unknown deps command "${sub}". Use one of: ${COMMANDS.deps.join(', ')}`); return 2; }
61
+ const { pos, flags } = parse(args.slice(1));
62
+ for (const k of Object.keys(flags)) if (!ALLOWED[sub].includes(k)) { say(`✗ --${k} is not an option of pmos deps ${sub}`); return 2; }
63
+ const root = path.resolve(flags.root || repoRoot(cwd));
64
+ const fail = (error, code = 1) => { say(flags.json ? JSON.stringify({ ok: false, error }) : '✗ ' + error); return code; };
65
+ const actor = () => require('./actor.js').fromCli({ isTTY: isTTY === undefined ? !!(process.stdin.isTTY && process.stdout.isTTY) : isTTY, env });
66
+
67
+ if (sub === 'waits') {
68
+ if (pos.length) return fail('pmos deps waits takes no argument', 2);
69
+ const today = todayOf(now);
70
+ const { file, waits } = TW.waitsOf(root, { today });
71
+ if (flags.json) { say(JSON.stringify({ ok: true, file, today, waits })); return 0; }
72
+ if (!waits.length) { say('Nothing waits on another team.'); return 0; }
73
+ const late = waits.filter((w) => w.days >= TW.LATE_DAYS).length;
74
+ say(`${waits.length} waiting on other teams${late ? ` · ${late} late` : ''}`);
75
+ for (const w of waits) {
76
+ say(` ${w.days >= TW.LATE_DAYS ? '▲' : '◷'} ${w.title || w.ini || '(no initiative)'} → ${w.team || w.what}${w.team && w.what ? ': ' + w.what : ''}`);
77
+ say(` since ${w.since} · ${w.days} ${w.days === 1 ? 'day' : 'days'}${w.who ? ' · ' + w.who : ''}${w.key ? ' · ' + w.key : ''}${w.sprint ? ' · ' + w.sprint : ''} · ${w.id}`);
78
+ }
79
+ return 0;
80
+ }
81
+
82
+ if (sub === 'wait') {
83
+ if (pos.length) return fail('usage: pmos deps wait --team "<team>" [--what "<what>"] [--ini <id>] …', 2);
84
+ const a = actor();
85
+ const r = TW.add(root, { ini: flags.ini, team: flags.team, what: flags.what, since: flags.since, who: flags.who, email: flags.email, key: flags.key,
86
+ sprint: flags.sprint, sprint_end: flags['sprint-end'] }, { now, by: a.by, via: a.via });
87
+ if (!r.ok) return fail(r.error);
88
+ if (flags.json) { say(JSON.stringify({ ok: true, id: r.id, line: r.line })); return 0; }
89
+ say(`${TW.TAG} ✓ ${r.id}: ${r.line.ini || '(no initiative)'} waits on ${r.line.team || r.line.what} since ${r.line.since}. Work › Dependencies shows it. Undo: pmos deps done ${r.id}`);
90
+ return 0;
91
+ }
92
+
93
+ if (pos.length !== 1) return fail(`usage: pmos deps ${sub} <wait id>`, 2);
94
+ const a = actor();
95
+ const r = (sub === 'done' ? TW.end : TW.back)(root, { id: pos[0] }, { now, by: a.by, via: a.via });
96
+ if (!r.ok) return fail(r.error);
97
+ if (flags.json) { say(JSON.stringify({ ok: true, line: r.line })); return 0; }
98
+ say(sub === 'done' ? `${TW.TAG} ✓ ${pos[0]} is over. Undo: pmos deps undo ${pos[0]}` : `${TW.TAG} ✓ ${pos[0]} is open again.`);
99
+ return 0;
100
+ }
101
+
102
+ module.exports = { run, COMMANDS, USAGE };
@@ -48,6 +48,9 @@
48
48
  * task-pin { task, pinned } the PM's pin on a milestone (feedback batch 13 item 4, XcalmA5Milestones):
49
49
  * true draws it on the Board timeline, false hides it, null goes back to the rule (only the initiative's last milestone).
50
50
  * `task` is a Board task, a breakdown item or a Jira key; the last line wins.
51
+ * task-time { task, start_time?, due_time? } an optional time of day on a task's start and due (task-time-optional):
52
+ * "HH:MM", 24-hour; '' clears one end; a line naming one end leaves the other. The day stays in start and due, untouched.
53
+ * `task` is a Board task or a breakdown item (Jira keeps its tickets' fields); the last line wins.
51
54
  * task-priority { task, priority } the PM's priority, set in the row (inline-sprint-priority):
52
55
  * 'P1', 'P2' or 'P3'; '' takes it out. `task` is a Board task or a breakdown item (Jira keeps its tickets' own); the last line wins.
53
56
  * task-order { initiative, section, tasks: [id] } the PM's order of the open tasks inside one stage of an
@@ -195,11 +198,14 @@ const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept
195
198
  'ini-delete', 'ini-restore',
196
199
  // a task's priority, set in the row (initiative inline-sprint-priority): P1, P2 or P3; '' takes it out
197
200
  'task-priority',
201
+ // an optional time of day on a task's start and due (initiative task-time-optional): "HH:MM"; '' clears one end
202
+ 'task-time',
198
203
  // a task's description (initiative task-descriptions): what it is, why, and when it is done; '' clears it
199
204
  'task-description',
200
205
  // a comment on a task (initiative task-detail-one-column): the task popup's Activity › Comments and `pmos task comment`
201
206
  'task-comment']);
202
207
  const COMMENT_MAX = 2000; // one comment on a task (task-comment)
208
+ const TIME_RE = /^([01]\d|2[0-3]):[0-5]\d$/; // a time of day on a task's start or due (task-time), 24-hour
203
209
  // A task's state is its only stage (Wawan, 2026-10-25): the same five every workflow ends in. An old 'In review' reads as In progress (taskState).
204
210
  const TASK_STATES = Object.freeze(['To do', 'In progress', 'Done', "Won't do", 'Archived']);
205
211
  const taskState = (s) => (s === 'In review' ? 'In progress' : TASK_STATES.includes(s) ? s : null);
@@ -235,6 +241,7 @@ function fold(events) {
235
241
  const pins = new Map(); // task id (or Jira key) → true | false: the PM's pin on a milestone; a null line takes it out (the rule again)
236
242
  const comments = new Map(); // task id → [{ text, by, at }]: its comments, oldest first (task-detail-one-column)
237
243
  const descriptions = new Map(); // task id → { text, by, at, sources }: the task's description (task-descriptions); the last line wins, '' clears
244
+ const times = new Map(); // task id → { start_time, due_time } "HH:MM" or '': the PM's optional times (task-time-optional); a task with neither is left out
238
245
  const priorities = new Map(); // task id → 'P1' | 'P2' | 'P3': the PM's priority (inline-sprint-priority); a '' line takes it out, the last line wins
239
246
  const removed = new Map(); // task id → the task a task-remove took out, so a task-restore (Delete's Undo) puts it back
240
247
  const ticketNotes = new Map(); // key(board, Jira key) → the PM's notes on that ticket (the last ticket-note line wins)
@@ -349,6 +356,10 @@ function fold(events) {
349
356
  comments.get(e.task).push({ text: e.text.slice(0, COMMENT_MAX), by: e.by || null, at: e.at || null });
350
357
  } else if (e.kind === 'task-priority' && typeof e.task === 'string' && e.task && typeof e.priority === 'string' && /^(P[1-3])?$/.test(e.priority)) {
351
358
  if (e.priority) priorities.set(e.task, e.priority); else priorities.delete(e.task);
359
+ } else if (e.kind === 'task-time' && typeof e.task === 'string' && e.task) {
360
+ const was = times.get(e.task) || { start_time: '', due_time: '' }, v = { ...was };
361
+ for (const k of ['start_time', 'due_time']) if (typeof e[k] === 'string' && (e[k] === '' || TIME_RE.test(e[k]))) v[k] = e[k];
362
+ if (v.start_time || v.due_time) times.set(e.task, v); else times.delete(e.task);
352
363
  } else if (e.kind === 'task-pin' && typeof e.task === 'string' && e.task && (typeof e.pinned === 'boolean' || e.pinned === null)) {
353
364
  if (e.pinned === null) pins.delete(e.task); else pins.set(e.task, e.pinned);
354
365
  } else if (e.kind === 'ticket-dates' && b && typeof e.ref === 'string' && JIRA_KEY_RE.test(e.ref)) {
@@ -430,7 +441,7 @@ function fold(events) {
430
441
  suggestNo.set(e.id, { kind: e.of === 'merge' ? 'merge' : 'split', fp: e.fp, at: e.at || null });
431
442
  }
432
443
  }
433
- return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, priorities, descriptions, comments, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
444
+ return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, priorities, times, descriptions, comments, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
434
445
  }
435
446
 
436
447
  /** The stages an initiative runs on a board: its own workflow when one is recorded, else the board's. */
@@ -933,6 +944,6 @@ module.exports = {
933
944
  CATEGORIES, WORKFLOW_TEMPLATES, TOOLS, SELF_LADDER, READING_CAT, STATUSES, ACTIVE, isActive, duplicatesOf, VIEWS, SORTS,
934
945
  templateWorkflow, isTemplateEdited, fold, readingOf, deriveStage, stageOf, catOf, moveWarnings, cardWarnings,
935
946
  applyWorkflowEdit, filterRows, health, counts, sprintsOf, backlogOf, key,
936
- INI_TEMPLATES, TASK_STATES, taskState, isBuildStage, templateBuilds, boardSettings, jiraProjectsOf, JIRA_KEY_RE, JIRA_PROJECT_RE, workflowOf, templateOf, applyIniWorkflow, taskOf, shiftDay,
947
+ INI_TEMPLATES, TASK_STATES, taskState, isBuildStage, templateBuilds, boardSettings, jiraProjectsOf, JIRA_KEY_RE, JIRA_PROJECT_RE, TIME_RE, workflowOf, templateOf, applyIniWorkflow, taskOf, shiftDay,
937
948
  ITEM_PROGRESS, itemStatus, taskItem, rollupItems, wouldCycle, COMMENT_MAX,
938
949
  };
@@ -32,6 +32,7 @@
32
32
  {"id": "initiative", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Make and order initiatives", "say": "Start an initiative and put it in Now, Next or Later on the roadmap.", "cmd": "/initiative", "verb": "initiative", "hint": "<title>"},
33
33
  {"id": "measure", "audience": "user", "status": "ga", "group": "Your product", "name": "Record a measured value", "say": "Write down a KR or health number with where it came from.", "cmd": "/measure", "verb": "measure", "hint": "<kr> <value>"},
34
34
  {"id": "today", "audience": "user", "status": "ga", "group": "Catch up", "name": "What needs you today", "say": "The asks that need you, in the order Today shows them.", "cmd": "/today", "verb": "today"},
35
+ {"id": "tradeoff", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Decide two close items", "say": "Two neighbours on the ranked list side by side; PMOS suggests an order and keeps your reason.", "cmd": "/tradeoff", "verb": "tradeoff", "hint": "list | show <a> <b>"},
35
36
  {"id": "pick", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Pick one thing for the time you have", "say": "Say how many minutes you have; PMOS picks the one ask that fits and unblocks the most.", "cmd": "/pick", "verb": "pick", "hint": "--minutes <n>"},
36
37
  {"id": "board", "audience": "user", "status": "ga", "group": "Catch up", "name": "Every initiative's items", "say": "The items of every initiative by column, or only yours.", "cmd": "/board", "verb": "board"},
37
38
  {"id": "report", "audience": "user", "status": "ga", "group": "Your product", "name": "Draft and issue a report", "say": "Draft a cadence report with every number filled in, then issue it.", "cmd": "/report", "verb": "report", "hint": "<cadence>"},
@@ -43,6 +44,7 @@
43
44
  {"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
45
  {"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
46
  {"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"},
47
+ {"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
48
  {"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
49
  {"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
50
  {"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"},
@@ -56,11 +58,13 @@
56
58
  {"id": "rules", "audience": "user", "status": "ga", "group": "What PMOS did", "name": "Rules PMOS learned", "say": "The standing rules PMOS learned from your corrections, and edit or retire one.", "cmd": "/rules", "verb": "rules"},
57
59
  {"id": "line", "audience": "user", "status": "ga", "group": "Catch up", "name": "Where each initiative stands", "say": "Days in its stage, what is missing, the next move, and whether it is stuck.", "cmd": "/line", "verb": "line", "hint": "<initiative>"},
58
60
  {"id": "hire", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "The next hire", "say": "The role your open work most needs, and a one-page role brief to edit.", "cmd": "/hire", "verb": "hire"},
61
+ {"id": "prototype", "audience": "user", "status": "ga", "group": "Before you ship", "name": "Simulated users try the prototype", "say": "Where simulated users, one per persona, got stuck on a prototype, and the personas that walk it.", "cmd": "/prototype", "verb": "prototype", "hint": "findings <initiative>"},
59
62
  {"id": "goals", "audience": "user", "status": "ga", "group": "Your product", "name": "Starter goals", "say": "Up to three goals drafted from your own product, each with its source; keep one and it becomes a goal.", "cmd": "/goals", "verb": "goals"},
60
63
  {"id": "approver", "audience": "user", "status": "ga", "group": "Before you ship", "name": "What an approver asks", "say": "What each approver asked or objected to before, ahead of the next sign-off.", "cmd": "/approver", "verb": "approver", "hint": "<name>"},
61
64
  {"id": "balance", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "The mix of a list", "say": "Feature, fix, debt or discovery in one line, with a note when one kind is over your line.", "cmd": "/balance", "verb": "balance"},
62
65
  {"id": "declined", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Asks you declined", "say": "Asks closed without being done, each with a kind reply draft PMOS never sends.", "cmd": "/declined", "verb": "declined"},
63
66
  {"id": "sprint", "audience": "user", "status": "ga", "group": "Catch up", "name": "Sprint retro", "say": "A closed sprint's retro from its close numbers, and its one tracked change.", "cmd": "/sprint", "verb": "sprint"},
67
+ {"id": "deps", "audience": "user", "status": "beta", "group": "Catch up", "name": "Waiting on other teams", "say": "Each piece of your work that waits on another team, since when, with a Chase draft.", "cmd": "/deps", "verb": "deps"},
64
68
  {"id": "quiet", "audience": "user", "status": "ga", "group": "Catch up", "name": "Quiet initiatives", "say": "The weekly sweep of initiatives quiet 30 days or more: keep, park or close each.", "cmd": "/quiet", "verb": "quiet"},
65
69
  {"id": "units", "audience": "user", "status": "ga", "group": "Your product", "name": "Programs, products and projects", "say": "Who owns each initiative, and each owner's brief.", "cmd": "/units", "verb": "units"},
66
70
  {"id": "owner", "audience": "user", "status": "ga", "group": "Your product", "name": "An owner's brief", "say": "A unit owner's daily brief now.", "cmd": "/owner", "verb": "owner", "hint": "<unit>"},
@@ -71,6 +75,7 @@
71
75
  {"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
76
  {"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
77
  {"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"},
78
+ {"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
79
  {"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
80
  {"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
81
  {"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
+ }
@@ -42,6 +42,7 @@ const PROVIDERS = Object.freeze([
42
42
  'parked-reasons', // parked-reason-way-back (bet A446): a parked initiative whose way back is met, to bring back (kind 7)
43
43
  'product-health', // product-health-score: a product's health score fell 10 points or more against its past week (kind 8)
44
44
  'setup-station', // setup-station: a product that has not passed Setup (tracker read, agreed goal, owner), with the next ✦ (kind 7)
45
+ 'critical-needs', // critical-moved (bet A103): a task on an initiative's critical path moved its start or due date, with go-live (kind 7)
45
46
  ]);
46
47
  /** Kinds that already mean something in the needs queue. A provider may not reuse one. */
47
48
  const RESERVED_KINDS = Object.freeze(['question', 'accept', 'outcome', 'keep', 'evidence', 'plan-flag', 'provider-error']);
@@ -0,0 +1,86 @@
1
+ 'use strict';
2
+ /* page-one-answer.js — the one-call check of "every page opens with one answer" (initiative page-one-answer, job #1889, idea A308).
3
+ *
4
+ * Each page (Today, Work, Board, an initiative) counts the calls to act in its first view once per load (pm/page-one-answer.js
5
+ * firstViewCalls: a primary button or a [data-call] above the fold) and posts the count here. LOCAL ONLY: one line per page and day in
6
+ * <runtime>/page-calls.jsonl, the last count of the day wins. Nothing else reads it but `pmos pages calls`.
7
+ *
8
+ * record(dir, { page, calls, labels }, at) → { ok, wrote } | { ok: false, error }
9
+ * readLines(dir) → [{ at, page, calls, labels }]
10
+ * flagged(lines, { now, days }) PURE → [{ page, calls, labels, at }] pages whose last first view had more than ONE call
11
+ * handle(req, res, url, ctx) POST /api/page-calls { page, calls, labels } (the page's own press guard)
12
+ * run(argv, { say, runtimeDir, now }) `pmos pages calls [--days N] [--json] [--count]`
13
+ * No line here sends anything or calls a model. */
14
+ const fs = require('fs');
15
+ const path = require('path');
16
+
17
+ const FILE = 'page-calls.jsonl';
18
+ const PAGES = ['today', 'work', 'board', 'initiative'];
19
+ const MAX_CALLS = 1;
20
+ const DAY = 864e5;
21
+ const isObj = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
22
+
23
+ function readLines(dir) {
24
+ if (!dir) return [];
25
+ let txt = '';
26
+ try { txt = fs.readFileSync(path.join(dir, FILE), 'utf8'); } catch { return []; }
27
+ const out = [];
28
+ for (const l of txt.split('\n')) { if (!l.trim()) continue; try { const o = JSON.parse(l); if (isObj(o) && PAGES.includes(o.page)) out.push(o); } catch { /* a torn line is skipped */ } }
29
+ return out;
30
+ }
31
+
32
+ function record(dir, { page, calls, labels } = {}, at = new Date().toISOString()) {
33
+ if (!dir) return { ok: false, error: 'This workspace has no runtime folder.' };
34
+ if (!PAGES.includes(page)) return { ok: false, error: 'page must be one of ' + PAGES.join(', ') };
35
+ const n = Number(calls);
36
+ if (!Number.isInteger(n) || n < 0 || n > 200) return { ok: false, error: 'calls must be a whole number from 0 to 200' };
37
+ const L = (Array.isArray(labels) ? labels : []).slice(0, 10).map((s) => String(s || '').replace(/\s+/g, ' ').slice(0, 60));
38
+ const day = String(at).slice(0, 10);
39
+ const same = readLines(dir).filter((x) => x.page === page && String(x.at).slice(0, 10) === day).pop();
40
+ if (same && same.calls === n && JSON.stringify(same.labels || []) === JSON.stringify(L)) return { ok: true, wrote: false };
41
+ fs.mkdirSync(dir, { recursive: true });
42
+ fs.appendFileSync(path.join(dir, FILE), JSON.stringify({ at, page, calls: n, labels: L }) + '\n');
43
+ return { ok: true, wrote: true };
44
+ }
45
+
46
+ /** PURE. The last line of each page in the window; a page is flagged when that line counted more than one call. */
47
+ function flagged(lines, { now = Date.now(), days = 7 } = {}) {
48
+ const from = now - days * DAY, last = new Map();
49
+ for (const x of lines || []) { const t = Date.parse(x.at); if (!(t >= from)) continue; const p = last.get(x.page); if (!p || Date.parse(p.at) <= t) last.set(x.page, x); }
50
+ return [...last.values()].filter((x) => x.calls > MAX_CALLS).sort((a, b) => b.calls - a.calls || a.page.localeCompare(b.page))
51
+ .map((x) => ({ page: x.page, calls: x.calls, labels: x.labels || [], at: x.at }));
52
+ }
53
+
54
+ async function handle(req, res, url, ctx) {
55
+ const send = (status, body) => { ctx.json(res, body, status); return true; };
56
+ if (url.pathname !== '/api/page-calls') return false;
57
+ if (req.method !== 'POST') return send(405, { ok: false, error: 'POST only' });
58
+ if (req.headers && req.headers['x-pmos-session']) return send(403, { ok: false, error: 'An agent session does not open pages. Only the PM\'s own first views are counted.' });
59
+ const read = await ctx.readJson(req);
60
+ if (!read.ok) return send(400, { ok: false, error: 'the body is not JSON' });
61
+ const body = read.body || {};
62
+ const g = require('./pm-guard.js').requirePagePress(req, body);
63
+ if (!g.ok) return send(g.status, { ok: false, error: g.error });
64
+ const r = record(ctx.runtimeDir || null, body, new Date().toISOString());
65
+ if (r.ok && r.wrote) console.info(`[page-one-answer] recorded page=${body.page} calls=${body.calls}`);
66
+ return r.ok ? send(200, { ok: true, wrote: r.wrote }) : send(400, { ok: false, error: r.error });
67
+ }
68
+
69
+ function run(argv, { say = (s) => console.log(s), runtimeDir = null, now = Date.now() } = {}) {
70
+ const a = argv.slice(argv[0] === 'pages' ? 1 : 0).filter((x) => x !== 'calls');
71
+ const flag = (k) => a.includes('--' + k);
72
+ const di = a.indexOf('--days'), days = di >= 0 ? Number(a[di + 1]) : 7;
73
+ if (!(days > 0 && days <= 90)) { say('✗ --days takes a number from 1 to 90'); return 2; }
74
+ let dir = runtimeDir;
75
+ if (!dir) { try { dir = require('./state-root.js').defaultRoot(); } catch { dir = null; } }
76
+ const lines = readLines(dir), F = flagged(lines, { now, days });
77
+ if (flag('json')) { say(JSON.stringify({ days, pages: F }, null, 2)); return 0; }
78
+ if (flag('count')) { say(String(F.length)); return 0; }
79
+ if (!lines.length) { say('No page has counted its first view yet. Open Today, Work, Board or an initiative and run this again.'); return 0; }
80
+ if (!F.length) { say(`Every page counted in the last ${days} days opens with one call to act or none.`); return 0; }
81
+ for (const x of F) say(`● ${x.page}: ${x.calls} calls to act in the first view (${x.labels.filter(Boolean).join(', ') || 'no labels'}), ${String(x.at).slice(0, 10)}`);
82
+ say('A first view should hold one call to act at most. Fold the others under the answer.');
83
+ return 0;
84
+ }
85
+
86
+ module.exports = { FILE, PAGES, MAX_CALLS, record, readLines, flagged, handle, prefixes: ['/api/page-calls'], run };
@@ -4,13 +4,14 @@
4
4
  *
5
5
  * pmos pages [show] [--ref <ref>] [--json] [--count]
6
6
  * pmos pages check --base <ref> [--ref <ref>|WORKTREE] [--feature] [--gate] [--json]
7
+ * pmos pages calls [--days N] [--json] [--count] (lib/page-one-answer.js: the pages whose first view had more than one call to act)
7
8
  * It reads git only and writes nothing. Exit codes: 0 done, 1 refused (or a finding with --gate), 2 usage.
8
9
  */
9
10
  const path = require('path');
10
11
  const H = require('./page-health.js');
11
12
  const D = require('./design-drift.js');
12
13
 
13
- const COMMANDS = { pages: ['show', 'check'] };
14
+ const COMMANDS = { pages: ['show', 'check', 'calls'] };
14
15
  const USAGE = [
15
16
  'usage: pmos pages — each page\'s fixes, reverts and restores in the last days, so a page that keeps breaking is fixed before it gets new features',
16
17
  ' pmos pages [show] [--ref <ref>] [--json] [--count]',
@@ -19,7 +20,9 @@ const USAGE = [
19
20
  ' --base <ref> the commit the change starts from (for example origin/main)',
20
21
  ' --feature treat the change as a feature even without a feat commit',
21
22
  ' --gate exit 1 when a feature change touches a page over the limit',
22
- 'It reads git only. A product sets window_days and limit in page-health.json in its design-system folder; its pages come from design-drift.json.',
23
+ ' pmos pages calls [--days N] [--json] [--count]',
24
+ ' names each page (Today, Work, Board, an initiative) whose first view had more than one call to act, from this computer\'s record',
25
+ 'show and check read git only. A product sets window_days and limit in page-health.json in its design-system folder; its pages come from design-drift.json.',
23
26
  ];
24
27
  const FLAGS = { show: ['ref', 'json', 'count', 'repo'], check: ['base', 'ref', 'feature', 'gate', 'json', 'repo'] };
25
28
  const BOOL = new Set(['json', 'count', 'feature', 'gate']);
@@ -43,6 +46,7 @@ function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), now = Dat
43
46
  if (['help', '--help', '-h'].includes(args[0])) { for (const l of USAGE) say(l); return 0; }
44
47
  const sub = args[0] && !args[0].startsWith('--') ? args[0] : 'show';
45
48
  if (args[0] === sub) args = args.slice(1);
49
+ if (sub === 'calls') return require('./page-one-answer.js').run(['calls', ...args], { say, now }); // page-one-answer (A308)
46
50
  if (!COMMANDS.pages.includes(sub)) { say(`unknown pages command "${sub}". Use one of: ${COMMANDS.pages.join(', ')}`); return 2; }
47
51
  const { pos, flags } = parse(args);
48
52
  if (pos.length) { say(`✗ pmos pages ${sub} takes no argument`); return 2; }
@@ -6,6 +6,8 @@
6
6
  * pmos people show <person> [--json] one person's page: interactions, tone, shared work, notes, handles
7
7
  * pmos people record --file <sightings.json> (agent session) append what the session saw
8
8
  * pmos people settings [--json] whether calendar attendee names are kept
9
+ * pmos people map <initiative> [--json] who decides, must agree, needs to know, and when each last heard (A371)
10
+ * pmos people keep|drop|told|undo <initiative> <person> [--group decides|agree|know] the PM's word on one name (lib/stakeholder-map.js)
9
11
  *
10
12
  * The same module the People place reads (lib/people-store.js), so a terminal line and the page cannot disagree.
11
13
  * `list` and `show` first record the names this repository's records hold (plan item owners, Live notes speakers), as
@@ -20,14 +22,17 @@ const path = require('path');
20
22
  const store = require('./people-store');
21
23
  const { parseArgs } = require('./schedule-cli');
22
24
 
23
- const COMMANDS = { people: ['list', 'show', 'record', 'settings'] };
25
+ const COMMANDS = { people: ['list', 'show', 'record', 'settings', 'map', 'keep', 'drop', 'told', 'undo'] };
24
26
  const USAGE = [
25
27
  'usage: pmos people [list|show|record|settings] — the people you work with in this repository',
26
28
  ' pmos people [list] [--json] each person, and what waits for you in the review list',
27
29
  ' pmos people show <person> [--json] one person: interactions, tone, shared work, notes and handles',
28
30
  ' pmos people record --file <sightings.json> (agent session) record the people a session saw',
29
31
  ' pmos people settings [--json] whether calendar attendee names are kept (calendar names: on|off)',
30
- 'Nothing here removes a person, merges, sets a tone or writes a note. Do that in People.',
32
+ ' pmos people map <initiative> [--json] who decides, who must agree, who needs to know, and when each last heard from you',
33
+ ' pmos people keep <initiative> <person> [--group decides|agree|know] keep a name on the map (in that group)',
34
+ ' pmos people drop|told|undo <initiative> <person> take a name off, mark that you sent them an update, or take back the last of these',
35
+ 'Nothing here removes a person, merges, sets a tone or writes a note. Do that in People. PMOS never sends an update: you do.',
31
36
  ];
32
37
  const BOOL = new Set(['json', 'help']);
33
38
 
@@ -128,7 +133,43 @@ async function run(argv, { say = console.log, cwd = process.cwd(), env = process
128
133
  if (!r.ok) say(`✗ ${r.error}`);
129
134
  return r.ok ? 0 : 1;
130
135
  }
136
+ if (sub === 'map' || SM_ACTS.includes(sub)) return mapCmd(sub, pos, flags, { say, root, json, fail, now });
131
137
  return fail(`pmos people ${sub} is not a command. ${USAGE[0]}`, 2);
132
138
  }
133
139
 
140
+ const SM_ACTS = ['keep', 'drop', 'told', 'undo'];
141
+ /** `pmos people map` and the four presses on one name (initiative stakeholder-map): the store the Work popup's People block reads. */
142
+ function mapCmd(sub, pos, flags, { say, root, json, fail, now }) {
143
+ const SM = require('./stakeholder-map.js');
144
+ const ini = String(pos[1] || '');
145
+ if (!ini) return fail(`usage: pmos people ${sub} <initiative>${sub === 'map' ? '' : ' <person>'}`, 2);
146
+ if (sub === 'map') {
147
+ const m = SM.read(root, ini, { now });
148
+ if (json) { say(JSON.stringify({ ok: true, ...m })); return 0; }
149
+ say(`People · ${m.title} · ${m.rows.length} ${m.rows.length === 1 ? 'name' : 'names'}${m.drafts ? ` · ${m.drafts} draft${m.drafts === 1 ? '' : 's'} to keep or drop` : ''}`);
150
+ if (!m.rows.length) { say('No names yet. PMOS lists the record\'s decider, the sign-offs and the people whose Jira, notes or mail name this initiative.'); return 0; }
151
+ for (const g of SM.GROUPS) {
152
+ const rows = m.rows.filter((r) => r.group === g);
153
+ if (!rows.length) continue;
154
+ say(SM.GROUP_WORD[g][0].toUpperCase() + SM.GROUP_WORD[g].slice(1) + ':');
155
+ for (const r of rows) {
156
+ const heard = r.days == null ? 'no update on record' : r.days === 0 ? 'last heard today' : `last heard ${r.days} day${r.days === 1 ? '' : 's'} ago`;
157
+ say(` ${r.name} (${r.id}) · ${heard}${r.kept ? '' : ' · draft: ' + r.why}`);
158
+ if (r.update) say(` ✦ draft update, for you to send: ${r.update}`);
159
+ }
160
+ }
161
+ return 0;
162
+ }
163
+ const who = String(pos.slice(2).join(' ') || '');
164
+ if (!who) return fail(`usage: pmos people ${sub} <initiative> <person>`, 2);
165
+ const m = SM.read(root, ini, { now });
166
+ const row = m.rows.find((r) => r.id === who.toLowerCase()) || m.rows.find((r) => SM.same(r.name, who));
167
+ const r = SM.act(SM.recordsDirOf(root), { ini, person: row ? row.id : null, name: row ? row.name : who, kind: sub, group: flags.group != null ? flags.group : sub === 'keep' && row ? row.group : undefined }, { by: 'pm', now });
168
+ if (json) { say(JSON.stringify(r)); return r.ok ? 0 : 1; }
169
+ if (!r.ok) return fail(r.error);
170
+ const word = { keep: `kept${r.line.group ? ' · ' + SM.GROUP_WORD[r.line.group] : ''}`, drop: 'taken off the map', told: 'marked: you sent them an update today', undo: 'your last press taken back' }[sub];
171
+ say(`✓ ${r.line.name || r.line.person} ${word}`);
172
+ return 0;
173
+ }
174
+
134
175
  module.exports = { run, COMMANDS, USAGE };
@@ -50,7 +50,7 @@ const VERBS = Object.freeze({
50
50
  help: 'pmos docs [list|link|unlink|find] … — is each linked document the same as, ahead of or behind its Google Docs and Confluence copy, and record a sync (pmos docs help)' }),
51
51
  // Not a pm-os-absorb verb (run: null): people-directory added it through the same table.
52
52
  people: Object.freeze({ module: 'people-cli.js', run: null, guide: 'cli.md',
53
- help: 'pmos people list|show|record|settings … — the people you work with in this repository (pmos people help)' }),
53
+ help: 'pmos people list|show|record|settings|map|keep|drop|told|undo … — the people you work with in this repository, and who decides on each initiative (pmos people help)' }),
54
54
  // Not a pm-os-absorb verb (run: null): initiative dry-run-tickets-before-build added it through the same table.
55
55
  signoff: Object.freeze({ module: 'signoff-cli.js', run: null, guide: 'cli.md',
56
56
  help: 'pmos signoff ask|answer|drop|evidence|list … — the sign-offs an initiative waits on; a stage\'s sign-offs are Your move rows on Today (pmos signoff help)' }),
@@ -157,12 +157,17 @@ const VERBS = Object.freeze({
157
157
  // Not a pm-os-absorb verb (run: null): initiative three-line-why (bet A86) added it through the same table.
158
158
  why: Object.freeze({ module: 'why-cli.js', run: null, guide: 'cli.md',
159
159
  help: 'pmos why <initiative or task> | coverage — why the work exists in three lines: goal, problem, evidence, read from its records (pmos why help)' }),
160
+ // Not a pm-os-absorb verb (run: null): initiative tradeoff-cards (job #1918, A325) added it through the same table.
161
+ tradeoff: Object.freeze({ module: 'tradeoff-cli.js', run: null, guide: 'cli.md',
162
+ help: 'pmos tradeoff [list|show|keep|undo|count] — two close items on the Roadmap side by side, and the reason you kept one first (pmos tradeoff help)' }),
160
163
  // Not a pm-os-absorb verb (run: null): initiative next-hire-draft (job #1876, A75) added it through the same table.
161
164
  // Not a pm-os-absorb verb (run: null): initiative starter-goals (job #1916, A84) added it through the same table.
162
165
  goals: Object.freeze({ module: 'goals-cli.js', run: null, guide: 'cli.md',
163
166
  help: 'pmos goals [starter|draft|keep <n>|drop <n>|undo] — starter goals PMOS drafts from your own product, each with its source; keep one and it becomes a goal (pmos goals help)' }),
164
167
  hire: Object.freeze({ module: 'hire-draft.js', run: null, guide: 'cli.md',
165
168
  help: 'pmos hire [draft|show|count] — the role your open work most needs, per person, and a one-page role brief PMOS drafts for you to edit (pmos hire help)' }),
169
+ prototype: Object.freeze({ module: 'prototype-cli.js', run: null, guide: 'cli.md',
170
+ help: 'pmos prototype findings|personas|persona … — where simulated users (one per persona) got stuck on a prototype, never a score, and the personas that walk it (pmos prototype help)' }),
166
171
  // Not a pm-os-absorb verb (run: null): initiative connector-data (job #1920, A150) added it through the same table.
167
172
  connectors: Object.freeze({ module: 'connectors-cli.js', run: null, guide: 'cli.md',
168
173
  help: 'pmos connectors data [<connector>] — what PMOS reads and writes through each connector, and what leaves this computer (pmos connectors help)' }),
@@ -202,6 +207,9 @@ const VERBS = Object.freeze({
202
207
  // Not a pm-os-absorb verb (run: null): initiative parked-reason-way-back (bet A446) added it through the same table.
203
208
  parked: Object.freeze({ module: 'parked-cli.js', run: null, guide: 'cli.md',
204
209
  help: 'pmos parked list|hold|back|coverage — parked initiatives: why each is parked, what brings it back, and bringing it back (pmos parked help)' }),
210
+ // Not a pm-os-absorb verb (run: null): initiative team-waits (bet A364) added it through the same table.
211
+ deps: Object.freeze({ module: 'deps-cli.js', run: null, guide: 'cli.md',
212
+ help: 'pmos deps waits|wait|done|undo — what your work waits on outside the team, oldest first (Work › Dependencies; pmos deps help)' }),
205
213
  // Not a pm-os-absorb verb (run: null): initiative quiet-work-sweep (bet A503) added it through the same table.
206
214
  quiet: Object.freeze({ module: 'quiet-cli.js', run: null, guide: 'cli.md',
207
215
  help: 'pmos quiet list|keep|park|close|undo — the weekly sweep of initiatives quiet 30 days or more: keep, park or close each (pmos quiet help)' }),
@@ -213,6 +221,9 @@ const VERBS = Object.freeze({
213
221
  driver: Object.freeze({ module: 'driver-cli.js', run: null, guide: 'cli.md',
214
222
  help: 'pmos driver propose|status|exits|keep|return|drop|undo|pause|resume|mode … — the Initiative Driver: class A and B changes apply with Undo, the rest wait for you (pmos driver help)' }),
215
223
  // one-change-record-no-source-no-auto: everything PMOS changed by itself, in one record (lib/change-record.js)
224
+ // Not a pm-os-absorb verb (run: null): initiative portfolio (bet A56) added it through the same table.
225
+ portfolio: Object.freeze({ module: 'portfolio-cli.js', run: null, guide: 'cli.md',
226
+ help: 'pmos portfolio [--json] | keep|not-now|undo <key> — every product side by side: bets, odds, spend, outcome so far, and one recommendation (pmos portfolio help)' }),
216
227
  health: Object.freeze({ module: 'product-health-cli.js', run: null, guide: 'cli.md',
217
228
  help: 'pmos health [score|trend|drops] — this product\'s health score (0 to 100), its trend this month and its past drops (pmos health help)' }),
218
229
  // Not a pm-os-absorb verb (run: null): initiative setup-station (product line slice 5) added it through the same table.
@@ -243,6 +254,9 @@ const VERBS = Object.freeze({
243
254
  // Not a pm-os-absorb verb (run: null): feedback batch 25 item 1 added it through the same table.
244
255
  'git-identity': Object.freeze({ module: 'git-identity-cli.js', run: null, guide: 'cli.md',
245
256
  help: 'pmos git-identity [set --name <n> --email <e> --login <gh>] — which git identity and GitHub login this repository uses; save your choice for it' }),
257
+ // Not a pm-os-absorb verb (run: null): initiative review-reasons (job #1913, A427) added it through the same table.
258
+ voice: Object.freeze({ module: 'voice-cli.js', run: null, guide: 'cli.md',
259
+ help: 'pmos voice add|import|reason|list|file|undo|count — survey comments and app-store reviews grouped by reason; Work shows them as Customer voice (pmos voice help)' }),
246
260
  // Not a pm-os-absorb verb (run: null): roadmap-signal-verb (bet A157) added it through the same table.
247
261
  signal: Object.freeze({ module: 'signal-cli.js', run: null, guide: 'cli.md',
248
262
  help: 'pmos signal add|remove|list|count — the customer signals behind each roadmap item; Work shows the count (pmos signal help)' }),