create-pmos 0.608.0 → 0.609.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.608.0",
3
+ "version": "0.609.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,19 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.609.0",
38
+ "at": "2026-11-18T14:39:08.423Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1357,
43
+ "t": "No Specimens line or prototype file once every version is deleted",
44
+ "s": "No Specimens line or prototype file once every version is deleted",
45
+ "k": "fix"
46
+ }
47
+ ]
48
+ },
36
49
  {
37
50
  "v": "0.608.0",
38
51
  "at": "2026-11-18T14:09:00.418Z",
@@ -303,19 +316,6 @@
303
316
  "k": "imp"
304
317
  }
305
318
  ]
306
- },
307
- {
308
- "v": "0.589.0",
309
- "at": "2026-11-17T11:57:51.177Z",
310
- "f": 4,
311
- "prs": [
312
- {
313
- "n": 1323,
314
- "t": "A calmer Home — Your move and Waiting on others above today's list",
315
- "s": "A calmer Home — Your move and Waiting on others above today's list",
316
- "k": "new"
317
- }
318
- ]
319
319
  }
320
320
  ]
321
321
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@2ab70753
1
+ kernel-source: pmos@2f390d4b
2
2
  assembled: 2026-11-18
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-18T14:08:57Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-18T14:39:06Z"}
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-18T14:08:57Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-18T14:39:06Z"}
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-18T14:08:57Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-18T14:39:06Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "v": "0.609.0",
4
+ "at": "2026-11-18T14:39:08.423Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1357,
9
+ "t": "No Specimens line or prototype file once every version is deleted",
10
+ "s": "No Specimens line or prototype file once every version is deleted",
11
+ "k": "fix"
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  "v": "0.608.0",
4
17
  "at": "2026-11-18T14:09:00.418Z",
@@ -76,7 +76,7 @@ A reply PMOS sees in the thread clears the ask on the next read. A new ask after
76
76
  Press an initiative's name in the list, or open `?ini=<id>`. The list stays as it is and the initiative's row is selected. The chat talks about the initiative, and its page opens in the Viewer.
77
77
 
78
78
  - The page's header shows the lane and the anchor, the name, **New session** (+), ⋯, Open wide and Close.
79
- - **Experiment** shows what PMOS keeps for the initiative: **We bet**, **Stop if**, **Budget**, **Who builds**, **Specimens** and **Done when**. A line that nobody wrote does not show. Press a line to change it. After you change a line, PMOS asks before it changes that line again. When an experiment is on record, **Gate to Build** shows the done test and the kill condition (D107) instead of the PRD and the rubric.
79
+ - **Experiment** shows what PMOS keeps for the initiative: **We bet**, **Stop if**, **Budget**, **Who builds**, **Specimens** and **Done when**. A line that nobody wrote does not show. When you delete every prototype version, **Specimens** and the **Prototype & design** fold go at once; when you delete some, they show only the versions that are left. Press a line to change it. After you change a line, PMOS asks before it changes that line again. When an experiment is on record, **Gate to Build** shows the done test and the kill condition (D107) instead of the PRD and the rubric.
80
80
  - **PMOS's work** lists what PMOS changed on this initiative by itself, each with its reason, its day and Undo. A run that stopped is one amber line. Under it, **Coming up** lists what is ahead, by date. Three rows show, and **N more** opens the rest. A kind with nothing ahead is not shown. Each row says where it comes from:
81
81
  - a milestone that is due, or the end of the plan
82
82
  - the outcome check date (a check that is already due shows in Your move instead)
@@ -146,7 +146,10 @@ const READS = {
146
146
  // the round the initiative's prototype is in leads, marked with its version (lib/proposals.js currentOf): the Specimens line opens it
147
147
  const P = PR.read(dir), cur = PR.currentOf(P, ini), rounds = LAB.roundsOf(P, ini);
148
148
  if (cur) { const i = rounds.findIndex((r) => r.id === cur.of); if (i >= 0) rounds.unshift({ ...rounds.splice(i, 1)[0], current: { n: cur.n, key: cur.key, said: cur.said || cur.title, version: cur.id } }); }
149
- ctx.json(res, { ok: true, rounds });
149
+ // the deleted versions' files (batch 31, Wawan 2026-11-18: "when no prototype saved then there should be no specimen"): the Specimens
150
+ // line leaves out an experiment line that links one of them
151
+ const gone = PR.removedOf(P), removed = [...new Set((P.removes || []).filter((r) => r.ini === ini && gone.has(r.file)).map((r) => r.file))];
152
+ ctx.json(res, { ok: true, rounds, removed });
150
153
  return true;
151
154
  },
152
155
  '/api/lab/present': (ctx, res, url) => {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.608.0",
3
+ "version": "0.609.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.608.0",
9
+ "version": "0.609.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.608.0",
3
+ "version": "0.609.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",
@@ -612,9 +612,12 @@ async function delVersion(file) {
612
612
  say(r.said, async () => {
613
613
  const u = await pmPost('/api/lab/restore', { ws: at.ws, batch: r.batch }).catch(() => null);
614
614
  if (!u || u.ok === false) { say((u && u.error) || 'It did not come back.'); return; }
615
+ fire('pmos:lab-version', { ini: c.ini });
615
616
  if (V.H && V.H.reload) V.H.reload();
616
617
  if (V.H && V.H.go && window.czViewer && window.czViewer.current() && window.czViewer.current().id === 'lab:cmp') V.H.go(u.back.id, u.back.key);
617
618
  });
619
+ // the initiative page behind redraws its Specimens line and its Prototype & design fold, wherever the Viewer was opened from
620
+ fire('pmos:lab-version', { ini: c.ini });
618
621
  if (V.H && V.H.reload) V.H.reload();
619
622
  go(r.next);
620
623
  }
@@ -79,9 +79,22 @@ const one = (a, f) => { const v = a && a.fields && a.fields[f]; return v && !Arr
79
79
  const list = (a, f) => { const v = a && a.fields && a.fields[f]; return Array.isArray(v) ? v.filter((x) => x && x.text) : []; };
80
80
  const carried = (a, f) => ((a && a.carried) || []).filter((c) => c.field === f && c.text);
81
81
 
82
+ /** The prototype files a line of the experiment links (/api/lab/specimen?file=…), in its text or its sources. */
83
+ function linkedFiles(v) {
84
+ const out = [], refs = [String((v && v.text) || ''), ...((v && Array.isArray(v.sources) ? v.sources : []).map((x) => String((x && x.ref) || '')))];
85
+ for (const r of refs) for (const m of r.matchAll(/\/api\/lab\/specimen\?(?:[^\s)]*&)?file=([^&\s)]+)/g)) { try { out.push(decodeURIComponent(m[1])); } catch { /* not a file link */ } }
86
+ return out;
87
+ }
82
88
  /** The Specimens row. rounds: GET /api/lab/rounds (newest first, open or not). With a round, the row names every version that landed and opens
83
89
  * the compare view (lab: the round's id), so a round kept or closed too early stays reachable (2026-11-17). Without one, the artefact's words. */
84
- function specimensRow(kept, tries, rounds) {
90
+ function specimensRow(kept, tries, rounds, removed) {
91
+ // a line that links a deleted version (GET /api/lab/rounds removed) is not a specimen any more: with every version deleted, no row
92
+ // (batch 31, Wawan 2026-11-18: "when no prototype saved (all removed) then there should be no specimen")
93
+ if (Array.isArray(removed) && removed.length) {
94
+ const out = (v) => linkedFiles(v).some((f) => removed.includes(f));
95
+ if (kept && out(kept)) kept = null;
96
+ tries = tries.filter((t) => !out(t));
97
+ }
85
98
  const R = Array.isArray(rounds) && rounds.length ? rounds[0] : null;
86
99
  // the initiative's prototype (2026-11-18: the line said "kept" for an old test round): its version, and it opens that version
87
100
  if (R && R.current) return { key: 'specimens', label: 'Prototype', text: 'Version ' + R.current.n + (R.current.said ? ': ' + R.current.said : '') + (R.working ? ' · the next version is on the way' : ''), by: '', at: R.at || '', edit: null, lab: R.current.version || R.id };
@@ -96,7 +109,7 @@ function specimensRow(kept, tries, rounds) {
96
109
  return null;
97
110
  }
98
111
 
99
- /** The Viewer's model. art: GET /api/artefacts answer for scope experiment:<id>; auto: GET /api/autonomy answer; o: { now, ahead, rounds }. */
112
+ /** The Viewer's model. art: GET /api/artefacts answer for scope experiment:<id>; auto: GET /api/autonomy answer; o: { now, ahead, rounds, removed }. */
100
113
  export function agentModel(A, U, id, o = {}) {
101
114
  const now = o.now || Date.now();
102
115
  const X = art(A, 'experiment'), S = art(A, 'specimens'), T = art(A, 'done-test');
@@ -109,7 +122,7 @@ export function agentModel(A, U, id, o = {}) {
109
122
  row('kill', 'Stop if', kill, { artefact: 'experiment', field: 'kill' }),
110
123
  row('budget', 'Budget', budget, { artefact: 'experiment', field: 'budget' }),
111
124
  ex ? { key: 'executor', label: 'Who builds', text: whoText(ex.text, factory), value: ex.text, by: ex.by || '', at: ex.at || '', edit: { artefact: 'experiment', field: 'executor', pick: picks(factory, ex.text) } } : null,
112
- specimensRow(kept, tries, o.rounds),
125
+ specimensRow(kept, tries, o.rounds, o.removed),
113
126
  checks.length ? { key: 'done', label: 'Done when', text: checks.map((c) => c.text).join(' · '), sub: result ? 'Result: ' + result.text : '', at: checks[checks.length - 1].at || '', edit: null } : null,
114
127
  ].filter(Boolean);
115
128
  // the newest line Claude wrote dates the section: "Claude keeps it · 3 Nov"
@@ -243,7 +256,7 @@ export function want(ws, id, done, title) {
243
256
  pmGet('/api/kind-control?' + q + 'ini=' + encodeURIComponent(id)).catch(() => null),
244
257
  pmGet('/api/lab/rounds?' + q + 'initiative=' + encodeURIComponent(id)).catch(() => null)])
245
258
  .then(([a, u, h, k, r]) => {
246
- const M = agentModel(a && a.ok ? a : null, u && u.ok ? u : null, id, { ahead: h && h.ok ? h : null, rounds: r && r.ok ? r.rounds : null });
259
+ const M = agentModel(a && a.ok ? a : null, u && u.ok ? u : null, id, { ahead: h && h.ok ? h : null, rounds: r && r.ok ? r.rounds : null, removed: r && r.ok ? r.removed : null });
247
260
  const C = k && k.ok && k.kind !== 'product' ? k : null;
248
261
  const was = JSON.stringify([cached(id), cachedControl(id)]);
249
262
  CACHE.set(id, { M, C, at: Date.now() });
@@ -435,6 +435,17 @@ export function wireView(body, h) {
435
435
  if (!body) return;
436
436
  const idOf = () => { const n = body.querySelector('[data-iv]'); return n ? n.dataset.iv : null; };
437
437
  body.__iv = LK.wrap(VS.wrap(ED.writes({ ...h, __id: idOf }), body, (id) => SHOWN.get(id)), idOf);
438
+ // a prototype version deleted or brought back in the Viewer (pm/cozy-proto.js): this initiative reads its Specimens line and its
439
+ // Prototype & design fold again, so a deleted version leaves both at once (batch 31, 2026-11-18)
440
+ if (typeof window !== 'undefined') {
441
+ const onLab = (e) => {
442
+ if (!body.isConnected) { window.removeEventListener('pmos:lab-version', onLab); return; }
443
+ const id = idOf(); if (!id || !e.detail || e.detail.ini !== id) return;
444
+ IA.forget(id); IA.want(wsOf(), id, () => paintAgent(id));
445
+ const H = body.__iv || {}; if (H.reload) H.reload();
446
+ };
447
+ window.addEventListener('pmos:lab-version', onLab);
448
+ }
438
449
  // the one blue ✦ after the title (pm/ini-props.js), drawn again with each draw of the initiative
439
450
  const chip = () => { const id = idOf(); if (id && VIEWED.has(id)) PP.sync(VIEWED.get(id), body.__iv || {}); drafts(id); about(id); agent(id); fitMission(body); };
440
451
  // agent-run (AwB): the experiment and Claude's work, read every 30 s at most; they draw alone (and the gate with them) when they change