create-pmos 0.754.0 → 0.755.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 +14 -46
- 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 +13 -0
- package/workspace/guide/cli.md +9 -0
- package/workspace/lib/driver-cli.js +7 -0
- package/workspace/lib/needs-providers.js +1 -0
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/setup-cli.js +13 -0
- package/workspace/lib/setup-station.js +400 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/test-lists/setup-station.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.755.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,19 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.755.0",
|
|
38
|
+
"at": "2026-11-24T00:55:56.769Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1699,
|
|
43
|
+
"t": "A new product passes a Setup station before PMOS plans its work",
|
|
44
|
+
"s": "A new product passes a Setup station before PMOS plans its work",
|
|
45
|
+
"k": "new"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
36
49
|
{
|
|
37
50
|
"v": "0.754.0",
|
|
38
51
|
"at": "2026-11-24T00:39:51.827Z",
|
|
@@ -533,51 +546,6 @@
|
|
|
533
546
|
}
|
|
534
547
|
}
|
|
535
548
|
]
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
"v": "0.732.0",
|
|
539
|
-
"at": "2026-11-23T06:02:19.112Z",
|
|
540
|
-
"f": 4,
|
|
541
|
-
"prs": [
|
|
542
|
-
{
|
|
543
|
-
"n": 1632,
|
|
544
|
-
"t": "Work always opens in the full popup; remove \"Open work beside the page\"",
|
|
545
|
-
"s": "Work always opens in the full popup; remove \"Open work beside the page\"",
|
|
546
|
-
"k": "fix",
|
|
547
|
-
"try": {
|
|
548
|
-
"steps": [
|
|
549
|
-
"Open any work item.",
|
|
550
|
-
"Check the chat's ⋯ menu."
|
|
551
|
-
],
|
|
552
|
-
"see": "The full popup every time; Open work beside the page is gone."
|
|
553
|
-
}
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
"n": 1628,
|
|
557
|
-
"t": "Customer signal count on each roadmap item (A157)",
|
|
558
|
-
"s": "Customer signal count on each roadmap item (A157)",
|
|
559
|
-
"k": "new",
|
|
560
|
-
"try": {
|
|
561
|
-
"steps": [
|
|
562
|
-
"Open Work in List view."
|
|
563
|
-
],
|
|
564
|
-
"see": "Items with customer signals show a count in the Next cell; pressing it lists them.",
|
|
565
|
-
"open": "/premium-board.html"
|
|
566
|
-
}
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
"n": 1630,
|
|
570
|
-
"t": "Draft positioning and key messages from the strategy, each citing its line (A328)",
|
|
571
|
-
"s": "Draft positioning and key messages from the strategy, each citing its line (A328)",
|
|
572
|
-
"k": "new",
|
|
573
|
-
"try": {
|
|
574
|
-
"steps": [
|
|
575
|
-
"On a product with a five-line strategy, ask the chat to draft positioning and key messages."
|
|
576
|
-
],
|
|
577
|
-
"see": "Each line of the draft cites the strategy line it came from."
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
]
|
|
581
549
|
}
|
|
582
550
|
]
|
|
583
551
|
}
|
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-24T00:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-24T00:55:53Z"}
|
|
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-24T00:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-24T00:55:53Z"}
|
|
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-24T00:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-24T00:55:53Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.755.0",
|
|
4
|
+
"at": "2026-11-24T00:55:56.769Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1699,
|
|
9
|
+
"t": "A new product passes a Setup station before PMOS plans its work",
|
|
10
|
+
"s": "A new product passes a Setup station before PMOS plans its work",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.754.0",
|
|
4
17
|
"at": "2026-11-24T00:39:51.827Z",
|
package/workspace/guide/cli.md
CHANGED
|
@@ -51,6 +51,15 @@ Some computers have no global git name and email, so each repository keeps its o
|
|
|
51
51
|
|
|
52
52
|
Type `pmos git-identity` in the repository to see the identity it commits as and the GitHub login it pushes with. When one is missing, the result lists the ones your other repositories use. To save your choice for this repository only, type `pmos git-identity set --name "Your Name" --email you@example.com --login your-github-login`. To save only the login, type `pmos git-identity set --login your-github-login`. After that, `git push` in the repository uses that login, whichever login `gh` has active. Your global git settings do not change.
|
|
53
53
|
|
|
54
|
+
### pmos setup: the Setup station of a new product
|
|
55
|
+
|
|
56
|
+
A new product passes Setup when three things are recorded: its tracker was read, at least one goal is agreed, and it has an owner. Until then, PMOS runs only Triage and the documents part of Discovery on it. A product with work already past Discovery is not held.
|
|
57
|
+
|
|
58
|
+
- `pmos setup` (or `pmos setup check`) shows the three items, each with the record it rests on, and the next proposal. The number of items met is on the last line.
|
|
59
|
+
- `pmos setup agree goal` keeps the goal PMOS drafted. The goal loses its PROPOSED mark.
|
|
60
|
+
- `pmos setup owner "<name>"` writes the owner in project-context.md.
|
|
61
|
+
- `pmos setup undo` takes the last of these two back. It does nothing when the file was changed since.
|
|
62
|
+
|
|
54
63
|
## Your day
|
|
55
64
|
|
|
56
65
|
### pmos today
|
|
@@ -33,6 +33,7 @@ const D = require('./driver.js');
|
|
|
33
33
|
const decideLib = require('./driver-decide.js');
|
|
34
34
|
const stageTools = require('./stage-tools.js');
|
|
35
35
|
const stateRoot = require('./state-root.js');
|
|
36
|
+
const setupLib = require('./setup-station.js');
|
|
36
37
|
|
|
37
38
|
const COMMANDS = { driver: ['propose', 'status', 'exits', 'keep', 'return', 'drop', 'undo', 'pause', 'resume', 'mode'] };
|
|
38
39
|
const USAGE = [
|
|
@@ -147,6 +148,12 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
147
148
|
if (flags.effort !== undefined) asked.effort = String(flags.effort).toUpperCase();
|
|
148
149
|
const c = D.checkProposal({ ...target(), what: flags.what, data: d.data, why: flags.why, sources: s.sources, ...asked });
|
|
149
150
|
if (!c.ok) return fail(c.error);
|
|
151
|
+
// setup-station: until a new product passes Setup, only Triage and the documents part of Discovery run (lib/setup-station.js gate)
|
|
152
|
+
if (c.proposal.target.kind === 'initiative' && !setupLib.DOC_WHATS.includes(c.proposal.what)) {
|
|
153
|
+
const sr = setupLib.check(setupLib.read(root, { runtimeDir: stateRoot.defaultRoot() }));
|
|
154
|
+
const g = setupLib.gate(sr, sr.passed ? [] : setupLib.stepsOf(root), { what: c.proposal.what, data: c.proposal.data });
|
|
155
|
+
if (!g.ok) { console.error(`[setup] held ${c.proposal.what} on ${c.proposal.target.id}: missing ${sr.missing.join(', ')}`); return fail(g.error); }
|
|
156
|
+
}
|
|
150
157
|
const actor = actorLib.fromCli(who);
|
|
151
158
|
const state = D.fold(D.readLines(file));
|
|
152
159
|
const same = JSON.stringify(c.proposal.data);
|
|
@@ -41,6 +41,7 @@ const PROVIDERS = Object.freeze([
|
|
|
41
41
|
'decision-journal-needs', // decision-journal-outcome-checks: a journal decision whose check date came, with no verdict (kind 1)
|
|
42
42
|
'parked-reasons', // parked-reason-way-back (bet A446): a parked initiative whose way back is met, to bring back (kind 7)
|
|
43
43
|
'product-health', // product-health-score: a product's health score fell 10 points or more against its past week (kind 8)
|
|
44
|
+
'setup-station', // setup-station: a product that has not passed Setup (tracker read, agreed goal, owner), with the next ✦ (kind 7)
|
|
44
45
|
]);
|
|
45
46
|
/** Kinds that already mean something in the needs queue. A provider may not reuse one. */
|
|
46
47
|
const RESERVED_KINDS = Object.freeze(['question', 'accept', 'outcome', 'keep', 'evidence', 'plan-flag', 'provider-error']);
|
|
@@ -179,6 +179,9 @@ const VERBS = Object.freeze({
|
|
|
179
179
|
// one-change-record-no-source-no-auto: everything PMOS changed by itself, in one record (lib/change-record.js)
|
|
180
180
|
health: Object.freeze({ module: 'product-health-cli.js', run: null, guide: 'cli.md',
|
|
181
181
|
help: 'pmos health [score|trend|drops] — this product\'s health score (0 to 100), its trend this month and its past drops (pmos health help)' }),
|
|
182
|
+
// Not a pm-os-absorb verb (run: null): initiative setup-station (product line slice 5) added it through the same table.
|
|
183
|
+
setup: Object.freeze({ module: 'setup-cli.js', run: null, guide: 'cli.md',
|
|
184
|
+
help: 'pmos setup [agree goal|owner "<name>"|undo] — the Setup station of a new product: tracker read, an agreed goal and an owner (pmos setup help)' }),
|
|
182
185
|
factory: Object.freeze({ module: 'factory-cli.js', run: null, guide: 'cli.md',
|
|
183
186
|
help: 'pmos factory today [--days N] — everything PMOS changed by itself, per line and station, with what cites no source (pmos factory help)' }),
|
|
184
187
|
// D106 (Full autonomy now): what agents do by themselves, and the goals they work on until done
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* setup-cli.js — `pmos setup`: the Setup station of this product (initiative setup-station). The work is in lib/setup-station.js; this file
|
|
3
|
+
* is the verb's entry in lib/pmos-verbs.js. Reads, except the two approvals (agree goal, owner) and their undo. */
|
|
4
|
+
const S = require('./setup-station.js');
|
|
5
|
+
|
|
6
|
+
const COMMANDS = S.COMMANDS;
|
|
7
|
+
const USAGE = S.USAGE;
|
|
8
|
+
function run(argv, { say = (s) => console.log(s) } = {}) {
|
|
9
|
+
const args = argv[0] === 'setup' ? argv.slice(1) : argv.slice();
|
|
10
|
+
return S.cli(args, { say });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = { COMMANDS, USAGE, run };
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* setup-station.js — the Setup station of the product line: a new product passes it before PMOS plans its work (initiative setup-station;
|
|
3
|
+
* product line plan, doc Ejs4HXyqpenvaiqiRMtzoF tab Plan, slice 5, agreed by the PM 2026-11-24).
|
|
4
|
+
*
|
|
5
|
+
* read(root, { runtimeDir }) → facts the three exit items as the records state them. Reads only; never writes
|
|
6
|
+
* check(facts) → result PURE. { passed, met, of: 3, items: [item], missing: [label], next: proposal | null }
|
|
7
|
+
* holds(result, steps) → bool PURE. Is the gate shut? Only while Setup has not passed AND the product is new
|
|
8
|
+
* gate(result, steps, { what, data }) → { ok } | { ok: false, error } PURE. May the Driver file this proposal now?
|
|
9
|
+
* stepsOf(root) → [step] | null the lifecycle step of each initiative (lib/stage-read.js), null when unreadable
|
|
10
|
+
* agreeGoal(root, { now, by }) · setOwner(root, name, { now, by }) · undo(root, { now, by }) the PM's approvals, with Undo
|
|
11
|
+
* kinds · rowsFor(w, { lead }) · sig(w) the Today row (lib/needs-providers.js)
|
|
12
|
+
* cli(argv, { say, cwd }) `pmos setup [check|agree goal|owner "<name>"|undo]`
|
|
13
|
+
*
|
|
14
|
+
* THE EXIT TEST (Connect station). A product passes when its records show all three:
|
|
15
|
+
* tracker the tracker was read: a Jira status snapshot (<state>/tracker/jira/<initiative>.md, lib/jira-status.js) or the tracker read stamp
|
|
16
|
+
* (lib/tracker-read.js, `pmos tracker done`). Connecting the tracker is the person's: PMOS cannot do it for them.
|
|
17
|
+
* goal at least one AGREED goal: a key result of the OKR files (lib/okr-goals.js) not marked PROPOSED. A PROPOSED one is a draft PMOS
|
|
18
|
+
* offers for one approval (`pmos setup agree goal`).
|
|
19
|
+
* owner the Owner line of project-context.md (lib/project-onboard.js readContext). With none, PMOS offers the person who committed most
|
|
20
|
+
* in the last 90 days, from git, for one approval (`pmos setup owner "<name>"`).
|
|
21
|
+
* A record that cannot be read is "can't tell", never a pass (the plan's rule 1).
|
|
22
|
+
*
|
|
23
|
+
* THE GATE. Until Setup passes, only Triage and the documents part of Discovery run: the Driver may file problem, evidence, assumption, note,
|
|
24
|
+
* doc, artefact and overlap proposals and a move into a Triage or Discovery stage; sizing, stakeholders and any later move wait. It holds only
|
|
25
|
+
* while the product is NEW: when one of its initiatives already stands past Discovery (its records put it there, by the person or the tracker),
|
|
26
|
+
* the product is running and the gate stays open (the plan's rule 2, the outside wins). A product that cannot be read holds.
|
|
27
|
+
*
|
|
28
|
+
* THE LEDGER is <state>/setup.jsonl, one line per approval: { v: 1, ev: 'agree' | 'owner' | 'undo', file, before, after, at, by }. Undo puts
|
|
29
|
+
* the file back only while nobody changed it since. Nothing here sends anything or calls a model. Works on any product built with PMOS.
|
|
30
|
+
*/
|
|
31
|
+
const fs = require('fs');
|
|
32
|
+
const path = require('path');
|
|
33
|
+
const { spawnSync } = require('child_process');
|
|
34
|
+
|
|
35
|
+
const TAG = '[setup]';
|
|
36
|
+
const NAME = 'setup-station';
|
|
37
|
+
const KIND = 'setup-station';
|
|
38
|
+
const LEDGER = 'setup.jsonl';
|
|
39
|
+
const OF = 3;
|
|
40
|
+
const DOC_WHATS = Object.freeze(['problem', 'evidence', 'assumption', 'note', 'doc', 'artefact', 'overlap']);
|
|
41
|
+
const OPEN_STEPS = Object.freeze(['triage', 'discover']);
|
|
42
|
+
const DISCOVER_STAGE = /\b(triage|discover|discovery|intake)\b/i;
|
|
43
|
+
const BOT = /\[bot\]|\bbot\b|^claude$|^github-actions|^dependabot|noreply@anthropic\.com|^noreply@github\.com$|^actions@github/i;
|
|
44
|
+
const LABEL = { tracker: 'tracker read', goal: 'an agreed goal', owner: 'an owner' };
|
|
45
|
+
|
|
46
|
+
const clip = (s, n) => String(s == null ? '' : s).replace(/\s+/g, ' ').trim().slice(0, n);
|
|
47
|
+
const mtime = (f) => { try { return fs.statSync(f).mtimeMs; } catch { return 0; } };
|
|
48
|
+
const readText = (f) => { try { return fs.readFileSync(f, 'utf8'); } catch { return null; } };
|
|
49
|
+
const day = (ms) => new Date(ms).toISOString().slice(0, 10);
|
|
50
|
+
|
|
51
|
+
function stateDirOf(root) { try { return require('./driver.js').stateDirOf(root); } catch { return null; } }
|
|
52
|
+
function planningOf(root) {
|
|
53
|
+
try { const pm = require('./project-onboard.js').pmosIn(root); if (pm) return pm.planning; } catch { /* below */ }
|
|
54
|
+
return fs.existsSync(path.join(root, 'pmos', 'planning')) ? path.join(root, 'pmos', 'planning') : path.join(root, 'planning');
|
|
55
|
+
}
|
|
56
|
+
const okrDirOf = (root) => [path.join(root, 'pmos', 'planning', 'okrs'), path.join(root, 'planning', 'okrs')].find((d) => fs.existsSync(d)) || null;
|
|
57
|
+
|
|
58
|
+
// ── reading the records ──────────────────────────────────────────────────────────────────────────────────
|
|
59
|
+
|
|
60
|
+
function trackerOf(root, runtimeDir) {
|
|
61
|
+
const out = { at: 0, via: null };
|
|
62
|
+
try {
|
|
63
|
+
const sd = stateDirOf(root);
|
|
64
|
+
const j = sd ? require('./freshness.js').jiraAsOf(sd) : 0;
|
|
65
|
+
if (j > out.at) { out.at = j; out.via = 'Jira status read'; }
|
|
66
|
+
} catch { /* the other read answers */ }
|
|
67
|
+
try {
|
|
68
|
+
const t = runtimeDir ? require('./tracker-read.js').readAtMs(runtimeDir, root) : 0;
|
|
69
|
+
if (t > out.at) { out.at = t; out.via = 'tracker items read'; }
|
|
70
|
+
} catch { /* none */ }
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function goalsOf(root) {
|
|
75
|
+
let okr;
|
|
76
|
+
try { okr = require('./okr-goals.js').read(root); } catch (e) { return { error: 'the OKR files could not be read' }; }
|
|
77
|
+
if (!okr.ok) return { agreed: [], proposed: [], files: [] };
|
|
78
|
+
const krs = okr.objectives.flatMap((o) => o.krs.map((k) => ({ token: `${o.token}.${k.token}`, kr: k.token, title: k.title, proposed: !!k.proposed })));
|
|
79
|
+
return { agreed: krs.filter((k) => !k.proposed), proposed: krs.filter((k) => k.proposed), files: okr.files };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function contextOf(root) {
|
|
83
|
+
const file = path.join(planningOf(root), 'project-context.md');
|
|
84
|
+
const text = readText(file);
|
|
85
|
+
if (text == null) return { file, exists: false, ctx: null };
|
|
86
|
+
try { return { file, exists: true, ctx: require('./project-onboard.js').readContext(text) }; } catch { return { file, exists: true, ctx: null, error: true }; }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** The person who committed most in the last 90 days: a draft owner, with its source. null with no git or no commits. */
|
|
90
|
+
function ownerDraftOf(root) {
|
|
91
|
+
const r = spawnSync('git', ['shortlog', '-sne', '--no-merges', '--since=90.days', 'HEAD'], { cwd: root, encoding: 'utf8', timeout: 5000, stdio: ['ignore', 'pipe', 'ignore'] });
|
|
92
|
+
if (r.status !== 0) return null;
|
|
93
|
+
for (const line of String(r.stdout || '').split('\n')) {
|
|
94
|
+
const m = /^\s*(\d+)\s+(.+?)\s+<([^>]*)>\s*$/.exec(line);
|
|
95
|
+
if (!m || BOT.test(m[2]) || BOT.test(m[3])) continue; // an agent or a bot commits; it does not own the product
|
|
96
|
+
return { name: clip(m[2], 80), source: `git: ${m[1]} commit${m[1] === '1' ? '' : 's'} in the last 90 days, the most of any person` };
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function read(root, { runtimeDir = null, ownerDraft = ownerDraftOf } = {}) {
|
|
102
|
+
const ctx = contextOf(root);
|
|
103
|
+
const owner = ctx.ctx && ctx.ctx.fields && ctx.ctx.fields.owner ? ctx.ctx.fields.owner : null;
|
|
104
|
+
const g = goalsOf(root);
|
|
105
|
+
return {
|
|
106
|
+
name: (ctx.ctx && ctx.ctx.name) || path.basename(path.resolve(root)),
|
|
107
|
+
tracker: trackerOf(root, runtimeDir),
|
|
108
|
+
goals: g.error ? { error: g.error } : g,
|
|
109
|
+
owner: ctx.error ? { error: 'project-context.md could not be read' } : owner ? { value: owner.value, source: owner.source, file: path.relative(root, ctx.file) } : null,
|
|
110
|
+
ownerDraft: owner || ctx.error ? null : (ownerDraft ? ownerDraft(root) : null),
|
|
111
|
+
goalDraft: ctx.ctx && ctx.ctx.goal ? ctx.ctx.goal : null,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ── the exit test ────────────────────────────────────────────────────────────────────────────────────────
|
|
116
|
+
|
|
117
|
+
/** facts (read() or a test's) → { passed, met, of, items: [{ key, label, status: 'ok'|'missing'|"can't tell", quote }], missing, next }. PURE. */
|
|
118
|
+
function check(facts) {
|
|
119
|
+
const f = facts || {};
|
|
120
|
+
const items = [];
|
|
121
|
+
const t = f.tracker || {};
|
|
122
|
+
items.push(t.at > 0 ? { key: 'tracker', label: LABEL.tracker, status: 'ok', quote: `${t.via || 'tracker read'} on ${day(t.at)}` }
|
|
123
|
+
: { key: 'tracker', label: LABEL.tracker, status: 'missing', quote: 'no Jira status snapshot and no tracker read recorded' });
|
|
124
|
+
const g = f.goals || {};
|
|
125
|
+
if (g.error) items.push({ key: 'goal', label: LABEL.goal, status: "can't tell", quote: g.error });
|
|
126
|
+
else if ((g.agreed || []).length) items.push({ key: 'goal', label: LABEL.goal, status: 'ok', quote: `${g.agreed[0].token}: ${g.agreed[0].title}` + (g.agreed.length > 1 ? ` and ${g.agreed.length - 1} more` : '') });
|
|
127
|
+
else items.push({ key: 'goal', label: LABEL.goal, status: 'missing', quote: (g.proposed || []).length ? `${g.proposed.length} drafted, none agreed yet` : 'no goal in the OKR files' });
|
|
128
|
+
const o = f.owner;
|
|
129
|
+
if (o && o.error) items.push({ key: 'owner', label: LABEL.owner, status: "can't tell", quote: o.error });
|
|
130
|
+
else if (o && o.value) items.push({ key: 'owner', label: LABEL.owner, status: 'ok', quote: `${o.value} (${o.file || 'project-context.md'})` });
|
|
131
|
+
else items.push({ key: 'owner', label: LABEL.owner, status: 'missing', quote: 'no Owner line in project-context.md' });
|
|
132
|
+
const met = items.filter((i) => i.status === 'ok').length;
|
|
133
|
+
const missing = items.filter((i) => i.status !== 'ok').map((i) => i.label);
|
|
134
|
+
return { passed: met === OF, met, of: OF, items, missing, next: nextOf(items, f) };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** The one ✦ proposal for what is still missing, in the order the person can act on it fastest: a drafted goal or owner first (one approval),
|
|
138
|
+
* then the tracker (the person connects it). null when nothing is missing. PURE. */
|
|
139
|
+
function nextOf(items, f) {
|
|
140
|
+
const miss = (k) => items.some((i) => i.key === k && i.status === 'missing');
|
|
141
|
+
const g = f.goals || {};
|
|
142
|
+
if (miss('goal') && (g.proposed || []).length) {
|
|
143
|
+
const p = g.proposed[0];
|
|
144
|
+
return { key: 'goal', label: 'Agree goal', text: `Agree the drafted goal ${p.token}: ${p.title}`, cli: 'pmos setup agree goal', source: (g.files || [])[0] || 'the OKR file' };
|
|
145
|
+
}
|
|
146
|
+
if (miss('goal') && f.goalDraft && f.goalDraft.kr) {
|
|
147
|
+
return { key: 'goal', label: 'Agree goal', text: `Agree the drafted goal: ${clip(f.goalDraft.kr, 120)}`, cli: 'pmos setup agree goal', source: 'project-context.md (Goal draft)' };
|
|
148
|
+
}
|
|
149
|
+
if (miss('owner') && f.ownerDraft && f.ownerDraft.name) {
|
|
150
|
+
return { key: 'owner', label: 'Keep owner', text: `Make ${f.ownerDraft.name} the owner`, cli: `pmos setup owner "${f.ownerDraft.name.replace(/"/g, '')}"`, source: f.ownerDraft.source };
|
|
151
|
+
}
|
|
152
|
+
if (miss('tracker')) return { key: 'tracker', label: 'Connect tracker', text: 'Connect the tracker in Settings › Sources; PMOS reads it on the next refresh', cli: 'pmos setup', source: null };
|
|
153
|
+
if (miss('goal')) return { key: 'goal', label: 'Add a goal', text: 'Add one goal: tell the chat what this product must achieve', cli: 'pmos setup', source: null };
|
|
154
|
+
if (miss('owner')) return { key: 'owner', label: 'Name owner', text: 'Name the owner: pmos setup owner "<name>"', cli: 'pmos setup', source: null };
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// ── the gate ─────────────────────────────────────────────────────────────────────────────────────────────
|
|
159
|
+
|
|
160
|
+
/** Is the gate shut? steps: the lifecycle step of each initiative (lib/one-stage.js keys), or null when unreadable. PURE. */
|
|
161
|
+
function holds(result, steps) {
|
|
162
|
+
if (!result || result.passed) return false;
|
|
163
|
+
if (!Array.isArray(steps)) return true; // can't tell: hold
|
|
164
|
+
return !steps.some((s) => s && !OPEN_STEPS.includes(s));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** May the Driver file this proposal now? PURE. */
|
|
168
|
+
function gate(result, steps, { what, data } = {}) {
|
|
169
|
+
if (!holds(result, steps)) return { ok: true };
|
|
170
|
+
if (DOC_WHATS.includes(what)) return { ok: true };
|
|
171
|
+
if (what === 'move' && data && DISCOVER_STAGE.test(String(data.to || ''))) return { ok: true };
|
|
172
|
+
return { ok: false, error: `this product has not passed Setup yet (missing: ${result.missing.join(', ')}), so only Triage and the documents part of Discovery run: a ${what} proposal waits. See pmos setup` };
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** The lifecycle step of every initiative of the product, as the Board reads it. null when the records cannot be read. */
|
|
176
|
+
const RUNNING_FILE = 'setup-running.json';
|
|
177
|
+
const RUNNING_FOR_MS = 24 * 3600 * 1000;
|
|
178
|
+
function stepsOf(root, { now = Date.now(), derive = true } = {}) {
|
|
179
|
+
// reading every stage derives the Board's rows (seconds on a big product); a product seen running stays running for a day
|
|
180
|
+
// the cache is runtime state, never a repository file: <runtime>/setup/<hash of the repository path>.json
|
|
181
|
+
const rd = runtimeDirOf();
|
|
182
|
+
const cache = rd ? path.join(rd, 'setup', require('crypto').createHash('sha1').update(path.resolve(root)).digest('hex').slice(0, 16) + '-' + RUNNING_FILE) : null;
|
|
183
|
+
try { const c = JSON.parse(readText(cache) || 'null'); if (c && c.step && now - Date.parse(c.at) < RUNNING_FOR_MS) return [c.step]; } catch { /* read again */ }
|
|
184
|
+
const steps = readSteps(root, derive);
|
|
185
|
+
const past = (steps || []).find((x) => x && !OPEN_STEPS.includes(x));
|
|
186
|
+
if (past && cache) { try { writeFile(cache, JSON.stringify({ step: past, at: new Date(now).toISOString() }) + '\n'); } catch { /* read again next time */ } }
|
|
187
|
+
return steps;
|
|
188
|
+
}
|
|
189
|
+
function readSteps(root, derive) {
|
|
190
|
+
try {
|
|
191
|
+
const SR = require('./stage-read.js');
|
|
192
|
+
const boards = require('./routes-boards.js');
|
|
193
|
+
const rowsLib = require('./initiative-rows.js');
|
|
194
|
+
const { w, ctx } = SR.cliCtx(root);
|
|
195
|
+
if (!ctx.stateDirFor()) return null;
|
|
196
|
+
// derive: true (a terminal) reads the records now; false (the server's Today row) takes the rows the server already read, and a read
|
|
197
|
+
// still running answers null, "can't tell"
|
|
198
|
+
const was = derive ? rowsLib.setBackground(false) : null;
|
|
199
|
+
try {
|
|
200
|
+
if (derive) { try { rowsLib.deriveNow(root); } catch { /* baseRows says */ } }
|
|
201
|
+
const base = boards.baseRows(w, { ...ctx, boardsPass: new Map() });
|
|
202
|
+
if (!base.ok) return null;
|
|
203
|
+
// one fold of the Board for the whole list; it stops at the first initiative past Discovery, since one is enough to open the gate
|
|
204
|
+
const pass = { ...ctx, boardsPass: new Map() };
|
|
205
|
+
const out = [];
|
|
206
|
+
for (const r of base.rows) {
|
|
207
|
+
let a = null; try { a = SR.stageOf(pass, w, r.id); } catch { a = null; }
|
|
208
|
+
const step = a ? (a.stage === 'shipped' ? 'monitor' : a.step || null) : null;
|
|
209
|
+
out.push(step);
|
|
210
|
+
if (step && !OPEN_STEPS.includes(step)) break;
|
|
211
|
+
}
|
|
212
|
+
return out;
|
|
213
|
+
} finally { if (derive) rowsLib.setBackground(was); }
|
|
214
|
+
} catch { return null; }
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ── the person's approvals, with Undo ───────────────────────────────────────────────────────────────────
|
|
218
|
+
|
|
219
|
+
function ledgerFile(root) { const sd = stateDirOf(root); return sd ? path.join(sd, LEDGER) : null; }
|
|
220
|
+
function readLedger(root) {
|
|
221
|
+
const f = ledgerFile(root);
|
|
222
|
+
const t = f ? readText(f) : null;
|
|
223
|
+
if (!t) return [];
|
|
224
|
+
return t.split('\n').map((l) => { try { return JSON.parse(l); } catch { return null; } }).filter(Boolean);
|
|
225
|
+
}
|
|
226
|
+
function append(root, line, now) {
|
|
227
|
+
const f = ledgerFile(root);
|
|
228
|
+
if (!f) throw new Error('this repository has no PMOS state folder (pmos/state, state or .pmos)');
|
|
229
|
+
const rec = { v: 1, ...line, at: new Date(now).toISOString() };
|
|
230
|
+
fs.appendFileSync(f, JSON.stringify(rec) + '\n');
|
|
231
|
+
return rec;
|
|
232
|
+
}
|
|
233
|
+
function writeFile(file, text) {
|
|
234
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
235
|
+
const tmp = `${file}.${process.pid}.tmp`;
|
|
236
|
+
fs.writeFileSync(tmp, text);
|
|
237
|
+
fs.renameSync(tmp, file);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** Keep the drafted goal: the first PROPOSED key result of the OKR files loses its PROPOSED mark. With no OKR file and a Goal draft in
|
|
241
|
+
* project-context.md, the draft file is written as agreed. → { ok, file, goal } | { ok: false, error } */
|
|
242
|
+
function agreeGoal(root, { now = Date.now(), by = 'pm' } = {}) {
|
|
243
|
+
const dir = okrDirOf(root);
|
|
244
|
+
const g = goalsOf(root);
|
|
245
|
+
if (g.error) return { ok: false, error: g.error };
|
|
246
|
+
if (dir && g.proposed.length) {
|
|
247
|
+
for (const name of g.files) {
|
|
248
|
+
const file = path.join(dir, name);
|
|
249
|
+
const before = readText(file);
|
|
250
|
+
if (before == null) continue;
|
|
251
|
+
const lines = before.split('\n');
|
|
252
|
+
const i = lines.findIndex((l) => /\bPROPOSED\b/.test(l) && /\*\*\s*KR/i.test(l));
|
|
253
|
+
if (i < 0) continue;
|
|
254
|
+
lines[i] = lines[i].replace(/\s*\bPROPOSED\b:?\s*/, ' ').replace(/\*\* +/, '** ');
|
|
255
|
+
const after = lines.join('\n');
|
|
256
|
+
writeFile(file, after);
|
|
257
|
+
append(root, { ev: 'agree', file: path.relative(root, file), before, after, by }, now);
|
|
258
|
+
return { ok: true, file: path.relative(root, file), goal: clip(lines[i].replace(/^\s*-\s*/, ''), 160) };
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const ctx = contextOf(root);
|
|
262
|
+
const draft = ctx.ctx && ctx.ctx.goal;
|
|
263
|
+
if (!draft || !draft.kr) return { ok: false, error: g.agreed.length ? 'a goal is agreed already' : 'there is no drafted goal to agree: tell the chat what this product must achieve' };
|
|
264
|
+
const file = path.join(planningOf(root), 'okrs', 'okrs-draft.md');
|
|
265
|
+
if (fs.existsSync(file)) return { ok: false, error: `${path.relative(root, file)} holds no drafted key result to agree` };
|
|
266
|
+
const OF_ = require('./onboard-fundamentals.js');
|
|
267
|
+
const after = OF_.goalFile(ctx.ctx.name || path.basename(root), draft, ctx.ctx.fields && ctx.ctx.fields.purpose && ctx.ctx.fields.purpose.value, day(now))
|
|
268
|
+
.replace(/\s*\bPROPOSED\b:?\s*/, ' ').replace(/\*\* +/, '** ').replace(' (draft)"', '"').replace(/^# Goals: (.+) \(draft\)$/m, '# Goals: $1')
|
|
269
|
+
.replace(/It is a draft: nothing reads it, and no number is claimed\./, 'The PM agreed it; no number is claimed yet.');
|
|
270
|
+
writeFile(file, after);
|
|
271
|
+
append(root, { ev: 'agree', file: path.relative(root, file), before: null, after, by }, now);
|
|
272
|
+
return { ok: true, file: path.relative(root, file), goal: clip(draft.kr, 160) };
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** Name the owner: the Owner line of project-context.md, said by the PM. The file is made when there is none. */
|
|
276
|
+
function setOwner(root, name, { now = Date.now(), by = 'pm' } = {}) {
|
|
277
|
+
const who = clip(name, 80).replace(/[()]/g, '');
|
|
278
|
+
if (!who) return { ok: false, error: 'give the owner\'s name: pmos setup owner "<name>"' };
|
|
279
|
+
const { file } = contextOf(root);
|
|
280
|
+
const before = readText(file);
|
|
281
|
+
const line = `- **Owner:** ${who} (source: the PM)`;
|
|
282
|
+
let after;
|
|
283
|
+
if (before == null) {
|
|
284
|
+
const title = path.basename(path.resolve(root));
|
|
285
|
+
after = ['---', 'type: Reference', `title: "Project context: ${title.replace(/"/g, "'")}"`, `timestamp: ${day(now)}`, '---', '', `# ${title}`, '', line, ''].join('\n');
|
|
286
|
+
} else if (/^- \*\*Owner:\*\*.*$/m.test(before)) after = before.replace(/^- \*\*Owner:\*\*.*$/m, line);
|
|
287
|
+
else after = before.replace(/\n*$/, '\n') + line + '\n';
|
|
288
|
+
writeFile(file, after);
|
|
289
|
+
append(root, { ev: 'owner', file: path.relative(root, file), before, after, by }, now);
|
|
290
|
+
return { ok: true, file: path.relative(root, file), owner: who };
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** Undo the newest approval not undone yet, while its file still holds what it wrote. */
|
|
294
|
+
function undo(root, { now = Date.now(), by = 'pm' } = {}) {
|
|
295
|
+
const lines = readLedger(root);
|
|
296
|
+
const undone = new Set(lines.filter((l) => l.ev === 'undo').map((l) => l.of));
|
|
297
|
+
const last = [...lines].reverse().find((l) => (l.ev === 'agree' || l.ev === 'owner') && !undone.has(l.at + '|' + l.file));
|
|
298
|
+
if (!last) return { ok: false, error: 'nothing to undo' };
|
|
299
|
+
const file = path.join(root, last.file);
|
|
300
|
+
if (readText(file) !== last.after) return { ok: false, error: `${last.file} changed since, so it is left as it is` };
|
|
301
|
+
if (last.before == null) fs.unlinkSync(file); else writeFile(file, last.before);
|
|
302
|
+
append(root, { ev: 'undo', of: last.at + '|' + last.file, file: last.file, by }, now);
|
|
303
|
+
return { ok: true, file: last.file, what: last.ev };
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// ── the Today row (lib/needs-providers.js) ──────────────────────────────────────────────────────────────
|
|
307
|
+
|
|
308
|
+
function runtimeDirOf() { try { return require('./state-root.js').defaultRoot(); } catch { return null; } }
|
|
309
|
+
|
|
310
|
+
function rowsFor(w, { lead, runtimeDir = runtimeDirOf(), facts, steps } = {}) {
|
|
311
|
+
if (!lead || !w || !w.root) return [];
|
|
312
|
+
const f = facts || read(w.root, { runtimeDir });
|
|
313
|
+
const r = check(f);
|
|
314
|
+
if (r.passed) return [];
|
|
315
|
+
// no row (zero is silence) for: a product with no initiative yet (nothing to hold), a running product (an initiative past Discovery),
|
|
316
|
+
// and a product whose stages cannot be read yet ("can't tell")
|
|
317
|
+
const st = steps !== undefined ? steps : stepsOf(w.root, { derive: false });
|
|
318
|
+
if (!Array.isArray(st) || !st.length || !holds(r, st)) return [];
|
|
319
|
+
const name = w.name || f.name;
|
|
320
|
+
const cause = `Set up ${name}: ${r.met} of ${r.of} done, ${r.missing.join(' and ')} still missing`;
|
|
321
|
+
const evidence = [r.next ? `✦ ${r.next.text}` + (r.next.source ? ` (from ${r.next.source})` : '') : '', 'Until then PMOS runs only Triage and the documents part of Discovery here']
|
|
322
|
+
.filter(Boolean).join(' · ');
|
|
323
|
+
return [{
|
|
324
|
+
run_id: `${NAME}:${w.id}`, kind: KIND, initiative_id: null, question: cause, doc: null, ws: w.id,
|
|
325
|
+
today: { kind: 7, source: NAME, cause, evidence, act: { label: r.next ? r.next.label : 'See setup', cli: r.next ? r.next.cli : 'pmos setup' } },
|
|
326
|
+
}];
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function sig(w) {
|
|
330
|
+
if (!w || !w.root) return '';
|
|
331
|
+
const sd = stateDirOf(w.root);
|
|
332
|
+
const okr = okrDirOf(w.root);
|
|
333
|
+
let okrSig = '-';
|
|
334
|
+
try { okrSig = okr ? fs.readdirSync(okr).map((n) => n + ':' + mtime(path.join(okr, n))).join(',') : '-'; } catch { /* - */ }
|
|
335
|
+
let jira = 0; try { jira = sd ? require('./freshness.js').jiraAsOf(sd) : 0; } catch { /* 0 */ }
|
|
336
|
+
let tr = 0; try { const rd = runtimeDirOf(); tr = rd ? require('./tracker-read.js').readAtMs(rd, w.root) : 0; } catch { /* 0 */ }
|
|
337
|
+
return [okrSig, mtime(path.join(planningOf(w.root), 'project-context.md')), jira, tr, sd ? mtime(path.join(sd, LEDGER)) : 0].join('|');
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// ── the command line ─────────────────────────────────────────────────────────────────────────────────────
|
|
341
|
+
|
|
342
|
+
const USAGE = [
|
|
343
|
+
'usage: pmos setup [check|agree goal|owner "<name>"|undo] [--json] [--root <dir>] — the Setup station of this product',
|
|
344
|
+
' pmos setup what Setup still needs: a tracker read, an agreed goal and an owner; the number met on the last line',
|
|
345
|
+
' pmos setup agree goal keep the goal PMOS drafted (it loses its PROPOSED mark)',
|
|
346
|
+
' pmos setup owner "<n>" name the owner in project-context.md',
|
|
347
|
+
' pmos setup undo take the last of these two back, while nobody changed the file since',
|
|
348
|
+
];
|
|
349
|
+
const COMMANDS = { setup: ['check', 'agree', 'owner', 'undo'] };
|
|
350
|
+
|
|
351
|
+
function cli(argv, { say = (s) => console.log(s), cwd = process.cwd(), now = Date.now(), runtimeDir = runtimeDirOf(), ownerDraft } = {}) {
|
|
352
|
+
const args = argv.slice();
|
|
353
|
+
const json = args.includes('--json');
|
|
354
|
+
const ri = args.indexOf('--root');
|
|
355
|
+
let root = null;
|
|
356
|
+
if (ri >= 0) { root = args[ri + 1]; args.splice(ri, 2); }
|
|
357
|
+
const pos = args.filter((a) => !a.startsWith('--'));
|
|
358
|
+
const verb = pos[0] || 'check';
|
|
359
|
+
if (['help', '-h'].includes(verb) || args.includes('--help')) { for (const l of USAGE) say(l); return 0; }
|
|
360
|
+
const top = () => { const r = spawnSync('git', ['rev-parse', '--show-toplevel'], { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }); return r.status === 0 && r.stdout.trim() ? r.stdout.trim() : cwd; };
|
|
361
|
+
root = path.resolve(cwd, root || (verb === 'check' && pos[1]) || top());
|
|
362
|
+
const out = (o, text) => { if (json) say(JSON.stringify(o)); else for (const l of [].concat(text)) say(l); };
|
|
363
|
+
if (verb === 'check') {
|
|
364
|
+
const f = read(root, { runtimeDir, ...(ownerDraft !== undefined ? { ownerDraft } : {}) });
|
|
365
|
+
const r = check(f);
|
|
366
|
+
const steps = r.passed ? [] : stepsOf(root);
|
|
367
|
+
const held = holds(r, steps);
|
|
368
|
+
out({ ok: true, ...r, holds: held }, [
|
|
369
|
+
`${TAG} ${f.name}: ${r.passed ? 'Setup passed' : `${r.met} of ${r.of} exit items met`}`,
|
|
370
|
+
...r.items.map((i) => `${TAG} ${i.status === 'ok' ? '✓' : i.status === 'missing' ? '○' : '?'} ${i.label}: ${i.quote}`),
|
|
371
|
+
...(r.next ? [`${TAG} ✦ ${r.next.text}${r.next.source ? ` (from ${r.next.source})` : ''}. Say yes and run: ${r.next.cli}`] : []),
|
|
372
|
+
...(r.passed ? [] : [held ? `${TAG} Until then PMOS runs only Triage and the documents part of Discovery here.` : `${TAG} Work here is already past Discovery, so nothing waits on Setup.`]),
|
|
373
|
+
String(r.met),
|
|
374
|
+
]);
|
|
375
|
+
return 0;
|
|
376
|
+
}
|
|
377
|
+
let res;
|
|
378
|
+
if (verb === 'agree') {
|
|
379
|
+
if (pos[1] !== 'goal') { say('usage: pmos setup agree goal'); return 2; }
|
|
380
|
+
res = agreeGoal(root, { now });
|
|
381
|
+
if (res.ok) out(res, `✓ goal agreed in ${res.file}: ${res.goal}. Undo: pmos setup undo`);
|
|
382
|
+
} else if (verb === 'owner') {
|
|
383
|
+
res = setOwner(root, pos.slice(1).join(' '), { now });
|
|
384
|
+
if (res.ok) out(res, `✓ owner is ${res.owner} (${res.file}). Undo: pmos setup undo`);
|
|
385
|
+
} else if (verb === 'undo') {
|
|
386
|
+
res = undo(root, { now });
|
|
387
|
+
if (res.ok) out(res, `✓ undone: the ${res.what === 'agree' ? 'agreed goal' : 'owner'} in ${res.file} is back as it was`);
|
|
388
|
+
} else { say(`unknown setup command "${verb}"`); for (const l of USAGE) say(l); return 2; }
|
|
389
|
+
if (!res.ok) { out(res, `✗ ${res.error}`); return 1; }
|
|
390
|
+
console.error(`${TAG} ${verb} ${path.basename(root)}: ${res.file}`);
|
|
391
|
+
return 0;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
module.exports = {
|
|
395
|
+
NAME, KIND, LEDGER, DOC_WHATS, USAGE, COMMANDS,
|
|
396
|
+
read, check, holds, gate, stepsOf, agreeGoal, setOwner, undo, readLedger, cli,
|
|
397
|
+
kinds: [KIND], rowsFor, sig,
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
if (require.main === module) process.exitCode = cli(process.argv.slice(2));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.755.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.755.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "setup-station: a new product passes a Setup station (tracker read, agreed goal, owner) before PMOS plans its work; the Driver gate, the Today row and pmos setup (lib/setup-station.js, lib/setup-cli.js). Temp product folders only.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"setup-station.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"setup-station.test.js": 2
|
|
8
|
+
}
|
|
9
|
+
}
|