create-pmos 0.331.0 → 0.332.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.331.0",
3
+ "version": "0.332.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,16 @@
32
32
  "audit"
33
33
  ],
34
34
  "pmosChanges": [
35
+ {
36
+ "v": "0.332.0",
37
+ "at": "2026-10-20T00:53:53.997Z",
38
+ "prs": [
39
+ {
40
+ "n": 927,
41
+ "s": "the Checker gets a share of the cap. It makes at most 8 starts a day, and none once half the daily cap is used, so the Driver and the other jobs keep the rest."
42
+ }
43
+ ]
44
+ },
35
45
  {
36
46
  "v": "0.331.0",
37
47
  "at": "2026-10-20T00:11:06.936Z",
@@ -245,16 +255,6 @@
245
255
  "s": "the list shows the console's Needs you rows, in the console's order, from the same reads (GET /api/briefing, /api/brief-page, /api/needs). The header count, the dock and the bell use the same number."
246
256
  }
247
257
  ]
248
- },
249
- {
250
- "v": "0.312.0",
251
- "at": "2026-10-19T13:07:09.009Z",
252
- "prs": [
253
- {
254
- "n": 885,
255
- "s": "Both pages have one Calendar card. Monday to Friday is a strip on top, with the My work bars and the done and due blocks."
256
- }
257
- ]
258
258
  }
259
259
  ]
260
260
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@43ea2b7a
1
+ kernel-source: pmos@f882226d
2
2
  assembled: 2026-10-20
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-20T00:11:03Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T00:53:50Z"}
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-20T00:11:03Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T00:53:50Z"}
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-20T00:11:03Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-20T00:53:50Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,14 @@
1
1
  [
2
+ {
3
+ "v": "0.332.0",
4
+ "at": "2026-10-20T00:53:53.997Z",
5
+ "prs": [
6
+ {
7
+ "n": 927,
8
+ "s": "the Checker gets a share of the cap. It makes at most 8 starts a day, and none once half the daily cap is used, so the Driver and the other jobs keep the rest."
9
+ }
10
+ ]
11
+ },
2
12
  {
3
13
  "v": "0.331.0",
4
14
  "at": "2026-10-20T00:11:06.936Z",
@@ -4,6 +4,9 @@
4
4
  *
5
5
  * FILE checker.jsonl, beside driver.jsonl in the repository's state folder
6
6
  * due(state, checked, { now }) → [{ run, target, proposals: [p] }] ended Driver runs with open drafts and no check yet (3 days at most)
7
+ * share({ checkedToday, startedToday, dailyCap }) → { ok, reason } the Checker's share of the daily cap: SHARE_PER_DAY starts at most, and
8
+ * never the last half of the cap, so a backlog of drafts cannot spend the Driver's starts
9
+ * checkedToday(checks, { now }) → the Checker runs that answered today (local day), counted by run
7
10
  * promptFor({ target, proposals }) → the prompt. The drafts are quoted as data, never as instructions.
8
11
  * parse(text, ids) → [{ proposal, verdict: 'pass' | 'flag', reason }] | null one JSON object; an unknown id is dropped
9
12
  * readChecks(dir) · append(dir, line) → Map proposal → { verdict, reason, run, at } · one line
@@ -23,6 +26,7 @@ const DAY = 86400000;
23
26
  const DUE_DAYS = 3;
24
27
  const MIN_N = 10, MIN_KAPPA = 0.6, MIN_TNR = 0.5;
25
28
  const MAX_REASON = 300;
29
+ const SHARE_PER_DAY = 8; // Checker starts per local day at most (2026-10-20: a backlog of 40 ended runs spent the whole daily cap of 40 in 44 minutes)
26
30
  const msOf = (v) => { const t = Date.parse(v); return Number.isFinite(t) ? t : null; };
27
31
  const clip = (s, n) => { s = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return s.length > n ? s.slice(0, n - 1).trimEnd() + '…' : s; };
28
32
 
@@ -49,9 +53,24 @@ function due(state, checked, { now = Date.now() } = {}) {
49
53
  if (!r.end || r.ok !== true) continue;
50
54
  const end = msOf(r.end); if (end == null || now - end > DUE_DAYS * DAY) continue;
51
55
  const proposals = [...state.proposals.values()].filter((p) => p.run === r.run && p.state === 'open' && !checked.has(p.id));
52
- if (proposals.length) out.push({ run: r.run, target: r.target, proposals });
56
+ if (proposals.length) out.push({ run: r.run, target: r.target, proposals, end });
53
57
  }
54
- return out;
58
+ return out.sort((a, b) => b.end - a.end); // newest first: the drafts the PM reads next are graded first
59
+ }
60
+
61
+ const localDay = (ms) => { const d = new Date(ms); return `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`; };
62
+ function checkedToday(checks, { now = Date.now() } = {}) {
63
+ const runs = new Set();
64
+ for (const c of (checks && typeof checks.values === 'function' ? checks.values() : [])) {
65
+ const t = msOf(c.at);
66
+ if (t != null && c.run && localDay(t) === localDay(now)) runs.add(c.run);
67
+ }
68
+ return runs.size;
69
+ }
70
+ function share({ checkedToday: n = 0, startedToday = 0, dailyCap = 40 } = {}) {
71
+ if (n >= SHARE_PER_DAY) return { ok: false, reason: `the Checker has had its ${SHARE_PER_DAY} runs today` };
72
+ if (startedToday >= Math.floor(dailyCap / 2)) return { ok: false, reason: `half of today's ${dailyCap} starts are used; the rest are kept for the Driver and the other jobs` };
73
+ return { ok: true, reason: null };
55
74
  }
56
75
 
57
76
  function promptFor({ target, proposals }) {
@@ -113,4 +132,4 @@ function summary(proposals, checks, cal) {
113
132
  return { pass, flag, label: (cal && cal.label) || 'checked: unverified' };
114
133
  }
115
134
 
116
- module.exports = { FILE, due, promptFor, parse, readChecks, append, calibration, summary, MIN_N, MIN_KAPPA, MIN_TNR };
135
+ module.exports = { FILE, SHARE_PER_DAY, due, share, checkedToday, promptFor, parse, readChecks, append, calibration, summary, MIN_N, MIN_KAPPA, MIN_TNR };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.331.0",
3
+ "version": "0.332.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.331.0",
9
+ "version": "0.332.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.331.0",
3
+ "version": "0.332.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",
@@ -2640,7 +2640,9 @@ const orchCheckTick = () => {
2640
2640
  for (const w of workspaces.values()) {
2641
2641
  let dir; try { dir = D.stateDirOf(w.root); } catch { dir = null; }
2642
2642
  if (!dir) continue;
2643
- let todo; try { todo = C.due(D.fold(D.readLines(D.ledgerFile(dir))), C.readChecks(dir)); } catch (e) { warnWriteFail('checker read', e); continue; }
2643
+ let todo, checks; try { checks = C.readChecks(dir); todo = C.due(D.fold(D.readLines(D.ledgerFile(dir))), checks); } catch (e) { warnWriteFail('checker read', e); continue; }
2644
+ // the Checker's share of the daily cap (lib/orchestrator-checker.js share): it never spends the starts the Driver and the jobs need
2645
+ if (todo.length) { const st = orchGate.status({}); if (!C.share({ checkedToday: C.checkedToday(checks) + orchChecking.size, startedToday: st.startedToday, dailyCap: (st.settings && st.settings.dailyCap) || 40 }).ok) return; }
2644
2646
  const job = todo.find((j) => !orchChecking.has(j.run));
2645
2647
  if (!job) continue;
2646
2648
  const ids = job.proposals.map((p) => p.id);