create-pmos 0.404.0 → 0.405.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.404.0",
3
+ "version": "0.405.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.405.0",
37
+ "at": "2026-10-24T09:32:24.061Z",
38
+ "f": 2,
39
+ "prs": [
40
+ {
41
+ "n": 1035,
42
+ "t": "Home session list, program chat, and new initiative sessions",
43
+ "s": "Home session list, program chat, and new initiative sessions"
44
+ }
45
+ ]
46
+ },
35
47
  {
36
48
  "v": "0.404.0",
37
49
  "at": "2026-10-24T05:07:12.902Z",
@@ -274,18 +286,6 @@
274
286
  "s": "Board measure popup reads its numbers and the trunk fetch time"
275
287
  }
276
288
  ]
277
- },
278
- {
279
- "v": "0.385.0",
280
- "at": "2026-10-21T14:04:22.922Z",
281
- "f": 2,
282
- "prs": [
283
- {
284
- "n": 996,
285
- "t": "A task's Jira ticket from the stored reads, with Read it now",
286
- "s": "A task's Jira ticket from the stored reads, with Read it now"
287
- }
288
- ]
289
289
  }
290
290
  ]
291
291
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@d588f370
1
+ kernel-source: pmos@cf53bf2f
2
2
  assembled: 2026-10-24
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-24T05:07:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-24T09:32:21Z"}
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-24T05:07:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-24T09:32:21Z"}
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-24T05:07:10Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-24T09:32:21Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "v": "0.405.0",
4
+ "at": "2026-10-24T09:32:24.061Z",
5
+ "f": 2,
6
+ "prs": [
7
+ {
8
+ "n": 1035,
9
+ "t": "Home session list, program chat, and new initiative sessions",
10
+ "s": "Home session list, program chat, and new initiative sessions"
11
+ }
12
+ ]
13
+ },
2
14
  {
3
15
  "v": "0.404.0",
4
16
  "at": "2026-10-24T05:07:12.902Z",
@@ -21,7 +21,7 @@ Home is the page at `/premium.html`. It follows the Agreed design and the "Uncov
21
21
  - Every group stays open or closed after you reload the page.
22
22
  - On a desktop, the chat has a header line with the open item's name and where it sits (its initiative, product or program).
23
23
  - The microphone in the chat box turns what you say into text. Nothing is sent until you press send.
24
- - A link can open Home at one item: `?item=pt:<program>:<key>` selects a program task, and `?ask=program:<id>` opens the chat about that program.
24
+ - A link can open Home at one item: `?item=pt:<program>:<key>` selects a program task, and `?ask=program:<id>` opens the chat about that program. **Discuss in chat** on a program in the Board opens the same program chat. **New session** on an initiative starts a new chat about that initiative.
25
25
 
26
26
  ## An initiative
27
27
 
@@ -62,7 +62,7 @@ There is no My work page. The list on Home is your list:
62
62
  - **Tasks.** An initiative shows its 3 most urgent tasks: yours first, then due today, late, and due this week. **Show N more tasks** shows the rest.
63
63
  - **Your items.** A PM item opens alone, as its own card. There is no Focus chip. Items that nobody touched are in the Weekly review.
64
64
  - **Add a task.** Press **New**, then **A task**, then choose the initiative, or **Not in an initiative**. Home has no add box that is always open.
65
- - **Sessions.** A session row names its agent. The coloured dot beside it is its state: blue waits on you, amber may be blocked, green is running. A session PMOS started itself (a skill or a background job) shows on Home only while it works or asks you something. Once it finishes its prompt, it leaves the list.
65
+ - **Sessions.** A session row names its agent. The coloured dot beside it is its state: blue waits on you, amber may be blocked, green is running. A session PMOS started itself (a skill or a background job) shows on Home only while it works or asks you something. Once it finishes its prompt, it leaves the list. On an initiative's page, a session that waits on you shows once, under **Needs you**, not again under **Sessions**. **Finished sessions** does not list an old run of a chat that is open again.
66
66
  - **One chat box.** Every conversation has the same box: **+** (attach a file, notes, the terminal, and **Link to an initiative** for a loose chat), **/** for commands, **@** inside an initiative, the To or In chip, the mic, and Send. A chat opens at its newest message.
67
67
  - **Documents not written yet.** A document that does not exist yet shows **Draft it**, in its stage or ahead of it. The agent writes a draft. Nothing is issued until you read it.
68
68
  - **Meeting notes.** A decision, to-do or question that the notes caught is not a fact until you confirm it in the meeting's Replay. Home, End of the day and the evening recap do not count unconfirmed points.
@@ -60,7 +60,9 @@ function rowFor(model, key, context) {
60
60
  return { title: key === 'work:this-page' ? 'The My work page' : 'The Briefing page', subject: clip(model.header && model.header.text, 240), say: clip(say, 600), facts: rows.slice(0, 12).map((r) => clip(r.kind || r.list || 'item', 40) + ': ' + clip(r.title, 240)), files: [] };
61
61
  }
62
62
  if (/^(work|board|init|doc|ins):/.test(key)) { // a My work item, a Board initiative, an Insights measure, an initiative page or one of its documents: the item's own record is the context
63
- const w = (model.rows || []).find((r) => r.key === key); if (!w) return null;
63
+ // a second session on an initiative (Home's New session: init:<id>:<n>) reads the initiative's own row
64
+ const base = /^init:[^:]+:/.test(key) ? key.replace(/^(init:[^:]+):.*$/, '$1') : key;
65
+ const w = (model.rows || []).find((r) => r.key === key) || (base !== key ? (model.rows || []).find((r) => r.key === base) : null); if (!w) return null;
64
66
  const d = w.dialog || {};
65
67
  return { title: clip(w.title, 160), subject: clip(w.sub, 240), say: clip(d.say, 600), facts: (d.facts || []).slice(0, 12).map(([a, b]) => clip(a, 40) + ': ' + clip(b, 240)), files: (d.files || []).filter((f) => SAFE_PATH.test(f) && !f.includes('..')).slice(0, 4) };
66
68
  }
@@ -95,6 +97,15 @@ function popRow(c) {
95
97
  return { title: str(c.title, 160), subject: str(c.subject, 240), say: str(c.say, 600), facts, files };
96
98
  }
97
99
 
100
+ /** The opening's row of an initiative's chat when the page model holds no row for it (bug 2026-10-24: Home's New session on an
101
+ * initiative other than the one the initiative model last read). The chat is the PM's own Claude Code session, so it starts with
102
+ * the initiative's id and what the page sent instead of refusing. A row of another kind that is not on the page is still refused. */
103
+ function contextRow(key, context) {
104
+ const say = typeof context === 'string' ? clip(context, 600) : '';
105
+ const id = String(key).replace(/^[a-z]+:/, '').replace(/:\d+$/, '');
106
+ return { title: clip(id, 160), subject: '', say, facts: [], files: [] };
107
+ }
108
+
98
109
  function promptFor(row, turns, question) {
99
110
  const prior = turns.filter((t) => t.state === 'answered').slice(-PROMPT_TURNS);
100
111
  return [
@@ -189,7 +200,7 @@ function chat({ runtimeDir, key, text, model, context, sessions, wsId, now = new
189
200
  // slice 4 (PRD L2): an ended chat resumes its own Claude Code conversation when the file for it is still there
190
201
  const prev = alive ? null : chatRecordOf(runtimeDir, key);
191
202
  const resume = !!(prev && prev.claude && typeof sessions.hasConversation === 'function' && sessions.hasConversation(prev.claude));
192
- const row = alive ? null : rowFor(model, key, context);
203
+ const row = alive ? null : rowFor(model, key, context) || (/^init:/.test(key) ? contextRow(key, context) : null);
193
204
  if (!alive && !row && !resume) return fail(404, /^pop:/.test(key) ? 'the popup did not say what it shows' : model ? 'that row is not on the page' : 'the page has not read the repository yet');
194
205
  // slice 2 (PRD G2): `/goal <text>` becomes the PMOS grilling prompt, on record before it reaches the session
195
206
  let msg = q, goal = null;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.404.0",
3
+ "version": "0.405.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.404.0",
9
+ "version": "0.405.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.404.0",
3
+ "version": "0.405.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",
@@ -78,6 +78,14 @@ const json = (r, body, status = 200) => r.fulfill({ status, contentType: 'applic
78
78
  ok('D1 a kind Home has no key for is a chat key: about=chat:<id>', u.searchParams.get('about') === 'chat:ana', u.search);
79
79
  await sleep(2500); s = await state();
80
80
  ok('D4 a kind Home has no view for is the chat alone, named by its label', s.top === 'Ana Lim' && !s.vw, JSON.stringify(s));
81
+ // bug 2026-10-24: the Board's program panel Discuss named board:program:<id>, which Home sent as a Board row it does not have
82
+ // ("that row is not on the page"); it lands on the program's own conversation, the one its tasks open
83
+ await ctx.route(/\/api\/programs(\?.*)?$/, (r) => json(r, { ok: true, programs: [{ id: 'project-ascent', title: 'Project Ascent', members: [], tasks: [], milestones: [] }] }));
84
+ u = await discussFrom({ kind: 'Program', id: 'program:project-ascent', title: 'Project Ascent' });
85
+ ok('D6 a program\'s Discuss names it: about=board:program:<id>', u.searchParams.get('about') === 'board:program:project-ascent', u.search);
86
+ s = await until(async () => { const v = await page.evaluate(() => { const c = document.querySelector('[data-hm-scope]'); return { top: document.querySelector('#hmTopTitle').textContent, scope: c ? c.textContent.trim() : '' }; }); return /Project Ascent/.test(v.scope) ? v : null; }, 15000)
87
+ || await page.evaluate(() => ({ top: document.querySelector('#hmTopTitle').textContent, scope: ((document.querySelector('[data-hm-scope]') || {}).textContent || '').trim() }));
88
+ ok('D6 a program lands on its own conversation: the chat goes in the program, not All work', s.top === 'Project Ascent' && s.scope === 'In: Project Ascent', JSON.stringify(s));
81
89
  ok('D5 no page error', errors.length === 0, errors.join(' | '));
82
90
  finish();
83
91
  })();
@@ -1313,6 +1313,8 @@ load().then(() => {
1313
1313
  else if (sid) { const s = S.D.sessions.find((x) => x.id === sid); if (s) { S.sel = 's:' + s.id; openTarget(sessionTarget(s)); drawList(); } else { openTarget(homeTarget()); toast('That session is not on this machine.'); } }
1314
1314
  else if (/^program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(ask)) openTarget(programTarget(ask.slice(8))); // Ask in Home from the program panel
1315
1315
  else if (about && /^init:/.test(about) && iniRowOf(P.get('vid') || about.slice(5))) { const id = iniRowOf(P.get('vid')) ? P.get('vid') : about.slice(5); goIni(id).then(() => { if (P.get('vk') && S.ini === id && !isPhone()) iniOverview(); }); }
1316
+ // the Board's program panel Discuss in chat names board:program:<id>: the program's own conversation, the one its tasks open (bug 2026-10-24)
1317
+ else if (about && /^board:program:[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(about)) openTarget(programTarget(about.slice(14)));
1316
1318
  else if (about) { openTarget({ ...homeTarget(), key: about, title: (P.get('label') || '').slice(0, 80) || about }); discussed(about, P.get('vid'), P.get('label')); }
1317
1319
  else if (S.ini && P.get('view') === 'metrics') goIni(S.ini).then(() => openMetrics()); // ?view=metrics: the metrics review, as its Open in a new tab names it
1318
1320
  else if (S.ini) goIni(S.ini);
@@ -58,7 +58,8 @@ const stateOf = (s) => (s.shown === 'needs' ? 'needs' : s.shown === 'blocked' ?
58
58
  export function sessionRow(s, roles) {
59
59
  const role = roleOf(s, roles);
60
60
  const st = stateOf(s);
61
- const name = s.hx && s.hx.title ? s.hx.title : s.name || 'Session';
61
+ // a chat's tmux name carries a 'chat: ' prefix (lib/briefing-premium-agent.js); the row shows its title only (testing fixes)
62
+ const name = s.hx && s.hx.title ? s.hx.title : String(s.name || '').replace(/^chat:\s*/, '') || 'Session';
62
63
  return { id: 's:' + s.id, kind: 'session', sid: s.id, key: keyOfSession(s), ini: iniOfSession(s), name, state: st, initial: role.initial, role,
63
64
  hint: role.name, icon: 'chat', created: s.created || '' }; // the state is the dot beside the row, not a word (testing fixes)
64
65
  }
@@ -236,7 +237,9 @@ function productRow(D) {
236
237
  export function iniLayout(D, id) {
237
238
  const needs = needsOf(D);
238
239
  const mine = needs.filter((r) => r.ini === id);
239
- const ses = (D.sessions || []).filter((s) => iniOfSession(s) === id).map((s) => sessionRow(s, D.desk && D.desk.roles));
240
+ // a session that waits on the PM shows once, under Needs you, never again under Sessions (say it once; the Home list does the same)
241
+ const ses = (D.sessions || []).filter((s) => iniOfSession(s) === id && s.shown !== 'needs' && s.shown !== 'blocked').map((s) => sessionRow(s, D.desk && D.desk.roles));
242
+ const liveKeys = new Set((D.sessions || []).filter((s) => iniOfSession(s) === id && live(s)).map(keyOfSession).filter(Boolean));
240
243
  const people = (((D.desk && D.desk.stakeholders) || {})[id] || []).map((p) => ({ id: 'k:' + p.name, kind: 'person', name: p.name + (p.role ? ' · ' + p.role : ''), hint: p.note || 'Stakeholder', initial: initials(p.name), state: 'quiet', person: p }));
241
244
  const meet = todayOf(D).filter((m) => meetIni(m) === id).map((m) => ({ id: 'm:' + (m.id || m.title), kind: 'meeting', name: m.title, hint: (m.state === 'now' ? 'Now' : hm(m.start)) + ' meeting' + (m.state === 'past' ? ' · done' : ''), state: m.state === 'now' ? 'working' : 'quiet', icon: 'clock', meeting: m }));
242
245
  const routines = ((D.schedules && D.schedules.schedules) || []).filter((s) => s.initiative === id || new RegExp('\\b' + id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '\\b').test(String(s.name || s.label || ''))).map((s) => ({ id: 'r:' + (s.id || s.name), kind: 'routine', name: cap1(String(s.name || s.task || s.skill || 'Routine').replace(/[-_]/g, ' ')), hint: s.next ? 'Next ' + DOW[new Date(s.next).getDay()] + ' ' + hm(s.next) : 'Not scheduled', state: 'quiet', icon: 'routine', schedule: s }));
@@ -248,7 +251,8 @@ export function iniLayout(D, id) {
248
251
  ['meetings', 'Meetings', meet],
249
252
  ['routines', 'Routines', routines],
250
253
  ['files', 'Files', files],
251
- ['done', 'Finished sessions', ses.filter((s) => s.state === 'exited')],
254
+ // a finished run of a conversation that is open again (the same chat key, live or waiting on the PM) is not listed a second time
255
+ ['done', 'Finished sessions', ses.filter((s) => s.state === 'exited' && !(s.key && liveKeys.has(s.key)))],
252
256
  ].map(([key, title, rows]) => ({ key, title, rows })).filter((g) => g.rows.length);
253
257
  const other = needs.filter((r) => r.ini !== id);
254
258
  const byIni = new Map(); for (const r of other) { const k = r.ini || ''; byIni.set(k, (byIni.get(k) || 0) + 1); }