create-pmos 0.728.0 → 0.730.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 +26 -20
- 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/state/discoveries.md +1 -1
- package/workspace/changelog.json +25 -0
- package/workspace/guide/cli.md +10 -0
- package/workspace/guide/initiatives-and-next-steps.md +3 -1
- package/workspace/guide/jira.md +18 -0
- package/workspace/guide/layout.md +1 -1
- package/workspace/lib/change-cues.js +34 -0
- package/workspace/lib/initiative-cli.js +61 -2
- package/workspace/lib/initiative-premium.js +1 -1
- package/workspace/lib/jira-cli.js +51 -2
- package/workspace/lib/jira-criteria.js +214 -0
- package/workspace/lib/kind-scope.js +33 -5
- package/workspace/lib/routes-jira-epics.js +62 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/change-cues.css +15 -0
- package/workspace/public/pm/change-cues.js +52 -0
- package/workspace/public/pm/cozy-pop-work.js +46 -3
- package/workspace/public/pm/cozy-today-app.js +11 -8
- package/workspace/public/pm/home-app.js +4 -2
- package/workspace/public/pm/premium-initiative-head.js +14 -3
- package/workspace/public/today.html +1 -0
- package/workspace/skills/jira-criteria.skill +35 -0
- package/workspace/test-lists/change-cues.json +9 -0
- package/workspace/test-lists/jira-criteria-write.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.730.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,31 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.730.0",
|
|
38
|
+
"at": "2026-11-23T05:37:33.548Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1625,
|
|
43
|
+
"t": "A short cue when an item is done, moved or dropped (A313)",
|
|
44
|
+
"s": "A short cue when an item is done, moved or dropped (A313)",
|
|
45
|
+
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1623,
|
|
49
|
+
"t": "Write the done test's acceptance criteria onto Jira tickets (A384)",
|
|
50
|
+
"s": "Write the done test's acceptance criteria onto Jira tickets (A384)",
|
|
51
|
+
"k": "new"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"n": 1626,
|
|
55
|
+
"t": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
|
|
56
|
+
"s": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
|
|
57
|
+
"k": "new"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
36
61
|
{
|
|
37
62
|
"v": "0.728.0",
|
|
38
63
|
"at": "2026-11-23T05:05:21.945Z",
|
|
@@ -429,25 +454,6 @@
|
|
|
429
454
|
"k": "new"
|
|
430
455
|
}
|
|
431
456
|
]
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
"v": "0.703.0",
|
|
435
|
-
"at": "2026-11-22T10:51:01.624Z",
|
|
436
|
-
"f": 4,
|
|
437
|
-
"prs": [
|
|
438
|
-
{
|
|
439
|
-
"n": 1528,
|
|
440
|
-
"t": "Lists stay short, 50 rows a step from one shared block (A455)",
|
|
441
|
-
"s": "Lists stay short, 50 rows a step from one shared block (A455)",
|
|
442
|
-
"k": "new"
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"n": 1530,
|
|
446
|
-
"t": "Esc and Stage in Backlog and This sprint; tests for the Gantt parent bar and the bulk stage move",
|
|
447
|
-
"s": "Esc and Stage in Backlog and This sprint; tests for the Gantt parent bar and the bulk stage move",
|
|
448
|
-
"k": "fix"
|
|
449
|
-
}
|
|
450
|
-
]
|
|
451
457
|
}
|
|
452
458
|
]
|
|
453
459
|
}
|
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-23T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-23T05:37: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-23T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-23T05:37:30Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -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-23T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-23T05:37:30Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.730.0",
|
|
4
|
+
"at": "2026-11-23T05:37:33.548Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1625,
|
|
9
|
+
"t": "A short cue when an item is done, moved or dropped (A313)",
|
|
10
|
+
"s": "A short cue when an item is done, moved or dropped (A313)",
|
|
11
|
+
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1623,
|
|
15
|
+
"t": "Write the done test's acceptance criteria onto Jira tickets (A384)",
|
|
16
|
+
"s": "Write the done test's acceptance criteria onto Jira tickets (A384)",
|
|
17
|
+
"k": "new"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"n": 1626,
|
|
21
|
+
"t": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
|
|
22
|
+
"s": "Kind as scope, part 2: the chat can change kinds, and a project's Build follows its milestones",
|
|
23
|
+
"k": "new"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
2
27
|
{
|
|
3
28
|
"v": "0.728.0",
|
|
4
29
|
"at": "2026-11-23T05:05:21.945Z",
|
package/workspace/guide/cli.md
CHANGED
|
@@ -431,6 +431,10 @@ A page that keeps breaking should get fixed before it gets a new feature. This c
|
|
|
431
431
|
| `pmos initiative describe <id> "<text>"` | Saves the description. PMOS runs this only after your yes. |
|
|
432
432
|
| `pmos initiative raised-by <id>` | Shows who raised it: you, a teammate, a customer, PMOS or the tracker. |
|
|
433
433
|
| `pmos initiative raised-by <id> "<who>"` | Saves who raised it: `you`, `pmos`, `tracker`, `"teammate: <name>"` or `"customer: <name>"`. `none` removes it. |
|
|
434
|
+
| `pmos initiative kind <id>` | Shows the kind of work, and for each lifecycle stage whether PMOS works it with you, watches it in Jira or hides it. |
|
|
435
|
+
| `pmos initiative kind <id> product\|project\|sdlc` | Changes the kind. The Viewer shows the change on its next refresh. An initiative on its old kind's default workflow moves to the new kind's workflow. |
|
|
436
|
+
| `pmos initiative role` | Shows the kind new work starts as (Settings › General › New work starts as). |
|
|
437
|
+
| `pmos initiative role product\|project\|sdlc` | Changes the kind new work starts as. Each initiative can still change its own kind. |
|
|
434
438
|
|
|
435
439
|
Every command takes `--json` and `--root <dir>`. The command does not accept `--by` or `--via`. `pmos initiative now`, `next` and `later` are retired: they write nothing, say what to use instead and exit 2.
|
|
436
440
|
|
|
@@ -709,6 +713,7 @@ The benchmark needs a signed-in agent CLI. It never pushes and never opens a pul
|
|
|
709
713
|
- `pmos jira record <initiative> [ID=KEY …] [--epic KEY [--group <group>]] [--updated ID,ID]`
|
|
710
714
|
- `pmos jira query [<initiative>]`
|
|
711
715
|
- `pmos jira sync <initiative> --from <file|-> [--query "<jql>"] [--dry-run]`
|
|
716
|
+
- `pmos jira pin <initiative> [--off]`: keeps an initiative live, so its tickets get the sprint read and full detail. `--off` stops it.
|
|
712
717
|
- `pmos jira query --sprints`
|
|
713
718
|
- `pmos jira sync --sprints --from <file|-> [--query "<jql>"] [--dry-run]`
|
|
714
719
|
- `pmos jira query --sprint "<name>"`
|
|
@@ -721,6 +726,11 @@ The benchmark needs a signed-in agent CLI. It never pushes and never opens a pul
|
|
|
721
726
|
- `pmos jira answer <initiative> <ticket> <n> --text "<answer>"` or `--keep-default`
|
|
722
727
|
- `pmos jira epic-asks [--direct|--draft]` lists the tickets waiting to go under their initiative's epic. `--draft` prints the day's draft by owner, for you to send.
|
|
723
728
|
- `pmos jira epic-done <ask id>` or `--refused "<why>"` records the answer for a ticket that is assigned to you.
|
|
729
|
+
- `pmos jira pin <initiative> [--off]` keeps an initiative live: its tickets get the sprint read and full detail on every refresh.
|
|
730
|
+
- `pmos jira criteria-propose <initiative>` lists, for each open Jira ticket of the initiative, the done-test checks PMOS proposes as acceptance criteria ([Jira tickets](jira.md)).
|
|
731
|
+
- `pmos jira criteria-ask <initiative> [KEY …]` says yes to them. Tickets assigned to you get the criteria in Jira; the others go to the draft for their owners.
|
|
732
|
+
- `pmos jira criteria-asks [--direct|--draft|--health]` lists the criteria asks that wait for Jira, prints the draft by owner, or prints the health number.
|
|
733
|
+
- `pmos jira criteria-done <ask id>` or `--refused "<why>"` records the answer for one criteria ask.
|
|
724
734
|
- `pmos jira criteria <initiative>`: the done-test checks each ticket carries as acceptance criteria, and the checks on no ticket
|
|
725
735
|
- `pmos jira digest [--since <YYYY-MM-DD or time>]`: what moved in the tracker since the last working day, who moved it, the moved tickets with no task in PMOS, and what is worth a question (blocked, reopened, nobody assigned, stuck, not in the last read). It reads only the stored Jira reads.
|
|
726
736
|
|
|
@@ -181,12 +181,14 @@ When you change the kind, an initiative that runs its old kind's workflow moves
|
|
|
181
181
|
|---|---|---|---|
|
|
182
182
|
| Triage, Discover | Hidden | Owned | Owned |
|
|
183
183
|
| Plan, Prioritize | Owned | Owned | Owned |
|
|
184
|
-
| Build | Watched, from
|
|
184
|
+
| Build | Watched, from its milestone dates | Watched, from Jira | Owned: PMOS builds it where a factory runs |
|
|
185
185
|
| Deliver, Monitor, Evaluate | Owned | Owned | Owned |
|
|
186
186
|
| Gate | Plan before start | PRD and done test before build | Done test and kill before build |
|
|
187
187
|
|
|
188
188
|
A Project initiative also hides the product documents: the problem statement, research notes, PRD, eval rubric and design. It shows no PRD gate; its gate is the Plan gate in **Project control**. Hidden is never removed. The stage ladder leaves Triage and Discover out (6 stages), but the stage the initiative is in always shows, and **Move to a stage** still lists every stage. In **Documents**, the hidden documents are in a closed **Product documents** section at the end. Open it to read or draft them.
|
|
189
189
|
|
|
190
|
+
In Build, a Project initiative follows its milestones, not Jira's engineers. It shows how many milestones are done, for example **1 of 2 milestones done**, and reads **On plan**. A milestone that is not done and is past its date shows as **past its date**, and the initiative reads **Stalled**. To read or change the kind from a chat, use `pmos initiative kind <id>`.
|
|
191
|
+
|
|
190
192
|
**Project control.** A Project initiative shows **Project control** at the top of the initiative:
|
|
191
193
|
|
|
192
194
|
- **On track for <date>?** The answer comes from the task dates and the task links. The date is the KR's date, else the end, else the date in the title. On a No, it names the forecast, the slip and the task that causes it.
|
package/workspace/guide/jira.md
CHANGED
|
@@ -114,6 +114,24 @@ Your own criteria stay above the block. A ticket you edited, selected or pushed
|
|
|
114
114
|
pmos jira criteria <initiative>
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
### On the tickets you already have in Jira
|
|
118
|
+
|
|
119
|
+
Most tickets an initiative tracks were made in Jira, not drafted by PMOS. When the initiative has a done test, the Work breakdown shows a ✦: "Add the done test's checks to 3 Jira tickets". Open it to see each ticket and the checks that fit it. PMOS uses the same matching as above and leaves out tickets that are done.
|
|
120
|
+
|
|
121
|
+
- Press ✓ to say yes. A ticket assigned to you gets the block at the end of its description. A session with your own Atlassian connection writes it, and it changes nothing else on the ticket.
|
|
122
|
+
- A ticket of another owner is not changed. It goes to the day's draft for that owner, with the block to paste. PMOS does not send the draft.
|
|
123
|
+
- Press Undo to withdraw what Jira has not done yet. Press ✕ to hide the ✦.
|
|
124
|
+
- When the done test changes, PMOS proposes the new block again. A second write replaces the old block and keeps the rest of the description.
|
|
125
|
+
|
|
126
|
+
In the terminal:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
pmos jira criteria-propose <initiative> what PMOS proposes, ticket by ticket
|
|
130
|
+
pmos jira criteria-ask <initiative> [KEY …] say yes to all, or to the keys you name
|
|
131
|
+
pmos jira criteria-asks [--direct | --draft] what waits for Jira, or the draft by owner
|
|
132
|
+
pmos jira criteria-done <ask id> [--refused "<why>"] the session's answer for one ticket
|
|
133
|
+
```
|
|
134
|
+
|
|
117
135
|
## The dry run: where a builder would guess
|
|
118
136
|
|
|
119
137
|
A ticket points to the PRD, but the builder holds only the ticket. Before you select the tickets, PMOS dry-runs them: the initiative's background run reads each drafted ticket as a builder would, and lists every point where it would have to guess. For each guess it quotes the PRD lines that answer it.
|
|
@@ -69,7 +69,7 @@ Each row has two lines:
|
|
|
69
69
|
To use the log:
|
|
70
70
|
|
|
71
71
|
1. Type a task, an event or a note in the first line and press Enter. Start with **o** for an event (add a time, such as 14:00, to put it on the agenda), with **-** for a note, and with **!** for what comes first. Enter only adds the row. It opens nothing and starts no session.
|
|
72
|
-
2. Point at a row to see its icons. The first is its job: **Reply**, **Decide** or **Send** opens the item where you do it, and **Done** marks it done. Then come **Move to tomorrow** and **Set a date**. A done row turns grey. Each change shows Undo for a moment.
|
|
72
|
+
2. Point at a row to see its icons. The first is its job: **Reply**, **Decide** or **Send** opens the item where you do it, and **Done** marks it done. Then come **Move to tomorrow** and **Set a date**. A done row turns grey. Each change shows Undo for a moment. Before the log draws again, the row shows a short cue for about half a second, so you see which row changed: a done row turns green and slides out, a row you move to another day slides out to the side, and a dropped row fades. Home's check does the same. When your system asks for reduced motion, nothing moves: the row only keeps its colour for a moment.
|
|
73
73
|
3. Press a row, or an event in the agenda, to open that one item in the popup. An ask opens that one mention, not the list of mentions. A task opens its initiative at that task, with the task's row lit, and the task itself in a small popup on top; Esc closes only the small popup. A check ("did it work?") opens its initiative. With the popup open, press **j** or **k** (or **↓** and **↑** in an ask) to open the next or the previous row in its place.
|
|
74
74
|
|
|
75
75
|
When the same step waits on several initiatives (for example "Draft the PRD" on six of them), it is one row, "6 initiatives have no PRD", with the ✦ line "PMOS drafts them for you to read": ✓ starts one draft per initiative, ✕ hides the line for a month. Press the row to list the initiatives. A title never shows an id, and Work names a product by its name.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* change-cues.js — the health number of the short cue on a row that is done, moved or dropped (idea A313, initiative change-cues; the cue
|
|
4
|
+
* is public/pm/change-cues.js). It only reads the local use log (lib/use-log.js, A466): nothing is written or sent.
|
|
5
|
+
*
|
|
6
|
+
* cuesShown(lines, now, days) → the cues (use-log controls cue-done, cue-moved, cue-gone) in the last `days` days PURE
|
|
7
|
+
* CLI: node lib/change-cues.js uses [days] → that count on its last line (the health number) */
|
|
8
|
+
const U = require('./use-log.js');
|
|
9
|
+
|
|
10
|
+
const CONTROLS = new Set(['cue-done', 'cue-moved', 'cue-gone']);
|
|
11
|
+
const DAY = 864e5;
|
|
12
|
+
|
|
13
|
+
function cuesShown(lines, now = Date.now(), days = 7) {
|
|
14
|
+
const cut = now - days * DAY;
|
|
15
|
+
let n = 0;
|
|
16
|
+
for (const l of lines || []) {
|
|
17
|
+
if (!l || l.kind !== 'use' || !CONTROLS.has(l.control)) continue;
|
|
18
|
+
const t = Date.parse(l.at);
|
|
19
|
+
if (t >= cut && t <= now + DAY) n++;
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = { CONTROLS, cuesShown };
|
|
25
|
+
|
|
26
|
+
if (require.main === module) {
|
|
27
|
+
const [cmd, d] = process.argv.slice(2);
|
|
28
|
+
const days = d ? Number(d) : 7;
|
|
29
|
+
if (cmd !== 'uses' || !(days > 0)) { console.error('usage: node lib/change-cues.js uses [days] (cues shown on a row done, moved or dropped, default the last 7 days)'); process.exit(2); }
|
|
30
|
+
const dir = require('./state-root.js').defaultRoot({ env: process.env });
|
|
31
|
+
const n = cuesShown(U.readLines(dir), Date.now(), days);
|
|
32
|
+
console.log('[change-cues] cues shown on a row done, moved or dropped, last ' + days + ' days');
|
|
33
|
+
console.log(String(n));
|
|
34
|
+
}
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
* its `description:` line (initiative-description-field). An agent writes only after the PM's yes
|
|
16
16
|
* pmos initiative raised-by <id> ["<who>"|none] no value: who raised it and where that is read from; with a value: write its `raised_by:`
|
|
17
17
|
* line (who-raised-each-idea): you, pmos, tracker, "teammate: <name>" or "customer: <name>"
|
|
18
|
+
* pmos initiative kind <id> [product|project|sdlc] no kind: its kind and what each stage is (owned, watched, hidden); with a kind: write
|
|
19
|
+
* its `kind:` line and make the workflow move the Viewer's kind switch makes (kind-scope-chat-writes)
|
|
20
|
+
* pmos initiative role [product|project|sdlc] the kind new work starts as (Settings › General › New work starts as, work.role)
|
|
18
21
|
* every command: [--json] [--root <dir>]
|
|
19
22
|
*
|
|
20
23
|
* The SAME writers the workspace page uses (lib/initiative-writer.js, lib/placements.js) — no server is needed. Who
|
|
@@ -28,6 +31,7 @@
|
|
|
28
31
|
* D105 retired Now / Next / Later: `now`, `next` and `later` answer with what to use instead and change nothing.
|
|
29
32
|
* Exit codes: 0 done, 1 refused, 2 usage.
|
|
30
33
|
*/
|
|
34
|
+
const fs = require('fs');
|
|
31
35
|
const path = require('path');
|
|
32
36
|
const { execFileSync } = require('child_process');
|
|
33
37
|
const guard = require('./pm-guard.js');
|
|
@@ -53,6 +57,18 @@ function startOnDefault(root, r, actor) {
|
|
|
53
57
|
} catch { /* the initiative is made; it runs Product feature */ }
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
/** kind-scope-chat-writes: the workflow move the Viewer's kind switch makes (routes-boards kindSwitch), from a terminal. */
|
|
61
|
+
function kindSwitch(root, id, from, to, actor) {
|
|
62
|
+
try {
|
|
63
|
+
const D = require('./driver.js');
|
|
64
|
+
const dir = D.stateDirOf(root);
|
|
65
|
+
if (!dir) return null;
|
|
66
|
+
const w = { id: D.wsIdOf(root), name: path.basename(root), root };
|
|
67
|
+
const ctx = { getWs: () => w, workspaceList: () => [w], stateDirFor: () => dir, selfRoot: path.resolve(__dirname, '..', '..') };
|
|
68
|
+
return require('./routes-boards.js').kindSwitch(ctx, w, id, from, to, actor);
|
|
69
|
+
} catch { return null; } // the kind is written; the workflow stays as it was
|
|
70
|
+
}
|
|
71
|
+
|
|
56
72
|
/** The records on a document lane (D86 point 4): never on the Roadmap, Home or the Board. Stopped and accepted ones are left out. */
|
|
57
73
|
const documentsOf = (rows) => (rows || []).filter((r) => r && r.ok !== false && r.group && r.group !== 'work' && !r.accepted && !r.stopped)
|
|
58
74
|
.map((r) => ({ id: r.id, lane: r.lane || null }));
|
|
@@ -63,11 +79,11 @@ function docNote(docs) {
|
|
|
63
79
|
return `Not on the Roadmap · ${docs.length} on a document lane: ${names}. A document lane does not show on Home or the Board. If it is work, set lane: in its record to ${WORK_LANES}.`;
|
|
64
80
|
}
|
|
65
81
|
|
|
66
|
-
const COMMANDS = { initiative: ['new', 'top', 'up', 'down', 'bottom', 'after', 'check-by', 'adopt', 'drop', 'list', 'export', 'describe', 'raised-by'] };
|
|
82
|
+
const COMMANDS = { initiative: ['new', 'top', 'up', 'down', 'bottom', 'after', 'check-by', 'adopt', 'drop', 'list', 'export', 'describe', 'raised-by', 'kind', 'role'] };
|
|
67
83
|
/** The horizon verbs D105 retired: they answer with what to use instead. */
|
|
68
84
|
const RETIRED = Object.freeze(['now', 'next', 'later']);
|
|
69
85
|
const USAGE = [
|
|
70
|
-
'usage: pmos initiative new|top|up|down|bottom|after|check-by|adopt|drop|list|export|describe|raised-by — initiatives on the Roadmap',
|
|
86
|
+
'usage: pmos initiative new|top|up|down|bottom|after|check-by|adopt|drop|list|export|describe|raised-by|kind|role — initiatives on the Roadmap',
|
|
71
87
|
' pmos initiative new "<title>" --lane <lane> --anchor <KR|health:id> [--intent "<text>"] [--id <id>] [--kind product|sdlc|project] [--raised-by "<who>"]',
|
|
72
88
|
' pmos initiative new --from capture-YYYY-MM-DD-<n> [--anchor <anchor>] [--lane <lane>] [--title "<title>"]',
|
|
73
89
|
' pmos initiative top|up|down|bottom <id> reorder it on the Roadmap',
|
|
@@ -79,6 +95,8 @@ const USAGE = [
|
|
|
79
95
|
' pmos initiative export <id> the breakdown as markdown on stdout',
|
|
80
96
|
' pmos initiative describe <id> ["<text>"] read its description and what to draft it from; with text, save it (after the PM\'s yes)',
|
|
81
97
|
' pmos initiative raised-by <id> ["<who>"|none] who raised it; with a value, save it: you, pmos, tracker, "teammate: <name>", "customer: <name>"',
|
|
98
|
+
' pmos initiative kind <id> [product|project|sdlc] its kind and what each stage shows; with a kind, change it',
|
|
99
|
+
' pmos initiative role [product|project|sdlc] the kind new work starts as; with a kind, change it',
|
|
82
100
|
' --lane is a work lane of this repository: new-feature, improvement, bug-fix, discovery or chore in a product repository',
|
|
83
101
|
' (scripts/lane-defs.js; the PMOS repository itself uses feature, discovery, chore, incident, content and prototype)',
|
|
84
102
|
' every command: [--json] [--root <dir>]',
|
|
@@ -241,6 +259,47 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
241
259
|
return 0;
|
|
242
260
|
}
|
|
243
261
|
|
|
262
|
+
if (verb === 'kind') {
|
|
263
|
+
// kind-scope-chat-writes: the same writer as the Viewer's kind switch, so the Viewer shows the change on its next refresh
|
|
264
|
+
const KS = require('./kind-scope.js'), WK = require('./work-kind.js');
|
|
265
|
+
const kid = pos[0];
|
|
266
|
+
if (!kid || pos.length > 2) { say('usage: pmos initiative kind <id> [product|project|sdlc]'); return 2; }
|
|
267
|
+
if (pos.length === 2) {
|
|
268
|
+
if (!WK.valid(pos[1])) return fail(`kind must be one of ${WK.KINDS.join(', ')}`, 2);
|
|
269
|
+
const actor = actorLib.fromCli(who);
|
|
270
|
+
const r = writer.setKind(root, kid, pos[1], { actor });
|
|
271
|
+
if (!r.ok) return fail(r.error, r.status === 400 ? 2 : 1);
|
|
272
|
+
if (r.same) return done({ id: kid, kind: r.kind, same: true }, `${kid} is already ${WK.LABEL[r.kind]}.`);
|
|
273
|
+
const sw = kindSwitch(root, kid, r.from, r.kind, actor);
|
|
274
|
+
const moved = sw && sw.switched ? ` It moved to the ${WK.LABEL[r.kind]} workflow.` : '';
|
|
275
|
+
return done({ id: kid, from: r.from, kind: r.kind, scope: KS.scopeOf(r.kind), ...(sw ? { workflow: sw } : {}) },
|
|
276
|
+
`✓ ${kid}: ${WK.LABEL[r.from]} → ${WK.LABEL[r.kind]}.${moved} The Viewer shows it on its next refresh. Commit the record to keep it.\n ` + KS.describe(r.kind).join('\n '));
|
|
277
|
+
}
|
|
278
|
+
const d = rowsLib.deriveSync(root);
|
|
279
|
+
const row = d.ok ? d.rows.find((x) => x.id === kid) : null;
|
|
280
|
+
if (!row) return fail(`no initiative ${kid} here`);
|
|
281
|
+
let text = ''; try { text = row.record ? fs.readFileSync(path.resolve(root, String(row.record)), 'utf8') : ''; } catch { /* no line reads as product */ }
|
|
282
|
+
const k = KS.kindOfText(text); // the record's own kind: line, as the Board and the Viewer read it
|
|
283
|
+
if (json) { say(JSON.stringify({ ok: true, id: kid, kind: k, scope: KS.scopeOf(k), lines: KS.describe(k) })); return 0; }
|
|
284
|
+
say(`${kid} — ${row.title || kid}`);
|
|
285
|
+
for (const l of KS.describe(k)) say(' ' + l);
|
|
286
|
+
return 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (verb === 'role') {
|
|
290
|
+
// kind-scope-chat-writes: Settings › General › New work starts as, in the same settings file the page reads
|
|
291
|
+
const SS = require('./settings-store.js'), WK = require('./work-kind.js');
|
|
292
|
+
const dir = require('./state-root.js').defaultRoot({ env: who.env });
|
|
293
|
+
if (pos.length > 1) { say('usage: pmos initiative role [product|project|sdlc]'); return 2; }
|
|
294
|
+
if (!pos.length) {
|
|
295
|
+
const k = SS.get(dir, 'work.role');
|
|
296
|
+
return done({ role: k }, `New work starts as ${WK.LABEL[k] || k}. Change it with pmos initiative role product|project|sdlc.`);
|
|
297
|
+
}
|
|
298
|
+
const r = SS.set(dir, 'work.role', pos[0]);
|
|
299
|
+
if (!r.ok) return fail(r.error || `role must be one of ${WK.KINDS.join(', ')}`, 2);
|
|
300
|
+
return done({ role: pos[0] }, `✓ New work starts as ${WK.LABEL[pos[0]]}. Settings shows it now. Each initiative can still change its own kind.`);
|
|
301
|
+
}
|
|
302
|
+
|
|
244
303
|
if (verb === 'describe') {
|
|
245
304
|
// initiative-description-field: the record's own description. Read with no text; write with text, only after the PM said yes.
|
|
246
305
|
const did = pos[0];
|
|
@@ -106,7 +106,7 @@ function build(f) {
|
|
|
106
106
|
// stage's To finish tasks are one kind of task (feedback batch 5, lib/task-items.js), Jira rows are read-only ──
|
|
107
107
|
// every task the page draws (batch 7 item 7): a cap here left the 61st and later tasks with no editor, so a press fell back to the old list
|
|
108
108
|
const items = (f.items || []).filter((t) => t && t.ini === id);
|
|
109
|
-
const tracker = items.map((t, n) => ({ key: 'task:' + (t.uid || t.key || n), uid: t.uid || '', pmos: t.src === 'pmos', ref: t.key || t.ref || '', title: clip(t.title, 160), state: t.status || 'To do', src: t.src === 'jira' ? 'Jira (read-only)' : 'PMOS task', owner: t.owner || '', start: t.start || '', end: t.end || '', blocked: !!t.blocked, kind: t.kind || 'Task', notes: t.notes || '', readAt: t.readAt || '',
|
|
109
|
+
const tracker = items.map((t, n) => ({ key: 'task:' + (t.uid || t.key || n), uid: t.uid || '', pmos: t.src === 'pmos', ref: t.key || t.ref || '', title: clip(t.title, 160), state: t.status || 'To do', src: t.src === 'jira' ? 'Jira (read-only)' : 'PMOS task', owner: t.owner || '', start: t.start || '', end: t.end || '', blocked: !!t.blocked, kind: t.kind || 'Task', ...(t.milestone ? { milestone: true } : {}), notes: t.notes || '', readAt: t.readAt || '',
|
|
110
110
|
...(t.from ? { from: { stage: t.from.stage, finish: t.from.finish } } : {}), ...(t.store === 'item' ? { store: 'item' } : {}) }));
|
|
111
111
|
const dv = sheet && sheet.derived;
|
|
112
112
|
const reqs = dv && Array.isArray(dv.items) ? dv.items.slice(0, MAX_TASKS).map((x) => ({ key: 'req:' + x.id, ref: x.ref || x.id, title: clip(x.title, 160), state: null, src: 'PRD requirement' })) : [];
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
* pmos jira epic-asks [--direct | --draft] the epic fixes the PM approved (lib/jira-epics.js): --direct the ones
|
|
26
26
|
* assigned to the PM (the jira-epic agent sets them), --draft the day's draft by owner
|
|
27
27
|
* pmos jira epic-done <ask id> [--refused "<why>"] the jira-epic agent's answer for one ask
|
|
28
|
+
* pmos jira criteria-propose <initiative> the done test's checks PMOS proposes for each open Jira ticket the
|
|
29
|
+
* initiative tracks (lib/jira-criteria.js, jira-criteria-write)
|
|
30
|
+
* pmos jira criteria-ask <initiative> [KEY …] the PM's yes: those tickets (or all proposed) get the block; the ones
|
|
31
|
+
* assigned to the PM go to the jira-criteria agent, the rest to the draft
|
|
32
|
+
* pmos jira criteria-asks [--direct | --draft | --health] the criteria asks waiting; --health prints the percent Jira accepted
|
|
33
|
+
* pmos jira criteria-done <ask id> [--refused "<why>"] the jira-criteria agent's answer for one ask
|
|
28
34
|
* pmos jira guesses <initiative> [--from <file|->] a ticket dry run (lib/ticket-dry-run.js), recorded or shown
|
|
29
35
|
* pmos jira answer <initiative> <ticket> <n> --text "<answer>" | --keep-default the PM's answer to one dry-run gap, or its default kept
|
|
30
36
|
* pmos jira digest [--since <YYYY-MM-DD or time>] the standup facts from the stored reads (lib/tracker-digest.js)
|
|
@@ -43,10 +49,12 @@ const tiers = require('./jira-tiers.js');
|
|
|
43
49
|
const jiraTickets = require('./jira-tickets.js');
|
|
44
50
|
const jiraMoves = require('./jira-moves.js');
|
|
45
51
|
const jiraEpics = require('./jira-epics.js');
|
|
52
|
+
const jiraCriteria = require('./jira-criteria.js');
|
|
53
|
+
const pmName = (env) => { const e = String(((env || process.env).PMOS_PM_NAME) || '').trim(); if (e) return e; try { return require('./routes-board-publish.js').sharedBy() || ''; } catch { return ''; } };
|
|
46
54
|
const planItems = require('./plan-items.js');
|
|
47
55
|
const guard = require('./pm-guard.js');
|
|
48
56
|
|
|
49
|
-
const COMMANDS = { jira: ['draft', 'show', 'epic', 'approve', 'pending', 'record', 'query', 'sync', 'pin', 'summary', 'which', 'moves', 'moved', 'epic-asks', 'epic-done', 'guesses', 'answer', 'criteria', 'digest'] };
|
|
57
|
+
const COMMANDS = { jira: ['draft', 'show', 'epic', 'approve', 'pending', 'record', 'query', 'sync', 'pin', 'summary', 'which', 'moves', 'moved', 'epic-asks', 'epic-done', 'guesses', 'answer', 'criteria', 'digest', 'criteria-propose', 'criteria-ask', 'criteria-asks', 'criteria-done'] };
|
|
50
58
|
const USAGE = [
|
|
51
59
|
'usage: pmos jira draft|show|epic|approve|pending|record|query|sync|summary|which — Jira tickets from the PRD, and their status',
|
|
52
60
|
' pmos jira draft <initiative> [--dry-run] draft one ticket per PRD item, in the ticket template',
|
|
@@ -77,11 +85,15 @@ const USAGE = [
|
|
|
77
85
|
' pmos jira moved <move id> --status "<status>" | --refused "<why>" what Jira did with one move',
|
|
78
86
|
' pmos jira epic-asks [--direct | --draft] the epic fixes the PM approved: the ones assigned to the PM, or the day\'s draft by owner',
|
|
79
87
|
' pmos jira epic-done <ask id> [--refused "<why>"] what Jira did with one epic fix',
|
|
88
|
+
' pmos jira criteria-propose <initiative> the done test\'s checks PMOS proposes as acceptance criteria for each open Jira ticket',
|
|
89
|
+
' pmos jira criteria-ask <initiative> [KEY …] say yes: your own tickets get them in Jira, the others go to the draft for their owners',
|
|
90
|
+
' pmos jira criteria-asks [--direct | --draft | --health] the criteria asks waiting for Jira, the draft by owner, or the health number',
|
|
91
|
+
' pmos jira criteria-done <ask id> [--refused "<why>"] what Jira did with one criteria ask',
|
|
80
92
|
' pmos jira digest [--since <YYYY-MM-DD or time>] what moved since the last working day, who moved it, and what is worth a question',
|
|
81
93
|
' every command: [--json] [--root <dir>]',
|
|
82
94
|
'This command never calls Jira. Your agent reads and writes Jira with your own connection.',
|
|
83
95
|
];
|
|
84
|
-
const BOOL = new Set(['json', 'dry-run', 'help', 'sprints', 'keep-default', 'direct', 'draft', 'changed', 'off', 'all']);
|
|
96
|
+
const BOOL = new Set(['json', 'dry-run', 'help', 'sprints', 'keep-default', 'direct', 'draft', 'changed', 'off', 'all', 'health']);
|
|
85
97
|
const VALUE = new Set(['from', 'query', 'root', 'epic', 'updated', 'group', 'status', 'refused', 'sprint', 'text', 'since']);
|
|
86
98
|
const FLAG_TEXT = { 'prd-changed': 'PRD changed', removed: 'Removed from PRD', blocked: 'Blocked', incomplete: 'Missing text', pushing: 'Selected, waiting for the push', edited: 'Edited, not in Jira yet' };
|
|
87
99
|
|
|
@@ -266,6 +278,25 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
266
278
|
if (!r.ok) return fail(r.error);
|
|
267
279
|
return out(r, [r.ask.state === 'set' ? `${r.ask.key} · under ${r.ask.epic} in Jira` : `${r.ask.key} · refused: ${r.ask.why}`]);
|
|
268
280
|
}
|
|
281
|
+
// acceptance criteria written onto the Jira tickets an initiative tracks (jira-criteria-write, A384)
|
|
282
|
+
if (verb === 'criteria-asks') {
|
|
283
|
+
const F = jiraCriteria.readCriteriaAsks(root);
|
|
284
|
+
if (flags.health) { const h = jiraCriteria.healthOf(F, now == null ? Date.now() : now); return out({ ok: true, ...h }, [`${h.written} written, ${h.refused} refused in 14 days`, String(h.pct)]); }
|
|
285
|
+
if (flags.draft) { const t = jiraCriteria.criteriaDraftText(F); return out({ ok: true, draft: t }, [t || 'no ticket waits in the draft']); }
|
|
286
|
+
const P = jiraCriteria.pendingCriteriaAsks(F, flags.direct ? { direct: true } : {});
|
|
287
|
+
if (json) return out({ ok: true, asks: P, written: [...F.values()].filter((a) => a.state === 'written').length }, []);
|
|
288
|
+
if (!P.length) return out(null, ['no criteria ask waits for Jira']);
|
|
289
|
+
const L = [];
|
|
290
|
+
for (const a of P) L.push(`${a.id}\t${a.key}\t${a.labels.length} ${a.labels.length === 1 ? 'check' : 'checks'}${a.direct ? '' : '\t(draft for ' + (a.who || 'its owner') + ')'}`, ...(flags.direct ? [a.block, ''] : []));
|
|
291
|
+
return out(null, L);
|
|
292
|
+
}
|
|
293
|
+
if (verb === 'criteria-done') {
|
|
294
|
+
const id = pos[0];
|
|
295
|
+
if (!id) return need('<ask id> [--refused "<why Jira refused>"]');
|
|
296
|
+
const r = jiraCriteria.answerCriteriaAsk(root, id, flags.refused != null ? { why: flags.refused } : { written: true }, 'agent', now);
|
|
297
|
+
if (!r.ok) return fail(r.error);
|
|
298
|
+
return out(r, [r.ask.state === 'written' ? `${r.ask.key} · acceptance criteria in Jira` : `${r.ask.key} · refused: ${r.ask.why}`]);
|
|
299
|
+
}
|
|
269
300
|
if (verb === 'moved') {
|
|
270
301
|
const id = pos[0];
|
|
271
302
|
if (!id || (flags.status == null) === (flags.refused == null)) return need('<move id> --status "<the status Jira shows now>" | --refused "<why Jira refused>"');
|
|
@@ -361,6 +392,24 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
361
392
|
const who = r.group ? `${initiative} · ${r.group.name}` : initiative;
|
|
362
393
|
return out(r, [e.mode === 'new' ? `${who} · a new epic is created at the first push` : `${who} · tickets go under ${e.key}`]);
|
|
363
394
|
}
|
|
395
|
+
if (verb === 'criteria-propose') {
|
|
396
|
+
const r = jiraCriteria.propose(root, initiative, { me: pmName(env) });
|
|
397
|
+
if (!r.ok) return fail(r.error);
|
|
398
|
+
if (!r.checks) return out(r, [`${initiative} · ${r.note}`]);
|
|
399
|
+
const L = [`${initiative} · ${r.proposals.length} ${r.proposals.length === 1 ? 'ticket' : 'tickets'} to get the done test's checks (${r.doneTest})${r.unmatched.length ? ` · on no ticket: ${r.unmatched.join(', ')}` : ''}`];
|
|
400
|
+
for (const p of r.proposals) L.push('', `${p.key} · ${p.summary || 'no summary read'} · ${p.direct ? 'yours: written in Jira' : 'draft for ' + (p.who || 'its owner')}`, p.block);
|
|
401
|
+
return out(r, L);
|
|
402
|
+
}
|
|
403
|
+
if (verb === 'criteria-ask') {
|
|
404
|
+
if (!initiative) return need('<initiative> [KEY …]');
|
|
405
|
+
const g = await guard.requirePmCli({ act: 'push', expect: initiative,
|
|
406
|
+
...(isTTY === undefined ? {} : { isTTY }), ...(env === undefined ? {} : { env }), ask: ask || guard.askAtTerminal });
|
|
407
|
+
if (!g.ok) return fail(g.error);
|
|
408
|
+
const keys = pos.slice(1);
|
|
409
|
+
const r = jiraCriteria.askCriteria(root, { ini: initiative, keys: keys.length ? keys : null, me: pmName(env) }, (g.actor && g.actor.by) || 'pm', now);
|
|
410
|
+
if (!r.ok) return fail(r.error);
|
|
411
|
+
return out(r, [`${initiative} · ${r.direct.length} yours to write in Jira${r.direct.length ? ' (run the jira-criteria skill, or ask on the page)' : ''} · ${r.draft.length} in the draft for their owners (pmos jira criteria-asks --draft)${r.skipped.length ? ` · not asked: ${r.skipped.join(', ')}` : ''}`]);
|
|
412
|
+
}
|
|
364
413
|
if (verb === 'approve') {
|
|
365
414
|
const ids = pos.slice(1);
|
|
366
415
|
if (!ids.length) return need('<initiative> <ID> …');
|