create-pmos 0.310.0 → 0.311.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.310.0",
3
+ "version": "0.311.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": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@99ac304
1
+ kernel-source: pmos@ae8712a
2
2
  assembled: 2026-10-19
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-10-19T12:47:33Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T12:56:28Z"}
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-10-19T12:47:33Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T12:56:28Z"}
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-10-19T12:47:33Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-19T12:56:28Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -74,7 +74,9 @@ const ready = (model) => ({ status: 200, body: { ok: true, state: 'ready', model
74
74
  ok('C2 merges, blocked and idle are counted; blocked and idle have no chart and say no history is kept', tiles[1].v === '3' && tiles[1].chart && tiles[2].v === '1' && tiles[2].c === 'of 3 open. No history is kept' && !tiles[2].chart && tiles[3].v === '1' && !tiles[3].chart && /\bbad\b/.test(tiles[2].cls) && /\bwarn\b/.test(tiles[3].cls), JSON.stringify(tiles));
75
75
  const per = await p.evaluate(() => [...document.querySelectorAll('#perTabs button')].map((b) => b.textContent + ':' + b.getAttribute('aria-pressed') + ':' + (b.getAttribute('aria-disabled') || '')).join('|'));
76
76
  ok('C2 only Week is available; Day and Month are disabled', per === 'Day:false:true|Week:true:|Month:false:true', per);
77
- ok('C2 no target, on-target chip, dashed line or demo label is drawn', await p.evaluate(() => !document.querySelector('#cMet .mchip, #cMet .tg, #cMet .tgl') && !/target|demo/i.test(document.querySelector('#cMet').textContent)));
77
+ ok('C2 no target, on-target chip, dashed line or demo label is drawn; the lead line says no measure has a target', await p.evaluate(() => !document.querySelector('#cMet .mchip.ok, #cMet .tg, #cMet .tgl') && !/on target|demo|dashed/i.test(document.querySelector('#metBody').textContent) && /No measure here has a target/.test(document.querySelector('#metHint').textContent)));
78
+ const look = await p.evaluate(() => ({ chips: [...document.querySelectorAll('#metBody .mt1')].map((t) => (t.querySelector('.mchip') || {}).textContent || ''), off: [...document.querySelectorAll('#metBody .mt1')].map((t) => t.classList.contains('off')), lead: (document.querySelector('#metHint .mflag') || {}).textContent || '', ins: (document.querySelector('#metHint a#metIns') || {}).getAttribute ? document.querySelector('#metHint a#metIns').getAttribute('href') : '' }));
79
+ ok('C2 the tiles that need a look carry the chip and the orange outline; the lead line counts them and links to Insights', JSON.stringify(look.off) === JSON.stringify(tiles.map((t) => /\b(warn|bad)\b/.test(t.cls))) && look.chips.every((c, i) => (c === 'Needs a look') === look.off[i]) && look.lead === look.off.filter(Boolean).length + ' of 4 need a look.' && /^\/premium-insights\.html\?ws=/.test(look.ins), JSON.stringify(look));
78
80
  {
79
81
  const gap = metrics({ runs: null, commits: null, inits: null });
80
82
  const R = await open({ answers: () => ready(gap) });
@@ -169,6 +171,7 @@ const ready = (model) => ({ status: 200, body: { ok: true, state: 'ready', model
169
171
  for (const k of Object.keys(a[n])) {
170
172
  const geom = k === 'left' || k === 'width';
171
173
  if (geom && ((k === 'width' && SKIP_W.has(n)) || (k === 'left' && SKIP_L.has(n)))) continue;
174
+ if (k === 'boxShadow' && /^t[1-4]$/.test(n)) continue; // a tile that needs a look carries the orange outline here; the mockup's real board draws it only off target
172
175
  if (geom ? Math.abs(a[n][k] - c[n][k]) > 2 : a[n][k] !== c[n][k]) diffs.push(`${n}.${k} ${a[n][k]} | ${c[n][k]}`);
173
176
  }
174
177
  }
@@ -237,7 +237,7 @@ Board is the third place on the rail, at `/premium-board.html`. It reads what th
237
237
  - **By stage** has one column for each stage of the board's workflow with the board's own count and its first five initiatives.
238
238
  - **List** and **Timeline** show ten tasks a page with Previous and Next; **By stage** shows six cards a column with Show more. **Timeline** draws a bar for each initiative that has both a start and an end date, with the days left or over, and counts the rest. With no dates on record it says so and draws nothing.
239
239
  - **Sprint** appears when an agent session has read Jira for the board. Otherwise it says there is none. **Coming up** shows the next release, from the releases ledger.
240
- - **Metrics** appears above the Initiatives card on the board of any workspace except the home one (PMOS itself), and counts from that workspace's own repository. It has four tiles. **Corrections per 100 runs** is the corrections logged on the week's runs in `planning/runs/agent-runs.jsonl`; a week with fewer than 10 runs is left blank. **Merged a week** counts the commits on the first-parent line of the trunk. **Blocked** and **Idle for a month** come from the workflow engine and keep no history, so they have no chart. Move over a chart, or use the arrow keys, to read a week. A tile that cannot be counted says **Not read** and why. Press a tile for its definition and values, with the read-only agent beside it. There are no targets, and Day and Month are off. It was tested only on made-up repositories, not on a real IDPF or microsite repository.
240
+ - **Metrics** appears above the Initiatives card on the board of any workspace except the home one (PMOS itself), and counts from that workspace's own repository. It has four tiles. **Corrections per 100 runs** is the corrections logged on the week's runs in `planning/runs/agent-runs.jsonl`; a week with fewer than 10 runs is left blank. **Merged a week** counts the commits on the first-parent line of the trunk. **Blocked** and **Idle for a month** come from the workflow engine and keep no history, so they have no chart. Move over a chart, or use the arrow keys, to read a week. A tile that cannot be counted says **Not read** and why; a repository with no run log says **No runs yet**. The line above the tiles starts with how many tiles need a look, and those tiles have a **Needs a look** chip and an orange outline. The line ends with **open Insights**, which opens the same board's Insights page. Press a tile for its definition and values, with the read-only agent beside it. There are no targets, and Day and Month are off. It was tested only on made-up repositories, not on a real IDPF or microsite repository.
241
241
  - **The crumb** at the top names the board. With more than one board a menu switches between them, and the sparkle opens the board in the dialog with the read-only agent.
242
242
  - **Core documents** lists the board's documents with their state, cadence and writer, a summary (drafts to review, not started, up to date), a progress bar, a filter and a search. A document with a file opens in the dialog, read only, with its path and state; a draft there has **Issue it**, which marks it issued through the console's own route and sends nothing, and **Draft it again**, which starts a new draft that replaces this one (a board draft has no Edit tab). **Draft it** starts the existing read-only run that writes a draft and sends nothing; **Draft the N not started** does that for each document that can be drafted. **Set it up** and **Open** go to the console. **Add a document** opens a form (title, who writes it, where it lives) and saves a document the core set does not cover on the board's record, in `custom-docs.jsonl`. A document with no link reads "Not started". A document with a link to Confluence or Google Docs reads "Linked" and shows its address. PMOS does not read or sync the linked page, so a linked document is never counted as up to date. Issue and Drop are not on this page.
243
243
  - **Opening an initiative.** A click on an initiative opens its page (see "Initiative page"). The **Page / Popup** switch in the header changes that: Popup opens the initiative's dialog instead, which shows its record as a grid and the path of its file, with the read-only agent beside it. The choice is kept in this browser. The dialog holds no press.
@@ -6,7 +6,9 @@
6
6
  * weeksTo(now, n) → [{ from, to, label }] PURE. The n weeks (Monday to Sunday, UTC) that end with the week of `now`.
7
7
  *
8
8
  * THE RULE THE FILE FOLLOWS: a number is made only from a record of the repository it names. A source that cannot be read is "Not read", a
9
- * week with too few runs is blank, and no target exists, so no tile is "on target" or "off target". Blocked and Idle keep no history and have no chart. */
9
+ * repository with no run log has "No runs yet", a week with too few runs is blank, and no target exists, so no tile is "on target" or "off target".
10
+ * A tile that needs a look (kind warn or bad) is marked `look`; the page draws that with the mockup's chip and orange outline. Blocked and Idle keep no
11
+ * history and have no chart. */
10
12
  const fs = require('fs');
11
13
  const path = require('path');
12
14
  const { execFile } = require('child_process');
@@ -44,7 +46,8 @@ function build(f) {
44
46
  const tiles = [];
45
47
 
46
48
  // corrections per 100 runs
47
- if (f.runs == null) tiles.push({ key: 'corrections', label: 'Corrections per 100 runs', absent: 'Not read', why: 'planning/runs/agent-runs.jsonl could not be read in ' + repo + '.', def: DEFS.corrections });
49
+ if (f.runs === 'missing') tiles.push({ key: 'corrections', label: 'Corrections per 100 runs', absent: 'No runs yet', why: 'No agent run is logged in ' + repo + ' yet. Runs are read from planning/runs/agent-runs.jsonl.', def: DEFS.corrections });
50
+ else if (f.runs == null) tiles.push({ key: 'corrections', label: 'Corrections per 100 runs', absent: 'Not read', why: 'planning/runs/agent-runs.jsonl could not be read in ' + repo + '.', def: DEFS.corrections });
48
51
  else {
49
52
  const per = W.map((w) => {
50
53
  const rs = f.runs.filter((r) => { const t = Date.parse(r.created_at); return Number.isFinite(t) && t >= w.from && t < w.to && Number.isFinite(Number(r.human_corrections)); });
@@ -86,11 +89,15 @@ function build(f) {
86
89
  t.rowKey = 'board:metric-' + t.key;
87
90
  return { key: t.rowKey, id: null, title: t.label, sub: 'Metric · ' + repo, dialog: { say, facts, files: [] } };
88
91
  });
89
- const look = tiles.filter((t) => t.kind === 'warn' || t.kind === 'bad').length;
92
+ tiles.forEach((t) => { t.look = t.kind === 'warn' || t.kind === 'bad'; });
93
+ const look = tiles.filter((t) => t.look).length;
94
+ const lead = look ? look + ' of ' + tiles.length + ' need a look.' : '';
95
+ const body = 'Each chart is one measure over the last ' + WEEKS + ' weeks. No measure here has a target, so none is on or off target. Orange needs a look. Press a measure for its definition and values. A week with fewer than ' + MIN_RUNS + ' runs is left blank.';
90
96
  return {
91
97
  state: 'ready', pending: !!f.initsPending, repo,
92
98
  header: missing.length ? 'not read: ' + missing.join(', ') : 'counted from ' + repo,
93
- hint: (look ? look + ' of ' + tiles.length + ' need a look. ' : '') + 'Each chart is one measure over the last ' + WEEKS + ' weeks. Press a measure for its definition and values. A week with fewer than ' + MIN_RUNS + ' runs is left blank.',
99
+ look, lead, body,
100
+ hint: (lead ? lead + ' ' : '') + body + ' For the KR measures and your own set of charts, open Insights.',
94
101
  note: 'Counted from ' + repo + ': corrections from planning/runs/agent-runs.jsonl, merges from the history of its trunk, blocked and idle from its workflow state, in weeks to ' + W[W.length - 1].label + '. A week with fewer than ' + MIN_RUNS + ' runs is blank. Blocked and idle keep no history.',
95
102
  tiles, rows,
96
103
  };
@@ -108,7 +115,9 @@ async function readCommits(root, now) {
108
115
  }
109
116
 
110
117
  function readRuns(root) {
111
- try { return fs.readFileSync(path.join(root, 'planning', 'runs', 'agent-runs.jsonl'), 'utf8').split('\n').map((l) => l.trim()).filter(Boolean).map((l) => { try { return JSON.parse(l); } catch { return null; } }).filter(Boolean); } catch { return null; }
118
+ const file = path.join(root, 'planning', 'runs', 'agent-runs.jsonl');
119
+ if (!fs.existsSync(file)) return 'missing';
120
+ try { return fs.readFileSync(file, 'utf8').split('\n').map((l) => l.trim()).filter(Boolean).map((l) => { try { return JSON.parse(l); } catch { return null; } }).filter(Boolean); } catch { return null; }
112
121
  }
113
122
 
114
123
  /** The card of one repository. Runs and history are read at once; the workflow state is slow, so it is derived in the background and kept until the repository changes. */
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.310.0",
3
+ "version": "0.311.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.310.0",
9
+ "version": "0.311.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.310.0",
3
+ "version": "0.311.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",
@@ -233,12 +233,13 @@ const metFmt = (m, v) => (+v).toFixed(m.dec) + (m.suf || '');
233
233
 
234
234
  function metTileHtml(t, i) {
235
235
  if (t.absent) return `<div class="mt1" data-m="${i}" data-op="m:${i}" tabindex="0" role="button" aria-label="${esc(t.label)}: ${esc(t.absent)}. ${esc(t.why)}"><span>${esc(t.label)}</span><b class="mval">${esc(t.absent)}</b><em class="mwk">${esc(t.why)}</em></div>`;
236
+ const lab = t.look ? `<span class="mlab">${esc(t.label)}<i class="mchip warn">Needs a look</i></span>` : `<span>${esc(t.label)}</span>`, off = t.look ? ' off' : '';
236
237
  const chg = t.change ? `<span class="mchg ${t.change.d === 0 ? '' : t.change.good ? 'good' : 'bad'}">${t.change.d === 0 ? '' : t.change.d > 0 ? '▲ ' : '▼ '}${esc(t.change.txt)}</span>` : '';
237
- if (!t.ser) return `<div class="mt1 ${t.kind}" data-m="${i}" data-op="m:${i}" tabindex="0" role="button" aria-label="${esc(t.label)}, ${esc(t.value)}, ${esc(t.text)}"><span>${esc(t.label)}</span><b class="mval">${esc(t.value)}</b><em class="mwk">${esc(t.text)}</em></div>`;
238
+ if (!t.ser) return `<div class="mt1 ${t.kind}${off}" data-m="${i}" data-op="m:${i}" tabindex="0" role="button" aria-label="${esc(t.label)}, ${esc(t.value)}, ${esc(t.text)}${t.look ? ', needs a look' : ''}">${lab}<b class="mval">${esc(t.value)}</b><em class="mwk">${esc(t.text)}</em></div>`;
238
239
  const g = metGeo(t); let ln = '', op = false;
239
240
  t.ser.forEach((v, j) => { if (v == null) { op = false; return; } ln += (op ? 'L' : 'M') + g.X(j).toFixed(1) + ',' + g.Y(v).toFixed(1); op = true; });
240
241
  const f = Math.max(0, t.ser.findIndex((v) => v != null)), gap = t.ser.slice(f).some((v) => v == null), n1 = g.n - 1, lastJ = t.ser.reduce((a, v, j) => (v != null ? j : a), f);
241
- return `<div class="mt1 mch ${t.kind}" data-m="${i}" data-op="m:${i}" tabindex="0" role="button" aria-label="${esc(t.label)} over eight weeks, now ${esc(t.value)}. Use the arrow keys to read each week."><span>${esc(t.label)}</span><b class="mval">${esc(t.value)}</b><em class="mwk">${esc(t.text)}</em>${chg}`
242
+ return `<div class="mt1 mch ${t.kind}${off}" data-m="${i}" data-op="m:${i}" tabindex="0" role="button" aria-label="${esc(t.label)} over eight weeks, now ${esc(t.value)}${t.look ? ', needs a look' : ''}. Use the arrow keys to read each week.">${lab}<b class="mval">${esc(t.value)}</b><em class="mwk">${esc(t.text)}</em>${chg}`
242
243
  + `<svg viewBox="0 0 ${g.W} ${g.H}">${f > 0 ? `<line class="gp" x1="${g.X(0)}" x2="${g.X(f)}" y1="${g.H - g.P}" y2="${g.H - g.P}"/>` : ''}${gap ? '' : `<path class="ar" d="${ln}L${g.X(n1)},${g.H}L${g.X(f)},${g.H}Z"/>`}<path class="ln2" d="${ln}"/><line class="cx" x1="0" x2="0" y1="0" y2="${g.H}"/><circle class="dt" cx="${g.X(lastJ)}" cy="${g.Y(t.ser[lastJ])}" r="3.5"/></svg>`
243
244
  + `<span class="mfoot"><i>${esc(t.wk[0])}</i><i>${esc(t.wk[t.wk.length - 1])}</i></span></div>`;
244
245
  }
@@ -260,7 +261,8 @@ function metDraw() {
260
261
  const card = $('#cMet'); if (!MM) { card.hidden = true; return; }
261
262
  card.hidden = false;
262
263
  $('#metCap').textContent = MM.header;
263
- $('#metHint').textContent = MM.hint;
264
+ const ins = '/premium-insights.html' + (M.board.ws ? '?ws=' + encodeURIComponent(M.board.ws) + (M.board.id ? '&board=' + encodeURIComponent(M.board.id) : '') : '');
265
+ $('#metHint').innerHTML = (MM.lead ? `<b class="mflag">${esc(MM.lead)}</b> ` : '') + esc(MM.body || MM.hint) + ` For the KR measures and your own set of charts, <a class="lk" id="metIns" href="${esc(ins)}">open Insights</a>.`;
264
266
  $('#metBody').style.gridTemplateColumns = 'repeat(' + Math.min(4, MM.tiles.length) + ',minmax(0,1fr))';
265
267
  $('#metBody').innerHTML = MM.tiles.map(metTileHtml).join('');
266
268
  $('#metNote').textContent = MM.note;
@@ -1973,6 +1973,9 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
1973
1973
  .dzcg{display:grid;grid-template-columns:1fr 1fr;gap:12px}
1974
1974
  @media (max-width:700px){.dzcg{grid-template-columns:1fr}}
1975
1975
  .dzch{margin-bottom:6px}
1976
+ /* board Metrics card: the lead line's inline "open Insights" link, as the mockup draws it */
1977
+ .mhint .lk{display:inline;font-size:12.5px;font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:2px;padding:0}
1978
+ .mhint .lk:hover{color:var(--ember-ink)}
1976
1979
 
1977
1980
  .rdbtns{display:inline-flex;gap:6px;align-items:center}
1978
1981
  .wkd .wkc{font:400 12px var(--sans);letter-spacing:0;text-transform:none;padding:12px 4px 10px}