create-pmos 0.440.0 → 0.441.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/briefing-premium-adddoc-test.js +16 -13
- package/workspace/briefing-premium-products-test.js +4 -4
- package/workspace/briefing-premium-sources-test.js +2 -2
- package/workspace/briefing-premium-test.js +29 -23
- package/workspace/changelog.json +12 -0
- package/workspace/guide/core-documents.md +2 -2
- package/workspace/guide/data-freshness.md +7 -5
- package/workspace/guide/home.md +1 -1
- package/workspace/guide/horizon-scan.md +1 -1
- package/workspace/lib/agent-inbox.js +20 -2
- package/workspace/lib/briefing-premium-sources.js +3 -0
- package/workspace/lib/briefing-premium.js +37 -7
- package/workspace/lib/driver-cli.js +1 -1
- package/workspace/lib/driver-run.js +15 -1
- package/workspace/lib/driver.js +31 -2
- package/workspace/lib/news-for-you.js +24 -9
- package/workspace/lib/pm-idle.js +12 -0
- package/workspace/lib/refresh.js +17 -8
- package/workspace/lib/routes-core-docs.js +1 -1
- package/workspace/lib/routes-news.js +15 -1
- package/workspace/lib/routes-phone-day.js +6 -4
- package/workspace/need-shot.js +57 -0
- package/workspace/news-viewers-test.js +183 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-core-doc-issue-test.js +9 -8
- package/workspace/public/pm/bd-ini-panel.js +4 -11
- package/workspace/public/pm/cozy-ev.css +29 -0
- package/workspace/public/pm/cozy-news.js +186 -22
- package/workspace/public/pm/cozy-today.css +5 -0
- package/workspace/public/pm/cozy-viewer.js +4 -3
- package/workspace/public/pm/cozy-vw-shell.css +49 -0
- package/workspace/public/pm/home-adddoc.js +46 -26
- package/workspace/public/pm/home-app.js +134 -112
- package/workspace/public/pm/home-day.js +10 -5
- package/workspace/public/pm/home-draft.js +35 -23
- package/workspace/public/pm/home-ini.js +2 -2
- package/workspace/public/pm/home-need.js +336 -0
- package/workspace/public/pm/home-today.js +2 -2
- package/workspace/public/pm/home-work.js +51 -4
- package/workspace/public/pm/small-vw.js +128 -0
- package/workspace/server.js +10 -6
- package/workspace/skills/initiative-drive.skill +4 -1
- package/workspace/test-lists/batch18-asks.json +5 -0
- package/workspace/test-lists/news-viewers.json +13 -0
- package/workspace/test-lists/small-viewers.json +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.441.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.441.0",
|
|
37
|
+
"at": "2026-10-28T10:47:11.081Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1085,
|
|
42
|
+
"t": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)",
|
|
43
|
+
"s": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.440.0",
|
|
37
49
|
"at": "2026-10-28T10:01:00.680Z",
|
|
@@ -259,18 +271,6 @@
|
|
|
259
271
|
"s": "Eleventh testing feedback batch"
|
|
260
272
|
}
|
|
261
273
|
]
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"v": "0.421.0",
|
|
265
|
-
"at": "2026-10-26T06:44:56.884Z",
|
|
266
|
-
"f": 2,
|
|
267
|
-
"prs": [
|
|
268
|
-
{
|
|
269
|
-
"n": 1059,
|
|
270
|
-
"t": "Tenth testing feedback batch",
|
|
271
|
-
"s": "Tenth testing feedback batch"
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
274
|
}
|
|
275
275
|
]
|
|
276
276
|
}
|
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-28T10:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-28T10:47:08Z"}
|
|
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-28T10:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-28T10:47:08Z"}
|
|
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-28T10:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-28T10:47:08Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -124,21 +124,23 @@ const PAGES = {
|
|
|
124
124
|
await p.click('#czViewer [data-cz-vw="more"]');
|
|
125
125
|
ok(`${kind} A1 the Overview's Documents view has Add a document under ⋯`, await p.evaluate(() => [...document.querySelectorAll('#czViewer .cz-vw-menu button')].some((b) => /^Add a document/.test(b.textContent.trim()))));
|
|
126
126
|
await p.click('#czViewer .cz-vw-menu button:has-text("Add a document")'); await until(() => p.evaluate(() => !!document.querySelector('#czViewer #adT')));
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
ok(`${kind}
|
|
130
|
-
|
|
127
|
+
// shell A (batch 18 item 2-C, canvas OvA9Docs): ✓ in the header adds, ← cancels; Stage and Who writes it are chips; the address shows only off PMOS
|
|
128
|
+
const form = await p.evaluate((V) => ({ open: !!document.querySelector(V + ' #adT'), title: (document.querySelector('#czVwTitle') || {}).textContent || '', sub: (document.querySelector('#czViewer .cz-vw-sub') || {}).textContent || '', wait: !!document.querySelector(V + ' .hx-wait'), phase: [...document.querySelectorAll(V + ' #adPh [data-ph]')].map((b) => b.textContent), seg: [...document.querySelectorAll(V + ' #adW button')].map((b) => b.textContent), kinds: [...document.querySelectorAll(V + ' #adK option')].map((o) => o.textContent), uOff: document.querySelector(V + ' #adUL').hidden, go: !!document.querySelector('#czViewer .cz-vw-hd [data-cz-vw-p="add"]'), foot: !!document.querySelector(V + ' #adGo, ' + V + ' #adNo'), note: (document.querySelector(V + ' [data-ad-note]') || {}).textContent || '', spark: (document.querySelector(V + ' #adS') || {}).textContent || '' }), F);
|
|
129
|
+
ok(`${kind} A1 the form in the Viewer has the dialog's fields, ✓ in the header and no foot presses, with no "Waiting for design" tag, and the old dialog stays shut`, form.open && form.title === 'Add a document' && !!form.sub && !form.wait && (form.phase.join() === (ini ? 'Discover,Plan,Build,Evaluate' : '')) && form.seg.join() === 'I draft it,You write it' && form.kinds.join() === 'In PMOS,Confluence,Google Docs,Google Slides' && form.uOff && form.go && !form.foot && await dlgShut(), JSON.stringify(form));
|
|
130
|
+
ok(`${kind} A7 the form has one short note line and a ✦ line that says the document is saved on the record`, /core set does not cover/.test(form.note) && /saved on the record/.test(form.spark), JSON.stringify([form.note, form.spark]));
|
|
131
|
+
const GO = '#czViewer .cz-vw-hd [data-cz-vw-p="add"]';
|
|
132
|
+
await p.click(GO); await sleep(120);
|
|
131
133
|
ok(`${kind} A4 an empty title is refused in the form and posts nothing`, /Give the document a title/.test(await txt(p, '#czViewer #adM')) && A.posts.length === 0);
|
|
132
134
|
await p.fill('#czViewer #adT', 'UAT plan'); await p.selectOption('#czViewer #adK', 'Confluence'); await sleep(100);
|
|
133
|
-
ok(`${kind} A1 the address field
|
|
134
|
-
await p.click(
|
|
135
|
+
ok(`${kind} A1 the address field shows for a link kind, and the ✦ line says the linked page is not read`, await p.evaluate(() => !document.querySelector('#czViewer #adUL').hidden && /does not read or sync/.test(document.querySelector('#czViewer #adS').textContent)));
|
|
136
|
+
await p.click(GO); await sleep(120);
|
|
135
137
|
ok(`${kind} A4 a link kind with no address is refused in the form and posts nothing`, /Paste the address of the Confluence page/.test(await txt(p, '#czViewer #adM')) && A.posts.length === 0);
|
|
136
138
|
A.reply({ status: 409, body: { ok: false, error: '“UAT plan” is already on this ' + (ini ? 'initiative' : 'board') + '.' } });
|
|
137
|
-
await p.fill('#czViewer #adU', 'https://example.atlassian.net/wiki/x'); await p.click(
|
|
138
|
-
ok(`${kind} A4 a refusal from the route is shown in the form, which stays open`, /already on this/.test(await txt(p, '#czViewer #adM')) && await p.evaluate(() => !!document.querySelector('#czViewer #adT') &&
|
|
139
|
+
await p.fill('#czViewer #adU', 'https://example.atlassian.net/wiki/x'); await p.click(GO); await sleep(250);
|
|
140
|
+
ok(`${kind} A4 a refusal from the route is shown in the form, which stays open`, /already on this/.test(await txt(p, '#czViewer #adM')) && await p.evaluate((g) => !!document.querySelector('#czViewer #adT') && !!document.querySelector(g), GO));
|
|
139
141
|
A.reply({ status: 200, body: { ok: true } }); const calls0 = A.calls();
|
|
140
|
-
await p.click('#czViewer [data-w="you"]'); if (ini) await p.
|
|
141
|
-
await p.click(
|
|
142
|
+
await p.click('#czViewer [data-w="you"]'); if (ini) await p.click('#czViewer #adPh [data-ph="Plan"]');
|
|
143
|
+
await p.click(GO); await sleep(500);
|
|
142
144
|
const last = A.posts[A.posts.length - 1], mint = await T.nonce(BASE);
|
|
143
145
|
const want = { ws: 'w1', scope: P.scope, title: 'UAT plan', writer: 'you', kind: 'Confluence', url: 'https://example.atlassian.net/wiki/x' };
|
|
144
146
|
if (ini) want.phase = 'Plan';
|
|
@@ -163,7 +165,7 @@ const PAGES = {
|
|
|
163
165
|
ok(`${kind} no page error`, A.errors.length === 0, A.errors.join(' | '));
|
|
164
166
|
await A.ctx.close();
|
|
165
167
|
const N = await open(kind, { w: 390, h: 844 }); await addDoc(N.page); await until(() => N.page.evaluate(() => !!document.querySelector('#czViewer #adT')));
|
|
166
|
-
const floors = await N.page.evaluate(() => { const h = (s) => Math.round(document.querySelector('#czViewer ' + s).getBoundingClientRect().height); return { go: h('
|
|
168
|
+
const floors = await N.page.evaluate(() => { const h = (s) => Math.round(document.querySelector('#czViewer ' + s).getBoundingClientRect().height); return { go: h('.cz-vw-hd [data-cz-vw-p="add"]'), no: h('.cz-vw-hd [data-cz-vw="back"]'), t: h('#adT'), k: h('#adK'), w: h('#adW button'), fs: getComputedStyle(document.querySelector('#czViewer #adT')).fontSize }; });
|
|
167
169
|
ok(`${kind} A8 at 390 px the presses and fields are at least 44 px and the fields do not zoom the page`, [floors.go, floors.no, floors.t, floors.k, floors.w].every((v) => v >= 44) && parseFloat(floors.fs) >= 16, JSON.stringify(floors));
|
|
168
170
|
ok(`${kind} A8 no sideways scroll at 390 px with the form open`, await N.page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelector('#czViewer').getBoundingClientRect().right <= innerWidth + 1));
|
|
169
171
|
await N.ctx.close();
|
|
@@ -199,13 +201,14 @@ const PAGES = {
|
|
|
199
201
|
const g = await R.page.evaluate(() => {
|
|
200
202
|
const tok = (v, prop) => { const x = document.createElement('i'); x.style.setProperty(prop, 'var(' + v + ')'); document.querySelector('#czViewer').appendChild(x); const c = getComputedStyle(x)[prop === 'color' ? 'color' : 'backgroundColor']; x.remove(); return c; };
|
|
201
203
|
const cs = (s) => getComputedStyle(document.querySelector(s));
|
|
202
|
-
|
|
204
|
+
const go = '#czViewer .cz-vw-hd [data-cz-vw-p="add"]', bk = document.querySelector('#czViewer .cz-vw-hd [data-cz-vw="back"]');
|
|
205
|
+
return { vw: cs('#czViewer').backgroundColor, card: tok('--cz-card', 'background-color'), vwR: cs('#czViewer').borderTopLeftRadius, ff: cs('#czViewer').fontFamily, go: [cs(go).backgroundColor, '700', cs(go).borderTopLeftRadius], solid: tok('--cz-solid', 'background-color'), no: bk ? getComputedStyle(bk).backgroundColor : 'rgba(0, 0, 0, 0)', dlg: !!(document.querySelector('#dlg') && !!document.querySelector('#dlg.on')) };
|
|
203
206
|
});
|
|
204
207
|
const d = [];
|
|
205
208
|
if (!/^Nunito/.test(btn.ff) || btn.br !== '999px') d.push('button ' + JSON.stringify(btn));
|
|
206
209
|
if (g.vw !== g.card || !/^Nunito/.test(g.ff) || (w > 760 && parseFloat(g.vwR) < 20)) d.push('viewer ' + [g.vw, g.card, g.vwR, g.ff].join(' '));
|
|
207
210
|
if (g.go[0] !== g.solid || +g.go[1] < 700 || g.go[2] !== '999px') d.push('Add document ' + g.go.join(' ') + ' want ' + g.solid);
|
|
208
|
-
if (g.no !== g.card && g.no !== 'rgba(0, 0, 0, 0)') d.push('
|
|
211
|
+
if (g.no !== g.card && g.no !== 'rgba(0, 0, 0, 0)') d.push('Back ' + g.no); // ← cancels (batch 18 item 2-C): the header's quiet round press
|
|
209
212
|
if (g.dlg) d.push('the old dialog opened');
|
|
210
213
|
ok(`A8 the button and the form follow the Agreed design at ${w} px, ${th}`, d.length === 0, d.join(' ; '));
|
|
211
214
|
await R.ctx.close();
|
|
@@ -160,10 +160,10 @@ const product = (name, cond) => {
|
|
|
160
160
|
const row = (await rowsOf(page)).find((r) => r.tag === 'IDPF'), key = row.key;
|
|
161
161
|
if (row.ses) await page.click(`#hmList [data-hm-ses="${row.ses}"]`); // the row sits behind its initiative's pill (batch 12 item 6)
|
|
162
162
|
await page.click(`#hmList [data-hm-sel="n:${key}"]`);
|
|
163
|
-
await page.waitForSelector('#
|
|
164
|
-
await page.click('#
|
|
165
|
-
await page.fill('#
|
|
166
|
-
await page.click('#
|
|
163
|
+
await page.waitForSelector('#czViewer [data-nv-opt]'); // the decision in the Viewer (batch 18 item 2-A, OvA2Decide)
|
|
164
|
+
await page.click('#czViewer [data-nv-opt="extend"]');
|
|
165
|
+
await page.fill('#nvWhy', 'IDPF moves the date.');
|
|
166
|
+
await page.click('#czViewer [data-nv-rec]');
|
|
167
167
|
ok('P9 the press is recorded and the IDPF row leaves, the microsites row stays', await until(async () => { const r = await rowsOf(page); return r.length === 1 && r[0].tag === 'microsites' ? 1 : 0; }, 20000), JSON.stringify(await rowsOf(page)));
|
|
168
168
|
const dA = fs.readFileSync(path.join(rootA, 'pm-decisions.md'), 'utf8'), dB = fs.readFileSync(path.join(rootB, 'pm-decisions.md'), 'utf8');
|
|
169
169
|
ok('P9 the decision is in IDPF\'s journal and not in the other product\'s or the home one\'s', /KC9/.test(dA) && /IDPF moves the date/.test(dA) && !/KC9/.test(dB) && !/IDPF moves the date/.test(fs.readFileSync(path.join(home.root, 'pm-decisions.md'), 'utf8')));
|
|
@@ -127,9 +127,9 @@ const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
|
|
|
127
127
|
await page.waitForSelector('#czViewer #srcLink');
|
|
128
128
|
const link = await page.$eval('#czViewer #srcLink', (a) => ({ href: a.href, target: a.target, rel: a.rel, h: Math.round(a.getBoundingClientRect().height) }));
|
|
129
129
|
ok('S3 the Viewer opens the item\'s https link in a new tab', link.href === 'https://mail.example/t/1' && link.target === '_blank' && /noopener/.test(link.rel), JSON.stringify(link));
|
|
130
|
-
ok('S2 the row\'s why now is in its Viewer card', /Why now
|
|
130
|
+
ok('S2 the row\'s why now is in its Viewer card', /Why now:\s*Why aaaaaaaaaaa1/.test(await page.textContent('#czViewer')), await page.textContent('#czViewer'));
|
|
131
131
|
ok('S3 the card offers nothing that records or sends', (await page.$('#czViewer [data-hv-rec]')) === null && (await page.$('#czViewer [data-hv-later], #czViewer [data-hv-until]')) === null && (await page.$('#czViewer [data-hv-opt]')) === null);
|
|
132
|
-
ok('S11 the link is at least
|
|
132
|
+
ok('S11 the link is the shell\'s primary: at least 40 px high on a desk (44 on a phone or a touch screen, cozy-vw-shell.css)', link.h >= 40, String(link.h));
|
|
133
133
|
await page.keyboard.press('Escape');
|
|
134
134
|
await moreItem(page, 'New for you', '#aroundDig');
|
|
135
135
|
const dig = await page.$eval('#czViewer #aroundDig', (e) => ({ h: e.querySelector('.ev-lbl').textContent, t: e.textContent, href: (e.querySelector('a.srcLink') || {}).href || '' }));
|
|
@@ -121,7 +121,8 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
|
|
|
121
121
|
const r0 = L.rows.find((r) => r.id === 'n:waited:reviews') || L.rows[0];
|
|
122
122
|
await p.click(`.hm-r[data-id="${r0.id}"] .hm-rm`); // Settings and Search took the Viewer above; selecting the row again opens its own
|
|
123
123
|
const v0 = await until(() => p.evaluate(vw));
|
|
124
|
-
|
|
124
|
+
// the Viewer names the thing the ask is about (batch 18 item 2-A: "5 failed reviews", the initiative's name), not the row's verb
|
|
125
|
+
ok('R4 the selected row opens its Viewer beside its chat', !!v0 && !!v0.title && await p.evaluate((id) => (window.czViewer.current() || {}).id === 'need:' + id.slice(2) && !!document.querySelector('#hmLog'), r0.id), JSON.stringify(v0));
|
|
125
126
|
const selBg = await p.evaluate(() => getComputedStyle(document.querySelector('.hm-r.sel')).backgroundColor);
|
|
126
127
|
ok('R12 the selected row is tinted (HvACDesk .sel)', selBg && !/rgba\(0, 0, 0, 0\)|transparent/.test(selBg), selBg);
|
|
127
128
|
const hd = await p.evaluate(() => { const h = document.querySelector('#hmCh'); return h && !h.hidden ? { t: (h.querySelector('.hm-chb') || {}).textContent || '', mark: !!h.querySelector('.hv-mk .hv-d, .hv-mk .hv-ck'), y: Math.round(h.getBoundingClientRect().top), size: getComputedStyle(h.querySelector('.hm-chb')).fontSize } : null; });
|
|
@@ -130,31 +131,33 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
|
|
|
130
131
|
/* R10 */
|
|
131
132
|
ok('R10 a page where nothing was pressed to record sends no POST', A.posts.filter((x) => /briefing-premium\/(decide|put-off|return|start)/.test(x.path)).length === 0, JSON.stringify(A.posts.map((x) => x.path)));
|
|
132
133
|
|
|
133
|
-
/* W1-W7: record a decision */
|
|
134
|
+
/* W1-W7: record a decision (batch 18 item 2-A, OvA2Decide): the choices, the why and Record are in the Viewer; the chat's pills open it */
|
|
134
135
|
{ const key = 'decision:KC5';
|
|
135
136
|
await p.click(`.hm-r[data-id="n:${key}"] .hm-rm`);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
ok('W1
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
|
|
137
|
+
const v = await until(() => p.evaluate(() => { const x = document.querySelector('#czViewer:not([hidden]) .nv-dec'); return x && x.querySelector('[data-nv-opt]') ? [...x.querySelectorAll('[data-nv-opt]')].map((b) => b.dataset.nvOpt) : null; }));
|
|
138
|
+
ok('W1 the decision opens in the Viewer with its three choices, none picked (no pick is on record)', JSON.stringify(v) === JSON.stringify(['reshape', 'extend', 'retire']) && await p.evaluate(() => !document.querySelector('#czViewer [data-nv-opt][aria-checked="true"]')), JSON.stringify(v));
|
|
139
|
+
ok('W1 with no pick on record the one primary is Weigh it for me, and nothing says to record on a card in the chat', await p.evaluate(() => { const v = document.querySelector('#czViewer'); return (v.querySelector('.czs-pri') || {}).textContent === 'Weigh it for me' && !/card in the chat/.test(v.textContent); }));
|
|
140
|
+
ok('W1 the chat beside it asks a question and its pills are the choices', await p.evaluate(() => /\?/.test(document.querySelector('#hmLog').textContent) && [...document.querySelectorAll('#hmLog button')].some((b) => /Extend the date/.test(b.textContent)) && !document.querySelector('#hmLog .ut-dec')));
|
|
141
|
+
const btn = () => p.evaluate(() => { const b = document.querySelector('#czViewer [data-nv-rec]'); return { dis: b.disabled, t: b.textContent }; });
|
|
142
|
+
const pick = (k) => p.click(`#czViewer [data-nv-opt="${k}"]`);
|
|
143
|
+
ok('W1 before a choice the record button is off', (await btn()).dis);
|
|
142
144
|
await pick('extend');
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
const b1 = await btn();
|
|
146
|
+
ok('W1 with a choice and no reason it is still off, and it names the choice', b1.dis && /Record: extend the date/.test(b1.t), JSON.stringify(b1));
|
|
147
|
+
await p.fill('#nvWhy', 'ok');
|
|
145
148
|
ok('W1 a reason under three characters keeps it off', (await btn()).dis);
|
|
146
|
-
await p.fill('#
|
|
149
|
+
await p.fill('#nvWhy', 'The partner needs two more weeks');
|
|
147
150
|
ok('W1 a choice and a reason turn it on', !(await btn()).dis);
|
|
148
|
-
await p.click('#
|
|
151
|
+
await p.click('#czViewer [data-nv-rec]');
|
|
149
152
|
const post = await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/decide'));
|
|
150
153
|
ok('W6 the press posts the key, the choice and the reason, and no writer field', !!post && post.body.key === key && post.body.choice === 'extend' && post.body.why === 'The partner needs two more weeks' && !('by' in post.body), JSON.stringify(post && post.body));
|
|
151
154
|
ok('W7 a recorded press says where it was recorded', !!(await until(() => p.evaluate(() => /pm-decisions\.md/.test(document.querySelector('#toast').textContent)))));
|
|
152
|
-
/* W3 put off */
|
|
155
|
+
/* W3 put off: the clock press in the Viewer's header */
|
|
153
156
|
const k2 = 'decision:premium-ux';
|
|
154
157
|
await p.click(`.hm-r[data-id="n:${k2}"] .hm-rm`);
|
|
155
|
-
await until(() => p.evaluate(() => !!document.querySelector('#
|
|
156
|
-
ok('W3
|
|
157
|
-
await p.click('#
|
|
158
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw-p="later"]')));
|
|
159
|
+
ok('W3 Put off is one icon in the Viewer\'s header beside Pin (aria-pressed), and its menu stays shut until pressed', await p.evaluate(() => { const m = document.querySelector('#hmMenu'), pin = document.querySelector('#czViewer [data-cz-vw-p="pin"]'); return (!m || m.hidden) && !!pin && pin.getAttribute('aria-pressed') === 'false' && document.querySelector('#czViewer [data-cz-vw-p="later"]').getAttribute('aria-label') === 'Put off'; }));
|
|
160
|
+
await p.click('#czViewer [data-cz-vw-p="later"]');
|
|
158
161
|
ok('W3 its menu has three live choices', await p.evaluate(() => [...document.querySelectorAll('#hmMenu:not([hidden]) [data-hm-mi] b')].map((b) => b.textContent).join() === 'Later today,Tomorrow,Next week'));
|
|
159
162
|
await p.locator('#hmMenu [data-hm-mi]').filter({ hasText: 'Tomorrow' }).first().click();
|
|
160
163
|
ok('W3 "Tomorrow" posts the key and the time', !!(await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/put-off' && x.body.key === k2 && x.body.until === 'tomorrow'))));
|
|
@@ -163,14 +166,17 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
|
|
|
163
166
|
await p.click(`.hm-r[data-id="n:${k3}"] .hm-rm`).catch(() => {}); // Home A + C: the × shows on the open row only
|
|
164
167
|
await p.click(`.hm-r[data-id="n:${k3}"] [data-hm-end]`).catch(() => {});
|
|
165
168
|
ok('W3 the row\'s × puts it off until tomorrow', !!(await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/put-off' && x.body.key === k3))));
|
|
166
|
-
/* W8 start */
|
|
169
|
+
/* W8 start (OvA1Start, OvA1After) */
|
|
167
170
|
const k4 = 'blocked:console-3-boards';
|
|
168
171
|
await p.click(`.hm-r[data-id="n:${k4}"] .hm-rm`);
|
|
169
|
-
await until(() => p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-czs-act="start"]')));
|
|
173
|
+
const s0 = await p.evaluate(() => { const v = document.querySelector('#czViewer'); return { line: (v.querySelector('.czs-line') || {}).textContent || '', offer: (v.querySelector('.nv-offer') || {}).textContent || '', cost: (v.querySelector('.nv-cost') || {}).textContent || '', pri: (v.querySelector('.czs-pri') || {}).textContent || '', own: (v.querySelector('.nv-own') || {}).textContent || '' }; });
|
|
174
|
+
ok('W8 a blocked row says what is missing, offers ✦ what Claude drafts, says what waiting costs, and holds ONE verb', s0.line === 'Blocked: the spec is missing' && /^I can do the spec/.test(s0.offer) && /^If it waits: /.test(s0.cost) && s0.pri === 'Do the spec' && /Yours to unblock · New feature/.test(s0.own), JSON.stringify(s0));
|
|
175
|
+
await p.click('[data-czs-act="start"]');
|
|
172
176
|
const sp = await until(() => { const l = A.posts.filter((x) => x.path === '/api/agent/start'); return l.length ? l : null; });
|
|
173
177
|
ok('W8 Start posts one agent start for that row', !!sp && sp.length === 1, JSON.stringify(A.posts.map((x) => [x.path, x.body])));
|
|
178
|
+
const s1 = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); const l = v && v.querySelector('.czs-line'); return l && /^Doing the spec/.test(l.textContent) ? { stop: !!v.querySelector('[data-czs-act="stop"][aria-label="Stop the agent"]'), chat: !!v.querySelector('[data-czs-act="talk"]'), pri: !!v.querySelector('.czs-pri') } : null; }));
|
|
179
|
+
ok('W8 after Start the same card says what the agent does now, with Stop and its chat and no other verb (OvA1After)', !!s1 && s1.stop && s1.chat && !s1.pri, JSON.stringify(s1));
|
|
174
180
|
const mint = await T.nonce(BASE);
|
|
175
181
|
const writes = A.posts.filter((x) => /briefing-premium\/(decide|put-off)|\/api\/agent\/start/.test(x.path));
|
|
176
182
|
ok('W5 every press carried the launch nonce the server minted', !!mint && writes.length >= 4 && writes.every((x) => x.headers['x-pmos-nonce'] === mint), String(mint).slice(0, 4) + ' ' + writes.length);
|
|
@@ -182,9 +188,9 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
|
|
|
182
188
|
{ const R = await open({ mock: false });
|
|
183
189
|
await R.page.route('**/api/briefing-premium/decide*', (r) => r.fulfill({ status: 409, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'This decision is already on record.' }) }));
|
|
184
190
|
await R.page.click('.hm-r[data-id="n:decision:KC5"] .hm-rm');
|
|
185
|
-
await until(() => R.page.evaluate(() => !!document.querySelector('#
|
|
186
|
-
await R.page.click('#
|
|
187
|
-
ok('W6 a refused press shows the server reason, keeps the
|
|
191
|
+
await until(() => R.page.evaluate(() => !!document.querySelector('#czViewer [data-nv-opt]')));
|
|
192
|
+
await R.page.click('#czViewer [data-nv-opt="retire"]'); await R.page.fill('#nvWhy', 'No longer worth the date'); await R.page.click('#czViewer [data-nv-rec]');
|
|
193
|
+
ok('W6 a refused press shows the server reason, keeps the Viewer and keeps the typed reason', !!(await until(() => R.page.evaluate(() => /already on record/.test((document.querySelector('#nvMsg') || {}).textContent || '') && document.querySelector('#nvWhy').value === 'No longer worth the date'))));
|
|
188
194
|
await R.ctx.close(); }
|
|
189
195
|
|
|
190
196
|
{
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.441.0",
|
|
4
|
+
"at": "2026-10-28T10:47:11.081Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1085,
|
|
9
|
+
"t": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)",
|
|
10
|
+
"s": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"v": "0.440.0",
|
|
4
16
|
"at": "2026-10-28T10:01:00.680Z",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Core documents: what each level keeps"
|
|
4
4
|
description: "The core documents of the portfolio, a board and an initiative, what each state means, how PMOS drafts them on a schedule and when you ask, how you issue a draft, and pmos coredoc write."
|
|
5
|
-
timestamp: 2026-10-
|
|
5
|
+
timestamp: 2026-10-28
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Core documents: what each level keeps
|
|
@@ -46,7 +46,7 @@ A row that is not started always has a next step:
|
|
|
46
46
|
## How PMOS drafts a document
|
|
47
47
|
|
|
48
48
|
- **When you ask.** Press **Draft it** on a row, or **Ask PMOS to change it** on a draft. PMOS starts one background run at once, even while the schedule is drafting other documents. The run reads the sources of that document and writes one draft. It has no tool that sends, posts or edits.
|
|
49
|
-
- **On a schedule.**
|
|
49
|
+
- **On a schedule.** At night (01:00 to 05:00), or after you have been away from PMOS for 30 minutes, PMOS drafts each portfolio and board document that has no draft and is due, out of date or not started yet. Due documents go first, then out-of-date ones, then the first draft of documents not started. While their sources do not exist, it also proposes the OKRs, the decision log, kill conditions and market and user context. There is no limit on how many documents are drafted. PMOS drafts them in one run per level: one run for the portfolio and one for each board. Each run reads the sources once and writes each draft with its own command, so the drafts of one level are written from the same reading. If a run writes some of its drafts, the rest are tried on the next tick. If a run writes none, it ends as failed: the refresh log gives the reason, Needs you tells you, and PMOS does not try those documents again until the next day. If you drop a draft, PMOS does not draft that document again until the next day. The product strategy is proposed when it is not started or its quarterly review is due.
|
|
50
50
|
- **The Initiative Driver.** When the current stage of an initiative needs a document that is not there or is stale, the driver drafts it and files a proposal. **Keep** issues the draft. The driver does not propose a stage move while a document of the current stage is due.
|
|
51
51
|
|
|
52
52
|
## Issue a draft
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Data freshness: how the workspace keeps up to date, and how old each source is"
|
|
4
|
-
timestamp: 2026-10-
|
|
4
|
+
timestamp: 2026-10-28
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Data freshness
|
|
@@ -23,11 +23,11 @@ The workspace holds no password or token, and it never calls these services. An
|
|
|
23
23
|
|
|
24
24
|
| Source | Skill | Default schedule | Shown as old after |
|
|
25
25
|
|---|---|---|---|
|
|
26
|
-
| Calendar | calendar-sync |
|
|
27
|
-
| Jira status | jira-sync |
|
|
28
|
-
| My work | my-work-read |
|
|
26
|
+
| Calendar | calendar-sync | every 30 minutes in working hours | 8 hours |
|
|
27
|
+
| Jira status | jira-sync | every hour in working hours | 26 hours |
|
|
28
|
+
| My work | my-work-read | every hour in working hours | 26 hours |
|
|
29
29
|
| Tracker items | tracker-refresh | Friday 15:30 | 8 days |
|
|
30
|
-
| Your tools | sources-read | before the morning briefing, and when you press Refresh | 8 hours |
|
|
30
|
+
| Your tools | sources-read | every hour in working hours, before the morning briefing, and when you press Refresh | 8 hours |
|
|
31
31
|
|
|
32
32
|
The calendar-sync skill reads today and the next 14 days, read-only, and saves the events with this command:
|
|
33
33
|
|
|
@@ -105,6 +105,8 @@ A refresh waits for the sources it uses. The briefing waits for work assigned to
|
|
|
105
105
|
- **Tell me**: a failed scheduled refresh adds one item to Needs you on the Briefing.
|
|
106
106
|
- **Runs at once**: at most this many scheduled refreshes run together. A refresh you press is never held.
|
|
107
107
|
- No scheduled refresh starts in your quiet hours; the background jobs keep to the day check's working hours.
|
|
108
|
+
- **Deep work runs at night or when you step away.** Your impact, metric drafts and reads, Claude's morning checks of initiatives, and core document drafts run between 01:00 and 05:00. If PMOS was not running then, they run when you have not pressed anything or typed in a terminal for 30 minutes. Quiet hours hold them too. Each one still runs at most once a day.
|
|
109
|
+
- A schedule you never changed moves to the new default once (quick reads every 30 or 60 minutes in working hours). A schedule you picked stays as it is.
|
|
108
110
|
- **One server runs the schedules.** When several PMOS servers run on one computer (for example an npm install and a checkout), only one of them runs the schedules and starts background runs; the others serve pages only. If that server stops, another one takes over within 3 minutes. A refresh you press runs on the server where you press it.
|
|
109
111
|
- **Quiet start**: a server starts no background run in its first 5 minutes, so the first pages load quickly. A missed refresh catches up after that.
|
|
110
112
|
|
package/workspace/guide/home.md
CHANGED
|
@@ -13,7 +13,7 @@ Home, the Board, Insights and the Viewer use one type scale: 11, 12, 14, 16, 20
|
|
|
13
13
|
|
|
14
14
|
## The list
|
|
15
15
|
|
|
16
|
-
- The top line has **Good morning**, the product picker, the filter icon (on a desktop) and **New**. The line under it says how many items are yours, for example "4 are yours".
|
|
16
|
+
- The top line has **Good morning**, the product picker, the filter icon (on a desktop) and **New**. When the list is narrow, the icons move to a second line, so the greeting is never cut. The line under it says how many items are yours, for example "4 are yours".
|
|
17
17
|
- Press **Good morning** to open **Your day** in the Viewer. This is the same on a computer and on a phone. To open the calendar, press the calendar icon in Your day's header. A program's milestone changes that wait on you are the first line of the program's card.
|
|
18
18
|
- A blue dot after **Good morning** means that something is new for you. It is in the **New for you** fold of Your day.
|
|
19
19
|
- Your day shows the date, the meetings of the day, **Your move** (the items that wait on you, with their count), **New for you**, and **This week** (the Weekly review).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "The Horizon scan: reports and proposals for the whole portfolio"
|
|
4
4
|
description: "What the portfolio Horizon scan does, its settings and schedule, Scan now and its limits, the report documents, the proposals you approve, what it can and cannot do, and the pmos scan commands."
|
|
5
|
-
timestamp: 2026-10-
|
|
5
|
+
timestamp: 2026-10-28
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# The Horizon scan: reports and proposals for the whole portfolio
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* readProposals(available) → [{ p, ws, product, targetTitle }] the open proposals the Agent proposals dialog shows
|
|
7
7
|
* readSeen(runtimeDir) · appendSeen(runtimeDir, { ids } | { all: true }, now)
|
|
8
8
|
* split(model, goals) → the Briefing model with its agent and goal rows moved to model.agent (N6)
|
|
9
|
+
* overlapOf(p) → an agent's possible-overlap proposal as data, or null (batch 18 item 2b)
|
|
9
10
|
*
|
|
10
11
|
* An item is one open Driver proposal (a board in Approve mode only, as the dialog reads it), one goal row of goal-chat, or one My work item
|
|
11
12
|
* whose agent has a draft ready or stopped (PM, 2026-10-20: the Work queue has no Agents tab, so these wait here). Every word
|
|
@@ -18,7 +19,7 @@ const SEEN = 'inbox-seen.jsonl';
|
|
|
18
19
|
const MAX_NEW = 30;
|
|
19
20
|
const clip = (s, n) => { s = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return s.length > n ? s.slice(0, n - 1).trimEnd() + '…' : s; };
|
|
20
21
|
const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
|
21
|
-
const WHAT = { problem: 'Problem statement', evidence: 'Evidence', sizing: 'Opportunity sizing', assumption: 'Riskiest assumption', stakeholders: 'Stakeholders', move: 'Move', note: 'Note', 'next-step': 'Next step', 'follow-up': 'Follow-up', doc: 'Document draft' };
|
|
22
|
+
const WHAT = { problem: 'Problem statement', evidence: 'Evidence', sizing: 'Opportunity sizing', assumption: 'Riskiest assumption', stakeholders: 'Stakeholders', move: 'Move', note: 'Note', 'next-step': 'Next step', 'follow-up': 'Follow-up', doc: 'Document draft', overlap: 'Possible overlap' };
|
|
22
23
|
const WORK_KIND = { ready: 'work-draft', failed: 'work-stopped' };
|
|
23
24
|
const GOAL_KIND = { waiting: 'goal-waiting', done: 'goal-done', stopped: 'goal-stopped' };
|
|
24
25
|
|
|
@@ -28,6 +29,22 @@ function draftsRowKey(ws, target) {
|
|
|
28
29
|
return Drafts.keyOf(ws, 'driver-needs:drafts:' + D.targetKey(target));
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
/** An agent's possible-overlap proposal (batch 18 item 2b) → { with, parts?, of?, items?, sure?, sureWhy?, first?, firstWhy?, text? } | null. Pure.
|
|
33
|
+
* An `overlap` proposal carries it as data. An older `note` that says "Possible overlap with the open initiative <id>" gives what its words
|
|
34
|
+
* say: the other initiative, and the order when it says "placed after this one" or "placed before this one". Nothing else is guessed. */
|
|
35
|
+
const OVERLAP_RE = /possible overlap with (?:the )?(?:open )?(?:initiative )?[`"']?([A-Za-z0-9][A-Za-z0-9._-]{0,79})/i;
|
|
36
|
+
const SURE_OF = (c) => (typeof c !== 'number' ? null : c >= 0.75 ? 'high' : c >= 0.45 ? 'medium' : 'low');
|
|
37
|
+
function overlapOf(p) {
|
|
38
|
+
if (!p || !p.target || p.target.kind !== 'initiative') return null;
|
|
39
|
+
const d = p.data || {};
|
|
40
|
+
const sure = SURE_OF(p.facts && p.facts.confidence);
|
|
41
|
+
if (p.what === 'overlap' && typeof d.with === 'string') return { ...d, ...(d.sure || !sure ? {} : { sure }) };
|
|
42
|
+
if (p.what !== 'note' || typeof d.text !== 'string') return null;
|
|
43
|
+
const m = OVERLAP_RE.exec(d.text); if (!m || m[1] === p.target.id) return null;
|
|
44
|
+
const first = /placed after this one/i.test(d.text) ? 'this' : /placed before this one/i.test(d.text) ? 'other' : null;
|
|
45
|
+
return { with: m[1].replace(/[.,;:]+$/, ''), ...(first ? { first } : {}), ...(sure ? { sure } : {}) };
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
function proposalTitle(p) {
|
|
32
49
|
const word = p.what === 'move' && p.data && p.data.to ? 'Move to ' + p.data.to : WHAT[p.what] || p.what || 'Proposal';
|
|
33
50
|
const text = p.data && typeof p.data.text === 'string' ? p.data.text : '';
|
|
@@ -61,6 +78,7 @@ function build({ proposals = [], goals = [], work = [], seen = { all: 0, ids: ne
|
|
|
61
78
|
id: 'prop:' + x.ws + ':' + p.id, kind: p.what === 'doc' ? 'draft' : 'proposal', title: proposalTitle(p), at: Number.isFinite(at) ? at : null,
|
|
62
79
|
ws: x.ws, product: x.product || '', target,
|
|
63
80
|
open: 'prop:' + p.id, pws: x.ws, session: draftsRowKey(x.ws, t),
|
|
81
|
+
...(() => { const o = overlapOf(p); return o ? { pid: p.id, why: p.why || '', overlap: o } : {}; })(),
|
|
64
82
|
});
|
|
65
83
|
}
|
|
66
84
|
for (const g of goals) {
|
|
@@ -155,4 +173,4 @@ function split(model, goals = []) {
|
|
|
155
173
|
};
|
|
156
174
|
}
|
|
157
175
|
|
|
158
|
-
module.exports = { build, workOf, readProposals, readSeen, appendSeen, badSeen, split, draftsRowKey, SEEN, MAX_NEW };
|
|
176
|
+
module.exports = { build, workOf, readProposals, readSeen, appendSeen, badSeen, split, draftsRowKey, overlapOf, SEEN, MAX_NEW };
|
|
@@ -45,8 +45,11 @@ function itemRow(x, ask, brief, products) {
|
|
|
45
45
|
['Confidence', typeof x.confidence === 'number' ? Math.round(x.confidence * 100) + '%' + (ask ? ', below the bar: ask before acting' : '') : ''], ['Effort', EFFORT_WORD[x.effort] || ''],
|
|
46
46
|
['Reply needed', typeof x.reply_needed === 'boolean' ? (x.reply_needed ? 'Yes' : 'No') : ''], ['Initiative', hit ? hit.name + ' · ' + x.initiative_id : ''], ['Due', text(x.due, 40)]].filter((f) => f[1]);
|
|
47
47
|
const why = text(x.why_now, 240);
|
|
48
|
+
// the brief says it could not reach this source this morning: the Viewer says why and offers the sign-in (OvA12Edges)
|
|
49
|
+
const st = brief.sources && typeof brief.sources === 'object' ? brief.sources[x.source] : null;
|
|
48
50
|
return {
|
|
49
51
|
kind: 'source', key: 'src:' + x.id, title: text(x.title, 140),
|
|
52
|
+
...(st === 'not-reached' ? { unread: { source: src, date: brief.date } } : {}),
|
|
50
53
|
subject: [src, text(x.who, 120), x.mention ? 'mentions you' : '', ask ? 'worth asking' : ''].filter(Boolean).join(' · '),
|
|
51
54
|
prepared: verb && todo ? verb + ': ' + todo : todo || verb || 'No prepared line is on record.',
|
|
52
55
|
skip: why ? 'Why now: ' + why : 'No reason is on record.',
|
|
@@ -82,6 +82,16 @@ const skipped = { n: 0 };
|
|
|
82
82
|
/** Two products can hold an initiative of the same name, so a lookup by id also names the workspace (none in a one-workspace read). */
|
|
83
83
|
const idk = (x, id) => (x.ws || '') + '|' + id;
|
|
84
84
|
const live = (i) => i && !i.accepted && !i.stopped && !i.legacy;
|
|
85
|
+
/** Who and what an ask's Viewer names (batch 18 item 2-A, OvA1Start): the initiative's name, its lane, its owner (the record's owner:) and the
|
|
86
|
+
* goal its anchor names (readInitiatives resolves it from the OKR files). A field the records do not hold is left out. */
|
|
87
|
+
const whoOf = (i) => {
|
|
88
|
+
const o = { title: clip(i.title, 120) };
|
|
89
|
+
if (i.lane) o.lane = i.lane;
|
|
90
|
+
if (i.fm && i.fm.owner) o.owner = clip(i.fm.owner, 60);
|
|
91
|
+
if (i.goal && i.goal.title) o.goal = i.goal;
|
|
92
|
+
if (i.ws) o.ws = i.ws;
|
|
93
|
+
return o;
|
|
94
|
+
};
|
|
85
95
|
|
|
86
96
|
/* ── rows ─────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
87
97
|
function blockedRows(f) {
|
|
@@ -97,7 +107,7 @@ function blockedRows(f) {
|
|
|
97
107
|
prepared: st.next ? 'Next step: ' + clip(st.next, 140) : 'No next step is on record.',
|
|
98
108
|
skip: 'If you skip: ' + m.skip,
|
|
99
109
|
from: [i.id], stepKey: st.key, order: [-(i.blockers || []).length, i.id],
|
|
100
|
-
detail: { id: i.id, step: st.key, rule: st.rule || null, next: st.next == null ? null : String(st.next), record: i.record || null },
|
|
110
|
+
detail: { id: i.id, step: st.key, rule: st.rule || null, next: st.next == null ? null : String(st.next), record: i.record || null, ...whoOf(i) },
|
|
101
111
|
dialog: tryD(() => ({
|
|
102
112
|
eye: 'Unblock', logTitle: 'Read from the repository',
|
|
103
113
|
log: ['Read the initiative record' + (i.record ? ' (' + i.record + ')' : ''), 'Ran the workflow order rules on it', 'Found the step that blocks it: ' + st.key],
|
|
@@ -132,7 +142,7 @@ function decisionRows(f) {
|
|
|
132
142
|
prepared: 'No recommendation is on record.',
|
|
133
143
|
skip: 'If you skip: ' + (mt ? 'the ' + hhmm(mt.start) + ' ' + mt.title + ' runs without a disposition.' : 'the prototype stays without a disposition.'),
|
|
134
144
|
hero: 'the ' + shortName(i.title) + ' waits for your call', from: [i.id].concat(mt ? ['meeting:' + mt.title] : []),
|
|
135
|
-
detail: { id: i.id, record: i.record || null },
|
|
145
|
+
detail: { id: i.id, record: i.record || null, ...whoOf(i), ...(mt ? { meeting: { at: hhmm(mt.start), title: mt.title } } : {}) },
|
|
136
146
|
dialog: tryD(() => ({
|
|
137
147
|
eye: 'Decide with evidence', logTitle: 'Read from the repository',
|
|
138
148
|
log: ['Read the initiative record' + (i.record ? ' (' + i.record + ')' : ''), 'Checked the prototype lane rule (D60): a prototype needs your disposition', f.meetings === null ? 'The calendar could not be read, so no meeting was looked for' : mt ? 'Found a meeting that needs it: ' + hhmm(mt.start) + ' ' + mt.title : 'Looked for a meeting that needs it: none found'],
|
|
@@ -155,7 +165,7 @@ function decisionRows(f) {
|
|
|
155
165
|
kind: 'decision', key: 'decision:' + t.id, title: 'Decide what the missed ' + t.id + ' date means', subject: clip(t.name, 90),
|
|
156
166
|
prepared: 'No recommendation is on record.', skip: 'If you skip: no decision is on record and the tripwire stays fired.',
|
|
157
167
|
hero: 'the ' + clip(short, 40) + ' tripwire missed its date', from: ['tripwire:' + t.id],
|
|
158
|
-
detail: { id: t.id, date: t.date },
|
|
168
|
+
detail: { id: t.id, date: t.date, title: clip(short, 90) },
|
|
159
169
|
dialog: tryD(() => ({
|
|
160
170
|
eye: 'Decide with evidence', logTitle: 'Read from the repository',
|
|
161
171
|
log: ['Read the kill condition (planning/okrs/kill-conditions.md · ' + t.id + ')', 'Checked pm-decisions.md for an entry on or after ' + t.date, 'Found none'],
|
|
@@ -187,7 +197,9 @@ function failedReviews(f) {
|
|
|
187
197
|
for (const [id, v] of last) {
|
|
188
198
|
const i = byId.get(id);
|
|
189
199
|
if (v.verdict !== 'FAIL' || !live(i)) continue;
|
|
190
|
-
|
|
200
|
+
// the latest agent run of the initiative: its row in the Viewer opens that run's return (OvA3Waited)
|
|
201
|
+
const run = (f.runs || []).filter((r) => r && r.initiative_id === id && r.run_id && (!i.ws || !r.ws || r.ws === i.ws)).sort((a, b) => String(b.created_at || '').localeCompare(String(a.created_at || '')))[0];
|
|
202
|
+
out.push({ id, days: Math.floor((f.now - v.t) / DAY), score: v.score, thr: v.thr, lead: v.lead, title: i.title, anchor: i.anchor, run: run ? run.run_id : null, ws: i.ws || null });
|
|
191
203
|
}
|
|
192
204
|
return out;
|
|
193
205
|
}
|
|
@@ -207,7 +219,8 @@ function waitedRows(f) {
|
|
|
207
219
|
log: ['Read planning/runs/evals.jsonl', 'Kept the latest verdict of each initiative', 'Found ' + n + ' that failed and have no later review'],
|
|
208
220
|
say: num(n)[0].toUpperCase() + num(n).slice(1) + ' ' + plural(n, 'review failed and none since has passed', 'reviews failed and none since has passed') + '. No proposal is on record for ' + plural(n, 'it', 'any of them') + '.',
|
|
209
221
|
head: 'The reviews',
|
|
210
|
-
items: fr.slice().sort((a, b) => b.days - a.days).map((x) => ({ t: clip(x.title || x.id, 80), m: x.days + ' days' + (x.anchor ? ' · ' + x.anchor : ''), s: x.score != null ? 'Scored ' + x.score + (x.thr != null ? ' of ' + x.thr : '') : 'No score recorded', lead: x.lead
|
|
222
|
+
items: fr.slice().sort((a, b) => b.days - a.days).map((x) => ({ t: clip(x.title || x.id, 80), m: x.days + ' days' + (x.anchor ? ' · ' + x.anchor : ''), s: x.score != null ? 'Scored ' + x.score + (x.thr != null ? ' of ' + x.thr : '') : 'No score recorded', lead: x.lead,
|
|
223
|
+
id: x.id, days: x.days, ...(x.run ? { run: x.run } : {}), ...(x.ws ? { ws: x.ws } : {}) })),
|
|
211
224
|
pane: { label: n + ' failed ' + plural(n, 'review', 'reviews'), list: true },
|
|
212
225
|
})),
|
|
213
226
|
}];
|
|
@@ -491,19 +504,36 @@ function readFm(root, rel) {
|
|
|
491
504
|
const m = /^---\n([\s\S]*?)\n---/.exec(t);
|
|
492
505
|
if (!m) return null;
|
|
493
506
|
const out = {};
|
|
494
|
-
for (const k of ['lane', 'parent_kr', 'status']) {
|
|
507
|
+
for (const k of ['lane', 'parent_kr', 'status', 'owner']) {
|
|
495
508
|
const r = new RegExp('^' + k + ':\\s*(.*)$', 'm').exec(m[1]);
|
|
496
509
|
if (r && r[1].trim()) out[k] = r[1].trim().replace(/^"(.*)"$/, '$1');
|
|
497
510
|
}
|
|
498
511
|
return out;
|
|
499
512
|
}
|
|
500
513
|
|
|
514
|
+
/** The goal an anchor names, in words, from the OKR files and the health budgets: { kind: 'kr'|'objective'|'health', title } or null when
|
|
515
|
+
* the files do not name it (an anchor read only as written is not a name). */
|
|
516
|
+
function goalOf(A, raw) {
|
|
517
|
+
if (!A || !raw) return null;
|
|
518
|
+
let r = null;
|
|
519
|
+
try { r = A.resolve(raw); } catch { return null; }
|
|
520
|
+
if (!r || r.status !== 'resolved' && r.kind !== 'health') return null;
|
|
521
|
+
if (r.kind === 'health') return { kind: 'health', title: String(r.anchor || '').replace(/^health:/, '').replace(/[-_]+/g, ' ') };
|
|
522
|
+
if ((r.kind === 'kr' || r.kind === 'objective') && r.title && r.title !== String(raw).trim()) return { kind: r.kind, title: clip(r.title, 90) };
|
|
523
|
+
return null;
|
|
524
|
+
}
|
|
501
525
|
/** The slow read: every initiative's workflow state, from the engine (a git history walk). Runs at low priority so it does not starve the machine. null on failure. */
|
|
502
526
|
async function readInitiatives({ root, engine }) {
|
|
503
527
|
const wf = engine ? await run(process.execPath, [engine, '--json', '--root', root], { cwd: root, nice: 10 }) : null;
|
|
504
528
|
let list;
|
|
505
529
|
try { list = JSON.parse(wf).map((x) => ({ id: x.id, title: x.title, lane: x.lane, stage: x.stage, accepted: !!x.accepted, stopped: !!x.stopped, legacy: !!x.legacy, anchor: x.anchor, last_activity: x.last_activity, blockers: x.blockers || [], next: x.next, record: x.record, steps: (x.steps || []).map((s) => ({ key: s.key, status: s.status, next: s.next, rule: (s.basis && s.basis.rule) || s.rule, blocking: s.blocking })) })); } catch { return null; }
|
|
506
|
-
|
|
530
|
+
let A = null;
|
|
531
|
+
try { A = require('./initiative-rows.js').anchorsOf(root); } catch { A = null; }
|
|
532
|
+
for (const i of list) {
|
|
533
|
+
if (!(i.record && !i.accepted && (i.lane === 'prototype' || i.steps.some((x) => x.status === 'blocked')))) continue;
|
|
534
|
+
i.fm = readFm(root, i.record);
|
|
535
|
+
i.goal = goalOf(A, i.anchor || (i.fm && i.fm.parent_kr));
|
|
536
|
+
}
|
|
507
537
|
return list;
|
|
508
538
|
}
|
|
509
539
|
|
|
@@ -31,7 +31,7 @@ const COMMANDS = { driver: ['propose', 'status', 'keep', 'return', 'drop', 'paus
|
|
|
31
31
|
const USAGE = [
|
|
32
32
|
'usage: pmos driver propose|status|keep|return|drop|pause|resume|mode — the Initiative Driver',
|
|
33
33
|
' pmos driver propose <initiative|work> <id> --what <what> (--file <json|md> | --data "<text>") --why "<one line>" [--source label=ref …] [--confidence 0..1] [--recommended "<what you suggest>"] [--reversible true|false] [--effort S|M|L]',
|
|
34
|
-
' what: problem, evidence, sizing, assumption, stakeholders, move, note, doc (initiative) · next-step, follow-up, note (Work task)',
|
|
34
|
+
' what: problem, evidence, sizing, assumption, stakeholders, move, note, doc, overlap (initiative) · next-step, follow-up, note (Work task)',
|
|
35
35
|
' pmos driver status <initiative|work> <id>',
|
|
36
36
|
' pmos driver keep <proposal> PM only',
|
|
37
37
|
' pmos driver return <proposal> --note "<what to change>" PM only',
|