create-pmos 0.542.0 → 0.543.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 +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 +13 -0
- package/workspace/guide/settings-and-switches.md +2 -1
- package/workspace/lib/corrections-memory.js +51 -0
- package/workspace/lib/routes-lab.js +1 -0
- package/workspace/lib/routes-proposals.js +2 -0
- package/workspace/lib/team-runs.js +32 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/test-lists/corrections-memory.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.543.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.543.0",
|
|
37
|
+
"at": "2026-11-08T10:18:52.684Z",
|
|
38
|
+
"f": 4,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1271,
|
|
42
|
+
"t": "✕ reasons become memory; each team role reads a notebook of its earlier work",
|
|
43
|
+
"s": "✕ reasons become memory; each team role reads a notebook of its earlier work",
|
|
44
|
+
"k": "new"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
35
48
|
{
|
|
36
49
|
"v": "0.542.0",
|
|
37
50
|
"at": "2026-11-08T06:18:15.279Z",
|
|
@@ -440,19 +453,6 @@
|
|
|
440
453
|
"k": "new"
|
|
441
454
|
}
|
|
442
455
|
]
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"v": "0.523.0",
|
|
446
|
-
"at": "2026-11-04T08:06:51.586Z",
|
|
447
|
-
"f": 4,
|
|
448
|
-
"prs": [
|
|
449
|
-
{
|
|
450
|
-
"n": 1221,
|
|
451
|
-
"t": "The installed app carries the kit, and ~/PMOS holds one product",
|
|
452
|
-
"s": "The installed app carries the kit, and ~/PMOS holds one product",
|
|
453
|
-
"k": "fix"
|
|
454
|
-
}
|
|
455
|
-
]
|
|
456
456
|
}
|
|
457
457
|
]
|
|
458
458
|
}
|
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-08T10:18:49Z"}
|
|
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-08T10:18:49Z"}
|
|
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-08T10:18:49Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.543.0",
|
|
4
|
+
"at": "2026-11-08T10:18:52.684Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1271,
|
|
9
|
+
"t": "✕ reasons become memory; each team role reads a notebook of its earlier work",
|
|
10
|
+
"s": "✕ reasons become memory; each team role reads a notebook of its earlier work",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.542.0",
|
|
4
17
|
"at": "2026-11-08T06:18:15.279Z",
|
|
@@ -118,7 +118,8 @@ An "off" switch accepts `off`, `0`, `false` or `no` unless the row says a differ
|
|
|
118
118
|
| `PMOS_AUTONAME_CMD` | The program that names sessions, in place of `claude`. | `claude` | — |
|
|
119
119
|
| `PMOS_AGENT_HOOKS` | `1` gives a plain Claude session the workspace hooks. | off | — |
|
|
120
120
|
| `PMOS_LEAN_JOBS` | How background runs start. `off` starts every run with all tools, skills and settings. `all` also starts the runs that read your connectors lean. By default a run that reads no connector starts lean, with only its own tools. | lean for runs with no connector | — |
|
|
121
|
-
| `PMOS_RUN_MEMORY` | `off` stops adding the repository's curated memory (what PMOS remembers about you and the product) to each background run. A web run never gets it. | on | — |
|
|
121
|
+
| `PMOS_RUN_MEMORY` | `off` stops adding the repository's curated memory (what PMOS remembers about you and the product) to each background run, and stops each team role's notebook (what became of its earlier work). A web run never gets it. | on | — |
|
|
122
|
+
| `PMOS_CORRECTION_MEMORY` | `off` stops your ✕ reasons from becoming memory. By default a reason of 12 characters or more is remembered as one unconfirmed entry for 30 days, at most 6 at once. | on | — |
|
|
122
123
|
| `PMOS_CLAUDE_HOME` | The one folder where PMOS looks for Claude transcripts. | the Claude config folders | — |
|
|
123
124
|
| `PMOS_HEADLESS_TIMEOUT_MS` | The longest time a background run may take. | 20 minutes | — |
|
|
124
125
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* corrections-memory.js — the PM's ✕ reasons become curated memory by themselves (harness + memory evaluation, item 3, PM wawan 2026-11-08).
|
|
3
|
+
*
|
|
4
|
+
* When the PM drops a ✦ proposal or an idle-lab result and gives a reason, that reason is a correction every later run should know.
|
|
5
|
+
* remember() writes it to the repository's D72 memory (scripts/pmos-memory.js, through lib/memory.js) as one short entry:
|
|
6
|
+
* target memory · confidence unconfirmed · by agent:corrections · source <kind>:<ref> · stale_after +30 days
|
|
7
|
+
* so lib/headless.js memoryNote puts it in every background run, marked "(unconfirmed)" until the PM confirms it.
|
|
8
|
+
*
|
|
9
|
+
* BOUNDS. A reason shorter than MIN_WHY characters says nothing to learn from and is skipped. At most KEEP entries by agent:corrections
|
|
10
|
+
* live at once: the oldest is removed first. A full memory is never forced: the write is skipped and the reason stays on the ✕ line.
|
|
11
|
+
* The same text twice is written once. PMOS_CORRECTION_MEMORY=off stops it.
|
|
12
|
+
*
|
|
13
|
+
* remember(root, { what, why, source, env, now }) → { ok, wrote?: bool, why?: string } never throws
|
|
14
|
+
*/
|
|
15
|
+
const DAY = 86400000;
|
|
16
|
+
const BY = 'agent:corrections';
|
|
17
|
+
const MIN_WHY = 12;
|
|
18
|
+
const KEEP = 6;
|
|
19
|
+
const STALE_DAYS = 30;
|
|
20
|
+
const MAX = 200;
|
|
21
|
+
const one = (s, n) => String(s == null ? '' : s).replace(/\s+/g, ' ').trim().slice(0, n);
|
|
22
|
+
const off = (env) => /^(off|0|false|no)$/i.test(String((env || process.env).PMOS_CORRECTION_MEMORY || '').trim());
|
|
23
|
+
|
|
24
|
+
function textOf(what, why) {
|
|
25
|
+
const head = `The PM dropped ${one(what, 60) || 'a proposal'}: `;
|
|
26
|
+
return one(head + '"' + one(why, MAX - head.length - 2) + '"', MAX);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function remember(root, { what = '', why = '', source = '', env = process.env, now = Date.now() } = {}) {
|
|
30
|
+
try {
|
|
31
|
+
const reason = one(why, 300);
|
|
32
|
+
if (!root || reason.length < MIN_WHY) return { ok: true, wrote: false, why: 'no reason to learn from' };
|
|
33
|
+
if (off(env)) return { ok: true, wrote: false, why: 'PMOS_CORRECTION_MEMORY=off' };
|
|
34
|
+
const c = require('./memory.js').core();
|
|
35
|
+
if (!c.ok) return { ok: true, wrote: false, why: c.error };
|
|
36
|
+
const M = c.core, text = textOf(what, reason);
|
|
37
|
+
const mine = () => M.load(root).state.entries.filter((e) => e.target === 'memory' && e.by === BY).sort((a, b) => String(a.at).localeCompare(String(b.at)));
|
|
38
|
+
let have = mine();
|
|
39
|
+
if (have.some((e) => e.text === text)) return { ok: true, wrote: false, why: 'already remembered' };
|
|
40
|
+
while (have.length >= KEEP) {
|
|
41
|
+
const r = M.write(root, { op: 'remove', target: 'memory', old: have[0].text, by: BY });
|
|
42
|
+
if (!r.ok) break;
|
|
43
|
+
have = mine();
|
|
44
|
+
}
|
|
45
|
+
const r = M.write(root, { op: 'add', target: 'memory', text, by: BY, confidence: 'unconfirmed', source: one(source, 120) || undefined,
|
|
46
|
+
stale_after: new Date(now + STALE_DAYS * DAY).toISOString() });
|
|
47
|
+
return r.ok ? { ok: true, wrote: true } : { ok: true, wrote: false, why: r.error };
|
|
48
|
+
} catch (e) { return { ok: false, wrote: false, why: String((e && e.message) || e).slice(0, 160) }; }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = { BY, MIN_WHY, KEEP, STALE_DAYS, textOf, remember };
|
|
@@ -146,6 +146,7 @@ const WRITES = {
|
|
|
146
146
|
const why = typeof body.why === 'string' ? body.why.replace(/\s+/g, ' ').trim().slice(0, 300) : '';
|
|
147
147
|
const batch = PR.newBatch();
|
|
148
148
|
LAB.append(dir, g.actor, { kind: 'drop', id: p.id, batch, ...(why ? { why } : {}) });
|
|
149
|
+
if (why) require('./corrections-memory.js').remember(w.root, { what: 'an idle-lab result', why, source: 'lab:' + p.id });
|
|
149
150
|
ctx.json(res, { ok: true, batch });
|
|
150
151
|
return true;
|
|
151
152
|
},
|
|
@@ -375,6 +375,8 @@ const WRITES = {
|
|
|
375
375
|
// the PM's reason, when given (the idle lab's ✕ asks for one; Claude learns from it)
|
|
376
376
|
const why = typeof body.why === 'string' ? body.why.replace(/\s+/g, ' ').trim().slice(0, 300) : '';
|
|
377
377
|
PR.append(dirOf(ctx, p.w), g.actor, { kind: 'drop', ini, sig, ...which, ...(facts.length ? { facts } : {}), ...(why ? { why } : {}) });
|
|
378
|
+
// the reason becomes curated memory by itself, so every later run knows it (lib/corrections-memory.js)
|
|
379
|
+
if (why) require('./corrections-memory.js').remember(p.w.root, { what: `a ${(of && (of.group || of.type)) || ''} proposal on ${ini}`.replace(/ +/g, ' '), why, source: 'proposal:' + (which.id || sig) });
|
|
378
380
|
ctx.json(res, { ok: true });
|
|
379
381
|
},
|
|
380
382
|
'/api/proposals/undo': (ctx, res, body, g, p) => {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* lastWriter(F, rel) → the last write line of one artifact, or null
|
|
7
7
|
* dispatch(dir, { kind, target, ws?, board?, facts?, roles?, now }) → { ok, id, roles } | { ok: false, error }
|
|
8
8
|
* status(F, { now }) → { roles: [{ key, name, working: [..], queued: n, today: n, budget }], dispatches: [...], inbox: [...] }
|
|
9
|
-
* promptOf(role, step, o) → the prompt of one role run
|
|
9
|
+
* promptOf(role, step, o) → the prompt of one role run (o.notebook: notebookOf's result, what became of the role's earlier writes)
|
|
10
|
+
* notebookOf(F, role, autonomyLines, { n }) → { lines, kept, total }
|
|
10
11
|
* create(deps) → { tick({ now }), active() }
|
|
11
12
|
*
|
|
12
13
|
* THE LINES (append-only):
|
|
@@ -130,6 +131,28 @@ function status(F, { now = Date.now() } = {}) {
|
|
|
130
131
|
return { roles, dispatches, inbox: [...F.inbox.values()].reverse().slice(0, 20) };
|
|
131
132
|
}
|
|
132
133
|
|
|
134
|
+
/** A role's notebook (harness + memory evaluation, item 5): what became of its earlier writes, read from the team ledger (the Evaluator's
|
|
135
|
+
* verdicts) and the autonomy ledger (the PM's Undo). The changes that were undone or failed come first, then the newest. Pure. */
|
|
136
|
+
function notebookOf(F, key, autoLines = [], { n = 5 } = {}) {
|
|
137
|
+
if (!key || key === 'eval') return { lines: [], kept: 0, total: 0 };
|
|
138
|
+
const applied = [];
|
|
139
|
+
try { for (const j of require('./autonomy.js').fold(autoLines).jobs.values()) if (j.job === 'ai:' + key) applied.push(...j.applied); } catch { /* no ledger: nothing undone */ }
|
|
140
|
+
const seen = new Set(), rows = [];
|
|
141
|
+
for (const w of F.writes.slice().reverse()) {
|
|
142
|
+
if (w.role !== key || seen.has(w.run + '|' + w.rel)) continue;
|
|
143
|
+
seen.add(w.run + '|' + w.rel);
|
|
144
|
+
const t = Date.parse(w.at) || 0;
|
|
145
|
+
const a = applied.filter((x) => x.ref === w.rel && (Date.parse(x.at) || 0) >= t - 60000).sort((x, y) => Date.parse(x.at) - Date.parse(y.at))[0];
|
|
146
|
+
const v = F.verdicts.filter((x) => x.rel === w.rel && x.of && x.of.run === w.run).pop();
|
|
147
|
+
const undone = !!(a && a.undone), failed = !!(v && v.verdict === 'fail');
|
|
148
|
+
const said = [undone ? 'the PM undid it' : 'kept', v ? `the Evaluator ${failed ? 'failed' : 'passed'} it${v.why ? ': ' + one(v.why, 160) : ''}` : ''].filter(Boolean).join('; ');
|
|
149
|
+
rows.push({ bad: undone || failed, undone, line: `${w.rel}${w.ini ? ' (' + w.ini + ')' : ''}: ${said}` });
|
|
150
|
+
}
|
|
151
|
+
const total = rows.length, kept = rows.filter((r) => !r.undone).length;
|
|
152
|
+
const lines = rows.filter((r) => r.bad).concat(rows.filter((r) => !r.bad)).slice(0, n).map((r) => r.line);
|
|
153
|
+
return { lines, kept, total };
|
|
154
|
+
}
|
|
155
|
+
|
|
133
156
|
function promptOf(r, step, o = {}) {
|
|
134
157
|
const ro = T.roleOf(r);
|
|
135
158
|
const list = (a, none) => (a && a.length ? a.map((x) => '- ' + x).join('\n') : '- ' + none);
|
|
@@ -141,7 +164,10 @@ function promptOf(r, step, o = {}) {
|
|
|
141
164
|
const evalPart = ro.key === 'eval'
|
|
142
165
|
? `\nYou are the Evaluator, in a session of your own. Check each artifact below against its rubric or the PRD's done criteria. Read only the artifacts; you do not have, and must not ask for, the transcript of the run that wrote them. For each one: \`pmos team verdict <path> pass|fail "<why, one line>"\`. PMOS refuses a verdict on work the Evaluator itself wrote.\n`
|
|
143
166
|
: '';
|
|
144
|
-
|
|
167
|
+
const nb = o.notebook && o.notebook.lines && o.notebook.lines.length
|
|
168
|
+
? `\nYour notebook: what became of your earlier work. Learn from it, and do not repeat what was undone or failed:\n${list(o.notebook.lines)}\nThe PM kept ${o.notebook.kept} of your last ${o.notebook.total} changes.\n`
|
|
169
|
+
: '';
|
|
170
|
+
return `${skill}You are the ${ro.name} on the PMOS team, under the chief of staff. You own ${ro.what}.\n\nThis run:\n- Run: ${step.id}\n- For: ${target}\n- Why: ${step.trigger === 'dispatch' ? 'the chief of staff dispatched it' : step.trigger + (step.detail ? ' (' + one(step.detail, 160) + ')' : '')}\n- Today: ${T.localDay(o.now || Date.now())}\n\nWhat the roles before you handed over (read these artifacts; they are the handoff):\n${list(o.handoff, 'nothing yet')}\n${evalPart}${nb}\n${mode}\n\nEnd with \`pmos team done "<what you did, in one line>"\`.\n`;
|
|
145
171
|
}
|
|
146
172
|
|
|
147
173
|
/** deps: { workspaces() → [w], stateDirFor(w), inis(w) → [{ ini, board, stage, has }], promptFor(skillId), spawn(spec) → session,
|
|
@@ -167,7 +193,9 @@ function create(deps) {
|
|
|
167
193
|
const mode = auto(dir, ro);
|
|
168
194
|
const dsp = step.dispatch ? F.dispatches.get(step.dispatch) : null;
|
|
169
195
|
const skill = ro.skills.map((s) => { try { return deps.promptFor ? deps.promptFor(s) : null; } catch { return null; } }).find(Boolean) || '';
|
|
170
|
-
|
|
196
|
+
let notebook = null;
|
|
197
|
+
if (!/^(off|0|false|no)$/i.test(String(process.env.PMOS_RUN_MEMORY || '').trim())) { try { notebook = notebookOf(F, ro.key, require('./autonomy.js').read(dir)); } catch (e) { warn('team notebook', e); } }
|
|
198
|
+
const prompt = promptOf(ro.key, step, { mode, handoff: handoffOf(F, step), goal: dsp && dsp.of === 'goal' ? dsp.target : '', skill, notebook, now });
|
|
171
199
|
const { tools, writePaths } = T.toolsOf(ro, { root: w.root, mode });
|
|
172
200
|
const env = { PMOS_TEAM_FILE: file(dir), PMOS_TEAM_ROOT: w.root || '', PMOS_TEAM_WS: w.id || '', PMOS_TEAM_ROLE: ro.key, PMOS_TEAM_RUN: step.id,
|
|
173
201
|
PMOS_TEAM_INI: step.ini || '', PMOS_TEAM_MODE: mode };
|
|
@@ -241,4 +269,4 @@ function create(deps) {
|
|
|
241
269
|
return { tick, ended, active: () => [...active.keys()], stop(run) { const a = active.get(run); if (a && a.session && deps.stop) deps.stop(a.session); } };
|
|
242
270
|
}
|
|
243
271
|
|
|
244
|
-
module.exports = { factsOf, LEDGER, append, read, fold, lastWriter, unchecked, dispatch, status, promptOf, create };
|
|
272
|
+
module.exports = { factsOf, LEDGER, append, read, fold, lastWriter, unchecked, dispatch, status, promptOf, notebookOf, create };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.543.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.543.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED