create-pmos 0.416.0 → 0.418.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/board-programs-test.js +68 -1
- package/workspace/briefing-premium-board-test.js +21 -19
- package/workspace/changelog.json +24 -0
- package/workspace/guide/workflows.md +3 -2
- package/workspace/lib/engine/boards.js +7 -2
- package/workspace/lib/initiative-chat.js +1 -1
- package/workspace/lib/initiative-premium.js +7 -4
- package/workspace/lib/routes-boards.js +73 -4
- package/workspace/lib/task-cli.js +27 -3
- package/workspace/lib/task-items.js +5 -1
- package/workspace/lib/workflow-cli.js +9 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +9 -5
- package/workspace/public/pm/bd-acts.js +3 -2
- package/workspace/public/pm/bd-scroll.js +164 -0
- package/workspace/public/pm/bd-span.js +151 -188
- package/workspace/public/pm/bd-stages.js +3 -25
- package/workspace/public/pm/cozy-board.css +92 -71
- package/workspace/public/pm/home-app.js +2 -0
- package/workspace/public/pm/home-data.js +17 -4
- package/workspace/public/pm/home-ini-model.js +5 -1
- package/workspace/public/pm/home-ini.js +4 -2
- package/workspace/public/pm/home-list.js +3 -3
- package/workspace/public/pm/home-task.js +4 -1
- package/workspace/public/pm/ini-view-model.js +4 -2
- package/workspace/public/pm/premium-board.js +49 -38
- package/workspace/public/pm/premium-vw-item.js +5 -2
- package/workspace/public/pm/task-card.js +12 -0
- package/workspace/public/premium-board.html +3 -2
- package/workspace/server.js +3 -0
- package/workspace/task-card-test.js +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.418.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,30 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.418.0",
|
|
37
|
+
"at": "2026-10-26T01:29:44.041Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1051,
|
|
42
|
+
"t": "Seventh testing feedback batch (items 1–7)",
|
|
43
|
+
"s": "Chats PMOS ended stay on Home, the timeline's longer spans scroll like Quarter, tasks can be deleted with Undo, task rows show start and end dates, and a press on any task in the initiative page opens that task."
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"v": "0.417.0",
|
|
49
|
+
"at": "2026-10-26T01:02:52.959Z",
|
|
50
|
+
"f": 2,
|
|
51
|
+
"prs": [
|
|
52
|
+
{
|
|
53
|
+
"n": 1053,
|
|
54
|
+
"t": "Stage moves land on the stage asked for (hotfix)",
|
|
55
|
+
"s": "Pmos workflow move and Board drops land on the Product feature stage you ask for, by key, by name, or by number, even when the board merges two stages into one column."
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
35
59
|
{
|
|
36
60
|
"v": "0.416.0",
|
|
37
61
|
"at": "2026-10-26T00:23:58.708Z",
|
|
@@ -252,30 +276,6 @@
|
|
|
252
276
|
"s": "Build the uncovered features from the canvas review"
|
|
253
277
|
}
|
|
254
278
|
]
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"v": "0.398.0",
|
|
258
|
-
"at": "2026-10-23T04:45:54.728Z",
|
|
259
|
-
"f": 2,
|
|
260
|
-
"prs": [
|
|
261
|
-
{
|
|
262
|
-
"n": 1012,
|
|
263
|
-
"t": "Rebuild Home, Viewer, Board and Insights to the Agreed design",
|
|
264
|
-
"s": "Rebuild Home, Viewer, Board and Insights to the Agreed design"
|
|
265
|
-
}
|
|
266
|
-
]
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"v": "0.397.0",
|
|
270
|
-
"at": "2026-10-22T20:10:19.514Z",
|
|
271
|
-
"f": 2,
|
|
272
|
-
"prs": [
|
|
273
|
-
{
|
|
274
|
-
"n": 1011,
|
|
275
|
-
"t": "The premium pages follow the Agreed design",
|
|
276
|
-
"s": "The premium pages follow the Agreed design"
|
|
277
|
-
}
|
|
278
|
-
]
|
|
279
279
|
}
|
|
280
280
|
]
|
|
281
281
|
}
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-26T01:29:40Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-26T01:29:40Z"}
|
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-26T01:29:40Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -157,7 +157,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
157
157
|
lgd: (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '',
|
|
158
158
|
}));
|
|
159
159
|
ok('T the program row comes first, with its title and products and a thin span over its initiatives\' dates', /tg-pg/.test(t.first) && /Project Ascent/.test(t.title) && /2 products/.test(t.title) && t.span, JSON.stringify(t));
|
|
160
|
-
ok('T three milestones within a week merge into one counted diamond labelled "Pilot live +2 · Nov 18–21"', t.clu.length === 1 && /^3\|3 program milestones from Nov 18 to 21: Pilot live, Pilot users invited, Support ready/.test(t.clu[0]) && t.lab.
|
|
160
|
+
ok('T three milestones within a week merge into one counted diamond labelled "Pilot live +2 · Nov 18–21"', t.clu.length === 1 && /^3\|3 program milestones from Nov 18 to 21: Pilot live, Pilot users invited, Support ready/.test(t.clu[0]) && t.lab.includes('Pilot live +2 · Nov 18–21'), JSON.stringify(t));
|
|
161
161
|
ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Descope feature parity,Legacy IdP sunset' && t.oneLine, JSON.stringify(t));
|
|
162
162
|
ok('T a legend in the chip row names done, planned, the program milestone, Deliver or Evaluate and today', /Done in Jira/.test(t.lgd) && /Planned/.test(t.lgd) && /Program milestone/.test(t.lgd) && /Deliver or Evaluate/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
|
|
163
163
|
await p.click('#ibBody .tg-pg .tg-pgo');
|
|
@@ -169,6 +169,73 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
169
169
|
await ctx.close();
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
/* S the timeline scrolls sideways from Quarter on (feedback batch 7, timeline spans C: TsCOpen, TsCDesk, TsCEdges, TsCGrill, TsCPhone) */
|
|
173
|
+
{
|
|
174
|
+
const { ctx, page: p, errors } = await open({ view: 'time', store: { 'pmos.board.span': 'quarter' } });
|
|
175
|
+
const geo = () => p.evaluate(() => { const el = document.querySelector('#ibBody .tg-s'), sc = el.querySelector('.tg-sc'), nw = el.querySelector('.tg-h > .tg-n').getBoundingClientRect().width, vw = sc.clientWidth - nw, tw = sc.scrollWidth - nw;
|
|
176
|
+
const xOf = (ms) => ((ms - +el.dataset.from) / (+el.dataset.to - +el.dataset.from)) * tw, tx = xOf(+el.dataset.now);
|
|
177
|
+
const mid = +el.dataset.from + ((sc.scrollLeft + vw / 2) / tw) * (+el.dataset.to - +el.dataset.from);
|
|
178
|
+
const vis = (b) => !b.hidden && getComputedStyle(b).display !== 'none';
|
|
179
|
+
return { span: el.dataset.span, l: sc.scrollLeft, vw, tw, at: (tx - sc.scrollLeft) / vw, mid, back: [...el.querySelectorAll('.tg-tback')].filter(vis).map((b) => b.className), pill: !!el.querySelector('.tg-tpill'),
|
|
180
|
+
tabs: [...el.querySelectorAll('.tg-edge')].filter(vis).map((b) => b.dataset.edge + ':' + b.textContent.trim()), out: el.querySelectorAll('.tg-out').length, first: (el.querySelector('.tg-h .tg-p > span.pin') || {}).textContent || '', label: sc.getAttribute('aria-label') }; });
|
|
181
|
+
const DAY = 86400000;
|
|
182
|
+
let g = await geo();
|
|
183
|
+
ok('S Quarter opens with today a quarter of the way in, wider than the screen, the ends shaded, Today on its line', g.tw > g.vw * 1.5 && Math.abs(g.at - 0.25) < 0.03 && g.pill && !g.back.length && g.out > 0, JSON.stringify(g));
|
|
184
|
+
ok('S the first column on screen carries the year, and the scroller names its range', /2026/.test(g.first) && /^Timeline, Oct 2026 to (Nov|Dec) 2026/.test(g.label), JSON.stringify(g));
|
|
185
|
+
ok('S the next program milestone past the view waits on the right edge in the program colour', g.tabs.some((x) => /^m:Legacy IdP off · Feb ’27$/.test(x)), JSON.stringify(g.tabs));
|
|
186
|
+
await p.focus('#ibBody .tg-sc'); const l0 = g.l; await p.keyboard.press('ArrowRight'); await p.waitForTimeout(700);
|
|
187
|
+
g = await geo();
|
|
188
|
+
ok('S → moves half a screen', Math.abs(g.l - l0 - g.vw / 2) < 6, JSON.stringify({ l0, l: g.l, vw: g.vw }));
|
|
189
|
+
await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); sc.scrollLeft = sc.scrollWidth; }); await p.waitForTimeout(200);
|
|
190
|
+
g = await geo();
|
|
191
|
+
ok('S scrolled to the end: Today waits beside "Initiative" pointing back, unfinished work behind leaves its due date at the left edge', g.back.length === 1 && /\bl\b/.test(g.back[0]) && g.tabs.includes('l:Nov ’26'), JSON.stringify(g));
|
|
192
|
+
// from a place in the middle of the range (at the far end the next span's track can be shorter and stops short)
|
|
193
|
+
await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); sc.scrollLeft = (sc.scrollWidth - sc.clientWidth) / 2; }); await p.waitForTimeout(200);
|
|
194
|
+
const mid = (await geo()).mid;
|
|
195
|
+
await p.click('#bdSpans [data-sp="half"]'); await p.waitForTimeout(250);
|
|
196
|
+
g = await geo();
|
|
197
|
+
ok('S switching span keeps the date in the middle in the middle', g.span === 'half' && Math.abs(g.mid - mid) < 3 * DAY, JSON.stringify({ mid: new Date(mid), now: new Date(g.mid) }));
|
|
198
|
+
await p.click('#ibBody .tg-tback'); await p.waitForTimeout(800);
|
|
199
|
+
g = await geo();
|
|
200
|
+
ok('S the Today button scrolls back to today, a quarter of the way in, and hides', Math.abs(g.at - 0.25) < 0.03 && !g.back.length, JSON.stringify(g));
|
|
201
|
+
await p.click('#bdSpans [data-sp="y2"]'); await p.waitForTimeout(250);
|
|
202
|
+
g = await geo();
|
|
203
|
+
ok('S with today in view, a span switch keeps today in its place', g.span === 'y2' && (g.l === 0 || Math.abs(g.at - 0.25) < 0.03), JSON.stringify(g));
|
|
204
|
+
const lab2 = await p.evaluate(() => [...document.querySelectorAll('#ibBody .tg-endl, #ibBody .tg-pdl')].map((e) => e.textContent));
|
|
205
|
+
ok('S 2 yr names dates by month and year ("Nov ’26")', lab2.some((x) => /Nov ’26/.test(x)) && !lab2.some((x) => /\b[A-Z][a-z]{2} \d{1,2}\b/.test(x)), JSON.stringify(lab2));
|
|
206
|
+
await p.click('#bdSpans [data-sp="sprint"]'); await p.waitForTimeout(200);
|
|
207
|
+
await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); if (sc) sc.scrollLeft = 0; });
|
|
208
|
+
await p.click('#bdSpans [data-sp="quarter"]'); await p.waitForTimeout(250);
|
|
209
|
+
g = await geo();
|
|
210
|
+
ok('S Sprint does not scroll, and going from Sprint to Quarter opens at today', !(await p.evaluate(() => !!document.querySelector('.sp .tg-sc'))) && Math.abs(g.at - 0.25) < 0.03, JSON.stringify(g));
|
|
211
|
+
// a drag on empty track scrolls; a press on a bar still opens the initiative
|
|
212
|
+
const box = await p.evaluate(() => { const el = document.querySelector('#ibBody .tg-s'), r = el.querySelector('.tg-sc').getBoundingClientRect(), nw = el.querySelector('.tg-h > .tg-n').getBoundingClientRect().width, y = el.querySelector('.tg-pg .tg-p').getBoundingClientRect().top; return { x: r.left + nw + 40, y: y + 6 }; });
|
|
213
|
+
const l1 = (await geo()).l;
|
|
214
|
+
await p.mouse.move(box.x + 300, box.y); await p.mouse.down(); await p.mouse.move(box.x + 200, box.y, { steps: 4 }); await p.mouse.move(box.x + 100, box.y, { steps: 4 }); await p.mouse.up();
|
|
215
|
+
g = await geo();
|
|
216
|
+
ok('S a drag on empty track scrolls the timeline', Math.abs(g.l - l1 - 200) < 12, JSON.stringify({ l1, l: g.l }));
|
|
217
|
+
// Find scrolls an off-screen bar into view and tints its row (TsCEdges 4)
|
|
218
|
+
await p.evaluate(() => { document.querySelector('#ibBody .tg-sc').scrollLeft = 0; }); await p.waitForTimeout(150);
|
|
219
|
+
await p.click('#bdFind'); await p.fill('#bdQ', 'Legacy'); await p.keyboard.press('Enter'); await p.waitForTimeout(700);
|
|
220
|
+
const f = await p.evaluate(() => { const row = [...document.querySelectorAll('#ibBody .tg-r[data-row]')].find((r) => /Legacy IdP sunset/.test(r.textContent)); const sc = document.querySelector('#ibBody .tg-sc'), b = row.querySelector('.tg-bar').getBoundingClientRect(), s = sc.getBoundingClientRect(); return { tint: row.classList.contains('tint'), inView: b.right > s.left + 250 && b.left < s.right }; });
|
|
221
|
+
ok('S Find scrolls the bar into view and tints its row for a moment', f.tint && f.inView, JSON.stringify(f));
|
|
222
|
+
ok('S the scroll threw nothing', !errors.length, errors.join('\n'));
|
|
223
|
+
await ctx.close();
|
|
224
|
+
}
|
|
225
|
+
{
|
|
226
|
+
// the phone (TsCPhone, TsCPhoneSpan): the timeline is a view; the span buttons become one picker beside the product picker
|
|
227
|
+
const { ctx, page: p, errors } = await open({ view: 'time', w: 390, h: 844, store: { 'pmos.board.pview': 'time', 'pmos.board.span': 'quarter' } });
|
|
228
|
+
const ph = await p.evaluate(() => ({ spans: !document.querySelector('#bdSpans').hidden, pick: (document.querySelector('#bdSpanBtn') || {}).textContent || '', rows: [...document.querySelectorAll('#ibBody .tgq-r .tgq-n b')].map((b) => b.textContent), names: document.querySelectorAll('#ibBody .tgq-r[data-row] .tgq-n').length }));
|
|
229
|
+
ok('S phone: one span picker beside the product, no span row; each row carries its name above its bar', !ph.spans && ph.pick === 'Quarter' && ph.names === 2 && ph.rows.includes('Legacy IdP sunset'), JSON.stringify(ph));
|
|
230
|
+
await p.click('#bdSpanBtn'); await p.click('#bdSpanMenu [data-spick="year"]'); await p.waitForTimeout(200);
|
|
231
|
+
ok('S phone: the picker changes the span', await p.evaluate(() => document.querySelector('#ibBody .tg-s').dataset.span === 'year' && document.querySelector('#bdSpanBtn').textContent === 'Year' && localStorage.getItem('pmos.board.span') === 'year'));
|
|
232
|
+
await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); sc.scrollLeft = sc.scrollWidth; }); await p.waitForTimeout(200);
|
|
233
|
+
const pb = await p.evaluate(() => ({ back: [...document.querySelectorAll('#ibBody .tg-tback')].filter((b) => !b.hidden).map((b) => b.className), tabs: [...document.querySelectorAll('#ibBody .tg-edge')].filter((b) => !b.hidden).length }));
|
|
234
|
+
ok('S phone: swiped ahead, Today docks at the axis edge; only late work leaves an edge tab', pb.back.length === 1 && pb.tabs === 0, JSON.stringify(pb));
|
|
235
|
+
ok('S phone threw nothing', !errors.length, errors.join('\n'));
|
|
236
|
+
await ctx.close();
|
|
237
|
+
}
|
|
238
|
+
|
|
172
239
|
/* L List (PgList) */
|
|
173
240
|
{
|
|
174
241
|
const { ctx, page: p } = await open({ view: 'list' });
|
|
@@ -320,14 +320,13 @@ const IVREAD = () => {
|
|
|
320
320
|
await R.ctx.close();
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
-
/* B6 (premium-agreed-design B2) the timeline: plan against the Jira forecast;
|
|
323
|
+
/* B6 (premium-agreed-design B2) the timeline: plan against the Jira forecast; every span from Quarter on draws the same rows (feedback batch 7,
|
|
324
|
+
* timeline spans C: TsAllSpans); the scroll itself is checked in board-programs-test.js (T) */
|
|
324
325
|
await view(p, 'time');
|
|
325
|
-
const tl = await p.evaluate(() => ({ spans: [...document.querySelectorAll('#bdSpans button')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), shown: !document.querySelector('#bdSpans').hidden, rows: [...document.querySelectorAll('#ibBody .tg-r .tg-n.ini2 b')].map((b) => b.textContent), bars: document.querySelectorAll('#ibBody .tg-bar').length, none: (document.querySelector('.tg-none') || {}).textContent || '', ask: (document.querySelector('#askDates') || {}).href || '', hid: (document.querySelector('.tg-hid') || {}).textContent || '', lgd: (document.querySelector('.tg-lgd') || {}).textContent || '', today:
|
|
326
|
+
const tl = await p.evaluate(() => ({ spans: [...document.querySelectorAll('#bdSpans button')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), shown: !document.querySelector('#bdSpans').hidden, rows: [...document.querySelectorAll('#ibBody .tg-r .tg-n.ini2 b')].map((b) => b.textContent), bars: document.querySelectorAll('#ibBody .tg-bar').length, none: (document.querySelector('.tg-none') || {}).textContent || '', ask: (document.querySelector('#askDates') || {}).href || '', hid: (document.querySelector('.tg-hid') || {}).textContent || '', lgd: (document.querySelector('.tg-lgd') || {}).textContent || '', today: (document.querySelector('#ibBody .tg-tpill') || {}).textContent === 'Today' }));
|
|
326
327
|
ok('B6 the timeline has six spans and starts on Quarter, one row per initiative with dates; the others are named, with an ask to propose dates', tl.shown && tl.spans === 'Sprint,Quarter*,Half,Year,2 yr,5 yr' && tl.rows.length === 3 && tl.bars === 3 && /^2 have no dates: Usage-based billing, Docs search/.test(tl.none) && /\/premium\.html\?ask=board%3Aw1&q=Propose/.test(tl.ask), JSON.stringify(tl));
|
|
327
328
|
ok('B6 Monitor and Evaluate are hidden on the Quarter and the footer says how many; the legend (PgTimeline: done, planned, the Jira forecast, Deliver or Evaluate, today) and Today are drawn', tl.hid === 'Monitor and Evaluate hidden · 22' && /Done in Jira/.test(tl.lgd) && /Planned/.test(tl.lgd) && /Jira forecast/.test(tl.lgd) && /Deliver or Evaluate/.test(tl.lgd) && /Today/.test(tl.lgd) && tl.today, JSON.stringify(tl));
|
|
328
|
-
await p.
|
|
329
|
-
ok('B6 the timeline\'s first head opens "The longer the span, the higher the grouping", with the spans and the example themes', await until(() => p.evaluate(() => !document.querySelector('#popRules').hidden && /The longer the span, the higher the grouping/.test(document.querySelector('#popRules').textContent) && document.querySelectorAll('#popRules .bd-tbl4 .bd-tr').length === 5 && document.querySelectorAll('#popRules .bd-tbl3 .bd-tr').length === 5)));
|
|
330
|
-
await p.keyboard.press('Escape');
|
|
329
|
+
ok('B6 the spans help popover went with the theme grouping (TsCGrill): the first head is a plain "Initiative"', await p.evaluate(() => !document.querySelector('#popRules') && !document.querySelector('#ibBody [data-rules]') && /^Initiative/.test(document.querySelector('#ibBody .tg-h .tg-n').textContent)));
|
|
331
330
|
await p.click('#ibBody .tg-n[data-key="board:partner-rate-limits"]');
|
|
332
331
|
/* re-pointed (the one view, item 3): the timeline opens the same initiative in the Viewer as every other view. The stage card names the step
|
|
333
332
|
* over the eight; the old Plan card is the dates line (start, plan end, days left; no Jira date without a Jira forecast); the progress says
|
|
@@ -344,15 +343,14 @@ const IVREAD = () => {
|
|
|
344
343
|
ok('B6 Escape closes the menu first and leaves the Viewer open', await p.evaluate(() => document.querySelector('#bdPop').hidden) && await vwOn(p, 'Initiative'));
|
|
345
344
|
await p.keyboard.press('Escape'); await vwShut(p);
|
|
346
345
|
await spanTo(p, 'year');
|
|
347
|
-
const yr = await p.evaluate(() => ({
|
|
348
|
-
ok('B6 Year
|
|
349
|
-
await p.click('#ibBody [data-span-go="quarter"]');
|
|
350
|
-
ok('B6 "Switch to Quarter" goes back to one row per initiative', await p.evaluate(() => document.querySelector('#bdSpans [aria-pressed="true"]').dataset.sp === 'quarter' && document.querySelectorAll('#ibBody .tg-n.ini2').length === 3));
|
|
346
|
+
const yr = await p.evaluate(() => ({ rows: [...document.querySelectorAll('#ibBody .tg-q[data-span="year"] .tg-n.ini2 b')].map((b) => b.textContent), bars: document.querySelectorAll('#ibBody .tg-bar').length, themes: document.querySelectorAll('#ibBody .tg-th, #ibBody .tg-tn, #ibBody .tg-phase').length, group: !!document.querySelector('#chGroup'), lgd: !!document.querySelector('#bdChipset .tg-lgd'), jira: !!document.querySelector('#chJira'), heads: [...document.querySelectorAll('#ibBody .tg-h .tg-p > span[data-y] b')].map((b) => b.textContent) }));
|
|
347
|
+
ok('B6 Year draws Quarter\'s rows (TsAllSpans): one row per initiative with its bar, months as columns; no themes, no Group chip; the chips and the legend stay', yr.rows.join() === tl.rows.join() && yr.bars === 3 && !yr.themes && !yr.group && yr.lgd && yr.jira && yr.heads.length >= 12 && yr.heads.every((h) => /^[A-Z][a-z]{2}$/.test(h)), JSON.stringify(yr));
|
|
351
348
|
await spanTo(p, 'y5');
|
|
352
|
-
|
|
349
|
+
const y5 = await p.evaluate(() => ({ rows: document.querySelectorAll('#ibBody .tg-q[data-span="y5"] .tg-n.ini2').length, heads: [...document.querySelectorAll('#ibBody .tg-h .tg-p > span[data-y] b')].map((b) => b.textContent), dates: [...document.querySelectorAll('#ibBody .tg-endl, #ibBody .tg-lab')].map((e) => e.textContent) }));
|
|
350
|
+
ok('B6 5 yr draws the same rows with years as columns, and a date reads "Nov ’26"', y5.rows === 3 && y5.heads.length >= 5 && y5.heads.every((h) => /^\d{4}$/.test(h)) && y5.dates.some((d) => /^[A-Z][a-z]{2} ’\d\d$/.test(d)) && !y5.dates.some((d) => /\b[A-Z][a-z]{2} \d{1,2}\b/.test(d)), JSON.stringify(y5));
|
|
353
351
|
const sp = [];
|
|
354
|
-
for (const [k, sel, re] of [['sprint', '.sp[data-span="sprint"]', /Initiative and ticket.*Backlog · \d+ not in/], ['half', '.tg-
|
|
355
|
-
ok('B6 Sprint (BdSpans: tickets and the backlog row), Half
|
|
352
|
+
for (const [k, sel, re] of [['sprint', '.sp[data-span="sprint"]', /Initiative and ticket.*Backlog · \d+ not in/], ['half', '.tg-q[data-span="half"]', /Self-serve onboarding v2/], ['y2', '.tg-q[data-span="y2"]', /Self-serve onboarding v2/]]) { await spanTo(p, k); sp.push(await p.evaluate(([q2, r]) => { const e = document.querySelector('#ibBody ' + q2); return !!e && !document.querySelector('#ibBody .bd-wtag') && new RegExp(r).test(e.textContent); }, [sel, re.source])); }
|
|
353
|
+
ok('B6 Sprint (BdSpans: tickets and the backlog row), Half and 2 yr (Quarter\'s rows) are drawn, with no "Waiting for design" tag', sp.every(Boolean), JSON.stringify(sp));
|
|
356
354
|
await spanTo(p, 'quarter');
|
|
357
355
|
{
|
|
358
356
|
const f = F.facts(); f.rows = f.rows.map((r) => ({ ...r, start: null, end: null }));
|
|
@@ -421,7 +419,7 @@ const IVREAD = () => {
|
|
|
421
419
|
ok(`B13 at 390 px (${theme}) the page has no sideways scroll, the top bar is one line with "Board", the menu sits bottom right, and every control is 44 px`, !m.over && m.small.length === 0 && m.fabRight < 40 && m.top <= 56 && m.title !== 'none', JSON.stringify(m));
|
|
422
420
|
ok(`B13 at 390 px (${theme}) the chips lead with This sprint, then the Jira read time and the new asks, and end with the documents`, m.chips[0] === 'Sprint 24 only' && /^Jira \d+ days$/.test(m.chips[1]) && m.chips[2] === '1 new ask' && m.chips[m.chips.length - 1] === 'Docs 6', JSON.stringify(m.chips));
|
|
423
421
|
const pl = await q.evaluate(() => ({ groups: [...document.querySelectorAll('#ibBody .bd-ghd')].map((g) => g.textContent.replace(/\s+/g, ' ').trim()), seg: [...document.querySelectorAll('#ibBody [data-pv]')].map((b) => b.textContent + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join(), note: /Timeline needs a wider screen/.test(document.querySelector('#ibBody').textContent), small: [...document.querySelectorAll('#ibBody [data-pv], #ibBody .bd-lrow')].filter((b) => b.getBoundingClientRect().height < 44).length }));
|
|
424
|
-
ok(`B13 at 390 px (${theme}) the phone opens on the List, grouped your turn first, with List, By stage
|
|
422
|
+
ok(`B13 at 390 px (${theme}) the phone opens on the List, grouped your turn first, with List, By stage, Track and Timeline (BdPhone, TsCPhone)`, pl.groups.join('|') === 'At risk or late4|On track3' && pl.seg === 'List*,By stage,Track,Timeline' && !pl.note && pl.small === 0, JSON.stringify(pl));
|
|
425
423
|
await q.click('#bdView'); const s2 = await q.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelectorAll('#ibBody .bd-scols.ph .bd-scol').length + (((document.querySelector('#ibBody .bd-sempty') || {}).textContent || '').replace(/^Nothing on screen in /, '').match(/[A-Z][a-z]+/g) || []).length === 8);
|
|
426
424
|
ok(`B13 at 390 px (${theme}) the one view button switches to By stage, every step a column down the page (the empty steps named on one line), with no sideways scroll`, s2);
|
|
427
425
|
await q.click('#bdView'); await q.locator('#ibBody .bt-l[data-row="board:sso-partners"] .bt-nm').click();
|
|
@@ -463,13 +461,17 @@ const IVREAD = () => {
|
|
|
463
461
|
await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm'); await until(() => vwOn(q, 'Initiative')); await q.click('#czViewer [data-iv-ticket="SSO-12"]');
|
|
464
462
|
ok('T the ticket counts its subtasks from the Jira reading (the Subtasks fold: "1 of 3 done")', await until(() => q.evaluate(() => { const x = document.querySelector('#czViewer [data-czs-id="sub"]'); if (!x) return false; const t = x.textContent.replace(/\s+/g, ' '); return (x.querySelector('.czs-n') || {}).textContent === '1 of 3 done' && (x.querySelector('.czs-body') ? /1 done, 2 open/.test(t) : true) && !document.querySelector('#czViewer .seg5'); })));
|
|
465
463
|
await q.keyboard.press('Escape'); await vwShut(q);
|
|
466
|
-
/* the long spans: themes
|
|
464
|
+
/* the long spans draw Quarter's rows (timeline spans C): the trail's themes group nothing there any more, and there is no Group control */
|
|
467
465
|
await view(q, 'time'); await spanTo(q, 'year');
|
|
468
|
-
const y1 = await q.evaluate(() => ({
|
|
469
|
-
ok('T
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
await q.click('#
|
|
466
|
+
const y1 = await q.evaluate(() => ({ rows: document.querySelectorAll('#ibBody .tg-q[data-span="year"] .tg-n.ini2').length, themes: document.querySelectorAll('#ibBody .tg-tn, #ibBody .tg-sw').length, group: !!document.querySelector('#chGroup') }));
|
|
467
|
+
ok('T with the trail read, Year still draws one row per initiative: no theme groups and no Group control', y1.rows > 0 && !y1.themes && !y1.group, JSON.stringify(y1));
|
|
468
|
+
// TsSprintFilter: the sprint filter (the "Sprint N only" chip and Filter's Sprint group) shows on the Sprint span only; the stage track keeps its chip
|
|
469
|
+
const sfY = await q.evaluate(() => !document.querySelector('#bdChipset [data-f="sprint"]'));
|
|
470
|
+
await q.click('#bdFilter'); const fgY = await q.evaluate(() => [...document.querySelectorAll('#bdPop .bd-mlbl')].map((e) => e.textContent)); await q.keyboard.press('Escape');
|
|
471
|
+
await spanTo(q, 'sprint');
|
|
472
|
+
const sfS = await q.evaluate(() => !!document.querySelector('#bdChipset [data-f="sprint"]'));
|
|
473
|
+
await q.click('#bdFilter'); const fgS = await q.evaluate(() => [...document.querySelectorAll('#bdPop .bd-mlbl')].map((e) => e.textContent)); await q.keyboard.press('Escape');
|
|
474
|
+
ok('T the sprint filter shows on the Sprint span only: no chip and no Sprint group in Filter on Year, both on Sprint', sfY && !fgY.includes('Sprint') && sfS && fgS.includes('Sprint'), JSON.stringify({ sfY, fgY, sfS, fgS }));
|
|
473
475
|
await spanTo(q, 'quarter');
|
|
474
476
|
ok('T the Quarter marks a release sign-off and a dependency on the bars', await q.evaluate(() => /v2\.4 sign-off/.test(document.querySelector('#ibBody').textContent) && /after SSO for partners/.test(document.querySelector('#ibBody').textContent)));
|
|
475
477
|
await view(q, 'track');
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.418.0",
|
|
4
|
+
"at": "2026-10-26T01:29:44.041Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1051,
|
|
9
|
+
"t": "Seventh testing feedback batch (items 1–7)",
|
|
10
|
+
"s": "Chats PMOS ended stay on Home, the timeline's longer spans scroll like Quarter, tasks can be deleted with Undo, task rows show start and end dates, and a press on any task in the initiative page opens that task."
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"v": "0.417.0",
|
|
16
|
+
"at": "2026-10-26T01:02:52.959Z",
|
|
17
|
+
"f": 2,
|
|
18
|
+
"prs": [
|
|
19
|
+
{
|
|
20
|
+
"n": 1053,
|
|
21
|
+
"t": "Stage moves land on the stage asked for (hotfix)",
|
|
22
|
+
"s": "Pmos workflow move and Board drops land on the Product feature stage you ask for, by key, by name, or by number, even when the board merges two stages into one column."
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
2
26
|
{
|
|
3
27
|
"v": "0.416.0",
|
|
4
28
|
"at": "2026-10-26T00:23:58.708Z",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Workflows: the stages each kind of initiative goes through"
|
|
4
4
|
description: "Settings › Workflows: the workflow list, one numbered list of stages across To do, In progress and Done, the stage panel, Only when conditions, removing a stage in use, New workflow in the chat, and the pmos workflow commands."
|
|
5
|
-
timestamp: 2026-10-
|
|
5
|
+
timestamp: 2026-10-26
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Workflows
|
|
@@ -57,7 +57,7 @@ An agent writes a draft or a reading with these commands, and moves an initiativ
|
|
|
57
57
|
- `pmos workflow show-draft` shows the draft that is open.
|
|
58
58
|
- `pmos workflow judge --board <id> --id <initiative> --stage <key> --runs yes|no|unsure --why <reason> --cite <where>` records PMOS's reading of an Only when stage. **unsure** makes PMOS ask you. `--undo` takes a reading back.
|
|
59
59
|
- `pmos workflow of <initiative>` shows the workflow the initiative runs, its current stage, and each stage numbered as done, current or skipped. It reads the same row as the Board.
|
|
60
|
-
- `pmos workflow move <initiative> --stage <key|name>` moves the initiative to a stage of its own workflow. `--why` adds the reason. The move writes the same line as a move on the Board, under the agent's name.
|
|
60
|
+
- `pmos workflow move <initiative> --stage <key|name|number>` moves the initiative to a stage of its own workflow. A number counts from 1 in the workflow's order, so `--stage 5` is the fifth stage. `--why` adds the reason. The move writes the same line as a move on the Board, under the agent's name. On a board whose columns join two stages, such as **Build & Deliver**, the initiative still goes to the stage you name, and the joined column name means its first stage.
|
|
61
61
|
- `pmos workflow switch <initiative> --to <workflow id>` puts the initiative on another workflow. `--stage` picks the stage it lands in; without it, the stage is the one the Board's switch picks.
|
|
62
62
|
|
|
63
63
|
### Workflow stage and task state
|
|
@@ -72,5 +72,6 @@ An agent adds and closes tasks when you ask, so you do not have to find the task
|
|
|
72
72
|
- `pmos task list <initiative>` lists the initiative's open tasks (To do and In progress) with their ids. `--all` adds the Done, Won't do and Archived tasks.
|
|
73
73
|
- `pmos task state <task> [<task> …] --to <state>` sets the state of one or more tasks: To do, In progress, Done, Won't do or Archived. `--why` adds the reason, and for Done it is the evidence you read. Each change writes the same line as the page's press, under the agent's name. Won't do on a breakdown item withdraws it, and it cannot come back.
|
|
74
74
|
- `pmos task set <task> [<task> …] --stage <stage>` puts one or more tasks under a stage of the initiative's workflow, by the stage's key or name. `--stage none` takes them out of every stage. The Tasks section groups the tasks by these stages. A task's stage is its place in the plan: it does not change the task's state, and it does not move the initiative. `set` also takes `--due`, `--start`, `--owner` and `--notes`; `--due none` and `--start none` clear a day.
|
|
75
|
+
- `pmos task remove <task> [<task> …]` deletes a task that was added by mistake, such as a placeholder or a duplicate. The task goes from every list, and the Undo on the page brings it back. For work that stopped, use Archived or Won't do instead. A breakdown item cannot be deleted: set it to Won't do.
|
|
75
76
|
|
|
76
77
|
When an initiative reaches a stage, each entry of that stage's To finish list becomes one task, once. Closing that task, on the stage card, in the Tasks section or with `pmos task state`, marks the entry done on the stage card.
|
|
@@ -161,7 +161,7 @@ function foundOf(f) {
|
|
|
161
161
|
const sources = Array.isArray(f.sources) ? f.sources.filter((x) => x && typeof x.ref === 'string').slice(0, 8).map((x) => ({ label: String(x.label || ''), ref: x.ref })) : [];
|
|
162
162
|
return { why: typeof f.why === 'string' ? f.why : '', sources, match: typeof f.match === 'string' && f.match ? f.match : null, scan: typeof f.scan === 'string' ? f.scan : null, run: typeof f.run === 'string' ? f.run : null };
|
|
163
163
|
}
|
|
164
|
-
const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept', 'ask-decline', 'ask-more', 'ini-workflow', 'task', 'task-update', 'task-remove', 'ticket-note', 'ini-epics', 'ini-archive', 'ini-notdup', 'ini-wf', 'ini-end', 'stage-judge', 'ini-auto', 'task-section']);
|
|
164
|
+
const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept', 'ask-decline', 'ask-more', 'ini-workflow', 'task', 'task-update', 'task-remove', 'task-restore', 'ticket-note', 'ini-epics', 'ini-archive', 'ini-notdup', 'ini-wf', 'ini-end', 'stage-judge', 'ini-auto', 'task-section']);
|
|
165
165
|
// A task's state is its only stage (Wawan, 2026-10-25): the same five every workflow ends in. An old 'In review' reads as In progress (taskState).
|
|
166
166
|
const TASK_STATES = Object.freeze(['To do', 'In progress', 'Done', "Won't do", 'Archived']);
|
|
167
167
|
const taskState = (s) => (s === 'In review' ? 'In progress' : TASK_STATES.includes(s) ? s : null);
|
|
@@ -191,6 +191,7 @@ function fold(events) {
|
|
|
191
191
|
const iniWorkflows = new Map(); // key(board, id) → { template, stages } (the initiative's own workflow)
|
|
192
192
|
const tasks = new Map(); // task id → { id, board, initiative, title, epic, owner, state, start, due, at, by, history }
|
|
193
193
|
const sections = new Map(); // task id → the stage key its breakdown section is ('' = Not in a stage); the last task-section line wins
|
|
194
|
+
const removed = new Map(); // task id → the task a task-remove took out, so a task-restore (Delete's Undo) puts it back
|
|
194
195
|
const ticketNotes = new Map(); // key(board, Jira key) → the PM's notes on that ticket (the last ticket-note line wins)
|
|
195
196
|
const epics = new Map(); // initiative id → the Jira epic keys the PM linked to it (the last ini-epics line wins)
|
|
196
197
|
const archives = new Map(); // initiative id → { at, by, reason, into, moved } while archived (an `archived: false` line restores it)
|
|
@@ -277,7 +278,11 @@ function fold(events) {
|
|
|
277
278
|
} else if (e.kind === 'ticket-note' && b && typeof e.ref === 'string' && typeof e.notes === 'string') {
|
|
278
279
|
if (e.notes) ticketNotes.set(key(b, e.ref), e.notes); else ticketNotes.delete(key(b, e.ref));
|
|
279
280
|
} else if (e.kind === 'task-remove' && typeof e.task === 'string' && tasks.has(e.task)) {
|
|
280
|
-
|
|
281
|
+
removed.set(e.task, tasks.get(e.task));
|
|
282
|
+
tasks.delete(e.task); // the Undo of a task just added (routes-boards.js tasks/undo-add), or the PM's Delete (tasks/delete, pmos task remove)
|
|
283
|
+
} else if (e.kind === 'task-restore' && typeof e.task === 'string' && removed.has(e.task) && !tasks.has(e.task)) {
|
|
284
|
+
tasks.set(e.task, removed.get(e.task)); // Delete's Undo (batch 7 item 5)
|
|
285
|
+
removed.delete(e.task);
|
|
281
286
|
} else if (e.kind === 'ini-epics' && typeof e.id === 'string' && Array.isArray(e.epics)) {
|
|
282
287
|
epics.set(e.id, e.epics.filter((k) => typeof k === 'string' && JIRA_KEY_RE.test(k)).map((k) => k.toUpperCase()));
|
|
283
288
|
} else if (e.kind === 'ini-archive' && typeof e.id === 'string') {
|
|
@@ -41,7 +41,7 @@ function rule(info, id) {
|
|
|
41
41
|
`The workflow stage is on the initiative: the stage card and the Board show it. \`pmos workflow of ${ini}\` reads it. When the PM asks to move the initiative, run \`pmos workflow move ${ini} --stage <key> --why "<reason>"\`. When the PM asks to change its workflow, run \`pmos workflow switch ${ini} --to <workflow id>\`. Both write what the page's press writes, under your name.`,
|
|
42
42
|
'There is one kind of task: the ones the PM sees in the initiative\'s Tasks section. The stage card\'s To finish entries and the older breakdown items are tasks too. '
|
|
43
43
|
+ 'A task\'s state is To do, In progress, Done, Won\'t do or Archived. The Tasks section groups the tasks under the stages of this initiative\'s workflow: a task\'s group is its place in the breakdown, never its state. When the PM asks to add, close, group or change a task, '
|
|
44
|
-
+ `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
|
|
44
|
+
+ `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). \`pmos task remove <task> [<task> …]\` deletes a task added by mistake when the PM asks; work that stopped is Archived instead. Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
|
|
45
45
|
);
|
|
46
46
|
return out;
|
|
47
47
|
}
|
|
@@ -47,13 +47,15 @@ function build(f) {
|
|
|
47
47
|
if (!f.ladder && !missing.includes('workflow steps')) missing.push('workflow steps');
|
|
48
48
|
// D99: the stages are the initiative's own workflow (row.wfStages, routes-boards workflowRowOf): the strip and the phase read them, and on a
|
|
49
49
|
// library workflow so does a move (bug 2026-10-25: a Tender initiative offered the old board stages Discover, Plan, Build & Deliver,
|
|
50
|
-
// Monitor & Evaluate).
|
|
50
|
+
// Monitor & Evaluate). Tasks have no stage.
|
|
51
51
|
const boardWf = (row.workflow && row.workflow.length ? row.workflow : board.workflow) || [];
|
|
52
52
|
const own = Array.isArray(row.wfStages) && row.wfStages.length && row.wfStage ? row.wfStages.filter((s) => s.status !== 'skipped' || s.key === row.wfStage.key) : null;
|
|
53
53
|
const ownWf = !!(own && row.wf && row.wf.id && row.wf.id !== 'product-feature');
|
|
54
54
|
const names = own ? own.map((s) => s.name) : boardWf.map((s) => s.name);
|
|
55
55
|
const cur = own ? own.findIndex((s) => s.key === row.wfStage.key) : names.indexOf(row.stage);
|
|
56
|
-
|
|
56
|
+
// batch 7 item 4: Product feature moves name its eight stages too, never an older board's merged columns (Build & Deliver); POST
|
|
57
|
+
// /api/boards/move pins the initiative to the stage a column does not name
|
|
58
|
+
const moveNames = names;
|
|
57
59
|
const id = row.id || '';
|
|
58
60
|
const key = 'init:' + id;
|
|
59
61
|
|
|
@@ -91,7 +93,8 @@ function build(f) {
|
|
|
91
93
|
|
|
92
94
|
// ── tasks: PRD requirements (no result per requirement) and the board's items: its Board tasks, the initiative's breakdown items and its
|
|
93
95
|
// stage's To finish tasks are one kind of task (feedback batch 5, lib/task-items.js), Jira rows are read-only ──
|
|
94
|
-
|
|
96
|
+
// every task the page draws (batch 7 item 7): a cap here left the 61st and later tasks with no editor, so a press fell back to the old list
|
|
97
|
+
const items = (f.items || []).filter((t) => t && t.ini === id);
|
|
95
98
|
const tracker = items.map((t, n) => ({ key: 'task:' + (t.uid || t.key || n), uid: t.uid || '', pmos: t.src === 'pmos', ref: t.key || t.ref || '', title: clip(t.title, 160), state: t.status || 'To do', src: t.src === 'jira' ? 'Jira (read-only)' : 'PMOS task', owner: t.owner || '', start: t.start || '', end: t.end || '', blocked: !!t.blocked, kind: t.kind || 'Task', notes: t.notes || '', readAt: t.readAt || '',
|
|
96
99
|
...(t.from ? { from: { stage: t.from.stage, finish: t.from.finish } } : {}), ...(t.store === 'item' ? { store: 'item' } : {}) }));
|
|
97
100
|
const dv = sheet && sheet.derived;
|
|
@@ -155,7 +158,7 @@ function build(f) {
|
|
|
155
158
|
id, key, title: clip(row.title || id, 160), lane: row.lane || '', anchor: row.anchor || '',
|
|
156
159
|
// the bar's presses (initiative premium-board-actions): the workflow, the lifecycle and the archive entry the row holds
|
|
157
160
|
acts: {
|
|
158
|
-
self: !!board.self, stages: moveNames, stage: (
|
|
161
|
+
self: !!board.self, stages: moveNames, stage: (own ? names[cur] : row.stage) || null,
|
|
159
162
|
life: status === 'on hold' ? 'hold' : status === 'cancelled' ? 'cancelled' : null,
|
|
160
163
|
reason: (status === 'on hold' || status === 'cancelled') && row.stopped ? clip(row.stopped.reason || '', 300) : '',
|
|
161
164
|
back: status === 'on hold' && row.stopped && row.stopped.back ? shortDate(row.stopped.back) : '', backDay: status === 'on hold' && row.stopped && row.stopped.back ? String(row.stopped.back).slice(0, 10) : null,
|
|
@@ -291,6 +291,14 @@ function epicsOf(base, folded) {
|
|
|
291
291
|
/** D99: the workflow an initiative runs and where it stands in it. Product feature unless an ini-wf line set another (the PMOS-self
|
|
292
292
|
* board always runs Product feature, derived). Answers { wf, stage (key), stages (WF.stagesOf), ended }. The ONE place every surface
|
|
293
293
|
* (Board, track, stage card, Viewer, program milestones) gets an initiative's stages from. */
|
|
294
|
+
/** The stage an older board's merged column ("Build & Deliver", "Monitor & Evaluate") names on wf: `prefer` when it is one of its parts,
|
|
295
|
+
* else the first part, else null. */
|
|
296
|
+
function mergedStage(wf, name, prefer) {
|
|
297
|
+
const parts = String(name || '').split(/\s*(?:&|\/|\band\b)\s*/i).filter(Boolean);
|
|
298
|
+
if (parts.length < 2) return null;
|
|
299
|
+
const st = parts.map((x) => WF.stageByRef(wf, x)).filter(Boolean);
|
|
300
|
+
return st.length ? (prefer && st.some((x) => x.key === prefer.key) ? prefer : st[0]) : null;
|
|
301
|
+
}
|
|
294
302
|
function workflowRowOf(board, base, folded, lib, legacyStage) {
|
|
295
303
|
const k = B.key(board.id, base.id);
|
|
296
304
|
const own = !(board && board.self) && folded && folded.iniWf ? folded.iniWf.get(k) : null;
|
|
@@ -301,7 +309,10 @@ function workflowRowOf(board, base, folded, lib, legacyStage) {
|
|
|
301
309
|
cur = (WF.stageByRef(wf, moved) || wf.stages[0]).key;
|
|
302
310
|
} else {
|
|
303
311
|
const byName = WF.stageByRef(wf, legacyStage);
|
|
304
|
-
|
|
312
|
+
const read = WF.stageByRef(wf, base.reading);
|
|
313
|
+
// an older board's merged column ("Build & Deliver") names two stages: the reading when it is one of them, else the first (batch 7 item 2;
|
|
314
|
+
// it fell back to the reading, so a move to Build & Deliver showed Triage)
|
|
315
|
+
cur = (byName || mergedStage(wf, legacyStage, read) || read || wf.stages[0]).key;
|
|
305
316
|
}
|
|
306
317
|
const judged = (folded && folded.judged && folded.judged.get(k)) || {};
|
|
307
318
|
const auto = (folded && folded.autoOver && folded.autoOver.get(k)) || {};
|
|
@@ -456,6 +467,7 @@ function itemsOf(w, fr, board, rows) {
|
|
|
456
467
|
const ids = new Set(rows.map((x) => x.id));
|
|
457
468
|
const out = [];
|
|
458
469
|
const jiraKeys = new Set();
|
|
470
|
+
let planOf = null;
|
|
459
471
|
if (board.build) {
|
|
460
472
|
for (const row of rows) {
|
|
461
473
|
let d = null;
|
|
@@ -473,8 +485,10 @@ function itemsOf(w, fr, board, rows) {
|
|
|
473
485
|
for (const t of d.tickets || []) {
|
|
474
486
|
if (!t.jira || jiraKeys.has(t.jira)) continue;
|
|
475
487
|
const rd = reading(t.jira);
|
|
488
|
+
// the breakdown item the ticket was drafted from keeps the plan's days: the row shows them (batch 7 item 6; it showed none). Jira owns the assignee
|
|
489
|
+
const it = (planOf || (planOf = TI.itemsById(w.root)))[t.id] || null;
|
|
476
490
|
out.push({ uid: t.jira, key: t.jira, kind: ['Story', 'Task', 'Bug'].includes(t.type) ? t.type : 'Task', src: 'jira', title: (rd && rd.summary) || t.summary || t.jira,
|
|
477
|
-
status: B.itemStatus(rd && rd.status, rd && rd.category), blocked: !!(rd && rd.flagged), owner: null, ini: row.id, epic: epicKey, start: null, end: null, ref: null, board: board.id, readAt: (snap && snap.fetchedAt) || null });
|
|
491
|
+
status: B.itemStatus(rd && rd.status, rd && rd.category), blocked: !!(rd && rd.flagged), owner: null, ini: row.id, epic: epicKey, start: (it && it.start) || null, end: (it && it.due) || null, ref: null, board: board.id, readAt: (snap && snap.fetchedAt) || null });
|
|
478
492
|
jiraKeys.add(t.jira);
|
|
479
493
|
}
|
|
480
494
|
}
|
|
@@ -723,7 +737,8 @@ function moveOnWorkflow(ctx, res, body, g, p, own) {
|
|
|
723
737
|
if (body.why != null && (typeof body.why !== 'string' || body.why.length > 500)) return fail(ctx, res, 400, 'why is text of at most 500 characters');
|
|
724
738
|
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
725
739
|
const wf = WF.resolve(libOf(p.fr.folded), own.wf);
|
|
726
|
-
|
|
740
|
+
// a Product feature initiative pinned by a move (moveToProductStage) is still dragged to the board's merged columns ("Build & Deliver")
|
|
741
|
+
const t = WF.stageByRef(wf, body.to) || (wf.id === WF.PRODUCT_FEATURE_ID ? mergedStage(wf, body.to) : null);
|
|
727
742
|
if (!t) return fail(ctx, res, 400, `"${body.to}" is not a stage of ${wf.name} (${wf.stages.map((s) => s.name).join(', ')})`);
|
|
728
743
|
const base = needRows(ctx, res, p.w);
|
|
729
744
|
if (!base) return;
|
|
@@ -740,6 +755,29 @@ function moveOnWorkflow(ctx, res, body, g, p, own) {
|
|
|
740
755
|
ctx.json(res, { ok: true, row, warnings, ...(made ? { tasksMade: made } : {}) });
|
|
741
756
|
}
|
|
742
757
|
|
|
758
|
+
/** A move of a Product feature initiative to one of its eight stages (pf) that the board has no column for: an ini-wf line pins it to
|
|
759
|
+
* Product feature at that stage, the same line a workflow switch writes, so every surface reads the stage from it (batch 7 item 2). */
|
|
760
|
+
function moveToProductStage(ctx, res, body, g, p, pf) {
|
|
761
|
+
if (body.why != null && (typeof body.why !== 'string' || body.why.length > 500)) return fail(ctx, res, 400, 'why is text of at most 500 characters');
|
|
762
|
+
if (typeof body.id !== 'string' || !body.id) return fail(ctx, res, 400, 'id is required');
|
|
763
|
+
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
764
|
+
const base = needRows(ctx, res, p.w);
|
|
765
|
+
if (!base) return;
|
|
766
|
+
const b0 = base.find((r) => r.id === body.id);
|
|
767
|
+
if (!b0 || boardIdOf(b0, p.fr.boards, p.fr.folded, p.w) !== p.board.id) return fail(ctx, res, 404, `no initiative ${body.id} on this board`);
|
|
768
|
+
const before = boardRow(p.board, b0, p.fr.folded);
|
|
769
|
+
if (before.wf && before.wf.id !== WF.PRODUCT_FEATURE_ID) return fail(ctx, res, 400, `"${body.to}" is not a stage of ${before.wf.name}`);
|
|
770
|
+
const wf = WF.PRODUCT_FEATURE;
|
|
771
|
+
const a = wf.stages.findIndex((s) => s.key === before.wfStage.key), b = wf.stages.findIndex((s) => s.key === pf.key);
|
|
772
|
+
const warnings = [];
|
|
773
|
+
for (let i = a + 1; i < b; i++) { const sk = before.wfStages[i]; if (sk && sk.status !== 'skipped' && (!sk.when || sk.when.mode !== 'optional')) warnings.push('Skipped ' + sk.name); }
|
|
774
|
+
if (!before.anchor) warnings.push('No anchor');
|
|
775
|
+
append(p.file, g.actor, { kind: 'ini-wf', board: p.board.id, id: body.id, wf: wf.id, from: wf.id, moved: { from: before.wfStage.key, to: pf.key }, why: body.why ? String(body.why).trim() : '' });
|
|
776
|
+
const f1 = foldOf(ctx, p.w), row = boardRow(p.board, b0, f1);
|
|
777
|
+
const made = stageTasks(p.file, f1, p.board, row, g.actor.by);
|
|
778
|
+
ctx.json(res, { ok: true, row, warnings, ...(made ? { tasksMade: made } : {}) });
|
|
779
|
+
}
|
|
780
|
+
|
|
743
781
|
/** A breakdown item named as a task (lib/task-items.js), when its initiative is on this board; answers and returns null when not. */
|
|
744
782
|
function itemOnBoard(ctx, res, p, id) {
|
|
745
783
|
const it = TI.isItemId(id) ? TI.itemOf(p.w.root, id) : null;
|
|
@@ -812,6 +850,10 @@ const WRITES = {
|
|
|
812
850
|
const own = typeof body.id === 'string' && p.fr.folded.iniWf ? p.fr.folded.iniWf.get(B.key(p.board.id, body.id)) : null;
|
|
813
851
|
if (own) return moveOnWorkflow(ctx, res, body, g, p, own);
|
|
814
852
|
const wfOwn = typeof body.id === 'string' ? B.workflowOf(p.board, body.id, p.fr.folded) : p.board.workflow;
|
|
853
|
+
// batch 7 item 2: an initiative on Product feature shows its eight stages, but an older board's columns merge them ("Build & Deliver").
|
|
854
|
+
// A Product feature stage that is not a column pins the initiative to Product feature at that stage, so it lands where it was sent.
|
|
855
|
+
const pf = typeof body.to === 'string' && !wfOwn.some((s) => s.name === body.to) ? WF.stageByRef(WF.PRODUCT_FEATURE, body.to) : null;
|
|
856
|
+
if (pf) return moveToProductStage(ctx, res, body, g, p, pf);
|
|
815
857
|
if (typeof body.to !== 'string' || !wfOwn.some((s) => s.name === body.to)) {
|
|
816
858
|
return fail(ctx, res, 400, `"${body.to}" is not a stage of this ${wfOwn === p.board.workflow ? 'board' : 'initiative'}'s workflow (${wfOwn.map((s) => s.name).join(', ')})`);
|
|
817
859
|
}
|
|
@@ -1073,6 +1115,30 @@ const WRITES = {
|
|
|
1073
1115
|
append(p.file, g.actor, { kind: 'task-remove', board: p.board.id, task: t.id, why: 'undo of add' });
|
|
1074
1116
|
ctx.json(res, { ok: true });
|
|
1075
1117
|
},
|
|
1118
|
+
'/api/boards/tasks/delete': (ctx, res, body, g) => {
|
|
1119
|
+
// a task added by mistake (batch 7 item 5): the task-remove line takes it out everywhere; tasks/restore is its Undo. Archived stays for
|
|
1120
|
+
// work that stopped. A breakdown item is withdrawn (Won't do), never deleted.
|
|
1121
|
+
const p = postFrame(ctx, res, body);
|
|
1122
|
+
if (!p) return;
|
|
1123
|
+
if (TI.isItemId(body.task)) return fail(ctx, res, 409, `${body.task} is a breakdown item: set it to Won't do instead`);
|
|
1124
|
+
const t = B.taskOf(p.fr.folded, body.task);
|
|
1125
|
+
if (!t || t.board !== p.board.id) return fail(ctx, res, 404, `no PMOS task ${body.task} on this board`);
|
|
1126
|
+
if (body.why != null && (typeof body.why !== 'string' || body.why.length > 500)) return fail(ctx, res, 400, 'why is text of at most 500 characters');
|
|
1127
|
+
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
1128
|
+
append(p.file, g.actor, { kind: 'task-remove', board: p.board.id, task: t.id, why: body.why ? String(body.why).trim() : 'deleted' });
|
|
1129
|
+
ctx.json(res, { ok: true, task: t.id, title: t.title });
|
|
1130
|
+
},
|
|
1131
|
+
'/api/boards/tasks/restore': (ctx, res, body, g) => {
|
|
1132
|
+
const p = postFrame(ctx, res, body);
|
|
1133
|
+
if (!p) return;
|
|
1134
|
+
if (typeof body.task !== 'string' || !body.task) return fail(ctx, res, 400, 'task is required');
|
|
1135
|
+
if (B.taskOf(p.fr.folded, body.task)) return fail(ctx, res, 409, `${body.task} is not deleted`);
|
|
1136
|
+
const ev = [...p.fr.folded.events].reverse().find((e) => e.kind === 'task-remove' && e.task === body.task);
|
|
1137
|
+
if (!ev || ev.board !== p.board.id) return fail(ctx, res, 404, `no deleted task ${body.task} on this board`);
|
|
1138
|
+
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
1139
|
+
append(p.file, g.actor, { kind: 'task-restore', board: p.board.id, task: body.task });
|
|
1140
|
+
ctx.json(res, { ok: true, task: body.task });
|
|
1141
|
+
},
|
|
1076
1142
|
'/api/boards/tasks/rename': (ctx, res, body, g) => {
|
|
1077
1143
|
// tap the title to rename it (canvas RnATask): only the title changes; Undo is the same press with the old name
|
|
1078
1144
|
const p = postFrame(ctx, res, body);
|
|
@@ -1313,6 +1379,9 @@ function taskState(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/state'
|
|
|
1313
1379
|
function taskAdd(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/add', body, g); }
|
|
1314
1380
|
/** A task's edit, by the same function as the Viewer's (POST /api/boards/tasks/edit; `pmos task set`). body: { ws, board, task, section?, start?, due?, owner?, notes? }. */
|
|
1315
1381
|
function taskEdit(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/edit', body, g); }
|
|
1382
|
+
/** Delete a task added by mistake, and its Undo (POST /api/boards/tasks/delete|restore; `pmos task remove`; batch 7 item 5). */
|
|
1383
|
+
function taskDelete(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/delete', body, g); }
|
|
1384
|
+
function taskRestore(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/restore', body, g); }
|
|
1316
1385
|
|
|
1317
1386
|
/** The workflow one initiative runs and where it stands in it, as the Board's row has it (boardRow: wf, wfStage, wfStages, ended), with the
|
|
1318
1387
|
* board it is on. For `pmos workflow of|move|switch` and the initiative chat's opening (bug 2026-10-25: an agent that could not see the
|
|
@@ -1400,4 +1469,4 @@ function meetingBoards(ctx) {
|
|
|
1400
1469
|
return { list, detail };
|
|
1401
1470
|
}
|
|
1402
1471
|
|
|
1403
|
-
module.exports = { prefixes: ['/api/boards'], handle, move, switchWorkflow, taskState, taskAdd, taskEdit, initiativeWorkflow, seedInitiative, stageTasks, itemsOf, boardIndex, appendScanAsk, scanDeclineSignal, createAndPlace, ledgerFile, append, frameFor, boardIdOf, meetingBoards, boardsOf, baseRows, boardRow, workflowRowOf, foldOf, portfolio, SELF_REFUSAL, NO_STATE };
|
|
1472
|
+
module.exports = { prefixes: ['/api/boards'], handle, move, switchWorkflow, taskState, taskAdd, taskEdit, taskDelete, taskRestore, initiativeWorkflow, seedInitiative, stageTasks, itemsOf, boardIndex, appendScanAsk, scanDeclineSignal, createAndPlace, ledgerFile, append, frameFor, boardIdOf, meetingBoards, boardsOf, baseRows, boardRow, workflowRowOf, foldOf, portfolio, SELF_REFUSAL, NO_STATE };
|