create-pmos 0.565.0 → 0.567.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 +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 +32 -0
- package/workspace/fixtures/initiatives-api/list.json +2 -1
- package/workspace/guide/cli.md +5 -3
- 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/autonomy.js +1 -0
- package/workspace/lib/board-premium.js +2 -0
- 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/outcome-props.js +58 -4
- package/workspace/lib/outcomes-cli.js +9 -3
- package/workspace/lib/outcomes.js +188 -11
- package/workspace/lib/program-cli.js +2 -2
- package/workspace/lib/proposals.js +12 -3
- 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-boards.js +12 -6
- package/workspace/lib/routes-initiatives.js +1 -1
- package/workspace/lib/routes-proposals.js +26 -0
- package/workspace/lib/routes-stage-tools.js +1 -1
- package/workspace/lib/status-signal.js +6 -2
- 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/lib/workflow-cli.js +23 -1
- 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 +17 -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.567.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.567.0",
|
|
38
|
+
"at": "2026-11-12T04:54:34.259Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1298,
|
|
43
|
+
"t": "A refuted outcome reads at risk and files its next step under the ✦",
|
|
44
|
+
"s": "A refuted outcome reads at risk and files its next step under the ✦",
|
|
45
|
+
"k": "new"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"v": "0.566.0",
|
|
51
|
+
"at": "2026-11-12T04:39:13.320Z",
|
|
52
|
+
"f": 4,
|
|
53
|
+
"prs": [
|
|
54
|
+
{
|
|
55
|
+
"n": 1299,
|
|
56
|
+
"t": "Let experiments and analytics feed PMOS",
|
|
57
|
+
"s": "Let experiments and analytics feed PMOS",
|
|
58
|
+
"k": "new"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"n": 1297,
|
|
62
|
+
"t": "Full SDLC says PMOS builds only where a factory runs",
|
|
63
|
+
"s": "Full SDLC says PMOS builds only where a factory runs",
|
|
64
|
+
"k": "fix"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
36
68
|
{
|
|
37
69
|
"v": "0.565.0",
|
|
38
70
|
"at": "2026-11-12T04:27:46.732Z",
|
|
@@ -278,32 +310,6 @@
|
|
|
278
310
|
"k": "new"
|
|
279
311
|
}
|
|
280
312
|
]
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"v": "0.547.0",
|
|
284
|
-
"at": "2026-11-09T23:58:24.564Z",
|
|
285
|
-
"f": 4,
|
|
286
|
-
"prs": [
|
|
287
|
-
{
|
|
288
|
-
"n": 1275,
|
|
289
|
-
"t": "A Mac running PMOS keeps working unattended — minute check + Remote Control keeper",
|
|
290
|
-
"s": "A Mac running PMOS keeps working unattended — minute check + Remote Control keeper",
|
|
291
|
-
"k": "new"
|
|
292
|
-
}
|
|
293
|
-
]
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"v": "0.546.0",
|
|
297
|
-
"at": "2026-11-09T15:25:03.150Z",
|
|
298
|
-
"f": 4,
|
|
299
|
-
"prs": [
|
|
300
|
-
{
|
|
301
|
-
"n": 1274,
|
|
302
|
-
"t": "D107 ratified — experiments pass the gate on a done test and a kill condition",
|
|
303
|
-
"s": "D107 ratified — experiments pass the gate on a done test and a kill condition",
|
|
304
|
-
"k": "new"
|
|
305
|
-
}
|
|
306
|
-
]
|
|
307
313
|
}
|
|
308
314
|
]
|
|
309
315
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -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-12T04:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-12T04:54:30Z"}
|
|
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-12T04:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-12T04:54:30Z"}
|
|
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"
|
|
@@ -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',
|
|
@@ -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-12T04:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-12T04:54:30Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.567.0",
|
|
4
|
+
"at": "2026-11-12T04:54:34.259Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1298,
|
|
9
|
+
"t": "A refuted outcome reads at risk and files its next step under the ✦",
|
|
10
|
+
"s": "A refuted outcome reads at risk and files its next step under the ✦",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"v": "0.566.0",
|
|
17
|
+
"at": "2026-11-12T04:39:13.320Z",
|
|
18
|
+
"f": 4,
|
|
19
|
+
"prs": [
|
|
20
|
+
{
|
|
21
|
+
"n": 1299,
|
|
22
|
+
"t": "Let experiments and analytics feed PMOS",
|
|
23
|
+
"s": "Let experiments and analytics feed PMOS",
|
|
24
|
+
"k": "new"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"n": 1297,
|
|
28
|
+
"t": "Full SDLC says PMOS builds only where a factory runs",
|
|
29
|
+
"s": "Full SDLC says PMOS builds only where a factory runs",
|
|
30
|
+
"k": "fix"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
2
34
|
{
|
|
3
35
|
"v": "0.565.0",
|
|
4
36
|
"at": "2026-11-12T04:27:46.732Z",
|
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
|
|
@@ -231,6 +231,8 @@ Run them in the product's repository, or pass `--root <dir>`.
|
|
|
231
231
|
- `pmos outcomes propose [<id>]` shows PMOS's drafts, each with the lines it cites. Before the first draft of a repository it replays them on that repository's records, and shows nothing unless the replay passes.
|
|
232
232
|
- `pmos outcomes declare <id> --metric "<text>" --horizon <YYYY-MM-DD>` writes the outcome and its check date, after you said yes.
|
|
233
233
|
- `pmos outcomes record <id> <worked|didnt-work|cant-tell> --evidence "<text>"` records your verdict on a due check.
|
|
234
|
+
- When you record `didnt-work`, the initiative shows **At risk** on every page, with the check as the reason. PMOS compares the evidence with the kill condition and files one next step under the initiative's ✦. If the evidence meets the kill condition, PMOS suggests that you stop the initiative. If this is the second check that did not work, it suggests a new experiment. Otherwise it suggests one more round with a new check date. The Board's Next column asks you the same question. Nothing happens until you press ✓. Undo reverses the step.
|
|
235
|
+
- `pmos outcomes propose` also reads the experiment's hypothesis. When the hypothesis names a different KR from the initiative's anchor, the draft tells you.
|
|
234
236
|
|
|
235
237
|
### pmos rehearse: rehearse a change
|
|
236
238
|
|
|
@@ -307,7 +309,7 @@ The command exits 0 when it is done, 1 when it refuses, and 2 for a usage error.
|
|
|
307
309
|
|
|
308
310
|
| Command | What it does |
|
|
309
311
|
|---|---|
|
|
310
|
-
| `pmos measure add <anchor> <value> --source <
|
|
312
|
+
| `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
313
|
| `pmos measure list [<anchor>]` | Shows the measurements, oldest first, for each anchor. |
|
|
312
314
|
|
|
313
315
|
Put an anchor with a space in quotes: `pmos measure add "KR 2.1" 41 --source planning/okrs/q4.md@1a2b3c4`.
|
|
@@ -351,7 +353,7 @@ An agent writes a draft or a reading with these commands, and moves an initiativ
|
|
|
351
353
|
- `pmos workflow show-draft` shows the draft that is open.
|
|
352
354
|
- `pmos workflow judge --board <id> --id <initiative> --stage <key> --runs yes|no|unsure --why <reason> --cite <where>` records PMOS's reading of an Only when stage. **unsure** makes PMOS ask you. `--undo` takes a reading back.
|
|
353
355
|
- `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
|
-
- `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.
|
|
356
|
+
- `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. When the initiative passes stages that still have open tasks, the move lists those tasks. It does not close them. 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
357
|
- `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
358
|
- `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.
|
|
357
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']);
|
|
@@ -119,6 +119,7 @@ function classOfProposal(p) {
|
|
|
119
119
|
if (!isObj(p)) return 'C';
|
|
120
120
|
const c = PROPOSAL_CLASS[p.group] || 'C';
|
|
121
121
|
if (p.group === 'status' && (p.items || []).some((x) => x && x.jira)) return 'C';
|
|
122
|
+
if (p.group === 'outcome' && p.type === 'refuted') return 'C'; // stopping or replacing an experiment is the PM's call (launch simulation W2)
|
|
122
123
|
// a maybe, or a duplicate already in another initiative (type link, or an item with `other`), is a question for the PM, not a change
|
|
123
124
|
// found type stage moves the initiative's stage: a stage move is C (as the Driver's `move`)
|
|
124
125
|
if (p.group === 'found' && (p.type === 'stage' || p.type === 'maybe' || p.type === 'link' || (p.items || []).some((x) => x && x.other))) return 'C';
|
|
@@ -287,6 +287,8 @@ function rowOf(r0, wf, today) {
|
|
|
287
287
|
finish: r.end ? shortDate(r.end) : 'Not planned', over: !!over, start: r.start || null, end: r.end || null,
|
|
288
288
|
owner: r.owner || null, lane: r.lane || null, kind: KINDS.includes(r.kind) ? r.kind : 'product', anchor: r.anchor || null, kr: krShort(r.anchor), rank: Number.isInteger(r.rank) ? r.rank : null, warnings: (r.warnings || []).filter((w) => typeof w === 'string').slice(0, 12), epics: Array.isArray(r.epics) ? r.epics.filter((e) => typeof e === 'string').slice(0, 6) : [], updated: r.updated || null, reading: r.reading || null, overDays: over ? days(r.end, today) : 0,
|
|
289
289
|
acts: actsOf(r, names),
|
|
290
|
+
// the PM's standing verdict on the outcome (launch simulation W2): the Next cell stops asking "did it work?" once it is answered
|
|
291
|
+
outcome: r.outcome && r.outcome.verdict ? { verdict: r.outcome.verdict, current: !!r.outcome.current, ...(r.outcome.next ? { next: r.outcome.next } : {}) } : null,
|
|
290
292
|
holds: holdsOf(r), gaps: gapsOf(r), stageSpans: stageSpansOf(r),
|
|
291
293
|
// D99: the workflow it runs and where it stands in it (lib/routes-boards.js workflowRowOf); Product feature when the server sends none
|
|
292
294
|
...wfFields(r),
|
|
@@ -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 };
|
|
@@ -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',
|
|
@@ -20,7 +20,7 @@ const PR = require('./proposals.js');
|
|
|
20
20
|
|
|
21
21
|
const COMMANDS = { grill: ['find', 'voices', 'status', 'decisions', 'mode', 'cap', 'spend'] };
|
|
22
22
|
const USAGE = [
|
|
23
|
-
'usage: pmos grill find|voices|status|mode|cap|spend —
|
|
23
|
+
'usage: pmos grill find|voices|status|mode|cap|spend — PMOS grills an initiative by itself; each finding waits under its ✦',
|
|
24
24
|
' pmos grill find <' + G.ANGLES.join('|') + '> --json <file|->',
|
|
25
25
|
' { "title": "<the finding, one short line>", "why": "<the evidence, one line>", "next": "<one next step>", "sources": [{ "label", "ref" }], "key"?, "rank"?: 1-9 }',
|
|
26
26
|
' voices needs ' + G.VOICES_MIN + ' sources or more and is tagged "' + G.SIMULATED.voices + '"; whatif is tagged "' + G.SIMULATED.whatif + '".',
|
|
@@ -29,8 +29,8 @@ const USAGE = [
|
|
|
29
29
|
' pmos grill decisions [--all] the decisions that stand (with --all: what superseded the others)',
|
|
30
30
|
' pmos grill find decision --json - { "decision": "D79", "quote": "<its words>", "plan": { "label", "ref": "<path>:<line>", "quote": "<the plan\'s words>" },',
|
|
31
31
|
' "conflict": "<one line>", "recommend": "keep|change|drop", "next": "<one next step>", "confidence": "high|medium" }',
|
|
32
|
-
' pmos grill mode [full|exits|off] when
|
|
33
|
-
' pmos grill cap [<dollars>] the monthly credit cap; at the cap
|
|
32
|
+
' pmos grill mode [full|exits|off] when PMOS grills by itself',
|
|
33
|
+
' pmos grill cap [<dollars>] the monthly credit cap; at the cap PMOS pauses',
|
|
34
34
|
' pmos grill spend what this month spent',
|
|
35
35
|
'Every finding carries its source and a next step. It waits for the PM\'s ✓. Nothing is sent.',
|
|
36
36
|
];
|
|
@@ -80,7 +80,7 @@ async function run(argv, { say = (s) => console.log(s), env = process.env, stdin
|
|
|
80
80
|
|
|
81
81
|
/* ── the run's verbs ── */
|
|
82
82
|
const file = env.PMOS_GRILL_FILE, log = env.PMOS_GRILL_LOG, runId = env.PMOS_GRILL_RUN, ini = env.PMOS_GRILL_INI, board = env.PMOS_GRILL_BOARD || '';
|
|
83
|
-
if (!file || !log || !runId || !ini) { say('✗ pmos grill ' + verb + ' is for
|
|
83
|
+
if (!file || !log || !runId || !ini) { say('✗ pmos grill ' + verb + ' is for PMOS\'s grill run. The PM keeps and drops findings under the initiative\'s ✦'); return 1; }
|
|
84
84
|
const L = G.fold(G.readLines(log)), me = L.runs.get(runId);
|
|
85
85
|
if (!me || me.ended) { say('✗ this run is not grilling now (it ended, or it was stopped)'); return 1; }
|
|
86
86
|
const P = PR.fold(PR.readLines(file));
|
|
@@ -14,13 +14,13 @@ const IM = require('./impact.js');
|
|
|
14
14
|
const COMMANDS = { impact: ['add', 'end', 'status'] };
|
|
15
15
|
const SUBS = COMMANDS.impact;
|
|
16
16
|
const USAGE = [
|
|
17
|
-
'usage: pmos impact add|end|status — what
|
|
17
|
+
'usage: pmos impact add|end|status — what PMOS\'s impact run files for the PM to check (✓ real, ✕ not real)',
|
|
18
18
|
' pmos impact add --json <file|->',
|
|
19
19
|
' { "kind": "' + IM.KINDS.join('" | "') + '", "text": "<one plain sentence, no counts>", "who": "<a name, or empty>",',
|
|
20
20
|
' "at": "<ISO 8601, when it happened>", "source": { "url": "<https link>", "type": "' + IM.SOURCE_TYPES.join('" | "') + '", "label": "Slack · #shop-data" } }',
|
|
21
21
|
' pmos impact end [--error "<why the run could not finish>"]',
|
|
22
22
|
' pmos impact status',
|
|
23
|
-
'Only what a person or a system outside you did in reaction to your work. Never
|
|
23
|
+
'Only what a person or a system outside you did in reaction to your work. Never PMOS\'s own work. No source, no item. Nothing is sent.',
|
|
24
24
|
];
|
|
25
25
|
const flag = (args, k) => { const i = args.indexOf('--' + k); return i >= 0 ? (args[i + 1] === undefined || args[i + 1].startsWith('--') ? true : args[i + 1]) : undefined; };
|
|
26
26
|
function readJson(src, stdin) {
|
|
@@ -35,7 +35,7 @@ async function run(argv, { say = (s) => console.log(s), env = process.env, stdin
|
|
|
35
35
|
if (!sub || ['help', '--help', '-h'].includes(sub)) { for (const l of USAGE) say(l); return sub ? 0 : 1; }
|
|
36
36
|
if (!SUBS.includes(sub)) { say(`unknown impact command "${sub}". Use one of: ${SUBS.join(', ')}`); return 2; }
|
|
37
37
|
const file = env.PMOS_IMPACT_FILE, runId = env.PMOS_IMPACT_RUN;
|
|
38
|
-
if (!file || !runId) { say('✗ pmos impact is for
|
|
38
|
+
if (!file || !runId) { say('✗ pmos impact is for PMOS\'s impact run. The PM checks each item in Home\'s chat.'); return 1; }
|
|
39
39
|
const F = IM.fold(IM.readLines(file));
|
|
40
40
|
const at = new Date(now).toISOString();
|
|
41
41
|
const line = (ev) => { fs.appendFileSync(file, JSON.stringify({ at, by: null, run: runId, ...ev }) + '\n', { mode: 0o600 }); };
|