create-pmos 0.410.0 → 0.412.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 -30
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +2 -2
- package/workspace/briefing-premium-initiative-test.js +9 -15
- package/workspace/briefing-premium-insights-test.js +2 -2
- package/workspace/briefing-premium-test.js +3 -3
- package/workspace/changelog.json +24 -0
- package/workspace/chat-asks-test.js +146 -0
- package/workspace/guide/board.md +1 -1
- package/workspace/guide/breakdown.md +6 -13
- package/workspace/guide/briefing-premium.md +1 -1
- package/workspace/guide/home.md +24 -0
- package/workspace/guide/index.md +1 -1
- package/workspace/guide/initiative-driver.md +1 -1
- package/workspace/guide/initiatives-screen.md +1 -1
- package/workspace/guide/pm-only-acts.md +23 -24
- package/workspace/guide/today.md +1 -1
- package/workspace/home-rows-test.js +149 -56
- package/workspace/ini-workflow-test.js +4 -4
- package/workspace/lib/briefing-premium-agent.js +8 -1
- package/workspace/lib/briefing-premium-writes.js +5 -4
- package/workspace/lib/coredoc-cli.js +1 -1
- package/workspace/lib/driver-cli.js +2 -1
- package/workspace/lib/driver-decide.js +3 -2
- package/workspace/lib/driver.js +2 -1
- package/workspace/lib/engine/boards.js +3 -1
- package/workspace/lib/goal-chat.js +94 -30
- package/workspace/lib/grant-mint.js +3 -2
- package/workspace/lib/initiative-cli.js +9 -9
- package/workspace/lib/issues.js +5 -4
- package/workspace/lib/mention-cli.js +70 -0
- package/workspace/lib/mention-store.js +307 -0
- package/workspace/lib/people-store.js +1 -1
- package/workspace/lib/people.js +3 -1
- package/workspace/lib/placements.js +13 -15
- package/workspace/lib/plan-items.js +17 -48
- package/workspace/lib/pm-guard.js +18 -5
- package/workspace/lib/pm-lines-needs.js +9 -5
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/report-cli.js +2 -2
- package/workspace/lib/routes-board-metric-targets.js +0 -1
- package/workspace/lib/routes-boards.js +12 -0
- package/workspace/lib/routes-briefing-premium.js +5 -7
- package/workspace/lib/routes-core-docs.js +0 -1
- package/workspace/lib/routes-custom-docs.js +0 -1
- package/workspace/lib/routes-driver.js +0 -1
- package/workspace/lib/routes-home-desk.js +1 -1
- package/workspace/lib/routes-home-review.js +1 -1
- package/workspace/lib/routes-initiative-layout.js +1 -1
- package/workspace/lib/routes-insights-records.js +0 -1
- package/workspace/lib/routes-meeting-material.js +0 -1
- package/workspace/lib/routes-mentions.js +62 -9
- package/workspace/lib/routes-onboarding.js +3 -1
- package/workspace/lib/routes-orchestrator.js +0 -1
- package/workspace/lib/routes-premium-charts.js +0 -1
- package/workspace/lib/routes-premium-dashboards.js +0 -1
- package/workspace/lib/routes-programs.js +1 -1
- package/workspace/lib/routes-records.js +1 -1
- package/workspace/lib/routes-report-design.js +7 -3
- package/workspace/lib/routes-report-setups.js +0 -1
- package/workspace/lib/routes-report-structure.js +0 -1
- package/workspace/lib/routes-runs.js +2 -5
- package/workspace/lib/routes-scan.js +0 -1
- package/workspace/lib/routes-sources.js +1 -1
- package/workspace/lib/run-answers.js +14 -5
- package/workspace/lib/scan-cli.js +2 -1
- package/workspace/lib/scan.js +2 -1
- package/workspace/lib/session-files.js +132 -0
- package/workspace/lib/session-name.js +103 -0
- package/workspace/lib/source-reads.js +4 -1
- package/workspace/lib/vendor/scripts/onboarding/proposals.js +7 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +10 -8
- package/workspace/premium-chat-goal-setup-test.js +203 -0
- package/workspace/premium-chat-goal-view-test.js +28 -23
- package/workspace/premium-chat-line-test.js +189 -0
- package/workspace/premium-core-doc-issue-test.js +1 -1
- package/workspace/premium-viewer-share-test.js +5 -2
- package/workspace/premium-vw-backlog-test.js +1 -1
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-vw-jira-test.js +1 -1
- package/workspace/public/pm/chat-ask.js +17 -9
- package/workspace/public/pm/cozy-home-rows.css +39 -1
- package/workspace/public/pm/cozy-home.css +112 -12
- package/workspace/public/pm/cozy-search.js +2 -1
- package/workspace/public/pm/cozy-steps.css +69 -0
- package/workspace/public/pm/cozy-steps.js +90 -0
- package/workspace/public/pm/goal-chat.js +141 -23
- package/workspace/public/pm/home-app.js +68 -35
- package/workspace/public/pm/home-ask.js +121 -0
- package/workspace/public/pm/home-chat.js +120 -68
- package/workspace/public/pm/home-data.js +10 -2
- package/workspace/public/pm/home-goal.js +159 -0
- package/workspace/public/pm/home-ini.css +35 -0
- package/workspace/public/pm/home-ini.js +50 -19
- package/workspace/public/pm/home-line.css +59 -0
- package/workspace/public/pm/home-line.js +200 -0
- package/workspace/public/pm/home-list.js +2 -2
- package/workspace/public/pm/home-mentions.js +303 -111
- package/workspace/public/pm/home-ses-name.js +65 -0
- package/workspace/public/pm/home-stage-card.js +94 -0
- package/workspace/public/pm/home-sweep.js +112 -0
- package/workspace/public/pm/home-today.js +7 -2
- package/workspace/public/pm/premium-initiative-head.js +8 -4
- package/workspace/public/pm/rename-press.js +24 -0
- package/workspace/public/pm/wf-page.css +3 -0
- package/workspace/public/pm/wf-page.js +2 -1
- package/workspace/public/premium-workflows.html +1 -0
- package/workspace/replaced-tests.json +101 -0
- package/workspace/server.js +133 -20
- package/workspace/session-names-test.js +144 -0
- package/workspace/skills/jira-push.skill +1 -0
- package/workspace/skills/morning-brief.skill +2 -1
- package/workspace/skills/report-daily.skill +1 -0
- package/workspace/skills/report-monthly.skill +1 -0
- package/workspace/skills/report-weekly.skill +1 -0
- package/workspace/skills/sources-read.skill +3 -2
- package/workspace/stage-card-test.js +203 -0
- package/workspace/test-lists/chat-asks.json +13 -0
- package/workspace/test-lists/chat-progress.json +13 -0
- package/workspace/test-lists/mentions-a-plus.json +9 -0
- package/workspace/test-lists/premium-chat-goal-setup.json +9 -0
- package/workspace/test-lists/session-files.json +5 -0
- package/workspace/test-lists/session-names.json +13 -0
- package/workspace/test-lists/stage-card.json +6 -0
- package/workspace/tk-tasks-test.js +1 -1
- package/workspace/workflows-setup-test.js +17 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* pm/home-stage-card.js — the initiative's stage card as a live step list (agreed stage card D: canvas XscD on the phone, XscDDesk in the
|
|
2
|
+
* desktop Viewer). Pure: it reads headModel (premium-initiative-head.js) and the move model (home-ini-model.js moveModel) and returns
|
|
3
|
+
* markup; home-app.js draws it on the initiative's page and home-ini.js wires the presses. A node test imports it.
|
|
4
|
+
*
|
|
5
|
+
* Top to bottom: the stage, "N of M done" and the clock "N of ~usual days" (amber when over; just the days with no usual time; nothing
|
|
6
|
+
* with no record); one bar a stage of the initiative's own workflow (a stage it skips is dashed); the stage's exit steps as the shared
|
|
7
|
+
* step list (cozy-steps.js): done steps fold into one line, the PM's steps first (a blue ring and the one primary, the go button), then
|
|
8
|
+
* a running agent (a spinner only when a record says a session runs), then late or blocked steps (amber, with the reason), then the
|
|
9
|
+
* waiting ones with their owner; more than 4 open show 4 and "N more"; the last node is the next stage, its payoff and the KR it moves,
|
|
10
|
+
* with the "moves on by itself" icon when that is on. A tap on it opens the move sheet (home-ini.js). Every step done and the next stage
|
|
11
|
+
* a milestone (or the switch off): the last node is the primary button "Move to ◆ Deliver". */
|
|
12
|
+
import { stepsHtml, stepTail } from './cozy-steps.js';
|
|
13
|
+
|
|
14
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
15
|
+
const CLOCK = '<svg aria-hidden="true" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 7.5V12l3 2M12 3.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 1 0 0-17"/></svg>';
|
|
16
|
+
export const OPEN_MAX = 4;
|
|
17
|
+
|
|
18
|
+
/** The clock line: "4 of ~6 days", "9 days" with no usual time, '' with no record. */
|
|
19
|
+
export function clockText(c) {
|
|
20
|
+
if (!c || !Number.isFinite(c.n)) return '';
|
|
21
|
+
return c.usual != null ? c.n + ' of ~' + c.usual + ' days' : c.n === 1 ? '1 day' : c.n + ' days';
|
|
22
|
+
}
|
|
23
|
+
const mins = (iso, now) => { const t = Date.parse(iso || ''); return Number.isFinite(t) ? Math.max(1, Math.round((now - t) / 6e4)) : null; };
|
|
24
|
+
|
|
25
|
+
/** The steps in their order. h: headModel; o: { run: { title, created } | null (the session at work on it), now, doneOpen, moreOpen }.
|
|
26
|
+
* Returns { done, open, shown, more }: the step objects of cozy-steps.js. */
|
|
27
|
+
export function stepRows(h, o = {}) {
|
|
28
|
+
const now = o.now || Date.now();
|
|
29
|
+
const you = [], run = [], risk = [], wait = [];
|
|
30
|
+
let ran = false;
|
|
31
|
+
const runNote = () => { const n = o.run ? mins(o.run.created, now) : null; return n == null ? 'Running' : n < 60 ? 'Running · ' + n + ' min' : 'Running · ' + Math.floor(n / 60) + ' h ' + (n % 60) + ' min'; };
|
|
32
|
+
let first = true;
|
|
33
|
+
for (const x of (h && h.rest) || []) {
|
|
34
|
+
if (x.kind === 'you') { you.push({ state: 'you', label: x.label, note: x.note, go: first ? { attr: 'data-hm-go', label: x.label + '. Open it' } : null, attr: first ? '' : 'data-hm-go', aria: x.label + '. Open it' }); first = false; }
|
|
35
|
+
else if (x.kind === 'agent' && o.run && !ran) { ran = true; run.push({ state: 'run', label: x.label, note: runNote(), owner: { kind: 'claude', live: true } }); }
|
|
36
|
+
else if (x.kind === 'agent') wait.push({ state: 'wait', label: x.label, note: x.note, owner: { kind: 'claude' } });
|
|
37
|
+
else if (x.kind === 'risk') risk.push({ state: 'risk', label: x.label, note: x.note, noteWarn: true });
|
|
38
|
+
else if (x.kind === 'jira') wait.push({ state: 'wait', label: x.label, owner: { kind: 'jira' }, jira: x.jt ? { done: x.jd, total: x.jt } : null });
|
|
39
|
+
else wait.push({ state: 'wait', label: x.label, note: x.note });
|
|
40
|
+
}
|
|
41
|
+
// a session works on this initiative but no step names it: its own line, so the spinner is never invented and never hidden
|
|
42
|
+
if (o.run && !ran) run.push({ state: 'run', label: o.run.title || 'Claude works on it', note: runNote(), owner: { kind: 'claude', live: true } });
|
|
43
|
+
const open = you.concat(run, risk, wait);
|
|
44
|
+
const shown = o.moreOpen ? open : open.slice(0, OPEN_MAX);
|
|
45
|
+
const done = ((h && h.done) || []).map((x) => ({ state: 'done', label: x.label }));
|
|
46
|
+
return { done, open, shown, more: open.length - shown.length };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The last node. h: headModel; mv: moveModel. */
|
|
50
|
+
export function tailOf(h, mv) {
|
|
51
|
+
if (!mv || !mv.next) return mv && mv.why ? `<li class="cz-sli tail"><p class="hm-scwhy">${esc(mv.why)}</p></li>` : '';
|
|
52
|
+
if (mv.why) return stepTail({ name: mv.next, ms: mv.ms, note: mv.why });
|
|
53
|
+
if (mv.canMove && mv.allDone && (mv.ms || !mv.auto || mv.held)) return stepTail({ name: mv.next, ms: mv.ms, ready: { attr: 'data-hi-move', label: 'Move to' } });
|
|
54
|
+
const note = nextNote(h, mv);
|
|
55
|
+
const autoOn = mv.auto && !mv.held && !mv.ms;
|
|
56
|
+
return stepTail({ name: mv.next, ms: mv.ms, auto: autoOn, note, attr: 'data-hi-next',
|
|
57
|
+
aria: 'Then ' + mv.next + ': ' + note + (autoOn ? ' Moves on by itself when the steps above are done.' : '') + ' Open to move' });
|
|
58
|
+
}
|
|
59
|
+
/** The next stage's line under its name: a conditional stage says whether it runs and why; else its payoff and the KR it moves; a
|
|
60
|
+
* milestone says it waits for you. */
|
|
61
|
+
export function nextNote(h, mv) {
|
|
62
|
+
const nx = (h && h.next) || {};
|
|
63
|
+
const w = nx.when || null, r = nx.reading || null;
|
|
64
|
+
if (w && w.mode === 'only') {
|
|
65
|
+
if (r && r.runs === true) return 'Runs: ' + (r.why || 'the condition holds') + '.';
|
|
66
|
+
if (r && r.runs === false) return 'Skips: ' + (r.why || 'the condition does not hold') + '.';
|
|
67
|
+
return 'Runs only when ' + String(w.text || 'its condition holds').replace(/\.$/, '') + '. Not read yet.';
|
|
68
|
+
}
|
|
69
|
+
const parts = [nx.out || '', h && h.anchor ? 'Moves ' + h.anchor + '.' : '', mv && mv.ms ? 'Waits for you.' : ''].filter(Boolean);
|
|
70
|
+
return parts.join(' ');
|
|
71
|
+
}
|
|
72
|
+
/** What the move sheet says about the next stage (its reason). */
|
|
73
|
+
export function nextReason(h) {
|
|
74
|
+
const nx = (h && h.next) || {};
|
|
75
|
+
const w = nx.when || null, r = nx.reading || null;
|
|
76
|
+
if (w && w.mode === 'only') return 'Runs only when ' + String(w.text || 'its condition holds').replace(/\.$/, '') + '.' + (r && r.why ? ' ' + r.why.replace(/\.$/, '') + (r.runs === true ? ', so it runs.' : r.runs === false ? ', so it is skipped.' : '.') : ' Claude has not read it yet.');
|
|
77
|
+
return (h && h.payoff) || '';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The card. h: headModel; o: { title, wf (the workflow's icon, a press opens Change: WfTriage), rows (stepRows), doneOpen, tail (tailOf) } */
|
|
81
|
+
export function stageCardHtml(h, o = {}) {
|
|
82
|
+
const R = o.rows || stepRows(h, o);
|
|
83
|
+
const clock = clockText(h.clock);
|
|
84
|
+
const bars = `<div class="hm-bars hm-scbars" aria-hidden="true">${(h.steps || []).map((s) => `<i class="${esc(s.cls)}"></i>`).join('')}</div>`;
|
|
85
|
+
const fold = R.done.length ? { n: R.done.length, names: o.doneOpen ? '' : R.done.map((x) => x.label).join(', '), open: !!o.doneOpen, attr: 'data-hm-done' } : null;
|
|
86
|
+
const steps = (o.doneOpen ? R.done : []).concat(R.shown);
|
|
87
|
+
const list = stepsHtml(steps, { label: h.checkTitle, cls: 'hm-scl', fold, more: R.more > 0 ? { n: R.more, attr: 'data-hm-more' } : null, tail: o.tail || '' });
|
|
88
|
+
const none = !R.done.length && !R.open.length ? '<p class="hm-none">No exit step is on record for this stage.</p>' : '';
|
|
89
|
+
const turn = R.open.some((x) => x.state === 'you') ? 'you' : h.turn;
|
|
90
|
+
return `<section class="hm-card hm-pcard hm-sc" aria-label="${esc(o.title || '')}">`
|
|
91
|
+
+ `<div class="hm-box hm-scb ${esc(turn)}"><div class="hm-sch"><b>${esc(h.cur || 'No stage')}</b>${R.done.length + R.open.length ? `<span class="of">${esc(h.doneOf)}</span>` : ''}`
|
|
92
|
+
+ (o.wf || '') + (clock ? `<span class="hm-sct${h.clock.over ? ' over' : ''}">${CLOCK}${esc(clock)}</span>` : '') + '</div>'
|
|
93
|
+
+ bars + none + list + '</div></section>';
|
|
94
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* pm/home-sweep.js — the progress line wherever an agent works for the PM (initiative premium-agreed-design; canvas XcbOptions, "The same line
|
|
2
|
+
* wherever an agent works for you", Wawan 2026-10-25 "Yes, add those"). Pure models for home-line.js: Node tests them (chat-sweep.test.js).
|
|
3
|
+
*
|
|
4
|
+
* A weekly update, a meeting's notes and a PRD to Jira push are Claude sessions: their skills keep a TodoWrite step list (one item per step,
|
|
5
|
+
* one per ticket for a push), so home-line.js sessionModel draws "3 of 5 done" and "6 of 14 done" with no model of their own here. The final
|
|
6
|
+
* send to Jira stays the PM's labeled Send to Jira press on the Send sheet: the push session starts only after it.
|
|
7
|
+
*
|
|
8
|
+
* Two cases need their own model:
|
|
9
|
+
* chaseModel(block, o) chasing people: a clock, not a spinner (it waits on people, not on Claude); one row per person with their avatar,
|
|
10
|
+
* state and last nudge; the head "1 of 3 replied · next nudge Monday 9:00"; Stop reads "Stop chasing".
|
|
11
|
+
* Claude writes a fenced `pmos-chase` JSON block at the end of each message while it chases:
|
|
12
|
+
* {"state":"chasing"|"done"|"stopped","what":"Sign-off on the descope PRD","next":"2026-10-27T09:00",
|
|
13
|
+
* "people":[{"name":"Dita","status":"signed off","note":"Fri 16:40, in Slack","replied":true},
|
|
14
|
+
* {"name":"Raj","status":"asked twice","note":"last nudge Fri 10:00 · no reply"}]}
|
|
15
|
+
* runStop(conv, o) a routine run that stopped: the amber divider says where and why ("Run stopped at 3 of 5: Jira sign-in expired"),
|
|
16
|
+
* then the fix as icons (Sign in to Jira, Run again). The why comes from Claude's `pmos-ask` reach block (home-ask.js).
|
|
17
|
+
*
|
|
18
|
+
* sweepLine(conv, o) the model a chat's line draws for these cases, or null (home-chat.js lineModel asks it first)
|
|
19
|
+
* stopText(model) what Stop sends for a model whose Stop is not Esc ("Stop chasing" tells Claude to stop), else '' */
|
|
20
|
+
import { splitAsk, ICON } from './home-ask.js';
|
|
21
|
+
|
|
22
|
+
const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1) + '…' : t; };
|
|
23
|
+
const DOW = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
24
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
25
|
+
/** "Monday 9:00" in the browser's time zone; today and tomorrow by name. '' when the time does not parse. */
|
|
26
|
+
export function nudgeWhen(iso, now = Date.now()) {
|
|
27
|
+
const t = Date.parse(iso || '');
|
|
28
|
+
if (!Number.isFinite(t)) return '';
|
|
29
|
+
const d = new Date(t), n = new Date(now);
|
|
30
|
+
const day = (x) => new Date(x.getFullYear(), x.getMonth(), x.getDate()).getTime();
|
|
31
|
+
const diff = Math.round((day(d) - day(n)) / 86400000);
|
|
32
|
+
const name = diff === 0 ? 'today' : diff === 1 ? 'tomorrow' : diff > 1 && diff < 7 ? DOW[d.getDay()] : d.toISOString().slice(0, 10);
|
|
33
|
+
return name + ' ' + d.getHours() + ':' + pad(d.getMinutes());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** { text, block }: the words with the last `pmos-chase` block taken out, and that block parsed (null when there is none or it does not parse). */
|
|
37
|
+
export function splitChase(text) {
|
|
38
|
+
const s = String(text == null ? '' : text);
|
|
39
|
+
const re = /```pmos-chase[^\n]*\n([\s\S]*?)```/g;
|
|
40
|
+
let m, last = null;
|
|
41
|
+
while ((m = re.exec(s))) last = m;
|
|
42
|
+
if (!last) return { text: s, block: null };
|
|
43
|
+
let block = null;
|
|
44
|
+
try { const o = JSON.parse(last[1]); if (o && typeof o === 'object' && Array.isArray(o.people)) block = o; } catch { block = null; }
|
|
45
|
+
return { text: (s.slice(0, last.index) + s.slice(last.index + last[0].length)).trim(), block };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** A chase as the line's model, or null when the block is not chasing (done or stopped: the line goes away) or names nobody. */
|
|
49
|
+
export function chaseModel(b, o = {}) {
|
|
50
|
+
if (!b || b.state === 'done' || b.state === 'stopped') return null;
|
|
51
|
+
const people = (Array.isArray(b.people) ? b.people : []).filter((p) => p && clip(p.name, 40)).slice(0, 12);
|
|
52
|
+
if (!people.length) return null;
|
|
53
|
+
const replied = people.filter((p) => p.replied === true).length;
|
|
54
|
+
const next = nudgeWhen(b.next, o.now);
|
|
55
|
+
const what = clip(b.what, 140) || 'Chasing';
|
|
56
|
+
const items = people.map((p) => {
|
|
57
|
+
const name = clip(p.name, 40);
|
|
58
|
+
return { text: name + (p.status ? ' · ' + clip(p.status, 60) : ''), sub: clip(p.note, 120), state: p.replied === true ? 'done' : 'next',
|
|
59
|
+
avatar: { initial: name.charAt(0).toUpperCase(), name } };
|
|
60
|
+
});
|
|
61
|
+
const count = `${replied} of ${people.length} replied`;
|
|
62
|
+
return {
|
|
63
|
+
kind: 'chase', icon: 'clock', tone: o.asking ? 'you' : '', text: o.asking ? 'Claude asks before it goes on' : what,
|
|
64
|
+
count: o.asking ? '' : count, clock: '', stopLabel: 'Stop chasing', title: what,
|
|
65
|
+
head: count + (next ? ' · next nudge ' + next : ''), items, more: 0, now: '', term: false,
|
|
66
|
+
open: !!o.open, on: !!o.on, frac: replied / people.length, what,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The newest assistant message's block, unless the PM wrote after it is newer: the chase goes on across the PM's messages, so a user
|
|
71
|
+
* message does not end it; only a newer block (done or stopped) does. */
|
|
72
|
+
function newestChase(conv) {
|
|
73
|
+
const ms = (conv && conv.messages) || [];
|
|
74
|
+
for (let i = ms.length - 1; i >= 0; i--) if (ms[i].role === 'assistant') { const b = splitChase(ms[i].text).block; if (b) return b; }
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
/** The model a chat's line draws for a sweep case, or null. o: home-line.js's o ({ now, asking, open, on }). */
|
|
78
|
+
export function sweepLine(conv, o = {}) {
|
|
79
|
+
if (!conv || conv.state === 'ended') return null;
|
|
80
|
+
return chaseModel(newestChase(conv), o);
|
|
81
|
+
}
|
|
82
|
+
/** What Stop sends for a model whose Stop is a message, not Esc. */
|
|
83
|
+
export const stopText = (m) => (m && m.kind === 'chase' ? `Stop chasing${m.what ? ': ' + m.what : ''}. Send no more nudges and say in one line who still has not replied.` : '');
|
|
84
|
+
|
|
85
|
+
/** A run that stopped with steps left, as the divider: where it stopped, why (Claude's reach block), and the fix as icons.
|
|
86
|
+
* conv: the conversation (ended, or its turn back to the PM); o.routine: the chat is a scheduled run ("Run stopped" rather than "Stopped").
|
|
87
|
+
* null while it runs, while it only pauses to ask, when it wrote no step list, or when it finished every step. */
|
|
88
|
+
export function runStop(conv, o = {}) {
|
|
89
|
+
const c = conv || {};
|
|
90
|
+
if (c.turn === 'agent' || c.turn === 'tool') return null;
|
|
91
|
+
const s = Array.isArray(c.steps) ? c.steps : [];
|
|
92
|
+
const done = s.filter((x) => x.state === 'done').length;
|
|
93
|
+
if (!s.length || done >= s.length) return null;
|
|
94
|
+
let reach = null;
|
|
95
|
+
const ms = Array.isArray(c.messages) ? c.messages : [];
|
|
96
|
+
for (let i = ms.length - 1; i >= 0; i--) {
|
|
97
|
+
if (ms[i].role === 'user') break;
|
|
98
|
+
if (ms[i].role === 'assistant') { const b = splitAsk(ms[i].text).block; if (b && b.kind === 'reach') reach = b; break; }
|
|
99
|
+
}
|
|
100
|
+
// a pause is not a stop: Claude ending its turn to ask the PM leaves steps open too. It stopped when the session ended, the PM pressed
|
|
101
|
+
// Stop (the interrupt line), Claude said what it cannot reach, or a scheduled run handed the turn back with steps left
|
|
102
|
+
const lastUser = ms.filter((m) => m.role === 'user').pop();
|
|
103
|
+
const stopped = c.state === 'ended' || !!reach || !!o.routine || !!(lastUser && /^\[Request interrupted by user/.test(String(lastUser.text || '')));
|
|
104
|
+
if (!stopped) return null;
|
|
105
|
+
const what = reach ? clip(reach.what, 60) : '', why = reach ? clip(reach.why, 120) : '';
|
|
106
|
+
const text = (o.routine ? 'Run stopped' : 'Stopped') + ` at ${done} of ${s.length}` + (what || why ? ': ' + [what, why].filter(Boolean).join(' ') : '');
|
|
107
|
+
const actions = [];
|
|
108
|
+
if (reach && reach.need !== 'file' && what) actions.push({ icon: ICON.key, label: 'Sign in to ' + what, data: `data-hm-signin="${what.replace(/"/g, '"')}"` });
|
|
109
|
+
if (reach && reach.need === 'file') actions.push({ icon: ICON.clip, label: 'Attach a file', data: 'data-hm-file' });
|
|
110
|
+
if (reach || o.routine) actions.push({ icon: ICON.again, label: 'Run again', data: 'data-hm-retry' }); // a plain session that stopped: no fix to offer (frame 6)
|
|
111
|
+
return { tone: 'stop', text, actions, reach: !!reach };
|
|
112
|
+
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { STEPS } from './premium-initiative-head.js';
|
|
14
14
|
import { whenOf } from './home-list.js';
|
|
15
|
+
import { ringHtml } from './home-line.js';
|
|
15
16
|
|
|
16
17
|
export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
17
18
|
export const P = {
|
|
@@ -36,7 +37,9 @@ const RING = { needs: 'Waits on you', blocked: 'Blocked, waits on you', working:
|
|
|
36
37
|
function markHtml(r) {
|
|
37
38
|
if (r.kind === 'meeting') return `<span class="hv-mk" role="img" aria-label="Meeting">${svg(P.clock, 15)}</span>`;
|
|
38
39
|
const st = r.state === 'needs' || r.state === 'blocked' || r.state === 'working' ? r.state : '';
|
|
39
|
-
|
|
40
|
+
// a running row's ring fills as its points or steps are met, with no number (XcbOptions B, case 8); a dot that waits on the PM beats it
|
|
41
|
+
if (st === 'working') return `<span class="hv-mk">${ringHtml(r.prog || null, RING.working)}</span>`;
|
|
42
|
+
return st ? `<span class="hv-mk"><span class="hv-d${st === 'blocked' ? ' am' : ''}" role="img" aria-label="${RING[st]}"></span></span>` : '<span class="hv-mk"></span>';
|
|
40
43
|
}
|
|
41
44
|
function checkHtml(r) {
|
|
42
45
|
const what = (r.mine === false ? 'Task, waits on someone else' : 'Your task') + (r.late ? ', late' : r.hint ? ', ' + r.hint : '');
|
|
@@ -69,7 +72,9 @@ export function chatHeadHtml(h) {
|
|
|
69
72
|
const lead = h.prog ? `<span class="hv-tl tp sm" aria-hidden="true">${svg(P.layers, 13)}</span>` : '';
|
|
70
73
|
const same = !h.scope || h.scope === h.title;
|
|
71
74
|
const chip = same ? '' : `<span class="hm-chs" title="In ${esc(h.scope)}">${h.prog ? svg(P.layers, 13) : track(h.at == null ? -1 : h.at, h.stage || '', h.steps)}<span>${esc(h.scope)}</span></span>`;
|
|
72
|
-
|
|
75
|
+
// session names A: an open session's name comes as the rename press (or the field), drawn by home-ses-name.js
|
|
76
|
+
const name = h.titleHtml ? `<span class="hm-chn">${h.titleHtml}</span>` : `<b class="hm-chb">${esc(h.title)}</b>`;
|
|
77
|
+
return `${mk}${same ? lead : ''}${name}${same && !h.prog ? track(h.at == null ? -1 : h.at, h.stage || '', h.steps) : ''}${chip}`;
|
|
73
78
|
}
|
|
74
79
|
/** An initiative row: its mark, its title, the count of what is yours while it is folded, the stage track, and a chevron when something
|
|
75
80
|
* sits under it. The title opens the initiative; the chevron shows or hides its sessions, next steps, tasks and meetings. */
|
|
@@ -57,7 +57,7 @@ const plural = (n, one, many) => n + ' ' + (n === 1 ? one : many);
|
|
|
57
57
|
function stepsOf(m) {
|
|
58
58
|
const own = m.wf && m.wf.id && m.wf.id !== 'product-feature' && Array.isArray(m.wfStages) && m.wfStages.length;
|
|
59
59
|
if (!own) return null;
|
|
60
|
-
return m.wfStages.filter((s) => s.status !== 'skipped' || (m.wfStage && s.key === m.wfStage.key)).map((s) => ({ key: s.key, label: s.name, ms: !!s.milestone, out: '' }));
|
|
60
|
+
return m.wfStages.filter((s) => s.status !== 'skipped' || (m.wfStage && s.key === m.wfStage.key)).map((s) => ({ key: s.key, label: s.name, ms: !!s.milestone, out: '', when: s.when || null, reading: s.reading || null }));
|
|
61
61
|
}
|
|
62
62
|
export function headModel(M, now = Date.now()) {
|
|
63
63
|
const m = M || {}, head = m.head || {}, acts = m.acts || {}, ov = m.overview || {};
|
|
@@ -77,7 +77,7 @@ export function headModel(M, now = Date.now()) {
|
|
|
77
77
|
const jira = ((m.tasks && m.tasks.rows) || []).filter((t) => /^Jira/.test(t.src || ''));
|
|
78
78
|
if (jira.length) {
|
|
79
79
|
const d = jira.filter((t) => t.state === 'Done').length;
|
|
80
|
-
items.push({ kind: d === jira.length ? 'done' : 'jira', label: d + ' of ' + plural(jira.length, 'ticket', 'tickets') + ' Done in Jira' });
|
|
80
|
+
items.push({ kind: d === jira.length ? 'done' : 'jira', label: d + ' of ' + plural(jira.length, 'ticket', 'tickets') + ' Done in Jira', jd: d, jt: jira.length });
|
|
81
81
|
}
|
|
82
82
|
// the waiting record says who; a step that waits on the PM and is not in the list yet is added
|
|
83
83
|
const youWait = ov.who === 'Waits on you';
|
|
@@ -89,13 +89,14 @@ export function headModel(M, now = Date.now()) {
|
|
|
89
89
|
: rest.some((x) => x.kind === 'jira') || (!own && (key === 'build' || key === 'deliver')) ? 'jira' : 'agents';
|
|
90
90
|
const TURN = { you: 'Your turn', agents: 'Agents working', jira: 'Engineers on it', stalled: life === 'hold' ? 'On hold' : life === 'cancelled' ? 'Cancelled' : 'Stalled' };
|
|
91
91
|
// time in the stage: a record that holds it (stageSince, usualDays) first, then the planned finish, then say it is not recorded
|
|
92
|
-
let time = '', over = false;
|
|
92
|
+
let time = '', over = false, clock = null;
|
|
93
93
|
const since = dayOf(m.stageSince || head.stageSince), usual = Number.isFinite(m.usualDays) ? m.usualDays : Number.isFinite(head.usualDays) ? head.usualDays : null;
|
|
94
94
|
const end = dayOf(m.end || head.end || (m.dock && m.dock.end));
|
|
95
95
|
const finish = (head.meta || []).find((x) => /^planned finish /.test(x));
|
|
96
96
|
if (since && cur) {
|
|
97
97
|
const n = Math.max(0, Math.round((now - since) / 864e5));
|
|
98
98
|
time = 'In ' + cur.label + ' for ' + plural(n, 'day', 'days') + (usual != null ? ' · usually ' + usual : ''); over = usual != null && n > usual;
|
|
99
|
+
clock = { n, usual, over }; // stage card D: "4 of ~6 days", amber when over; only from a record that holds the day it entered
|
|
99
100
|
} else if (finish && cur) {
|
|
100
101
|
time = 'In ' + cur.label + ' · ' + finish; over = !!end && end < new Date(new Date(now).getFullYear(), new Date(now).getMonth(), new Date(now).getDate()) && life !== 'done';
|
|
101
102
|
} else if (cur) time = 'In ' + cur.label + ' · time in this stage is not recorded';
|
|
@@ -113,7 +114,10 @@ export function headModel(M, now = Date.now()) {
|
|
|
113
114
|
stage: cur ? (at + 1) + ' of ' + LIST.length + ' · ' + cur.label : head.stage ? head.stage + ' · not on the lifecycle' : 'No stage on record',
|
|
114
115
|
prev: prev ? prev.label : '', cur: cur ? cur.label : head.stage || '', toReach: next ? next.label : cur ? 'Done' : '',
|
|
115
116
|
ladderAria: cur ? 'Stage ' + (at + 1) + ' of ' + LIST.length + ': ' + cur.label + '.' + (next ? ' Next stage: ' + next.label + '.' : '') : 'No stage on the lifecycle.',
|
|
116
|
-
|
|
117
|
+
// one bar a stage of its workflow; a stage PMOS judged it skips stays as a dashed bar (stage card D)
|
|
118
|
+
steps: own ? m.wfStages.map((s) => ({ label: s.name, ms: !!s.milestone, cls: s.status === 'skipped' && !(m.wfStage && s.key === m.wfStage.key) ? 'skip' : s.status === 'done' ? 'done' : s.status === 'current' ? 'now' : '' }))
|
|
119
|
+
: LIST.map((s, i) => ({ label: s.label, ms: !!s.ms, cls: at < 0 ? '' : i < at ? 'done' : i === at ? 'now' : '' })),
|
|
120
|
+
next: next ? { label: next.label, ms: !!next.ms, out: next.out ? cap1(next.out) + '.' : '', when: next.when || null, reading: next.reading || null } : null, anchor: m.anchor || '', clock,
|
|
117
121
|
checkTitle: next ? 'To reach ' + next.label : cur ? 'To finish ' + cur.label : 'What is next',
|
|
118
122
|
done, rest, doneOf: done.length + ' of ' + items.length + ' done',
|
|
119
123
|
foldSum: done.length + ' of ' + items.length + ' done · ' + ([rest.filter((x) => x.kind === 'you').length ? rest.filter((x) => x.kind === 'you').length + ' for you' : '', rest.filter((x) => x.kind === 'risk').length ? rest.filter((x) => x.kind === 'risk').length + ' blocked' : '', rest.filter((x) => x.kind === 'jira').length ? 'in Jira' : ''].filter(Boolean).join(', ') || (turn === 'agents' ? 'agents on it' : 'nothing waiting')),
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* initiativeRename({ pmPost, ws, id, epics }) → the Viewer's `rename` option for an initiative (Jira box when it has an epic)
|
|
6
6
|
* taskRename({ pmPost, ws, board, uid, ref }) → the same for a PMOS task (Jira box when it has a Jira key)
|
|
7
7
|
* programRename({ pmPost, program }) → the same for a program: its whole charter again, with its id (no Jira box)
|
|
8
|
+
* sessionRename({ pmPost, session }) → a session's name (session names A, canvas XmsNames): the PM's name locks it, so Claude
|
|
9
|
+
* never renames it again; Undo gives back the name it had, and Claude's naming with it
|
|
8
10
|
* jiraAsk(kind, keys, title) → the words the chat starts with when the PM ticks the Jira box. PMOS holds no
|
|
9
11
|
* Jira credential (D53): the PM's own agent renames it, after the PM sends them.
|
|
10
12
|
* Each `save` resolves { ok, title, from, undo() } or { ok: false, error }; the caller says "Renamed" with Undo. */
|
|
@@ -79,3 +81,25 @@ export function programRename({ pmPost, program, onSaved }) {
|
|
|
79
81
|
},
|
|
80
82
|
};
|
|
81
83
|
}
|
|
84
|
+
|
|
85
|
+
/** session names A: the PM's name for a session, through POST /api/session/meta. `session` is the wire row (name, auto_name, name_by). */
|
|
86
|
+
export function sessionRename({ pmPost, session, shown, onSaved }) {
|
|
87
|
+
const s = session || {};
|
|
88
|
+
const before = { name: s.name, by: s.name_by || null, title: shown };
|
|
89
|
+
return {
|
|
90
|
+
max: 60,
|
|
91
|
+
jira: null,
|
|
92
|
+
save: async (title) => {
|
|
93
|
+
const r = await pmPost('/api/session/meta', { id: s.id, name: title }).catch(() => null);
|
|
94
|
+
if (!r || !r.ok) return { ok: false, error: said(r, 'The name was not saved.') };
|
|
95
|
+
// Undo: the PM's earlier name, or, when Claude named it, Claude's name again and its naming unlocked
|
|
96
|
+
const undo = async () => {
|
|
97
|
+
const u = await pmPost('/api/session/meta', before.by === 'pm' ? { id: s.id, name: before.name } : { id: s.id, name: before.name, release: true }).catch(() => null);
|
|
98
|
+
return u && u.ok ? { ok: true, title: before.title, name: u.name, name_by: u.name_by || null } : { ok: false, error: said(u, 'It could not be undone.') };
|
|
99
|
+
};
|
|
100
|
+
const out = { ok: true, title: r.name || title, name: r.name || title, name_by: r.name_by || 'pm', from: before.title, undo };
|
|
101
|
+
if (onSaved) await onSaved(out);
|
|
102
|
+
return out;
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
@@ -31,6 +31,8 @@ body.wf-page { min-height: 100vh; overflow: hidden; font-family: var(--cz-sans);
|
|
|
31
31
|
.wf-page .wfi.new { width: 22px; height: 22px; background: var(--cz-bluebg); color: var(--cz-blueink); }
|
|
32
32
|
|
|
33
33
|
/* ── the workflow ── */
|
|
34
|
+
/* hidden while New workflow shows its chat in this column: the flex display would beat [hidden] and squeeze the chat (bug 2026-10-25) */
|
|
35
|
+
.wf-main[hidden] { display: none; }
|
|
34
36
|
.wf-main { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; padding: 6px 6px 0 4px; display: flex; flex-direction: column; gap: 14px; }
|
|
35
37
|
.wf-head { display: flex; align-items: center; gap: 10px; min-height: 40px; }
|
|
36
38
|
.wf-push { margin-left: auto; }
|
|
@@ -123,6 +125,7 @@ body.wf-page { min-height: 100vh; overflow: hidden; font-family: var(--cz-sans);
|
|
|
123
125
|
.wf-chatw { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
|
|
124
126
|
.wf-chatw[hidden] { display: none; }
|
|
125
127
|
.wf-chatw .hm-chat { flex: 1; }
|
|
128
|
+
.wf-chatw .hm-chip { flex: none; } /* "In: New workflow" stays whole; the Enter hint gives way first */
|
|
126
129
|
.wf-hint { text-align: center; padding: 6px 0 0; }
|
|
127
130
|
|
|
128
131
|
/* ── remove a stage in use (WfARemove), the menu, the toast ── */
|
|
@@ -112,7 +112,8 @@ function drawMain() {
|
|
|
112
112
|
const isNew = S.sel === 'new';
|
|
113
113
|
m.hidden = isNew; c.hidden = !isNew;
|
|
114
114
|
// the draft sits beside the chat (WfADraft); a stage's panel lies over the columns and the list stays (WfAStage)
|
|
115
|
-
|
|
115
|
+
// beside the chat, a narrow desk folds the list to a rail rather than laying the draft over the chat (bug 2026-10-25: the chat was a sliver)
|
|
116
|
+
const host = $('#wfVwHost'); if (host) { host.toggleAttribute('data-cz-viewer-host', isNew); host.toggleAttribute('data-cz-vw-overlay', !isNew); }
|
|
116
117
|
document.body.classList.toggle('wf-open', !!S.sel && (S.phoneOpen || !isPhone()));
|
|
117
118
|
if (isNew) return;
|
|
118
119
|
const wf = cur();
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<link rel="preload" href="/vendor/nunito-var.woff2" as="font" type="font/woff2" crossorigin />
|
|
12
12
|
<link rel="stylesheet" href="/pm/cozy.css" />
|
|
13
13
|
<link rel="stylesheet" href="/pm/cozy-home.css" />
|
|
14
|
+
<link rel="stylesheet" href="/pm/cozy-today.css" />
|
|
14
15
|
<link rel="stylesheet" href="/pm/wf-page.css" />
|
|
15
16
|
</head>
|
|
16
17
|
<body class="cz wf-page">
|
|
@@ -3510,6 +3510,107 @@
|
|
|
3510
3510
|
"names": [
|
|
3511
3511
|
"T3: both spawn paths take the launch args — tmux joins plain tokens, the direct PTY passes an argv"
|
|
3512
3512
|
]
|
|
3513
|
+
},
|
|
3514
|
+
{
|
|
3515
|
+
"id": "E76",
|
|
3516
|
+
"group": "E",
|
|
3517
|
+
"file": "workspace/d86-seams.test.js",
|
|
3518
|
+
"section": "4 pm-guard and grant-mint",
|
|
3519
|
+
"change": "replaced",
|
|
3520
|
+
"slice": "agents-finish-work",
|
|
3521
|
+
"reason": "D98 (PM wawan, 2026-10-24): an agent session takes every act that was PM-only and every line names the agent; requirePmCli no longer refuses an agent session or agent:unknown, and grant-mint no longer refuses an agent actor.",
|
|
3522
|
+
"replacement": "The same section asserts that requirePmCli passes an agent session and agent:unknown with their own actor and asks nothing; that a press with an x-pmos-session token is that agent (a malformed one agent:unknown, never the PM); and that grant-mint still allows only release and lifecycle-bulk and does not refuse an agent as an agent.",
|
|
3523
|
+
"pm_approval": null,
|
|
3524
|
+
"names": [
|
|
3525
|
+
"4 pm-guard: a PM-only verb from an agent session is refused with 403, without asking",
|
|
3526
|
+
"4 pm-guard: a PM-only verb with no terminal is refused with 403",
|
|
3527
|
+
"4 grant-mint: a press mints only a release or lifecycle-bulk grant (400 otherwise), and only as the PM (403)"
|
|
3528
|
+
]
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
"id": "E77",
|
|
3532
|
+
"group": "E",
|
|
3533
|
+
"file": "workspace/item-cli.test.js",
|
|
3534
|
+
"section": "1 attribution, 3 withdraw",
|
|
3535
|
+
"change": "replaced",
|
|
3536
|
+
"slice": "agents-finish-work",
|
|
3537
|
+
"reason": "D98 (PM wawan, 2026-10-24): an agent session takes every act that was PM-only and every line names the agent; an agent's items are live at once, and an agent withdraws any item, the PM's and another session's included.",
|
|
3538
|
+
"replacement": "C3 asserts the piped item is agent:unknown / cli and live; C23a asserts agent:unknown withdraws another session's item with its own by and list no longer shows it; C23b asserts an agent session withdraws the PM's item with its own by.",
|
|
3539
|
+
"pm_approval": null,
|
|
3540
|
+
"names": [
|
|
3541
|
+
"C3 piped stdio is agent:unknown / cli, and the item is proposed",
|
|
3542
|
+
"C23a an agent withdraws only the items it planned: another session (here agent:unknown) is refused, exit 1, nothing written",
|
|
3543
|
+
"C23b an agent session cannot withdraw an item the PM planned (exit 1)",
|
|
3544
|
+
"C23 the session that planned it withdraws it: withdrawn is written, and list no longer shows the item"
|
|
3545
|
+
]
|
|
3546
|
+
},
|
|
3547
|
+
{
|
|
3548
|
+
"id": "E78",
|
|
3549
|
+
"group": "E",
|
|
3550
|
+
"file": "workspace/plan-items.test.js",
|
|
3551
|
+
"section": "4 attribution, 7 Keep, 8 forged lines, 9 needs-you, 14 named cases, 15 withdraw",
|
|
3552
|
+
"change": "replaced",
|
|
3553
|
+
"slice": "agents-finish-work",
|
|
3554
|
+
"reason": "D98 (PM wawan, 2026-10-24): an agent session takes every act that was PM-only and every line names the agent; an agent's items are live at once (never proposed), so there are no batches, no Keep cards and no kept-not-pm flag; a Keep line from before D98 on a live item is skipped silently; an agent withdraws any item.",
|
|
3555
|
+
"replacement": "P17/P18 assert the agent item is live; P48-P53 assert no batches, progress counts agent items, Keep of live items is 409, an old Keep line is skipped with no flag and the layout carries no token; P63-P65 assert the kept-not-ui flag stays, an agent Keep line is not flagged and a mismatch is flagged once; P71/P84 assert no Keep card; P90 asserts an agent withdraws the PM's and another session's item with its own by.",
|
|
3556
|
+
"pm_approval": null,
|
|
3557
|
+
"names": [
|
|
3558
|
+
"P17 from a bound session: by agent:<token>, via cli, owner agent, and the item is proposed",
|
|
3559
|
+
"P18 a valid PMOS_SESSION wins over a terminal (an agent session runs in a PTY too): agent:<token> via cli, proposed",
|
|
3560
|
+
"P48 two sessions planning on one initiative give two batches, in createdAt order",
|
|
3561
|
+
"P49 proposed items never count in progress, and the label says they wait: \"no breakdown · 4 proposed\"",
|
|
3562
|
+
"P51 Keep of an item that is not in that batch is 409",
|
|
3563
|
+
"P52 Keep from the page: a kept line with no item key; the items are no longer proposed, and count in progress",
|
|
3564
|
+
"P53 Keep twice is 409 (nothing is proposed any more)",
|
|
3565
|
+
"P53b the page names two batches whose actors read the same agent:sess-6 and agent:sess-6#2, with no token anywhere in the layout",
|
|
3566
|
+
"P53c Keep by a page name the items were not proposed under is 409, and nothing is written",
|
|
3567
|
+
"P53d Keep by the page name records the full actor of the batch the items belong to (sess-6#2 is the second run's token)",
|
|
3568
|
+
"P64 a kept line not by the PM: kept-not-pm, ignored",
|
|
3569
|
+
"P65 a kept line naming an item of another batch: kept-mismatch for that id only",
|
|
3570
|
+
"P71 one Keep card per agent batch, with its count, its session label and its items",
|
|
3571
|
+
"P71b no needs row carries an agent's session token: the batch is agent:sess-<n>, as the page shows it",
|
|
3572
|
+
"P84 9 lines from one session give 1 batch, and its Keep card reads \"9 items\"",
|
|
3573
|
+
"P90 an agent cannot withdraw the PM's item or another session's (403); it withdraws its own; the PM withdraws any",
|
|
3574
|
+
"P63 a kept line not from the page: kept-not-ui, ignored (fail closed)",
|
|
3575
|
+
"P73 a Keep line not written from the page is a plan-flag row, and it kept nothing"
|
|
3576
|
+
]
|
|
3577
|
+
},
|
|
3578
|
+
{
|
|
3579
|
+
"id": "E79",
|
|
3580
|
+
"group": "E",
|
|
3581
|
+
"file": "workspace/plan-routes.test.js",
|
|
3582
|
+
"section": "1 GET, 4 needs-you",
|
|
3583
|
+
"change": "replaced",
|
|
3584
|
+
"slice": "agents-finish-work",
|
|
3585
|
+
"reason": "D98 (PM wawan, 2026-10-24): an agent session takes every act that was PM-only and every line names the agent; an agent's items are live at once, so the layout has no batches and needs-you has no Keep card; a Keep from the page of live items is 409.",
|
|
3586
|
+
"replacement": "R1/R1b assert progress counts the agent's items, no batches and no token; R22 asserts no Keep card; R24-R26 assert the forged-Keep plan-flag row, the row shapes and the counts; R27 asserts a page Keep of live items is 409; R51 asserts the lead-tree counting with the remaining plan rows.",
|
|
3587
|
+
"pm_approval": null,
|
|
3588
|
+
"names": [
|
|
3589
|
+
"R22 one Keep card per session: \"9 items\" and \"1 item\"",
|
|
3590
|
+
"R25b needs-you names each batch as agent:sess-<n>, never with its session token",
|
|
3591
|
+
"R27 Keep from the page, by the batch's page name, writes kept / ui / pm:wawan with the agent's full actor, and that card leaves needs-you",
|
|
3592
|
+
"R1 GET answers the layout: ok, ws, initiative, profile, lane, the ladder, sig, now, progress, stages, items, board, batches",
|
|
3593
|
+
"R1b the layout names the agent as agent:sess-3, never with its session token, while the ledger keeps the token",
|
|
3594
|
+
"R24 a forged Keep (via cli) is a plan-flag row and keeps nothing",
|
|
3595
|
+
"R26 the collapsed-row count includes the plan rows",
|
|
3596
|
+
"R51 one repository, two registered trees: its Keep, evidence and check rows are counted once, on the lead tree (not again on the linked worktree)"
|
|
3597
|
+
]
|
|
3598
|
+
},
|
|
3599
|
+
{
|
|
3600
|
+
"id": "E80",
|
|
3601
|
+
"group": "E",
|
|
3602
|
+
"file": "workspace/plan-tree.test.js",
|
|
3603
|
+
"section": "layout counts",
|
|
3604
|
+
"change": "replaced",
|
|
3605
|
+
"slice": "agents-finish-work",
|
|
3606
|
+
"reason": "D98 (PM wawan, 2026-10-24): an agent session takes every act that was PM-only and every line names the agent; an agent's item counts in the stage and the progress at once, and there are no Keep batches.",
|
|
3607
|
+
"replacement": "T20/T21 assert the agent's item counts (0 of 4; 2 of 8; nothing proposed); T25 asserts no batches, another initiative's kept-not-ui stays out and a torn line shows.",
|
|
3608
|
+
"pm_approval": null,
|
|
3609
|
+
"names": [
|
|
3610
|
+
"T20 stage counts leave proposed items out: Build 0 of 3 with 1 proposed",
|
|
3611
|
+
"T21 progress is ledger-only and leaves proposed items out",
|
|
3612
|
+
"T25 batches and flags are this initiative's: another initiative's batch and kept-not-ui stay out; a torn line (no initiative) is shown"
|
|
3613
|
+
]
|
|
3513
3614
|
}
|
|
3514
3615
|
]
|
|
3515
3616
|
}
|