create-pmos 0.72.0 → 0.72.1
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 +1 -1
- 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/lib/people-store.js +24 -2
- package/workspace/package-lock.json +1 -1
- package/workspace/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.1",
|
|
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": {
|
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-10-07T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-07T05:22:25Z"}
|
|
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-07T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-07T05:22:25Z"}
|
|
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-07T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-07T05:22:25Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -23,23 +23,45 @@ const crypto = require('crypto');
|
|
|
23
23
|
const P = require('./people');
|
|
24
24
|
const fourPanel = require('./four-panel');
|
|
25
25
|
const consoleState = require('./console-state');
|
|
26
|
+
const planTree = require('./plan-tree');
|
|
26
27
|
|
|
27
28
|
const MAX_PER_RECORD = 500;
|
|
28
29
|
const fs = require('fs');
|
|
29
30
|
const path = require('path');
|
|
30
31
|
|
|
32
|
+
/** One ledger per repository, whichever worktree is open: the main working tree, as plan items read theirs. */
|
|
33
|
+
function repoRoot(root) { return planTree.mainTree(path.resolve(root)); }
|
|
31
34
|
function stateDir(root) {
|
|
32
35
|
const e = consoleState.loadEngine();
|
|
33
36
|
if (!e.ok) return { ok: false, error: e.error };
|
|
34
|
-
const dir = fourPanel.storeDir(e.engine, root);
|
|
37
|
+
const dir = fourPanel.storeDir(e.engine, repoRoot(root));
|
|
35
38
|
return dir ? { ok: true, dir } : { ok: false, error: 'this repository has no file-mode state directory' };
|
|
36
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* The other places an earlier version may have written this repository's ledger. The engine puts records in
|
|
42
|
+
* planning/runs/ until the repository has pmos/state/initiatives/, then in pmos/state/, so a repository that gained its
|
|
43
|
+
* first initiative after People was used reads a new, empty file. Before 0.72.1 a worktree also wrote its own ledger.
|
|
44
|
+
* Their rows are read first, so a later press in the ledger now written still wins.
|
|
45
|
+
*/
|
|
46
|
+
function olderLedgers(root, dir) {
|
|
47
|
+
const roots = [...new Set([repoRoot(root), path.resolve(root)])];
|
|
48
|
+
const dirs = roots.flatMap((r) => [path.join(r, 'planning', 'runs'), path.join(r, 'pmos', 'state')]);
|
|
49
|
+
return [...new Set(dirs)].filter((d) => path.resolve(d) !== path.resolve(dir) && fs.existsSync(path.join(d, P.LEDGER)));
|
|
50
|
+
}
|
|
37
51
|
function readRows(root) {
|
|
38
52
|
const s = stateDir(root);
|
|
39
53
|
if (!s.ok) return s;
|
|
40
54
|
const r = fourPanel.readDeclarations(s.dir, P.LEDGER);
|
|
41
55
|
if (!r.ok) return { ok: false, error: r.error };
|
|
42
|
-
|
|
56
|
+
const older = olderLedgers(root, s.dir);
|
|
57
|
+
if (!older.length) return { ok: true, dir: s.dir, file: r.file, rows: r.rows };
|
|
58
|
+
// A line already in a file read before (a worktree's copy of a committed ledger) counts once.
|
|
59
|
+
const rows = [];
|
|
60
|
+
for (const list of [...older.map((d) => fourPanel.readDeclarations(d, P.LEDGER)).filter((o) => o.ok).map((o) => o.rows), r.rows]) {
|
|
61
|
+
const before = new Set(rows.map((x) => JSON.stringify(x)));
|
|
62
|
+
for (const row of list) if (!before.has(JSON.stringify(row))) rows.push(row);
|
|
63
|
+
}
|
|
64
|
+
return { ok: true, dir: s.dir, file: r.file, rows, older: older.map((d) => path.join(d, P.LEDGER)) };
|
|
43
65
|
}
|
|
44
66
|
/** The plan items, for shared work (R10). A repository without a plan gives none. */
|
|
45
67
|
function planItems(root) {
|
package/workspace/package.json
CHANGED