create-pmos 0.536.0 → 0.538.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 +81 -33
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/board-columns-test.js +11 -10
- package/workspace/board-programs-test.js +27 -24
- package/workspace/board-publish-ui-test.js +19 -15
- package/workspace/board-shared-ui-test.js +16 -13
- package/workspace/board-workflows-test.js +26 -32
- package/workspace/briefing-premium-board-test.js +70 -50
- package/workspace/briefing-premium-insights-test.js +24 -31
- package/workspace/briefing-premium-metrics-test.js +2 -2
- package/workspace/calm-timeline-test.js +1 -1
- package/workspace/changelog.json +80 -0
- package/workspace/ev-everywhere-test.js +4 -5
- package/workspace/fixtures/board-premium-facts.js +1 -1
- package/workspace/fixtures/board-workflows-facts.js +7 -1
- package/workspace/fixtures/initiative-premium-facts.js +1 -1
- package/workspace/fixtures/insights-premium-facts.js +6 -6
- package/workspace/fixtures/program-ascent.js +1 -1
- package/workspace/guide/adler.md +2 -2
- package/workspace/guide/agent-capabilities.md +38 -6
- package/workspace/guide/board.md +20 -2
- package/workspace/guide/claude-proposes.md +1 -1
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +3 -3
- package/workspace/guide/intelligence-okr-goals.md +18 -7
- package/workspace/guide/lifecycle.md +2 -2
- package/workspace/guide/programs.md +2 -2
- package/workspace/guide/reports-needs-you.md +5 -5
- package/workspace/guide/settings.md +14 -11
- package/workspace/guide/workflows.md +3 -3
- package/workspace/guide/your-impact.md +1 -1
- package/workspace/lib/agent-team.js +262 -0
- package/workspace/lib/ai-cli.js +36 -4
- package/workspace/lib/bg-queue.js +9 -4
- package/workspace/lib/board-premium.js +6 -3
- package/workspace/lib/goal-source.js +77 -0
- package/workspace/lib/grill-runs.js +6 -3
- package/workspace/lib/headless.js +36 -4
- package/workspace/lib/idle-lab-engine.js +7 -6
- package/workspace/lib/initiative-premium.js +6 -3
- package/workspace/lib/insights-premium.js +1 -1
- package/workspace/lib/job-graph.js +191 -0
- package/workspace/lib/okr-goals.js +3 -0
- package/workspace/lib/orchestrator-keeprate.js +108 -7
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/proposal-runs.js +8 -5
- package/workspace/lib/proposals.js +32 -2
- package/workspace/lib/report-slots.js +14 -10
- package/workspace/lib/routes-boards.js +2 -2
- package/workspace/lib/routes-insights-premium.js +11 -4
- package/workspace/lib/routes-premium-dashboards.js +20 -6
- package/workspace/lib/routes-proposals.js +10 -5
- package/workspace/lib/routes-your-move.js +6 -7
- package/workspace/lib/status-proof.js +45 -0
- package/workspace/lib/status-signal.js +4 -2
- package/workspace/lib/task-links.js +3 -1
- package/workspace/lib/team-cli.js +164 -0
- package/workspace/lib/team-runs.js +244 -0
- package/workspace/lib/verify-runs.js +112 -0
- package/workspace/okr-goals-ui-test.js +10 -13
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-vw-backlog-test.js +2 -2
- package/workspace/premium-vw-jira-test.js +2 -2
- package/workspace/public/pm/bd-acts.js +30 -45
- package/workspace/public/pm/bd-ini-panel.js +38 -27
- package/workspace/public/pm/bd-publish.js +1 -1
- package/workspace/public/pm/bd-span.js +2 -1
- package/workspace/public/pm/bd-views.js +7 -5
- package/workspace/public/pm/bd-wf.js +5 -28
- package/workspace/public/pm/c3-ini-ui.js +9 -7
- package/workspace/public/pm/cozy-board.css +75 -31
- package/workspace/public/pm/cozy-insights.css +18 -0
- package/workspace/public/pm/cozy-nav.js +2 -2
- package/workspace/public/pm/cozy-search.js +29 -7
- package/workspace/public/pm/cozy-settings.js +39 -20
- package/workspace/public/pm/home-data.js +3 -1
- package/workspace/public/pm/home-ini-model.js +15 -1
- package/workspace/public/pm/home-ini.js +9 -3
- package/workspace/public/pm/ini-tail.js +61 -0
- package/workspace/public/pm/ini-view-model.js +10 -7
- package/workspace/public/pm/premium-board.js +119 -119
- package/workspace/public/pm/premium-insights.js +95 -112
- package/workspace/public/pm/premium-report-intel.js +3 -2
- package/workspace/public/pm/readonly.js +4 -3
- package/workspace/public/pm/stage-chip.js +2 -1
- package/workspace/public/pm/status-proof.js +43 -0
- package/workspace/public/premium-board.html +14 -35
- package/workspace/public/premium-intelligence.html +7 -9
- package/workspace/server.js +35 -1
- package/workspace/sort-order-test.js +10 -8
- package/workspace/test-files.json +4 -2
- package/workspace/test-lists/agent-team.json +9 -0
- package/workspace/test-lists/job-graph.json +11 -0
- package/workspace/test-lists/status-proof.json +5 -0
- package/workspace/workflows-setup-test.js +3 -2
- package/workspace/public/premium-chat.html +0 -14
- package/workspace/public/premium-initiative.html +0 -15
- package/workspace/public/premium-work.html +0 -14
|
@@ -33,6 +33,7 @@ import * as SC from './home-stage-card.js';
|
|
|
33
33
|
import { viewHtml, wireView } from './ini-view.js'; // the one initiative view, the Board's panel's own renderer
|
|
34
34
|
import { ensureCss as ensureStepsCss } from './cozy-steps.js'; // stage card D: the card's last node and the move sheet's words // D99: the initiative's own workflow (Change picker, switch, Won't do, Archive)
|
|
35
35
|
import * as DB from './dash-view.js'; // the ready-made Dashboard view (batch 17 item 1)
|
|
36
|
+
import * as TL from './ini-tail.js'; // under Linked, as the Board draws it (UI grill U1): drafted tickets, the PRD drift, Your impact
|
|
36
37
|
|
|
37
38
|
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
38
39
|
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>`;
|
|
@@ -42,7 +43,7 @@ const I = {
|
|
|
42
43
|
};
|
|
43
44
|
const PHONE = 760;
|
|
44
45
|
const isPhone = () => innerWidth <= PHONE;
|
|
45
|
-
const X = { ctx: null, L: new Map(), reading: new Set(), tried: new Set(), view: 'page', doc: { by: 'stage', filter: 'all', more: new Set() } };
|
|
46
|
+
const X = { ctx: null, L: new Map(), reading: new Set(), tried: new Set(), seen: new Map(), view: 'page', doc: { by: 'stage', filter: 'all', more: new Set() } };
|
|
46
47
|
|
|
47
48
|
/* ── reading the layout record ── */
|
|
48
49
|
const curM = () => { const S = X.ctx && X.ctx.S; return S && S.ini && S.ini !== 'product' && S.IMid === S.ini ? S.IM : null; };
|
|
@@ -121,7 +122,9 @@ async function doMove(id, M, to, why, o = {}) {
|
|
|
121
122
|
}
|
|
122
123
|
function autoCheck(id, M, mv) {
|
|
123
124
|
const L = Lof(id);
|
|
124
|
-
|
|
125
|
+
// a read never writes a stage: only an exit item this page saw close moves it (MD.autoFires). Record the draw before the layout is read too
|
|
126
|
+
const fires = MD.autoFires(X.seen, id, mv);
|
|
127
|
+
if (!L.read || !fires) return;
|
|
125
128
|
const k = id; // at most one move by itself per initiative while the page is open: a chain of moves would read as drift
|
|
126
129
|
if (X.tried.has(k)) return;
|
|
127
130
|
X.tried.add(k);
|
|
@@ -233,7 +236,8 @@ function pageHtml(id, M) {
|
|
|
233
236
|
const talk = isPhone() ? `<button type="button" class="hi-talk" data-hi-talk>Message Claude about ${esc(X.ctx.iniTitle(id))}</button>` : '';
|
|
234
237
|
return `<div class="hi-v hi-page" data-hi-v="page">${WF.endedHtml(rowOf(id))}`
|
|
235
238
|
+ viewHtml(v, { add: true, adding: ADDING === id, addHint: ADDING === id && ADD_DATES ? ADD_DATES.start + ' to ' + ADD_DATES.due : '', hold: true, next: !!v.stage.next, openTask: true, quick: true, docs: docs.length ? { n: docs.length } : null, wf: !(M.acts && M.acts.self) && !rowOf(id).ended,
|
|
236
|
-
person: !!X.ctx.addPerson, stagePick: true, planDates: !!X.ctx.askIn, jira: !!((X.ctx.S.D && X.ctx.S.D.board) || {}).jira
|
|
239
|
+
person: !!X.ctx.addPerson, stagePick: true, planDates: !!X.ctx.askIn, jira: !!((X.ctx.S.D && X.ctx.S.D.board) || {}).jira,
|
|
240
|
+
tail: TL.tailHtml({ ...rowOf(id), trail: (((X.ctx.S.D || {}).trail || {}).items || {})[id] || rowOf(id).trail || null }, { VW: X.ctx.VW, today: v.today }) })
|
|
237
241
|
+ `${talk}<p class="hi-small" role="status" id="ovMsg"></p></div>`;
|
|
238
242
|
}
|
|
239
243
|
/** A hold's card from the stage card (batch 11 item 21): its words and the return date, which writes an on-hold line with the new date
|
|
@@ -661,6 +665,7 @@ function pagePress(t, id, M) {
|
|
|
661
665
|
if ('wfBack' in d) { WF.backToTriage(wfUi(), id); return true; }
|
|
662
666
|
if ('hmDone' in d) { C.S.doneOpen = !C.S.doneOpen; redrawView(); return true; }
|
|
663
667
|
if ('hiTalk' in d) { C.talk(id); return true; }
|
|
668
|
+
if (d.xb === 'drift') { if (C.askIn) C.askIn(id, d.q || ''); return true; } // Jira differs from the PRD (pm/ini-tail.js): the question, typed in this chat
|
|
664
669
|
if ('hiMove' in d) { const mv = mvOf(id, M); if (!mv.canMove) return true; if (mv.open.length) popMove(t, id, M, mv); else doMove(id, M, mv.next, mv.allDone ? 'Moved by hand: every exit item is done.' : 'Moved by hand'); return true; }
|
|
665
670
|
if ('hiBack' in d) { const mv = mvOf(id, M); if (mv.canBack) popBack(t, id, M, mv); return true; }
|
|
666
671
|
if ('hiAddtask' in d) { iniAddTask(); return true; }
|
|
@@ -681,6 +686,7 @@ export function mountIni(ctx) {
|
|
|
681
686
|
ensurePopCss(); // before home-ini.css, so its phone rules win
|
|
682
687
|
if (!document.querySelector('link[data-hi-css]')) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./home-ini.css', import.meta.url).href; l.dataset.hiCss = ''; document.head.appendChild(l); }
|
|
683
688
|
ensureStepsCss(); // the stage card's step list (cozy-steps.css), before the first draw
|
|
689
|
+
TL.readImpact(() => redrawView()); // Your impact under a delivered milestone (pm/ini-tail.js), as on the Board
|
|
684
690
|
if (!document.querySelector('link[data-tk-css]')) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = new URL('./tk-tasks.css', import.meta.url).href; l.dataset.tkCss = ''; document.head.appendChild(l); }
|
|
685
691
|
ctx.VW.onChange((v) => { if (!v.open || !/^ov:/.test(v.id || '')) closePop(); });
|
|
686
692
|
return X;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* pm/ini-tail.js — what the one initiative view (pm/ini-view.js) draws under Documents and Linked, the same on the Board and on Home
|
|
2
|
+
* (UI grill U1: one initiative view). Until 8 Nov only the Board's panel drew these three parts; Home's page left them out.
|
|
3
|
+
*
|
|
4
|
+
* tailHtml(r, o) the parts, as the view's o.tail: "Drafted in PMOS" (tickets drafted here and not pushed to Jira yet), "Jira differs from
|
|
5
|
+
* the PRD" (pushed tickets whose PRD changed after the push) and, under a milestone delivered in the last 30 days, the
|
|
6
|
+
* people who made it happen (Your impact, pm/impact.js; private, read only). r: the board row with its trail (the Board's
|
|
7
|
+
* r.trail, Home's trail item). o: { VW (the Viewer: its czSections), today (iso day) }. '' when the row has none of them.
|
|
8
|
+
* driftHtml(keys) the drift part's words and its one press, data-xb="drift" with the question in data-q (the host opens the chat with it)
|
|
9
|
+
* jiraAgo(iso) "Jira · 5 min ago", the freshness words beside Jira's tickets
|
|
10
|
+
* readImpact(fn) reads this week's impact once (pm/impact.js readWeek), then fn() so the host draws again
|
|
11
|
+
* Zero is silence: a part with nothing on record draws nothing. */
|
|
12
|
+
import * as IM from './impact.js';
|
|
13
|
+
|
|
14
|
+
// the row look of the Board's panels (pm/cozy-xv.css), loaded here so Home's page draws the same; cozy-xv.js itself is not imported, as it
|
|
15
|
+
// loads premium-shell.js, whose start reads ?session= for the old dialog
|
|
16
|
+
const CSS = new URL('./cozy-xv.css', import.meta.url).href;
|
|
17
|
+
if (typeof document !== 'undefined' && !document.querySelector(`link[href="${CSS}"]`)) {
|
|
18
|
+
const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = CSS; document.head.appendChild(l);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
22
|
+
|
|
23
|
+
const lr = (o) => `<div class="xv-lr"><span class="xv-mk${o.mk ? ' ' + o.mk : ''}" aria-hidden="true"></span><span class="w"><b>${o.title}</b>${o.sub ? `<span>${esc(o.sub)}</span>` : ''}</span></div>`;
|
|
24
|
+
function draftedHtml(d, g) {
|
|
25
|
+
return d.slice(0, 8).map((x) => lr({ mk: x.waiting ? 'you' : '', title: (x.id ? `<em>${esc(x.id)}</em> ` : '') + esc(x.summary || ''), sub: 'not in Jira' })).join('')
|
|
26
|
+
+ (d.length > 8 ? lr({ title: esc(d.length - 8 + ' more drafted') }) : '')
|
|
27
|
+
+ `<p class="xv-q">They go to Jira only through your Commit${g.open === false && g.why ? '. The Commit is closed: ' + esc(g.why) : ''}.</p>`;
|
|
28
|
+
}
|
|
29
|
+
export const driftQ = (keys) => 'What changed in the PRD after ' + keys.join(', ') + ' ' + (keys.length === 1 ? 'was' : 'were') + ' pushed?';
|
|
30
|
+
export const driftHtml = (keys) => `<p>${esc(keys.join(', '))} ${keys.length === 1 ? 'was' : 'were'} pushed from an older PRD. Review ${keys.length === 1 ? 'it' : 'them'} before the next push.</p>`
|
|
31
|
+
+ `<div><button type="button" class="xv-mini" data-xb="drift" data-q="${esc(driftQ(keys))}">Discuss the change in chat</button></div>`;
|
|
32
|
+
|
|
33
|
+
/** The sections only the board's trail holds: tickets drafted in PMOS and pushed tickets that differ from the PRD. */
|
|
34
|
+
export function sections(trail) {
|
|
35
|
+
const it = trail || null, S = [];
|
|
36
|
+
const d = ((it && it.drafted) || []).filter((x) => !x.key);
|
|
37
|
+
if (d.length) S.push({ id: 'drafted', title: 'Drafted in PMOS', count: d.length, render: () => draftedHtml(d, (it && it.gate) || {}) });
|
|
38
|
+
const dr = (it && it.drift) || [];
|
|
39
|
+
if (dr.length) S.push({ id: 'drift', title: 'Jira differs from the PRD', count: dr.length, render: () => driftHtml(dr) });
|
|
40
|
+
return S;
|
|
41
|
+
}
|
|
42
|
+
export function tailHtml(r, o = {}) {
|
|
43
|
+
if (!r) return '';
|
|
44
|
+
const S = sections(r.trail);
|
|
45
|
+
const secs = S.length && o.VW && o.VW.czSections ? o.VW.czSections(S, { key: 'board' }) : '';
|
|
46
|
+
return secs + IM.madeHtml(IM.madeOf(r, o.today || new Date().toISOString().slice(0, 10)));
|
|
47
|
+
}
|
|
48
|
+
/** "Jira · 5 min ago": the freshness line the view puts beside Jira's tickets, the same words on both pages. */
|
|
49
|
+
export function jiraAgo(iso) {
|
|
50
|
+
const t = Date.parse(iso || ''); if (!t) return '';
|
|
51
|
+
const m = Math.max(0, Math.round((Date.now() - t) / 60000));
|
|
52
|
+
return 'Jira · ' + (m < 1 ? 'just now' : m < 60 ? m + ' min ago' : m < 60 * 36 ? Math.round(m / 60) + ' h ago' : Math.round(m / 1440) + ' days ago');
|
|
53
|
+
}
|
|
54
|
+
let read = null;
|
|
55
|
+
export function readImpact(fn) {
|
|
56
|
+
if (!read) {
|
|
57
|
+
read = IM.readWeek().catch(() => {});
|
|
58
|
+
if (typeof window !== 'undefined') window.addEventListener('pmos:impact', () => { setTimeout(() => IM.readWeek().then(() => fn && fn()).catch(() => {}), 0); });
|
|
59
|
+
}
|
|
60
|
+
read.then(() => fn && fn());
|
|
61
|
+
}
|
|
@@ -39,6 +39,7 @@ import { ticketGroups } from './tk-model.js'; // the drafted Jira tickets by e
|
|
|
39
39
|
import { stageSource } from './stage-chip.js'; // W1: what set the one stage, and when it was read
|
|
40
40
|
const endWord = (r) => (r && r.oneStage && ['shipped', 'on-hold', 'cancelled'].includes(r.oneStage.stage) ? r.oneStage.label : '');
|
|
41
41
|
import { lineOf } from './stage-line.js'; // the stage card's one line (batch 11 item 21)
|
|
42
|
+
import { provenStatus, fromLine, NO_SIGNAL } from './status-proof.js'; // T3: a status renders only with its source and read time
|
|
42
43
|
|
|
43
44
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
44
45
|
const CLOSED = new Set(['Done', "Won't do", 'Archived']);
|
|
@@ -102,18 +103,20 @@ export function wbsOf(title) {
|
|
|
102
103
|
/* ── the status ── */
|
|
103
104
|
export function statusOf(r, grill, fmt) {
|
|
104
105
|
const t = r.track || {};
|
|
106
|
+
// T3 (status-proof.js): On track, At risk and Done render only with the source and read time behind them; else No signal
|
|
107
|
+
const ps = provenStatus(r), from = fromLine(r.signal);
|
|
105
108
|
if (r.acts && r.acts.life === 'hold') return { tone: 'q', text: 'On hold' + (r.acts.back ? ' · back ' + r.acts.back : '') };
|
|
106
109
|
if (t.you) return { tone: 'you', text: t.you };
|
|
107
110
|
const g = grill; if (g && g.open && !g.later) return { tone: 'you', text: plural(g.open, 'question', 'questions') + ' before the BRD' };
|
|
108
111
|
if (r.late) return { tone: 'late', text: r.overDays > 0 ? plural(r.overDays, 'day', 'days') + ' over' : 'Late' };
|
|
109
|
-
if (
|
|
112
|
+
if (ps === 'at risk') return { tone: 'risk', text: 'At risk' + (r.owner ? '' : ' · no owner'), from };
|
|
110
113
|
if (t.idle != null) return { tone: 'q', text: 'Idle ' + t.idle + ' days' };
|
|
111
|
-
if (
|
|
112
|
-
const d = r.release.days; return { tone: 'ok', text: d === 0 ? 'Ships today' : d === 1 ? 'Ships tomorrow' : 'Ships ' + (fmt ? fmt(r.release.iso) : r.release.at) };
|
|
114
|
+
if (ps === 'on track' && r.release && r.release.days != null && r.release.days >= 0 && t.key === 'deliver') {
|
|
115
|
+
const d = r.release.days; return { tone: 'ok', text: d === 0 ? 'Ships today' : d === 1 ? 'Ships tomorrow' : 'Ships ' + (fmt ? fmt(r.release.iso) : r.release.at), from };
|
|
113
116
|
}
|
|
114
|
-
if (
|
|
115
|
-
if (
|
|
116
|
-
return { tone: 'q', text: r.statusLabel || '' };
|
|
117
|
+
if (ps === 'on track') return { tone: 'ok', text: 'On track', from };
|
|
118
|
+
if (ps === 'done') return { tone: 'ok', text: 'Done', from };
|
|
119
|
+
return { tone: 'q', text: ps === NO_SIGNAL && r.status ? 'No signal' : r.statusLabel || '' };
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
/* a Jira ticket's dates as words (batch 11 item 23): the start and due the PM keeps in PMOS, else the sprint's end */
|
|
@@ -248,7 +251,7 @@ export function iniView(r, ctx = {}) {
|
|
|
248
251
|
const stage = {
|
|
249
252
|
n: cur >= 0 ? cur + 1 : null, of: list.length, name: (endWord(r) || (st ? st.name : (t.label || r.stage || 'No stage on record'))), ms: !!(st && st.ms), key: st ? st.key : '',
|
|
250
253
|
// W1: what set the stage and when it was read, and the gate line (the spec ladder) the page model sends
|
|
251
|
-
source: stageSource(r), gate: ctx.gate || null,
|
|
254
|
+
source: r.oneStage && r.oneStage.setBy === 'files' && ctx.gate ? '' : stageSource(r), gate: ctx.gate || null, // set by the documents: the gate chips say it (U1)
|
|
252
255
|
doneOf, nDone: sDone, nTotal: sTotal, nLate: curRows.filter((x) => !x.closed && x.late).length, gates, day: days != null ? 'day ' + days + (usual != null ? ' of ~' + usual : '') : '', dayOver: days != null && usual != null && days > usual,
|
|
253
256
|
clock: days != null && !line.chip ? (usual != null ? days + ' of ~' + usual + ' days' : plural(days, 'day', 'days')) : '', line, ready,
|
|
254
257
|
ladder: list.map((s) => ({ name: s.name, ms: s.ms, cls: s.status })), dates, next: nx,
|