create-pmos 0.284.0 → 0.285.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 +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/briefing-premium-test.js +13 -2
- package/workspace/guide/briefing-premium.md +1 -1
- package/workspace/lib/briefing-premium.js +3 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/premium.js +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.285.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": {
|
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-19T02:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T02:58:44Z"}
|
|
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-19T02:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T02:58:44Z"}
|
|
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-19T02:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-19T02:58:44Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -229,7 +229,18 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
229
229
|
await p.click('#dPane');
|
|
230
230
|
ok('R4 pressing it again shows the conversation', await p.evaluate(() => document.querySelector('#dlg').dataset.mode === 'split' && getComputedStyle(document.querySelector('#dBody')).display !== 'none'));
|
|
231
231
|
ok('D12 the reply box asks a read-only agent, and says what the agent can and cannot do', !d.input && await p.evaluate(() => !document.querySelector('#askIn').disabled && /cannot change anything/.test(document.querySelector('#askNote').textContent)));
|
|
232
|
-
|
|
232
|
+
let startBody = null;
|
|
233
|
+
await p.route('**/api/agent/start', (r) => { startBody = JSON.parse(r.request().postData()); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, session: { id: 'sx', name: 'draft' } }) }); });
|
|
234
|
+
ok('W8 the start button of a blocked row is live and says what starting does', await p.evaluate(() => { const b = document.querySelector('#startBtn'); const h = document.querySelector('#holdWhy'); return !!b && !b.disabled && /^Start:/.test(b.textContent.trim()) && !!h && /sends nothing outside PMOS/.test(h.textContent); }));
|
|
235
|
+
await p.click('#startBtn');
|
|
236
|
+
ok('W8 pressing Start asks to confirm and starts nothing yet', await p.evaluate(() => !!document.querySelector('#startGo') && /Start this agent session/.test(document.querySelector('#card').textContent)) && startBody === null);
|
|
237
|
+
await p.click('[data-start="no"]');
|
|
238
|
+
ok('W8 Not now goes back to the Start button', await p.evaluate(() => !!document.querySelector('#startBtn') && !document.querySelector('#startGo')) && startBody === null);
|
|
239
|
+
await p.click('#startBtn'); await p.click('#startGo');
|
|
240
|
+
ok('W8 confirming starts a draft session for that initiative, closes the dialog and raises the sessions badge', await until(() => startBody && p.evaluate(() => !document.querySelector('#dlg').classList.contains('on') && !document.querySelector('#sessBdg').hidden)) && startBody.task === 'draft' && !!startBody.initiative && !!startBody.what, JSON.stringify(startBody));
|
|
241
|
+
await p.unroute('**/api/agent/start');
|
|
242
|
+
await row0.focus(); await row0.press('Enter');
|
|
243
|
+
await until(() => p.evaluate(() => document.querySelector('#dlg').classList.contains('on')));
|
|
233
244
|
await p.keyboard.press('Escape');
|
|
234
245
|
await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
|
|
235
246
|
// a decision row: no option is chosen for the PM, choosing one drafts the record, and "Not yet" is off
|
|
@@ -267,7 +278,7 @@ const MOCKUP = path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'br
|
|
|
267
278
|
await until(() => p.evaluate(() => !document.querySelector('#dlg').classList.contains('on')));
|
|
268
279
|
|
|
269
280
|
/* R10 */
|
|
270
|
-
ok('R10 a page where nothing was pressed to record sent only GET requests', A.reqs.every((r) => r.startsWith('GET ')), A.reqs.filter((r) => !r.startsWith('GET ')).join());
|
|
281
|
+
ok('R10 a page where nothing was pressed to record sent only GET requests (the one confirmed Start aside)', A.reqs.every((r) => r.startsWith('GET ') || r === 'POST /api/agent/start'), A.reqs.filter((r) => !r.startsWith('GET ')).join());
|
|
271
282
|
ok('0 no page error', A.errors.length === 0, A.errors.join(' | '));
|
|
272
283
|
|
|
273
284
|
/* slice 2: the buttons that record (initiative briefing-premium-writes). The POST routes are answered by the test, so no real file is written;
|
|
@@ -158,7 +158,7 @@ Each button writes one record, through a check that only a real press from this
|
|
|
158
158
|
|
|
159
159
|
Later today means three hours from now. Tomorrow and Next week mean 09:00, tomorrow and next Monday.
|
|
160
160
|
|
|
161
|
-
A decision needs your reason. A prototype or tripwire that already has a decision on record cannot be decided again from this page. A decided row leaves the list because the record changed. A merge has no run of its own, so its return button stays off and says so. The Start button on a blocked row
|
|
161
|
+
A decision needs your reason. A prototype or tripwire that already has a decision on record cannot be decided again from this page. A decided row leaves the list because the record changed. A merge has no run of its own, so its return button stays off and says so. The Start button on a blocked row asks you to confirm, then starts an agent session that drafts the next step. The session is listed in Agent sessions.
|
|
162
162
|
|
|
163
163
|
## Asking the agent
|
|
164
164
|
|
|
@@ -73,7 +73,7 @@ const fmRows = (fm) => (fm ? [['Lane', fm.lane], ['Anchor', fm.parent_kr], ['Sta
|
|
|
73
73
|
|
|
74
74
|
/* A record the builder cannot read must cost its own row or dialog and nothing more. tryD gives a dialog or null; a record that throws is skipped and counted,
|
|
75
75
|
* and the header says how many (never silently). */
|
|
76
|
-
const
|
|
76
|
+
const START_NOTE = 'Starting opens an agent session that drafts this for you to read. It sends nothing outside PMOS and you can stop it in Agent sessions.';
|
|
77
77
|
const tryD = (fn) => { try { return fn(); } catch { return null; } };
|
|
78
78
|
const skipped = { n: 0 };
|
|
79
79
|
|
|
@@ -100,11 +100,12 @@ function blockedRows(f) {
|
|
|
100
100
|
eye: 'Unblock', logTitle: 'Read from the repository',
|
|
101
101
|
log: ['Read the initiative record' + (i.record ? ' (' + i.record + ')' : ''), 'Ran the workflow order rules on it', 'Found the step that blocks it: ' + st.key],
|
|
102
102
|
say: i.id + ' is blocked at the ' + st.key + ' step.' + (st.rule ? ' The rule it does not meet: ' + clip(st.rule, 200) : ''),
|
|
103
|
-
hold:
|
|
103
|
+
hold: START_NOTE, head: 'The way through',
|
|
104
104
|
facts: [['Blocked at', st.key], ['Initiative', i.id], ['The check', st.rule && clip(st.rule, 200)], ['Record', i.record]].filter((x) => x[1]),
|
|
105
105
|
opts: st.next ? [{ k: 'next', t: clip(st.next[0].toUpperCase() + st.next.slice(1), 140), d: 'The next step on record.' }] : [],
|
|
106
106
|
sel: st.next ? 'next' : null,
|
|
107
107
|
nodef: st.next ? '' : 'No next step is on record.',
|
|
108
|
+
write: st.next ? { kind: 'start', initiative: i.id, what: clip(st.next, 200), ...(i.ws ? { ws: i.ws } : {}) } : undefined,
|
|
108
109
|
prim: { next: 'Start: ' + clip(st.next || '', 40) },
|
|
109
110
|
pane: { label: 'Initiative record', file: i.record || i.id, h: clip(i.title, 90), rows: fmRows(i.fm) },
|
|
110
111
|
})),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.285.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.285.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Slice 2 (initiative briefing-premium-writes): the buttons that record the PM's own calls post to /api/briefing-premium/{decide,put-off,return}.
|
|
4
4
|
* Slice 3: the reply box asks a read-only agent. A control with nothing honest to write stays disabled and says why. */
|
|
5
5
|
import { pmPost, pmGet } from './http.js';
|
|
6
|
+
import { startAgent } from './page-agent.js';
|
|
6
7
|
import { mountMeeting } from './premium-meeting.js';
|
|
7
8
|
import { mountFirst } from './premium-first.js';
|
|
8
9
|
import { lineItems, behindOf, refreshTargets, whenRead } from './freshness-words.js';
|
|
@@ -111,6 +112,7 @@ document.addEventListener('click', (e) => {
|
|
|
111
112
|
function drawDock() { $('#dN').textContent = M.dock.needs == null ? '·' : M.dock.needs; $('#dLab').textContent = M.dock.needs == null ? 'still reading' : M.dock.needs === 0 ? 'need you' : M.dock.label; }
|
|
112
113
|
|
|
113
114
|
const SEL = {}; // the option chosen on each row, for this session
|
|
115
|
+
const START = {}; // 'ask' while the PM is confirming a start, by row key
|
|
114
116
|
const RET = {}; // the reason chosen for returning a run, by row key
|
|
115
117
|
const WHY = {}; // what the PM typed in the reason box, by row key (kept across a redraw and across a refused press)
|
|
116
118
|
const RET_REASONS = ['wrong facts', 'wrong scope', 'not now', 'too long'];
|
|
@@ -138,6 +140,10 @@ function cardHtml(r) {
|
|
|
138
140
|
if (w && w.kind === 'return') {
|
|
139
141
|
return `${head}<p class="ct">Return this run: why</p><div class="seg2" id="retWhy">${RET_REASONS.map((x) => `<button data-ret="${esc(x)}" aria-pressed="${RET[r.key] === x}">${esc(x)}</button>`).join('')}</div>${err}<div class="cact"><button class="cta" id="recBtn" data-rec="return" disabled>${CHECK}<span>${esc(d.action)}</span></button></div></div>`;
|
|
140
142
|
}
|
|
143
|
+
if (w && w.kind === 'start') {
|
|
144
|
+
const ask = START[r.key] === 'ask';
|
|
145
|
+
return `${head}${opts}${err}${ask ? `<p class="nodef">Start this agent session? It drafts “${esc(w.what)}” for you to read and sends nothing outside PMOS.</p><div class="cact" id="cardAct"><button class="cta" id="startGo" data-start="go">${CHECK}<span>Start the session</span></button><button class="cta alt" data-start="no">Not now</button></div>` : `<div class="cact" id="cardAct"><button class="cta" id="startBtn" data-start="ask">${CHECK}<span>${esc(d.prim[d.sel])}</span></button></div>${d.hold ? holdNote(d.hold) : ''}`}</div>`;
|
|
146
|
+
}
|
|
141
147
|
if (d.opts.length) return `${head}${opts}${d.nodef ? `<p class="nodef">${esc(d.nodef)}</p>` : ''}<div class="cact" id="cardAct"><button class="cta" disabled title="${esc(d.hold || 'Nothing here can be recorded yet.')}">${o ? esc(d.prim[o.k]) : 'Your call: choose one'}</button></div>${d.hold ? holdNote(d.hold) : ''}</div>`;
|
|
142
148
|
if (d.link) return `${head}<div class="cact"><a class="cta" id="srcLink" href="${esc(d.link)}" target="_blank" rel="noopener noreferrer">${esc(d.linkLabel || 'Open the source')}</a></div></div>`;
|
|
143
149
|
return `${head}${d.nodef ? `<p class="nodef">${esc(d.nodef)}</p>` : ''}${d.action ? `<div class="cact"><button class="cta" disabled title="${esc(d.hold || 'Nothing here can be recorded.')}">${CHECK}${esc(d.action)}</button></div>${d.hold ? holdNote(d.hold) : ''}` : ''}</div>`;
|
|
@@ -185,6 +191,19 @@ $('#dBody').addEventListener('click', (e) => {
|
|
|
185
191
|
if (!openR) return;
|
|
186
192
|
const op = e.target.closest('[data-op]');
|
|
187
193
|
if (op) { WHY[openR.key] = ($('#why') || {}).value || ''; SEL[openR.key] = op.dataset.op; $('#card').outerHTML = cardHtml(openR); $('#oMain').innerHTML = paneHtml(openR); ctaState(openR); return; }
|
|
194
|
+
const st = e.target.closest('[data-start]');
|
|
195
|
+
if (st) {
|
|
196
|
+
const key = openR.key, w = openR.dialog.write;
|
|
197
|
+
if (st.dataset.start === 'ask') { START[key] = 'ask'; $('#card').outerHTML = cardHtml(openR); return; }
|
|
198
|
+
if (st.dataset.start === 'no') { delete START[key]; $('#card').outerHTML = cardHtml(openR); return; }
|
|
199
|
+
$$('#card button').forEach((b) => { b.disabled = true; });
|
|
200
|
+
startAgent({ ws: w.ws || new URLSearchParams(location.search).get('ws') || undefined, task: 'draft', initiative: w.initiative, what: w.what }).then((res) => {
|
|
201
|
+
if (!res.ok) { $$('#card button').forEach((b) => { b.disabled = false; }); showErr('Not started: ' + res.error); return; }
|
|
202
|
+
delete START[key]; toast('The agent started. It is listed in Agent sessions, and its draft waits for you to read.'); closeDlg();
|
|
203
|
+
const bd = $('#sessBdg'); if (bd) { bd.textContent = String((+bd.textContent || 0) + 1); bd.hidden = false; }
|
|
204
|
+
});
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
188
207
|
const rt = e.target.closest('[data-ret]');
|
|
189
208
|
if (rt) { WHY[openR.key] = ($('#why') || {}).value || ''; RET[openR.key] = rt.dataset.ret; $('#card').outerHTML = cardHtml(openR); ctaState(openR); return; }
|
|
190
209
|
const un = e.target.closest('[data-until]');
|