create-pmos 0.828.0 → 0.830.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.
- package/package.json +237 -35
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/board-deliveries-test.js +2 -2
- package/workspace/briefing-premium-board-test.js +1 -1
- package/workspace/briefing-premium-insights-test.js +1 -1
- package/workspace/changelog.json +236 -8
- package/workspace/guide/agent-capabilities.md +1 -1
- package/workspace/guide/backlog.md +12 -1
- package/workspace/guide/cli.md +46 -1
- package/workspace/guide/home.md +2 -1
- package/workspace/guide/layout.md +1 -0
- package/workspace/guide/settings-and-switches.md +1 -0
- package/workspace/lib/board-premium.js +1 -0
- package/workspace/lib/code-map.js +8 -2
- package/workspace/lib/critical-needs.js +162 -0
- package/workspace/lib/deps-cli.js +102 -0
- package/workspace/lib/engine/boards.js +13 -2
- package/workspace/lib/factory-floor.js +16 -8
- package/workspace/lib/features.json +17 -13
- package/workspace/lib/needs-providers.js +1 -0
- package/workspace/lib/page-one-answer.js +86 -0
- package/workspace/lib/pages-cli.js +6 -2
- package/workspace/lib/people-cli.js +9 -1
- package/workspace/lib/people-prep.js +140 -0
- package/workspace/lib/pmos-verbs.js +10 -0
- package/workspace/lib/print-cli.js +49 -0
- package/workspace/lib/print-pdf.js +96 -0
- package/workspace/lib/prototype-cli.js +86 -0
- package/workspace/lib/report-cli.js +12 -2
- package/workspace/lib/report-readers.js +5 -3
- package/workspace/lib/review-pack.js +348 -0
- package/workspace/lib/review-reasons.js +121 -9
- package/workspace/lib/route-modules.js +5 -0
- package/workspace/lib/routes-boards.js +25 -2
- package/workspace/lib/routes-report-design.js +3 -1
- package/workspace/lib/routes-review-pack.js +42 -0
- package/workspace/lib/routes-roadmap-ops.js +53 -1
- package/workspace/lib/routes-sim-users.js +66 -0
- package/workspace/lib/routes-skill-map.js +39 -0
- package/workspace/lib/routes-strategy-card.js +13 -6
- package/workspace/lib/routes-team-waits.js +24 -0
- package/workspace/lib/sim-users.js +329 -0
- package/workspace/lib/skill-map.js +199 -0
- package/workspace/lib/task-store.js +1 -1
- package/workspace/lib/team-cli.js +20 -1
- package/workspace/lib/team-waits.js +167 -0
- package/workspace/lib/tradeoff-cards.js +258 -0
- package/workspace/lib/tradeoff-cli.js +83 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/action-keys.js +1 -0
- package/workspace/public/pm/ask-here-ctx.js +25 -1
- package/workspace/public/pm/ask-here.css +7 -0
- package/workspace/public/pm/ask-here.js +15 -2
- package/workspace/public/pm/bd-backlog.css +61 -0
- package/workspace/public/pm/bd-backlog.js +99 -7
- package/workspace/public/pm/bd-work.js +12 -1
- package/workspace/public/pm/code-map.js +15 -4
- package/workspace/public/pm/cozy-board.css +5 -1
- package/workspace/public/pm/cozy-library.css +5 -0
- package/workspace/public/pm/cozy-pop-work.js +4 -1
- package/workspace/public/pm/cozy-proto.css +5 -0
- package/workspace/public/pm/cozy-proto.js +11 -3
- package/workspace/public/pm/cozy-search.js +2 -2
- package/workspace/public/pm/cozy-today-app.js +5 -2
- package/workspace/public/pm/day-time.js +8 -0
- package/workspace/public/pm/factory.js +199 -0
- package/workspace/public/pm/home-ini.js +3 -2
- package/workspace/public/pm/ini-links.js +2 -1
- package/workspace/public/pm/ini-tasks.js +5 -2
- package/workspace/public/pm/ini-view-model.js +14 -6
- package/workspace/public/pm/ini-view.js +12 -2
- package/workspace/public/pm/library-model.js +1 -1
- package/workspace/public/pm/page-one-answer.css +18 -0
- package/workspace/public/pm/page-one-answer.js +134 -0
- package/workspace/public/pm/pop-cap.js +5 -3
- package/workspace/public/pm/pop-work-model.js +8 -6
- package/workspace/public/pm/portfolio.js +1 -1
- package/workspace/public/pm/premium-board.js +23 -6
- package/workspace/public/pm/premium-library.js +27 -3
- package/workspace/public/pm/premium-report-read.js +11 -2
- package/workspace/public/pm/print-pdf.js +191 -0
- package/workspace/public/pm/range-pick.css +12 -0
- package/workspace/public/pm/range-pick.js +30 -6
- package/workspace/public/pm/review-pack.js +47 -0
- package/workspace/public/pm/review-reasons.js +19 -5
- package/workspace/public/pm/sim-users.js +34 -0
- package/workspace/public/pm/skill-map.js +57 -0
- package/workspace/public/pm/sort-order.js +3 -0
- package/workspace/public/pm/task-card.js +10 -7
- package/workspace/public/pm/team-waits.js +56 -0
- package/workspace/public/pm/tradeoff-cards.css +27 -0
- package/workspace/public/pm/tradeoff-cards.js +183 -0
- package/workspace/public/premium-board.html +3 -0
- package/workspace/public/today.html +1 -0
- package/workspace/run-tests.js +9 -1
- package/workspace/test-lists/critical-needs.json +9 -0
- package/workspace/test-lists/factory-page-ui.json +9 -0
- package/workspace/test-lists/page-one-answer.json +9 -0
- package/workspace/test-lists/people-prep.json +9 -0
- package/workspace/test-lists/print-pdf.json +9 -0
- package/workspace/test-lists/review-pack.json +9 -0
- package/workspace/test-lists/sim-users.json +9 -0
- package/workspace/test-lists/skill-map.json +9 -0
- package/workspace/test-lists/surface-ask-card.json +9 -0
- package/workspace/test-lists/task-time-optional.json +9 -0
- package/workspace/test-lists/team-waits.json +9 -0
- package/workspace/test-lists/tradeoff-cards.json +9 -0
- package/workspace/test-lists/voice-files.json +9 -0
- package/workspace/test-timings.json +25 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* critical-needs.js — a Today row when a task on an initiative's critical path moves (initiative critical-moved, bet A103;
|
|
3
|
+
* done test planning/done-tests/critical-moved.md).
|
|
4
|
+
*
|
|
5
|
+
* movesOf(lines, { today, days }) → Map uid → { field, from, to, at } each task's latest start or due move in the window
|
|
6
|
+
* rowsOf(ws, { today, snapshot, lines, days }) → rows the needs rows, pure (the tests call it)
|
|
7
|
+
* needs provider: kinds ['critical-move'] · rowsFor(w, { lead }) · sig(w)
|
|
8
|
+
* count(root, { days, today }) → number the health number: rows raised in the window
|
|
9
|
+
*
|
|
10
|
+
* THE RULE. kind-control.js works out each initiative's critical path: the tasks that hold go-live tight through their links. When one of
|
|
11
|
+
* those tasks moved its start or its due date in the last `days` days (7), the PM gets ONE row for it, naming the task, the old and the new
|
|
12
|
+
* date, the initiative and what go-live now forecasts. A move off the critical path says nothing. A task's first dates are not a move.
|
|
13
|
+
* An initiative with no links into go-live has no critical path, so it says nothing either.
|
|
14
|
+
*
|
|
15
|
+
* WHERE THE DATES COME FROM. The tasks and links come from lib/rehearse-read.js snapshotOf (the readers the pmos verbs use). The moves come
|
|
16
|
+
* from the three task ledgers lib/routes-kind-control.js reads for the baseline: the task store, the plan-items ledger and the Board's task
|
|
17
|
+
* lines. A line names a task (`task` or `item`) and a `start` or `due`, at the top or under `fields`. Never a typed status.
|
|
18
|
+
*/
|
|
19
|
+
const fs = require('fs');
|
|
20
|
+
const path = require('path');
|
|
21
|
+
const KC = require('./kind-control.js');
|
|
22
|
+
const TL = require('./task-links.js');
|
|
23
|
+
|
|
24
|
+
const NAME = 'critical-needs';
|
|
25
|
+
const KIND = 'critical-move';
|
|
26
|
+
const TAG = '[critical-moved]';
|
|
27
|
+
const DAYS = 7;
|
|
28
|
+
const clip = (s, n) => String(s == null ? '' : s).replace(/\s+/g, ' ').trim().slice(0, n);
|
|
29
|
+
const todayOf = (now = Date.now()) => new Date(now).toISOString().slice(0, 10);
|
|
30
|
+
const WORD = { start: 'start', due: 'due' };
|
|
31
|
+
|
|
32
|
+
function readJsonl(file) {
|
|
33
|
+
let text = '';
|
|
34
|
+
try { text = fs.readFileSync(file, 'utf8'); } catch { return []; }
|
|
35
|
+
const out = [];
|
|
36
|
+
for (const raw of text.split('\n')) { if (!raw.trim()) continue; try { out.push(JSON.parse(raw)); } catch { /* a torn line */ } }
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Each task's latest start or due move whose line is dated in the last `days` days. A line that sets a field for the first time is not a
|
|
41
|
+
* move; a line that repeats the same value is not a move. Lines are read oldest first. */
|
|
42
|
+
function movesOf(lines, { today = todayOf(), days = DAYS } = {}) {
|
|
43
|
+
const since = TL.dn(today) - days;
|
|
44
|
+
const last = new Map(), moves = new Map();
|
|
45
|
+
const sorted = (lines || []).filter((e) => e && typeof e === 'object').slice().sort((a, b) => String(a.at || '').localeCompare(String(b.at || '')));
|
|
46
|
+
for (const e of sorted) {
|
|
47
|
+
const id = typeof e.task === 'string' ? e.task : typeof e.item === 'string' ? e.item : null;
|
|
48
|
+
if (!id) continue;
|
|
49
|
+
const f = e.fields && typeof e.fields === 'object' ? e.fields : e;
|
|
50
|
+
const was = last.get(id) || {};
|
|
51
|
+
const now = { ...was };
|
|
52
|
+
for (const k of ['start', 'due']) {
|
|
53
|
+
const v = typeof f[k] === 'string' && TL.dn(f[k]) != null ? f[k].slice(0, 10) : undefined;
|
|
54
|
+
if (v === undefined) continue;
|
|
55
|
+
if (was[k] && was[k] !== v) {
|
|
56
|
+
const at = String(e.at || '');
|
|
57
|
+
const d = TL.dn(at.slice(0, 10));
|
|
58
|
+
if (d != null && d >= since && d <= TL.dn(today)) moves.set(id, { field: k, from: was[k], to: v, at });
|
|
59
|
+
}
|
|
60
|
+
now[k] = v;
|
|
61
|
+
}
|
|
62
|
+
last.set(id, now);
|
|
63
|
+
}
|
|
64
|
+
return moves;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** The needs rows for one workspace, from a snapshot (rehearse-read.js shape) and the task ledger lines. Pure. */
|
|
68
|
+
function rowsOf(ws, { today = todayOf(), snapshot, lines, days = DAYS } = {}) {
|
|
69
|
+
const snap = snapshot || {};
|
|
70
|
+
const moves = movesOf(lines, { today, days });
|
|
71
|
+
if (!moves.size) return [];
|
|
72
|
+
const out = [];
|
|
73
|
+
for (const row of snap.rows || []) {
|
|
74
|
+
if (!row || !row.id) continue;
|
|
75
|
+
const tasks = (snap.tasks || []).filter((x) => x && x.ini === row.id);
|
|
76
|
+
if (!tasks.some((x) => moves.has(x.uid || x.key))) continue;
|
|
77
|
+
const goal = (snap.goals || []).find((g) => (g.moves || []).includes(row.id)) || null;
|
|
78
|
+
const m = KC.project({ today, title: row.title || row.id, goal: goal ? { id: goal.id, title: goal.title, byAt: goal.byAt } : null, end: row.end || null,
|
|
79
|
+
record: {}, tasks, links: snap.links || [] });
|
|
80
|
+
for (const r of m.rows) {
|
|
81
|
+
if (!r.critical) continue;
|
|
82
|
+
const mv = moves.get(r.uid);
|
|
83
|
+
if (!mv) continue;
|
|
84
|
+
const title = clip(row.title || row.id, 80);
|
|
85
|
+
const goLive = m.goLive && m.goLive.due ? TL.md(TL.dn(m.goLive.due)) : '';
|
|
86
|
+
const effect = goLive ? `, so go-live forecasts ${goLive}` : '';
|
|
87
|
+
const track = m.ontrack && (m.ontrack.answer === 'yes' || m.ontrack.answer === 'no') ? ' ' + m.ontrack.words : '';
|
|
88
|
+
const cause = `"${clip(r.title, 80)}" moved its ${WORD[mv.field]} from ${TL.md(TL.dn(mv.from))} to ${TL.md(TL.dn(mv.to))}. It is on the critical path of ${title}${effect}.${track}`;
|
|
89
|
+
out.push({
|
|
90
|
+
run_id: `${NAME}:${ws}:${row.id}:${r.uid}:${mv.at}`, kind: KIND, initiative_id: row.id, question: cause, doc: null, ws,
|
|
91
|
+
today: { kind: 7, source: NAME, cause, evidence: `Task dates and links · moved ${mv.at.slice(0, 10)} · critical path ${m.critical.length} tasks`, act: { label: 'Open' } },
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return out;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** The task ledger lines of a repository (the three routes-kind-control.js reads for the baseline). */
|
|
99
|
+
function linesOf(root, stateDir) {
|
|
100
|
+
const lines = [];
|
|
101
|
+
try { const s = require('./task-store.js').storeFor(root); if (s) lines.push(...readJsonl(s.file)); } catch { /* none */ }
|
|
102
|
+
try { lines.push(...readJsonl(require('./plan-ledgers.js').ledgerPath(root, 'plan-items'))); } catch { /* none */ }
|
|
103
|
+
if (stateDir) {
|
|
104
|
+
try { const f = require('./routes-boards.js').ledgerFile({ stateDirFor: () => stateDir }, { root }); if (f) lines.push(...readJsonl(f).filter((e) => e && (e.kind === 'task' || e.kind === 'task-update'))); } catch { /* none */ }
|
|
105
|
+
}
|
|
106
|
+
return lines;
|
|
107
|
+
}
|
|
108
|
+
function stateDirOf(root) { try { return require('./driver.js').stateDirOf(root) || null; } catch { return null; } }
|
|
109
|
+
|
|
110
|
+
function read(root, { today = todayOf(), days = DAYS } = {}) {
|
|
111
|
+
const stateDir = stateDirOf(root);
|
|
112
|
+
const lines = linesOf(root, stateDir);
|
|
113
|
+
if (!movesOf(lines, { today, days }).size) return { lines, snapshot: null }; // no move in the window: the snapshot is not read
|
|
114
|
+
let snapshot;
|
|
115
|
+
try { snapshot = require('./rehearse-read.js').snapshotOf(root, { today, stateDir: stateDir || undefined }); } catch { snapshot = null; }
|
|
116
|
+
return { lines, snapshot };
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* ── the needs provider (lib/needs-providers.js) ─────────────────────────────────────────────────────────────────── */
|
|
120
|
+
const said = new Set(); // a row's id, logged once per process
|
|
121
|
+
function rowsFor(w, { lead } = {}) {
|
|
122
|
+
if (!lead || !w || !w.root) return [];
|
|
123
|
+
const today = todayOf();
|
|
124
|
+
const { lines, snapshot } = read(w.root, { today });
|
|
125
|
+
if (!snapshot) return [];
|
|
126
|
+
const rows = rowsOf(w.id, { today, snapshot, lines });
|
|
127
|
+
for (const r of rows) { if (said.has(r.run_id)) continue; said.add(r.run_id); console.info(`${TAG} ${r.initiative_id}: ${r.question}`); }
|
|
128
|
+
return rows;
|
|
129
|
+
}
|
|
130
|
+
// the date is in the signature: a move leaves the 7-day window at midnight with no change to a ledger
|
|
131
|
+
function sig(w) {
|
|
132
|
+
if (!w || !w.root) return '';
|
|
133
|
+
const files = [];
|
|
134
|
+
try { const s = require('./task-store.js').storeFor(w.root); if (s) files.push(s.file); } catch { /* none */ }
|
|
135
|
+
try { files.push(require('./plan-ledgers.js').ledgerPath(w.root, 'plan-items')); } catch { /* none */ }
|
|
136
|
+
const d = stateDirOf(w.root);
|
|
137
|
+
if (d) { files.push(path.join(d, 'boards.jsonl')); files.push(TL.ledgerFile(d)); }
|
|
138
|
+
return files.map((f) => { try { const st = fs.statSync(f); return st.size + ':' + st.mtimeMs; } catch { return '-'; } }).join('|') + '@' + todayOf();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** The health number: the rows the provider raises for `root` in the window. */
|
|
142
|
+
function count(root, { days = DAYS, today = todayOf() } = {}) {
|
|
143
|
+
const { lines, snapshot } = read(root, { today, days });
|
|
144
|
+
return snapshot ? rowsOf('count', { today, snapshot, lines, days }).length : 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** `node lib/critical-needs.js count <root> [--days N]`: the health number on the last line. → exit code */
|
|
148
|
+
function cli(argv, log = console.log) {
|
|
149
|
+
const [cmd, rootArg, ...rest] = argv;
|
|
150
|
+
if (cmd !== 'count') { log('usage: node lib/critical-needs.js count <root> [--days N]'); return 2; }
|
|
151
|
+
const root = path.resolve(rootArg || '.');
|
|
152
|
+
const i = rest.indexOf('--days');
|
|
153
|
+
const days = i >= 0 ? Math.max(1, parseInt(rest[i + 1], 10) || DAYS) : DAYS;
|
|
154
|
+
const n = count(root, { days });
|
|
155
|
+
log(`${TAG} ${n} critical-path date moves raised a Today row in the last ${days} days`);
|
|
156
|
+
log(String(n));
|
|
157
|
+
return 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
module.exports = { kinds: [KIND], rowsFor, sig, NAME, KIND, TAG, DAYS, movesOf, rowsOf, linesOf, count, cli };
|
|
161
|
+
|
|
162
|
+
if (require.main === module) process.exitCode = cli(process.argv.slice(2));
|
|
@@ -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
|
};
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* load(root) → the saved snapshot | null reads one file, folds nothing
|
|
19
19
|
* ageMinutes(root, now) → whole minutes since the snapshot was saved, or -1 (the health number)
|
|
20
20
|
*
|
|
21
|
-
* THE SNAPSHOT { v: 1, at, ws, name, days, from, stations: [{ key, name, waiting, made, undone, minutes,
|
|
22
|
-
* runs, tokens: null, money: null, usage: 'not recorded yet' }
|
|
21
|
+
* THE SNAPSHOT { v: 1, at, ws, name, days, from, stations: [{ key, name, waiting, made, undone, minutes, runs, items, madeItems }],
|
|
22
|
+
* unplaced: { made, minutes }, runs, lastRun, tokens: null, money: null, usage: 'not recorded yet' }
|
|
23
23
|
* waiting what waits at the station now. Intake to Evaluate: the initiatives and Work tasks whose agent blocker of the latest sweep day
|
|
24
24
|
* belongs to it (one per target). Check: the Driver drafts of ended runs the Checker has not graded yet. You: the open sign-offs
|
|
25
25
|
* and the Driver drafts that have waited on the PM for a day (pm-open).
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
* minutes PMOS minutes of the Driver's runs that ended in the window (run-start to run-end), split evenly over the stations of what each
|
|
31
31
|
* run filed; a run that filed nothing counts for the station of the blocker that woke it; else it is unplaced.
|
|
32
32
|
* items up to MAX_ITEMS waiting items: { kind, id, title, code, text }, what each one waits on.
|
|
33
|
+
* madeItems the newest MAX_MADE change rows it made: { ref, title, at, state, ini, undo } (undo: the Factory page offers Undo on it).
|
|
34
|
+
* runs the Driver runs whose minutes went to the station. lastRun: when the newest run of the window ended (the page's status line).
|
|
33
35
|
* tokens and money stay null ("not recorded yet") until each run records its usage (a later slice). An honest gap, never a guess.
|
|
34
36
|
*
|
|
35
37
|
* Every log line carries [factory-floor]. Nothing here sends anything, and the factory graph never writes it (D65): the server writes it
|
|
@@ -41,6 +43,9 @@ const FILE = 'factory-floor.json';
|
|
|
41
43
|
const DAY = 86400000;
|
|
42
44
|
const DAYS = 7;
|
|
43
45
|
const MAX_ITEMS = 50;
|
|
46
|
+
const MAX_MADE = 30; // the station popup's "Made this week": the newest 30 rows (factory-page-ui)
|
|
47
|
+
// a change the PM can undo from the station popup (POST /api/autonomy/undo): applied by PMOS, inside its Undo, with a ref that route knows
|
|
48
|
+
const canUndo = (r) => r.state === 'applied' && /^(p|pk|im)-/.test(String(r.ref || ''));
|
|
44
49
|
const LOG = '[factory-floor]';
|
|
45
50
|
const NOT_RECORDED = 'not recorded yet';
|
|
46
51
|
const STATIONS = Object.freeze([
|
|
@@ -88,7 +93,7 @@ function compute(input = {}, { now = Date.now(), days = DAYS, ws = null, name =
|
|
|
88
93
|
const CR = require('./change-record.js');
|
|
89
94
|
const from = now - days * DAY;
|
|
90
95
|
const inWin = (at) => { const t = ms(at); return t != null && t >= from && t <= now + 60000; };
|
|
91
|
-
const st = new Map(STATIONS.map((s) => [s.key, { key: s.key, name: s.name, waiting: 0, made: 0, undone: 0, minutes: 0, items: [], _targets: new Set() }]));
|
|
96
|
+
const st = new Map(STATIONS.map((s) => [s.key, { key: s.key, name: s.name, waiting: 0, made: 0, undone: 0, minutes: 0, runs: 0, items: [], madeItems: [], _targets: new Set() }]));
|
|
92
97
|
const unplaced = { made: 0, minutes: 0 };
|
|
93
98
|
const wait = (key, item) => {
|
|
94
99
|
const s = st.get(key);
|
|
@@ -110,6 +115,7 @@ function compute(input = {}, { now = Date.now(), days = DAYS, ws = null, name =
|
|
|
110
115
|
const s = st.get(key);
|
|
111
116
|
s.made++;
|
|
112
117
|
if (r.state === 'undone') s.undone++;
|
|
118
|
+
s.madeItems.push({ ref: r.ref || null, title: one(r.title || r.job, 120), at: r.at, state: r.state, ini: r.ini || null, undo: canUndo(r) });
|
|
113
119
|
}
|
|
114
120
|
for (const l of Array.isArray(input.bgQueue) ? input.bgQueue : []) {
|
|
115
121
|
if (!isObj(l) || l.kind !== 'done' || !inWin(l.at) || (ws && l.ws && l.ws !== ws)) continue;
|
|
@@ -154,12 +160,13 @@ function compute(input = {}, { now = Date.now(), days = DAYS, ws = null, name =
|
|
|
154
160
|
|
|
155
161
|
// MINUTES: the Driver's runs that ended in the window
|
|
156
162
|
const wakeOf = new Map(state.wakes.map((w) => [w.key, w]));
|
|
157
|
-
let runs = 0;
|
|
163
|
+
let runs = 0, lastRun = null;
|
|
158
164
|
for (const r of state.runs.values()) {
|
|
159
165
|
if (!r.end || !inWin(r.end)) continue;
|
|
160
166
|
const t0 = ms(r.start), t1 = ms(r.end);
|
|
161
167
|
if (t0 == null || t1 == null || t1 < t0) continue;
|
|
162
168
|
runs++;
|
|
169
|
+
if (!lastRun || t1 > ms(lastRun)) lastRun = new Date(t1).toISOString();
|
|
163
170
|
const mins = (t1 - t0) / 60000;
|
|
164
171
|
let keys = [...new Set([...state.proposals.values()].filter((p) => p.run === r.run).map((p) => stationOfJob('driver:' + p.what, { kind: p.target.kind })).filter(Boolean))];
|
|
165
172
|
if (!keys.length) {
|
|
@@ -170,12 +177,13 @@ function compute(input = {}, { now = Date.now(), days = DAYS, ws = null, name =
|
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
179
|
if (!keys.length) { unplaced.minutes += mins; continue; }
|
|
173
|
-
for (const k of keys) st.get(k).minutes += mins / keys.length;
|
|
180
|
+
for (const k of keys) { st.get(k).minutes += mins / keys.length; st.get(k).runs++; }
|
|
174
181
|
}
|
|
175
182
|
|
|
176
|
-
const
|
|
183
|
+
const newest = (a, b) => String(b.at || '').localeCompare(String(a.at || ''));
|
|
184
|
+
const stations = [...st.values()].map(({ _targets, ...s }) => ({ ...s, minutes: Math.round(s.minutes), madeItems: s.madeItems.sort(newest).slice(0, MAX_MADE) }));
|
|
177
185
|
return { v: 1, at: new Date(now).toISOString(), ws, name, days, from: new Date(from).toISOString(), stations,
|
|
178
|
-
unplaced: { made: unplaced.made, minutes: Math.round(unplaced.minutes) }, runs, tokens: null, money: null, usage: NOT_RECORDED };
|
|
186
|
+
unplaced: { made: unplaced.made, minutes: Math.round(unplaced.minutes) }, runs, lastRun, tokens: null, money: null, usage: NOT_RECORDED };
|
|
179
187
|
}
|
|
180
188
|
|
|
181
189
|
/* ── the read (no write) ── */
|
|
@@ -234,7 +242,7 @@ function ageMinutes(root, now = Date.now()) {
|
|
|
234
242
|
return t == null ? -1 : Math.max(0, Math.floor((now - t) / 60000));
|
|
235
243
|
}
|
|
236
244
|
|
|
237
|
-
module.exports = { STATIONS, WHAT_STATION, GROUP_STATION, RUN_STATION, CODE_STATION, FILE, DAYS, LOG, NOT_RECORDED, MAX_ITEMS,
|
|
245
|
+
module.exports = { STATIONS, WHAT_STATION, GROUP_STATION, RUN_STATION, CODE_STATION, FILE, DAYS, LOG, NOT_RECORDED, MAX_ITEMS, MAX_MADE,
|
|
238
246
|
stationOfJob, stationOfCode, compute, read, build, fileOf, save, load, ageMinutes };
|
|
239
247
|
|
|
240
248
|
// `node lib/factory-floor.js age <checkout>`: the health number, minutes since the snapshot was saved (-1 when there is none)
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
{
|
|
2
|
-
"about": "The user features of PMOS, one row each, for the chat's / menu, the typed-words suggestion, the What PMOS can do directory, Ctrl+K and the ? sheet (initiative feature-directory). Only audience user rows are shown. A row with cmd names a pmos verb (lib/pmos-verbs.js) that its prompt runs; place is a page key of the menu (pm/cozy-nav.js). since is the first version that has the feature. features.test.js F1 checks every row.",
|
|
2
|
+
"about": "The user features of PMOS, one row each, for the chat's / menu, the typed-words suggestion, the What PMOS can do directory, Ctrl+K and the ? sheet (initiative feature-directory). Only audience user rows are shown. A row with cmd names a pmos verb (lib/pmos-verbs.js) that its prompt runs; place is a page key of the menu (pm/cozy-nav.js). since is the first version that has the feature. ask lists the record kinds the Ask card offers the feature on (pm/ask-here-ctx.js actionsOf: one press asks it about the pressed record). features.test.js F1 checks every row.",
|
|
3
3
|
"groups": ["Plan and decide", "Before you ship", "Catch up", "Your product", "What PMOS did", "Find your way"],
|
|
4
4
|
"features": [
|
|
5
5
|
{"id": "goal", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Give PMOS a goal", "say": "PMOS asks a few questions, then works on the goal after you press Start.", "cmd": "/goal", "phrases": ["work on this until", "keep going until", "make it happen"], "since": "0.560.0"},
|
|
6
|
-
{"id": "why", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Why this work exists", "say": "Three lines on an initiative or a task: its goal, its problem and the evidence.", "cmd": "/why", "verb": "why", "hint": "<initiative or task>", "phrases": ["why does this exist", "why are we doing", "why are we building", "what is the point of", "reason for this work", "why this initiative"], "phone": true, "since": "0.700.0"},
|
|
6
|
+
{"id": "why", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Why this work exists", "say": "Three lines on an initiative or a task: its goal, its problem and the evidence.", "cmd": "/why", "verb": "why", "hint": "<initiative or task>", "phrases": ["why does this exist", "why are we doing", "why are we building", "what is the point of", "reason for this work", "why this initiative"], "phone": true, "since": "0.700.0", "ask": ["initiative", "task"]},
|
|
7
7
|
{"id": "rehearse", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Rehearse a change", "say": "Move a task by some days and see what else slips, before anything changes.", "cmd": "/rehearse", "verb": "rehearse", "sub": "move", "hint": "<task> <days>", "place": "board", "phrases": ["what if slips", "what happens if slips", "what if move", "push back", "delay by", "slips a week", "what breaks if", "move the date", "what if we cut"], "since": "0.600.0"},
|
|
8
8
|
{"id": "decisions", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Decision journal", "say": "Write one line per decision, with what you expect and the date to check it.", "cmd": "/decide", "verb": "decisions", "sub": "add", "hint": "<the decision>", "phrases": ["we decided", "log a decision", "record a decision", "note the decision", "decision journal", "list decisions"], "since": "0.640.0"},
|
|
9
9
|
{"id": "questions", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Open questions", "say": "Every question nobody has answered yet, oldest first, in one list.", "cmd": "/questions", "verb": "questions", "phrases": ["open questions", "unanswered questions", "what is still open", "questions nobody answered", "what do we not know"], "phone": true, "since": "0.660.0"},
|
|
10
|
-
{"id": "press-release", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Press release and FAQ", "say": "A one-page press release and FAQ for a bet, drafted from its record, for you to edit.", "cmd": "/press-release", "verb": "press-release", "hint": "<initiative>", "phrases": ["press release", "working backwards", "write the faq", "announce this"], "since": "0.690.0"},
|
|
11
|
-
{"id": "launch", "audience": "user", "status": "ga", "group": "Before you ship", "name": "What is not ready", "say": "Before a launch date: the tasks, sign-offs and documents still open.", "cmd": "/launch", "verb": "launch", "sub": "check", "hint": "<initiative>", "phrases": ["ready to launch", "what is not ready", "before launch", "launch checklist", "can we ship", "ready to ship", "is it ready for launch"], "since": "0.650.0"},
|
|
12
|
-
{"id": "ready", "audience": "user", "status": "ga", "group": "Before you ship", "name": "Ready for engineers", "say": "The five basics the engineers need before the tickets go to them.", "cmd": "/ready", "verb": "ready", "sub": "check", "hint": "<initiative>", "phrases": ["ready for engineering", "ready for engineers", "ready for dev", "hand over to engineers", "ready for development"], "since": "0.650.0"},
|
|
13
|
-
{"id": "critic", "audience": "user", "status": "ga", "group": "Before you ship", "name": "Critic before you share", "say": "Reads a document as a sceptical reviewer and lists the hardest questions.", "cmd": "/critic", "verb": "critic", "hint": "<document>", "phrases": ["poke holes", "review this doc", "critique this", "before I share", "hardest questions", "sceptical review", "skeptical review", "what would they ask"], "since": "0.680.0"},
|
|
10
|
+
{"id": "press-release", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Press release and FAQ", "say": "A one-page press release and FAQ for a bet, drafted from its record, for you to edit.", "cmd": "/press-release", "verb": "press-release", "hint": "<initiative>", "phrases": ["press release", "working backwards", "write the faq", "announce this"], "since": "0.690.0", "ask": ["initiative"]},
|
|
11
|
+
{"id": "launch", "audience": "user", "status": "ga", "group": "Before you ship", "name": "What is not ready", "say": "Before a launch date: the tasks, sign-offs and documents still open.", "cmd": "/launch", "verb": "launch", "sub": "check", "hint": "<initiative>", "phrases": ["ready to launch", "what is not ready", "before launch", "launch checklist", "can we ship", "ready to ship", "is it ready for launch"], "since": "0.650.0", "ask": ["initiative"]},
|
|
12
|
+
{"id": "ready", "audience": "user", "status": "ga", "group": "Before you ship", "name": "Ready for engineers", "say": "The five basics the engineers need before the tickets go to them.", "cmd": "/ready", "verb": "ready", "sub": "check", "hint": "<initiative>", "phrases": ["ready for engineering", "ready for engineers", "ready for dev", "hand over to engineers", "ready for development"], "since": "0.650.0", "ask": ["initiative"]},
|
|
13
|
+
{"id": "critic", "audience": "user", "status": "ga", "group": "Before you ship", "name": "Critic before you share", "say": "Reads a document as a sceptical reviewer and lists the hardest questions.", "cmd": "/critic", "verb": "critic", "hint": "<document>", "phrases": ["poke holes", "review this doc", "critique this", "before I share", "hardest questions", "sceptical review", "skeptical review", "what would they ask"], "since": "0.680.0", "ask": ["document"]},
|
|
14
14
|
{"id": "missed", "audience": "user", "status": "ga", "group": "Catch up", "name": "What you might have missed", "say": "What each of the last weeks would have shown you, in one list.", "cmd": "/missed", "verb": "drift", "sub": "show", "phrases": ["what did I miss", "what have I missed", "catch me up", "while I was away", "what changed this week", "what changed since"], "phone": true, "since": "0.620.0"},
|
|
15
15
|
{"id": "past", "audience": "user", "status": "ga", "group": "Catch up", "name": "Ask about the past", "say": "The decisions, notes and records that answer a question, each with its source.", "cmd": "/past", "verb": "past", "sub": "ask", "hint": "<question>", "phrases": ["when did we decide", "why did we decide", "who decided", "what did we agree", "last time we", "history of"], "phone": true, "since": "0.630.0"},
|
|
16
16
|
{"id": "parked", "audience": "user", "status": "ga", "group": "Catch up", "name": "Parked work", "say": "Each initiative on hold, why it is parked and what brings it back.", "cmd": "/parked", "verb": "parked", "sub": "list", "phrases": ["parked work", "what is on hold", "what is parked", "paused initiatives"], "since": "0.700.0"},
|
|
17
17
|
{"id": "people", "audience": "user", "status": "ga", "group": "Catch up", "name": "People you work with", "say": "Each person with their role, how often you talk and their tone.", "cmd": "/people", "verb": "people", "sub": "list", "phrases": ["who do I work with", "stakeholders list", "people on this", "who is involved"], "since": "0.610.0"},
|
|
18
|
-
{"id": "strategy", "audience": "user", "status": "ga", "group": "Your product", "name": "Five-line strategy", "say": "Who it is for, the problem, the bet, how you win and what you will not do.", "cmd": "/strategy", "verb": "strategy", "sub": "show", "place": "board", "phrases": ["our strategy", "product strategy", "draft the strategy", "how we win"], "since": "0.776.0"},
|
|
19
|
-
{"id": "code", "audience": "user", "status": "ga", "group": "Your product", "name": "Code map", "say": "One line per main part of the code: what it is, how it is tested, who changed it last.", "cmd": "/code", "verb": "code", "sub": "show", "place": "board", "since": "0.826.0"},
|
|
18
|
+
{"id": "strategy", "audience": "user", "status": "ga", "group": "Your product", "name": "Five-line strategy", "say": "Who it is for, the problem, the bet, how you win and what you will not do.", "cmd": "/strategy", "verb": "strategy", "sub": "show", "place": "board", "phrases": ["our strategy", "product strategy", "draft the strategy", "how we win"], "since": "0.776.0", "ask": ["product"]},
|
|
19
|
+
{"id": "code", "audience": "user", "status": "ga", "group": "Your product", "name": "Code map", "say": "One line per main part of the code: what it is, how it is tested, who changed it last.", "cmd": "/code", "verb": "code", "sub": "show", "place": "board", "since": "0.826.0", "ask": ["product"]},
|
|
20
20
|
{"id": "connectors", "audience": "user", "status": "ga", "group": "Your product", "name": "What connectors read and write", "say": "What PMOS reads and writes through each connector, and what leaves this computer.", "cmd": "/connectors", "verb": "connectors", "sub": "data", "since": "0.825.0"},
|
|
21
21
|
{"id": "positioning", "audience": "user", "status": "ga", "group": "Your product", "name": "Positioning and key messages", "say": "A positioning statement and key messages, each citing a strategy line.", "cmd": "/positioning", "verb": "positioning", "sub": "list", "phrases": ["positioning statement", "key messages", "messaging for"], "since": "0.740.0"},
|
|
22
22
|
{"id": "principles", "audience": "user", "status": "ga", "group": "Your product", "name": "Product principles", "say": "Four to six principles drafted from your past decisions, each citing them.", "cmd": "/principles", "verb": "principles", "sub": "list", "phrases": ["product principles", "our principles", "design principles for"], "since": "0.720.0"},
|
|
23
23
|
{"id": "glossary", "audience": "user", "status": "ga", "group": "Your product", "name": "Glossary", "say": "The product's own words; every page shows a word's meaning on hover.", "cmd": "/glossary", "verb": "glossary", "sub": "list", "hint": "<word>", "phrases": ["define the word", "glossary", "add to glossary", "meaning of the word"], "since": "0.690.0"},
|
|
24
|
-
{"id": "health", "audience": "user", "status": "ga", "group": "Your product", "name": "Health score", "say": "This product's health from 0 to 100, and the three parts that make it.", "cmd": "/health", "verb": "health", "sub": "score", "phrases": ["health score", "how healthy is", "product health"], "phone": true, "since": "0.737.0"},
|
|
24
|
+
{"id": "health", "audience": "user", "status": "ga", "group": "Your product", "name": "Health score", "say": "This product's health from 0 to 100, and the three parts that make it.", "cmd": "/health", "verb": "health", "sub": "score", "phrases": ["health score", "how healthy is", "product health"], "phone": true, "since": "0.737.0", "ask": ["product"]},
|
|
25
25
|
{"id": "outcomes", "audience": "user", "status": "ga", "group": "Your product", "name": "Did it work?", "say": "Each initiative's expected outcome and the date to check it.", "cmd": "/outcomes", "verb": "outcomes", "sub": "list", "phrases": ["did it work", "expected outcome", "outcomes due", "check the outcome"], "since": "0.640.0"},
|
|
26
26
|
{"id": "changed", "audience": "user", "status": "ga", "group": "What PMOS did", "name": "What PMOS changed by itself", "say": "Every change PMOS made on its own today, with its source and its Undo.", "cmd": "/changed", "verb": "factory", "sub": "today", "phrases": ["what did pmos change", "what did you change", "changes pmos made", "what did the agents do"], "phone": true, "since": "0.700.0"},
|
|
27
27
|
{"id": "autonomy", "audience": "user", "status": "ga", "group": "What PMOS did", "name": "What agents applied", "say": "What agents applied by themselves in the last 14 days, each with its Undo.", "cmd": "/applied", "verb": "autonomy", "sub": "status", "phrases": ["what did agents apply", "applied by themselves", "auto applied"], "since": "0.680.0"},
|
|
28
|
-
{"id": "describe", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Task descriptions", "say": "What, why and done-when for each task, drafted from its sources.", "cmd": "/describe", "verb": "task", "sub": "describe", "hint": "<task>", "place": "board", "phrases": ["describe this task", "task description", "write the description", "what is this task about"], "since": "0.770.0"},
|
|
28
|
+
{"id": "describe", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Task descriptions", "say": "What, why and done-when for each task, drafted from its sources.", "cmd": "/describe", "verb": "task", "sub": "describe", "hint": "<task>", "place": "board", "phrases": ["describe this task", "task description", "write the description", "what is this task about"], "since": "0.770.0", "ask": ["task"]},
|
|
29
29
|
{"id": "search", "audience": "user", "status": "ga", "group": "Find your way", "name": "Search and ask", "say": "Ctrl+K finds work, pages and features, and answers questions from your files.", "keys": "Ctrl K", "since": "0.737.0"},
|
|
30
30
|
{"id": "action-keys", "audience": "user", "status": "ga", "group": "Find your way", "name": "Keys for the five common actions", "say": "Yes, open, next sprint, park and undo, one key each. Press ? to see them.", "keys": "?", "since": "0.730.0"},
|
|
31
31
|
{"id": "guide", "audience": "user", "status": "ga", "group": "Find your way", "name": "The Guide", "say": "How each part of PMOS works, page by page.", "action": "guide", "since": "0.500.0"},
|
|
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>"},
|
|
38
39
|
{"id": "jira", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "Jira tickets from the spec", "say": "Draft Jira tickets from the PRD, approve them and see their status.", "cmd": "/jira", "verb": "jira"},
|
|
39
40
|
{"id": "docs", "audience": "user", "status": "ga", "group": "Your product", "name": "Linked documents in step", "say": "Is each linked document the same as, ahead of or behind its Google Docs or Confluence copy.", "cmd": "/docs", "verb": "docs"},
|
|
40
|
-
{"id": "signoff", "audience": "user", "status": "ga", "group": "Before you ship", "name": "Sign-offs", "say": "Ask for, answer and list the sign-offs an initiative waits on.", "cmd": "/signoff", "verb": "signoff", "hint": "<initiative>"},
|
|
41
|
+
{"id": "signoff", "audience": "user", "status": "ga", "group": "Before you ship", "name": "Sign-offs", "say": "Ask for, answer and list the sign-offs an initiative waits on.", "cmd": "/signoff", "verb": "signoff", "hint": "<initiative>", "ask": ["initiative"]},
|
|
41
42
|
{"id": "my-work", "audience": "user", "status": "ga", "group": "Catch up", "name": "Your assigned work", "say": "The Jira tickets and plan items assigned to you, ranked.", "cmd": "/my-work", "verb": "my-work"},
|
|
42
43
|
{"id": "tracker", "audience": "user", "status": "ga", "group": "Catch up", "name": "When the tracker was last read", "say": "When tracker items were last read and how much matches the last Jira read.", "cmd": "/tracker", "verb": "tracker"},
|
|
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"},
|
|
@@ -55,13 +56,16 @@
|
|
|
55
56
|
{"id": "away", "audience": "user", "status": "ga", "group": "Catch up", "name": "Away days", "say": "Set your away days, read the handover note and see what moved while you were away.", "cmd": "/away", "verb": "away"},
|
|
56
57
|
{"id": "try", "audience": "user", "status": "ga", "group": "What PMOS did", "name": "Try what shipped", "say": "The changes your recent updates brought, how to try each, and your answer.", "cmd": "/try", "verb": "try"},
|
|
57
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"},
|
|
58
|
-
{"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>"},
|
|
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>", "ask": ["initiative"]},
|
|
59
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": "print", "audience": "user", "status": "ga", "group": "Your product", "name": "Print or PDF", "say": "One clean page of a report or an initiative, to print or save as PDF.", "cmd": "/print", "verb": "print", "hint": "<file or initiative>"},
|
|
62
|
+
{"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>"},
|
|
60
63
|
{"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"},
|
|
61
64
|
{"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>"},
|
|
62
65
|
{"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"},
|
|
63
66
|
{"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"},
|
|
64
67
|
{"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"},
|
|
68
|
+
{"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"},
|
|
65
69
|
{"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"},
|
|
66
70
|
{"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"},
|
|
67
71
|
{"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>"},
|
|
@@ -69,7 +73,7 @@
|
|
|
69
73
|
{"id": "setup", "audience": "user", "status": "ga", "group": "Find your way", "name": "Set up a new product", "say": "The tracker read, an agreed goal and an owner for a new product.", "cmd": "/setup", "verb": "setup"},
|
|
70
74
|
{"id": "loop", "audience": "user", "status": "ga", "group": "Plan and decide", "name": "A goal agents work on", "say": "Start, check and stop a goal agents work on until it is done.", "cmd": "/loop", "verb": "loop"},
|
|
71
75
|
{"id": "scan", "audience": "user", "status": "ga", "group": "Catch up", "name": "Horizon scan", "say": "The portfolio watch list and what the scan found.", "cmd": "/scan", "verb": "scan"},
|
|
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>"},
|
|
76
|
+
{"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>", "ask": ["initiative"]},
|
|
73
77
|
{"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"},
|
|
74
78
|
{"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
79
|
{"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"},
|
|
@@ -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']);
|