create-pmos 0.757.0 → 0.759.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.757.0",
3
+ "version": "0.759.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,32 @@
33
33
  "audit"
34
34
  ],
35
35
  "pmosChanges": [
36
+ {
37
+ "v": "0.759.0",
38
+ "at": "2026-11-24T02:32:35.299Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1710,
43
+ "t": "Workflows stage panel follows the picked workspace; a removed pick never opens on a 404",
44
+ "s": "Workflows stage panel follows the picked workspace; a removed pick never opens on a 404",
45
+ "k": "fix"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "v": "0.758.0",
51
+ "at": "2026-11-24T02:19:59.803Z",
52
+ "f": 4,
53
+ "prs": [
54
+ {
55
+ "n": 1708,
56
+ "t": "A resumed chat's answer comes back to the chat panel",
57
+ "s": "A resumed chat's answer comes back to the chat panel",
58
+ "k": "fix"
59
+ }
60
+ ]
61
+ },
36
62
  {
37
63
  "v": "0.757.0",
38
64
  "at": "2026-11-24T01:28:20.135Z",
@@ -370,73 +396,6 @@
370
396
  "k": "fix"
371
397
  }
372
398
  ]
373
- },
374
- {
375
- "v": "0.738.0",
376
- "at": "2026-11-23T07:20:29.240Z",
377
- "f": 4,
378
- "prs": [
379
- {
380
- "n": 1639,
381
- "t": "Every edit shows at once, and a failed save says so",
382
- "s": "Every edit shows at once, and a failed save says so",
383
- "k": "fix",
384
- "try": {
385
- "steps": [
386
- "Open Work, then an initiative's Work breakdown.",
387
- "Change a task's status or date."
388
- ],
389
- "see": "It changes the moment you press. If the save fails, it goes back and says Not saved, with Try again.",
390
- "open": "/premium-board.html"
391
- }
392
- }
393
- ]
394
- },
395
- {
396
- "v": "0.737.0",
397
- "at": "2026-11-23T06:47:33.938Z",
398
- "f": 4,
399
- "prs": [
400
- {
401
- "n": 1643,
402
- "t": "Pick a task's start and due on one calendar, like depart and return",
403
- "s": "Pick a task's start and due on one calendar, like depart and return",
404
- "k": "new",
405
- "try": {
406
- "steps": [
407
- "Open any task and press its dates.",
408
- "Tap a start day, then a due day."
409
- ],
410
- "see": "One calendar with the days between shaded, like booking a trip."
411
- }
412
- },
413
- {
414
- "n": 1633,
415
- "t": "Focus mode, one item and its chat (A335)",
416
- "s": "Focus mode, one item and its chat (A335)",
417
- "k": "new",
418
- "try": {
419
- "steps": [
420
- "On Today or Work, pick an item and press F."
421
- ],
422
- "see": "Only that item and its chat show. Press F again to get the page back.",
423
- "open": "/premium-board.html"
424
- }
425
- },
426
- {
427
- "n": 1636,
428
- "t": "One Overview block on the initiative popup that folds",
429
- "s": "One Overview block on the initiative popup that folds",
430
- "k": "new",
431
- "try": {
432
- "steps": [
433
- "Open an initiative's popup on the computer.",
434
- "Press the Overview head."
435
- ],
436
- "see": "Where it stands and the case sit in one block on top; folded, it keeps one line."
437
- }
438
- }
439
- ]
440
399
  }
441
400
  ]
442
401
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@e7106edb
1
+ kernel-source: pmos@48ca42f0
2
2
  assembled: 2026-11-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-11-24T01:28:17Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T02:32:31Z"}
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-24T01:28:17Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T02:32:31Z"}
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-24T01:28:17Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-24T02:32:31Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,30 @@
1
1
  [
2
+ {
3
+ "v": "0.759.0",
4
+ "at": "2026-11-24T02:32:35.299Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1710,
9
+ "t": "Workflows stage panel follows the picked workspace; a removed pick never opens on a 404",
10
+ "s": "Workflows stage panel follows the picked workspace; a removed pick never opens on a 404",
11
+ "k": "fix"
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "v": "0.758.0",
17
+ "at": "2026-11-24T02:19:59.803Z",
18
+ "f": 4,
19
+ "prs": [
20
+ {
21
+ "n": 1708,
22
+ "t": "A resumed chat's answer comes back to the chat panel",
23
+ "s": "A resumed chat's answer comes back to the chat panel",
24
+ "k": "fix"
25
+ }
26
+ ]
27
+ },
2
28
  {
3
29
  "v": "0.757.0",
4
30
  "at": "2026-11-24T01:28:20.135Z",
@@ -17,7 +17,7 @@ Press the round menu button at the bottom of any page, then the **Settings** ico
17
17
  | Prototype rules | What every prototype version is checked for before you see it. |
18
18
  | Connectors | Every connector your Claude session has, and a directory of services you can connect. A switch chooses only what PMOS reads on its own. PMOS reads and never posts. |
19
19
  | Your account | The Claude login and profile that new sessions start with, the Anthropic API key for PMOS's own runs, and Sharpen prompts. |
20
- | Workspaces | The repositories PMOS works in. Remove forgets the address only; the folder is not deleted. Add one by its folder path. The **Workflows ›** row opens the stages each kind of initiative goes through, inside Settings, which then takes the whole window. Each workspace keeps its own workflows: when PMOS works in more than one, the **Workspace** picker over the list says whose workflows show, and PMOS remembers your pick. See [Workflows](statuses.md). |
20
+ | Workspaces | The repositories PMOS works in. Remove forgets the address only; the folder is not deleted. Add one by its folder path. The **Workflows ›** row opens the stages each kind of initiative goes through, inside Settings, which then takes the whole window. Each workspace keeps its own workflows: when PMOS works in more than one, the **Workspace** picker over the list says whose workflows show, and PMOS remembers your pick. A stage's Only when readings come from the same workspace. If the workspace you picked is removed, the page opens on the server's own. See [Workflows](statuses.md). |
21
21
  | Updates | The version of the app and of each workspace's kit, the check for updates, and what changed. |
22
22
 
23
23
  ## Update PMOS and the kit
@@ -21,6 +21,9 @@ const KEY = 'chat:main';
21
21
  const MARK = '[PMOS chief of staff]';
22
22
  const SAYS = 'The PM says: ';
23
23
 
24
+ /** The sources block, said in full on every message that names reads, so a session that never saw RULE still knows the format. */
25
+ const SRC_ASK = 'End with the pmos-src block: one fenced code block with the language tag pmos-src holding one JSON array such as [{"name":"Calendar","fresh":"read now"}], one entry per source you read and how fresh it is.';
26
+
24
27
  const isKey = (key) => String(key || '') === KEY;
25
28
 
26
29
  /** Words that point at a `pmos` read, best first. Each entry: the verb, and the words that send a question to it. */
@@ -63,7 +66,9 @@ function wrap(text, page) {
63
66
  const t = String(text == null ? '' : text);
64
67
  const verbs = routeOf(t);
65
68
  const lines = [MARK + (page ? ' The PM is on ' + String(page).replace(/\s+/g, ' ').slice(0, 120) + '; answer about it first.' : '')];
66
- if (verbs.length) lines.push('Reads that fit: ' + verbs.map((v) => 'pmos ' + v).join(', ') + '. End with the pmos-src block.');
69
+ // bug 2026-11-24: a session that did not open with RULE (a resumed chat, a session picked in the popup) asked "what pmos-src block format?",
70
+ // so the line names the format itself, not only the block
71
+ if (verbs.length) lines.push('Reads that fit: ' + verbs.map((v) => 'pmos ' + v).join(', ') + '. ' + SRC_ASK);
67
72
  return lines.join(' ') + '\n\n' + SAYS + t;
68
73
  }
69
74
 
@@ -87,4 +92,4 @@ function briefsBlock(lines) {
87
92
  return ls.length ? [['The unit owners\' newest briefs (pmos units has the rest; a failed run is done work with a reason, not the PM\'s):', ...ls].join('\n')] : [];
88
93
  }
89
94
 
90
- module.exports = { KEY, MARK, RULE, ROUTES, isKey, routeOf, wrap, parseSources, briefsBlock, unitOfKey };
95
+ module.exports = { KEY, MARK, RULE, SRC_ASK, ROUTES, isKey, routeOf, wrap, parseSources, briefsBlock, unitOfKey };
@@ -156,6 +156,14 @@ function descendants(pid, listChildren, maxDepth = MAX_WALK_DEPTH) {
156
156
  * written). The cwd-in-root proof here is what makes the child-walk safe: it runs on EVERY pid we
157
157
  * consider, pane or descendant, identically.
158
158
  */
159
+ /** <home>/projects/<any>/<sessionId>.jsonl, or null. Only a plain id is looked up (no path parts). */
160
+ function otherProjectFile(home, sessionId) {
161
+ const id = String(sessionId || '');
162
+ if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(id)) return null;
163
+ let subs = []; try { subs = fs.readdirSync(path.join(home, 'projects')); } catch { return null; }
164
+ for (const p of subs) { const f = path.join(home, 'projects', p, id + '.jsonl'); try { if (fs.statSync(f).isFile()) return f; } catch { /* not here */ } }
165
+ return null;
166
+ }
159
167
  function resolvePid(pid, root, home) {
160
168
  if (Array.isArray(home)) {
161
169
  let first = null;
@@ -176,8 +184,13 @@ function resolvePid(pid, root, home) {
176
184
  const rel = path.relative(root, reg.cwd);
177
185
  if (root && (rel.startsWith('..') || path.isAbsolute(rel))) return { outside: true };
178
186
  const file = path.join(home, 'projects', slugFor(reg.cwd), `${reg.sessionId}.jsonl`);
179
- if (!fs.existsSync(file)) return { noTranscript: true };
180
- return { sessionId: reg.sessionId, file, version: reg.version || null };
187
+ if (fs.existsSync(file)) return { sessionId: reg.sessionId, file, version: reg.version || null };
188
+ // bug 2026-11-24 ("the chat didn't come back to the chat panel"): `claude --resume <id>` started in another folder keeps writing the
189
+ // conversation's file under the project folder it was FIRST started in, while the session record names the new cwd. A PMOS chat resumes
190
+ // its own conversation from whichever workspace the PM is in, so the cwd's folder held no file and the chat waited on "PMOS is working"
191
+ // while the answer sat in the terminal. The session id is unique, so the file of that id in any project folder of this home is the one.
192
+ const moved = otherProjectFile(home, reg.sessionId);
193
+ return moved ? { sessionId: reg.sessionId, file: moved, version: reg.version || null } : { noTranscript: true };
181
194
  }
182
195
 
183
196
  /**
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.757.0",
3
+ "version": "0.759.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.757.0",
9
+ "version": "0.759.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.757.0",
3
+ "version": "0.759.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",
@@ -16,7 +16,8 @@
16
16
  * Reads GET /api/workflows and GET /api/workflows/draft. Every write is the PM's press: POST /api/workflows/save | copy | archive | draft.
17
17
  * Product feature ships with PMOS and is read-only here: Copy makes an editable one. */
18
18
  import { pmGet, pmPost } from './http.js';
19
- import { esc, svg, ICON, wsParam } from './cozy-evui.js';
19
+ import { esc, svg, ICON } from './cozy-evui.js';
20
+ import { wsNow, wsQs, setWs, prune, fixed } from './wf-ws.js'; // the one answer to which workspace shows, shared with pm/wf-stage.js
20
21
  import * as VW from './cozy-viewer.js';
21
22
  import { CATS, wfIcon, PRODUCT_FEATURE_ID } from './wf-model.js';
22
23
  import * as E from './wf-edit.js';
@@ -27,9 +28,6 @@ const $ = (s) => document.querySelector(s);
27
28
  /* THE WORKSPACE THIS PAGE SHOWS. Each workspace keeps its own library (its pmos/state/workflows.jsonl), so the page says which one it shows
28
29
  * and lets the PM pick another (bug 2026-11-24: Settings opened the server's home, a demo repository, and the PM's own workflows in IDPF
29
30
  * looked lost). ?ws= wins, then the PM's last pick, then the server's own. */
30
- const WS_KEY = 'pmos.wf.ws';
31
- const wsNow = () => wsParam() || store.get(WS_KEY) || '';
32
- const wsQs = () => (wsNow() ? '?ws=' + encodeURIComponent(wsNow()) : '');
33
31
  const post = (path, body) => pmPost(path, wsNow() ? { ws: wsNow(), ...body } : body);
34
32
  const PHONE = 760;
35
33
  const isPhone = () => innerWidth <= PHONE;
@@ -113,13 +111,12 @@ function wsPick() {
113
111
  async function readWorkspaces() {
114
112
  const r = await pmGet('/api/workspaces').catch(() => null);
115
113
  S.wss = r && Array.isArray(r.workspaces) ? r.workspaces : [];
116
- // a remembered pick that is no longer a workspace falls back to the server's own
117
- if (!wsParam() && store.get(WS_KEY) && !S.wss.some((w) => w.id === store.get(WS_KEY))) store.set(WS_KEY, '');
114
+ prune(S.wss); // a remembered pick that is no longer a workspace falls back to the server's own
118
115
  drawList();
119
116
  }
120
117
  function pickWs(id) {
121
- if (wsParam() || id === wsNow()) return;
122
- store.set(WS_KEY, id);
118
+ if (fixed() || id === wsNow()) return;
119
+ setWs(id);
123
120
  VW.close(); S.sel = null; S.list = null; S.draft = null; S.edit = null; S.msg = ''; S.err = '';
124
121
  draw(); load(); readDraft();
125
122
  }
@@ -498,9 +495,8 @@ export function mount(host, o = {}) {
498
495
  setStageHost(stageCtx());
499
496
  if (fresh) bind();
500
497
  draw();
501
- load();
502
- readDraft(); // a draft PMOS wrote (in this chat or another) shows as its row, by name
503
- readWorkspaces();
498
+ // the workspaces first: a remembered pick that was removed must go before the first read, or the page opens on "no such workspace"
499
+ readWorkspaces().then(() => { load(); readDraft(); }); // readDraft: a draft PMOS wrote (in this chat or another) shows as its row
504
500
  return ROOT;
505
501
  }
506
502
  /** Settings leaves the panel (another section, or closed): the Viewer leaves the dialog, and nothing keeps reading. */
@@ -10,7 +10,8 @@
10
10
  * Every change saves at once through the page's save (POST /api/workflows/save). A workflow that ships with PMOS shows read-only.
11
11
  * setStageHost(ctx) · openStage(wf, key, { rename? }) */
12
12
  import { pmGet } from './http.js';
13
- import { esc, svg, wsQ } from './cozy-evui.js';
13
+ import { esc, svg } from './cozy-evui.js';
14
+ import { wsQs } from './wf-ws.js'; // the workspace Settings › Workflows shows (pm/wf-ws.js), not only ?ws=
14
15
  import * as VW from './cozy-viewer.js';
15
16
  import { CATS, OUTPUT_KINDS, WHEN, wfIcon } from './wf-model.js';
16
17
  import * as E from './wf-edit.js';
@@ -126,7 +127,7 @@ function change(e, key) {
126
127
  /* ── Only when (WfACond) ── */
127
128
  let ROWS = null;
128
129
  async function readRows() {
129
- const r = await pmGet('/api/board-premium' + wsQ()).catch(() => null);
130
+ const r = await pmGet('/api/board-premium' + wsQs()).catch(() => null);
130
131
  ROWS = r && r.ok && r.model && Array.isArray(r.model.rows) ? r.model.rows : r && r.state === 'reading' ? 'reading' : [];
131
132
  return ROWS;
132
133
  }
@@ -0,0 +1,28 @@
1
+ /* pm/wf-ws.js — the workspace Settings › Workflows shows (bug 2026-11-24, initiative workflows-pick-workspace). Each workspace keeps its own
2
+ * workflow library, so the page (pm/wf-page.js) and the stage panel (pm/wf-stage.js) read and write the SAME one: ?ws= wins, then the PM's
3
+ * last pick (localStorage 'pmos.wf.ws'), then the server's own. A remembered pick that is no longer a workspace is dropped before the first
4
+ * read (keep), so the page never opens on a 404. Nothing here fetches.
5
+ * pickOf({ param, stored }) → the workspace id, '' for the server's own
6
+ * keep(stored, list) → the stored id when it is still a workspace in list, else ''
7
+ * wsNow() / wsQs() / setWs(id) the browser's answer, its ?ws= query, and the pick */
8
+ import { wsParam } from './cozy-evui.js';
9
+
10
+ export const WS_KEY = 'pmos.wf.ws';
11
+ const store = { get(k) { try { return localStorage.getItem(k); } catch { return null; } }, set(k, v) { try { if (v) localStorage.setItem(k, v); else localStorage.removeItem(k); } catch { /* a private window */ } } };
12
+
13
+ export const pickOf = ({ param, stored } = {}) => param || stored || '';
14
+ export function keep(stored, list) {
15
+ if (!stored) return '';
16
+ return (Array.isArray(list) ? list : []).some((w) => w && w.id === stored && !w.linked) ? stored : '';
17
+ }
18
+ export const wsNow = () => pickOf({ param: wsParam(), stored: store.get(WS_KEY) });
19
+ export const wsQs = () => (wsNow() ? '?ws=' + encodeURIComponent(wsNow()) : '');
20
+ export const fixed = () => !!wsParam();
21
+ export function setWs(id) { store.set(WS_KEY, id || ''); }
22
+ /** After reading the workspaces: a stale pick goes, so the next read is the server's own. true when it dropped one. */
23
+ export function prune(list) {
24
+ const s = store.get(WS_KEY);
25
+ if (wsParam() || !s || keep(s, list)) return false;
26
+ store.set(WS_KEY, '');
27
+ return true;
28
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "A resumed chat's transcript is found in the project folder it was first started in (initiative chat-reply-resumed-folder, done test C1-C2). Pure; no browser, no server.",
3
+ "modules": [
4
+ "transcript-resumed-folder.test.js"
5
+ ],
6
+ "seconds": {
7
+ "transcript-resumed-folder.test.js": 1
8
+ }
9
+ }