create-pmos 0.582.0 → 0.584.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 +33 -27
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +32 -0
- package/workspace/lib/transcript-read.js +29 -7
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/server.js +25 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.584.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,38 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.584.0",
|
|
38
|
+
"at": "2026-11-17T06:55:14.683Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1319,
|
|
43
|
+
"t": "The product improve loop reads PMOS's stage from a hosted PMOS checkout",
|
|
44
|
+
"s": "The product improve loop reads PMOS's stage from a hosted PMOS checkout",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1318,
|
|
49
|
+
"t": "Read the add-directory trust prompt as a real 80-column pane draws it",
|
|
50
|
+
"s": "Read the add-directory trust prompt as a real 80-column pane draws it",
|
|
51
|
+
"k": "fix"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"v": "0.583.0",
|
|
57
|
+
"at": "2026-11-17T04:07:38.209Z",
|
|
58
|
+
"f": 4,
|
|
59
|
+
"prs": [
|
|
60
|
+
{
|
|
61
|
+
"n": 1316,
|
|
62
|
+
"t": "Answer Claude Code's add-directory trust prompt for PMOS's own chat-files folder",
|
|
63
|
+
"s": "Answer Claude Code's add-directory trust prompt for PMOS's own chat-files folder",
|
|
64
|
+
"k": "fix"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
36
68
|
{
|
|
37
69
|
"v": "0.582.0",
|
|
38
70
|
"at": "2026-11-17T02:50:44.770Z",
|
|
@@ -272,32 +304,6 @@
|
|
|
272
304
|
"k": "fix"
|
|
273
305
|
}
|
|
274
306
|
]
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"v": "0.564.0",
|
|
278
|
-
"at": "2026-11-11T14:08:23.553Z",
|
|
279
|
-
"f": 4,
|
|
280
|
-
"prs": [
|
|
281
|
-
{
|
|
282
|
-
"n": 1295,
|
|
283
|
-
"t": "Pmos blueprint on a shallow clone warns and shows Unknown, never a merged PR as In build",
|
|
284
|
-
"s": "Pmos blueprint on a shallow clone warns and shows Unknown, never a merged PR as In build",
|
|
285
|
-
"k": "fix"
|
|
286
|
-
}
|
|
287
|
-
]
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"v": "0.563.0",
|
|
291
|
-
"at": "2026-11-11T12:32:19.496Z",
|
|
292
|
-
"f": 4,
|
|
293
|
-
"prs": [
|
|
294
|
-
{
|
|
295
|
-
"n": 1294,
|
|
296
|
-
"t": "The feature registry and pmos blueprint, each status derived from evidence",
|
|
297
|
-
"s": "The feature registry and pmos blueprint, each status derived from evidence",
|
|
298
|
-
"k": "new"
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
307
|
}
|
|
302
308
|
]
|
|
303
309
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-17T06:55:11Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-17T06:55:11Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-17T06:55:11Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.584.0",
|
|
4
|
+
"at": "2026-11-17T06:55:14.683Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1319,
|
|
9
|
+
"t": "The product improve loop reads PMOS's stage from a hosted PMOS checkout",
|
|
10
|
+
"s": "The product improve loop reads PMOS's stage from a hosted PMOS checkout",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1318,
|
|
15
|
+
"t": "Read the add-directory trust prompt as a real 80-column pane draws it",
|
|
16
|
+
"s": "Read the add-directory trust prompt as a real 80-column pane draws it",
|
|
17
|
+
"k": "fix"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"v": "0.583.0",
|
|
23
|
+
"at": "2026-11-17T04:07:38.209Z",
|
|
24
|
+
"f": 4,
|
|
25
|
+
"prs": [
|
|
26
|
+
{
|
|
27
|
+
"n": 1316,
|
|
28
|
+
"t": "Answer Claude Code's add-directory trust prompt for PMOS's own chat-files folder",
|
|
29
|
+
"s": "Answer Claude Code's add-directory trust prompt for PMOS's own chat-files folder",
|
|
30
|
+
"k": "fix"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
2
34
|
{
|
|
3
35
|
"v": "0.582.0",
|
|
4
36
|
"at": "2026-11-17T02:50:44.770Z",
|
|
@@ -576,11 +576,17 @@ function permissionAsk(screen, clean = (x) => x) {
|
|
|
576
576
|
* Claude Code's folder trust prompt, read from the pane's visible screen the same way (feedback batch 10 item 1). A folder that
|
|
577
577
|
* Claude Code (under the profile the session runs with) was never told to trust opens with "Is this a project you trust?" or
|
|
578
578
|
* "Do you trust the files in this folder?", with "No, exit" as an answer. Typing the chat's first message into it chose an answer
|
|
579
|
-
* and the session ended within seconds, so the chat showed nothing. Returns { question, options, trust: true } or null
|
|
579
|
+
* and the session ended within seconds, so the chat showed nothing. Returns { question, options, trust: true, dir? } or null; `dir` is the
|
|
580
|
+
* folder a 2.1.326 "Adding a new directory" prompt asks about (an --add-dir), so the server can answer for a folder PMOS itself made.
|
|
580
581
|
*/
|
|
581
|
-
const TRUST_RE = /(trust the files in this folder|project you (?:created or one you )?trust|trust this (?:folder|project))/i;
|
|
582
|
+
const TRUST_RE = /(trust the files in this folder|(?:project|directory|folder) you (?:created or one you )?trust|trust this (?:folder|project|directory))/i;
|
|
583
|
+
// Claude Code 2.1.326 (2026-11-17): a folder given with --add-dir is asked about too — "Adding a new directory: <path> … Is this a directory
|
|
584
|
+
// you created or one you trust?", answers "No, exit" / "Yes, add it", and the hint line "Esc to exit · To add it, press ↓ to Yes, then Enter".
|
|
585
|
+
const ADD_DIR_RE = /^Adding a new directory:\s*(.*)$/i;
|
|
586
|
+
const HINT_RE = /^(?:Enter to confirm|Esc to (?:exit|cancel))\b|\s·\s/i;
|
|
582
587
|
const SEL_RE = /^[❯›>]\s+/;
|
|
583
588
|
const NUM_RE = /^\d[.)]\s+/;
|
|
589
|
+
const ANSWER_RE = /^(?:yes|no)\b/i;
|
|
584
590
|
/** The menu's answers: the lines next to the selected one (❯), up to a blank line. Each answer's n is its place (1 first) and sel is the
|
|
585
591
|
* place of the selected one, so the page can move the selection to an answer (arrow keys) and press Enter. The answers may or may not
|
|
586
592
|
* carry numbers. */
|
|
@@ -589,15 +595,31 @@ function trustAsk(screen, clean = (x) => x) {
|
|
|
589
595
|
let k = -1;
|
|
590
596
|
for (let i = lines.length - 1; i >= 0; i--) if (SEL_RE.test(lines[i])) { k = i; break; }
|
|
591
597
|
if (k < 0) return null;
|
|
598
|
+
// The answers are the Yes/No lines next to the selected one. (2026-11-17, 0.583.0 live check: the 2.1.326 prompt has no blank line
|
|
599
|
+
// between its description and "> No, exit", so "up to a blank line" swallowed the description. Every answer of a trust prompt starts
|
|
600
|
+
// with Yes or No; nothing else on the screen does.)
|
|
601
|
+
const strip = (l) => l.replace(SEL_RE, '').replace(NUM_RE, '').trim();
|
|
602
|
+
const isAnswer = (l) => l && ANSWER_RE.test(strip(l));
|
|
603
|
+
if (!isAnswer(lines[k])) return null;
|
|
592
604
|
let a = k, b = k;
|
|
593
|
-
while (a > 0 &&
|
|
594
|
-
while (b + 1 < lines.length && lines[b + 1] &&
|
|
595
|
-
const block = lines.slice(a, b + 1).map(
|
|
605
|
+
while (a > 0 && isAnswer(lines[a - 1]) && a > k - 6) a--;
|
|
606
|
+
while (b + 1 < lines.length && isAnswer(lines[b + 1]) && !HINT_RE.test(lines[b + 1]) && b < k + 6) b++;
|
|
607
|
+
const block = lines.slice(a, b + 1).map(strip);
|
|
596
608
|
if (block.length < 2 || block.length > 6 || !block.some((l) => /\bexit\b/i.test(l))) return null;
|
|
609
|
+
// The question, which an 80-column pane wraps ("…created or one" / "you trust?"): test each line joined with the next.
|
|
597
610
|
let q = null;
|
|
598
|
-
for (let i = a - 1; i >= 0 && i >= a - 12; i--)
|
|
611
|
+
for (let i = a - 1; i >= 0 && i >= a - 12; i--) {
|
|
612
|
+
if (TRUST_RE.test(lines[i])) { q = lines[i]; break; }
|
|
613
|
+
const two = lines[i] && lines[i + 1] ? lines[i] + ' ' + lines[i + 1] : '';
|
|
614
|
+
if (two && TRUST_RE.test(two)) { q = two; break; }
|
|
615
|
+
}
|
|
599
616
|
if (!q && !block.some((l) => /trust/i.test(l))) return null;
|
|
600
|
-
|
|
617
|
+
let dir = null;
|
|
618
|
+
for (let i = a - 1; i >= 0 && i >= a - 14; i--) {
|
|
619
|
+
const m = ADD_DIR_RE.exec(lines[i]);
|
|
620
|
+
if (m) { dir = (m[1] || '').trim() || (lines[i + 1] || '').trim(); break; }
|
|
621
|
+
}
|
|
622
|
+
return { question: clean(q || 'Do you trust the files in this folder?').slice(0, 200), options: block.map((l, i) => ({ n: String(i + 1), label: clean(l).slice(0, 160) })), sel: k - a + 1, trust: true, ...(dir ? { dir: clean(dir).slice(0, 400) } : {}) };
|
|
601
623
|
}
|
|
602
624
|
|
|
603
625
|
module.exports = { trustAsk, permissionAsk, askQuestions, claudeHomes, callTarget, findTranscript, readHarness, readConversation, CONV_LIMIT, prettyTool, slugFor, resolvePid, descendants,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.584.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.584.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
package/workspace/server.js
CHANGED
|
@@ -3131,7 +3131,8 @@ const verifyTick = () => { try { verifyRuns.tick({}); } catch (e) { warnWriteFai
|
|
|
3131
3131
|
const improveRuns = require('./lib/improve-runs.js').create({
|
|
3132
3132
|
roots: () => [...workspaces.values()].map((w) => ({ id: w.id, root: w.root })),
|
|
3133
3133
|
stateDirFor: (r) => { const w = workspaces.get(r.id); return w ? stateDirFor(w) : null; },
|
|
3134
|
-
|
|
3134
|
+
// An installed workspace (npm) is not a PMOS checkout, so the stage gate also reads a PMOS checkout the PM hosts as a workspace.
|
|
3135
|
+
selfRoot: () => { const IR = require('./lib/improve-runs.js'); if (IR.isSelf(SELF_ROOT)) return SELF_ROOT; const w = [...workspaces.values()].find((x) => x && x.root && IR.isSelf(x.root)); return w ? w.root : null; },
|
|
3135
3136
|
quota: () => orchQuota.read(STATE),
|
|
3136
3137
|
env: process.env,
|
|
3137
3138
|
spawn: (spec) => orchSpawn.spawn({ name: spec.name, agent: 'claude', ws: spec.ws, origin: spec.origin, initialInput: spec.initialInput, extraEnv: spec.env, autoDelete: undefined }),
|
|
@@ -3765,8 +3766,31 @@ function paneTrust(s, now = Date.now()) {
|
|
|
3765
3766
|
s.trustAt = now;
|
|
3766
3767
|
const r = tmuxCtl(['capture-pane', '-p', '-t', s.tmux]);
|
|
3767
3768
|
s.trust = r.status === 0 && r.stdout ? transcript.trustAsk(r.stdout, scrub) : null;
|
|
3769
|
+
// Claude Code 2.1.326 asks before it adds an --add-dir folder, once per session. The chat's attachments folder (lib/chat-files.js, under
|
|
3770
|
+
// PMOS's own state folder) is PMOS's to answer for: it made it, and the PM never sees the hidden terminal the question sits in. Any other
|
|
3771
|
+
// folder stays the PM's question, as before. (2026-11-17: every new chat stalled on this prompt and the chat showed nothing.)
|
|
3772
|
+
if (s.trust && s.trust.dir && ownStateDir(s.trust.dir)) {
|
|
3773
|
+
const yes = s.trust.options.find((o) => /^yes\b/i.test(o.label));
|
|
3774
|
+
if (yes && answerPrompt(s, s.trust, Number(yes.n))) { s.note = 'PMOS added its attachments folder to the session (Claude Code asked)'; s.trust = null; return null; }
|
|
3775
|
+
}
|
|
3768
3776
|
return s.trust;
|
|
3769
3777
|
}
|
|
3778
|
+
// A folder under PMOS's own state folder (the runtime folder of any workspace, or STATE), resolved; never a product repository.
|
|
3779
|
+
function ownStateDir(p) {
|
|
3780
|
+
try {
|
|
3781
|
+
const d = path.resolve(String(p || ''));
|
|
3782
|
+
const roots = [STATE, ...[...workspaces.values()].map((w) => { try { return stateDirFor(w); } catch { return null; } })].filter(Boolean).map((x) => path.resolve(x));
|
|
3783
|
+
return roots.some((root) => d === root || d.startsWith(root + path.sep));
|
|
3784
|
+
} catch { return false; }
|
|
3785
|
+
}
|
|
3786
|
+
// Answer a menu prompt on the pane with its n-th answer: arrow keys from the selected one, then Enter (chatSessions.pick does the same).
|
|
3787
|
+
function answerPrompt(s, q, n) {
|
|
3788
|
+
if (!s.pty || s.state === 'exited' || !(n >= 1 && n <= q.options.length)) return false;
|
|
3789
|
+
const d = n - q.sel;
|
|
3790
|
+
try { s.pty.write((d > 0 ? '\x1b[B' : '\x1b[A').repeat(Math.abs(d))); setTimeout(() => { try { s.pty.write('\r'); } catch { /* gone */ } }, 200); } catch { return false; }
|
|
3791
|
+
s.trustAt = Date.now();
|
|
3792
|
+
return true;
|
|
3793
|
+
}
|
|
3770
3794
|
// The pane's visible screen, plain text, or '' (no tmux pane). lib/first-input.js reads Claude Code's input box from it.
|
|
3771
3795
|
function paneScreen(s) {
|
|
3772
3796
|
if (!s || !s.tmux || !TMUX) return '';
|