create-pmos 0.565.0 → 0.566.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 +20 -14
- 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/gate-initiative.sh +6 -3
- package/payload/scripts/workflow-state.js +18 -7
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +19 -0
- package/workspace/fixtures/initiatives-api/list.json +2 -1
- package/workspace/guide/cli.md +2 -2
- package/workspace/guide/initiatives-and-next-steps.md +4 -4
- package/workspace/guide/jira.md +3 -1
- package/workspace/lib/agent-team.js +1 -1
- package/workspace/lib/description-props.js +53 -2
- package/workspace/lib/engine/workflow-state.js +18 -7
- package/workspace/lib/grill-cli.js +4 -4
- package/workspace/lib/impact-cli.js +3 -3
- package/workspace/lib/initiative-cli.js +7 -4
- package/workspace/lib/jira-cli.js +2 -0
- package/workspace/lib/jira-tickets.js +78 -5
- package/workspace/lib/lab-cli.js +1 -1
- package/workspace/lib/lead-cli.js +1 -1
- package/workspace/lib/measure-cli.js +13 -7
- package/workspace/lib/measurements.js +34 -11
- package/workspace/lib/metrics-cli.js +4 -4
- package/workspace/lib/outcomes-cli.js +2 -2
- package/workspace/lib/program-cli.js +2 -2
- package/workspace/lib/propose-cli.js +2 -2
- package/workspace/lib/report-draft.js +5 -5
- package/workspace/lib/report-engine.js +1 -1
- package/workspace/lib/routes-artefacts.js +3 -2
- package/workspace/lib/routes-board-premium.js +2 -0
- package/workspace/lib/routes-initiatives.js +1 -1
- package/workspace/lib/routes-stage-tools.js +1 -1
- package/workspace/lib/team-cli.js +4 -1
- package/workspace/lib/today-cli.js +1 -1
- package/workspace/lib/vendor/scripts/workflow-state.js +18 -7
- package/workspace/lib/work-kind.js +16 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-asks.js +1 -1
- package/workspace/public/pm/bd-ini-panel.js +1 -1
- package/workspace/public/pm/bd-next.js +9 -5
- package/workspace/public/pm/bd-views.js +1 -1
- package/workspace/public/pm/ini-agent.js +14 -7
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/work-kind.js +10 -6
- package/workspace/skills/measure.skill +6 -6
|
@@ -860,7 +860,7 @@ function computeWorkflowDerived(id, opts) {
|
|
|
860
860
|
|
|
861
861
|
// ── D68: the pm-artifacts ladder replaces everything after the anchor ─────────────────────────
|
|
862
862
|
if (pmProfile) {
|
|
863
|
-
return pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, recRel, range, inChange, lastActivity, opts });
|
|
863
|
+
return pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, recRel, range, inChange, lastActivity, opts, doneTest, killCond });
|
|
864
864
|
}
|
|
865
865
|
|
|
866
866
|
const prd = String(fm.prd_path || '').trim();
|
|
@@ -1536,7 +1536,8 @@ function jiraKeysOf(L, id, fm) {
|
|
|
1536
1536
|
* every profile — D59/D67); route is re-stated here because its product-code form asks the
|
|
1537
1537
|
* specimen/surface questions, which a PM document does not need. What follows is evidence-derived
|
|
1538
1538
|
* like every other rung — nothing is declared done:
|
|
1539
|
-
* brief — the brief file (`brief_path`, or `prd_path`) exists
|
|
1539
|
+
* brief — the brief file (`brief_path`, or `prd_path`) exists; or, for a D107 experiment, its done test
|
|
1540
|
+
* (`done_test_path`, present) and its kill condition (`kill:`), as the Viewer gate reads them (launch simulation W4)
|
|
1540
1541
|
* draft — the deliverable (`doc_path`) exists, and — governed only — did not appear before the brief
|
|
1541
1542
|
* review — an evals.jsonl verdict for this id, or a named `reviewed_by:` (a rubric, an agent, a human)
|
|
1542
1543
|
* approved — the PM's acceptance in acceptances.jsonl (D12, never automatic)
|
|
@@ -1548,7 +1549,7 @@ function jiraKeysOf(L, id, fm) {
|
|
|
1548
1549
|
* existence and their order fail CI for a non-legacy record). Review, approval and handoff are never
|
|
1549
1550
|
* CI-blocking in either track: none can be true before the PR exists.
|
|
1550
1551
|
*/
|
|
1551
|
-
function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, recRel, range, inChange, lastActivity, opts }) {
|
|
1552
|
+
function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, recRel, range, inChange, lastActivity, opts, doneTest = '', killCond = '' }) {
|
|
1552
1553
|
const declared = String(fm.track || '').trim().toLowerCase();
|
|
1553
1554
|
const track = declared === 'light' || declared === 'governed' ? declared
|
|
1554
1555
|
: (laneDefs.laneDef('pm-artifacts', effLane) || laneDefs.laneDef('pm-artifacts', 'prd')).track;
|
|
@@ -1560,7 +1561,9 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1560
1561
|
const skipped = (key, label) => step(key, label, 'na', `${effLane} lane — ${label} is not part of this flow`);
|
|
1561
1562
|
|
|
1562
1563
|
// route — the lane is a pm-artifacts lane
|
|
1563
|
-
steps[0] =
|
|
1564
|
+
steps[0] = doneTest
|
|
1565
|
+
? step('route', 'route', 'done', 'experiment — its done test and specimens route it (D107)')
|
|
1566
|
+
: knownLane
|
|
1564
1567
|
? step('route', 'route', 'done', `${lane} lane · ${track} track (pm-artifacts profile, D68)`)
|
|
1565
1568
|
: step('route', 'route', 'done', `unknown lane '${lane}' — treated as a governed prd, the profile's strictest (D68)`,
|
|
1566
1569
|
`set lane: to one of ${laneNames('pm-artifacts').join(', ')}`);
|
|
@@ -1571,10 +1574,18 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1571
1574
|
const docPath = String(fm.doc_path || '').trim();
|
|
1572
1575
|
const foundBrief = exists(briefPath) ? null : foundOf('brief');
|
|
1573
1576
|
const foundDraft = exists(docPath) ? null : foundOf('draft');
|
|
1574
|
-
|
|
1577
|
+
// D107: a done test with its kill condition is the experiment's brief; the deliverable is ordered after it like any brief.
|
|
1578
|
+
const dtPresent = exists(doneTest);
|
|
1579
|
+
const briefIdx = dtPresent && killCond ? firstAppearance(root, range, doneTest)
|
|
1580
|
+
: briefPath ? firstAppearance(root, range, briefPath) : null;
|
|
1575
1581
|
const docIdx = docPath ? firstAppearance(root, range, docPath) : null;
|
|
1576
1582
|
|
|
1577
|
-
if (
|
|
1583
|
+
if (doneTest && dtPresent && killCond) steps.push(step('brief', def.brief_label, 'done', `done test ${doneTest} + kill condition (D107)`));
|
|
1584
|
+
else if (doneTest && dtPresent) steps.push(step('brief', def.brief_label, 'blocked', 'no kill condition — an experiment states what would stop it (D107)',
|
|
1585
|
+
`write kill: "<the result that would make us stop>" in ${recRel}`, { blocking: !legacy, rule: 'R2' }));
|
|
1586
|
+
else if (doneTest) steps.push(step('brief', def.brief_label, 'blocked', `done_test_path '${doneTest}' does not exist in the repo`,
|
|
1587
|
+
'create the done test the record points at, or correct done_test_path', { blocking: !legacy, rule: 'R2' }));
|
|
1588
|
+
else if (!flows('brief')) steps.push(skipped('brief', def.brief_label));
|
|
1578
1589
|
else if (foundBrief) steps.push(step('brief', def.brief_label, 'done', `${foundBrief} — found by the repository scan`));
|
|
1579
1590
|
else if (exists(briefPath)) steps.push(step('brief', def.brief_label, 'done', `${briefPath} present`));
|
|
1580
1591
|
else steps.push(step('brief', def.brief_label, enforce ? 'blocked' : 'pending',
|
|
@@ -1587,7 +1598,7 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1587
1598
|
else if (exists(docPath)) {
|
|
1588
1599
|
const inOrder = briefIdx == null || docIdx == null ? null : docIdx >= briefIdx;
|
|
1589
1600
|
if (enforce && inOrder === false) {
|
|
1590
|
-
steps.push(step('draft', def.draft_label, 'blocked', `${docPath} appeared before its brief ${briefPath}`,
|
|
1601
|
+
steps.push(step('draft', def.draft_label, 'blocked', `${docPath} appeared before its brief ${dtPresent && killCond ? doneTest : briefPath}`,
|
|
1591
1602
|
'a governed document is briefed before it is drafted — the brief must land first', { blocking: true, rule: 'P2' }));
|
|
1592
1603
|
} else steps.push(step('draft', def.draft_label, 'done', `${docPath} present`));
|
|
1593
1604
|
} else steps.push(step('draft', def.draft_label, enforce && docPath ? 'blocked' : 'pending',
|
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
* valid(value) → bool one of the three, exactly
|
|
9
9
|
* fromName(name, lane) → { kind, cue } the pre-pick from the name and the intake draft's lane; cue is the word that decided it,
|
|
10
10
|
* or '' when nothing did (then the kind is 'product' and the page shows no ✦ line)
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* factoryRuns(root) → bool a D65 factory runs in this repository: planning/work-items.jsonl and scripts/verify-work.js are both there.
|
|
12
|
+
* Only then may a page say "PMOS builds it". A product repository made by create-pmos has neither today.
|
|
13
|
+
* executorOf(kind, factory) → 'factory' | 'team-agents' | 'team' who builds by default (lib/artefacts.js EXECUTORS): Full SDLC → PMOS
|
|
14
|
+
* (the factory, D65: propose-only, the PM merges) where a factory runs, else the team's agents (PMOS writes
|
|
15
|
+
* the done test and the pull request plan); Product and Project → the team
|
|
13
16
|
*
|
|
14
17
|
* A HINT, NOT A LANE (D107). The kind sits on the record beside the lane; it does not replace the lane. The Initiative Gate, the stages
|
|
15
18
|
* and the default workflow do not read it. No model call: the pre-pick is the small word table below, and when it cannot tell it says so
|
|
@@ -43,6 +46,15 @@ function fromName(name, lane) {
|
|
|
43
46
|
return { kind: DEFAULT, cue: '' };
|
|
44
47
|
}
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
/* HONEST ABOUT WHO BUILDS (launch simulation W3, 2026-11-12). Full SDLC used to promise "PMOS builds the first pull request" in every
|
|
50
|
+
* workspace. The factory is the D65 work-item engine (scripts/work-item.js, scripts/verify-work.js, planning/work-items.jsonl), which only
|
|
51
|
+
* the PMOS repository carries; the kit does not vendor it. So the promise is made only where both files are on disk. */
|
|
52
|
+
const fs = require('fs');
|
|
53
|
+
const path = require('path');
|
|
54
|
+
const factoryRuns = (root) => {
|
|
55
|
+
if (!root || typeof root !== 'string') return false;
|
|
56
|
+
try { return fs.statSync(path.join(root, 'planning', 'work-items.jsonl')).isFile() && fs.statSync(path.join(root, 'scripts', 'verify-work.js')).isFile(); } catch { return false; }
|
|
57
|
+
};
|
|
58
|
+
const executorOf = (kind, factory) => (kindOf(kind) !== 'sdlc' ? 'team' : factory ? 'factory' : 'team-agents');
|
|
47
59
|
|
|
48
|
-
module.exports = { KINDS, LABEL, SHORT, DEFAULT, valid, kindOf, fromName, executorOf };
|
|
60
|
+
module.exports = { KINDS, LABEL, SHORT, DEFAULT, valid, kindOf, fromName, executorOf, factoryRuns };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.566.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.566.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -125,7 +125,7 @@ function materialChips() {
|
|
|
125
125
|
+ N.files.map((f, i) => `<span class="bd-chip sm">${SV(I.file)}${esc(f.name)}<button type="button" class="bd-x0" data-rmfile="${i}" aria-label="Remove ${esc(f.name)}">${SV(I.x)}</button></span>`).join('');
|
|
126
126
|
}
|
|
127
127
|
/** Kind of work (batch 29 item 11, KdA/KdAP): the pill switch with its caption, and the ✦ line while the pick is PMOS's from the name. */
|
|
128
|
-
const kindBox = () => WK.segHtml(N.kind, N.kindBy === 'pmos');
|
|
128
|
+
const kindBox = () => WK.segHtml(N.kind, N.kindBy === 'pmos', !!M().board.factory);
|
|
129
129
|
function hintsHtml() {
|
|
130
130
|
const p = N.prior && N.prior[0] && !N.ack ? `<div class="bd-warn"><b>Close to something you declined</b><span>“${esc(N.prior[0].title)}” was set aside in ${esc(N.prior[0].file)}.</span><div class="bd-arow"><button type="button" class="bd-btn sm" data-newact="seewhy">See why</button><button type="button" class="bd-btn sm ghost" data-newact="ack">It is different</button></div></div>` : '';
|
|
131
131
|
const c = N.close ? `<div class="bd-need">${SV(I.info)}<span>Also close to <button type="button" class="bd-dlink" data-newact="close">${esc(N.close.title)}</button> in ${esc(N.close.stage || 'its stage')}. Add to it instead?</span></div>` : '';
|
|
@@ -269,7 +269,7 @@ export function openIni(r, from, o = {}) {
|
|
|
269
269
|
else if (a === 'kind' && x.id) WK.pick(b, x.kind, (to) => WK.change({ pmPost, ws: where(x).ws, id: x.id, from: x.kind, to, toast: (t, u) => O.toast(t, u),
|
|
270
270
|
// the row shows the new kind at once (its icon, the Next words, the Experiment); the Board's read catches up in the background
|
|
271
271
|
apply: (k) => { const y = O.rowOf(r.key) || x; y.kind = k; VW.setPresses(vidOf(y), [WK.pressOf(k)].concat(dashFor(y) ? dashFor(y).presses() : [])); if (O.redraw) O.redraw(); refresh(true); },
|
|
272
|
-
reload: async () => { if (O.reload) await O.reload(); } }));
|
|
272
|
+
reload: async () => { if (O.reload) await O.reload(); } }), !!((O.M() || {}).board || {}).factory);
|
|
273
273
|
},
|
|
274
274
|
render: (body) => { const x = O.rowOf(r.key) || r; cur = { key: x.key, tk: null }; O.onShow(x.key, from); body.innerHTML = iniBody(x); wire(body, x.key); { const h = dashFor(x); if (h) h.wire(body); } if (adding === x.key) { const f = body.querySelector('#ivAddTask'); if (f && document.activeElement !== f) f.focus(); } },
|
|
275
275
|
onClose: () => { if (cur && cur.key === r.key && !cur.tk) { cur = null; O.onHide(); } } });
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
* work?), a move the team reads (the next stage, the drafted tickets to Jira) and the sign-off. No PRD counters: a part count is the step's
|
|
6
6
|
* machinery, not the PM's. Ticket and task counts stay: they are the team's work, read from Jira and the tasks.
|
|
7
7
|
*
|
|
8
|
-
* nextOf(r, ctx) → { who: claude | you | team, words, when, count, tone, title, act } | null PURE. ctx: { self (a PMOS-self board)
|
|
9
|
-
*
|
|
8
|
+
* nextOf(r, ctx) → { who: claude | you | team, words, when, count, tone, title, act } | null PURE. ctx: { self (a PMOS-self board),
|
|
9
|
+
* factory (a D65 factory runs in this repository: the board model's board.factory, lib/work-kind.js factoryRuns) }
|
|
10
|
+
* r.kind (batch 29 item 11) words PMOS's own steps: Product as below, Project as dates and chasing, Full SDLC's Build as its
|
|
11
|
+
* pull request, said as PMOS's only where a factory runs (launch simulation W3); elsewhere the team's agents build it
|
|
10
12
|
* nextHtml(r, o) → the cell's markup. o: { self, icon (false on the phone), due (false in the List: Finish says the date) }
|
|
11
13
|
*
|
|
12
14
|
* The icon action stays only where PMOS does the step from the page (move the stage, add a stage task, link the epic, read Jira): a button with
|
|
@@ -31,7 +33,9 @@ const KIND_WORDS = {
|
|
|
31
33
|
project: { triage: 'PMOS writes the plan and its dates', discover: 'PMOS writes the plan and its dates', plan: 'PMOS sets the dates with the team', build: 'PMOS chases the team for the first update', monitor: 'PMOS writes the status line' },
|
|
32
34
|
sdlc: { build: 'PMOS builds the first pull request' },
|
|
33
35
|
};
|
|
34
|
-
|
|
36
|
+
// W3: no factory in this repository, so the team's agents build and PMOS hands them the plan
|
|
37
|
+
const SDLC_NO_FACTORY = { build: 'PMOS writes the pull request plan for the team’s agents' };
|
|
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; };
|
|
35
39
|
const ANCHOR = 'PMOS anchors it to a goal';
|
|
36
40
|
const OPEN_TK = ['In review', 'In progress', 'To do'];
|
|
37
41
|
const CLOSED = new Set(['Done', "Won't do", 'Archived']);
|
|
@@ -82,8 +86,8 @@ export function nextOf(r, ctx = {}) {
|
|
|
82
86
|
return moveLine(r, ctx, count);
|
|
83
87
|
}
|
|
84
88
|
const epic = (it.links && it.links.epic) || (r.epics || [])[0] || null;
|
|
85
|
-
// Full SDLC builds with PMOS's
|
|
86
|
-
if (key === 'build' && !epic && kindWords(r, 'build')) return claude(kindWords(r, 'build'));
|
|
89
|
+
// Full SDLC builds with pull requests (PMOS's where a factory runs, else the team's agents'; no Jira epic needed); Project chases the team
|
|
90
|
+
if (key === 'build' && !epic && kindWords(r, 'build', ctx)) return claude(kindWords(r, 'build', ctx));
|
|
87
91
|
return epic ? claude('PMOS reads Jira', { act: { kind: 'jira', label: 'Read Jira again for ' + epic } }) : claude('PMOS finds the Jira epic', { act: { kind: 'epic', label: 'Link the Jira epic' } });
|
|
88
92
|
}
|
|
89
93
|
const past = r.end && /^\d{4}-\d{2}-\d{2}/.test(r.end) && String(r.end).slice(0, 10) < new Date().toISOString().slice(0, 10);
|
|
@@ -86,7 +86,7 @@ function listRow(r, pg) {
|
|
|
86
86
|
+ `<button type="button" class="bd-ltn ini2" data-key="${esc(r.key)}" role="rowheader" aria-haspopup="dialog"><b>${WK.iconHtml(r.kind)}${nameHtml(r)}</b></button>${pcells}`
|
|
87
87
|
+ `<span role="cell" class="bd-wfn">${WF.wfIcon(WF.wfOf(r), 18)}<span class="bd-ell">${esc(WF.wfOf(r).name)}</span></span><span role="cell">${stageChip(r, { ms: (r.track || {}).ms })}${(r.track || {}).days ? ' <span class="bd-ell">' + (r.track || {}).days + 'd</span>' : ''}</span><span role="cell">${catPill(r)}</span>`
|
|
88
88
|
+ `<span role="cell" class="cs s-${s.tone}"><i class="cz-dot ${s.tone} ${s.mo || ''}"></i>${esc(s.text)}</span>`
|
|
89
|
-
+ `<span role="cell">${avatar(r.owner)}</span><span role="cell" class="bd-nxc">${nextHtml(r, { self: M().board.self, due: false })}</span>`
|
|
89
|
+
+ `<span role="cell">${avatar(r.owner)}</span><span role="cell" class="bd-nxc">${nextHtml(r, { self: M().board.self, factory: M().board.factory, due: false })}</span>`
|
|
90
90
|
+ `<span role="cell"${r.over ? ' class="bd-late"' : ''}>${esc(finish)}</span>`
|
|
91
91
|
+ `<button type="button" class="bd-ib sm" data-rowmenu="${esc(r.key)}" aria-haspopup="menu" aria-expanded="false" aria-label="More for ${esc(r.title)}" title="Actions">${SV(MORE)}</button></div>`;
|
|
92
92
|
}
|
|
@@ -34,13 +34,20 @@ const P = { undo: 'M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3', check: 'M5 12l5 5 9-
|
|
|
34
34
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
35
35
|
const dm = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
36
36
|
const DAY = 864e5, SHOW = 3;
|
|
37
|
-
export const WHO = { factory: 'PMOS builds it and opens pull requests. You merge.', team: 'The team builds it. PMOS writes the done test.', 'team-agents': 'The team’s agents build it. PMOS writes the done test.' };
|
|
37
|
+
export const WHO = { factory: 'PMOS builds it and opens pull requests. You merge.', team: 'The team builds it. PMOS writes the done test.', 'team-agents': 'The team’s agents build it. PMOS writes the done test and the pull request plan.' };
|
|
38
|
+
/* HONEST ABOUT WHO BUILDS (launch simulation W3, 2026-11-12): "PMOS builds it" is said only where a D65 factory runs in the repository (the
|
|
39
|
+
* artefacts answer's `factory`, lib/work-kind.js factoryRuns). Elsewhere Full SDLC defaults to the team's agents, the factory is not offered
|
|
40
|
+
* in the picker, and a line someone set to the factory says plainly that nothing here builds it. */
|
|
41
|
+
export const NO_FACTORY = 'No factory runs in this repository, so PMOS does not build it. The team’s agents build it; PMOS writes the done test and the pull request plan.';
|
|
42
|
+
const whoText = (ex, factory) => (ex === 'factory' && !factory ? NO_FACTORY : WHO[ex] || ex);
|
|
43
|
+
const picks = (factory, now) => Object.keys(WHO).filter((p) => p !== 'factory' || factory || now === 'factory');
|
|
38
44
|
/* THE KIND OF WORK (batch 29 item 11, boards KdV1-3): the kind is named once, in the Experiment's header, and the rows follow it. Who builds
|
|
39
45
|
* defaults from the kind until someone writes it (Full SDLC: PMOS, the factory; Product and Project: the team); Project reads "Who does it"
|
|
40
46
|
* and needs no specimens. A kind never changes a line someone wrote. */
|
|
41
47
|
export const KIND = { product: 'Product management', sdlc: 'Full SDLC', project: 'Project management' };
|
|
42
48
|
const kindOf = (k) => (KIND[k] ? k : 'product');
|
|
43
49
|
const DEF_EX = { product: 'team', sdlc: 'factory', project: 'team' };
|
|
50
|
+
const defEx = (k, factory) => (k === 'sdlc' && !factory ? 'team-agents' : DEF_EX[k]);
|
|
44
51
|
const PROJECT_WHO = 'The team does it. PMOS chases, syncs the dates and writes the status line.';
|
|
45
52
|
/** The Experiment's rows for one kind: the model's rows, with Who builds from the kind when nobody wrote it, and Project's wording. */
|
|
46
53
|
export function kindRows(M, kind) {
|
|
@@ -49,8 +56,8 @@ export function kindRows(M, kind) {
|
|
|
49
56
|
let i = rows.findIndex((r) => r.key === 'executor');
|
|
50
57
|
if (i < 0) {
|
|
51
58
|
const at = rows.findIndex((r) => r.key === 'specimens' || r.key === 'done');
|
|
52
|
-
const ex =
|
|
53
|
-
const r = { key: 'executor', label: 'Who builds', text: WHO[ex], value: ex, by: '', at: '', sub:
|
|
59
|
+
const ex = defEx(k, M.factory);
|
|
60
|
+
const r = { key: 'executor', label: 'Who builds', text: WHO[ex], value: ex, by: '', at: '', sub: ex === 'factory' ? 'Set one experiment to the team in Jira any time.' : '', def: true, edit: { artefact: 'experiment', field: 'executor', pick: picks(M.factory, ex) } };
|
|
54
61
|
if (at < 0) rows.push(r); else rows.splice(at, 0, r);
|
|
55
62
|
i = rows.indexOf(r);
|
|
56
63
|
}
|
|
@@ -77,13 +84,13 @@ export function agentModel(A, U, id, o = {}) {
|
|
|
77
84
|
const X = art(A, 'experiment'), S = art(A, 'specimens'), T = art(A, 'done-test');
|
|
78
85
|
const row = (key, label, v, edit) => (v ? { key, label, text: v.text, by: v.by || '', at: v.at || '', edit: edit || null } : null);
|
|
79
86
|
const hyp = one(X, 'hypothesis') || (carried(X, 'hypothesis')[0] ? { text: carried(X, 'hypothesis')[0].text } : null);
|
|
80
|
-
const kill = one(X, 'kill'), budget = one(X, 'budget'), ex = one(X, 'executor');
|
|
87
|
+
const kill = one(X, 'kill'), budget = one(X, 'budget'), ex = one(X, 'executor'), factory = !!(A && A.factory);
|
|
81
88
|
const kept = one(S, 'kept'), tries = list(S, 'specimen'), checks = list(T, 'check'), result = one(T, 'result');
|
|
82
89
|
const rows = [
|
|
83
90
|
row('hypothesis', 'We bet', hyp, { artefact: 'experiment', field: 'hypothesis' }),
|
|
84
91
|
row('kill', 'Stop if', kill, { artefact: 'experiment', field: 'kill' }),
|
|
85
92
|
row('budget', 'Budget', budget, { artefact: 'experiment', field: 'budget' }),
|
|
86
|
-
ex ? { key: 'executor', label: 'Who builds', text:
|
|
93
|
+
ex ? { key: 'executor', label: 'Who builds', text: whoText(ex.text, factory), value: ex.text, by: ex.by || '', at: ex.at || '', edit: { artefact: 'experiment', field: 'executor', pick: picks(factory, ex.text) } } : null,
|
|
87
94
|
kept ? row('specimens', 'Specimens', { ...kept, text: 'Kept: ' + kept.text + (tries.length > 1 ? ' (of ' + tries.length + ' attempts)' : '') })
|
|
88
95
|
: tries.length ? row('specimens', 'Specimens', { text: tries.length + (tries.length === 1 ? ' attempt' : ' attempts') + ', none kept yet: ' + tries[tries.length - 1].text, at: tries[tries.length - 1].at }) : null,
|
|
89
96
|
checks.length ? { key: 'done', label: 'Done when', text: checks.map((c) => c.text).join(' · '), sub: result ? 'Result: ' + result.text : '', at: checks[checks.length - 1].at || '', edit: null } : null,
|
|
@@ -100,7 +107,7 @@ export function agentModel(A, U, id, o = {}) {
|
|
|
100
107
|
const week = work.filter((w) => now - Date.parse(w.at) <= 7 * DAY).length;
|
|
101
108
|
const AH = o.ahead && o.ahead.ok !== false ? o.ahead : null;
|
|
102
109
|
const ahead = AH ? { outcome: AH.outcome || null, jobs: Array.isArray(AH.jobs) ? AH.jobs : [] } : null;
|
|
103
|
-
return { id, ws: (U && U.ws) || (A && A.ws) || '', exp, gate, work, week, failed, ahead, kill: kill ? kill.text : '', budget: budget ? budget.text : '' };
|
|
110
|
+
return { id, ws: (U && U.ws) || (A && A.ws) || '', exp, gate, work, week, failed, ahead, kill: kill ? kill.text : '', budget: budget ? budget.text : '', factory };
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
/** D107: with an experiment on record, the gate to Build is its done test and its kill condition (not the PRD and the rubric). */
|
|
@@ -228,7 +235,7 @@ export function edit(btn) {
|
|
|
228
235
|
const sec = btn.closest('[data-ia]'), id = sec && sec.dataset.ia, M = cached(id);
|
|
229
236
|
const r = kindRows(M, sec && sec.dataset.iaKind).find((x) => x.key === btn.dataset.iaEdit);
|
|
230
237
|
if (!r || !r.edit) return;
|
|
231
|
-
const field = r.edit.pick ? `<select name="v" aria-label="${esc(r.label)}">${r.edit.pick.map((p) => `<option value="${esc(p)}"${p === r.value ? ' selected' : ''}>${esc(
|
|
238
|
+
const field = r.edit.pick ? `<select name="v" aria-label="${esc(r.label)}">${r.edit.pick.map((p) => `<option value="${esc(p)}"${p === r.value ? ' selected' : ''}>${esc(whoText(p, M && M.factory))}</option>`).join('')}</select>`
|
|
232
239
|
: `<textarea name="v" rows="2" aria-label="${esc(r.label)}">${esc(r.text)}</textarea>`;
|
|
233
240
|
const f = document.createElement('form');
|
|
234
241
|
f.className = 'ia-xr ia-ed'; f.dataset.iaKey = r.key;
|
|
@@ -507,7 +507,7 @@ function trackRow(r, cls = '', po = false) {
|
|
|
507
507
|
return `<div class="bt-r bt-l${cls}${peek && peek.key === r.key && peek.kind !== 'acts' ? ' sel' : ''}${r.acts && r.acts.life === 'hold' ? ' held' : ''}" role="row" data-row="${esc(r.key)}"${po ? ` data-po-id="${esc(r.id)}"` : ''}>${po ? PO.gripHtml(r.title) : ''}`
|
|
508
508
|
+ `<button type="button" class="ini2 bt-nm" data-key="${esc(r.key)}" role="rowheader" aria-haspopup="dialog"><b>${r.inProgram ? PG.memberIcon(PGS, r.inProgram) : ''}${many ? WF.wfIcon(WF.wfOf(r), 18) : ''}${WK.iconHtml(r.kind)}${SM.nameHtml(r)}</b><span class="cs s-${s.tone}"${s.from ? ` title="${esc(s.from)}"` : ''}><i class="cz-dot ${s.tone}"></i>${esc(s.text)}</span><span class="bt-pst">${t.ms ? '<i class="cz-ms" aria-hidden="true"></i>' : ''}${esc(t.label)} · ${DAYS(t)}</span></button>`
|
|
509
509
|
+ `<div class="${cellsCls()}" role="presentation"${cellsStyle()}>${cells}</div>`
|
|
510
|
-
+ `<div class="bt-dl" role="cell">${nextHtml(r, { self: M.board.self, icon: !small() })}</div></div>`; // the Next cell (XocA): what finishes the step next
|
|
510
|
+
+ `<div class="bt-dl" role="cell">${nextHtml(r, { self: M.board.self, factory: M.board.factory, icon: !small() })}</div></div>`; // the Next cell (XocA): what finishes the step next
|
|
511
511
|
}
|
|
512
512
|
const cellsCls = () => 'bt-cells' + (TK.mode === 'cats' ? ' bands' : TK.mode === 'wf' ? ' wfn' : '');
|
|
513
513
|
const cellsStyle = () => (TK.mode === 'wf' ? ` style="--n:${Math.max(1, TK.steps.length)}"` : '');
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* kindOf(v) → kind 'product' for anything that is not one of the three
|
|
6
6
|
* glyph(kind, w) → <svg> the glyph, aria-hidden
|
|
7
7
|
* iconHtml(kind) → the Board's icon before a title (role img, the full name in its label and tooltip)
|
|
8
|
-
*
|
|
8
|
+
* captionOf(kind, factory) → the kind's caption. Full SDLC promises that PMOS builds only where a factory runs (launch simulation W3)
|
|
9
|
+
* segHtml(kind, lean, factory) → New initiative's field: the pill switch (role radio), the caption, and the blue ✦ line when PMOS picked it (lean)
|
|
9
10
|
* pressOf(kind) → the Viewer header's press { act: 'kind', … } (cozy-viewer presses, lead: before Discuss)
|
|
10
|
-
* pick(btn, kind, onPick) the small menu of the three kinds under the header's press; onPick(kind) runs on a new one
|
|
11
|
+
* pick(btn, kind, onPick, factory) the small menu of the three kinds under the header's press; onPick(kind) runs on a new one
|
|
11
12
|
*
|
|
12
13
|
* A hint, not a lane (D107): no gate and no stage reads it. Copy says PMOS. */
|
|
13
14
|
|
|
@@ -19,6 +20,9 @@ export const CAPTION = {
|
|
|
19
20
|
sdlc: 'From idea to shipped. PMOS also builds it, as pull requests you merge.',
|
|
20
21
|
project: 'Get a piece of work delivered on time. Others do the work; PMOS chases, syncs and reports.',
|
|
21
22
|
};
|
|
23
|
+
// where no D65 factory runs (every product repository today), Full SDLC says what is true: the team's agents build
|
|
24
|
+
export const SDLC_NO_FACTORY = 'From idea to shipped. PMOS writes the done test and the pull request plan; the team’s agents build it.';
|
|
25
|
+
export const captionOf = (k, factory) => (kindOf(k) === 'sdlc' && !factory ? SDLC_NO_FACTORY : CAPTION[kindOf(k)]);
|
|
22
26
|
// compass · code brackets · three offset bars (KdA's G map)
|
|
23
27
|
export const GLYPH = {
|
|
24
28
|
product: '<circle cx="12" cy="12" r="8"/><path d="M15.5 8.5l-2 5-5 2 2-5z"/>',
|
|
@@ -44,11 +48,11 @@ export function iconHtml(k) {
|
|
|
44
48
|
return `<span class="kd-g" role="img" aria-label="${esc(n)}" title="${esc(n)}">${glyph(k)}</span>`;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
export function segHtml(k0, lean) {
|
|
51
|
+
export function segHtml(k0, lean, factory) {
|
|
48
52
|
const k = kindOf(k0);
|
|
49
53
|
const btn = (x) => `<button type="button" role="radio" aria-checked="${x === k}" aria-pressed="${x === k}" data-kind="${x}">${glyph(x)}${esc(SHORT[x])}</button>`;
|
|
50
54
|
return `<span class="bd-flbl" id="nwKindL">Kind of work</span><div class="bd-seg kd-seg" role="radiogroup" aria-labelledby="nwKindL">${KINDS.map(btn).join('')}</div>`
|
|
51
|
-
+ `<p class="kd-cap"><b>${esc(LABEL[k])}.</b> ${esc(
|
|
55
|
+
+ `<p class="kd-cap"><b>${esc(LABEL[k])}.</b> ${esc(captionOf(k, factory))}</p>`
|
|
52
56
|
+ (lean ? `<p class="kd-lean"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${SPARK}"/></svg><span>PMOS picked this from the name. Tap another kind to change it.</span></p>` : '');
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -58,9 +62,9 @@ export function pressOf(k) {
|
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
/** The header's menu of the three kinds (the initiative's shared popover, pm/hi-pop.js; a sheet on a phone). onPick(kind) runs on a new one. */
|
|
61
|
-
export function pick(btn, k0, onPick) {
|
|
65
|
+
export function pick(btn, k0, onPick, factory) {
|
|
62
66
|
const k = kindOf(k0);
|
|
63
|
-
const html = KINDS.map((x) => `<button type="button" class="hi-mi${x === k ? ' on' : ''}" role="menuitemradio" aria-checked="${x === k}" data-kind="${x}" title="${esc(
|
|
67
|
+
const html = KINDS.map((x) => `<button type="button" class="hi-mi${x === k ? ' on' : ''}" role="menuitemradio" aria-checked="${x === k}" data-kind="${x}" title="${esc(captionOf(x, factory))}">${glyph(x)}<span>${esc(LABEL[x])}</span></button>`).join('');
|
|
64
68
|
openPop(btn, 'kind', html, (b) => { const nk = b.dataset.kind; closePop(); if (nk && nk !== k && onPick) onPick(nk); }, { menu: true, label: 'Kind of work', focus: '.hi-mi.on' });
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -17,8 +17,8 @@ output:
|
|
|
17
17
|
/measure — record the current value of one or more anchors (a KR or a health budget) for THIS repository. A measurement is evidence. It is not a decision and it does not move an initiative.
|
|
18
18
|
|
|
19
19
|
Rules that always hold:
|
|
20
|
-
1. ONLY FROM A
|
|
21
|
-
2. ALWAYS A SOURCE. Every measurement has a source
|
|
20
|
+
1. ONLY FROM A SOURCE YOU CAN NAME. Read the value from a file in this repository, from an analytics tool or tracker through a connector, or from a shared document. If you cannot read the value, do not record it. Write it under "Not recorded" with the reason.
|
|
21
|
+
2. ALWAYS A SOURCE. Every measurement has a source: `<path>@<commit sha>` for a file in this repository, `connector:<name>` for a connector (for example `connector:amplitude`), or `document:<path or link>` for a shared document. A connector or document source also needs `--how`: the query, chart or cell, so a person can read the value again. The command refuses a measurement with no source, and a connector or document source with no `--how`.
|
|
22
22
|
3. NOTHING INVENTED. Do not estimate, round up or carry a value forward. If two files disagree, record neither value. Write both under "Not recorded".
|
|
23
23
|
4. ONE WRITER. Record a value only with `pmos measure add`. Do not edit `planning/runs/measurements.jsonl` or any ledger file.
|
|
24
24
|
5. NO ATTRIBUTION FLAGS. Do not give `--by` or `--via`. The command sets who wrote the line from the session.
|
|
@@ -26,11 +26,11 @@ Rules that always hold:
|
|
|
26
26
|
Procedure (each step ends with a check that shows it is done):
|
|
27
27
|
1. Find the anchors. Read `planning/okrs/` for the KRs of the current period and `planning/okrs/health-budgets.md` for the health budgets. If the PM named anchors, use only those.
|
|
28
28
|
Done when: you have a list of anchors, each as a KR (for example `KR 2.1`) or `health:<id>`.
|
|
29
|
-
2. For each anchor, find
|
|
29
|
+
2. For each anchor, find where its current value and its target are. For a file in this repository, get the commit with `git log -1 --format=%h -- <path>`. For a connector or a document, write down how you read it.
|
|
30
30
|
Done when: each anchor has a value, a target or none, a date and a source, or a reason it has none.
|
|
31
31
|
3. Record each value:
|
|
32
|
-
`pmos measure add "<anchor>" <value> --source <
|
|
33
|
-
Use the date the
|
|
32
|
+
`pmos measure add "<anchor>" <value> --source <source> [--how "<how you read it>"] [--target <number>] [--unit <unit>] [--as-of YYYY-MM-DD]`
|
|
33
|
+
Use the date the source gives for the value as `--as-of`. With no date in the source, give no `--as-of`; the command uses today.
|
|
34
34
|
Done when: the command printed "recorded" for each value. If it refused a value, read its message, correct the call once, and otherwise write the value under "Not recorded".
|
|
35
35
|
4. Check the result with `pmos measure list --json`.
|
|
36
36
|
Done when: each value you recorded is in the list.
|
|
@@ -38,6 +38,6 @@ Procedure (each step ends with a check that shows it is done):
|
|
|
38
38
|
Read before you judge: [anti-optimism](/okf/core/concepts/okr-anti-optimism.md), [output eval](/okf/core/concepts/output-eval.md).
|
|
39
39
|
|
|
40
40
|
Output sections:
|
|
41
|
-
- **Recorded** — one line per value: anchor, value, target, as_of, source.
|
|
41
|
+
- **Recorded** — one line per value: anchor, value, target, as_of, source, and how for a connector or document.
|
|
42
42
|
- **Not recorded** — one line per anchor with no value, and why.
|
|
43
43
|
- **Sources** — each file you read, with its commit.
|