create-pmos 0.564.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 +33 -27
- 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/scripts/gate-initiative.sh +6 -3
- package/payload/scripts/workflow-state.js +39 -11
- package/payload/state/discoveries.md +1 -1
- package/payload/state/log.md +1 -1
- package/workspace/changelog.json +32 -0
- package/workspace/fixtures/initiatives-api/list.json +2 -1
- package/workspace/guide/cli.md +3 -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/board-cli.js +32 -1
- package/workspace/lib/description-props.js +53 -2
- package/workspace/lib/engine/workflow-state.js +39 -11
- package/workspace/lib/grill-cli.js +4 -4
- package/workspace/lib/impact-cli.js +3 -3
- package/workspace/lib/initiative-cli.js +12 -5
- 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 +7 -6
- 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-notes.js +3 -1
- package/workspace/lib/routes-stage-tools.js +1 -1
- package/workspace/lib/stage-read.js +155 -0
- package/workspace/lib/task-cli.js +2 -16
- package/workspace/lib/team-cli.js +4 -1
- package/workspace/lib/today-cli.js +19 -6
- package/workspace/lib/vendor/scripts/workflow-state.js +39 -11
- package/workspace/lib/work-kind.js +16 -4
- package/workspace/lib/workflow-cli.js +18 -2
- 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
- package/workspace/test-lists/stage-everywhere.json +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.566.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,38 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.566.0",
|
|
38
|
+
"at": "2026-11-12T04:39:13.320Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1299,
|
|
43
|
+
"t": "Let experiments and analytics feed PMOS",
|
|
44
|
+
"s": "Let experiments and analytics feed PMOS",
|
|
45
|
+
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1297,
|
|
49
|
+
"t": "Full SDLC says PMOS builds only where a factory runs",
|
|
50
|
+
"s": "Full SDLC says PMOS builds only where a factory runs",
|
|
51
|
+
"k": "fix"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"v": "0.565.0",
|
|
57
|
+
"at": "2026-11-12T04:27:46.732Z",
|
|
58
|
+
"f": 4,
|
|
59
|
+
"prs": [
|
|
60
|
+
{
|
|
61
|
+
"n": 1296,
|
|
62
|
+
"t": "Every surface shows the one stage; pmos workflow check finds a disagreement",
|
|
63
|
+
"s": "Every surface shows the one stage; pmos workflow check finds a disagreement",
|
|
64
|
+
"k": "fix"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
36
68
|
{
|
|
37
69
|
"v": "0.564.0",
|
|
38
70
|
"at": "2026-11-11T14:08:23.553Z",
|
|
@@ -278,32 +310,6 @@
|
|
|
278
310
|
"k": "new"
|
|
279
311
|
}
|
|
280
312
|
]
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"v": "0.546.0",
|
|
284
|
-
"at": "2026-11-09T15:25:03.150Z",
|
|
285
|
-
"f": 4,
|
|
286
|
-
"prs": [
|
|
287
|
-
{
|
|
288
|
-
"n": 1274,
|
|
289
|
-
"t": "D107 ratified — experiments pass the gate on a done test and a kill condition",
|
|
290
|
-
"s": "D107 ratified — experiments pass the gate on a done test and a kill condition",
|
|
291
|
-
"k": "new"
|
|
292
|
-
}
|
|
293
|
-
]
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"v": "0.545.0",
|
|
297
|
-
"at": "2026-11-09T10:45:44.000Z",
|
|
298
|
-
"f": 4,
|
|
299
|
-
"prs": [
|
|
300
|
-
{
|
|
301
|
-
"n": 1273,
|
|
302
|
-
"t": "Seven artefacts — model, map, lossless carry, and proposed D107",
|
|
303
|
-
"s": "Seven artefacts — model, map, lossless carry, and proposed D107",
|
|
304
|
-
"k": "new"
|
|
305
|
-
}
|
|
306
|
-
]
|
|
307
313
|
}
|
|
308
314
|
]
|
|
309
315
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
kernel-source: pmos@
|
|
2
|
-
assembled: 2026-11-
|
|
1
|
+
kernel-source: pmos@862ddccd
|
|
2
|
+
assembled: 2026-11-12
|
|
3
3
|
mode: vendor
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-12T04:39:10Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-12T04:39:10Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -88,7 +88,9 @@ anchor="$(frontval parent_kr)"
|
|
|
88
88
|
|
|
89
89
|
# ---- D68: the pm-artifacts profile ------------------------------------------
|
|
90
90
|
# A repository whose root holds `.pmos-profile` reading `pm-artifacts` is a PM's documents repo: its
|
|
91
|
-
# lanes are
|
|
91
|
+
# work lanes are new-feature | improvement | bug-fix | discovery | chore and its document lanes are
|
|
92
|
+
# strategy | prd | project-plan | decision-record | report (scripts/lane-defs.js PM_ARTIFACTS, the one
|
|
93
|
+
# list `pmos initiative new` also takes; `feature` reads as new-feature, as declaredLane says), and its
|
|
92
94
|
# ladder is brief -> draft -> review -> approved -> handed off. A `light` track (the default for
|
|
93
95
|
# decision-record, report, chore) needs only the anchored record above; a `governed` track (the
|
|
94
96
|
# default for the rest) needs its brief to exist, and a draft it names to exist. Order is the
|
|
@@ -98,14 +100,15 @@ profile=""
|
|
|
98
100
|
if [ -f .pmos-profile ]; then profile="$(sed -e 's/#.*$//' -e 's/[[:space:]]//g' .pmos-profile | grep -m1 . || true)"; fi
|
|
99
101
|
if [ "$profile" = "pm-artifacts" ]; then
|
|
100
102
|
pmlane="$(frontval lane)"; [ -n "$pmlane" ] || pmlane="$lane"
|
|
103
|
+
if [ "$pmlane" = "feature" ]; then pmlane="new-feature"; fi
|
|
101
104
|
case "$pmlane" in
|
|
102
|
-
strategy|prd|project-plan|
|
|
105
|
+
new-feature|improvement|bug-fix|discovery|chore|strategy|prd|project-plan|decision-record|report) : ;;
|
|
103
106
|
*) note "unknown pm-artifacts lane '$pmlane' on '$id' — enforcing a governed prd (the profile's strictest, D68)."; pmlane="prd" ;;
|
|
104
107
|
esac
|
|
105
108
|
track="$(frontval track)"
|
|
106
109
|
case "$track" in
|
|
107
110
|
light|governed) : ;;
|
|
108
|
-
*) case "$pmlane" in decision-record|report|chore) track="light" ;; *) track="governed" ;; esac ;;
|
|
111
|
+
*) case "$pmlane" in bug-fix|decision-record|report|chore) track="light" ;; *) track="governed" ;; esac ;;
|
|
109
112
|
esac
|
|
110
113
|
if [ "$track" = "governed" ]; then
|
|
111
114
|
brief="$(frontval brief_path)"; [ -n "$brief" ] || brief="$prd"
|
|
@@ -351,6 +351,14 @@ function buildRange(root, { spec, whole }) {
|
|
|
351
351
|
* ordering rule; "I cannot tell" is not, and collapsing the second into the first is exactly how a
|
|
352
352
|
* shallow clone would turn every order check into a silent pass.
|
|
353
353
|
*/
|
|
354
|
+
/** The unix seconds of the commit that first added `rel`, or null when git cannot say. */
|
|
355
|
+
function addedDate(root, rel) {
|
|
356
|
+
const out = git(root, ['log', '--diff-filter=A', '--format=%ct', '--', rel]);
|
|
357
|
+
const lines = out ? out.split('\n').map((x) => x.trim()).filter(Boolean) : [];
|
|
358
|
+
const t = lines.length ? Number(lines[lines.length - 1]) : NaN;
|
|
359
|
+
return Number.isFinite(t) ? t : null;
|
|
360
|
+
}
|
|
361
|
+
|
|
354
362
|
function firstAppearance(root, range, rel) {
|
|
355
363
|
const onDisk = fs.existsSync(path.join(root, rel));
|
|
356
364
|
if (!range.ok) return onDisk ? undefined : null;
|
|
@@ -685,7 +693,12 @@ function computeWorkflowDerived(id, opts) {
|
|
|
685
693
|
// would suddenly be enforced. So the commit DATE decides whenever the range can supply it, and
|
|
686
694
|
// -1 keeps its meaning for the gate's range. Same question, asked of evidence that survives both.
|
|
687
695
|
const recIdx = firstAppearance(root, range, recRel);
|
|
688
|
-
|
|
696
|
+
// An EMPTY range (a branch level with main, a fresh clone, a kit repository on its trunk) gates nothing, so -1 there only means "committed
|
|
697
|
+
// before HEAD". It used to read every record as legacy, a record written today too, which turned the order rules off on the ladder
|
|
698
|
+
// (launch simulation W1, 2026-11-12). With nothing to gate, the record's own first commit dates it.
|
|
699
|
+
const emptyRange = range.ok && Array.isArray(range.shas) && range.shas.length === 0;
|
|
700
|
+
const addedAt = (recIdx === -1 && emptyRange) ? addedDate(root, recRel) : null;
|
|
701
|
+
const recAt = (range.dates && typeof recIdx === 'number' && recIdx >= 0) ? range.dates[recIdx] : addedAt;
|
|
689
702
|
/*
|
|
690
703
|
* `reconstructed_from` — the merge date of work whose record was written afterwards.
|
|
691
704
|
*
|
|
@@ -698,7 +711,7 @@ function computeWorkflowDerived(id, opts) {
|
|
|
698
711
|
* genuinely skipped the loop still reports blocked, which is the point of writing it down.
|
|
699
712
|
*/
|
|
700
713
|
const recon = String(fm.reconstructed_from || '').trim().slice(0, 10);
|
|
701
|
-
const legacy = recIdx === -1 ? true
|
|
714
|
+
const legacy = (recIdx === -1 && !addedAt) ? true
|
|
702
715
|
: /^\d{4}-\d{2}-\d{2}$/.test(recon) ? recon < ENFORCED_FROM
|
|
703
716
|
: recAt ? new Date(recAt * 1000).toISOString().slice(0, 10) < ENFORCED_FROM
|
|
704
717
|
: String(fm.timestamp || generatedAt(fm.generated) || '').slice(0, 10) < ENFORCED_FROM; // fallback — see ENFORCED_FROM; D74: OKF v0.2 `generated.at` stands in for `timestamp`
|
|
@@ -847,7 +860,7 @@ function computeWorkflowDerived(id, opts) {
|
|
|
847
860
|
|
|
848
861
|
// ── D68: the pm-artifacts ladder replaces everything after the anchor ─────────────────────────
|
|
849
862
|
if (pmProfile) {
|
|
850
|
-
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 });
|
|
851
864
|
}
|
|
852
865
|
|
|
853
866
|
const prd = String(fm.prd_path || '').trim();
|
|
@@ -1523,7 +1536,8 @@ function jiraKeysOf(L, id, fm) {
|
|
|
1523
1536
|
* every profile — D59/D67); route is re-stated here because its product-code form asks the
|
|
1524
1537
|
* specimen/surface questions, which a PM document does not need. What follows is evidence-derived
|
|
1525
1538
|
* like every other rung — nothing is declared done:
|
|
1526
|
-
* 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)
|
|
1527
1541
|
* draft — the deliverable (`doc_path`) exists, and — governed only — did not appear before the brief
|
|
1528
1542
|
* review — an evals.jsonl verdict for this id, or a named `reviewed_by:` (a rubric, an agent, a human)
|
|
1529
1543
|
* approved — the PM's acceptance in acceptances.jsonl (D12, never automatic)
|
|
@@ -1535,7 +1549,7 @@ function jiraKeysOf(L, id, fm) {
|
|
|
1535
1549
|
* existence and their order fail CI for a non-legacy record). Review, approval and handoff are never
|
|
1536
1550
|
* CI-blocking in either track: none can be true before the PR exists.
|
|
1537
1551
|
*/
|
|
1538
|
-
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 = '' }) {
|
|
1539
1553
|
const declared = String(fm.track || '').trim().toLowerCase();
|
|
1540
1554
|
const track = declared === 'light' || declared === 'governed' ? declared
|
|
1541
1555
|
: (laneDefs.laneDef('pm-artifacts', effLane) || laneDefs.laneDef('pm-artifacts', 'prd')).track;
|
|
@@ -1547,7 +1561,9 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1547
1561
|
const skipped = (key, label) => step(key, label, 'na', `${effLane} lane — ${label} is not part of this flow`);
|
|
1548
1562
|
|
|
1549
1563
|
// route — the lane is a pm-artifacts lane
|
|
1550
|
-
steps[0] =
|
|
1564
|
+
steps[0] = doneTest
|
|
1565
|
+
? step('route', 'route', 'done', 'experiment — its done test and specimens route it (D107)')
|
|
1566
|
+
: knownLane
|
|
1551
1567
|
? step('route', 'route', 'done', `${lane} lane · ${track} track (pm-artifacts profile, D68)`)
|
|
1552
1568
|
: step('route', 'route', 'done', `unknown lane '${lane}' — treated as a governed prd, the profile's strictest (D68)`,
|
|
1553
1569
|
`set lane: to one of ${laneNames('pm-artifacts').join(', ')}`);
|
|
@@ -1558,10 +1574,18 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1558
1574
|
const docPath = String(fm.doc_path || '').trim();
|
|
1559
1575
|
const foundBrief = exists(briefPath) ? null : foundOf('brief');
|
|
1560
1576
|
const foundDraft = exists(docPath) ? null : foundOf('draft');
|
|
1561
|
-
|
|
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;
|
|
1562
1581
|
const docIdx = docPath ? firstAppearance(root, range, docPath) : null;
|
|
1563
1582
|
|
|
1564
|
-
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));
|
|
1565
1589
|
else if (foundBrief) steps.push(step('brief', def.brief_label, 'done', `${foundBrief} — found by the repository scan`));
|
|
1566
1590
|
else if (exists(briefPath)) steps.push(step('brief', def.brief_label, 'done', `${briefPath} present`));
|
|
1567
1591
|
else steps.push(step('brief', def.brief_label, enforce ? 'blocked' : 'pending',
|
|
@@ -1574,7 +1598,7 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1574
1598
|
else if (exists(docPath)) {
|
|
1575
1599
|
const inOrder = briefIdx == null || docIdx == null ? null : docIdx >= briefIdx;
|
|
1576
1600
|
if (enforce && inOrder === false) {
|
|
1577
|
-
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}`,
|
|
1578
1602
|
'a governed document is briefed before it is drafted — the brief must land first', { blocking: true, rule: 'P2' }));
|
|
1579
1603
|
} else steps.push(step('draft', def.draft_label, 'done', `${docPath} present`));
|
|
1580
1604
|
} else steps.push(step('draft', def.draft_label, enforce && docPath ? 'blocked' : 'pending',
|
|
@@ -1735,7 +1759,11 @@ function renderLadder(w) {
|
|
|
1735
1759
|
const head = `${c(1, w.id)} · ${w.lane}${w.laneKnown ? '' : c(33, ' (unknown lane — enforcing feature)')} · ${w.anchor ? brief(w.anchor, 46) : c(31, 'unanchored')}`;
|
|
1736
1760
|
out.push('');
|
|
1737
1761
|
out.push(` ${head}`);
|
|
1738
|
-
|
|
1762
|
+
// The gate rung, not the initiative's stage: the stage the pages and `pmos initiative list` show is the Board's one stage (PM moves,
|
|
1763
|
+
// Jira, dated plan items, then these files; workspace/lib/stage-read.js). Printing the rung as "stage" gave one record four stages
|
|
1764
|
+
// (launch simulation W1, 2026-11-12). The engine never reads the Board (X29), so it names the rung and says where the stage is.
|
|
1765
|
+
out.push(` ${c(90, 'gate')} ${c(1, w.stage)}${w.legacy ? c(33, ` legacy — record predates ${w.enforced_from}, order rules report but do not fail`) : ''}`);
|
|
1766
|
+
out.push(` ${c(90, 'stage')} ${c(90, `pmos workflow of ${w.id} — the stage every page shows`)}`);
|
|
1739
1767
|
out.push(` ${c(90, '─'.repeat(78))}`);
|
|
1740
1768
|
for (const s of w.steps) {
|
|
1741
1769
|
const label = s.label.padEnd(11);
|
|
@@ -1901,7 +1929,7 @@ function main(argv) {
|
|
|
1901
1929
|
}
|
|
1902
1930
|
if (w.legacy) process.stdout.write(`ℹ️ '${w.id}' is LEGACY (record predates ${ENFORCED_FROM}) — order rules reported, not enforced.\n`);
|
|
1903
1931
|
if (w.range.error) process.stdout.write(`⚠️ order checks degraded — ${w.range.error}\n`);
|
|
1904
|
-
process.stdout.write(`✅ workflow gate PASSED — '${w.id}' (${w.lane}) at
|
|
1932
|
+
process.stdout.write(`✅ workflow gate PASSED — '${w.id}' (${w.lane}) at gate rung ${w.stage}.\n`);
|
|
1905
1933
|
return 0;
|
|
1906
1934
|
}
|
|
1907
1935
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-12T04:39:10Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/payload/state/log.md
CHANGED
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.566.0",
|
|
4
|
+
"at": "2026-11-12T04:39:13.320Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1299,
|
|
9
|
+
"t": "Let experiments and analytics feed PMOS",
|
|
10
|
+
"s": "Let experiments and analytics feed PMOS",
|
|
11
|
+
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1297,
|
|
15
|
+
"t": "Full SDLC says PMOS builds only where a factory runs",
|
|
16
|
+
"s": "Full SDLC says PMOS builds only where a factory runs",
|
|
17
|
+
"k": "fix"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"v": "0.565.0",
|
|
23
|
+
"at": "2026-11-12T04:27:46.732Z",
|
|
24
|
+
"f": 4,
|
|
25
|
+
"prs": [
|
|
26
|
+
{
|
|
27
|
+
"n": 1296,
|
|
28
|
+
"t": "Every surface shows the one stage; pmos workflow check finds a disagreement",
|
|
29
|
+
"s": "Every surface shows the one stage; pmos workflow check finds a disagreement",
|
|
30
|
+
"k": "fix"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
2
34
|
{
|
|
3
35
|
"v": "0.564.0",
|
|
4
36
|
"at": "2026-11-11T14:08:23.553Z",
|
package/workspace/guide/cli.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Command reference: every pmos command, by area"
|
|
4
4
|
description: "Every pmos command of the workspace in one page, grouped by area, with its flags, examples and exit codes."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-12
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Command reference
|
|
@@ -307,7 +307,7 @@ The command exits 0 when it is done, 1 when it refuses, and 2 for a usage error.
|
|
|
307
307
|
|
|
308
308
|
| Command | What it does |
|
|
309
309
|
|---|---|
|
|
310
|
-
| `pmos measure add <anchor> <value> --source <
|
|
310
|
+
| `pmos measure add <anchor> <value> --source <source> [--how "<how>"] [--target <number>] [--unit <unit>] [--as-of YYYY-MM-DD]` | Records a measurement. The source is `<path>@<sha>` (a file in this repository), `connector:<name>` (an analytics tool or tracker) or `document:<path or link>`. A connector or document source needs `--how`: the query, chart or cell. With no `--as-of`, the date is today. |
|
|
311
311
|
| `pmos measure list [<anchor>]` | Shows the measurements, oldest first, for each anchor. |
|
|
312
312
|
|
|
313
313
|
Put an anchor with a space in quotes: `pmos measure add "KR 2.1" 41 --source planning/okrs/q4.md@1a2b3c4`.
|
|
@@ -353,6 +353,7 @@ An agent writes a draft or a reading with these commands, and moves an initiativ
|
|
|
353
353
|
- `pmos workflow of <initiative>` shows the workflow the initiative runs, its current stage, and each stage numbered as done, current or skipped. It reads the same row as the Board.
|
|
354
354
|
- `pmos workflow move <initiative> --stage <key|name|number>` moves the initiative to a stage of its own workflow. A number counts from 1 in the workflow's order, so `--stage 5` is the fifth stage. `--why` adds the reason. The move writes the same line as a move on the Board, under the agent's name. On a board whose columns join two stages, such as **Build & Deliver**, the initiative still goes to the stage you name, and the joined column name means its first stage.
|
|
355
355
|
- `pmos workflow switch <initiative> --to <workflow id>` puts the initiative on another workflow. `--stage` picks the stage it lands in; without it, the stage is the one the Board's switch picks.
|
|
356
|
+
- `pmos workflow check [<initiative>]` compares the stage that each surface shows: the Board, the Viewer and `pmos workflow of`, `pmos initiative list`, and the notes and report slides. It exits 1 and names the surfaces when two of them show different stages for one initiative. `scripts/workflow-state.js` shows the CI gate rung (`gate`), not the stage.
|
|
356
357
|
|
|
357
358
|
### pmos board
|
|
358
359
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Initiatives: the Roadmap, next steps, the Driver and done"
|
|
4
4
|
description: "The ranked list of initiatives, how PMOS works out the next steps, the Initiative Driver, and integrated work."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-12
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Initiatives: the Roadmap, next steps, the Driver and done
|
|
@@ -135,15 +135,15 @@ The writer makes the record in `planning/initiatives/<id>.md` with its type, tit
|
|
|
135
135
|
**New initiative** asks for one kind of work. PMOS works out the rest from it.
|
|
136
136
|
|
|
137
137
|
- **Product.** Product management. You decide what to build and whether it worked. Engineers build it, and PMOS writes the specs.
|
|
138
|
-
- **Full SDLC.** From idea to shipped. PMOS also builds it, as pull requests that you merge.
|
|
138
|
+
- **Full SDLC.** From idea to shipped. Where a factory runs in the repository, PMOS also builds it, as pull requests that you merge. Elsewhere PMOS writes the done test and the pull request plan, and the team's agents build it. A factory runs where the repository has `planning/work-items.jsonl` and `scripts/verify-work.js`. A repository made with `create-pmos` has no factory yet.
|
|
139
139
|
- **Project.** Project management. Others do the work. PMOS chases, syncs the dates and reports.
|
|
140
140
|
|
|
141
141
|
PMOS picks a kind from the name as you type, and a blue line says so. Tap another kind to change it. After you tap a kind, PMOS does not change it. When the name gives no hint, the kind is Product.
|
|
142
142
|
|
|
143
143
|
The kind is saved as `kind:` in the record (`product`, `sdlc` or `project`). An older record with no `kind:` line reads as Product. Use `pmos initiative new --kind <kind>` to set it from a terminal. The kind is not a lane: the Initiative Gate and the stages do not read it.
|
|
144
144
|
|
|
145
|
-
- **On the Board.** A small icon before each initiative's name shows its kind. The **Next** column follows the kind. For example, Full SDLC says "PMOS builds the first pull request", and Project says "PMOS writes the status line".
|
|
146
|
-
- **In the initiative.** The same icon is in the header, before **Discuss in chat**. Tap it to change the kind. The toast has **Undo**. The Experiment names the kind once. Until someone writes **Who builds**, it comes from the kind: PMOS for Full SDLC, the team for Product and Project. Project says **Who does it** and needs no specimens. A line that you or PMOS wrote stays as written.
|
|
145
|
+
- **On the Board.** A small icon before each initiative's name shows its kind. The **Next** column follows the kind. For example, Full SDLC says "PMOS builds the first pull request" where a factory runs, and "PMOS writes the pull request plan for the team's agents" where none runs. Project says "PMOS writes the status line".
|
|
146
|
+
- **In the initiative.** The same icon is in the header, before **Discuss in chat**. Tap it to change the kind. The toast has **Undo**. The Experiment names the kind once. Until someone writes **Who builds**, it comes from the kind: PMOS for Full SDLC where a factory runs, else the team's agents; the team for Product and Project. Project says **Who does it** and needs no specimens. A line that you or PMOS wrote stays as written.
|
|
147
147
|
- **A published Board** shows the icon but has no press to change the kind.
|
|
148
148
|
|
|
149
149
|
The writer refuses:
|
package/workspace/guide/jira.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Jira: tickets drafted from the PRD, and their status"
|
|
4
4
|
description: "How to draft Jira tickets from a PRD in your ticket template, push the ones that are ready, and see their status, sprint and progress on the initiative's Jira tickets tab."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-12
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Jira: tickets drafted from the PRD, and their status
|
|
@@ -80,6 +80,8 @@ Press **Draft tickets**, or run:
|
|
|
80
80
|
pmos jira draft <initiative>
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
+
An experiment often has no PRD. When the PRD has no stories section, PMOS drafts one ticket for each check of the initiative's done test (`done_test_path`). With no done test, it drafts one ticket for each open task. Each ticket's Refs name where it came from.
|
|
84
|
+
|
|
83
85
|
The draft is a file, `<state>/tracker/jira/<initiative>-tickets.md`. Every row of the tab opens a ticket: its fields, its full text and its status in Jira. **Edit text** changes the summary and the sections. Type, Priority, Estimate and Depends on are lists.
|
|
84
86
|
|
|
85
87
|
A ticket needs a User Story, Functional Requirements and Acceptance Criteria before it can be pushed. A ticket without them shows **Missing text**.
|
|
@@ -103,7 +103,7 @@ const TEAM = Object.freeze({
|
|
|
103
103
|
connectors: ['docs'], what: 'reports and drafts; sending is class C' }),
|
|
104
104
|
build: role('build', { cls: 'C', runs: false, skills: ['builder'], budget: 0, owns: { paths: [] }, reads: ['planning/prd/', 'planning/evals/'],
|
|
105
105
|
triggers: [{ on: 'asked' }], connectors: [],
|
|
106
|
-
what: 'pull requests
|
|
106
|
+
what: 'pull requests (the factory, propose-only, D65: it opens them and never merges); never a run of this team' }),
|
|
107
107
|
});
|
|
108
108
|
/* The order roles hand off in. A dispatch keeps this order whatever roles it picks. */
|
|
109
109
|
const ORDER = Object.freeze(['strategy', 'research', 'spec', 'design', 'eval', 'delivery', 'comms']);
|
|
@@ -25,7 +25,7 @@ const USAGE = [
|
|
|
25
25
|
' pmos board --mine your own items',
|
|
26
26
|
' pmos board --init <initiative> one initiative',
|
|
27
27
|
' pmos board --json the answer of GET /api/board, for scripts',
|
|
28
|
-
'Done shows the last 14 days.
|
|
28
|
+
'Done shows the last 14 days. Tasks and breakdown items both show; `pmos task list <initiative>` lists one initiative\'s tasks with their dates.',
|
|
29
29
|
];
|
|
30
30
|
const BOOL = new Set(['json', 'mine', 'help']);
|
|
31
31
|
const VALUE = new Set(['init', 'root']);
|
|
@@ -63,6 +63,36 @@ function line(it, titleOf) {
|
|
|
63
63
|
return bits.join(' · ');
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/* The initiative's tasks (launch simulation W1, 2026-11-12). The fold above holds the breakdown items only, so `pmos board` printed 0 items
|
|
67
|
+
* while `pmos task list` printed 4. Each Board task joins its column as the Board page shows it: To do → Todo, In progress → Doing,
|
|
68
|
+
* Done → Done (the last 14 days; older ones are counted). Won't do and Archived are not on the Board. The breakdown items are already in
|
|
69
|
+
* the fold, so only the Board tasks are added here (lib/stage-read.js tasksOf, the reader of `pmos task list`). */
|
|
70
|
+
const TASK_COL = { 'To do': 'todo', 'In progress': 'doing', Done: 'done' };
|
|
71
|
+
const DONE_WINDOW_MS = 14 * 86400000;
|
|
72
|
+
function addTasks(out, root, now) {
|
|
73
|
+
let SR, sw, sctx;
|
|
74
|
+
try { SR = require('./stage-read.js'); ({ w: sw, ctx: sctx } = SR.cliCtx(root)); } catch { return; }
|
|
75
|
+
if (!sctx.stateDirFor()) return;
|
|
76
|
+
const at = Number.isFinite(now) ? now : Date.parse(out.now) || Date.now();
|
|
77
|
+
const only = out.filter.startsWith('init:') ? out.filter.slice(5) : null;
|
|
78
|
+
for (const ini of out.initiatives) {
|
|
79
|
+
if (only && ini.id !== only) continue;
|
|
80
|
+
let tasks = [];
|
|
81
|
+
try { tasks = SR.tasksOf(sctx, sw, ini.id).filter((t) => t.store !== 'item'); } catch { tasks = []; }
|
|
82
|
+
for (const t of tasks) {
|
|
83
|
+
const col = TASK_COL[t.state];
|
|
84
|
+
if (!col) continue;
|
|
85
|
+
if (out.filter === 'mine' && t.owner !== 'you') continue;
|
|
86
|
+
const last = Math.max(Date.parse(t.at) || 0, ...(t.history || []).map((h) => Date.parse(h && h.at) || 0));
|
|
87
|
+
if (col === 'done' && at - last > DONE_WINDOW_MS) { out.board.doneOlder++; continue; }
|
|
88
|
+
out.items[t.id] = { id: t.id, initiative: ini.id, title: t.title, state: col, owner: t.owner || '', stageLabel: t.stage || 'task', due: t.due || null, task: true };
|
|
89
|
+
out.board[col].push(t.id);
|
|
90
|
+
ini.shown = (ini.shown || 0) + 1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
out.counts = { todo: out.board.todo.length, doing: out.board.doing.length, review: out.board.review.length, done: out.board.done.length, doneOlder: out.board.doneOlder };
|
|
94
|
+
}
|
|
95
|
+
|
|
66
96
|
async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), now } = {}) {
|
|
67
97
|
const args = argv[0] === 'board' ? argv.slice(1) : argv.slice();
|
|
68
98
|
const { pos, flags } = parse(args);
|
|
@@ -87,6 +117,7 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), now
|
|
|
87
117
|
try { out = boardFold.boardFor({ id: 'cli', root }, { filter, now }); }
|
|
88
118
|
catch (e) { return fail('the Board could not be read: ' + String((e && e.message) || e).slice(0, 200)); }
|
|
89
119
|
if (!out.ok) return fail(out.error, out.status === 400 ? 2 : 1);
|
|
120
|
+
addTasks(out, root, now);
|
|
90
121
|
if (json) { say(JSON.stringify(out)); return 0; }
|
|
91
122
|
const titleOf = Object.fromEntries(out.initiatives.map((i) => [i.id, i.title]));
|
|
92
123
|
const label = out.filter === 'active' ? 'Active' : out.filter === 'mine' ? 'Mine' : out.filter.slice(5);
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* drafts(S, { only? }) PURE-ISH (reads files) → { drafts, ask: [{ id, title }] } S is lib/outcomes.js scan(root)
|
|
5
5
|
* new an initiative with no `description:` line: the PRD's paragraph (the first under Problem, Why, Background, Context, Summary or
|
|
6
|
-
* Overview, else its first prose paragraph), else the
|
|
6
|
+
* Overview, else its first prose paragraph), else the experiment's problem and hypothesis (D107: the Experiment artefact's
|
|
7
|
+
* `why` and `hypothesis` in artefacts.jsonl, else the record's own Problem or Intent and Hypothesis sections; launch
|
|
8
|
+
* simulation W4), else the record's own first paragraph with the record boilerplate left out
|
|
7
9
|
* ("Feature lane.", "Repo-native initiative record", the gate notes). Nothing readable: no draft, the id is listed in `ask`.
|
|
8
10
|
* enrich a description exists and the PRD's paragraph is fuller and not in it yet: the PRD's paragraph replaces it once the PM keeps it.
|
|
9
11
|
* Each draft is the ai-guard shape { id, title, say, confidence, claims: [{ text, sources: [{ label, ref, quote }] }], data: { kind,
|
|
@@ -102,6 +104,48 @@ function fromRecord(S, it) {
|
|
|
102
104
|
const f = path.join(S.root, it.record), L = linesOf(f), p = paragraphOf(L);
|
|
103
105
|
return p ? { text: p.text, source: srcOf(S.root, f, L, p.n, 'Its record') } : null;
|
|
104
106
|
}
|
|
107
|
+
/** The first paragraph under a `## <name>` heading of a record (any of `names`), or null. Shorter than a PRD paragraph is fine. */
|
|
108
|
+
function sectionParagraph(L, names) {
|
|
109
|
+
if (!L) return null;
|
|
110
|
+
const P = paragraphs(L);
|
|
111
|
+
const h = P.findIndex((p) => p.head && /^##\s/.test(p.head) && names.test(p.head.replace(/^#+\s*/, '')));
|
|
112
|
+
if (h < 0) return null;
|
|
113
|
+
const after = P.slice(h + 1).find((p) => p.head || p.lines);
|
|
114
|
+
if (!after || !after.lines) return null;
|
|
115
|
+
const t = plain(after.lines.join(' '));
|
|
116
|
+
return t.length >= 20 && !/^<[^>]*>$/.test(after.lines.join(' ').trim()) ? { text: cut(t), n: after.n } : null;
|
|
117
|
+
}
|
|
118
|
+
const PROBLEM_HEAD = /^(problem|why|intent)\b/i;
|
|
119
|
+
const HYPOTHESIS_HEAD = /^hypothesis\b/i;
|
|
120
|
+
/** The Experiment artefact's fields of one initiative (artefacts.jsonl, scope experiment:<id>): { why, hypothesis } as { text, source } | null. */
|
|
121
|
+
function experimentArtefact(root, id) {
|
|
122
|
+
let A, f, text = '';
|
|
123
|
+
try { A = require('./artefacts.js'); f = A.file(A.dirOf(root)); text = fs.readFileSync(f, 'utf8'); } catch { return {}; }
|
|
124
|
+
const view = A.viewOf(A.fold(A.readLines(f)), 'experiment:' + id);
|
|
125
|
+
const ex = view && view.artefacts.find((a) => a.key === 'experiment');
|
|
126
|
+
if (!ex) return {};
|
|
127
|
+
const raw = text.split('\n');
|
|
128
|
+
const out = {};
|
|
129
|
+
for (const [k, label] of [['why', 'Its problem'], ['hypothesis', 'Its hypothesis']]) {
|
|
130
|
+
const v = ex.fields[k];
|
|
131
|
+
if (!v || !String(v.text || '').trim()) continue;
|
|
132
|
+
const n = raw.findIndex((l) => l.includes(`"id":"${v.id}"`)) + 1;
|
|
133
|
+
out[k] = { text: cut(plain(v.text)), source: { label, ref: rel(root, f) + ':' + (n || 1), quote: clip(plain(v.text), 400) } };
|
|
134
|
+
}
|
|
135
|
+
return out;
|
|
136
|
+
}
|
|
137
|
+
/** What the experiment says: its problem and its hypothesis, from the artefacts ledger first, else the record's sections. → { text, sources } | null */
|
|
138
|
+
function fromExperiment(S, it) {
|
|
139
|
+
const art = experimentArtefact(S.root, it.id);
|
|
140
|
+
const f = path.join(S.root, it.record), L = linesOf(f);
|
|
141
|
+
const sec = (re, label) => { const p = sectionParagraph(L, re); return p ? { text: p.text, source: srcOf(S.root, f, L, p.n, label) } : null; };
|
|
142
|
+
const why = art.why || sec(PROBLEM_HEAD, 'Its problem');
|
|
143
|
+
const hyp = art.hypothesis || sec(HYPOTHESIS_HEAD, 'Its hypothesis');
|
|
144
|
+
const parts = [why, hyp].filter(Boolean);
|
|
145
|
+
if (!parts.length) return null;
|
|
146
|
+
return { text: cut(parts.map((x) => x.text).join(' ')), sources: parts.map((x) => x.source), parts };
|
|
147
|
+
}
|
|
148
|
+
|
|
105
149
|
/** The PRD says more: not already in the description, and fuller. */
|
|
106
150
|
const saysMore = (desc, prd) => { const d = norm(desc), q = norm(prd); return !!q && !d.includes(q.slice(0, 60)) && !q.includes(d) ? q.length > d.length + 40 : false; };
|
|
107
151
|
|
|
@@ -113,6 +157,13 @@ function drafts(S, { only = null } = {}) {
|
|
|
113
157
|
const desc = it.fm.description ? String(it.fm.description.value || '').trim() : '';
|
|
114
158
|
const prd = fromPrd(S, it);
|
|
115
159
|
if (!desc) {
|
|
160
|
+
const ex = prd ? null : fromExperiment(S, it);
|
|
161
|
+
if (ex) {
|
|
162
|
+
out.push({ id: `description-new:${it.id}`, title: `Description for ${clip(it.title, 80)}`, confidence: 'medium',
|
|
163
|
+
claims: ex.parts.map((x) => ({ text: clip(`${x.source.label} says: ${x.text}`, 240), sources: [x.source] })),
|
|
164
|
+
say: `It has no description yet. From the experiment I suggest: "${ex.text}"`, data: { kind: 'new', initiative: it.id, text: ex.text } });
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
116
167
|
const d = prd || fromRecord(S, it);
|
|
117
168
|
if (!d) { ask.push({ id: it.id, title: it.title }); continue; }
|
|
118
169
|
out.push({ id: `description-new:${it.id}`, title: `Description for ${clip(it.title, 80)}`, confidence: 'medium',
|
|
@@ -211,4 +262,4 @@ function create(deps) {
|
|
|
211
262
|
return { tick, runProduct };
|
|
212
263
|
}
|
|
213
264
|
|
|
214
|
-
module.exports = { JOB, VERSION, PER_DAY, drafts, paragraphOf, lineOf, cases, create, off, fromPrd, fromRecord };
|
|
265
|
+
module.exports = { JOB, VERSION, PER_DAY, drafts, paragraphOf, lineOf, cases, create, off, fromPrd, fromRecord, fromExperiment };
|