create-pmos 0.663.0 → 0.664.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.663.0",
3
+ "version": "0.664.0",
4
4
  "description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -34,16 +34,10 @@
34
34
  ],
35
35
  "pmosChanges": [
36
36
  {
37
- "v": "0.663.0",
38
- "at": "2026-11-22T04:09:31.042Z",
37
+ "v": "0.664.0",
38
+ "at": "2026-11-22T04:17:27.653Z",
39
39
  "f": 4,
40
40
  "prs": [
41
- {
42
- "n": 1449,
43
- "t": "Rebuild the Intelligence page from Komorebi blocks",
44
- "s": "Rebuild the Intelligence page from Komorebi blocks",
45
- "k": "new"
46
- },
47
41
  {
48
42
  "n": 1442,
49
43
  "t": "Routine is built from the design system's blocks",
@@ -55,6 +49,12 @@
55
49
  "t": "A design critic reads each design against every standing rule before the PM sees it",
56
50
  "s": "A design critic reads each design against every standing rule before the PM sees it",
57
51
  "k": "new"
52
+ },
53
+ {
54
+ "n": 1448,
55
+ "t": "Check launch readiness before go-live",
56
+ "s": "Check launch readiness before go-live",
57
+ "k": "new"
58
58
  }
59
59
  ]
60
60
  },
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@41fb08b4
1
+ kernel-source: pmos@0cd92a74
2
2
  assembled: 2026-11-22
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-11-22T04:09:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T04:17:24Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Health budgets"
4
4
  description: "Closed registry of health-budget anchors (D59), edited only by the PM."
5
- generated: {by: process:create-pmos, at: "2026-11-22T04:09:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T04:17:24Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Discoveries and friction log"
4
4
  description: "Append-only record of what runs discovered and where the process rubbed."
5
- generated: {by: process:create-pmos, at: "2026-11-22T04:09:27Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T04:17:24Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,15 +1,9 @@
1
1
  [
2
2
  {
3
- "v": "0.663.0",
4
- "at": "2026-11-22T04:09:31.042Z",
3
+ "v": "0.664.0",
4
+ "at": "2026-11-22T04:17:27.653Z",
5
5
  "f": 4,
6
6
  "prs": [
7
- {
8
- "n": 1449,
9
- "t": "Rebuild the Intelligence page from Komorebi blocks",
10
- "s": "Rebuild the Intelligence page from Komorebi blocks",
11
- "k": "new"
12
- },
13
7
  {
14
8
  "n": 1442,
15
9
  "t": "Routine is built from the design system's blocks",
@@ -21,6 +15,12 @@
21
15
  "t": "A design critic reads each design against every standing rule before the PM sees it",
22
16
  "s": "A design critic reads each design against every standing rule before the PM sees it",
23
17
  "k": "new"
18
+ },
19
+ {
20
+ "n": 1448,
21
+ "t": "Check launch readiness before go-live",
22
+ "s": "Check launch readiness before go-live",
23
+ "k": "new"
24
24
  }
25
25
  ]
26
26
  },
@@ -703,6 +703,13 @@ The skills that read your tools save their reads with these commands. [Settings,
703
703
  - `pmos calendar import --from <file|-> --sensitivity <label>` saves the events the agent read. The label is `public`, `internal`, `confidential` or `private`. `--dry-run` checks the file and saves nothing.
704
704
  - `pmos calendar status` says how many events are saved and when they were read.
705
705
 
706
+ ### pmos launch
707
+
708
+ Before a launch date, `pmos launch` lists what is not ready in one place. It reads the initiative's tasks, its last tracker reading, its sign-offs and the day's question list. It calls no tracker, sends nothing and writes no record, so read the tracker first.
709
+
710
+ - `pmos launch check <initiative> [--date YYYY-MM-DD]` shows the launch date, a verdict (ready, at risk or no data) and each item that is not ready: open tasks (past their date, or due after the launch), tracker tickets still open (with the days since they moved and any block), sign-offs with no answer, and open questions. The launch date is `--date`, else a ◇ milestone named launch, go-live, release or ship, else the committed end, else the last ◇ milestone. With none, the command asks for `--date`. A tracker reading older than 2 days gives a warning.
711
+ - `pmos launch list [--days N]` lists every initiative with a launch in the next N days (14 by default), with its verdict and the number of items not ready.
712
+
706
713
  ### pmos tracker
707
714
 
708
715
  - `pmos tracker done [--moved N] [--left N] [--not-found N]` records the time of the read for this repository and the counts of what it found. It moves no item.
@@ -0,0 +1,90 @@
1
+ 'use strict';
2
+ /* launch-cli.js — `pmos launch …`: what is not ready before a launch date (initiative launch-readiness-check, lib/launch-readiness.js).
3
+ * pmos launch check <initiative> [--date YYYY-MM-DD] [--json] open tasks, tracker tickets, sign-offs and questions before the launch
4
+ * pmos launch list [--days N] [--json] every initiative with a launch in the next N days (14), with its verdict
5
+ * The repository is the one this terminal is in (or --root). Read-only: it calls no tracker, sends nothing and writes no record.
6
+ * Exit codes: 0 done, 1 refused (no launch date, no such initiative), 2 usage. */
7
+ const path = require('path');
8
+ const { execFileSync } = require('child_process');
9
+ const LR = require('./launch-readiness.js');
10
+
11
+ const COMMANDS = { launch: ['check', 'list'] };
12
+ const USAGE = [
13
+ 'usage: pmos launch check|list — what is not ready before a launch date',
14
+ ' pmos launch check <initiative> [--date YYYY-MM-DD] open tasks, tracker tickets, sign-offs with no answer and open questions',
15
+ ' The launch date: --date, else a ◇ milestone named launch, go-live, release or ship, else the committed end, else the last ◇ milestone.',
16
+ ' pmos launch list [--days N] every initiative with a launch in the next N days (default 14), and its verdict',
17
+ ' every command: [--json] [--root <repository>]',
18
+ 'Read-only: it calls no tracker and sends nothing. Read the tracker first so the tickets are fresh.',
19
+ ];
20
+
21
+ function parseArgs(argv) {
22
+ const out = { _: [] };
23
+ for (let i = 0; i < argv.length; i++) {
24
+ const t = argv[i];
25
+ if (!t.startsWith('--')) { out._.push(t); continue; }
26
+ const eq = t.indexOf('=');
27
+ const key = eq > 0 ? t.slice(2, eq) : t.slice(2);
28
+ if (key === 'json' || key === 'help') out[key] = true;
29
+ else if (eq > 0) out[key] = t.slice(eq + 1);
30
+ else if (argv[i + 1] !== undefined) out[key] = argv[++i];
31
+ else out[key] = '';
32
+ }
33
+ return out;
34
+ }
35
+ function repoRoot(cwd) {
36
+ try { return execFileSync('git', ['rev-parse', '--show-toplevel'], { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim() || cwd; }
37
+ catch { return cwd; }
38
+ }
39
+ const DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
40
+
41
+ function run(argv, { say = console.log, cwd = process.cwd(), now = () => new Date() } = {}) {
42
+ const a = parseArgs(argv[0] === 'launch' ? argv.slice(1) : argv);
43
+ const sub = a._[0];
44
+ const fail = (error, code = 1) => { if (a.json) say(JSON.stringify({ ok: false, error })); else say('✗ ' + error); return code; };
45
+ if (!sub || a.help || sub === 'help') { USAGE.forEach((l) => say(l)); return sub || a.help ? 0 : 2; }
46
+ if (!COMMANDS.launch.includes(sub)) { say(`✗ pmos launch ${sub} is not a command`); USAGE.forEach((l) => say(l)); return 2; }
47
+ for (const k of Object.keys(a)) if (!['_', 'json', 'help', 'root', 'date', 'days', 'today'].includes(k)) return fail(`unknown option --${k}`, 2);
48
+ if (a.date !== undefined && (sub !== 'check' || !DAY_RE.test(a.date))) return fail(sub !== 'check' ? '--date is an option of check' : '--date takes YYYY-MM-DD', 2);
49
+ if (a.today !== undefined && !DAY_RE.test(a.today)) return fail('--today takes YYYY-MM-DD', 2);
50
+ const root = a.root ? path.resolve(cwd, a.root) : repoRoot(cwd);
51
+ const today = a.today || now().toISOString().slice(0, 10);
52
+ const SR = require('./stage-read.js');
53
+ const { w, ctx } = SR.cliCtx(root);
54
+ if (!ctx.stateDirFor()) return fail('this repository has no PMOS state folder (pmos/state, state or .pmos)');
55
+
56
+ if (sub === 'check') {
57
+ const id = a._[1];
58
+ if (!id || a._.length > 2) { say('usage: pmos launch check <initiative> [--date YYYY-MM-DD] [--json]'); return 2; }
59
+ const got = LR.read(root, id, { date: a.date, ctx, w });
60
+ if (got.error) return fail(got.error);
61
+ if (!got.launch) return fail(`${id} has no launch date: no ◇ milestone and no committed end. Give one with --date YYYY-MM-DD.`);
62
+ const res = LR.check(got.input, { launch: got.launch.date, launchTask: got.launch.task, today });
63
+ if (a.json) { say(JSON.stringify({ ok: true, initiative: id, title: got.title, launchFrom: got.launch.from, ...res })); return 0; }
64
+ say(LR.render(res, { title: got.title, id, launchFrom: LR.FROM_WORDS[got.launch.from] }));
65
+ return 0;
66
+ }
67
+
68
+ // list
69
+ const n = a.days === undefined ? 14 : Number(a.days);
70
+ if (!Number.isInteger(n) || n < 0 || n > 365) return fail('--days takes a whole number from 0 to 365', 2);
71
+ const rowsLib = require('./initiative-rows.js');
72
+ const d = rowsLib.deriveNow(root);
73
+ if (!d.ok) return fail(d.error || 'the initiative records could not be read');
74
+ const until = new Date(Date.parse(today + 'T00:00:00Z') + n * 86400000).toISOString().slice(0, 10);
75
+ const out = [];
76
+ for (const row of d.rows || []) {
77
+ if (!row || row.ok === false || row.stopped) continue;
78
+ let got; try { got = LR.read(root, row.id, { ctx, w }); } catch { continue; }
79
+ if (!got || got.error || !got.launch || got.launch.date < today || got.launch.date > until) continue;
80
+ const res = LR.check(got.input, { launch: got.launch.date, launchTask: got.launch.task, today });
81
+ out.push({ initiative: row.id, title: got.title, launch: res.launch, daysLeft: res.daysLeft, launchFrom: got.launch.from, verdict: res.verdict, items: res.items.length, notes: res.notes.length });
82
+ }
83
+ out.sort((x, y) => x.launch.localeCompare(y.launch) || x.initiative.localeCompare(y.initiative));
84
+ if (a.json) { say(JSON.stringify({ ok: true, today, until, launches: out })); return 0; }
85
+ if (!out.length) { say(`No launch in the next ${n} days.`); return 0; }
86
+ for (const x of out) say(`${x.launch} (${x.daysLeft === 0 ? 'today' : 'in ' + x.daysLeft + (x.daysLeft === 1 ? ' day' : ' days')}) · ${x.title} · ${x.verdict}${x.items ? ' · ' + x.items + (x.items === 1 ? ' item' : ' items') + ' not ready' : ''} · pmos launch check ${x.initiative}`);
87
+ return 0;
88
+ }
89
+
90
+ module.exports = { run, COMMANDS, USAGE };
@@ -0,0 +1,176 @@
1
+ 'use strict';
2
+ /* launch-readiness.js — what is not ready before an initiative's launch date (initiative launch-readiness-check; bet A172 with A188 and
3
+ * A194 in pmos-ideas/proofs). Works on any product built with PMOS: it reads only the initiative's own records.
4
+ *
5
+ * launchOf({ tasks, end, date }) → { date, from } | null PURE. The launch date: `date` (--date) first, then a ◇ milestone task whose
6
+ * title says launch, go-live, release or ship (the latest), then the committed end, then the last
7
+ * dated ◇ milestone. from: 'given' | 'milestone' | 'end' | 'last-milestone'.
8
+ * check(input, { launch, launchTask, today, idleDays, staleDays }) → the result PURE. launchTask: the id of the ◇ milestone the date came
9
+ * from (launchOf().task), which is not itself flagged. input:
10
+ * tasks [{ id, title, state, owner, due, milestone }] `pmos task list --all` rows (lib/stage-read.js tasksOf)
11
+ * tracker { fetchedAt, tickets: [reading] } | null the last tracker reading (lib/jira-status.js readSnapshot)
12
+ * signoffs [{ id, who, what, asked, due, state }] | null null: this product records no sign-offs (lib/signoffs.js)
13
+ * questions [{ owner, text, n }] the initiative's held questions (lib/question-batch.js)
14
+ * gaps [{ ticket, n, q }] open questions the ticket dry-run found, when present
15
+ * read(root, ini, o) → { input, launch, title } | { error } the I/O: reads the records above, writes nothing.
16
+ *
17
+ * THE RESULT: { launch, daysLeft, verdict: 'ready' | 'at risk' | 'no data', counts, items: [{ kind, id, title, why, who? }], notes: [line] }.
18
+ * kind: task | ticket | signoff | question. A reading is never counted as ready by default: no tasks and no tickets is 'no data', a
19
+ * tracker reading older than `staleDays` adds a note with its age, and a product with no sign-off record says so. Nothing writes. */
20
+
21
+ const DAY = 86400000;
22
+ const IDLE_DAYS = 14;
23
+ const STALE_DAYS = 2;
24
+ const LAUNCH_WORDS = /\b(launch|go[- ]?live|release|ship|cut-?over)\b/i;
25
+ const OPEN_TASK = new Set(['To do', 'In progress']);
26
+ const isObj = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
27
+ const one = (v, n = 140) => String(v == null ? '' : v).replace(/\s+/g, ' ').trim().slice(0, n);
28
+ const dayOf = (v) => { const m = /^(\d{4}-\d{2}-\d{2})/.exec(String(v || '')); return m ? m[1] : ''; };
29
+ const days = (a, b) => Math.round((Date.parse(b + 'T00:00:00Z') - Date.parse(a + 'T00:00:00Z')) / DAY);
30
+ const plural = (n, a, b) => n + ' ' + (n === 1 ? a : b);
31
+
32
+ /** The launch date of an initiative. PURE. */
33
+ function launchOf({ tasks, end, date } = {}) {
34
+ if (dayOf(date)) return { date: dayOf(date), from: 'given' };
35
+ const ms = (tasks || []).filter((t) => isObj(t) && t.milestone && dayOf(t.due)).sort((a, b) => dayOf(a.due).localeCompare(dayOf(b.due)));
36
+ const named = ms.filter((t) => LAUNCH_WORDS.test(String(t.title || '')));
37
+ if (named.length) { const t = named[named.length - 1]; return { date: dayOf(t.due), from: 'milestone', title: one(t.title, 80), task: String(t.id || '') }; }
38
+ if (dayOf(end)) return { date: dayOf(end), from: 'end' };
39
+ if (ms.length) { const t = ms[ms.length - 1]; return { date: dayOf(t.due), from: 'last-milestone', title: one(t.title, 80), task: String(t.id || '') }; }
40
+ return null;
41
+ }
42
+
43
+ function taskItems(tasks, launch, today, launchTask) {
44
+ const out = [];
45
+ for (const t of tasks || []) {
46
+ if (!isObj(t) || !OPEN_TASK.has(t.state)) continue;
47
+ if (launchTask && String(t.id) === launchTask) continue; // the ◇ launch milestone itself is open until the launch
48
+ const due = dayOf(t.due);
49
+ let why;
50
+ if (due && due > launch) why = `due ${due}, after the launch`;
51
+ else if (due && due < today) why = `past its date (${due}), still ${t.state}`;
52
+ else if (due) why = `${t.state}, due ${due}`;
53
+ else why = `${t.state}, no date`;
54
+ out.push({ kind: 'task', id: String(t.id || ''), title: one(t.title, 120), why, ...(t.owner ? { who: one(t.owner, 60) } : {}) });
55
+ }
56
+ return out;
57
+ }
58
+
59
+ function ticketItems(tracker, today, idleDays) {
60
+ const out = [];
61
+ if (!tracker) return out;
62
+ for (const r of tracker.tickets || []) {
63
+ if (!isObj(r) || r.category === 'done') continue;
64
+ const parts = [String(r.status || 'Open')];
65
+ const upd = dayOf(r.updated);
66
+ const idle = upd ? days(upd, today) : null;
67
+ if (idle != null && idle >= idleDays) parts.push(`not moved for ${idle} days`);
68
+ if (r.flagged) parts.push(one(r.reason || 'flagged', 80));
69
+ if (r.stale) parts.push('not in the last tracker reading');
70
+ out.push({ kind: 'ticket', id: String(r.key || ''), title: one(r.summary, 120), why: parts.join(', '), ...(r.assignee ? { who: one(r.assignee, 60) } : {}), ...(idle != null ? { idle } : {}) });
71
+ }
72
+ return out.sort((a, b) => (b.idle || 0) - (a.idle || 0));
73
+ }
74
+
75
+ function signoffItems(signoffs, today) {
76
+ const out = [];
77
+ for (const s of signoffs || []) {
78
+ if (!isObj(s) || s.state !== 'open') continue;
79
+ const asked = dayOf(s.asked), due = dayOf(s.due);
80
+ const parts = [asked ? `asked ${asked}, ${plural(days(asked, today), 'day', 'days')} with no answer` : 'no answer recorded'];
81
+ if (due && due < today) parts.push(`was due ${due}`);
82
+ out.push({ kind: 'signoff', id: 'signoff:' + String(s.id || ''), title: one(s.what, 120), why: parts.join(', '), who: one(s.who || 'someone outside the team', 60) });
83
+ }
84
+ return out;
85
+ }
86
+
87
+ function questionItems(questions, gaps) {
88
+ const out = [];
89
+ for (const q of questions || []) if (isObj(q) && q.text) out.push({ kind: 'question', id: String(q.key || ''), title: one(q.text, 200), why: 'held: PMOS found no source', who: one(q.owner || '', 60) });
90
+ for (const g of gaps || []) if (isObj(g) && g.q) out.push({ kind: 'question', id: String(g.ticket || ''), title: one(g.q, 200), why: `open question in ${g.ticket || 'a ticket'}` });
91
+ return out;
92
+ }
93
+
94
+ /** The readiness of one initiative for its launch. PURE. */
95
+ function check(input = {}, { launch, launchTask = '', today, idleDays = IDLE_DAYS, staleDays = STALE_DAYS } = {}) {
96
+ const t0 = dayOf(today) || new Date().toISOString().slice(0, 10);
97
+ const L = dayOf(launch);
98
+ const tasks = (input.tasks || []).filter(isObj);
99
+ const tracker = isObj(input.tracker) ? input.tracker : null;
100
+ const items = [
101
+ ...taskItems(tasks, L || '9999-12-31', t0, launchTask),
102
+ ...ticketItems(tracker, t0, idleDays),
103
+ ...signoffItems(input.signoffs, t0),
104
+ ...questionItems(input.questions, input.gaps),
105
+ ];
106
+ const notes = [];
107
+ const read = tracker && dayOf(tracker.fetchedAt);
108
+ if (!tracker) notes.push('No tracker reading for this initiative: run the tracker read first, or the tickets are not counted.');
109
+ else if (read && days(read, t0) > staleDays) notes.push(`The tracker reading is ${plural(days(read, t0), 'day', 'days')} old (${read}). Read the tracker again before you trust this.`);
110
+ if (input.signoffs == null) notes.push('Sign-offs: not recorded for this product, so outside answers are not checked.');
111
+ const nTickets = tracker ? (tracker.tickets || []).length : 0;
112
+ const counts = {
113
+ tasks: { done: tasks.filter((t) => t.state === 'Done').length, total: tasks.filter((t) => t.state !== "Won't do" && t.state !== 'Archived').length },
114
+ tickets: { done: tracker ? (tracker.tickets || []).filter((r) => isObj(r) && r.category === 'done').length : 0, total: nTickets },
115
+ signoffs: items.filter((x) => x.kind === 'signoff').length,
116
+ questions: items.filter((x) => x.kind === 'question').length,
117
+ };
118
+ const verdict = !tasks.length && !nTickets ? 'no data' : items.length ? 'at risk' : 'ready';
119
+ return { launch: L || null, daysLeft: L ? days(t0, L) : null, today: t0, verdict, counts, items, notes };
120
+ }
121
+
122
+ /** One paragraph for a terminal or a chat. */
123
+ function render(res, { title = '', id = '', launchFrom } = {}) {
124
+ const name = title || id;
125
+ const when = res.daysLeft == null ? '' : res.daysLeft < 0 ? `${plural(-res.daysLeft, 'day', 'days')} ago` : res.daysLeft === 0 ? 'today' : `in ${plural(res.daysLeft, 'day', 'days')}`;
126
+ const head = `${name}: launch ${res.launch}${when ? ' (' + when + ')' : ''}${launchFrom ? ', from ' + launchFrom : ''}. ${res.verdict === 'ready' ? 'Ready: nothing open.' : res.verdict === 'no data' ? 'No data: no task and no tracker ticket.' : 'At risk: ' + plural(res.items.length, 'item is', 'items are') + ' not ready.'}`;
127
+ const out = [head];
128
+ const c = res.counts;
129
+ // zero is silence: a part with nothing in it is left out
130
+ const sum = [c.tasks.total ? `tasks ${c.tasks.done} of ${c.tasks.total} done` : '', c.tickets.total ? `tickets ${c.tickets.done} of ${c.tickets.total} done` : '',
131
+ c.signoffs ? `${plural(c.signoffs, 'sign-off', 'sign-offs')} waiting` : '', c.questions ? plural(c.questions, 'open question', 'open questions') : ''].filter(Boolean);
132
+ if (sum.length) out.push(sum.join(' · ').replace(/^./, (x) => x.toUpperCase()) + '.');
133
+ const LABEL = { task: 'Tasks', ticket: 'Tracker tickets', signoff: 'Sign-offs with no answer', question: 'Open questions' };
134
+ for (const k of ['signoff', 'ticket', 'task', 'question']) {
135
+ const xs = res.items.filter((x) => x.kind === k);
136
+ if (!xs.length) continue;
137
+ out.push('', `${LABEL[k]} (${xs.length}):`);
138
+ for (const x of xs) out.push(` ${x.id ? x.id + ' ' : ''}${x.title} | ${x.why}${x.who ? ' | ' + x.who : ''}`);
139
+ }
140
+ if (res.notes.length) out.push('', ...res.notes);
141
+ return out.join('\n');
142
+ }
143
+
144
+ const FROM_WORDS = { given: 'the date you gave', milestone: 'the milestone', end: 'the committed end', 'last-milestone': 'the last milestone' };
145
+
146
+ /** Read one initiative's records. Writes nothing. o: { date, ctx, w } (lib/stage-read.js cliCtx). */
147
+ function read(root, ini, o = {}) {
148
+ const SR = require('./stage-read.js');
149
+ const { w, ctx } = o.ctx ? { w: o.w, ctx: o.ctx } : SR.cliCtx(root);
150
+ if (!ctx.stateDirFor()) return { error: 'this repository has no PMOS state folder (pmos/state, state or .pmos)' };
151
+ const r = SR.rowOf(ctx, w, ini);
152
+ if (!r || !r.ok) return { error: (r && r.error) || `no initiative ${ini}` };
153
+ let tasks = [];
154
+ try { tasks = SR.tasksOf(ctx, w, ini); } catch { tasks = []; }
155
+ const launch = launchOf({ tasks, end: r.row.end, date: o.date });
156
+ let tracker = null;
157
+ try {
158
+ const snap = require('./jira-status.js').readSnapshot(root, ini);
159
+ if (snap) tracker = { fetchedAt: snap.fetchedAt, tickets: [...snap.tickets.values()] };
160
+ } catch { tracker = null; }
161
+ // sign-offs and ticket gaps come from lib/signoffs.js and the ticket dry-run when this PMOS has them; without them, nothing is guessed
162
+ let signoffs = null, gaps = [];
163
+ try {
164
+ const SO = require('./signoffs.js'), JT = require('./jira-tickets.js');
165
+ if (typeof SO.list === 'function' && typeof SO.fileOf === 'function' && typeof JT.stateDirOf === 'function') signoffs = SO.list(SO.fileOf(JT.stateDirOf(root)), { ini });
166
+ } catch { signoffs = null; }
167
+ try { const JT = require('./jira-tickets.js'); if (typeof JT.dryRunGaps === 'function') gaps = JT.dryRunGaps(root, ini) || []; } catch { gaps = []; }
168
+ let questions = [];
169
+ try {
170
+ const held = require('./routes-proposals.js').heldOf(ctx, w).filter((h) => h.ini === ini);
171
+ questions = require('./question-batch.js').questionsOf(held, { pm: 'PM' });
172
+ } catch { questions = []; }
173
+ return { title: r.row.title || ini, launch, input: { tasks, tracker, signoffs, questions, gaps } };
174
+ }
175
+
176
+ module.exports = { launchOf, check, render, read, FROM_WORDS, IDLE_DAYS, STALE_DAYS, LAUNCH_WORDS };
@@ -54,6 +54,9 @@ const VERBS = Object.freeze({
54
54
  // Not a pm-os-absorb verb (run: null): workspace-data-freshness added it through the same table.
55
55
  calendar: Object.freeze({ module: 'calendar-cli.js', run: null, guide: 'cli.md',
56
56
  help: 'pmos calendar import|status — the calendar events an agent session read, saved for Briefing and Calendar (pmos calendar help)' }),
57
+ // Not a pm-os-absorb verb (run: null): launch-readiness-check added it through the same table.
58
+ launch: Object.freeze({ module: 'launch-cli.js', run: null, guide: 'cli.md',
59
+ help: 'pmos launch check|list — what is not ready before a launch date: tasks, tracker tickets, sign-offs, open questions (pmos launch help)' }),
57
60
  // Not a pm-os-absorb verb (run: null): tracker-read-freshness added it through the same table.
58
61
  tracker: Object.freeze({ module: 'tracker-cli.js', run: null, guide: 'cli.md',
59
62
  help: 'pmos tracker done|status — record when the tracker-refresh skill finished a read of this repository (pmos tracker help)' }),
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.663.0",
3
+ "version": "0.664.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.663.0",
9
+ "version": "0.664.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.663.0",
3
+ "version": "0.664.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -171,6 +171,7 @@ const WIDE = new Set([
171
171
  * a page route, a name used outside any function or route block) reaches every suite.
172
172
  * - lib/routes-<x>.js (a route module that lib/route-modules.js loads): every '/api/…' route the file names under the
173
173
  * prefixes it declares (a route it only calls through ctx is left out). With no prefixes it can read: every route it names.
174
+ * - lib/pmos-verbs.js, when the diff only adds a verb (its module line and its help line): the suites that name pmos-verbs or the new module.
174
175
  * - lib/route-modules.js, when the diff only adds module names to its list: what each added lib/routes-<x>.js reaches. Any other change to it is the rule below.
175
176
  * - Any other file: the files that name it (a require, an import or a path string), followed the same way: server.js
176
177
  * through the names it binds the module to, a lib/ file through its own users, a suite directly. A lib/ file that no
@@ -628,6 +629,9 @@ function traceChanges(changes, ctx) {
628
629
  if (inList.has(g)) { picked.add(g); continue; }
629
630
  if (SUITE_NAME.test(g)) continue; // a suite of another group: nothing depends on it
630
631
  if (WIDE.has(g)) return `${f} is used by ${g}`;
632
+ // a verb module is named by the verb table only as `module: '<x>-cli.js'`: only `pmos <verb>` runs it, so its own suites are its users,
633
+ // not every user of the table (launch-readiness-check: a new verb module reached 177 suites through bin/pmos.js)
634
+ if (g === VERBS_FILE && /^lib\/[\w-]+-cli\.js$/.test(f) && new RegExp(`module: '${reEsc(stemOf(f))}\\.js'`).test(t)) continue;
631
635
  if (g.startsWith('public/')) { viaPublic(g); continue; }
632
636
  if (g === 'server.js') {
633
637
  const names = []; const inline = []; const factories = []; const whole = [];
@@ -699,6 +703,11 @@ function traceChanges(changes, ctx) {
699
703
  for (const s of list) if (s === 'headless.test.js' || rk.some((x) => (get(s) || '').includes(x))) picked.add(s);
700
704
  continue;
701
705
  }
706
+ const nv = f === VERBS_FILE ? newVerbOnly(sget(f), lines) : null;
707
+ if (nv) { // a new verb: only `pmos <verb>` calls reach it, so the suites that name the table or the verb's module
708
+ for (const s of list) { const t = get(s) || ''; if (t.includes('pmos-verbs') || nv.some((m) => t.includes(m))) picked.add(s); }
709
+ continue;
710
+ }
702
711
  let why = null;
703
712
  const before = picked.size;
704
713
  if (get(f) == null) { // removed: only the names in the suites can say who used it
@@ -722,6 +731,24 @@ function traceChanges(changes, ctx) {
722
731
  return { suites: list.filter((s) => picked.has(s)), why: `${changes.length} changed file(s) reach these suites` };
723
732
  }
724
733
 
734
+ /* launch-readiness-check: bin/pmos.js asks lib/pmos-verbs.js for every verb, so a change there reaches every suite. A change that only
735
+ * ADDS a verb is narrower: its `<verb>: Object.freeze({ module: '<x>-cli.js', …` line and its `help: '…' }),` line change only `pmos <verb>`.
736
+ * Returns the new modules' stems, or null when any changed line is something else. `src` is without comments. */
737
+ const VERBS_FILE = ['lib', 'pmos-verbs'].join('/') + '.js'; // built, so this file does not read as a user of it
738
+ function newVerbOnly(src, lines) {
739
+ if (src == null || !Array.isArray(lines) || !lines.length) return null;
740
+ const all = src.split('\n'), mods = [];
741
+ for (const n of lines) {
742
+ const l = all[n - 1];
743
+ if (l == null) return null;
744
+ if (!l.trim() || /^\s*help: '.*' \}\),\s*$/.test(l)) continue;
745
+ const m = /^\s*'?[\w-]+'?: Object\.freeze\(\{ module: '([\w-]+-cli)\.js', run: null, guide: '[\w.-]+',\s*$/.exec(l);
746
+ if (!m) return null;
747
+ mods.push(m[1]);
748
+ }
749
+ return mods.length ? mods : null;
750
+ }
751
+
725
752
  /* live-round (W1): lib/headless.js decides the kind of EVERY spawn through kindFor(), so a change there reaches every suite. A change that
726
753
  * only ADDS a kind is narrower: a new `const X_ORIGINS = Object.freeze(['p:'])`, its `if (X_ORIGINS.some(...)) return 'k';` line in kindFor,
727
754
  * its TOOLS entry and its name on WRITE_DIR_KINDS or WRITE_PATH_KINDS change only runs whose origin starts with 'p:'. Returns the new
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "Launch readiness check (initiative launch-readiness-check, done test C1-C12): before a launch date, pmos launch check lists open tasks, tracker tickets, sign-offs with no answer and open questions. Pure checks plus the commands on a scratch product. No server, connector, model or network.",
3
+ "modules": [
4
+ "launch-readiness.test.js"
5
+ ],
6
+ "seconds": {
7
+ "launch-readiness.test.js": 15
8
+ }
9
+ }