create-pmos 0.459.0 → 0.460.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 +14 -14
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/changelog.json +13 -0
- package/workspace/lib/routes-programs.js +33 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/test-files.json +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.460.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,19 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.460.0",
|
|
37
|
+
"at": "2026-10-31T01:09:44.980Z",
|
|
38
|
+
"f": 3,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1112,
|
|
42
|
+
"t": "Read a linked worktree's programs as its main tree's",
|
|
43
|
+
"s": "Read a linked worktree's programs as its main tree's",
|
|
44
|
+
"k": "fix"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
35
48
|
{
|
|
36
49
|
"v": "0.459.0",
|
|
37
50
|
"at": "2026-10-30T09:40:09.558Z",
|
|
@@ -284,19 +297,6 @@
|
|
|
284
297
|
"k": "new"
|
|
285
298
|
}
|
|
286
299
|
]
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"v": "0.440.0",
|
|
290
|
-
"at": "2026-10-28T10:07:02.578Z",
|
|
291
|
-
"f": 3,
|
|
292
|
-
"prs": [
|
|
293
|
-
{
|
|
294
|
-
"n": 1084,
|
|
295
|
-
"t": "Your day rows open, honest Intelligence drafting, update reloads in place, Live pill clear of the chat (feedback batch 18 items 3–6)",
|
|
296
|
-
"s": "Your day rows open, honest Intelligence drafting, update reloads in place, Live pill clear of the chat (feedback batch 18 items 3–6)",
|
|
297
|
-
"k": "fix"
|
|
298
|
-
}
|
|
299
|
-
]
|
|
300
300
|
}
|
|
301
301
|
]
|
|
302
302
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
kernel-source: pmos@
|
|
2
|
-
assembled: 2026-10-
|
|
1
|
+
kernel-source: pmos@a1ccd04a
|
|
2
|
+
assembled: 2026-10-31
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-31T01:09:41Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-31T01:09:41Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-31T01:09:41Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/payload/state/log.md
CHANGED
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.460.0",
|
|
4
|
+
"at": "2026-10-31T01:09:44.980Z",
|
|
5
|
+
"f": 3,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1112,
|
|
9
|
+
"t": "Read a linked worktree's programs as its main tree's",
|
|
10
|
+
"s": "Read a linked worktree's programs as its main tree's",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.459.0",
|
|
4
17
|
"at": "2026-10-30T09:40:09.558Z",
|
|
@@ -33,6 +33,7 @@ const guard = require('./pm-guard.js');
|
|
|
33
33
|
const pmItems = require('./pm-items.js');
|
|
34
34
|
const P = require('./programs.js');
|
|
35
35
|
const MS = require('./milestone-suggest.js');
|
|
36
|
+
const gitInfo = require('./git-info.js');
|
|
36
37
|
|
|
37
38
|
const str = (v, n) => String(v == null ? '' : v).replace(/[\u0000-\u001f]+/g, ' ').trim().slice(0, n);
|
|
38
39
|
const DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
@@ -47,10 +48,36 @@ function stateDir(ctx, w, create = true) {
|
|
|
47
48
|
const fileOf = (ctx, w, create = true) => { const d = stateDir(ctx, w, create); return d ? path.join(d, 'programs.jsonl') : null; };
|
|
48
49
|
const read = (f) => { try { return f ? pmItems.readLines(f).filter(Boolean) : []; } catch { return []; } };
|
|
49
50
|
|
|
50
|
-
/**
|
|
51
|
+
/** The registered workspace a linked git worktree stands for: the one at the same place in the repo's main tree. A worktree is its own
|
|
52
|
+
* checkout, so it carries its own copy of programs.jsonl, and registered it is its own "product" (`pmos-idpf ⑂ initiative/x`). Read as
|
|
53
|
+
* such, a charter saved from the worktree puts the program under the worktree product while its members sit under the main one, and a
|
|
54
|
+
* member line that both hold shows twice. So the ledgers of a repo's trees are read as ONE product, the main tree's. Null when the
|
|
55
|
+
* workspace is not a linked worktree, or its main tree is not registered (nothing to fold into). Memoised: all() runs on every poll. */
|
|
56
|
+
const MAIN_TTL_MS = 15000;
|
|
57
|
+
const mainCache = new Map(); // root -> { at, main: root of the repo's main tree | null }
|
|
58
|
+
function mainTreeRoot(w) {
|
|
59
|
+
const hit = mainCache.get(w.root);
|
|
60
|
+
if (hit && Date.now() - hit.at < MAIN_TTL_MS) return hit.main;
|
|
61
|
+
let main = null;
|
|
62
|
+
try {
|
|
63
|
+
const top = gitInfo.repoRoot(w.root), trees = top ? gitInfo.worktrees(w.root) : [];
|
|
64
|
+
if (top && trees.length && trees[0].dir && path.resolve(trees[0].dir) !== path.resolve(top)) main = path.join(path.resolve(trees[0].dir), path.relative(path.resolve(top), path.resolve(w.root)));
|
|
65
|
+
} catch { main = null; }
|
|
66
|
+
mainCache.set(w.root, { at: Date.now(), main });
|
|
67
|
+
return main;
|
|
68
|
+
}
|
|
69
|
+
function foldedInto(list, w) {
|
|
70
|
+
const main = mainTreeRoot(w);
|
|
71
|
+
return main ? list.find((x) => x !== w && path.resolve(x.root) === main) || null : null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Every registered workspace's ledger, merged; each program with Claude's milestone review from its charter's workspace. A linked
|
|
75
|
+
* worktree's ledger counts as its main tree's (foldedInto), read first so the main tree's own lines win where both say the same thing. */
|
|
51
76
|
function all(ctx, now = Date.now()) {
|
|
52
77
|
const list = (ctx.workspaceList ? ctx.workspaceList() : []) || [];
|
|
53
|
-
const
|
|
78
|
+
const of = (w) => foldedInto(list, w);
|
|
79
|
+
const perWs = list.map((w) => ({ ws: (of(w) || w).id, lines: read(fileOf(ctx, w, false)), tree: of(w) ? 0 : 1 })).sort((a, b) => a.tree - b.tree);
|
|
80
|
+
const progs = P.merge(perWs);
|
|
54
81
|
const R = new Map();
|
|
55
82
|
for (const p of progs) {
|
|
56
83
|
if (!R.has(p.home)) { const w = list.find((x) => x.id === p.home), d = w ? stateDir(ctx, w, false) : null; R.set(p.home, MS.fold(read(d ? MS.fileOf(d) : null))); }
|
|
@@ -87,7 +114,10 @@ module.exports = {
|
|
|
87
114
|
if (!g.ok) return bad(g.error, g.status);
|
|
88
115
|
// a check line belongs with the charter, so every workspace's reader applies it to the same milestones
|
|
89
116
|
const home = ['/api/programs/check', '/api/programs/order', '/api/programs/suggestion', '/api/programs/review', '/api/programs/facts'].includes(p) && P.ID_RE.test(String(b.program || '')) ? (all(ctx).find((x) => x.id === b.program) || {}).home : null;
|
|
90
|
-
const
|
|
117
|
+
const asked = ctx.getWs ? ctx.getWs(home || b.ws || null) : null;
|
|
118
|
+
// a press made from a linked worktree writes to its repository's main tree, the product (see foldedInto): a program saved on a
|
|
119
|
+
// branch's own copy of the ledger would go with the branch
|
|
120
|
+
const w = (asked && foldedInto((ctx.workspaceList ? ctx.workspaceList() : []) || [], asked)) || asked;
|
|
91
121
|
if (!w) return bad('that workspace is not registered', 404);
|
|
92
122
|
const file = fileOf(ctx, w);
|
|
93
123
|
if (!file) return bad('this workspace has no state folder', 409);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.460.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.460.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"modules": [
|
|
11
11
|
"find-browser.test.js",
|
|
12
|
+
"program-worktree.test.js",
|
|
12
13
|
"own-profile.test.js",
|
|
13
14
|
"stage-tools.test.js",
|
|
14
15
|
"report-template-cadence.test.js",
|
|
@@ -170,6 +171,7 @@
|
|
|
170
171
|
"briefing-premium-sources.test.js": 1,
|
|
171
172
|
"briefing-premium-drafts.test.js": 1,
|
|
172
173
|
"agent-inbox.test.js": 1,
|
|
174
|
+
"program-worktree.test.js": 1,
|
|
173
175
|
"session-rail.test.js": 1,
|
|
174
176
|
"briefing-premium-metrics.test.js": 1,
|
|
175
177
|
"premium-welcome.test.js": 1,
|