create-pmos 0.339.0 → 0.340.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 +13 -13
- 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 +12 -0
- package/workspace/guide/briefing-premium.md +1 -0
- package/workspace/lib/briefing-premium-agent.js +1 -1
- package/workspace/lib/goal-chat.js +53 -5
- package/workspace/lib/routes-briefing-premium.js +2 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/premium.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.340.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,18 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.340.0",
|
|
37
|
+
"at": "2026-10-20T03:15:05.728Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 935,
|
|
42
|
+
"t": "A Briefing row when a /goal ends or needs the PM",
|
|
43
|
+
"s": "Each such goal adds one row to the Briefing list, built in the existing row pattern."
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.339.0",
|
|
37
49
|
"at": "2026-10-20T03:01:53.405Z",
|
|
@@ -294,18 +306,6 @@
|
|
|
294
306
|
"s": "Any markdown file (a PRD, a new doc, a report cycle) opens as one page in a viewer tab beside the dialog: title, byline from the edit log, a properties table from the front matter, then panels, tables, task lists…"
|
|
295
307
|
}
|
|
296
308
|
]
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"v": "0.320.0",
|
|
300
|
-
"at": "2026-10-19T15:12:24.143Z",
|
|
301
|
-
"f": 2,
|
|
302
|
-
"prs": [
|
|
303
|
-
{
|
|
304
|
-
"n": 899,
|
|
305
|
-
"t": "Premium dialog viewer with tabs",
|
|
306
|
-
"s": "The right pane can open other items as tabs beside its own detail, with at most 4 extra tabs."
|
|
307
|
-
}
|
|
308
|
-
]
|
|
309
309
|
}
|
|
310
310
|
]
|
|
311
311
|
}
|
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-20T03:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-20T03:15:03Z"}
|
|
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-20T03:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-20T03:15:03Z"}
|
|
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-20T03:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-20T03:15:03Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.340.0",
|
|
4
|
+
"at": "2026-10-20T03:15:05.728Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 935,
|
|
9
|
+
"t": "A Briefing row when a /goal ends or needs the PM",
|
|
10
|
+
"s": "Each such goal adds one row to the Briefing list, built in the existing row pattern."
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"v": "0.339.0",
|
|
4
16
|
"at": "2026-10-20T03:01:53.405Z",
|
|
@@ -392,5 +392,6 @@ Type `/` in the box to see the commands: `/goal`, `/compact` and `/clear`. Use t
|
|
|
392
392
|
- **While it works**, a goal card under the conversation shows the round, each done point met or open, and the deadline. The points are Claude's own report, so the card says "unverified". Each time Claude would stop with a point still open, it is told to keep going.
|
|
393
393
|
- **It stops by itself** when Claude reports every point met (Done), when it needs you (Needs you: answer it in the box and it goes on), at the deadline, after the round limit (12 unless the goal says fewer), or after 3 rounds that met no new point. The card says which.
|
|
394
394
|
- **Stop the goal** presses Esc in the session and ends the goal.
|
|
395
|
+
- **In the Briefing**, a goal that is done, stopped or needs you is a row at the top of the list. Pressing it opens the goal's own conversation. The row goes when you write in that conversation, or after a week.
|
|
395
396
|
|
|
396
397
|
Start, Cancel and Stop need the page's launch nonce too. The goal and each round are kept in `goal-runs.jsonl` in the state folder.
|
|
@@ -181,7 +181,7 @@ function chat({ runtimeDir, key, text, model, sessions, wsId, now = new Date() }
|
|
|
181
181
|
const extra = goal ? { goal } : {};
|
|
182
182
|
if (alive) {
|
|
183
183
|
if (!sessions.type(live, msg)) return fail(409, 'The message did not reach the session. Open it in Agent sessions.');
|
|
184
|
-
if (!goal) Goal.resume({ runtimeDir, key, now }); // slice 3: the PM's answer to a goal that needs them sets it going again
|
|
184
|
+
if (!goal) Goal.resume({ runtimeDir, key, now }); // slice 3: the PM's answer to a goal that needs them sets it going again; a finished one is seen
|
|
185
185
|
return { status: 200, body: { ok: true, session: live, started: false, ...extra } };
|
|
186
186
|
}
|
|
187
187
|
let s;
|
|
@@ -74,6 +74,7 @@ function goalOf(runtimeDir, key) {
|
|
|
74
74
|
else if (e.event === 'started') g = { ...g, state: 'started', draft: e.draft, startedAt: e.at, rounds: 0, met: [], open: (e.draft && e.draft.done) || [], at: e.at };
|
|
75
75
|
else if (e.event === 'cancelled') g = { ...g, state: 'cancelled', at: e.at };
|
|
76
76
|
else if (e.event === 'round') g = { ...g, rounds: e.n, met: e.met || [], open: e.open || [], at: e.at };
|
|
77
|
+
else if (e.event === 'seen') g = { ...g, seen: true };
|
|
77
78
|
else if (e.event === 'resumed') g = { ...g, state: 'started', reason: undefined, at: e.at };
|
|
78
79
|
else if (['done', 'stopped', 'waiting'].includes(e.event)) g = { ...g, state: e.event, ...(e.reason ? { reason: e.reason } : {}), met: e.met || g.met, open: e.open || g.open, at: e.at };
|
|
79
80
|
}
|
|
@@ -126,12 +127,59 @@ function onStop({ runtimeDir, key, message, now = new Date() }) {
|
|
|
126
127
|
append(runtimeDir, { event: 'round', n, ...base });
|
|
127
128
|
return { decision: 'block', reason: '[PMOS /goal round ' + n + '] The goal is not done yet: ' + met.length + ' of ' + all.length + ' done points met. Keep working on: ' + (open.length ? open.join('; ') : 'the open points') + '. This is round ' + n + ' of ' + (d.limit || LIMIT) + '. If you need the PM, ask and end with a pmos-goal progress block whose state is needs-you. End each message with the progress block.' };
|
|
128
129
|
}
|
|
129
|
-
/** The PM
|
|
130
|
+
/** The PM wrote in the goal's conversation. A goal that waits on them is working again (U3); a finished or stopped goal is seen,
|
|
131
|
+
* so its Briefing row goes (U7). A goal in any other state is left as it is. */
|
|
130
132
|
function resume({ runtimeDir, key, now = new Date() }) {
|
|
131
133
|
const g = goalOf(runtimeDir, key);
|
|
132
|
-
if (!g
|
|
133
|
-
append(runtimeDir, { event: 'resumed', id: g.id, key, at: now.toISOString() });
|
|
134
|
-
|
|
134
|
+
if (!g) return false;
|
|
135
|
+
if (g.state === 'waiting') { append(runtimeDir, { event: 'resumed', id: g.id, key, at: now.toISOString() }); return true; }
|
|
136
|
+
if ((g.state === 'done' || g.state === 'stopped') && !g.seen) append(runtimeDir, { event: 'seen', id: g.id, key, at: now.toISOString() });
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* ── U7: the Briefing row of a goal that is done, stopped or needs the PM ────────────────────────────────────────────────
|
|
141
|
+
* One row per conversation (key goal:<conversation key>); chatKey names the conversation, so pressing the row opens it and its goal card.
|
|
142
|
+
* A row goes when the PM writes in the conversation, starts a new /goal there, or after ROW_DAYS. */
|
|
143
|
+
const ROW_DAYS = 7;
|
|
144
|
+
const ROW_TITLE = { done: 'Check the goal Claude finished', waiting: 'Claude needs you on a goal', stopped: 'A goal stopped before it was done' };
|
|
145
|
+
function briefingRows(runtimeDir, now = Date.now()) {
|
|
146
|
+
let t; try { t = fs.readFileSync(path.join(runtimeDir, RUNS), 'utf8'); } catch { return []; }
|
|
147
|
+
const keys = new Set();
|
|
148
|
+
for (const l of t.split('\n')) { if (!l.trim()) continue; try { const e = JSON.parse(l); if (e && typeof e.key === 'string') keys.add(e.key); } catch { /* skip */ } }
|
|
149
|
+
const out = [];
|
|
150
|
+
for (const key of keys) {
|
|
151
|
+
const g = goalOf(runtimeDir, key);
|
|
152
|
+
if (!g || !g.draft || !ROW_TITLE[g.state] || g.seen) continue;
|
|
153
|
+
const at = Date.parse(g.at || '');
|
|
154
|
+
if (Number.isFinite(at) && now - at > ROW_DAYS * 86400000) continue;
|
|
155
|
+
const all = g.draft.done || [], met = (g.met || []).length;
|
|
156
|
+
const why = g.state === 'stopped' ? (REASON[g.reason] || 'It stopped.') : g.state === 'waiting' ? 'Claude asked you something in the conversation.' : 'Claude reports every done point met. It checked its own work.';
|
|
157
|
+
out.push({
|
|
158
|
+
kind: 'goal', key: 'goal:' + key, chatKey: key, title: ROW_TITLE[g.state], subject: clip(g.draft.goal, 90),
|
|
159
|
+
prepared: met + ' of ' + all.length + ' done points met, as Claude reports it. ' + why,
|
|
160
|
+
skip: g.state === 'waiting' ? 'If you skip: the goal waits and nothing more is done on it.' : 'If you skip: nobody checks the work before it is relied on.',
|
|
161
|
+
at,
|
|
162
|
+
dialog: {
|
|
163
|
+
eye: 'Goal', logTitle: 'Read from the goal record', log: ['Read goal-runs.jsonl in the state folder', 'Kept the latest state of this goal', 'Changed nothing'],
|
|
164
|
+
say: clip(g.draft.goal, 200) + ': ' + why, head: 'The goal',
|
|
165
|
+
facts: [['State', ROW_TITLE[g.state]], ['Done points', met + ' of ' + all.length + ' met, unverified'], ['By', g.draft.by], ['Rounds', String(g.rounds || 0)]].filter((x) => x[1]),
|
|
166
|
+
opts: [], sel: null, nodef: 'The goal card is in the conversation beside this. Write there to answer Claude or to go on.',
|
|
167
|
+
pane: { label: 'Goal', file: 'goal-runs.jsonl', h: clip(g.draft.goal, 90), intro: why, rows: all.map((x) => [(g.met || []).includes(x) ? 'Met' : 'Open', x]), paras: [] },
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// the newest first, those that wait on the PM before the rest
|
|
172
|
+
return out.sort((a, b) => ((a.title === ROW_TITLE.waiting ? 0 : 1) - (b.title === ROW_TITLE.waiting ? 0 : 1)) || (b.at - a.at)).map(({ at, ...r }) => r);
|
|
173
|
+
}
|
|
174
|
+
/** The Briefing model with the goal rows first (U7). The rows already on the list follow; the count and the dock count them too. */
|
|
175
|
+
function withGoalRows(model, rows) {
|
|
176
|
+
if (!model || !model.list || !rows.length) return model;
|
|
177
|
+
const have = new Set((model.list.rows || []).map((r) => r.key));
|
|
178
|
+
const add = rows.filter((r) => !have.has(r.key));
|
|
179
|
+
if (!add.length) return model;
|
|
180
|
+
const list = add.concat(model.list.rows || []).map((r, k) => Object.assign({}, r, { n: k + 1, first: k === 0 }));
|
|
181
|
+
const count = (model.list.count || 0) + add.length;
|
|
182
|
+
return { ...model, list: { ...model.list, rows: list, count }, dock: model.dock && model.dock.needs != null ? { ...model.dock, needs: count, label: count === 1 ? 'needs you' : 'need you', next: list[0].title } : model.dock };
|
|
135
183
|
}
|
|
136
184
|
/** The Claude Code --settings for a chat session: one Stop hook that posts to this workspace with the session's token. */
|
|
137
185
|
function hookSettings(port, host = '127.0.0.1') {
|
|
@@ -170,4 +218,4 @@ function decide({ runtimeDir, key, id, act, draft, session, sessions, now = new
|
|
|
170
218
|
return { status: 200, body: { ok: true, id, state: act === 'start' ? 'started' : 'cancelled' } };
|
|
171
219
|
}
|
|
172
220
|
|
|
173
|
-
module.exports = { parseCommand, grillPrompt, startMessage, cancelMessage, cleanDraft, goalOf, begin, decide, onStop, resume, blockOf, keyOfSession, hookSettings, MARK, RUNS, LIMIT, NO_PROGRESS, REASON };
|
|
221
|
+
module.exports = { parseCommand, grillPrompt, startMessage, cancelMessage, cleanDraft, goalOf, begin, decide, onStop, resume, briefingRows, withGoalRows, blockOf, keyOfSession, hookSettings, MARK, RUNS, LIMIT, NO_PROGRESS, REASON };
|
|
@@ -140,6 +140,7 @@ module.exports = {
|
|
|
140
140
|
const sources = await Src.readSources(ctx, Date.now()).catch(() => null);
|
|
141
141
|
const agent = Drafts.readDrafts(sel.available);
|
|
142
142
|
const r = await Prod.modelOfMany({ available: sel.available, engine: enginePath(), runtimeDir: ctx.runtimeDir, sources, agent });
|
|
143
|
+
if (r.model && ctx.runtimeDir) r.model = Goal.withGoalRows(r.model, Goal.briefingRows(ctx.runtimeDir)); // premium-chat-session U7: goals read live, not cached
|
|
143
144
|
ctx.json(res, r.state === 'error' ? { ok: false, ...r } : { ok: true, ...r }, r.state === 'ready' ? 200 : r.state === 'reading' ? 202 : 500);
|
|
144
145
|
return true;
|
|
145
146
|
}
|
|
@@ -147,6 +148,7 @@ module.exports = {
|
|
|
147
148
|
try { const w = ctx.getWs && ctx.getWs(url.searchParams.get('ws') || null); root = w && w.root; } catch { root = null; }
|
|
148
149
|
root = root || path.resolve(__dirname, '..', '..');
|
|
149
150
|
const r = await BP.modelOf({ root, engine: enginePath(), runtimeDir: ctx.runtimeDir });
|
|
151
|
+
if (r.model && ctx.runtimeDir) r.model = Goal.withGoalRows(r.model, Goal.briefingRows(ctx.runtimeDir));
|
|
150
152
|
// 200 with the model, 202 while the first read goes on, 500 with the reason when a read failed
|
|
151
153
|
ctx.json(res, r.state === 'error' ? { ok: false, ...r } : { ok: true, ...r }, r.state === 'ready' ? 200 : r.state === 'reading' ? 202 : 500);
|
|
152
154
|
return true;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.340.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.340.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -228,9 +228,9 @@ function openRow(r) {
|
|
|
228
228
|
if (!r) return;
|
|
229
229
|
if (!r.dialog) r = { ...r, dialog: r.src ? consoleDialog(r) : plainDialog(r) };
|
|
230
230
|
openR = r; const d = r.dialog;
|
|
231
|
-
openDlg({ eye: d.eye + ' · real data', title: d.title || r.title, sub: d.sub || r.subject, say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: r.key, pane: paneHtml(r), label: d.pane.label });
|
|
231
|
+
openDlg({ eye: d.eye + ' · real data', title: d.title || r.title, sub: d.sub || r.subject, say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: r.chatKey || r.key, pane: paneHtml(r), label: d.pane.label }); // a goal row (premium-chat-session U7) opens its own conversation
|
|
232
232
|
ctaState(r);
|
|
233
|
-
if (r.dialog.noAsk) { $('#askF').hidden = true; $('#askNote').hidden = true; } else loadThread(r.key); // the read-only agent answers about the model's rows only
|
|
233
|
+
if (r.dialog.noAsk) { $('#askF').hidden = true; $('#askNote').hidden = true; } else loadThread(r.chatKey || r.key); // the read-only agent answers about the model's rows only
|
|
234
234
|
setTimeout(() => { const b = $('#dBody'); b.scrollTop = b.scrollHeight; }, 120);
|
|
235
235
|
}
|
|
236
236
|
function showErr(msg) { const e = $('#cardErr'); if (!e) { toast(msg); return; } e.textContent = msg; e.hidden = false; }
|