create-pmos 0.440.0 → 0.442.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 +25 -25
- 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/adler-seasons-art-test.js +106 -0
- package/workspace/adler-seasons-test.js +111 -0
- package/workspace/briefing-premium-adddoc-test.js +16 -13
- package/workspace/briefing-premium-board-test.js +19 -17
- package/workspace/briefing-premium-initiative-test.js +7 -4
- 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 +24 -0
- package/workspace/guide/adler.md +10 -0
- package/workspace/guide/core-documents.md +2 -2
- package/workspace/guide/data-freshness.md +7 -5
- package/workspace/guide/home.md +3 -1
- package/workspace/guide/horizon-scan.md +1 -1
- package/workspace/ini-workflow-test.js +6 -2
- 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/lib/settings-store.js +38 -0
- package/workspace/metric-drafts-ui-test.js +2 -2
- 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-board-actions-test.js +2 -1
- package/workspace/premium-chat-attach-test.js +2 -0
- package/workspace/premium-core-doc-issue-test.js +9 -8
- package/workspace/program-panel-test.js +1 -1
- package/workspace/public/pm/bd-ini-panel.js +6 -13
- package/workspace/public/pm/c3-ini-ui.js +1 -1
- package/workspace/public/pm/cozy-adler.css +21 -0
- package/workspace/public/pm/cozy-adler.js +415 -8
- package/workspace/public/pm/cozy-ev.css +44 -0
- package/workspace/public/pm/cozy-home.css +8 -0
- package/workspace/public/pm/cozy-news.js +186 -22
- package/workspace/public/pm/cozy-seasons.js +318 -0
- package/workspace/public/pm/cozy-settings.js +88 -5
- package/workspace/public/pm/cozy-today.css +5 -0
- package/workspace/public/pm/cozy-viewer.js +12 -7
- package/workspace/public/pm/cozy-vw-shell.css +49 -0
- package/workspace/public/pm/cozy.css +65 -0
- package/workspace/public/pm/dash-view.js +4 -2
- package/workspace/public/pm/home-adddoc.js +46 -26
- package/workspace/public/pm/home-app.js +142 -114
- package/workspace/public/pm/home-chat.js +1 -1
- package/workspace/public/pm/home-day.js +17 -9
- package/workspace/public/pm/home-draft.js +35 -23
- package/workspace/public/pm/home-ini.js +4 -4
- package/workspace/public/pm/home-mentions.js +1 -1
- 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/impact.js +1 -1
- package/workspace/public/pm/ini-groups.js +15 -10
- package/workspace/public/pm/ini-links.js +1 -1
- package/workspace/public/pm/ini-tasks.js +208 -44
- package/workspace/public/pm/ini-view-model.js +8 -2
- package/workspace/public/pm/ini-view.css +305 -1
- package/workspace/public/pm/ini-view.js +190 -80
- package/workspace/public/pm/mission.js +234 -0
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-welcome.js +2 -2
- package/workspace/public/pm/small-vw.js +128 -0
- package/workspace/public/pm/split-merge.js +1 -1
- package/workspace/public/pm/stage-line.js +2 -2
- package/workspace/server.js +10 -6
- package/workspace/skills/initiative-drive.skill +4 -1
- package/workspace/split-merge-ui-test.js +1 -1
- package/workspace/stage-card-test.js +48 -11
- package/workspace/task-links-test.js +2 -0
- package/workspace/task-milestones-test.js +5 -1
- package/workspace/task-plans-test.js +3 -3
- package/workspace/task-views-test.js +90 -37
- package/workspace/test-lists/adler-seasons-art.json +13 -0
- package/workspace/test-lists/batch18-adler-seasons.json +13 -0
- package/workspace/test-lists/batch18-asks.json +5 -0
- package/workspace/test-lists/mission.json +5 -0
- package/workspace/test-lists/news-viewers.json +13 -0
- package/workspace/test-lists/small-viewers.json +5 -0
- package/workspace/test-lists/viewer-tasks.json +5 -0
- package/workspace/tk-tasks-test.js +25 -30
|
@@ -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,28 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.442.0",
|
|
4
|
+
"at": "2026-10-28T11:35:22.898Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1086,
|
|
9
|
+
"t": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)",
|
|
10
|
+
"s": "Initiative Viewer on phone and desktop, Adler dressed for the season, clear task marks (feedback batch 18 items 1, 8, 12, 13)"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"v": "0.441.0",
|
|
16
|
+
"at": "2026-10-28T10:47:11.081Z",
|
|
17
|
+
"f": 2,
|
|
18
|
+
"prs": [
|
|
19
|
+
{
|
|
20
|
+
"n": 1085,
|
|
21
|
+
"t": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)",
|
|
22
|
+
"s": "Old Viewers on the one pattern, refresh cadence, uncut greeting (feedback batch 18 items 2, 7, 9, 10)"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
2
26
|
{
|
|
3
27
|
"v": "0.440.0",
|
|
4
28
|
"at": "2026-10-28T10:01:00.680Z",
|
package/workspace/guide/adler.md
CHANGED
|
@@ -46,6 +46,16 @@ Each mood comes from real state. When nothing happens, Adler is calm or he rests
|
|
|
46
46
|
|
|
47
47
|
Adler never sits in a list row, a bar, a chart or a report. Rows keep their own signals: a dot is a session and a box is a task.
|
|
48
48
|
|
|
49
|
+
## Adler dressed for the day
|
|
50
|
+
|
|
51
|
+
On a festival, a season or a day of your own, Adler wears a small charm: a hat, a scarf, something in his paws or at his feet, and a scene around him. Deepavali gives him a diya and a garland of marigolds. Christmas gives him a beanie, a gift and a tree. The charm changes what he wears, never his mood.
|
|
52
|
+
|
|
53
|
+
- **Where he wears it.** The scene on the first open of Your day, the night scene after 22:00, his face on the latest chat reply (a hat only), the first run, and a real milestone win on the Board.
|
|
54
|
+
- **Where he never wears it.** Toasts, the recording pill (the headphones win), Intelligence, list rows, charts, reports, and his smallest face.
|
|
55
|
+
- **The mood stays true.** When he needs you, the charm stays and the scene goes plain. When the news is bad, the charm comes off.
|
|
56
|
+
- **The greeting.** On the day itself, Your day says "Happy Deepavali, <your name>." It does not say this on a day with bad news.
|
|
57
|
+
- **Why is he dressed?** Press the scene. One line tells you why. The eye-off icon turns that day off for this year. The arrow opens **Settings › Adler › Dress for the day**.
|
|
58
|
+
|
|
49
59
|
## Choose how much of Adler you see
|
|
50
60
|
|
|
51
61
|
Open **Settings › Adler**. Each choice saves on this computer when you press it.
|
|
@@ -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).
|
|
@@ -93,6 +93,7 @@ Press an initiative's name in the list, or open `?ini=<id>`. The list stays as i
|
|
|
93
93
|
- **Moves on by itself** is a switch, on by default. When every exit item is done, the stage moves to the next stage and a message shows **Undo**. A stage never moves by itself into a milestone (Deliver or Evaluate). This rule is a proposal that the PM has not confirmed yet.
|
|
94
94
|
- → with open tasks in the stage asks first (**Move anyway**, with a note). **Back** always asks for a reason.
|
|
95
95
|
- **Tasks** in the Viewer can be grouped by stage, by groups that you name, by owner or by status. Drag a task to another group.
|
|
96
|
+
- In **Tasks**, a box is a PMOS task: half blue is In progress, empty is To do. A ticket mark with a bold key is a Jira ticket. Jira owns its status and dates, so it has no box. A ◇ always means a milestone.
|
|
96
97
|
- In the Build stage, the open Jira tickets show with the tasks. A task whose name starts with a Jira key (for example "MSD-4376 Navigation tabs") is that ticket, so the ticket shows once, as the task, and counts once. It looks like the ticket rows: a blue square in place of the box and the key in blue. Its status follows Jira; press its name to open it.
|
|
97
98
|
- **Set a Jira ticket's dates.** Press the dates of a Jira ticket in the List, or drag its bar on the Timeline, as you do for a task. PMOS keeps the start and due days and shows them in place of the sprint end. Jira does not change. The status and the name stay Jira's.
|
|
98
99
|
- **Tasks** show one row (one group) for each stage of the workflow, in order. Finished stages and later stages are never merged into one row; they start folded, and the current stage and any stage with a late task start open.
|
|
@@ -175,6 +176,7 @@ There is no My work page. The list on Home is your list:
|
|
|
175
176
|
## The chat
|
|
176
177
|
|
|
177
178
|
- A conversation opens at its latest message.
|
|
179
|
+
- A file that you send shows as a chip in your message, with a small picture for a photo. Press the chip to open the file beside the conversation.
|
|
178
180
|
- Type `/` to see every command: `/goal`, the commands built into Claude Code, and the commands and skills in the workspace's `.claude` folder and in your own `~/.claude` folder.
|
|
179
181
|
- The mic types what you say into the box. **Stop** keeps the words, and **Discard** puts the box back. Both end listening at once.
|
|
180
182
|
- When Claude Code asks whether to trust the folder of a new chat, the chat shows the ask as a card: **Trust this folder** or **No, end the session**. Your first message waits until you answer, for up to 15 minutes, and is then sent. It is never typed into the question.
|
|
@@ -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
|
|
@@ -97,12 +97,15 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
97
97
|
const pickStage = async (p, label) => { await p.click(V + ' [data-iv-stagepick]'); await until(() => p.evaluate(() => !!document.querySelector('.hi-pop [data-sp-life]'))); await p.click(`.hi-pop [data-sp-life]:has(> span:text-is("${label}"))`); };
|
|
98
98
|
const pickMore = async (p, label) => { await p.click('#czViewer [data-cz-vw="more"]'); await until(() => p.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await p.click(`#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${label}"))`); };
|
|
99
99
|
|
|
100
|
+
const openMi = async (p) => { if (!(await p.evaluate((v) => !!document.querySelector(v + ' .iv-mio'), V))) await p.click(V + ' [data-iv-mi]', { position: { x: 8, y: 8 } }); await until(() => p.evaluate((v) => !!document.querySelector(v + ' .iv-mio'), V)); };
|
|
100
101
|
const A = await open(), p = A.page;
|
|
101
102
|
ok('W1 the page opens on the initiative with the workflow on its meta line', A.up, await txt(p, V + ' .cz-vw-kind'));
|
|
102
103
|
ok('W1 the kind line names the workflow and the anchor: "Tender · KR 1.1" (Kind becomes Workflow)', /^Tender · KR 1\.1$/.test(await txt(p, V + ' .cz-vw-kind')), await txt(p, V + ' .cz-vw-kind'));
|
|
103
104
|
ok('W1 the card names the stage of that workflow: Triage', (await txt(p, V + ' .iv-sch > b, .iv-sch .iv-stc b')) === 'Triage', await txt(p, V + ' .iv-sch'));
|
|
104
|
-
ok('W1 the
|
|
105
|
+
ok('W1 the mission strip draws the ten stages of Tender', await p.evaluate((v) => document.querySelectorAll(v + ' .mi-svg :is(.mi-st, .mi-dsh)').length === 10, V));
|
|
106
|
+
await openMi(p);
|
|
105
107
|
ok('W1 the next stage is Tender\'s own: the → names Requirements', await p.evaluate((v) => /^Next: Requirements/.test(document.querySelector(v + ' .iv-scgo').getAttribute('aria-label')), V));
|
|
108
|
+
await p.click(V + ' [data-iv-mi]', { position: { x: 8, y: 8 } });
|
|
106
109
|
ok('W1 the icon names the workflow for a screen reader', await p.evaluate((v) => /Workflow: Tender/.test(document.querySelector(v + ' [data-iv-wf]').getAttribute('aria-label')), V));
|
|
107
110
|
ok('W2 PMOS set it from the BRD: the toast says so, with Undo (WfTriage)', await until(() => p.evaluate(() => { const t = document.getElementById('hiToast'); return !!t && !t.hidden && /Set to Tender from the BRD/.test(t.textContent) && !!t.querySelector('[data-hi-undo]'); })));
|
|
108
111
|
await shot(p, 'triage-1440');
|
|
@@ -144,6 +147,7 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
144
147
|
await p.reload();
|
|
145
148
|
await until(() => p.evaluate((v) => !!document.querySelector(v + ' .hi-end'), V), 30000);
|
|
146
149
|
ok('W7 the page of a Won’t do says why, and offers Back to Triage', /Won't do · No budget: Moved to next year’s budget\./.test(await txt(p, V + ' .hi-end')), await txt(p, V + ' .hi-end'));
|
|
150
|
+
await openMi(p);
|
|
147
151
|
ok('W7 its stage does not move: the card has no next stage to move to', !(await p.evaluate((v) => !!document.querySelector(v + ' .iv-sc .iv-scgo, ' + v + ' [data-iv-next]'), V)), await txt(p, V + ' .iv-sc'));
|
|
148
152
|
ok('W7 the stage chip has Back to Triage in place of Won’t do', await stageLabels(p).then((l) => l.includes('Back to Triage') && !l.includes('Won’t do')));
|
|
149
153
|
await shot(p, 'wontdo-page-1440');
|
|
@@ -154,7 +158,7 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
154
158
|
|
|
155
159
|
// W8 the phone, and dark
|
|
156
160
|
const P = await open({ w: 390, h: 844, fresh: false, B: board('requirements') });
|
|
157
|
-
ok('W8 the phone opens the page with the workflow at Requirements, the second of its ten bars', P.up && (await txt(P.page, V + ' .iv-sch > b, .iv-sch .iv-stc b')) === 'Requirements' && await P.page.evaluate((v) => { const t = [...
|
|
161
|
+
ok('W8 the phone opens the page with the workflow at Requirements, the second of its ten bars', P.up && (await txt(P.page, V + ' .iv-sch > b, .iv-sch .iv-stc b')) === 'Requirements' && await P.page.evaluate((v) => { const t = [...document.querySelectorAll(v + ' .mi-svg :is(.mi-st, .mi-dsh)')]; return t.length === 10 && /\b(nw|late)\b/.test(t[1].getAttribute('class')); }, V));
|
|
158
162
|
ok('W8 the toast shows once only: seen before, not again', !(await P.page.evaluate(() => { const t = document.getElementById('hiToast'); return !!t && !t.hidden; })));
|
|
159
163
|
await shot(P.page, 'page-390');
|
|
160
164
|
await P.page.click(V + ' [data-iv-wf]');
|
|
@@ -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',
|
|
@@ -55,6 +55,16 @@ const dayCheckOpen = (settings, now, inQuiet) => {
|
|
|
55
55
|
const t = hhmm(now);
|
|
56
56
|
return settings && settings.enabled === false ? false : (t >= dc.start && t < dc.end && !inQuiet(now, settings && settings.quiet));
|
|
57
57
|
};
|
|
58
|
+
// feedback batch 18 item 9: deep work (Your impact, metric drafts and reads, the morning ✦ checks, core document drafts; the horizon scan keeps its own time)
|
|
59
|
+
// runs at night, DEEP_NIGHT, or at any hour once the PM has been idle for 30 minutes (lib/pm-idle.js). Quiet hours still hold it. Each run's
|
|
60
|
+
// own due rule keeps it to once a day, so a night that ran leaves nothing for the day; a night PMOS was closed is caught up when the PM steps away.
|
|
61
|
+
const DEEP_NIGHT = Object.freeze({ start: '01:00', end: '05:00' });
|
|
62
|
+
const deepOpen = (settings, now, inQuiet, idleMs = require('./pm-idle.js').idleFor(now)) => {
|
|
63
|
+
if (settings && settings.enabled === false) return false;
|
|
64
|
+
if (inQuiet(now, settings && settings.quiet)) return false;
|
|
65
|
+
const t = hhmm(now);
|
|
66
|
+
return (t >= DEEP_NIGHT.start && t < DEEP_NIGHT.end) || idleMs >= require('./pm-idle.js').IDLE_MS;
|
|
67
|
+
};
|
|
58
68
|
|
|
59
69
|
/** The lines of a plain JSONL file that parse; a missing file is empty. */
|
|
60
70
|
function readJsonl(f) {
|
|
@@ -105,6 +115,10 @@ function create(deps) {
|
|
|
105
115
|
for (const p of retNotes) lines.push(`The PM sent back ${p.id} (${p.what}) with this note: "${p.note}". Revise it and file a new proposal.`);
|
|
106
116
|
const mine = [...state.proposals.values()].filter((p) => D.targetKey(p.target) === D.targetKey(target));
|
|
107
117
|
if (mine.length) lines.push(`Proposals so far: ${mine.map((p) => `${p.id} ${p.what} (${p.state})`).join('; ')}. Do not file one again.`);
|
|
118
|
+
// batch 18 item 2b: "Not an overlap" drops the proposal; the pair is never flagged again, from either side
|
|
119
|
+
const notOverlap = [...state.proposals.values()].filter((p) => p.what === 'overlap' && p.state === 'dropped' && p.data && p.target.ws === target.ws
|
|
120
|
+
&& (p.target.id === target.id || p.data.with === target.id)).map((p) => (p.target.id === target.id ? p.data.with : p.target.id));
|
|
121
|
+
if (notOverlap.length) lines.push(`The PM marked these as not an overlap with this initiative: ${[...new Set(notOverlap)].join(', ')}. Do not file an overlap with them.`);
|
|
108
122
|
return lines;
|
|
109
123
|
}
|
|
110
124
|
|
|
@@ -247,4 +261,4 @@ function create(deps) {
|
|
|
247
261
|
return { tick, active: () => [...active.keys()], loginHeld: (now = Date.now()) => !!(loginFailedAt && now - loginFailedAt < LOGIN_HOLD_MS) };
|
|
248
262
|
}
|
|
249
263
|
|
|
250
|
-
module.exports = { create, off, dayCheckOpen, loginFailure, LOGIN_HOLD_MS };
|
|
264
|
+
module.exports = { create, off, dayCheckOpen, deepOpen, DEEP_NIGHT, loginFailure, LOGIN_HOLD_MS };
|
package/workspace/lib/driver.js
CHANGED
|
@@ -50,7 +50,7 @@ const crypto = require('crypto');
|
|
|
50
50
|
const LEDGER = 'driver.jsonl';
|
|
51
51
|
const KINDS = Object.freeze(['initiative', 'work']);
|
|
52
52
|
const WHATS = Object.freeze({
|
|
53
|
-
initiative: Object.freeze(['problem', 'evidence', 'sizing', 'assumption', 'stakeholders', 'move', 'note', 'doc']),
|
|
53
|
+
initiative: Object.freeze(['problem', 'evidence', 'sizing', 'assumption', 'stakeholders', 'move', 'note', 'doc', 'overlap']),
|
|
54
54
|
work: Object.freeze(['next-step', 'follow-up', 'note']),
|
|
55
55
|
});
|
|
56
56
|
// A claim without a pointer is not a proposal (PRD section 2: "Nothing without a pointer").
|
|
@@ -175,6 +175,12 @@ function checkProposal(input) {
|
|
|
175
175
|
if (!e || !CD.draftable(e)) return { ok: false, error: `a doc proposal needs data.key: one of ${CD.SETS.initiative.filter(CD.draftable).map((x) => x.key).join(', ')}` };
|
|
176
176
|
if (typeof data.slot !== 'string' || !SLOT_RE.test(data.slot)) return { ok: false, error: 'a doc proposal needs data.slot: the slot `pmos coredoc write` printed (YYYY-MM-DD, or YYYY-MM-DD-2)' };
|
|
177
177
|
data = { key: data.key, slot: data.slot };
|
|
178
|
+
} else if (i.what === 'overlap') {
|
|
179
|
+
// batch 18 item 2b: a possible overlap with another open initiative. New for you shows both by name, how much overlaps and how sure,
|
|
180
|
+
// and the PM picks Keep both in this order, Merge or Not an overlap (pm/cozy-news.js). Every part but `with` is optional: absent stays absent.
|
|
181
|
+
const c = checkOverlap(data, t.target.id);
|
|
182
|
+
if (!c.ok) return c;
|
|
183
|
+
data = c.data;
|
|
178
184
|
} else if (i.what === 'next-step') {
|
|
179
185
|
if (!oneLine(data.text, 500)) return { ok: false, error: 'a next step needs data.text: one line of up to 500 characters' };
|
|
180
186
|
if (data.due != null && !(typeof data.due === 'string' && DATE_RE.test(data.due))) return { ok: false, error: 'data.due is YYYY-MM-DD' };
|
|
@@ -201,6 +207,29 @@ function checkProposal(input) {
|
|
|
201
207
|
return { ok: true, proposal: { target: t.target, what: i.what, data, why: i.why.trim(), sources, ...(Object.keys(facts).length ? { facts } : {}) } };
|
|
202
208
|
}
|
|
203
209
|
|
|
210
|
+
/** The data of an overlap proposal (batch 18 item 2b). → { ok, data } | { ok: false, error }. Pure. */
|
|
211
|
+
const SURE = Object.freeze(['high', 'medium', 'low']);
|
|
212
|
+
function checkOverlap(d, self) {
|
|
213
|
+
if (typeof d.with !== 'string' || !ID_RE.test(d.with)) return { ok: false, error: 'an overlap needs data.with: the id of the other open initiative' };
|
|
214
|
+
if (d.with === self) return { ok: false, error: 'an overlap is with another initiative, not this one' };
|
|
215
|
+
const out = { with: d.with };
|
|
216
|
+
const n = (v) => Number.isInteger(v) && v >= 0 && v <= 99;
|
|
217
|
+
if (d.parts != null || d.of != null) {
|
|
218
|
+
if (!n(d.parts) || !n(d.of) || d.parts < 1 || d.parts > d.of) return { ok: false, error: 'data.parts and data.of are whole numbers: how many of this plan\'s parts overlap, of how many (1 ≤ parts ≤ of)' };
|
|
219
|
+
out.parts = d.parts; out.of = d.of;
|
|
220
|
+
}
|
|
221
|
+
if (d.items != null) {
|
|
222
|
+
if (!Array.isArray(d.items) || d.items.length > 12 || !d.items.every((x) => oneLine(x, 200))) return { ok: false, error: 'data.items is a list of at most 12 lines: the parts that overlap' };
|
|
223
|
+
out.items = d.items.map((x) => x.trim());
|
|
224
|
+
}
|
|
225
|
+
if (d.sure != null) { if (!SURE.includes(d.sure)) return { ok: false, error: `data.sure is one of ${SURE.join(', ')}` }; out.sure = d.sure; }
|
|
226
|
+
if (d.sureWhy != null) { if (!oneLine(d.sureWhy, 300)) return { ok: false, error: 'data.sureWhy is one line: why you are that sure' }; out.sureWhy = d.sureWhy.trim(); }
|
|
227
|
+
if (d.first != null) { if (d.first !== 'this' && d.first !== 'other') return { ok: false, error: 'data.first is this or other: which one should go first' }; out.first = d.first; }
|
|
228
|
+
if (d.text != null) { if (!oneLine(d.text, 500)) return { ok: false, error: 'data.text is one line: what overlaps, in plain words' }; out.text = d.text.trim(); }
|
|
229
|
+
if (d.firstWhy != null) { if (!oneLine(d.firstWhy, 300)) return { ok: false, error: 'data.firstWhy is one line: why that order' }; out.firstWhy = d.firstWhy.trim(); }
|
|
230
|
+
return { ok: true, data: out };
|
|
231
|
+
}
|
|
232
|
+
|
|
204
233
|
// ── the fold ─────────────────────────────────────────────────────────────────────────────────────────
|
|
205
234
|
function emptyState() {
|
|
206
235
|
return { epoch: null, proposals: new Map(), order: [], paused: new Map(), modes: new Map(), runs: new Map(), bySession: new Map(),
|
|
@@ -449,6 +478,6 @@ function runOfSession(state, token) {
|
|
|
449
478
|
|
|
450
479
|
module.exports = {
|
|
451
480
|
LEDGER, KINDS, WHATS, NEEDS_SOURCE, MODES, DEFAULT_MODE, WAKES, EVENTS, BUDGET, DAY, PM_WAIT_MS, SWEEP_EVERY_MS, DEFAULT_STALLED_DAYS, ID_RE, WS_RE, PROPOSAL_RE, RUN_RE,
|
|
452
|
-
stateDirOf, ledgerFile, append, readLines, newId, checkTarget, checkProposal, fold, modeOf, isPaused, openProposals, runsOnDay, admit, plan,
|
|
481
|
+
stateDirOf, ledgerFile, append, readLines, newId, checkTarget, checkProposal, checkOverlap, fold, modeOf, isPaused, openProposals, runsOnDay, admit, plan,
|
|
453
482
|
detect, sweepLines, wakesFromLedgers, answeredWakes, runOfSession, moveHeld, localDay, targetKey, wsIdOf,
|
|
454
483
|
};
|