create-pmos 0.658.0 → 0.660.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.658.0",
3
+ "version": "0.660.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": {
@@ -33,6 +33,25 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.660.0",
38
+ "at": "2026-11-22T03:56:11.761Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1444,
43
+ "t": "Library is built from the design system's blocks",
44
+ "s": "Library is built from the design system's blocks",
45
+ "k": "new"
46
+ },
47
+ {
48
+ "n": 1445,
49
+ "t": "Pmos design drift, the design drift guard",
50
+ "s": "Pmos design drift, the design drift guard",
51
+ "k": "new"
52
+ }
53
+ ]
54
+ },
36
55
  {
37
56
  "v": "0.658.0",
38
57
  "at": "2026-11-22T03:38:17.292Z",
@@ -309,19 +328,6 @@
309
328
  "k": "new"
310
329
  }
311
330
  ]
312
- },
313
- {
314
- "v": "0.632.0",
315
- "at": "2026-11-19T11:23:46.354Z",
316
- "f": 4,
317
- "prs": [
318
- {
319
- "n": 1414,
320
- "t": "Set up the Meet panel from Settings › Connectors › Google Meet",
321
- "s": "Set up the Meet panel from Settings › Connectors › Google Meet",
322
- "k": "new"
323
- }
324
- ]
325
331
  }
326
332
  ]
327
333
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@c6e6eef1
1
+ kernel-source: pmos@58c68d24
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-22T03:38:13Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T03:56:08Z"}
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-22T03:38:13Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T03:56:08Z"}
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-22T03:38:13Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T03:56:08Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,23 @@
1
1
  [
2
+ {
3
+ "v": "0.660.0",
4
+ "at": "2026-11-22T03:56:11.761Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1444,
9
+ "t": "Library is built from the design system's blocks",
10
+ "s": "Library is built from the design system's blocks",
11
+ "k": "new"
12
+ },
13
+ {
14
+ "n": 1445,
15
+ "t": "Pmos design drift, the design drift guard",
16
+ "s": "Pmos design drift, the design drift guard",
17
+ "k": "new"
18
+ }
19
+ ]
20
+ },
2
21
  {
3
22
  "v": "0.658.0",
4
23
  "at": "2026-11-22T03:38:17.292Z",
@@ -304,6 +304,13 @@ Only PMOS's impact run uses these. The server pins each run to your ledger. Outs
304
304
  - `pmos drift replay`: the replay of the last four weeks of this repository.
305
305
  - `pmos drift status`: the last weekly result and the replays on record.
306
306
 
307
+ ### pmos design drift: pages that drift from the design system
308
+
309
+ - `pmos design drift`: for each page, the share of its classes that your design system defines, its own CSS rules, the system parts it draws again, and its raw colours. It ends with the pages to rebuild next, lowest share first. It reads git only.
310
+ - `--base <ref>` compares with an earlier commit and marks each page drift, rebuilt, not rebuilt or unchanged. `--base week` uses the last commit a week earlier.
311
+ - `--weeks <n>` adds the mean share at the end of each of the last n weeks. `--write` writes the report to `planning/reports/`. `--gate` exits 1 when a page drifts.
312
+ - A product names its pages and system sheets in `design-drift.json` in its design-system folder, for example `{ "pages": ["web/*.html"], "assetBase": "web", "systemSheets": ["ds.css"] }`.
313
+
307
314
  ## Initiatives and the Board
308
315
 
309
316
  ### pmos initiative
@@ -195,7 +195,7 @@ A Jira date and the planned finish of an initiative get no ✓: PMOS cannot writ
195
195
 
196
196
  ## Library
197
197
 
198
- **Library** in the navigation is a catalogue of everything that was made for your work, from every product: documents, links, meeting notes and prototypes. Each thing is one row with the same columns: **Name**, **Kind**, **Product**, **About**, **By**, **State** and **Updated**. Reports are not here: a report repeats, so it lives in Routine.
198
+ **Library** in the navigation is a catalogue of everything that was made for your work, from every product: documents, links, meeting notes and prototypes. Each thing is one row: its kind icon, its name, a grey line with its kind, product (when you have two or more), what it is about, who made it and the day, and its state when it is not Final. Reports are not here: a report repeats, so it lives in Routine.
199
199
 
200
200
  - **Kind** says what the thing is: PRD, Strategic brief, Design brief, Done test, Meeting notes, Prototype, Link · Confluence, and so on. PMOS reads it from the file's `type` first, then from its title ("Brief: …") and its file name. When the title only repeats the kind, the name leaves it out: "Brief: Scarlet lucky draw" shows as "Scarlet lucky draw", Kind Strategic brief.
201
201
  - **About** is the program and the initiative ("Project Ascent › Tender new CIAM"). It is empty when it repeats the name.
@@ -205,13 +205,13 @@ A Jira date and the planned finish of an initiative get no ✓: PMOS cannot writ
205
205
  - Grouped by New, the checks PMOS keeps for one initiative (done test, rubric, retro) fold into one **Checks** row.
206
206
 
207
207
  1. To narrow the list, use the chips at the top: **Kind** (a family, such as Briefs, or one kind inside it), the product, program and project chip, and **State**. Each shows how many rows it has. When a chip hides rows, a grey line says how many; press **Show all** to clear the chips.
208
- 2. To group the list, press the tune button and pick **New** (this week, earlier this month, older), **Work** (each program and initiative is a shelf, with one row per kind in the order of the work), **Kind** or **Product**. Press a shelf to fold it.
208
+ 2. To group the list, press the **Group** chip and pick **New** (this week, earlier this month, older), **Work** (each program and initiative is a shelf, with one row per kind in the order of the work), **Kind** or **Product**. Press a shelf to fold it.
209
209
  3. To find a thing, type in **Find in Library**, or press `/`. Titles that match show at once. Under them, **Also about this** lists the documents and notes that are about your words by meaning, each with the passage that matched and the idea in bold. PMOS reads them for meaning in a normal PMOS session; until it answers, or when it cannot, they are ranked by shared words and the line says so.
210
210
  4. A meeting note with no title shows the name PMOS gave it, with ✦. Press ✦ to keep the name or type another. A note with no work shows ✦ and the initiative it talks about: press it to link the note to that work.
211
211
  5. To add a file, a link or a new document, press **+**. Ask PMOS opens with "Add to Library" in the box. Say what to add; PMOS fills its kind, product and work and shows you the record.
212
- 6. To open a thing, press its row. It opens in the popup with the chat about it. On a screen 1600 px or wider, the first press shows the record at the right: every field, the first lines, the files that link to it and its editions. Press again, press Enter or press the open button to open it. A link opens in a new browser tab.
212
+ 6. To open a thing, press its row. It opens in the popup with the chat about it. On a screen 1200 px or wider, the first press shows the record at the right: every field, the first lines, the files that link to it and its editions. Press again, press Enter or press the open button to open it. A link opens in a new browser tab.
213
213
 
214
- The Library is drawn with the PMOS design system: the list is one table card, the row you picked is lit, and the record at the right is a card with its fields. On a phone the table shows the kind, the name and the day only. While the list loads, three soft lines stand in for it. When the list cannot be read, one line says why, with **Retry**.
214
+ The Library is built from the PMOS design system's blocks. The top line is the path, the product chip, then **+** and **More** (Show all, Read the Library again). The search box is always shown. The list is one card of rows, the row you picked is lit, and the record at the right is a card with its fields. On a phone a row shows the kind, the name and the day only. While the list loads, three soft lines stand in for it. When the list cannot be read, one line says why, with **Retry**.
215
215
 
216
216
  The notes of a held meeting look the same wherever you open them: a short summary, the decisions, the tasks that came out of it, and your notes. On the right, **The meeting** says when it was held, what it is about, who was there and what the notes were written from. Press a task to open its initiative. When some tasks are not in the initiative's Work breakdown, PMOS suggests adding them: press ✓ to add them, or ✕. Press the recording, or **Transcript and more**, for the replay, the transcript and the material.
217
217
 
@@ -0,0 +1,115 @@
1
+ 'use strict';
2
+ /* design-cli.js — `pmos design drift`: which pages are built from this product's design system, and which drift from it (initiative
3
+ * design-drift-guard; lib/design-drift.js does the measuring).
4
+ *
5
+ * pmos design drift [--ref <ref>] [--base <ref>|week] [--weeks <n>] [--json] [--write] [--gate]
6
+ * --ref the commit to measure (default HEAD). WORKTREE measures the files on disk, saved or not.
7
+ * --base compare with this commit. `week` is the last commit a week before --ref. Without --base, the pages are only listed.
8
+ * --weeks add the mean system share at the end of each of the last n weeks (1 to 12)
9
+ * --json print the rows as JSON
10
+ * --write write the report to planning/reports/design-drift-<date>.md (the only write this command makes)
11
+ * --gate exit 1 when a page drifts against --base (for a CI step later; no CI runs it today)
12
+ *
13
+ * Run it in the product's repository. It reads git only and changes nothing else. Exit codes: 0 done, 1 a page drifts (only with --gate)
14
+ * or the refs cannot be read, 2 usage. */
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+ const D = require('./design-drift.js');
18
+
19
+ const COMMANDS = { design: ['drift'] };
20
+ const USAGE = [
21
+ 'usage: pmos design drift — which pages are built from this product\'s design system, and which drift from it',
22
+ ' pmos design drift [--ref <ref>] [--base <ref>|week] [--weeks <n>] [--json] [--write] [--gate]',
23
+ ' --ref <ref> the commit to measure (default HEAD; WORKTREE reads the files on disk)',
24
+ ' --base <ref> compare with this commit; "week" is the last commit a week earlier',
25
+ ' --weeks <n> the mean system share at the end of each of the last n weeks (1 to 12)',
26
+ ' --write write the report to planning/reports/design-drift-<date>.md',
27
+ ' --gate exit 1 when a page drifts against --base',
28
+ 'It reads git only. A product sets its pages and system sheets in design-drift.json in its design-system folder.',
29
+ ];
30
+ const FLAGS = new Set(['ref', 'base', 'weeks', 'json', 'write', 'gate', 'repo']);
31
+ const BOOL = new Set(['json', 'write', 'gate']);
32
+
33
+ function parse(args) {
34
+ const pos = [], flags = {};
35
+ for (let i = 0; i < args.length; i++) {
36
+ const a = args[i];
37
+ if (!a.startsWith('--')) { pos.push(a); continue; }
38
+ const k = a.slice(2);
39
+ if (BOOL.has(k)) flags[k] = true;
40
+ else flags[k] = args[i + 1] !== undefined && !String(args[i + 1]).startsWith('--') ? args[++i] : '';
41
+ }
42
+ return { pos, flags };
43
+ }
44
+ function repoRoot(cwd) {
45
+ const out = D.gitOut(cwd, ['rev-parse', '--show-toplevel']);
46
+ return out ? out.trim() : null;
47
+ }
48
+ const pct = (x) => Math.round(100 * x) + '%';
49
+ const short = (p) => p.replace(/^.*\//, '').replace(/\.html?$/i, '');
50
+
51
+ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), now = Date.now() } = {}) {
52
+ const args = argv[0] === 'design' ? argv.slice(1) : argv.slice();
53
+ const sub = args[0];
54
+ if (!sub || ['help', '--help', '-h'].includes(sub)) { for (const l of USAGE) say(l); return sub ? 0 : 2; }
55
+ if (!COMMANDS.design.includes(sub)) { say(`unknown design command "${sub}". Use one of: ${COMMANDS.design.join(', ')}`); return 2; }
56
+ const { pos, flags } = parse(args.slice(1));
57
+ if (pos.length) { say(`✗ pmos design ${sub} takes no argument`); return 2; }
58
+ for (const k of Object.keys(flags)) if (!FLAGS.has(k)) { say(`✗ --${k} is not an option of pmos design drift`); return 2; }
59
+ for (const k of ['ref', 'base', 'weeks', 'repo']) if (k in flags && !flags[k]) { say(`✗ --${k} needs a value`); return 2; }
60
+ const weeks = flags.weeks === undefined ? 0 : Number(flags.weeks);
61
+ if (!Number.isInteger(weeks) || weeks < 0 || weeks > 12) { say('✗ --weeks is a whole number from 1 to 12'); return 2; }
62
+ if (flags.gate && !flags.base) { say('✗ --gate needs --base: it fails only a page that drifts against an earlier commit'); return 2; }
63
+
64
+ const repo = repoRoot(flags.repo ? path.resolve(cwd, flags.repo) : cwd);
65
+ if (!repo) { say('✗ this is not a git repository. Run pmos design drift in your product\'s repository.'); return 1; }
66
+ const ref = flags.ref || 'HEAD';
67
+ const worktree = ref === 'WORKTREE';
68
+ if (!worktree && !D.gitOut(repo, ['rev-parse', '--verify', '--quiet', ref + '^{commit}'])) { say(`✗ no commit "${ref}" in this repository`); return 1; }
69
+ let base = flags.base || null;
70
+ if (base === 'week') {
71
+ const when = worktree ? new Date(now) : new Date(D.gitOut(repo, ['show', '-s', '--format=%cI', ref]).trim());
72
+ const sha = (D.gitOut(repo, ['rev-list', '-1', `--before=${new Date(when.getTime() - 7 * 86400000).toISOString()}`, worktree ? 'HEAD' : ref]) || '').trim();
73
+ if (!sha) { say('✗ no commit a week before ' + ref); return 1; }
74
+ base = sha.slice(0, 8);
75
+ }
76
+ if (base && !D.gitOut(repo, ['rev-parse', '--verify', '--quiet', base + '^{commit}'])) { say(`✗ no commit "${base}" in this repository`); return 1; }
77
+
78
+ const head = D.measure(repo, ref);
79
+ if (head.config.error) { say('✗ ' + head.config.error); return 1; }
80
+ const before = base ? D.measure(repo, base) : null;
81
+ const rows = before ? D.compare(before, head) : head.pages;
82
+ const trend = weeks ? D.trend(repo, worktree ? 'HEAD' : ref, weeks, { now: worktree ? now : Date.parse(D.gitOut(repo, ['show', '-s', '--format=%cI', ref]).trim()) }) : null;
83
+ const date = new Date(now).toISOString().slice(0, 10);
84
+ const view = { date, ref, commit: head.commit, base, baseCommit: before && before.commit, rows, compared: !!before, trend, config: head.config, shared: head.shared };
85
+ const drifting = rows.filter((r) => r.status === 'drift');
86
+
87
+ if (flags.json) {
88
+ say(JSON.stringify({ ok: true, ref, commit: head.commit, base, baseCommit: view.baseCommit, config: head.config.from, summary: D.summary(rows, { compared: !!before }),
89
+ pages: rows, shared: { ...head.shared, files: head.shared.files.length }, queue: D.queue(rows).map((r) => r.page), trend }));
90
+ } else {
91
+ say(D.summary(rows, { compared: !!before }) + ` (${head.commit}${before ? ' against ' + before.commit : ''}; config: ${head.config.from})`);
92
+ if (rows.length) {
93
+ say('page share own rules restyled colours ' + (before ? 'status' : ''));
94
+ for (const r of [...rows].sort((a, b) => (a.share || 0) - (b.share || 0))) {
95
+ const b = r.before;
96
+ const two = (x, y, f = String) => (b ? `${f(x)} → ${f(y)}` : f(y));
97
+ if (r.status === 'gone') { say(`${short(r.page).padEnd(26)}(gone)`); continue; }
98
+ say(`${short(r.page).padEnd(26)}${two(b && b.share, r.share, pct).padEnd(14)}${two(b && b.ownRules, r.ownRules).padEnd(15)}${String(r.restyled).padEnd(10)}${String(r.colours).padEnd(9)}${before ? r.status + (r.why && r.why.length ? ' (' + r.why.join('; ') + ')' : '') : ''}`);
99
+ }
100
+ say(`shared code: ${head.shared.files.length} files · ${pct(head.shared.share)} from the system · ${head.shared.ownRules} own CSS rules`);
101
+ const q = D.queue(rows);
102
+ if (q.length) say('Rebuild next, one pull request each: ' + q.map((r) => `${short(r.page)} ${pct(r.share)}`).join(', '));
103
+ }
104
+ if (trend) say('Mean share by week: ' + trend.map((t) => `${t.week} ${t.share == null ? '–' : pct(t.share)}`).join(' · '));
105
+ }
106
+ if (flags.write) {
107
+ const file = path.join(repo, 'planning', 'reports', `design-drift-${date}.md`);
108
+ fs.mkdirSync(path.dirname(file), { recursive: true });
109
+ fs.writeFileSync(file, D.reportMd(view));
110
+ if (!flags.json) say('Report: ' + path.relative(repo, file));
111
+ }
112
+ return flags.gate && drifting.length ? 1 : 0;
113
+ }
114
+
115
+ module.exports = { run, COMMANDS, USAGE };