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
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,25 @@
|
|
|
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
|
+
},
|
|
36
55
|
{
|
|
37
56
|
"v": "0.565.0",
|
|
38
57
|
"at": "2026-11-12T04:27:46.732Z",
|
|
@@ -291,19 +310,6 @@
|
|
|
291
310
|
"k": "new"
|
|
292
311
|
}
|
|
293
312
|
]
|
|
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: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-12T04:
|
|
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"
|
|
@@ -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:39:10Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
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
|
+
},
|
|
2
21
|
{
|
|
3
22
|
"v": "0.565.0",
|
|
4
23
|
"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
|
|
@@ -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`.
|
|
@@ -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']);
|
|
@@ -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 }); };
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* pmos initiative drop <proposal-eid>
|
|
12
12
|
* pmos initiative list
|
|
13
13
|
* pmos initiative export <id> the breakdown as markdown on stdout; nothing is written
|
|
14
|
-
* pmos initiative describe <id> ["<text>"] no text: its description and the cited lines
|
|
14
|
+
* pmos initiative describe <id> ["<text>"] no text: its description and the cited lines PMOS can draft it from; with text: write
|
|
15
15
|
* its `description:` line (initiative-description-field). An agent writes only after the PM's yes
|
|
16
16
|
* every command: [--json] [--root <dir>]
|
|
17
17
|
*
|
|
@@ -76,6 +76,8 @@ const USAGE = [
|
|
|
76
76
|
' pmos initiative list the Roadmap, ranked, with each lifecycle stage',
|
|
77
77
|
' pmos initiative export <id> the breakdown as markdown on stdout',
|
|
78
78
|
' pmos initiative describe <id> ["<text>"] read its description and what to draft it from; with text, save it (after the PM\'s yes)',
|
|
79
|
+
' --lane is a work lane of this repository: new-feature, improvement, bug-fix, discovery or chore in a product repository',
|
|
80
|
+
' (scripts/lane-defs.js; the PMOS repository itself uses feature, discovery, chore, incident, content and prototype)',
|
|
79
81
|
' every command: [--json] [--root <dir>]',
|
|
80
82
|
'An agent session\'s move applies at once and names the agent. A new initiative lands at the end of the Roadmap.',
|
|
81
83
|
'Now, Next and Later are retired (D105): the rank says what comes first, the lifecycle stage says where it is.',
|
|
@@ -154,7 +156,7 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
154
156
|
startOnDefault(root, r, actor);
|
|
155
157
|
// no initiative without an expected outcome (outcome-for-every-initiative): say what Claude drafts next, or that the PM names it
|
|
156
158
|
return done({ id: r.id, path: r.path }, `✓ ${r.id} added at the end of the Roadmap (${r.path}). Commit the record to keep it.\n`
|
|
157
|
-
+ `✦ It needs an expected outcome and a date to check it.
|
|
159
|
+
+ `✦ It needs an expected outcome and a date to check it. PMOS drafts them from the PRD's success criteria once it is written (pmos outcomes propose ${r.id}); until then, ask the PM what should change once it ships.`);
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
if (verb === 'list') {
|
|
@@ -226,11 +228,12 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
226
228
|
const it = S.subjects.find((x) => x.id === did);
|
|
227
229
|
if (!it) return fail(`no initiative ${did} here (or it is stopped, or on a document lane)`);
|
|
228
230
|
const cur = it.fm.description ? String(it.fm.description.value || '') : '';
|
|
229
|
-
const
|
|
231
|
+
const ex = DP.fromExperiment(S, it);
|
|
232
|
+
const srcs = [DP.fromPrd(S, it), ...(ex ? ex.parts : []), DP.fromRecord(S, it)].filter(Boolean);
|
|
230
233
|
if (json) { say(JSON.stringify({ ok: true, id: did, description: cur || null, sources: srcs.map((x) => ({ label: x.source.label, ref: x.source.ref, text: x.text })) })); return 0; }
|
|
231
234
|
say(cur ? `${did}: ${cur}` : `${did} has no description yet.`);
|
|
232
235
|
if (srcs.length) say('Draft it from:\n' + srcs.map((x) => ` · ${x.source.label} [${x.source.ref}]: ${x.text}`).join('\n'));
|
|
233
|
-
else say('Nothing readable to draft it from (no PRD paragraph, no paragraph in its record): ask the PM what it is.');
|
|
236
|
+
else say('Nothing readable to draft it from (no PRD paragraph, no experiment hypothesis or problem, no paragraph in its record): ask the PM what it is.');
|
|
234
237
|
say(`Show the draft to the PM; after a yes: pmos initiative describe ${did} "<text>"`);
|
|
235
238
|
return 0;
|
|
236
239
|
}
|
|
@@ -35,6 +35,7 @@ const COMMANDS = { jira: ['draft', 'show', 'epic', 'approve', 'pending', 'record
|
|
|
35
35
|
const USAGE = [
|
|
36
36
|
'usage: pmos jira draft|show|epic|approve|pending|record|query|sync|summary|which — Jira tickets from the PRD, and their status',
|
|
37
37
|
' pmos jira draft <initiative> [--dry-run] draft one ticket per PRD item, in the ticket template',
|
|
38
|
+
' With no PRD stories section: one ticket per done-test check, else one per open task.',
|
|
38
39
|
' pmos jira show <initiative> every ticket, what needs you, and its status in Jira',
|
|
39
40
|
' pmos jira epic <initiative> new|<KEY or link> [--group <g>] create a new epic at the first push, or use an existing one',
|
|
40
41
|
' pmos jira approve <initiative> <ID> … select tickets to push (you, in your own terminal)',
|
|
@@ -188,6 +189,7 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
188
189
|
const r = jiraTickets.draft(root, initiative, { dryRun: !!flags['dry-run'], now });
|
|
189
190
|
if (!r.ok) return fail(r.error);
|
|
190
191
|
const lines = [`${initiative} · ${r.tickets} ${r.tickets === 1 ? 'ticket' : 'tickets'} in ${r.draft}${r.changed ? '' : ' · no change'}${flags['dry-run'] ? ' · dry run, nothing written' : ''}`];
|
|
192
|
+
if (r.from === 'done-test' || r.from === 'tasks') lines.push(` From ${r.from === 'done-test' ? 'the done test\'s checks' : 'the open tasks'} (${r.sources.join(', ')}): the PRD has no stories section.`);
|
|
191
193
|
for (const c of r.changes) lines.push(` ${c.what.padEnd(9)} ${c.ticket} · ${c.summary}${c.why ? ` (${c.why})` : ''}`);
|
|
192
194
|
lines.push('Read them on the Jira tickets tab, or with pmos jira show. Select the ready ones there, or with pmos jira approve.');
|
|
193
195
|
return out(r, lines);
|