create-pmos 0.385.0 → 0.386.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 -18
- 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-metrics-test.js +2 -1
- package/workspace/changelog.json +12 -0
- package/workspace/guide/briefing-premium.md +2 -0
- package/workspace/lib/board-metrics-premium.js +22 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/premium-insights.js +10 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.386.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.386.0",
|
|
37
|
+
"at": "2026-10-21T14:59:05.016Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 997,
|
|
42
|
+
"t": "Board measure popup reads its numbers and the trunk fetch time",
|
|
43
|
+
"s": "Board measure popup reads its numbers and the trunk fetch time"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.385.0",
|
|
37
49
|
"at": "2026-10-21T14:04:22.922Z",
|
|
@@ -289,23 +301,6 @@
|
|
|
289
301
|
"s": "A Claude Code prompt is typed only once the agent is ready."
|
|
290
302
|
}
|
|
291
303
|
]
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"v": "0.366.0",
|
|
295
|
-
"at": "2026-10-21T01:38:19.286Z",
|
|
296
|
-
"f": 2,
|
|
297
|
-
"prs": [
|
|
298
|
-
{
|
|
299
|
-
"n": 971,
|
|
300
|
-
"t": "Every premium dialog has the short head on a phone",
|
|
301
|
-
"s": "Every premium dialog has the short head on a phone"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"n": 973,
|
|
305
|
-
"t": "Refresh all reads the sources first, then writes the Briefing (briefing-source-flow, slice 3)",
|
|
306
|
-
"s": "Refresh all is one ordered run on the server, following Wawan's rule (2026-10-21): derived content is rebuilt only after its sources are fresh."
|
|
307
|
-
}
|
|
308
|
-
]
|
|
309
304
|
}
|
|
310
305
|
]
|
|
311
306
|
}
|
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-21T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T14:59:02Z"}
|
|
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-21T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T14:59:02Z"}
|
|
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-21T14:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-21T14:59:02Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -172,7 +172,7 @@ const ready = (model) => ({ status: 200, body: { ok: true, state: 'ready', model
|
|
|
172
172
|
let tg = {};
|
|
173
173
|
q.on('pageerror', (e) => errs.push(String((e && e.message) || e)));
|
|
174
174
|
await q.route('**/api/insights-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: IP.build(IF.facts()), as_of: 1 }) }));
|
|
175
|
-
await q.route('**/api/board-metrics-premium*', (r) => { asked.push(new URL(r.request().url()).searchParams.get('weeks')); return r.fulfill({ contentType: 'application/json', body: JSON.stringify(ready(metrics({ targets: tg })).body) }); });
|
|
175
|
+
await q.route('**/api/board-metrics-premium*', (r) => { asked.push(new URL(r.request().url()).searchParams.get('weeks')); return r.fulfill({ contentType: 'application/json', body: JSON.stringify(ready(metrics({ targets: tg, trunk: { ref: 'origin/main', fetched_at: '2026-10-14T07:00:00Z' } })).body) }); });
|
|
176
176
|
await q.route('**/api/board-metric-targets/save', (r) => { const b = JSON.parse(r.request().postData() || '{}'); saves.push(b); tg = b.target == null ? {} : { [b.key]: { target: Number(b.target) } }; return r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, targets: tg }) }); });
|
|
177
177
|
await q.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: '{"ok":true,"turns":[],"working":false}' }));
|
|
178
178
|
await q.goto(BASE + '/premium-insights.html');
|
|
@@ -182,6 +182,7 @@ const ready = (model) => ({ status: 200, body: { ok: true, state: 'ready', model
|
|
|
182
182
|
await q.locator('#bmRange [data-w="26"]').click();
|
|
183
183
|
ok('C10 a longer range asks for 26 weeks', await until(() => asked.includes('26')) && await until(() => q.evaluate(() => document.querySelector('#bmRange [data-w="26"]').getAttribute('aria-pressed') === 'true')), JSON.stringify(asked));
|
|
184
184
|
await q.locator('#bmBody .mt1').nth(1).click(); await until(() => q.evaluate(() => document.querySelector('#dlg').classList.contains('on'))); await sleep(300);
|
|
185
|
+
ok('C10 the measure popup reads its numbers first and says when the trunk was fetched', await q.evaluate(() => { const say = document.querySelector('#dBody .stream').textContent, g = [...document.querySelectorAll('#oMain .kv2 span')].map((x) => x.textContent).join('|'); return /Merged a week is 3, to the trunk, week to \d+ \w+\. Up 1 vs last week\. origin\/main was last fetched 14 Oct \d\d:00\./.test(say) && /No target is set/.test(say) && /Trunk read\|origin\/main, fetched 14 Oct \d\d:00/.test(g); }));
|
|
185
186
|
await q.fill('#bmT', '5'); await q.click('#bmGo');
|
|
186
187
|
ok('C10 Save target sends the measure and the number for this board', await until(() => saves.length === 1) && saves[0].ws === 'w1' && saves[0].key === 'merges' && saves[0].target === '5', JSON.stringify(saves));
|
|
187
188
|
ok('C10 the card redraws with the target: its gap chip, dashed line and outline', await until(() => q.evaluate(() => { const t = document.querySelectorAll('#bmBody .mt1')[1]; return t && (t.querySelector('.mchip') || {}).textContent === '2 short' && !!t.querySelector('svg .tg') && t.classList.contains('off'); })));
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.386.0",
|
|
4
|
+
"at": "2026-10-21T14:59:05.016Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 997,
|
|
9
|
+
"t": "Board measure popup reads its numbers and the trunk fetch time",
|
|
10
|
+
"s": "Board measure popup reads its numbers and the trunk fetch time"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"v": "0.385.0",
|
|
4
16
|
"at": "2026-10-21T14:04:22.922Z",
|
|
@@ -283,6 +283,8 @@ My work is the second place on the rail, at `/premium-work.html`. It reads the l
|
|
|
283
283
|
|
|
284
284
|
**A Jira ticket PMOS has not read.** A task's Jira tab first looks in the initiative's ticket draft and the sprint reads. When neither holds the ticket, it shows the newest Jira check that read it, or else what the stored Jira read says about it, and names which one. When nothing stored holds it, the tab says **Not read yet**, gives the time of the last Jira read, and offers **Read it now**. Read it now asks the popup's own Claude session to read that one ticket with your Atlassian connection, read only, and to save the popup's lead. Nothing reads Jira when the tab opens.
|
|
285
285
|
|
|
286
|
+
**A Board measure popup.** On Insights, a measure's popup first says what the numbers are: this week's value, the change from last week, and the target. For Merged a week it also says when the trunk was last fetched, and the details list it as **Trunk read**. When the last two weeks are 0 after a busy week, it says that is a quiet trunk or an old fetch, and gives the fetch time, so you can tell which. PMOS does not fetch when the popup opens.
|
|
287
|
+
|
|
286
288
|
**The agent's draft.** The draft shows as formatted text in the detail panel on the right, labelled as the agent's and not checked, with **Open** and **Copy**. Its heading names the item ("Draft for IDPF-2989", or "Draft for you"), the round and the time of the latest round, and an approved step shows as "Step when you approve". A long draft is cut short, with **Show all**. It appears there as soon as the agent finishes, even while the dialog is open. The left column keeps the conversation (with **View round**) and the decision cards, in the console's words: **Post it to Jira** (marked outward, with exactly the text that goes), **Edit the draft**, **Keep it as a draft** and **Mark it done**. Post asks you to confirm the exact text first, and nothing is posted before that.
|
|
287
289
|
|
|
288
290
|
**An agent's offer.** When an agent has offered to draft an item, the dialog shows three choices: let the agent draft it (suggested), do it today, or not before next Monday. You pick one and press its button. A row with steps says how many it has and how many an agent can do. PMOS does not record that a step is done, so it shows no "done" count.
|
|
@@ -22,6 +22,7 @@ const Rec = require('./board-metric-records.js');
|
|
|
22
22
|
const WEEKS = 8, RANGES = [8, 26, 52], MIN_RUNS = 10, DAY = 86400000, IDLE_DAYS = 30;
|
|
23
23
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
24
24
|
const day = (t) => { const d = new Date(t); return d.getUTCDate() + ' ' + MON[d.getUTCMonth()]; };
|
|
25
|
+
const stamp = (iso) => { const d = new Date(iso); return Number.isNaN(d.getTime()) ? 'at an unknown time' : day(d) + ' ' + String(d.getUTCHours()).padStart(2, '0') + ':' + String(d.getUTCMinutes()).padStart(2, '0') + ' UTC'; };
|
|
25
26
|
const plural = (n, one, many) => (n === 1 ? one : many);
|
|
26
27
|
const startOfWeek = (t) => { const d = new Date(t); const dow = (d.getUTCDay() + 6) % 7; return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate() - dow); };
|
|
27
28
|
|
|
@@ -71,7 +72,11 @@ function build(f) {
|
|
|
71
72
|
if (f.commits == null) tiles.push({ key: 'merges', label: 'Merged a week', absent: 'Not read', why: 'The history of the trunk could not be read in ' + repo + '.', def: DEFS.merges });
|
|
72
73
|
else {
|
|
73
74
|
const ser = W.map((w) => f.commits.filter((t) => t >= w.from && t < w.to).length), li = ser.length - 1;
|
|
74
|
-
|
|
75
|
+
// popup context slice 5: when the trunk was last fetched, and whether the last two weeks are 0 after a busy week (a quiet trunk or an old fetch)
|
|
76
|
+
const tr = f.trunk && f.trunk.ref ? { ref: f.trunk.ref, fetched_at: f.trunk.fetched_at || null } : null;
|
|
77
|
+
const peak = li >= 2 && ser[li] === 0 && ser[li - 1] === 0 ? Math.max(...ser.slice(0, li - 1)) : 0;
|
|
78
|
+
const quiet = peak > 0 ? { peak, week: W[ser.indexOf(peak)].label } : null;
|
|
79
|
+
tiles.push({ key: 'merges', trunk: tr, quiet, label: 'Merged a week', value: String(ser[li]), text: 'to the trunk, week to ' + W[li].label, kind: '', ser, wk: W.map((w) => w.label), nt: ser.map(() => ''), dec: 0, suf: '', change: li > 0 ? (() => { const d = ser[li] - ser[li - 1]; return { d, good: d > 0, txt: (d === 0 ? 'No change' : (d > 0 ? 'Up ' : 'Down ') + Math.abs(d)) + ' vs last week' }; })() : null, def: DEFS.merges, lowBetter: false });
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
// blocked, idle: today's count, and earlier weeks from the daily history that starts on the first day the card was read
|
|
@@ -105,7 +110,11 @@ function build(f) {
|
|
|
105
110
|
|
|
106
111
|
// one row per tile for the read-only agent (key board:metric-<tile>), in the shape the Board's own rows have
|
|
107
112
|
const rows = tiles.map((t) => {
|
|
108
|
-
const
|
|
113
|
+
const fetched = t.trunk ? (t.trunk.fetched_at ? t.trunk.ref + ' was last fetched ' + stamp(t.trunk.fetched_at) : t.trunk.ref + ' has no fetch on record') : '';
|
|
114
|
+
const say = t.absent ? t.label + ' is not shown: ' + t.why
|
|
115
|
+
: t.quiet ? t.label + ' was ' + t.quiet.peak + ' in the week to ' + t.quiet.week + ', then 0 for the last two weeks. That is a quiet trunk or an old fetch: ' + (fetched || 'the fetch time is not known') + '.' + (t.tg != null ? ' The target is ' + t.tg + '.' : '')
|
|
116
|
+
: t.label + ' is ' + t.value + ', ' + t.text + '.' + (t.change ? ' ' + t.change.txt + '.' : '') + (t.tg != null ? ' The target is ' + t.tg + ': ' + (t.ok ? 'on target' : t.chip) + '.' : '') + (fetched ? ' ' + fetched + '.' : '');
|
|
117
|
+
t.say = say;
|
|
109
118
|
const facts = [['Measure', t.label], ['Now', t.absent ? t.absent : t.value], ['Target', t.tg != null ? String(t.tg) : ''], ['Counted from', repo], ['Better when', t.lowBetter ? 'Lower' : t.lowBetter === false ? 'Higher' : '']]
|
|
110
119
|
.concat(t.ser ? t.ser.map((v, j) => [t.wk[j], v == null ? 'No runs' : String(v)]) : []).filter((x) => x[1] !== '');
|
|
111
120
|
t.rowKey = 'board:metric-' + t.key;
|
|
@@ -125,7 +134,7 @@ function build(f) {
|
|
|
125
134
|
weeks: N, counted,
|
|
126
135
|
hint: (lead ? lead + ' ' : '') + body + ' To set a target, or for longer ranges, open Insights.',
|
|
127
136
|
note: 'Counted from ' + repo + ': corrections from planning/runs/agent-runs.jsonl, merges from the history of its trunk, blocked and idle from its workflow state, in weeks to ' + W[W.length - 1].label + '. A week with fewer than ' + MIN_RUNS + ' runs is blank. Blocked and idle are kept once a day from the first day this card was read; earlier weeks are blank.',
|
|
128
|
-
tiles, rows,
|
|
137
|
+
tiles, rows, trunk: f.trunk && f.trunk.ref ? { ref: f.trunk.ref, fetched_at: f.trunk.fetched_at || null } : null,
|
|
129
138
|
};
|
|
130
139
|
}
|
|
131
140
|
|
|
@@ -140,6 +149,15 @@ async function readCommits(root, now, n = WEEKS) {
|
|
|
140
149
|
return out === null ? null : out.split('\n').filter(Boolean).map((x) => Number(x) * 1000);
|
|
141
150
|
}
|
|
142
151
|
|
|
152
|
+
/** The trunk the merges are counted from, and when it was last fetched (the FETCH_HEAD time), or null when git cannot say. */
|
|
153
|
+
async function readTrunk(root) {
|
|
154
|
+
const ref = (await git(['-C', root, 'rev-parse', '--verify', '-q', 'origin/main'])) ? 'origin/main' : 'HEAD';
|
|
155
|
+
const fh = await git(['-C', root, 'rev-parse', '--git-path', 'FETCH_HEAD']);
|
|
156
|
+
let at = null;
|
|
157
|
+
if (fh && ref === 'origin/main') { try { at = fs.statSync(path.resolve(root, fh.trim())).mtime.toISOString(); } catch { at = null; } }
|
|
158
|
+
return { ref, fetched_at: at };
|
|
159
|
+
}
|
|
160
|
+
|
|
143
161
|
function readRuns(root) {
|
|
144
162
|
const file = path.join(root, 'planning', 'runs', 'agent-runs.jsonl');
|
|
145
163
|
if (!fs.existsSync(file)) return 'missing';
|
|
@@ -159,7 +177,7 @@ async function read({ root, engine, now = Date.now(), weeks = WEEKS }) {
|
|
|
159
177
|
let targets = {}, history = [];
|
|
160
178
|
try { targets = Rec.targets(root); } catch { /* no target file reads as none */ }
|
|
161
179
|
try { history = Rec.history(root); } catch { /* no history reads as none */ }
|
|
162
|
-
const model = build({ now, repo, weeks: N, runs: readRuns(root), commits: await readCommits(root, now, N), inits: k.inits, initsPending: !!engine && !k.inits && k.inflight, targets, history });
|
|
180
|
+
const model = build({ now, repo, weeks: N, runs: readRuns(root), commits: await readCommits(root, now, N), trunk: await readTrunk(root), inits: k.inits, initsPending: !!engine && !k.inits && k.inflight, targets, history });
|
|
163
181
|
if (model.counted) { try { Rec.record(root, Object.assign({ now }, model.counted)); } catch { /* a read-only folder keeps no history */ } }
|
|
164
182
|
return model;
|
|
165
183
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.386.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.386.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -489,9 +489,16 @@ function bmOpen(i) {
|
|
|
489
489
|
const form = t.absent ? `<p class="note" style="margin:12px 0 0">A target can be set once this measure is counted.</p>`
|
|
490
490
|
: `<div class="addf" style="margin-top:14px"><label>Target (${t.lowBetter ? 'at most' : 'at least'})<input id="bmT" inputmode="decimal" maxlength="12" value="${t.tg != null ? esc(String(t.tg)) : ''}" placeholder="For example: ${t.key === 'corrections' ? '10' : t.key === 'merges' ? '5' : '0'}"></label>
|
|
491
491
|
<p class="note" id="bmM" role="status" style="margin:0;min-height:1.2em"></p><div class="cact"><button class="cta" id="bmGo">Save target</button>${t.tg != null ? '<button class="cta alt" id="bmClr">Clear target</button>' : ''}</div></div>`;
|
|
492
|
-
|
|
493
|
-
const
|
|
494
|
-
|
|
492
|
+
// popup context slice 5: the first line reads the numbers, and says when the trunk was fetched, so two empty weeks are not taken for a quiet trunk
|
|
493
|
+
const lt = (iso) => { const d = new Date(iso); return Number.isNaN(d.getTime()) ? '' : d.getDate() + ' ' + d.toLocaleString('en-GB', { month: 'short' }) + ' ' + String(d.getHours()).padStart(2, '0') + ':' + String(d.getMinutes()).padStart(2, '0'); };
|
|
494
|
+
const fetched = t.trunk ? (t.trunk.fetched_at ? `${t.trunk.ref} was last fetched ${lt(t.trunk.fetched_at)}` : `${t.trunk.ref} has no fetch on record`) : '';
|
|
495
|
+
const tgt = t.tg != null ? ` The target is ${t.tg}; change it or clear it here.` : ' No target is set; type one and save it.';
|
|
496
|
+
const say = t.absent ? `${t.label} is not shown: ${t.why}`
|
|
497
|
+
: t.quiet ? `${t.label} was ${t.quiet.peak} in the week to ${t.quiet.week}, then 0 for the last two weeks. That is a quiet trunk or an old fetch: ${fetched || 'the fetch time is not known'}.${tgt}`
|
|
498
|
+
: `${t.label} is ${t.value}, ${t.text}.${t.change ? ' ' + t.change.txt + '.' : ''}${fetched ? ' ' + fetched + '.' : ''}${tgt}`;
|
|
499
|
+
const facts = MT.factRows(t, BM.repo, BM.weeks).concat(t.trunk ? [['Trunk read', t.trunk.ref + (t.trunk.fetched_at ? ', fetched ' + lt(t.trunk.fetched_at) : ', no fetch on record')]] : []);
|
|
500
|
+
const pane = `<article class="paper doc"><p class="lede" style="margin:0 0 10px">${esc(t.def)}</p>${kv(facts)}${form}${vals}<p class="note" style="margin-top:12px">${esc(BM.note)}</p></article>`;
|
|
501
|
+
openDlg({ eye: 'Board measure · real data', title: t.label, sub: BM.repo, say, stream: turnA(ptx(say)), noteKey: popKey('measure', BM.repo, t.key || t.label), facts, pane, label: 'Measure' });
|
|
495
502
|
$('#oMain').onchange = null;
|
|
496
503
|
$('#oMain').onclick = async (e) => {
|
|
497
504
|
const go = e.target.closest('#bmGo'), clr = e.target.closest('#bmClr'); if (!go && !clr) return;
|