create-pmos 0.409.0 → 0.410.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.409.0",
3
+ "version": "0.410.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": {
@@ -32,6 +32,18 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.410.0",
37
+ "at": "2026-10-25T04:00:26.037Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1040,
42
+ "t": "A new program shows on the Board and Home at once",
43
+ "s": "A new program shows on the Board and Home at once"
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.409.0",
37
49
  "at": "2026-10-25T03:28:25.142Z",
@@ -269,18 +281,6 @@
269
281
  "s": "Keep recording through a phone lock"
270
282
  }
271
283
  ]
272
- },
273
- {
274
- "v": "0.390.0",
275
- "at": "2026-10-22T02:01:40.673Z",
276
- "f": 2,
277
- "prs": [
278
- {
279
- "n": 1003,
280
- "t": "One report editor with Brief tab and one Insights row per report",
281
- "s": "One report editor with Brief tab and one Insights row per report"
282
- }
283
- ]
284
284
  }
285
285
  ]
286
286
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@7184a749
1
+ kernel-source: pmos@9849ee4d
2
2
  assembled: 2026-10-25
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-25T03:28:22Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T04:00:23Z"}
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-25T03:28:22Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T04:00:23Z"}
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-25T03:28:22Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-25T04:00:23Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.410.0",
4
+ "at": "2026-10-25T04:00:26.037Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1040,
9
+ "t": "A new program shows on the Board and Home at once",
10
+ "s": "A new program shows on the Board and Home at once"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.409.0",
4
16
  "at": "2026-10-25T03:28:25.142Z",
@@ -14,6 +14,7 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
14
14
  - The top line has **Good morning**, the product picker, the filter icon (on a desktop) and **New**. The line under it says how many items are yours, for example "4 are yours".
15
15
  - Press **Good morning** to open **Your day**. Your day shows the date, the meetings of the day, **Your move** (the items that wait on you, with their count) and **This week** (the Weekly review). Your move shows only in Your day, not in the list.
16
16
  - A **program** comes first, above the products. Its header shows the program icon, its name, the next milestone (◆ and the date) and how many of its initiatives are ready for that milestone. Inside it, the program's own tasks come first, then its initiatives under a small heading for each product. Each initiative shows once. Press the program's name to open the program in the Viewer. The chat then talks about the program. Press the chevron to close or open the group.
17
+ - A program with no open initiative yet still shows, with "No initiatives yet" or "No open initiatives". With one product picked, it shows under its own product. Home reads again when you come back to its tab, so a program made on the Board shows at once.
17
18
  - Then the list is grouped by **product**. A product header shows a tile with the product's short name, the product name, one dot for each goal (green on track, amber off track) and a chevron. You set the short name in Settings. Press the product's name to open the product in the Viewer, with its goals and this week's update and metrics review. The chat then talks about the product. This is the same for every product in the list: Home stays on the workspace you opened it on. For another product, the weekly update and the metrics review open that product's own Home in a new tab. An initiative of another product opens from that product's own board, and its chat works in that product's workspace.
18
19
  - Each row is one line. A dot is a session: blue when it waits on you, a ring while it runs. A check box is a task: amber when it is late. The stage track on the right shows where the initiative is. A session that runs under an initiative shows indented under it. An initiative shows its 3 most urgent tasks, and **N more** shows the rest.
19
20
  - **Not in an initiative** is one line at the end, with a blue dot, an amber square and a count. Press it to open the items that have no initiative.
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Programs on the Board: All products, groupings and the program panel"
4
4
  description: "A program groups initiatives across products. How it shows on the Board (stage track, Kanban, timeline and List), the All products mode, the By product grouping, the program panel and the side panel width."
5
- timestamp: 2026-10-24
5
+ timestamp: 2026-10-25
6
6
  ---
7
7
 
8
8
  # Programs on the Board
@@ -20,6 +20,7 @@ Programs do not change how Insights, the weekly update or sprints count initiati
20
20
  - The **timeline** draws a program row that brackets its initiatives' bars, on every span. Program milestones are diamonds. Milestones that are close together merge into one diamond with a count.
21
21
  - **List** has a Product column and a Program column. Press a column header to sort by it.
22
22
  - **New** opens a menu: **New initiative** or **New program**.
23
+ - A new program shows at once, before any initiative joins it. A program with no open initiative shows on its own product's Board and on All products, with "No initiatives yet" or "No open initiatives". Press its name, then **⋯** and **Move an initiative in**. That menu lists open initiatives only.
23
24
  - To make an initiative a program, open the initiative, press **⋯**, then **Turn into a program**. The initiative joins the new program, and the program panel opens. **Turn into a program** shows only for an initiative that is in no program.
24
25
  - The chat cannot make or change a program. Every program change is a press on the Board. When you ask the chat about a program, it tells you which press to use.
25
26
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.409.0",
3
+ "version": "0.410.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.409.0",
9
+ "version": "0.410.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.409.0",
3
+ "version": "0.410.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",
@@ -344,7 +344,9 @@ function draw(keepFocus) {
344
344
  /** ⋯ in the shell's order: change it (add, move in), look back (the charter), copy, then archive in red, last. */
345
345
  function moreOf(p) {
346
346
  const M = O.M(), taken = new Set(((O.programs()) || []).flatMap((x) => (x.members || []).filter((m) => !m.ws || m.ws === board().ws).map((m) => m.initiative)));
347
- const free = ((M && M.rows) || []).filter((r) => r.id && r.track && !taken.has(r.id)).slice(0, 8);
347
+ // only the open initiatives: a cancelled or archived one moved in would not show in the program
348
+ const gone = new Set(Object.values((M && M.initiatives && M.initiatives.gone) || {}).flat().map((r) => r.key));
349
+ const free = ((M && M.rows) || []).filter((r) => r.id && r.track && !gone.has(r.key) && !taken.has(r.id)).slice(0, 8);
348
350
  const more = [{ label: 'Add a new initiative', on: () => { VW.close(); const n = document.getElementById('newIni'); if (n) n.click(); } }];
349
351
  if (free.length) more.push({ label: 'Move an initiative in', on: (b) => Pop.open(`<p class="bd-mlbl">Move an initiative into ${esc(p.title)}</p>${free.map((r) => `<button type="button" class="bd-mi" role="menuitem" data-ppjoin="${esc(r.id)}">${esc(r.title)}</button>`).join('')}`, b, { label: 'Move an initiative in', role: 'menu', width: 280, align: 'right', cls: 'bd-menu', focus: '.bd-mi' }) });
350
352
  more.push({ label: 'Add a task to the program', on: () => { adding = true; try { localStorage.setItem('cz-vw-fold:program:tasks', '1'); } catch { /* a private window */ } draw(); const i = VW.body() && VW.body().querySelector('.pp-add input'); if (i) i.focus(); } });
@@ -41,7 +41,9 @@ export function openProgram(id, from) { document.dispatchEvent(new CustomEvent('
41
41
  const prodName = (M) => (M && M.board && (M.board.product || M.board.name)) || '';
42
42
  export function groupsOf(programs, rows, M, byProduct) {
43
43
  const ws = (M && M.board && M.board.ws) || '', product = prodName(M);
44
- const G = groupRows(rows, programs, { ws, product, byProduct: !!byProduct });
44
+ // a program with no row on screen (just made, or its initiatives all cancelled or archived) shows on its home product's board, and on All products
45
+ const keepEmpty = (p) => !!(M && M.board && M.board.all) || !p.home || !ws || p.home === ws;
46
+ const G = groupRows(rows, programs, { ws, product, byProduct: !!byProduct, keepEmpty });
45
47
  const any = byProduct ? G.some((g) => g.rows.some((r) => r.inProgram)) : G.some((g) => g.kind === 'program');
46
48
  // All products: the product groups head the rows of each product, with a program or without one
47
49
  return any || (M && M.board && M.board.all && G.length > 1) ? G : null;
@@ -146,7 +148,7 @@ export function bandHtml(g, st, o) {
146
148
  const sp = o.plain ? null : st.spread, nI = st.inis.length;
147
149
  const N = steps.length || 8, pc = (n) => ((n / N) * 100).toFixed(3) + '%'; // a step's share of the cells, so the band follows their width
148
150
  const band = sp ? `<span class="bd-spb" style="left:calc(${pc(sp.lo)} + 4px);width:calc(${pc(sp.hi - sp.lo + 1)} - 8px)"></span>` : '';
149
- const words = sp ? nI + ' ' + plural(nI, 'initiative', 'initiatives') + ', ' + (sp.from === sp.to ? sp.from : sp.from + ' to ' + sp.to) : o.plain && nI ? nI + ' ' + plural(nI, 'initiative', 'initiatives') : 'No stage on record';
151
+ const words = sp ? nI + ' ' + plural(nI, 'initiative', 'initiatives') + ', ' + (sp.from === sp.to ? sp.from : sp.from + ' to ' + sp.to) : !(p.members || []).length ? 'No initiatives yet' : !nI ? 'No open initiatives' : o.plain ? nI + ' ' + plural(nI, 'initiative', 'initiatives') : 'No stage on record';
150
152
  // the words sit right of the band, else left of it, else inside it when the band spans nearly every step
151
153
  const lab = !sp || sp.hi < N - 3 ? `<span class="bd-spl" style="left:calc(${pc(sp ? sp.hi + 1 : 0)} + 8px)">${esc(words)}</span>`
152
154
  : sp.lo >= 3 ? `<span class="bd-spl" style="right:calc(${pc(N - sp.lo)} + 8px)">${esc(words)}</span>` : `<span class="bd-spl" style="left:calc(${pc(sp.lo)} + 14px)">${esc(words)}</span>`;
@@ -202,6 +202,9 @@ function poll() {
202
202
  }, 8000);
203
203
  }
204
204
  setInterval(() => { if (!document.hidden) load(); }, 300000);
205
+ // back on this tab (a program or an initiative made on the Board in another tab): read again at once, at most every 15 seconds
206
+ let shownAt = Date.now();
207
+ document.addEventListener('visibilitychange', () => { if (document.hidden || Date.now() - shownAt < 15000) return; shownAt = Date.now(); load(); });
205
208
  window.addEventListener('hm:reload', () => load());
206
209
 
207
210
  /* ── the list ── */
@@ -127,7 +127,7 @@ function iniRowOf(D, r, needs, now) {
127
127
  /* ── programs (initiative program-hierarchy, H4; canvas PgHomePhone, PgHomeDesk) ── */
128
128
  const closedOf = (n, turnN) => [n ? plural(n, 'initiative', 'initiatives') : '', turnN ? turnN + ' your turn' : ''].filter(Boolean).join(' · ') || 'Nothing open';
129
129
  const isMe = (D, who) => { const me = String((D.today && D.today.me) || '').toLowerCase(), w = String(who || '').toLowerCase(); return !w || /^(pm|you)(:|$)/.test(w) || (!!me && (w === me || w.startsWith(me + ' '))); };
130
- /** One group per program that has an initiative or an open task in the products shown, placed above the products. The grouping is
130
+ /** One group per program, placed above the products: with one product picked, only a program that has an initiative or an open task in it, or whose home it is. The grouping is
131
131
  * groupRows (program-model.js), the one Board and Kanban use: a program's initiatives leave their product's group, so each initiative shows
132
132
  * once, and sit under one sub-heading per product, in the order the products first appear. The program's own open tasks come first.
133
133
  * With one product picked, only that product's initiatives and tasks show. D.programs is GET /api/programs' programs. */
@@ -155,7 +155,10 @@ export function programGroups(D, groups, products, o, now) {
155
155
  });
156
156
  const subs = ((G && G.products) || []).map((sp) => { const at = products.findIndex((p) => p.name === sp.name); return { name: sp.name, initials: at >= 0 ? products[at].initials : initialsOf(sp.name), tone: Math.max(0, at) % TONES, inis: sp.rows.map((x) => x.r) }; });
157
157
  const inis = subs.flatMap((x) => x.inis);
158
- if (!inis.length && !tasks.length) continue;
158
+ // a program with no open initiative here (just made, or its initiatives all cancelled or archived) still shows, under all products or its
159
+ // home product, so the PM finds it and can move initiatives in
160
+ const fresh = !o.product || products.some((p) => p.key === o.product && (!pr.home || p.ws === pr.home));
161
+ if (!inis.length && !tasks.length && !fresh) continue;
159
162
  const st = programState(pr, rowsOf, now);
160
163
  const turnN = inis.filter((x) => x.turn).length;
161
164
  out.push({ key: 'g:' + pr.id, kind: 'program', program: pr, st, name: pr.title, subs, inis, rest: [], tasks, count: inis.length, turnN,
@@ -124,7 +124,7 @@ function programHtml(g, o) {
124
124
  if (!open) return `<section class="hm-pg hv-g prg" aria-label="${esc(g.name)}">${head}</section>`;
125
125
  const body = g.tasks.map((t) => rowHtml(t, o)).join('')
126
126
  + g.subs.map((x) => `<div class="hv-psub" role="heading" aria-level="3"><span class="hv-st2 t${x.tone}" aria-hidden="true">${esc(x.initials)}</span>${esc(x.name)}</div>${x.inis.map((r) => iniHtml(r, o)).join('')}`).join('');
127
- return `<section class="hm-pg hv-g prg" aria-label="${esc(g.name)}">${head}<div class="hv-card">${body}</div></section>`;
127
+ return `<section class="hm-pg hv-g prg" aria-label="${esc(g.name)}">${head}<div class="hv-card">${body || `<p class="hm-none">${(g.program.members || []).length ? 'No open initiatives' : 'No initiatives yet'}. Open the program to move some in.</p>`}</div></section>`;
128
128
  }
129
129
  /** "Not in an initiative" (HvAC .lh): a line under the groups. Folded it shows a blue dot when a row waits on you, an amber square when one
130
130
  * of your own is late, and the count; open, the rows in a card. */
@@ -202,6 +202,8 @@ export function goalsByPeriod(st, krsOf, now = Date.now()) {
202
202
  * group per product with the rows no program holds. Each row appears once; there is no "Not in a program" group; a group with no row is left out.
203
203
  * o.byProduct: product groups only, a program's row copied with { inProgram: id } (PgBoardProduct's layers icon).
204
204
  * o.productOf(row) → the product's name (default row.product, else row.ws, else o.product); o.wsOf(row) → its workspace (default row.ws, else o.ws).
205
+ * o.keepEmpty(program) → true to keep a program with no row here, as a group with no row: a program the PM has just made, or one whose
206
+ * initiatives are all cancelled or archived, still shows, so its panel can be opened to move initiatives into it.
205
207
  * Group: { kind: 'program', key: 'g:<id>', program, products: [{ name, rows }], rows } | { kind: 'product', key: 'p:<name>', name, rows }. */
206
208
  export function groupRows(rows, programs, o = {}) {
207
209
  const productOf = o.productOf || ((r) => r.product || r.ws || o.product || '');
@@ -227,6 +229,7 @@ export function groupRows(rows, programs, o = {}) {
227
229
  sub.rows.push(r); g.rows.push(r);
228
230
  inProg.set(p.id, g);
229
231
  }
230
- const progs = live.map((p) => inProg.get(p.id)).filter(Boolean);
232
+ const empty = (p) => !!o.keepEmpty && o.keepEmpty(p);
233
+ const progs = live.map((p) => inProg.get(p.id) || (empty(p) ? { kind: 'program', key: 'g:' + p.id, program: p, products: [], rows: [] } : null)).filter(Boolean);
231
234
  return progs.concat(prods.map((name) => ({ kind: 'product', key: 'p:' + name, name, rows: prodRows.get(name) })));
232
235
  }