create-pmos 0.819.0 → 0.821.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 +38 -38
- 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/workflows.js +26 -6
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +37 -24
- package/workspace/guide/cli.md +12 -0
- package/workspace/lib/driver.js +2 -0
- package/workspace/lib/engine/workflows.js +26 -6
- package/workspace/lib/hire-draft.js +172 -0
- package/workspace/lib/line-driver.js +40 -12
- package/workspace/lib/line.js +30 -8
- package/workspace/lib/pmos-verbs.js +4 -1
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-boards.js +1 -1
- package/workspace/lib/routes-stage-signoffs.js +71 -0
- package/workspace/lib/routes-your-move.js +10 -1
- package/workspace/lib/signoff-cli.js +13 -3
- package/workspace/lib/signoffs.js +24 -4
- package/workspace/lib/stage-signoffs.js +207 -0
- package/workspace/lib/vendor/scripts/workflows.js +26 -6
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-today-app.js +61 -1
- package/workspace/public/pm/cozy-today-model.js +20 -4
- package/workspace/public/pm/cozy-today-view.js +17 -2
- package/workspace/public/pm/home-app.js +1 -1
- package/workspace/run-tests.js +37 -4
- package/workspace/test-lists/factory-signoffs-reach-you.json +9 -0
- package/workspace/test-lists/next-hire-draft.json +9 -0
- package/workspace/test-timings.json +499 -114
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.821.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,37 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.821.0",
|
|
38
|
+
"at": "2026-11-25T09:15:25.533Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1880,
|
|
43
|
+
"t": "Pmos hire drafts the next hire from the work that waits (job #1876)",
|
|
44
|
+
"s": "Pmos hire drafts the next hire from the work that waits (job #1876)",
|
|
45
|
+
"k": "new",
|
|
46
|
+
"h": "Pmos hire drafts the next hire from the work that waits (job #1876)",
|
|
47
|
+
"try": {
|
|
48
|
+
"steps": [
|
|
49
|
+
"Open Today and ask the chat: draft the next hire",
|
|
50
|
+
"Open the file it names, under planning/hires",
|
|
51
|
+
"Read the role, why now, the 90-day outcomes and the work it takes"
|
|
52
|
+
],
|
|
53
|
+
"see": "One page names the role most loaded or missing (open tasks and waiting asks per person, or work with no owner), why now with the numbers, three outcomes for 90 days from the initiatives that carry…",
|
|
54
|
+
"open": "/today.html"
|
|
55
|
+
},
|
|
56
|
+
"i": "next-hire-draft"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"n": 1869,
|
|
60
|
+
"t": "A stage's sign-offs reach You on Today (job #1861, Factory page slice A)",
|
|
61
|
+
"s": "A stage's sign-offs reach You on Today (job #1861, Factory page slice A)",
|
|
62
|
+
"k": "new",
|
|
63
|
+
"i": "factory-signoffs-reach-you"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
36
67
|
{
|
|
37
68
|
"v": "0.819.0",
|
|
38
69
|
"at": "2026-11-25T08:28:20.856Z",
|
|
@@ -43,6 +74,7 @@
|
|
|
43
74
|
"t": "Pmos approver shows what each approver asked before",
|
|
44
75
|
"s": "Pmos approver shows what each approver asked before",
|
|
45
76
|
"k": "new",
|
|
77
|
+
"i": "approver-memory",
|
|
46
78
|
"h": "Pmos approver shows what each approver asked before",
|
|
47
79
|
"try": {
|
|
48
80
|
"steps": [
|
|
@@ -51,30 +83,21 @@
|
|
|
51
83
|
],
|
|
52
84
|
"see": "The chat lists what that person had to sign off, what they answered and what they objected to, newest first, each with its source. A person with nothing recorded is left out.",
|
|
53
85
|
"open": "/premium-board.html"
|
|
54
|
-
}
|
|
55
|
-
"i": "approver-memory"
|
|
86
|
+
}
|
|
56
87
|
},
|
|
57
88
|
{
|
|
58
89
|
"n": 1867,
|
|
59
90
|
"t": "Each report draft in each reader's language",
|
|
60
91
|
"s": "Each report draft in each reader's language",
|
|
61
92
|
"k": "new",
|
|
62
|
-
"i": "report-reader-language"
|
|
63
|
-
"try": {
|
|
64
|
-
"steps": [
|
|
65
|
-
"On Today, ask the chat: Dita reads the weekly report in Indonesian.",
|
|
66
|
-
"Open that report from Today, press Redraft, then open ⋯ and press Also in Indonesian.",
|
|
67
|
-
"Compare a number and an initiative id with the original."
|
|
68
|
-
],
|
|
69
|
-
"see": "The copy opens in the Viewer, says it is a translation for Dita, and every number and id matches the original.",
|
|
70
|
-
"open": "/today.html"
|
|
71
|
-
}
|
|
93
|
+
"i": "report-reader-language"
|
|
72
94
|
},
|
|
73
95
|
{
|
|
74
96
|
"n": 1868,
|
|
75
97
|
"t": "The factory numbers snapshot per station (job #1862)",
|
|
76
98
|
"s": "The factory numbers snapshot per station (job #1862)",
|
|
77
99
|
"k": "new",
|
|
100
|
+
"i": "factory-floor-snapshot",
|
|
78
101
|
"h": "The factory numbers snapshot per station (job #1862)",
|
|
79
102
|
"try": {
|
|
80
103
|
"steps": [
|
|
@@ -83,24 +106,14 @@
|
|
|
83
106
|
],
|
|
84
107
|
"see": "PMOS answers per station (Intake, Shape, Plan, Track, Evaluate, Check, You) with what waits, what it made this week, its PMOS time and what you undid; tokens and money say not recorded yet.",
|
|
85
108
|
"open": "/today.html"
|
|
86
|
-
}
|
|
87
|
-
"i": "factory-floor-snapshot"
|
|
109
|
+
}
|
|
88
110
|
},
|
|
89
111
|
{
|
|
90
112
|
"n": 1875,
|
|
91
113
|
"t": "I have N minutes — one pick in Ctrl K, the chat and pmos pick (job #1873)",
|
|
92
114
|
"s": "I have N minutes — one pick in Ctrl K, the chat and pmos pick (job #1873)",
|
|
93
115
|
"k": "new",
|
|
94
|
-
"i": "time-box-pick-chat"
|
|
95
|
-
"try": {
|
|
96
|
-
"steps": [
|
|
97
|
-
"On Today, press Ctrl K and type: I have 30 minutes",
|
|
98
|
-
"Read the first row, then press it",
|
|
99
|
-
"On Today, ask the chat: I have 15 minutes, what should I do?"
|
|
100
|
-
],
|
|
101
|
-
"see": "The first row names one thing from Your move or Waiting on others that fits in the time, about how long it takes and how many others it unblocks. Pressing it opens that item. The chat gives the same…",
|
|
102
|
-
"open": "/today.html"
|
|
103
|
-
}
|
|
116
|
+
"i": "time-box-pick-chat"
|
|
104
117
|
}
|
|
105
118
|
]
|
|
106
119
|
},
|
|
@@ -455,19 +468,6 @@
|
|
|
455
468
|
"k": "fix"
|
|
456
469
|
}
|
|
457
470
|
]
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
"v": "0.792.0",
|
|
461
|
-
"at": "2026-11-24T18:56:18.725Z",
|
|
462
|
-
"f": 4,
|
|
463
|
-
"prs": [
|
|
464
|
-
{
|
|
465
|
-
"n": 1806,
|
|
466
|
-
"t": "Events and Routine sit on the system layouts, tuned so nothing moves (A334)",
|
|
467
|
-
"s": "Events and Routine sit on the system layouts, tuned so nothing moves (A334)",
|
|
468
|
-
"k": "new"
|
|
469
|
-
}
|
|
470
|
-
]
|
|
471
471
|
}
|
|
472
472
|
]
|
|
473
473
|
}
|
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-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-25T09:15:20Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-25T09:15:20Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
* A WORKFLOW is { id, name, icon, builtin?, decide, archived?, stages: [STAGE], bridge? }.
|
|
23
23
|
* bridge { from, map: { [fromStageKey]: stageKey } }: where each stage of the workflow it replaces lands (batch 20 item 3, canvas WmB).
|
|
24
24
|
* It is saved with the new workflow, so every later switch from `from` uses it. Many old stages may land in one new stage.
|
|
25
|
-
* A STAGE is { key, name, cat, output: { name, kind, template? }, finish: [text], milestone, auto, when: { mode, text? }, then, unless: [{ text, to }] }.
|
|
25
|
+
* A STAGE is { key, name, cat, output: { name, kind, template? }, finish: [text], by?, milestone, auto, when: { mode, text? }, then, unless: [{ text, to }] }.
|
|
26
|
+
* by { [finish line]: who }: the To finish lines only a person can give, and who gives each (factory-signoffs-reach-you). A line with
|
|
27
|
+
* `by` is a sign-off: PMOS asks for it and never works it. A line may be written "PRD Aligned (by: PM)"; check() splits it.
|
|
26
28
|
* cat ∈ CATS (To do, In progress, Done). Won't do and Archived (ENDS) are in every workflow and are not stages.
|
|
27
29
|
* The first stage is always `triage`, in To do. `then` null means the next stage in the list. `unless` sends the initiative elsewhere
|
|
28
30
|
* when PMOS judges its plain words true. A key is the slug of the stage's first name and survives a rename.
|
|
@@ -45,7 +47,16 @@ const WHEN_MODES = Object.freeze(['always', 'optional', 'only']);
|
|
|
45
47
|
const DECIDE = Object.freeze(['pmos', 'confirm']);
|
|
46
48
|
const ICONS = Object.freeze(['feature', 'doc', 'cart', 'swap', 'people', 'shield', 'box', 'flag', 'build', 'chart']);
|
|
47
49
|
const PRODUCT_FEATURE_ID = 'product-feature';
|
|
48
|
-
const NAME_MAX = 60, TEXT_MAX = 300, FINISH_MAX = 20, STAGES_MAX = 30;
|
|
50
|
+
const NAME_MAX = 60, TEXT_MAX = 300, FINISH_MAX = 20, STAGES_MAX = 30, BY_MAX = 80;
|
|
51
|
+
// "PRD Aligned (by: PM)" or "PRD Aligned — by: PM": the line and who signs it off
|
|
52
|
+
const BY_IN_LINE = /\s*(?:\(\s*by:\s*([^()]+?)\s*\)|[—–-]+\s*by:\s*(.+?))\s*$/i;
|
|
53
|
+
/** A To finish line written with its sign-off: → { line, by } (by '' when the line names nobody). PURE. */
|
|
54
|
+
function splitBy(text) {
|
|
55
|
+
const t = String(text == null ? '' : text).trim();
|
|
56
|
+
const m = BY_IN_LINE.exec(t);
|
|
57
|
+
if (!m || m.index === 0) return { line: t, by: '' };
|
|
58
|
+
return { line: t.slice(0, m.index).trim(), by: String(m[1] || m[2] || '').trim() };
|
|
59
|
+
}
|
|
49
60
|
|
|
50
61
|
const slug = (s) => String(s || '').toLowerCase().normalize('NFKD').replace(/[^\x00-\x7f]/g, '').replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 40).replace(/-+$/, '');
|
|
51
62
|
const isObj = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
@@ -143,6 +154,15 @@ function check(wf) {
|
|
|
143
154
|
if (o.template != null && o.template !== '' && !oneLine(o.template, 120)) return bad(`stage "${sname}": the template is one line of at most 120 characters`);
|
|
144
155
|
const finish = s.finish == null ? [] : s.finish;
|
|
145
156
|
if (!Array.isArray(finish) || finish.length > FINISH_MAX || finish.some((x) => !oneLine(x, 200))) return bad(`stage "${sname}": To finish is a list of at most ${FINISH_MAX} lines of at most 200 characters`);
|
|
157
|
+
const by = {};
|
|
158
|
+
const lines = finish.map((x) => { const sp = splitBy(x); if (sp.by) by[sp.line] = sp.by; return sp.line; });
|
|
159
|
+
if (s.by != null && !isObj(s.by)) return bad(`stage "${sname}": by is { "<To finish line>": "<who signs it off>" }`);
|
|
160
|
+
for (const [k, v] of Object.entries(s.by || {})) {
|
|
161
|
+
if (!lines.includes(String(k).trim())) return bad(`stage "${sname}": by names "${k}", which is not one of its To finish lines`);
|
|
162
|
+
if (v == null || v === '') continue;
|
|
163
|
+
if (!oneLine(v, BY_MAX) || !/\p{L}/u.test(v)) return bad(`stage "${sname}": who signs off "${k}" is a person or a role, one line of at most ${BY_MAX} characters`);
|
|
164
|
+
if (!by[String(k).trim()]) by[String(k).trim()] = v.trim();
|
|
165
|
+
}
|
|
146
166
|
const w = isObj(s.when) ? s.when : { mode: 'always' };
|
|
147
167
|
if (!WHEN_MODES.includes(w.mode)) return bad(`stage "${sname}": When it runs is one of ${WHEN_MODES.join(', ')}`);
|
|
148
168
|
if (w.mode === 'only' && !oneLine(w.text, TEXT_MAX)) return bad(`stage "${sname}": Only when needs the condition in your words (at most ${TEXT_MAX} characters)`);
|
|
@@ -152,7 +172,7 @@ function check(wf) {
|
|
|
152
172
|
stages.push({
|
|
153
173
|
key, name: sname, cat: s.cat,
|
|
154
174
|
output: { name: o.name ? o.name.trim() : '', kind, ...(o.template ? { template: o.template.trim() } : {}) },
|
|
155
|
-
finish:
|
|
175
|
+
finish: lines, ...(Object.keys(by).length ? { by } : {}), milestone: s.milestone === true, auto: s.auto === true,
|
|
156
176
|
when: w.mode === 'only' ? { mode: 'only', text: w.text.trim() } : { mode: w.mode },
|
|
157
177
|
then: typeof s.then === 'string' && s.then ? s.then : null,
|
|
158
178
|
unless: unless.map((u) => ({ text: u.text.trim(), to: u.to })),
|
|
@@ -338,7 +358,7 @@ function stagesOf(wf, { judged = {}, current = null } = {}) {
|
|
|
338
358
|
const j = judged && judged[s.key] ? judged[s.key] : null;
|
|
339
359
|
const skipped = !!j && j.runs === false;
|
|
340
360
|
const status = skipped ? 'skipped' : at < 0 ? (i === 0 ? 'current' : 'next') : i < at ? 'done' : i === at ? 'current' : 'next';
|
|
341
|
-
return { key: s.key, name: s.name, cat: s.cat, milestone: s.milestone, auto: s.auto, output: s.output, finish: s.finish, when: s.when,
|
|
361
|
+
return { key: s.key, name: s.name, cat: s.cat, milestone: s.milestone, auto: s.auto, output: s.output, finish: s.finish, ...(s.by ? { by: { ...s.by } } : {}), when: s.when,
|
|
342
362
|
then: s.then, unless: s.unless, n: i + 1, of: w.stages.length, status, reading: j ? { runs: j.runs, why: j.why || '', cite: j.cite || null } : null };
|
|
343
363
|
});
|
|
344
364
|
}
|
|
@@ -348,7 +368,7 @@ function copyOf(wf, name, taken) {
|
|
|
348
368
|
const n = oneLine(name, NAME_MAX) ? name.trim() : 'Copy of ' + wf.name;
|
|
349
369
|
let id = slug(n) || 'workflow', k = 2;
|
|
350
370
|
while ((taken && taken.has(id)) || isBuiltin(id)) id = slug(n) + '-' + k++;
|
|
351
|
-
return { id, name: n, icon: wf.icon, decide: wf.decide || 'pmos', ...(WORK_KINDS.includes(wf.kind) ? { kind: wf.kind } : {}), stages: wf.stages.map((s) => ({ ...s, output: { ...s.output }, finish: [...s.finish], when: { ...s.when }, unless: s.unless.map((u) => ({ ...u })) })) };
|
|
371
|
+
return { id, name: n, icon: wf.icon, decide: wf.decide || 'pmos', ...(WORK_KINDS.includes(wf.kind) ? { kind: wf.kind } : {}), stages: wf.stages.map((s) => ({ ...s, output: { ...s.output }, finish: [...s.finish], ...(s.by ? { by: { ...s.by } } : {}), when: { ...s.when }, unless: s.unless.map((u) => ({ ...u })) })) };
|
|
352
372
|
}
|
|
353
373
|
|
|
354
374
|
/** The workflow a kind of work starts on: Project and Full SDLC their own; Product management the workspace's default (defaultOf). */
|
|
@@ -370,5 +390,5 @@ const milestonesOf = (wf) => (wf || PRODUCT_FEATURE).stages.filter((s) => s.mile
|
|
|
370
390
|
module.exports = {
|
|
371
391
|
CATS, CAT_LABEL, ENDS, OUTPUT_KINDS, WHEN_MODES, DECIDE, ICONS, PRODUCT_FEATURE_ID, PRODUCT_FEATURE,
|
|
372
392
|
PROJECT_ID, PROJECT, FULL_SDLC_ID, FULL_SDLC, BUILTIN, KIND_WF, KIND_GATE, MEANING, isBuiltin, forKind, isKindDefault,
|
|
373
|
-
WORK_KINDS, kindOf, slug, check, fold, list, defaultOf, resolve, stageByRef, switchTarget, proposeBridge, mapOf, removedInUse, stagesOf, copyOf, milestonesOf,
|
|
393
|
+
WORK_KINDS, kindOf, slug, check, fold, list, defaultOf, resolve, stageByRef, switchTarget, proposeBridge, mapOf, removedInUse, stagesOf, copyOf, milestonesOf, splitBy,
|
|
374
394
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-25T09:15:20Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.821.0",
|
|
4
|
+
"at": "2026-11-25T09:15:25.533Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1880,
|
|
9
|
+
"t": "Pmos hire drafts the next hire from the work that waits (job #1876)",
|
|
10
|
+
"s": "Pmos hire drafts the next hire from the work that waits (job #1876)",
|
|
11
|
+
"k": "new",
|
|
12
|
+
"h": "Pmos hire drafts the next hire from the work that waits (job #1876)",
|
|
13
|
+
"try": {
|
|
14
|
+
"steps": [
|
|
15
|
+
"Open Today and ask the chat: draft the next hire",
|
|
16
|
+
"Open the file it names, under planning/hires",
|
|
17
|
+
"Read the role, why now, the 90-day outcomes and the work it takes"
|
|
18
|
+
],
|
|
19
|
+
"see": "One page names the role most loaded or missing (open tasks and waiting asks per person, or work with no owner), why now with the numbers, three outcomes for 90 days from the initiatives that carry…",
|
|
20
|
+
"open": "/today.html"
|
|
21
|
+
},
|
|
22
|
+
"i": "next-hire-draft"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"n": 1869,
|
|
26
|
+
"t": "A stage's sign-offs reach You on Today (job #1861, Factory page slice A)",
|
|
27
|
+
"s": "A stage's sign-offs reach You on Today (job #1861, Factory page slice A)",
|
|
28
|
+
"k": "new",
|
|
29
|
+
"i": "factory-signoffs-reach-you"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
2
33
|
{
|
|
3
34
|
"v": "0.819.0",
|
|
4
35
|
"at": "2026-11-25T08:28:20.856Z",
|
|
@@ -9,6 +40,7 @@
|
|
|
9
40
|
"t": "Pmos approver shows what each approver asked before",
|
|
10
41
|
"s": "Pmos approver shows what each approver asked before",
|
|
11
42
|
"k": "new",
|
|
43
|
+
"i": "approver-memory",
|
|
12
44
|
"h": "Pmos approver shows what each approver asked before",
|
|
13
45
|
"try": {
|
|
14
46
|
"steps": [
|
|
@@ -17,30 +49,21 @@
|
|
|
17
49
|
],
|
|
18
50
|
"see": "The chat lists what that person had to sign off, what they answered and what they objected to, newest first, each with its source. A person with nothing recorded is left out.",
|
|
19
51
|
"open": "/premium-board.html"
|
|
20
|
-
}
|
|
21
|
-
"i": "approver-memory"
|
|
52
|
+
}
|
|
22
53
|
},
|
|
23
54
|
{
|
|
24
55
|
"n": 1867,
|
|
25
56
|
"t": "Each report draft in each reader's language",
|
|
26
57
|
"s": "Each report draft in each reader's language",
|
|
27
58
|
"k": "new",
|
|
28
|
-
"i": "report-reader-language"
|
|
29
|
-
"try": {
|
|
30
|
-
"steps": [
|
|
31
|
-
"On Today, ask the chat: Dita reads the weekly report in Indonesian.",
|
|
32
|
-
"Open that report from Today, press Redraft, then open ⋯ and press Also in Indonesian.",
|
|
33
|
-
"Compare a number and an initiative id with the original."
|
|
34
|
-
],
|
|
35
|
-
"see": "The copy opens in the Viewer, says it is a translation for Dita, and every number and id matches the original.",
|
|
36
|
-
"open": "/today.html"
|
|
37
|
-
}
|
|
59
|
+
"i": "report-reader-language"
|
|
38
60
|
},
|
|
39
61
|
{
|
|
40
62
|
"n": 1868,
|
|
41
63
|
"t": "The factory numbers snapshot per station (job #1862)",
|
|
42
64
|
"s": "The factory numbers snapshot per station (job #1862)",
|
|
43
65
|
"k": "new",
|
|
66
|
+
"i": "factory-floor-snapshot",
|
|
44
67
|
"h": "The factory numbers snapshot per station (job #1862)",
|
|
45
68
|
"try": {
|
|
46
69
|
"steps": [
|
|
@@ -49,24 +72,14 @@
|
|
|
49
72
|
],
|
|
50
73
|
"see": "PMOS answers per station (Intake, Shape, Plan, Track, Evaluate, Check, You) with what waits, what it made this week, its PMOS time and what you undid; tokens and money say not recorded yet.",
|
|
51
74
|
"open": "/today.html"
|
|
52
|
-
}
|
|
53
|
-
"i": "factory-floor-snapshot"
|
|
75
|
+
}
|
|
54
76
|
},
|
|
55
77
|
{
|
|
56
78
|
"n": 1875,
|
|
57
79
|
"t": "I have N minutes — one pick in Ctrl K, the chat and pmos pick (job #1873)",
|
|
58
80
|
"s": "I have N minutes — one pick in Ctrl K, the chat and pmos pick (job #1873)",
|
|
59
81
|
"k": "new",
|
|
60
|
-
"i": "time-box-pick-chat"
|
|
61
|
-
"try": {
|
|
62
|
-
"steps": [
|
|
63
|
-
"On Today, press Ctrl K and type: I have 30 minutes",
|
|
64
|
-
"Read the first row, then press it",
|
|
65
|
-
"On Today, ask the chat: I have 15 minutes, what should I do?"
|
|
66
|
-
],
|
|
67
|
-
"see": "The first row names one thing from Your move or Waiting on others that fits in the time, about how long it takes and how many others it unblocks. Pressing it opens that item. The chat gives the same…",
|
|
68
|
-
"open": "/today.html"
|
|
69
|
-
}
|
|
82
|
+
"i": "time-box-pick-chat"
|
|
70
83
|
}
|
|
71
84
|
]
|
|
72
85
|
},
|
package/workspace/guide/cli.md
CHANGED
|
@@ -361,6 +361,15 @@ Write the press release before the build ("working backwards"). Run it in the pr
|
|
|
361
361
|
- The draft uses one agent run with no tools. `--no-ai`, `pmos ai off press-release` or `PMOS_AI=off` makes a draft from the record's own lines only. A failed run does the same and says why.
|
|
362
362
|
- `pmos press-release count [--days 7]` prints how many drafts were written in the last days. Its last line is the number.
|
|
363
363
|
|
|
364
|
+
### pmos hire: draft the next hire from the work that waits
|
|
365
|
+
|
|
366
|
+
Show where the team is short before you ask for headcount. Run it in the product's repository, or pass `--root <dir>`, or ask the chat to "draft the next hire". No running workspace is needed.
|
|
367
|
+
|
|
368
|
+
- `pmos hire show` lists, per role, the open tasks and the asks that wait on someone, divided by the people in that role, most per person first. Each owner's role comes from People. An owner with no role is under "No role recorded", and work with no owner is its own group. It writes nothing.
|
|
369
|
+
- `pmos hire draft` names the role with the most open work per person, when it reaches 6 and no other role ties, and writes a one-page role brief to `planning/hires/<day>-<role>.md` (`pmos/planning/hires/` in a kit): the role, why now with the counts, three outcomes for 90 days from the initiatives that carry most of that work, and the work it takes. When no role is clearly loaded, it says so and writes nothing.
|
|
370
|
+
- PMOS never writes over a brief. It calls no model and sends nothing. Edit the brief and share it yourself.
|
|
371
|
+
- `pmos hire count [--days 7]` prints how many briefs were drafted in the last days. Its last line is the number.
|
|
372
|
+
|
|
364
373
|
### pmos why: why the work exists, in three lines
|
|
365
374
|
|
|
366
375
|
Anyone can run it, not only the PM: an engineer or a stakeholder who wants to know why an initiative or a task exists. Run it in the product's repository, or pass `--root <dir>`. It reads the records on disk, needs no running workspace and changes nothing.
|
|
@@ -962,10 +971,13 @@ An outside sign-off is a yes that someone outside the team must give before the
|
|
|
962
971
|
- `pmos signoff ask <initiative> --who "<name or team>" --what "<what they must say yes to>" [--asked <date>] [--due <date>] [--source <pointer>]` records a sign-off the initiative waits on.
|
|
963
972
|
- `pmos signoff answer <id> --answer "<what they said>" --source <pointer>` records the answer. It needs a pointer to where it was given.
|
|
964
973
|
- `pmos signoff drop <id> [--why "<reason>"]` closes a sign-off that is no longer needed.
|
|
974
|
+
- `pmos signoff evidence <id> --ref <file or Jira key> --quote "<the line, word for word>" [--doc <the document it agrees to>]` records where the yes is written. It also says whether Today can record it.
|
|
965
975
|
- `pmos signoff list [<initiative>] [--all]` lists the open sign-offs. `--all` lists the answered and dropped ones too.
|
|
966
976
|
|
|
967
977
|
An open sign-off that waited 3 days, or is past its due date, goes on your question list for the day, on the same card as the dry-run gaps of your tickets ([Jira tickets](jira.md)). Nothing is sent. Every command takes `--json` and `--root <dir>`.
|
|
968
978
|
|
|
979
|
+
A workflow stage can name its own sign-offs. Write a To finish line as `PRD Aligned (by: PM)`, or give the stage `"by": { "PRD Aligned": "PM" }`. A line with `by:` is a sign-off: PMOS asks for it and never works it, and the Driver does not wake for it. Each open one is a Your move row on Today, with who gives it and the stage that waits. ✓ records it only when its source has the quoted line and is newer than the document it agrees to. Otherwise the row opens the source. A row with no source drafts the question for the tracker, and it goes to the outbox only when you press it. Recording the last missing sign-off moves the stage in the same press, and one Undo puts both back. A workflow with no `by:` lines gets one ✦ row per stage that suggests them, with Keep or Change.
|
|
980
|
+
|
|
969
981
|
### pmos approver
|
|
970
982
|
|
|
971
983
|
Walk into a sign-off with what that person asked last time. PMOS reads the sign-offs above and the decision journal, and groups what each approver had to say yes to, what they answered, and what they objected to. It writes nothing.
|
package/workspace/lib/driver.js
CHANGED
|
@@ -434,6 +434,8 @@ function detect(facts, state, { now, stalledDays } = {}) {
|
|
|
434
434
|
if (i.last_activity != null && t - i.last_activity >= stall) b('stalled', 'agent', null, `Nothing changed for ${Math.floor((t - i.last_activity) / DAY)} days`);
|
|
435
435
|
// product line slice 3 (lib/line-driver.js): the station's missing exit items, as `pmos line` reads them, wake the Driver to work them
|
|
436
436
|
{ const x = require('./line-driver.js').blockerOf(i.exit, state, { now: t }); if (x) { add(target, i.board || null, title, x.code, 'agent', i.cat || null, x.text, iniKey(i, x.key)); out[out.length - 1].exit = x.items; } }
|
|
437
|
+
// factory-signoffs-reach-you: the stage's missing sign-offs are the PM's blocker, never an agent wake (Today › Your move asks for them)
|
|
438
|
+
{ const x = require('./line-driver.js').signoffBlockerOf(i.exit); if (x) { b('signoff-missing', 'pm', i.cat || null, x.text); out[out.length - 1].exit = x.items; } }
|
|
437
439
|
}
|
|
438
440
|
for (const w of facts.work || []) {
|
|
439
441
|
if (!w || w.done) continue;
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
* A WORKFLOW is { id, name, icon, builtin?, decide, archived?, stages: [STAGE], bridge? }.
|
|
23
23
|
* bridge { from, map: { [fromStageKey]: stageKey } }: where each stage of the workflow it replaces lands (batch 20 item 3, canvas WmB).
|
|
24
24
|
* It is saved with the new workflow, so every later switch from `from` uses it. Many old stages may land in one new stage.
|
|
25
|
-
* A STAGE is { key, name, cat, output: { name, kind, template? }, finish: [text], milestone, auto, when: { mode, text? }, then, unless: [{ text, to }] }.
|
|
25
|
+
* A STAGE is { key, name, cat, output: { name, kind, template? }, finish: [text], by?, milestone, auto, when: { mode, text? }, then, unless: [{ text, to }] }.
|
|
26
|
+
* by { [finish line]: who }: the To finish lines only a person can give, and who gives each (factory-signoffs-reach-you). A line with
|
|
27
|
+
* `by` is a sign-off: PMOS asks for it and never works it. A line may be written "PRD Aligned (by: PM)"; check() splits it.
|
|
26
28
|
* cat ∈ CATS (To do, In progress, Done). Won't do and Archived (ENDS) are in every workflow and are not stages.
|
|
27
29
|
* The first stage is always `triage`, in To do. `then` null means the next stage in the list. `unless` sends the initiative elsewhere
|
|
28
30
|
* when PMOS judges its plain words true. A key is the slug of the stage's first name and survives a rename.
|
|
@@ -45,7 +47,16 @@ const WHEN_MODES = Object.freeze(['always', 'optional', 'only']);
|
|
|
45
47
|
const DECIDE = Object.freeze(['pmos', 'confirm']);
|
|
46
48
|
const ICONS = Object.freeze(['feature', 'doc', 'cart', 'swap', 'people', 'shield', 'box', 'flag', 'build', 'chart']);
|
|
47
49
|
const PRODUCT_FEATURE_ID = 'product-feature';
|
|
48
|
-
const NAME_MAX = 60, TEXT_MAX = 300, FINISH_MAX = 20, STAGES_MAX = 30;
|
|
50
|
+
const NAME_MAX = 60, TEXT_MAX = 300, FINISH_MAX = 20, STAGES_MAX = 30, BY_MAX = 80;
|
|
51
|
+
// "PRD Aligned (by: PM)" or "PRD Aligned — by: PM": the line and who signs it off
|
|
52
|
+
const BY_IN_LINE = /\s*(?:\(\s*by:\s*([^()]+?)\s*\)|[—–-]+\s*by:\s*(.+?))\s*$/i;
|
|
53
|
+
/** A To finish line written with its sign-off: → { line, by } (by '' when the line names nobody). PURE. */
|
|
54
|
+
function splitBy(text) {
|
|
55
|
+
const t = String(text == null ? '' : text).trim();
|
|
56
|
+
const m = BY_IN_LINE.exec(t);
|
|
57
|
+
if (!m || m.index === 0) return { line: t, by: '' };
|
|
58
|
+
return { line: t.slice(0, m.index).trim(), by: String(m[1] || m[2] || '').trim() };
|
|
59
|
+
}
|
|
49
60
|
|
|
50
61
|
const slug = (s) => String(s || '').toLowerCase().normalize('NFKD').replace(/[^\x00-\x7f]/g, '').replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 40).replace(/-+$/, '');
|
|
51
62
|
const isObj = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
@@ -143,6 +154,15 @@ function check(wf) {
|
|
|
143
154
|
if (o.template != null && o.template !== '' && !oneLine(o.template, 120)) return bad(`stage "${sname}": the template is one line of at most 120 characters`);
|
|
144
155
|
const finish = s.finish == null ? [] : s.finish;
|
|
145
156
|
if (!Array.isArray(finish) || finish.length > FINISH_MAX || finish.some((x) => !oneLine(x, 200))) return bad(`stage "${sname}": To finish is a list of at most ${FINISH_MAX} lines of at most 200 characters`);
|
|
157
|
+
const by = {};
|
|
158
|
+
const lines = finish.map((x) => { const sp = splitBy(x); if (sp.by) by[sp.line] = sp.by; return sp.line; });
|
|
159
|
+
if (s.by != null && !isObj(s.by)) return bad(`stage "${sname}": by is { "<To finish line>": "<who signs it off>" }`);
|
|
160
|
+
for (const [k, v] of Object.entries(s.by || {})) {
|
|
161
|
+
if (!lines.includes(String(k).trim())) return bad(`stage "${sname}": by names "${k}", which is not one of its To finish lines`);
|
|
162
|
+
if (v == null || v === '') continue;
|
|
163
|
+
if (!oneLine(v, BY_MAX) || !/\p{L}/u.test(v)) return bad(`stage "${sname}": who signs off "${k}" is a person or a role, one line of at most ${BY_MAX} characters`);
|
|
164
|
+
if (!by[String(k).trim()]) by[String(k).trim()] = v.trim();
|
|
165
|
+
}
|
|
146
166
|
const w = isObj(s.when) ? s.when : { mode: 'always' };
|
|
147
167
|
if (!WHEN_MODES.includes(w.mode)) return bad(`stage "${sname}": When it runs is one of ${WHEN_MODES.join(', ')}`);
|
|
148
168
|
if (w.mode === 'only' && !oneLine(w.text, TEXT_MAX)) return bad(`stage "${sname}": Only when needs the condition in your words (at most ${TEXT_MAX} characters)`);
|
|
@@ -152,7 +172,7 @@ function check(wf) {
|
|
|
152
172
|
stages.push({
|
|
153
173
|
key, name: sname, cat: s.cat,
|
|
154
174
|
output: { name: o.name ? o.name.trim() : '', kind, ...(o.template ? { template: o.template.trim() } : {}) },
|
|
155
|
-
finish:
|
|
175
|
+
finish: lines, ...(Object.keys(by).length ? { by } : {}), milestone: s.milestone === true, auto: s.auto === true,
|
|
156
176
|
when: w.mode === 'only' ? { mode: 'only', text: w.text.trim() } : { mode: w.mode },
|
|
157
177
|
then: typeof s.then === 'string' && s.then ? s.then : null,
|
|
158
178
|
unless: unless.map((u) => ({ text: u.text.trim(), to: u.to })),
|
|
@@ -338,7 +358,7 @@ function stagesOf(wf, { judged = {}, current = null } = {}) {
|
|
|
338
358
|
const j = judged && judged[s.key] ? judged[s.key] : null;
|
|
339
359
|
const skipped = !!j && j.runs === false;
|
|
340
360
|
const status = skipped ? 'skipped' : at < 0 ? (i === 0 ? 'current' : 'next') : i < at ? 'done' : i === at ? 'current' : 'next';
|
|
341
|
-
return { key: s.key, name: s.name, cat: s.cat, milestone: s.milestone, auto: s.auto, output: s.output, finish: s.finish, when: s.when,
|
|
361
|
+
return { key: s.key, name: s.name, cat: s.cat, milestone: s.milestone, auto: s.auto, output: s.output, finish: s.finish, ...(s.by ? { by: { ...s.by } } : {}), when: s.when,
|
|
342
362
|
then: s.then, unless: s.unless, n: i + 1, of: w.stages.length, status, reading: j ? { runs: j.runs, why: j.why || '', cite: j.cite || null } : null };
|
|
343
363
|
});
|
|
344
364
|
}
|
|
@@ -348,7 +368,7 @@ function copyOf(wf, name, taken) {
|
|
|
348
368
|
const n = oneLine(name, NAME_MAX) ? name.trim() : 'Copy of ' + wf.name;
|
|
349
369
|
let id = slug(n) || 'workflow', k = 2;
|
|
350
370
|
while ((taken && taken.has(id)) || isBuiltin(id)) id = slug(n) + '-' + k++;
|
|
351
|
-
return { id, name: n, icon: wf.icon, decide: wf.decide || 'pmos', ...(WORK_KINDS.includes(wf.kind) ? { kind: wf.kind } : {}), stages: wf.stages.map((s) => ({ ...s, output: { ...s.output }, finish: [...s.finish], when: { ...s.when }, unless: s.unless.map((u) => ({ ...u })) })) };
|
|
371
|
+
return { id, name: n, icon: wf.icon, decide: wf.decide || 'pmos', ...(WORK_KINDS.includes(wf.kind) ? { kind: wf.kind } : {}), stages: wf.stages.map((s) => ({ ...s, output: { ...s.output }, finish: [...s.finish], ...(s.by ? { by: { ...s.by } } : {}), when: { ...s.when }, unless: s.unless.map((u) => ({ ...u })) })) };
|
|
352
372
|
}
|
|
353
373
|
|
|
354
374
|
/** The workflow a kind of work starts on: Project and Full SDLC their own; Product management the workspace's default (defaultOf). */
|
|
@@ -370,5 +390,5 @@ const milestonesOf = (wf) => (wf || PRODUCT_FEATURE).stages.filter((s) => s.mile
|
|
|
370
390
|
module.exports = {
|
|
371
391
|
CATS, CAT_LABEL, ENDS, OUTPUT_KINDS, WHEN_MODES, DECIDE, ICONS, PRODUCT_FEATURE_ID, PRODUCT_FEATURE,
|
|
372
392
|
PROJECT_ID, PROJECT, FULL_SDLC_ID, FULL_SDLC, BUILTIN, KIND_WF, KIND_GATE, MEANING, isBuiltin, forKind, isKindDefault,
|
|
373
|
-
WORK_KINDS, kindOf, slug, check, fold, list, defaultOf, resolve, stageByRef, switchTarget, proposeBridge, mapOf, removedInUse, stagesOf, copyOf, milestonesOf,
|
|
393
|
+
WORK_KINDS, kindOf, slug, check, fold, list, defaultOf, resolve, stageByRef, switchTarget, proposeBridge, mapOf, removedInUse, stagesOf, copyOf, milestonesOf, splitBy,
|
|
374
394
|
};
|