create-pmos 0.566.0 → 0.568.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 +27 -27
- 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/scripts/workflow-state.js +20 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +26 -0
- package/workspace/guide/cli.md +3 -1
- package/workspace/guide/initiatives-and-next-steps.md +20 -1
- package/workspace/lib/autonomy.js +1 -0
- package/workspace/lib/board-premium.js +2 -0
- package/workspace/lib/engine/workflow-state.js +20 -1
- package/workspace/lib/engine/workflows.js +71 -7
- package/workspace/lib/jira-cli.js +1 -0
- package/workspace/lib/jira-tickets.js +23 -0
- package/workspace/lib/kind-control.js +232 -0
- package/workspace/lib/outcome-props.js +58 -4
- package/workspace/lib/outcomes-cli.js +7 -1
- package/workspace/lib/outcomes.js +188 -11
- package/workspace/lib/proposals.js +12 -3
- package/workspace/lib/rehearse-read.js +3 -1
- package/workspace/lib/rehearse.js +30 -2
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-boards.js +56 -8
- package/workspace/lib/routes-initiatives.js +3 -1
- package/workspace/lib/routes-kind-control.js +95 -0
- package/workspace/lib/routes-proposals.js +26 -0
- package/workspace/lib/status-signal.js +6 -2
- package/workspace/lib/vendor/scripts/workflow-state.js +20 -1
- package/workspace/lib/work-kind.js +16 -4
- package/workspace/lib/workflow-cli.js +23 -1
- package/workspace/lib/workflows-store.js +2 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-next.js +8 -0
- package/workspace/public/pm/ini-agent.js +16 -6
- package/workspace/public/pm/ini-kind.js +59 -0
- package/workspace/public/pm/ini-view.css +23 -0
- package/workspace/public/pm/ini-view.js +5 -2
- package/workspace/test-lists/kind-workflows.json +5 -0
package/workspace/package.json
CHANGED
|
@@ -37,6 +37,8 @@ const KIND_WORDS = {
|
|
|
37
37
|
const SDLC_NO_FACTORY = { build: 'PMOS writes the pull request plan for the team’s agents' };
|
|
38
38
|
const kindWords = (r, key, ctx) => { const w = r && r.kind === 'sdlc' && !(ctx && ctx.factory) ? SDLC_NO_FACTORY : KIND_WORDS[r && r.kind]; return (w && w[key]) || null; };
|
|
39
39
|
const ANCHOR = 'PMOS anchors it to a goal';
|
|
40
|
+
// a refuted outcome: the next step PMOS recommends under the ✦ (lib/outcomes.js refutedDrafts), as the PM's call
|
|
41
|
+
const NEXT_ASK = { kill: "it didn't work: stop it?", iterate: "it didn't work: one more round?", new: "it didn't work: a new experiment?" };
|
|
40
42
|
const OPEN_TK = ['In review', 'In progress', 'To do'];
|
|
41
43
|
const CLOSED = new Set(['Done', "Won't do", 'Archived']);
|
|
42
44
|
|
|
@@ -74,6 +76,12 @@ export function nextOf(r, ctx = {}) {
|
|
|
74
76
|
}
|
|
75
77
|
const key = t.key;
|
|
76
78
|
if (!key) return null;
|
|
79
|
+
// the PM answered "did it work?" (launch simulation W2): a refuted outcome asks for the next step PMOS recommends under the ✦; a
|
|
80
|
+
// validated one leaves the lessons to PMOS; can't tell yet asks nothing new
|
|
81
|
+
const oc = r.outcome;
|
|
82
|
+
if (oc && oc.verdict === 'refuted' && oc.current) return yours(NEXT_ASK[oc.next] || NEXT_ASK.iterate);
|
|
83
|
+
if (oc && oc.verdict === 'validated' && (key === 'monitor' || key === 'evaluate')) return claude('PMOS writes the lessons');
|
|
84
|
+
if (oc && oc.verdict === 'inconclusive' && (key === 'monitor' || key === 'evaluate')) return claude('PMOS reads the outcome again');
|
|
77
85
|
if (key === 'build' || key === 'deliver') {
|
|
78
86
|
const tk = t.tickets || [];
|
|
79
87
|
if (tk.length) {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* A check that is already due is Your move on Home, so nothing here repeats it.
|
|
25
25
|
* Icon-only presses carry their words in aria-label and title. */
|
|
26
26
|
import { pmGet, pmPost } from './http.js';
|
|
27
|
+
import { controlHtml } from './ini-kind.js'; // W5 (boards WfA, WfB): Project control and the kind's own gate, read with the experiment
|
|
27
28
|
|
|
28
29
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
29
30
|
const SVG = (d, w = 16, sw = 1.8) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${sw}" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
@@ -113,6 +114,7 @@ export function agentModel(A, U, id, o = {}) {
|
|
|
113
114
|
/** D107: with an experiment on record, the gate to Build is its done test and its kill condition (not the PRD and the rubric). */
|
|
114
115
|
export function gateOf(M) {
|
|
115
116
|
if (!M || !M.gate) return null;
|
|
117
|
+
if (M.gate.kind) return M.gate.kind; // W5: a Project's or a Full SDLC's own gate (kindGate)
|
|
116
118
|
return { label: 'Gate to Build', parts: [{ text: 'done test', ok: M.gate.done, ...(M.gate.done ? {} : { note: 'No done test is written yet' }) }, { text: 'kill condition', ok: M.gate.kill, ...(M.gate.kill ? {} : { note: 'No kill condition is written yet' }) }] };
|
|
117
119
|
}
|
|
118
120
|
|
|
@@ -199,13 +201,18 @@ export function comingHtml(rows, o = {}) {
|
|
|
199
201
|
/** Both sections in one holder the page can swap when the reads arrive. */
|
|
200
202
|
export function sectionsHtml(M, v, id, o = {}) {
|
|
201
203
|
const k = v && v.kind ? kindOf(v.kind) : '';
|
|
202
|
-
return `<div class="ia" data-ia="${esc(id)}"${k ? ` data-ia-kind="${k}"` : ''}>${expHtml(M, k)}${workHtml(M, o)}${comingHtml(comingUp(v, M), { all: !!o.cuAll })}</div>`;
|
|
204
|
+
return `<div class="ia" data-ia="${esc(id)}"${k ? ` data-ia-kind="${k}"` : ''}>${controlHtml(cachedControl(id), { hidden: HIDDEN })}${expHtml(M, k)}${workHtml(M, o)}${comingHtml(comingUp(v, M), { all: !!o.cuAll })}</div>`;
|
|
203
205
|
}
|
|
206
|
+
/** W5: the gate a Project or a Full SDLC initiative shows on its stage card, in place of the experiment's or the PRD's. null: Product. */
|
|
207
|
+
export function kindGate(id) { const C = cachedControl(id); return C && C.gate && C.kind && C.kind !== 'product' ? C.gate : null; }
|
|
208
|
+
const HIDDEN = new Set(); // the proposals ✕ dismissed, for this session
|
|
209
|
+
export function dismiss(key) { if (key) HIDDEN.add(key); }
|
|
204
210
|
|
|
205
211
|
/* ── the reads and the presses (the page only) ── */
|
|
206
212
|
const CACHE = new Map(), WANT = new Map(), OPEN = new Set();
|
|
207
213
|
const FRESH_MS = 30e3;
|
|
208
214
|
export const cached = (id) => (CACHE.get(id) || {}).M || null;
|
|
215
|
+
export const cachedControl = (id) => (CACHE.get(id) || {}).C || null;
|
|
209
216
|
export const allOpen = (id) => OPEN.has(id);
|
|
210
217
|
/** Read the experiment and Claude's work for one initiative, at most every 30 s; done() runs when the answer changed what shows. */
|
|
211
218
|
export function want(ws, id, done, title) {
|
|
@@ -215,16 +222,19 @@ export function want(ws, id, done, title) {
|
|
|
215
222
|
if (WANT.has(k)) return;
|
|
216
223
|
const q = ws ? 'ws=' + encodeURIComponent(ws) + '&' : '';
|
|
217
224
|
const p = Promise.all([pmGet('/api/artefacts?' + q + 'scope=' + encodeURIComponent('experiment:' + id)).catch(() => null), pmGet('/api/autonomy' + (ws ? '?ws=' + encodeURIComponent(ws) : '')).catch(() => null),
|
|
218
|
-
pmGet('/api/autonomy/ahead?' + q + 'ini=' + encodeURIComponent(id) + (title ? '&title=' + encodeURIComponent(title) : '')).catch(() => null)
|
|
219
|
-
.
|
|
225
|
+
pmGet('/api/autonomy/ahead?' + q + 'ini=' + encodeURIComponent(id) + (title ? '&title=' + encodeURIComponent(title) : '')).catch(() => null),
|
|
226
|
+
pmGet('/api/kind-control?' + q + 'ini=' + encodeURIComponent(id)).catch(() => null)])
|
|
227
|
+
.then(([a, u, h, k]) => {
|
|
220
228
|
const M = agentModel(a && a.ok ? a : null, u && u.ok ? u : null, id, { ahead: h && h.ok ? h : null });
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
229
|
+
const C = k && k.ok && k.kind !== 'product' ? k : null;
|
|
230
|
+
const was = JSON.stringify([cached(id), cachedControl(id)]);
|
|
231
|
+
CACHE.set(id, { M, C, at: Date.now() });
|
|
232
|
+
if (JSON.stringify([M, C]) !== was && done) done();
|
|
224
233
|
}).finally(() => WANT.delete(k));
|
|
225
234
|
WANT.set(k, p);
|
|
226
235
|
}
|
|
227
236
|
const forget = (id) => { const c = CACHE.get(id); if (c) c.at = 0; };
|
|
237
|
+
export { forget };
|
|
228
238
|
export function toggleMore(id) { if (OPEN.has(id)) OPEN.delete(id); else OPEN.add(id); }
|
|
229
239
|
/** Coming up's own "N more" and "Fewer", kept apart from PMOS's work. */
|
|
230
240
|
export const cuOpen = (id) => OPEN.has('cu|' + id);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* pm/ini-kind.js — the Viewer's part for a Project or a Full SDLC initiative (launch simulation W5; main canvas boards WfA and WfB, agreed by
|
|
2
|
+
* Wawan 2026-11-12). Pure: Node imports it (kind-control.test.js). pm/ini-agent.js reads GET /api/kind-control with the experiment and draws
|
|
3
|
+
* this inside the same holder, so no new pattern: the PMOS's work row shape, the one ✦ proposal with icon-only ✓ and ✕.
|
|
4
|
+
*
|
|
5
|
+
* controlHtml(C, o) → '' | the section C: the route's answer (lib/kind-control.js). o: { hidden: Set of dismissed proposal keys }
|
|
6
|
+
* proposalKey(C) → the key a ✕ hides for this session
|
|
7
|
+
*
|
|
8
|
+
* PROJECT (WfA): "On track for <date>?" first (amber on a No, with the cause), then the ✦ (move the go-live milestone to its forecast; the
|
|
9
|
+
* goal and the title stay: they are Wawan's), the critical path in one line, then each task with its colour, its owner and a bar: the
|
|
10
|
+
* outline is the baseline, the fill is now. Colour comes from dates and links, never from a status someone typed. A task that is on time
|
|
11
|
+
* and has float shows only its bar (zero is silence).
|
|
12
|
+
* FULL SDLC (WfB): nothing beyond the gate, which the stage card draws (the Experiment's Who builds line is the honest one).
|
|
13
|
+
* The kind change line ("Kind changed to Project: …") shows once, at the top. */
|
|
14
|
+
|
|
15
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
16
|
+
const SVG = (d, w = 16, sw = 1.8) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${sw}" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
17
|
+
const P = { check: 'M5 12l5 5 9-10', x: 'M6 6l12 12M18 6L6 18', path: 'M4 12h4l3-6 3 12 3-6h3', info: 'M12 8v.01M11 12h1v5h1M12 3.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 1 0 0-17' };
|
|
18
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
19
|
+
const dm = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
20
|
+
const dn = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? Date.UTC(+m[1], +m[2] - 1, +m[3]) / 864e5 : null; };
|
|
21
|
+
const RAG = { r: 'late', a: 'risk', g: 'ok', done: 'done', n: 'none' };
|
|
22
|
+
const RAG_WORDS = { r: 'Late, moves go-live', a: 'Slipping', g: 'On time', done: 'Done', n: 'No dates' };
|
|
23
|
+
|
|
24
|
+
export const proposalKey = (C) => (C && C.proposal ? C.proposal.task + '>' + C.proposal.to : '');
|
|
25
|
+
|
|
26
|
+
/** The bars: one scale for every row, from the earliest date to the latest of baseline and now. */
|
|
27
|
+
function scaleOf(rows) {
|
|
28
|
+
let lo = null, hi = null;
|
|
29
|
+
for (const r of rows) for (const x of [r.base.start, r.base.due, r.now.start, r.now.due]) { const n = dn(x); if (n == null) continue; lo = lo == null ? n : Math.min(lo, n); hi = hi == null ? n : Math.max(hi, n); }
|
|
30
|
+
return lo == null ? null : { lo, span: Math.max(1, hi - lo + 1) };
|
|
31
|
+
}
|
|
32
|
+
function barHtml(r, S) {
|
|
33
|
+
if (!S) return '';
|
|
34
|
+
const pc = (a, b) => { const s = dn(a), e = dn(b); if (s == null && e == null) return null; const x = s == null ? e : s, y = e == null ? s : e; return { l: ((x - S.lo) / S.span) * 100, w: Math.max(1.5, ((y - x + 1) / S.span) * 100) }; };
|
|
35
|
+
const b = pc(r.base.start, r.base.due), n = pc(r.now.start, r.now.due);
|
|
36
|
+
// an SVG, so the geometry is attributes, not an inline style (conformance R28-1); the colour is a class
|
|
37
|
+
const at = (g) => `x="${g.l.toFixed(2)}%" width="${g.w.toFixed(2)}%"`;
|
|
38
|
+
return `<svg class="ik-tl" aria-hidden="true" width="100%" height="16">${b ? `<rect class="bb" ${at(b)} y="1.5" height="4" rx="2"/>` : ''}${n ? `<rect class="ab ${RAG[r.rag] || 'none'}" ${at(n)} y="8" height="7" rx="3.5"/>` : ''}</svg>`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function controlHtml(C, o = {}) {
|
|
42
|
+
if (!C || !C.kind || C.kind === 'product') return '';
|
|
43
|
+
const line = C.line ? `<p class="ia-note ik-line">${esc(C.line)}</p>` : '';
|
|
44
|
+
if (C.kind !== 'project') return line ? `<section class="ia-sec ik" aria-label="Kind of work">${line}</section>` : '';
|
|
45
|
+
const T = C.ontrack || {};
|
|
46
|
+
const head = T.date ? 'On track for ' + dm(T.date) + '?' : 'On track?';
|
|
47
|
+
const card = T.answer ? `<div class="ik-card${T.answer === 'no' ? ' am' : ''}"><b>${esc(head)}</b><span>${esc(T.words || '')}</span>${T.why ? `<span>${esc(T.why)}</span>` : ''}${T.src ? `<em>${esc(T.src)}</em>` : ''}</div>` : '';
|
|
48
|
+
const hidden = o.hidden instanceof Set ? o.hidden : new Set();
|
|
49
|
+
const pk = proposalKey(C);
|
|
50
|
+
const prop = C.proposal && !hidden.has(pk) ? `<div class="ik-card pr"><b><span class="you" aria-hidden="true">✦</span> PMOS proposes</b><span>${esc(C.proposal.text)}</span>`
|
|
51
|
+
+ `<span class="ia-eb"><button type="button" class="yd-ok sm" data-ik-ok="${esc(C.proposal.task)}" data-ik-to="${esc(C.proposal.to)}" aria-label="${esc('Approve: move ' + C.proposal.title + ' to ' + dm(C.proposal.to))}" title="Approve">${SVG(P.check, 16, 2.6)}</button>`
|
|
52
|
+
+ `<button type="button" class="yd-alt sm" data-ik-no="${esc(pk)}" aria-label="Dismiss" title="Dismiss">${SVG(P.x, 16, 2)}</button></span></div>` : '';
|
|
53
|
+
const crit = C.critical && C.critical.length ? `<div class="ia-dr ik-cp"><span class="ck up" aria-hidden="true">${SVG(P.path, 12, 2.2)}</span><span><b>${esc(C.critical.join(' → '))}</b><em>Critical path: ${esc(C.critical.length + ' of ' + (C.rows || []).length)} tasks. A day lost on any of them is a day lost on go-live.</em></span></div>` : '';
|
|
54
|
+
const S = scaleOf(C.rows || []);
|
|
55
|
+
const row = (r) => `<div class="ia-dr ik-r" data-rag="${esc(r.rag)}"><span class="ik-dot ${RAG[r.rag] || 'none'}" role="img" aria-label="${esc(RAG_WORDS[r.rag] || '')}"></span><span><b${r.critical ? ' class="ik-crit"' : ''}>${esc((r.milestone ? '◇ ' : '') + r.title)}</b>`
|
|
56
|
+
+ `<em>${esc([r.owner ? r.owner + (r.ownerLinked ? '' : ' (not in People)') : 'No owner', r.critical ? 'critical path' : r.rag === 'g' ? 'has float' : '', r.rag === 'g' || r.rag === 'done' ? '' : r.words].filter(Boolean).join(' · '))}</em>${barHtml(r, S)}</span></div>`;
|
|
57
|
+
const rows = (C.rows || []).length ? `<div class="iv-folds">${C.rows.map(row).join('')}<p class="ia-note">Outline is the baseline${C.baselineAt ? ', set ' + esc(dm(C.baselineAt)) : ''}; the filled bar is now. Colour comes from dates and links, never from a status someone typed.</p></div>` : '';
|
|
58
|
+
return `<section class="ia-sec ik" aria-label="Project control" data-ik><div class="ia-th"><b>Project control</b></div>${line}${card}${prop}${crit}${rows}</section>`;
|
|
59
|
+
}
|
|
@@ -1356,3 +1356,26 @@ button.ia-xr:hover { background: var(--cz-well); }
|
|
|
1356
1356
|
.ia .yd-ok { background: var(--cz-blue); color: var(--cz-onsolid); }
|
|
1357
1357
|
.ia .yd-alt { background: var(--cz-well); color: var(--cz-ink2); }
|
|
1358
1358
|
.ia .yd-alt:disabled { opacity: .5; cursor: default; }
|
|
1359
|
+
|
|
1360
|
+
/* W5 (boards WfA, WfB): Project control — on track, the ✦, the critical path, each task's colour and baseline against now (pm/ini-kind.js) */
|
|
1361
|
+
.ik-line { padding: 0 2px 4px; }
|
|
1362
|
+
.ik-card { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--cz-hair); background: var(--cz-card); font-size: var(--fs-meta); line-height: 1.45; }
|
|
1363
|
+
.ik-card > b { font-weight: var(--fw-strong); }
|
|
1364
|
+
.ik-card em { font-style: normal; font-size: var(--fs-label); color: var(--cz-ink3); }
|
|
1365
|
+
.ik-card.am { background: var(--cz-latebg); color: var(--cz-late); border-color: transparent; }
|
|
1366
|
+
.ik-card.pr .you { color: var(--cz-blue); }
|
|
1367
|
+
.ik-card .ia-eb { margin-top: 6px; }
|
|
1368
|
+
.ik-r > span:not(.ik-dot) { flex: 1; min-width: 0; }
|
|
1369
|
+
.ik-crit { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
|
|
1370
|
+
.ik-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--cz-hair); }
|
|
1371
|
+
.ik-dot.ok { background: var(--cz-ok); }
|
|
1372
|
+
.ik-dot.risk { background: var(--cz-risk); }
|
|
1373
|
+
.ik-dot.late { background: var(--cz-late); }
|
|
1374
|
+
.ik-dot.done { background: var(--cz-ink3); }
|
|
1375
|
+
.ik-tl { display: block; margin-top: 4px; overflow: visible; }
|
|
1376
|
+
.ik-tl .bb { fill: none; stroke: var(--cz-ink3); stroke-width: 1; }
|
|
1377
|
+
.ik-tl .ab { fill: var(--cz-hair); }
|
|
1378
|
+
.ik-tl .ab.ok { fill: var(--cz-ok); }
|
|
1379
|
+
.ik-tl .ab.risk { fill: var(--cz-risk); }
|
|
1380
|
+
.ik-tl .ab.late { fill: var(--cz-late); }
|
|
1381
|
+
.ik-tl .ab.done { fill: var(--cz-ink3); }
|
|
@@ -411,7 +411,7 @@ const VIEWED = new Map(); // initiative id → the view drawn last (the ✦ in
|
|
|
411
411
|
const OPTS = new Map(); // initiative id → the options it was drawn with, so About can draw alone when its description arrives
|
|
412
412
|
export function viewHtml(v, o = {}) {
|
|
413
413
|
// agent-run (AwB): with an experiment on record the gate to Build reads its done test and kill condition (D107), not PRD and rubric
|
|
414
|
-
const AM = v && v.id ? IA.cached(v.id) : null, ag = IA.gateOf(AM);
|
|
414
|
+
const AM = v && v.id ? IA.cached(v.id) : null, ag = (v && v.id && IA.kindGate(v.id)) || IA.gateOf(AM); // W5: a Project's or Full SDLC's own gate first
|
|
415
415
|
if (ag && v.stage) v = { ...v, stage: { ...v.stage, gate: ag } };
|
|
416
416
|
if (v && v.id) { VIEWED.set(v.id, v); OPTS.set(v.id, o); }
|
|
417
417
|
// a merged initiative leads with where its work went, and draws no stage or tasks (they moved; its folds stay); an open one shows Claude's split or merge card under the summary (batch 11 item 14)
|
|
@@ -433,7 +433,7 @@ export function wireView(body, h) {
|
|
|
433
433
|
const agent = (id) => { if (id && VIEWED.has(id)) IA.want(wsOf(), id, () => paintAgent(id), (VIEWED.get(id) || {}).title); };
|
|
434
434
|
const paintAgent = (id) => {
|
|
435
435
|
if (idOf() !== id || !VIEWED.has(id)) return;
|
|
436
|
-
const v0 = VIEWED.get(id), M = IA.cached(id), g = IA.gateOf(M), v = g ? { ...v0, stage: { ...v0.stage, gate: g } } : v0;
|
|
436
|
+
const v0 = VIEWED.get(id), M = IA.cached(id), g = IA.kindGate(id) || IA.gateOf(M), v = g ? { ...v0, stage: { ...v0.stage, gate: g } } : v0;
|
|
437
437
|
VIEWED.set(id, v);
|
|
438
438
|
// replace only what changed: a node another press holds (a task card's day picker) is never swapped for an identical copy
|
|
439
439
|
const swap = (n, html) => { const t = document.createElement('template'); t.innerHTML = html; const x = t.content.firstElementChild; if (!x || !x.isEqualNode(n)) n.outerHTML = html; };
|
|
@@ -487,6 +487,9 @@ export function wireView(body, h) {
|
|
|
487
487
|
if (d.iaUndo) { e.preventDefault(); IA.undo(b, wsOf(), () => paintAgent(id), H.toast); return; }
|
|
488
488
|
if ('iaMore' in d) { e.preventDefault(); IA.toggleMore(id); paintAgent(id); return; }
|
|
489
489
|
if ('iaCumore' in d) { e.preventDefault(); IA.toggleCu(id); paintAgent(id); return; }
|
|
490
|
+
// W5 (WfA): the ✦ moves the go-live milestone to its forecast, through the same quick date change as the task row (Undo in the toast)
|
|
491
|
+
if (d.ikOk) { e.preventDefault(); if (H.dates) { H.dates(d.ikOk, { due: d.ikTo }); IA.forget(id); setTimeout(() => IA.want(wsOf(), id, () => paintAgent(id)), 400); } return; }
|
|
492
|
+
if (d.ikNo) { e.preventDefault(); IA.dismiss(d.ikNo); paintAgent(id); return; }
|
|
490
493
|
if (d.ivMc) { e.preventDefault(); const M = MD.measuresOf(id); mcToggle(id, d.ivMc, { proposal: !!(M && M.mode === 'open') }); if (H.redraw) H.redraw(); later(b, (r) => r.querySelector(`[data-iv-mc="${d.ivMc}"]`), true); return; }
|
|
491
494
|
if (d.abMore && AB.pressMore(b, H.redraw)) { e.preventDefault(); return; }
|
|
492
495
|
if (d.md && MD.press(b, { redraw: H.redraw, toast: H.toast })) { e.preventDefault(); return; }
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "launch simulation W5 (2026-11-12): the kind of work sets the default workflow and gate; Project control (colours, critical path, on track, the ✦), the Full SDLC gate, rehearse end on a Project, a Project's Jira draft as a work breakdown.",
|
|
3
|
+
"modules": ["kind-workflows.test.js"],
|
|
4
|
+
"seconds": { "kind-workflows.test.js": 4 }
|
|
5
|
+
}
|