create-pmos 0.729.0 → 0.730.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.729.0",
3
+ "version": "0.730.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,8 +34,8 @@
34
34
  ],
35
35
  "pmosChanges": [
36
36
  {
37
- "v": "0.729.0",
38
- "at": "2026-11-23T05:35:01.695Z",
37
+ "v": "0.730.0",
38
+ "at": "2026-11-23T05:37:33.548Z",
39
39
  "f": 4,
40
40
  "prs": [
41
41
  {
@@ -49,6 +49,12 @@
49
49
  "t": "Write the done test's acceptance criteria onto Jira tickets (A384)",
50
50
  "s": "Write the done test's acceptance criteria onto Jira tickets (A384)",
51
51
  "k": "new"
52
+ },
53
+ {
54
+ "n": 1626,
55
+ "t": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
56
+ "s": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
57
+ "k": "new"
52
58
  }
53
59
  ]
54
60
  },
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@b5147c2e
1
+ kernel-source: pmos@2a0c121c
2
2
  assembled: 2026-11-23
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-23T05:34:58Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-23T05:37:30Z"}
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-23T05:34:58Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-23T05:37:30Z"}
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-23T05:34:58Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-23T05:37:30Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,7 +1,7 @@
1
1
  [
2
2
  {
3
- "v": "0.729.0",
4
- "at": "2026-11-23T05:35:01.695Z",
3
+ "v": "0.730.0",
4
+ "at": "2026-11-23T05:37:33.548Z",
5
5
  "f": 4,
6
6
  "prs": [
7
7
  {
@@ -15,6 +15,12 @@
15
15
  "t": "Write the done test's acceptance criteria onto Jira tickets (A384)",
16
16
  "s": "Write the done test's acceptance criteria onto Jira tickets (A384)",
17
17
  "k": "new"
18
+ },
19
+ {
20
+ "n": 1626,
21
+ "t": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
22
+ "s": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
23
+ "k": "new"
18
24
  }
19
25
  ]
20
26
  },
@@ -431,6 +431,10 @@ A page that keeps breaking should get fixed before it gets a new feature. This c
431
431
  | `pmos initiative describe <id> "<text>"` | Saves the description. PMOS runs this only after your yes. |
432
432
  | `pmos initiative raised-by <id>` | Shows who raised it: you, a teammate, a customer, PMOS or the tracker. |
433
433
  | `pmos initiative raised-by <id> "<who>"` | Saves who raised it: `you`, `pmos`, `tracker`, `"teammate: <name>"` or `"customer: <name>"`. `none` removes it. |
434
+ | `pmos initiative kind <id>` | Shows the kind of work, and for each lifecycle stage whether PMOS works it with you, watches it in Jira or hides it. |
435
+ | `pmos initiative kind <id> product\|project\|sdlc` | Changes the kind. The Viewer shows the change on its next refresh. An initiative on its old kind's default workflow moves to the new kind's workflow. |
436
+ | `pmos initiative role` | Shows the kind new work starts as (Settings › General › New work starts as). |
437
+ | `pmos initiative role product\|project\|sdlc` | Changes the kind new work starts as. Each initiative can still change its own kind. |
434
438
 
435
439
  Every command takes `--json` and `--root <dir>`. The command does not accept `--by` or `--via`. `pmos initiative now`, `next` and `later` are retired: they write nothing, say what to use instead and exit 2.
436
440
 
@@ -709,6 +713,7 @@ The benchmark needs a signed-in agent CLI. It never pushes and never opens a pul
709
713
  - `pmos jira record <initiative> [ID=KEY …] [--epic KEY [--group <group>]] [--updated ID,ID]`
710
714
  - `pmos jira query [<initiative>]`
711
715
  - `pmos jira sync <initiative> --from <file|-> [--query "<jql>"] [--dry-run]`
716
+ - `pmos jira pin <initiative> [--off]`: keeps an initiative live, so its tickets get the sprint read and full detail. `--off` stops it.
712
717
  - `pmos jira query --sprints`
713
718
  - `pmos jira sync --sprints --from <file|-> [--query "<jql>"] [--dry-run]`
714
719
  - `pmos jira query --sprint "<name>"`
@@ -181,12 +181,14 @@ When you change the kind, an initiative that runs its old kind's workflow moves
181
181
  |---|---|---|---|
182
182
  | Triage, Discover | Hidden | Owned | Owned |
183
183
  | Plan, Prioritize | Owned | Owned | Owned |
184
- | Build | Watched, from Jira | Watched, from Jira | Owned: PMOS builds it where a factory runs |
184
+ | Build | Watched, from its milestone dates | Watched, from Jira | Owned: PMOS builds it where a factory runs |
185
185
  | Deliver, Monitor, Evaluate | Owned | Owned | Owned |
186
186
  | Gate | Plan before start | PRD and done test before build | Done test and kill before build |
187
187
 
188
188
  A Project initiative also hides the product documents: the problem statement, research notes, PRD, eval rubric and design. It shows no PRD gate; its gate is the Plan gate in **Project control**. Hidden is never removed. The stage ladder leaves Triage and Discover out (6 stages), but the stage the initiative is in always shows, and **Move to a stage** still lists every stage. In **Documents**, the hidden documents are in a closed **Product documents** section at the end. Open it to read or draft them.
189
189
 
190
+ In Build, a Project initiative follows its milestones, not Jira's engineers. It shows how many milestones are done, for example **1 of 2 milestones done**, and reads **On plan**. A milestone that is not done and is past its date shows as **past its date**, and the initiative reads **Stalled**. To read or change the kind from a chat, use `pmos initiative kind <id>`.
191
+
190
192
  **Project control.** A Project initiative shows **Project control** at the top of the initiative:
191
193
 
192
194
  - **On track for <date>?** The answer comes from the task dates and the task links. The date is the KR's date, else the end, else the date in the title. On a No, it names the forecast, the slip and the task that causes it.
@@ -15,6 +15,9 @@
15
15
  * its `description:` line (initiative-description-field). An agent writes only after the PM's yes
16
16
  * pmos initiative raised-by <id> ["<who>"|none] no value: who raised it and where that is read from; with a value: write its `raised_by:`
17
17
  * line (who-raised-each-idea): you, pmos, tracker, "teammate: <name>" or "customer: <name>"
18
+ * pmos initiative kind <id> [product|project|sdlc] no kind: its kind and what each stage is (owned, watched, hidden); with a kind: write
19
+ * its `kind:` line and make the workflow move the Viewer's kind switch makes (kind-scope-chat-writes)
20
+ * pmos initiative role [product|project|sdlc] the kind new work starts as (Settings › General › New work starts as, work.role)
18
21
  * every command: [--json] [--root <dir>]
19
22
  *
20
23
  * The SAME writers the workspace page uses (lib/initiative-writer.js, lib/placements.js) — no server is needed. Who
@@ -28,6 +31,7 @@
28
31
  * D105 retired Now / Next / Later: `now`, `next` and `later` answer with what to use instead and change nothing.
29
32
  * Exit codes: 0 done, 1 refused, 2 usage.
30
33
  */
34
+ const fs = require('fs');
31
35
  const path = require('path');
32
36
  const { execFileSync } = require('child_process');
33
37
  const guard = require('./pm-guard.js');
@@ -53,6 +57,18 @@ function startOnDefault(root, r, actor) {
53
57
  } catch { /* the initiative is made; it runs Product feature */ }
54
58
  }
55
59
 
60
+ /** kind-scope-chat-writes: the workflow move the Viewer's kind switch makes (routes-boards kindSwitch), from a terminal. */
61
+ function kindSwitch(root, id, from, to, actor) {
62
+ try {
63
+ const D = require('./driver.js');
64
+ const dir = D.stateDirOf(root);
65
+ if (!dir) return null;
66
+ const w = { id: D.wsIdOf(root), name: path.basename(root), root };
67
+ const ctx = { getWs: () => w, workspaceList: () => [w], stateDirFor: () => dir, selfRoot: path.resolve(__dirname, '..', '..') };
68
+ return require('./routes-boards.js').kindSwitch(ctx, w, id, from, to, actor);
69
+ } catch { return null; } // the kind is written; the workflow stays as it was
70
+ }
71
+
56
72
  /** The records on a document lane (D86 point 4): never on the Roadmap, Home or the Board. Stopped and accepted ones are left out. */
57
73
  const documentsOf = (rows) => (rows || []).filter((r) => r && r.ok !== false && r.group && r.group !== 'work' && !r.accepted && !r.stopped)
58
74
  .map((r) => ({ id: r.id, lane: r.lane || null }));
@@ -63,11 +79,11 @@ function docNote(docs) {
63
79
  return `Not on the Roadmap · ${docs.length} on a document lane: ${names}. A document lane does not show on Home or the Board. If it is work, set lane: in its record to ${WORK_LANES}.`;
64
80
  }
65
81
 
66
- const COMMANDS = { initiative: ['new', 'top', 'up', 'down', 'bottom', 'after', 'check-by', 'adopt', 'drop', 'list', 'export', 'describe', 'raised-by'] };
82
+ const COMMANDS = { initiative: ['new', 'top', 'up', 'down', 'bottom', 'after', 'check-by', 'adopt', 'drop', 'list', 'export', 'describe', 'raised-by', 'kind', 'role'] };
67
83
  /** The horizon verbs D105 retired: they answer with what to use instead. */
68
84
  const RETIRED = Object.freeze(['now', 'next', 'later']);
69
85
  const USAGE = [
70
- 'usage: pmos initiative new|top|up|down|bottom|after|check-by|adopt|drop|list|export|describe|raised-by — initiatives on the Roadmap',
86
+ 'usage: pmos initiative new|top|up|down|bottom|after|check-by|adopt|drop|list|export|describe|raised-by|kind|role — initiatives on the Roadmap',
71
87
  ' pmos initiative new "<title>" --lane <lane> --anchor <KR|health:id> [--intent "<text>"] [--id <id>] [--kind product|sdlc|project] [--raised-by "<who>"]',
72
88
  ' pmos initiative new --from capture-YYYY-MM-DD-<n> [--anchor <anchor>] [--lane <lane>] [--title "<title>"]',
73
89
  ' pmos initiative top|up|down|bottom <id> reorder it on the Roadmap',
@@ -79,6 +95,8 @@ const USAGE = [
79
95
  ' pmos initiative export <id> the breakdown as markdown on stdout',
80
96
  ' pmos initiative describe <id> ["<text>"] read its description and what to draft it from; with text, save it (after the PM\'s yes)',
81
97
  ' pmos initiative raised-by <id> ["<who>"|none] who raised it; with a value, save it: you, pmos, tracker, "teammate: <name>", "customer: <name>"',
98
+ ' pmos initiative kind <id> [product|project|sdlc] its kind and what each stage shows; with a kind, change it',
99
+ ' pmos initiative role [product|project|sdlc] the kind new work starts as; with a kind, change it',
82
100
  ' --lane is a work lane of this repository: new-feature, improvement, bug-fix, discovery or chore in a product repository',
83
101
  ' (scripts/lane-defs.js; the PMOS repository itself uses feature, discovery, chore, incident, content and prototype)',
84
102
  ' every command: [--json] [--root <dir>]',
@@ -241,6 +259,47 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
241
259
  return 0;
242
260
  }
243
261
 
262
+ if (verb === 'kind') {
263
+ // kind-scope-chat-writes: the same writer as the Viewer's kind switch, so the Viewer shows the change on its next refresh
264
+ const KS = require('./kind-scope.js'), WK = require('./work-kind.js');
265
+ const kid = pos[0];
266
+ if (!kid || pos.length > 2) { say('usage: pmos initiative kind <id> [product|project|sdlc]'); return 2; }
267
+ if (pos.length === 2) {
268
+ if (!WK.valid(pos[1])) return fail(`kind must be one of ${WK.KINDS.join(', ')}`, 2);
269
+ const actor = actorLib.fromCli(who);
270
+ const r = writer.setKind(root, kid, pos[1], { actor });
271
+ if (!r.ok) return fail(r.error, r.status === 400 ? 2 : 1);
272
+ if (r.same) return done({ id: kid, kind: r.kind, same: true }, `${kid} is already ${WK.LABEL[r.kind]}.`);
273
+ const sw = kindSwitch(root, kid, r.from, r.kind, actor);
274
+ const moved = sw && sw.switched ? ` It moved to the ${WK.LABEL[r.kind]} workflow.` : '';
275
+ return done({ id: kid, from: r.from, kind: r.kind, scope: KS.scopeOf(r.kind), ...(sw ? { workflow: sw } : {}) },
276
+ `✓ ${kid}: ${WK.LABEL[r.from]} → ${WK.LABEL[r.kind]}.${moved} The Viewer shows it on its next refresh. Commit the record to keep it.\n ` + KS.describe(r.kind).join('\n '));
277
+ }
278
+ const d = rowsLib.deriveSync(root);
279
+ const row = d.ok ? d.rows.find((x) => x.id === kid) : null;
280
+ if (!row) return fail(`no initiative ${kid} here`);
281
+ let text = ''; try { text = row.record ? fs.readFileSync(path.resolve(root, String(row.record)), 'utf8') : ''; } catch { /* no line reads as product */ }
282
+ const k = KS.kindOfText(text); // the record's own kind: line, as the Board and the Viewer read it
283
+ if (json) { say(JSON.stringify({ ok: true, id: kid, kind: k, scope: KS.scopeOf(k), lines: KS.describe(k) })); return 0; }
284
+ say(`${kid} — ${row.title || kid}`);
285
+ for (const l of KS.describe(k)) say(' ' + l);
286
+ return 0;
287
+ }
288
+
289
+ if (verb === 'role') {
290
+ // kind-scope-chat-writes: Settings › General › New work starts as, in the same settings file the page reads
291
+ const SS = require('./settings-store.js'), WK = require('./work-kind.js');
292
+ const dir = require('./state-root.js').defaultRoot({ env: who.env });
293
+ if (pos.length > 1) { say('usage: pmos initiative role [product|project|sdlc]'); return 2; }
294
+ if (!pos.length) {
295
+ const k = SS.get(dir, 'work.role');
296
+ return done({ role: k }, `New work starts as ${WK.LABEL[k] || k}. Change it with pmos initiative role product|project|sdlc.`);
297
+ }
298
+ const r = SS.set(dir, 'work.role', pos[0]);
299
+ if (!r.ok) return fail(r.error || `role must be one of ${WK.KINDS.join(', ')}`, 2);
300
+ return done({ role: pos[0] }, `✓ New work starts as ${WK.LABEL[pos[0]]}. Settings shows it now. Each initiative can still change its own kind.`);
301
+ }
302
+
244
303
  if (verb === 'describe') {
245
304
  // initiative-description-field: the record's own description. Read with no text; write with text, only after the PM said yes.
246
305
  const did = pos[0];
@@ -106,7 +106,7 @@ function build(f) {
106
106
  // stage's To finish tasks are one kind of task (feedback batch 5, lib/task-items.js), Jira rows are read-only ──
107
107
  // every task the page draws (batch 7 item 7): a cap here left the 61st and later tasks with no editor, so a press fell back to the old list
108
108
  const items = (f.items || []).filter((t) => t && t.ini === id);
109
- const tracker = items.map((t, n) => ({ key: 'task:' + (t.uid || t.key || n), uid: t.uid || '', pmos: t.src === 'pmos', ref: t.key || t.ref || '', title: clip(t.title, 160), state: t.status || 'To do', src: t.src === 'jira' ? 'Jira (read-only)' : 'PMOS task', owner: t.owner || '', start: t.start || '', end: t.end || '', blocked: !!t.blocked, kind: t.kind || 'Task', notes: t.notes || '', readAt: t.readAt || '',
109
+ const tracker = items.map((t, n) => ({ key: 'task:' + (t.uid || t.key || n), uid: t.uid || '', pmos: t.src === 'pmos', ref: t.key || t.ref || '', title: clip(t.title, 160), state: t.status || 'To do', src: t.src === 'jira' ? 'Jira (read-only)' : 'PMOS task', owner: t.owner || '', start: t.start || '', end: t.end || '', blocked: !!t.blocked, kind: t.kind || 'Task', ...(t.milestone ? { milestone: true } : {}), notes: t.notes || '', readAt: t.readAt || '',
110
110
  ...(t.from ? { from: { stage: t.from.stage, finish: t.from.finish } } : {}), ...(t.store === 'item' ? { store: 'item' } : {}) }));
111
111
  const dv = sheet && sheet.derived;
112
112
  const reqs = dv && Array.isArray(dv.items) ? dv.items.slice(0, MAX_TASKS).map((x) => ({ key: 'req:' + x.id, ref: x.ref || x.id, title: clip(x.title, 160), state: null, src: 'PRD requirement' })) : [];
@@ -8,7 +8,7 @@
8
8
  * Stage project product sdlc
9
9
  * Triage, Discover hidden owned owned
10
10
  * Plan, Prioritize owned owned owned
11
- * Build watched (Jira) watched (Jira) owned (the factory opens pull requests)
11
+ * Build watched (milestone dates) watched (Jira) owned (the factory opens pull requests)
12
12
  * Deliver, Monitor, Evaluate owned owned owned
13
13
  * Gate Plan before start PRD and done test before build Done test and kill before build
14
14
  *
@@ -19,8 +19,12 @@
19
19
  * docHidden(kind, docKey) → bool
20
20
  * prePick(name, lane, role) → { kind, cue } lib/work-kind.js fromName, with the PM's role as the default when the name gives no cue
21
21
  * count(root) → n initiatives whose kind hides at least one stage (the health number)
22
+ * describe(kind) → [lines] the scope as a person reads it: the kind, owned, watched (and where), hidden, the gate
23
+ * writes() → [{ what, page, command }] each kind write the page offers, with the `pmos` command that does it from a chat
24
+ * (initiative kind-scope-chat-writes: anything the chat can be asked to change has a write path)
22
25
  *
23
- * node lib/kind-scope.js count [root] prints that number on its last line */
26
+ * node lib/kind-scope.js count [root] prints that number on its last line
27
+ * node lib/kind-scope.js writes prints how many kind writes have a pmos command, on its last line */
24
28
  const fs = require('fs');
25
29
  const path = require('path');
26
30
  const WK = require('./work-kind.js');
@@ -32,7 +36,7 @@ const TABLE = Object.freeze({
32
36
  product: Object.freeze({ ...all('owned'), build: 'watched' }),
33
37
  sdlc: Object.freeze(all('owned')),
34
38
  });
35
- const WATCH = Object.freeze({ project: { build: 'Jira' }, product: { build: 'Jira' }, sdlc: {} });
39
+ const WATCH = Object.freeze({ project: { build: 'milestone dates' }, product: { build: 'Jira' }, sdlc: {} });
36
40
  const GATE = Object.freeze({ project: 'Plan before start', product: 'PRD and done test before build', sdlc: 'Done test and kill before build' });
37
41
  const PRODUCT_DOCS = Object.freeze(new Set(['problem', 'research', 'prd', 'rubric', 'design']));
38
42
  const LOG = '[kind-scope]';
@@ -50,6 +54,24 @@ function prePick(name, lane, role) {
50
54
  return { kind: role, cue: '' };
51
55
  }
52
56
 
57
+ const STAGE_LABEL = Object.freeze({ triage: 'Triage', discover: 'Discover', plan: 'Plan', prioritize: 'Prioritize', build: 'Build', deliver: 'Deliver', monitor: 'Monitor', evaluate: 'Evaluate' });
58
+ function describe(kind) {
59
+ const s = scopeOf(kind), of = (v) => STAGES.filter((k) => s.stages[k] === v).map((k) => STAGE_LABEL[k]);
60
+ const lines = [`Kind: ${s.label}`, `Owned: ${of('owned').join(', ') || 'none'}`];
61
+ for (const k of STAGES) if (s.stages[k] === 'watched') lines.push(`${STAGE_LABEL[k]}: watched ${s.watch[k] === 'milestone dates' ? 'by' : 'in'} ${s.watch[k] || 'the tracker'}`);
62
+ lines.push(`Hidden: ${of('hidden').join(', ') || 'none'}${s.hidden.length ? ' (still in Move to a stage)' : ''}`);
63
+ if (s.kind === 'project') lines.push('Product documents (problem, research, PRD, rubric, design) sit in a closed fold');
64
+ lines.push(`Gate: ${s.gate}`);
65
+ return lines;
66
+ }
67
+
68
+ /** The kind writes the workspace page offers, each with its pmos command. A page write with no command is one the chat cannot make. */
69
+ const WRITES = Object.freeze([
70
+ Object.freeze({ what: "an initiative's kind", page: 'Viewer › kind switch (POST /api/initiatives/kind)', command: 'pmos initiative kind <id> product|project|sdlc' }),
71
+ Object.freeze({ what: 'the kind new work starts as', page: 'Settings › General › New work starts as (work.role)', command: 'pmos initiative role product|project|sdlc' }),
72
+ ]);
73
+ const writes = () => WRITES.map((w) => ({ ...w }));
74
+
53
75
  const kindLine = (text) => { const m = /^---\n([\s\S]*?)\n---/.exec(text); const l = m && /^kind:\s*(.+)$/m.exec(m[1]); return l ? WK.kindOf(l[1]) : 'product'; };
54
76
  function count(root) {
55
77
  let n = 0;
@@ -63,11 +85,17 @@ function count(root) {
63
85
 
64
86
  if (require.main === module) {
65
87
  const [verb, root] = process.argv.slice(2);
66
- if (verb !== 'count') { console.error('usage: node lib/kind-scope.js count [root]'); process.exit(2); }
88
+ if (verb === 'writes') {
89
+ const w = writes().filter((x) => x.command);
90
+ for (const x of w) console.log(`[kind-scope] ${x.what}: ${x.command}`);
91
+ console.log(String(w.length));
92
+ process.exit(0);
93
+ }
94
+ if (verb !== 'count') { console.error('usage: node lib/kind-scope.js count|writes [root]'); process.exit(2); }
67
95
  const r = path.resolve(root || process.cwd());
68
96
  const n = count(r);
69
97
  console.log(LOG + ' initiatives whose kind hides a stage in ' + r);
70
98
  console.log(String(n));
71
99
  }
72
100
 
73
- module.exports = { STAGES, TABLE, GATE, PRODUCT_DOCS, LOG, scopeOf, docHidden, prePick, count };
101
+ module.exports = { STAGES, TABLE, GATE, PRODUCT_DOCS, LOG, scopeOf, docHidden, prePick, count, describe, writes, kindOfText: kindLine };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.729.0",
3
+ "version": "0.730.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.729.0",
9
+ "version": "0.730.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.729.0",
3
+ "version": "0.730.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",
@@ -158,6 +158,15 @@ export function headModel(M, now = Date.now()) {
158
158
  const d = jira.filter((t) => t.state === 'Done').length;
159
159
  items.push({ kind: d === jira.length ? 'done' : 'jira', label: d + ' of ' + plural(jira.length, 'ticket', 'tickets') + ' Done in Jira', jd: d, jt: jira.length });
160
160
  }
161
+ // project-build-follows-milestones: a project's Build follows its milestone dates (lib/kind-scope.js WATCH), not Jira's engineers
162
+ const msBuild = !own && key === 'build' && sc && sc.watch && sc.watch.build === 'milestone dates';
163
+ if (msBuild) {
164
+ const ms = ((m.tasks && m.tasks.rows) || []).filter((t) => t.milestone);
165
+ const today = new Date(new Date(now).getFullYear(), new Date(now).getMonth(), new Date(now).getDate());
166
+ const msDone = ms.filter((t) => t.state === 'Done').length;
167
+ if (ms.length) items.push({ kind: msDone === ms.length ? 'done' : 'plan', label: msDone + ' of ' + plural(ms.length, 'milestone', 'milestones') + ' done' });
168
+ for (const t of ms) { const d = dayOf(t.end); if (t.state !== 'Done' && d && d < today) items.push({ kind: 'risk', label: t.title + ' is past its date', note: 'due ' + t.end }); }
169
+ }
161
170
  // the waiting record says who; a step that waits on the PM and is not in the list yet is added
162
171
  const youWait = ov.who === 'Waits on you';
163
172
  const step = own ? '' : String(ov.h || '').replace(/^Next: /, ''); // the engine's next step is Product feature's
@@ -165,8 +174,9 @@ export function headModel(M, now = Date.now()) {
165
174
  const done = items.filter((x) => x.kind === 'done'), rest = items.filter((x) => x.kind !== 'done');
166
175
  const life = acts.life || null;
167
176
  const turn = rest.some((x) => x.kind === 'you') ? 'you' : life === 'hold' || life === 'cancelled' || rest.some((x) => x.kind === 'risk') ? 'stalled'
177
+ : msBuild ? 'plan' // a project in Build: its milestones say where it is
168
178
  : rest.some((x) => x.kind === 'jira') || (!own && ((key === 'build' && !(sc && sc.stages.build === 'owned')) || key === 'deliver')) ? 'jira' : 'agents'; // Full SDLC owns Build: the factory, not Jira
169
- const TURN = { you: 'Your turn', agents: 'Agents working', jira: 'Engineers on it', stalled: life === 'hold' ? 'On hold' : life === 'cancelled' ? 'Cancelled' : 'Stalled' };
179
+ const TURN = { you: 'Your turn', agents: 'Agents working', jira: 'Engineers on it', plan: 'On plan', stalled: life === 'hold' ? 'On hold' : life === 'cancelled' ? 'Cancelled' : 'Stalled' };
170
180
  // time in the stage: a record that holds it (stageSince, usualDays) first, then the planned finish, then say it is not recorded
171
181
  let time = '', over = false, clock = null;
172
182
  const since = dayOf(m.stageSince || head.stageSince), usual = Number.isFinite(m.usualDays) ? m.usualDays : Number.isFinite(head.usualDays) ? head.usualDays : null;
@@ -181,10 +191,11 @@ export function headModel(M, now = Date.now()) {
181
191
  time = 'In ' + cur.label + ' · ' + finish; over = !!end && end < new Date(new Date(now).getFullYear(), new Date(now).getMonth(), new Date(now).getDate()) && life !== 'done' && !head.closed;
182
192
  } else if (cur) time = 'In ' + cur.label + ' · time in this stage is not recorded';
183
193
  // one CTA: your step when it waits on you, else a question for the read-only agent
184
- const cta = turn === 'you' ? (CTA_SAY[step] || ('Open ' + (step || 'the next step'))) : turn === 'stalled' ? 'Ask what is stuck' : turn === 'jira' ? 'Ask about the tickets' : 'Ask what is next';
194
+ const cta = turn === 'you' ? (CTA_SAY[step] || ('Open ' + (step || 'the next step'))) : turn === 'stalled' ? 'Ask what is stuck' : turn === 'jira' ? 'Ask about the tickets' : turn === 'plan' ? 'Ask about the milestones' : 'Ask what is next';
185
195
  const ask = turn === 'you' && isFailedReview(m) ? 'The Review Gate failed for this initiative. Read its latest verdict and findings in planning/runs/evals.jsonl, list each failing dimension with the evidence, and say what would fix it. Change nothing.'
186
196
  : turn === 'you' ? ASK_SAY[step] || 'What do I need to do next on this initiative? Read the evidence in this repository, say what you could not find, and change nothing.'
187
197
  : turn === 'stalled' ? 'What is stuck in this initiative, and what would move it? Read this repository, say what you could not find, and change nothing.'
198
+ : turn === 'plan' ? 'Where do this project\'s milestones stand against their dates? Name each one that is late or at risk and what it waits on, and change nothing.'
188
199
  : turn === 'jira' ? 'Where do this initiative\'s Jira tickets stand, from the last Jira read? Name the assignee of each where the read holds one, and change nothing.'
189
200
  : 'What happens next in this initiative, and who does it? Read this repository and change nothing.';
190
201
  const anchor = m.anchor ? ' Moves ' + m.anchor + '.' : '';
@@ -220,7 +231,7 @@ function itemHtml(x) {
220
231
 
221
232
  /** The card's box under the top row. o: { folded, doneOpen, title } */
222
233
  export function headHtml(h, o = {}) {
223
- const dot = { you: 'you m-info', agents: 'ok', jira: 'ok', stalled: 'late m-warn' }[h.turn] || 'q';
234
+ const dot = { you: 'you m-info', agents: 'ok', jira: 'ok', plan: 'ok', stalled: 'late m-warn' }[h.turn] || 'q';
224
235
  const ladder = `<div class="czi-lad" aria-label="${esc(h.ladderAria)}" role="img">${h.prev ? `<span class="czi-prev"><svg class="cz-ck" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12l4.5 4.5L19 7"/></svg> ${esc(h.prev)}</span>${CHEV}` : ''}<b>${esc(h.cur)}</b>${h.toReach ? CHEV + `<span class="czi-next">${esc(h.toReach)}</span>` : ''}</div>`
225
236
  + `<div class="cz-ladder czi-bars" aria-hidden="true">${h.steps.map((s) => `<i class="${[s.cls, s.ms ? 'ms' : ''].filter(Boolean).join(' ')}" title="${esc(s.label)}"></i>`).join('')}</div>`;
226
237
  const folded = `<button type="button" class="czi-fold" data-czfold aria-expanded="false"><b>${esc(h.checkTitle)}</b><span>${esc(h.foldSum)}</span>${DOWN}</button>`;