create-pmos 0.568.0 → 0.569.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 -14
- package/payload/KIT-VERSION +2 -2
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/scripts/gate-initiative.sh +29 -0
- package/payload/scripts/workflow-state.js +16 -0
- package/payload/state/discoveries.md +1 -1
- package/payload/state/log.md +1 -1
- package/workspace/changelog.json +13 -0
- package/workspace/guide/cli.md +1 -1
- package/workspace/lib/artefact-mirror.js +121 -0
- package/workspace/lib/artefacts-cli.js +15 -1
- package/workspace/lib/driver-decide.js +2 -0
- package/workspace/lib/engine/workflow-state.js +16 -0
- package/workspace/lib/outcome-props.js +21 -1
- package/workspace/lib/rehearse-read.js +4 -2
- package/workspace/lib/routes-artefacts.js +4 -1
- package/workspace/lib/routes-boards.js +6 -0
- package/workspace/lib/today-cli.js +19 -0
- package/workspace/lib/vendor/scripts/workflow-state.js +16 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/run-tests.js +9 -0
- package/workspace/test-lists/launch-rerun-gaps.json +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.569.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.569.0",
|
|
38
|
+
"at": "2026-11-15T17:07:37.237Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1301,
|
|
43
|
+
"t": "Close the five gaps the launch rerun found (launch simulation W6)",
|
|
44
|
+
"s": "Close the five gaps the launch rerun found (launch simulation W6)",
|
|
45
|
+
"k": "new"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
36
49
|
{
|
|
37
50
|
"v": "0.568.0",
|
|
38
51
|
"at": "2026-11-12T05:06:58.936Z",
|
|
@@ -297,19 +310,6 @@
|
|
|
297
310
|
"k": "new"
|
|
298
311
|
}
|
|
299
312
|
]
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"v": "0.549.0",
|
|
303
|
-
"at": "2026-11-10T07:06:56.286Z",
|
|
304
|
-
"f": 4,
|
|
305
|
-
"prs": [
|
|
306
|
-
{
|
|
307
|
-
"n": 1277,
|
|
308
|
-
"t": "The story so far on the product page and shared Board; Settings › Claude says how Claude decides",
|
|
309
|
-
"s": "The story so far on the product page and shared Board; Settings › Claude says how Claude decides",
|
|
310
|
-
"k": "new"
|
|
311
|
-
}
|
|
312
|
-
]
|
|
313
313
|
}
|
|
314
314
|
]
|
|
315
315
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
kernel-source: pmos@
|
|
2
|
-
assembled: 2026-11-
|
|
1
|
+
kernel-source: pmos@7305a765
|
|
2
|
+
assembled: 2026-11-15
|
|
3
3
|
mode: vendor
|
|
@@ -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-15T17:07:33Z"}
|
|
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-15T17:07:33Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -86,6 +86,35 @@ anchor="$(frontval parent_kr)"
|
|
|
86
86
|
# file IS the row, so the gate is where the same rule lands. A KR or health:<id> — never blank.
|
|
87
87
|
[ -n "$anchor" ] || fail "initiative '$id' has no parent_kr in $init_file — anchor it to a KR, or to a declared health budget (parent_kr: health:<id> from $KIT_ROOT/planning/okrs/health-budgets.md, D59). Unanchored work is rejected (D21)."
|
|
88
88
|
|
|
89
|
+
# ---- D107 and the kind of work (launch simulation W6) --------------------------
|
|
90
|
+
# In both profiles, as .github/scripts/initiative-gate.sh does for PMOS itself: a record that names its done test and kill condition is
|
|
91
|
+
# an experiment and passes in any lane (the done test is the spec, D13 as amended by D107). The kind of work sets the gate (W5): Full
|
|
92
|
+
# SDLC needs a done test and a kill condition, never a PRD or a brief; a Project needs a dated plan (plan_path: milestones with dates
|
|
93
|
+
# and owners), never a PRD or a brief. A PRD or brief already on the record still passes: a gate passed stays passed. `pmos artefacts
|
|
94
|
+
# set experiment:<id> done-test …` writes done_test_path and kill: for you (lib/artefact-mirror.js).
|
|
95
|
+
done_test="$(frontval done_test_path)"
|
|
96
|
+
kill_cond="$(frontval kill)"
|
|
97
|
+
kind="$(frontval kind | tr -d "\"'")"
|
|
98
|
+
if [ -n "$done_test" ]; then
|
|
99
|
+
[ -f "$done_test" ] || fail "done_test_path '$done_test' (from $init_file) does not exist in the repo."
|
|
100
|
+
[ -n "$kill_cond" ] || fail "initiative '$id' names a done test but no kill condition — write kill: \"<the result that would make us stop>\" in $init_file (D107)."
|
|
101
|
+
echo "✅ initiative gate PASSED — '$id' (experiment, D107): $init_file exists, done test ($done_test) and kill condition present."
|
|
102
|
+
exit 0
|
|
103
|
+
fi
|
|
104
|
+
had_spec="$prd$(frontval brief_path)"
|
|
105
|
+
if [ "$kind" = sdlc ] && [ -z "$had_spec" ]; then
|
|
106
|
+
fail "initiative '$id' is Full SDLC: it needs a done test and a kill condition before the first pull request, never a PRD or a brief. Set done_test_path and kill: in $init_file (pmos artefacts set experiment:$id done-test check --text \"…\" writes both)."
|
|
107
|
+
fi
|
|
108
|
+
if [ "$kind" = project ]; then
|
|
109
|
+
plan="$(frontval plan_path)"
|
|
110
|
+
if [ -n "$plan" ] || [ -z "$had_spec" ]; then
|
|
111
|
+
[ -n "$plan" ] || fail "initiative '$id' is a Project: it needs a dated plan, never a PRD or a brief. Set plan_path in $init_file to the plan (milestones with dates and owners), or give it a done test."
|
|
112
|
+
[ -f "$plan" ] || fail "plan_path '$plan' (from $init_file) does not exist in the repo."
|
|
113
|
+
echo "✅ initiative gate PASSED — '$id' (Project): $init_file exists and the dated plan ($plan) is present."
|
|
114
|
+
exit 0
|
|
115
|
+
fi
|
|
116
|
+
fi
|
|
117
|
+
|
|
89
118
|
# ---- D68: the pm-artifacts profile ------------------------------------------
|
|
90
119
|
# A repository whose root holds `.pmos-profile` reading `pm-artifacts` is a PM's documents repo: its
|
|
91
120
|
# work lanes are new-feature | improvement | bug-fix | discovery | chore and its document lanes are
|
|
@@ -1599,7 +1599,21 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1599
1599
|
: briefPath ? firstAppearance(root, range, briefPath) : null;
|
|
1600
1600
|
const docIdx = docPath ? firstAppearance(root, range, docPath) : null;
|
|
1601
1601
|
|
|
1602
|
+
// W6 (launch simulation rerun, 2026-11-15): the kind of work sets this ladder too, as it sets the product-code gate (W5) and the kit gate.
|
|
1603
|
+
// Full SDLC: a done test and a kill condition, never a brief. Project: a dated plan (plan_path), never a brief. A brief already on the
|
|
1604
|
+
// record still passes (a gate passed stays passed). Their deliverable is not a document: the pull requests, or the plan's milestones.
|
|
1605
|
+
const workKind = (() => { const k = String(fm.kind || '').trim().replace(/^["']|["']$/g, ''); return k === 'sdlc' || k === 'project' ? k : 'product'; })();
|
|
1606
|
+
const planPath = String(fm.plan_path || '').trim();
|
|
1607
|
+
const kindSpec = !doneTest && !exists(briefPath) && !foundBrief && (workKind === 'sdlc' || (workKind === 'project'));
|
|
1602
1608
|
if (doneTest && dtPresent && killCond) steps.push(step('brief', def.brief_label, 'done', `done test ${doneTest} + kill condition (D107)`));
|
|
1609
|
+
else if (kindSpec && workKind === 'sdlc') steps.push(step('brief', 'done test', legacy ? 'pending' : 'blocked',
|
|
1610
|
+
'Full SDLC needs a done test and a kill condition before the first pull request — never a brief or a PRD',
|
|
1611
|
+
`write the done test, set done_test_path and kill: in ${recRel} (pmos artefacts set experiment:${id} done-test check --text "…" writes both)`, { blocking: !legacy, rule: 'R2' }));
|
|
1612
|
+
else if (kindSpec && exists(planPath)) steps.push(step('brief', 'dated plan', 'done', `plan ${planPath} present`));
|
|
1613
|
+
else if (kindSpec) steps.push(step('brief', 'dated plan', legacy ? 'pending' : 'blocked',
|
|
1614
|
+
planPath ? `plan_path '${planPath}' does not exist in the repo` : 'Project needs a dated plan before Execute — never a brief or a PRD',
|
|
1615
|
+
planPath ? 'create the plan the record points at, or correct plan_path' : `write the plan (milestones with dates and owners, go-live matching the KR date) and set plan_path in ${recRel}, or a done test`,
|
|
1616
|
+
{ blocking: !legacy, rule: 'R2' }));
|
|
1603
1617
|
else if (doneTest && dtPresent) steps.push(step('brief', def.brief_label, 'blocked', 'no kill condition — an experiment states what would stop it (D107)',
|
|
1604
1618
|
`write kill: "<the result that would make us stop>" in ${recRel}`, { blocking: !legacy, rule: 'R2' }));
|
|
1605
1619
|
else if (doneTest) steps.push(step('brief', def.brief_label, 'blocked', `done_test_path '${doneTest}' does not exist in the repo`,
|
|
@@ -1613,6 +1627,8 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1613
1627
|
{ blocking: enforce, rule: 'P1' }));
|
|
1614
1628
|
|
|
1615
1629
|
if (!flows('draft')) steps.push(skipped('draft', def.draft_label));
|
|
1630
|
+
else if (workKind !== 'product' && !exists(docPath) && !foundDraft) steps.push(step('draft', 'deliverable', 'na',
|
|
1631
|
+
workKind === 'sdlc' ? 'Full SDLC — the pull requests are the deliverable, not a document' : 'Project — the plan\'s milestones are the deliverable, not a document'));
|
|
1616
1632
|
else if (foundDraft) steps.push(step('draft', def.draft_label, 'done', `${foundDraft} — found by the repository scan`));
|
|
1617
1633
|
else if (exists(docPath)) {
|
|
1618
1634
|
const inOrder = briefIdx == null || docIdx == null ? null : docIdx >= briefIdx;
|
|
@@ -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-15T17:07:33Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/payload/state/log.md
CHANGED
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.569.0",
|
|
4
|
+
"at": "2026-11-15T17:07:37.237Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1301,
|
|
9
|
+
"t": "Close the five gaps the launch rerun found (launch simulation W6)",
|
|
10
|
+
"s": "Close the five gaps the launch rerun found (launch simulation W6)",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.568.0",
|
|
4
17
|
"at": "2026-11-12T05:06:58.936Z",
|
package/workspace/guide/cli.md
CHANGED
|
@@ -393,7 +393,7 @@ The ledger is `driver.jsonl` in the state folder of the repository (`pmos/state`
|
|
|
393
393
|
|
|
394
394
|
### pmos artefacts: the seven artefacts
|
|
395
395
|
|
|
396
|
-
`pmos artefacts show [<scope>]` lists the seven artefacts of a scope: Intent, Goal, Narrative, Experiment, Specimens, Done test and Lessons. The scope is `portfolio` (the default), `board:<id>`, `goal:<id>` or `experiment:<id>`. `pmos artefacts map` lists what each older core document, driver proposal kind, report cadence and lane becomes. `pmos artefacts migrate` puts every older record under its artefact as a pointer: issued and draft core documents, kept driver proposals and report drafts. It deletes and moves nothing, and a second run carries nothing new. `pmos artefacts set <scope> <artefact> [<field>] --text "<text>"` writes one field, and `pmos artefacts undo <id>` takes it back. Intent is yours: an agent proposes a change to it and waits for you. Goal is read from the OKRs, health budgets and readings, so you cannot type it.
|
|
396
|
+
`pmos artefacts show [<scope>]` lists the seven artefacts of a scope: Intent, Goal, Narrative, Experiment, Specimens, Done test and Lessons. The scope is `portfolio` (the default), `board:<id>`, `goal:<id>` or `experiment:<id>`. `pmos artefacts map` lists what each older core document, driver proposal kind, report cadence and lane becomes. `pmos artefacts migrate` puts every older record under its artefact as a pointer: issued and draft core documents, kept driver proposals and report drafts. It deletes and moves nothing, and a second run carries nothing new. `pmos artefacts set <scope> <artefact> [<field>] --text "<text>"` writes one field, and `pmos artefacts undo <id>` takes it back. A Done test check on `experiment:<id>` is also written to the experiment's done test file (`planning/done-tests/<id>.md`, or the file the record names), and the record gets `done_test_path:`; an Experiment kill condition becomes the record's `kill:`. So the ladder, the gates and `pmos jira draft` count it. A done test file you wrote by hand is left alone. Intent is yours: an agent proposes a change to it and waits for you. Goal is read from the OKRs, health budgets and readings, so you cannot type it.
|
|
397
397
|
|
|
398
398
|
### pmos coredoc: core documents
|
|
399
399
|
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* artefact-mirror.js — a Done test written with `pmos artefacts` counts everywhere a done test counts (launch simulation W6, gap 1).
|
|
3
|
+
*
|
|
4
|
+
* sync(root, scope, { actor, ledger }) → { ok, id, wrote: [what], note } | { ok: true, skipped: why } | refusal
|
|
5
|
+
*
|
|
6
|
+
* D107 lets an agent write an experiment's Done test checks and its kill condition into the artefact ledger (lib/artefacts.js). The ladder
|
|
7
|
+
* (scripts/workflow-state.js), the two gates (.github/scripts/initiative-gate.sh, kit/scripts/gate-initiative.sh), `pmos jira draft` and the
|
|
8
|
+
* Viewer gate read the record's `done_test_path:` and `kill:` instead, and the order rule (done test before the build) reads the git history of
|
|
9
|
+
* the done test FILE. So the ledger is mirrored onto the record, and no reader needs a second done-test source:
|
|
10
|
+
*
|
|
11
|
+
* - the checks (done-test.check, and done-test.result) go to a done test file, `planning/done-tests/<id>.md` (`pmos/planning/…` in a kit
|
|
12
|
+
* repository), or the file the record already names. The file carries MARK: a file without it was written by hand and is never touched.
|
|
13
|
+
* - the record gets `done_test_path:` when it has none, and `kill:` from the newest experiment.kill line. An undo writes back the kill the
|
|
14
|
+
* ledger holds then; when none is left the record keeps its line (it may have been written by hand).
|
|
15
|
+
*
|
|
16
|
+
* Nothing here runs a model, and nothing is committed: the CLI says to commit the two files, like every record write.
|
|
17
|
+
*/
|
|
18
|
+
const fs = require('fs');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
|
|
21
|
+
const MARK = '<!-- written by PMOS from the Done test artefact (pmos artefacts set). Edit the checks with pmos artefacts; a file without this line is left alone. -->';
|
|
22
|
+
const ID_RE = /^[a-z0-9][a-z0-9._-]*$/;
|
|
23
|
+
const refuse = (status, error) => ({ ok: false, status, error });
|
|
24
|
+
const q = (s) => '"' + String(s).replace(/\s+/g, ' ').trim().replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"';
|
|
25
|
+
const unquote = (v) => { const t = String(v || '').trim(); return /^".*"$/.test(t) ? t.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\') : /^'.*'$/.test(t) ? t.slice(1, -1).replace(/''/g, "'") : t; };
|
|
26
|
+
const cell = (s) => String(s).replace(/\s+/g, ' ').trim().replace(/\|/g, '\\|');
|
|
27
|
+
|
|
28
|
+
/** True for a set or undo the mirror cares about: an experiment's done test lines or its kill condition. */
|
|
29
|
+
function touches(line) {
|
|
30
|
+
if (!line || typeof line.scope !== 'string' || !/^experiment:/.test(line.scope)) return false;
|
|
31
|
+
return line.artefact === 'done-test' || (line.artefact === 'experiment' && (line.field === 'kill' || line.ev === 'undo'));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The done test file's text: front matter (D63), the mark, and one row per check. */
|
|
35
|
+
function fileText(id, title, checks, result, today) {
|
|
36
|
+
const out = ['---', 'type: Rubric', `title: ${q('Done test — ' + (title || id))}`, `timestamp: ${today}`, `initiative: ${id}`, '---', '', MARK, '',
|
|
37
|
+
`# Done test: ${id}`, '', 'Every check must pass. PMOS keeps this file in step with the Done test artefact.', ''];
|
|
38
|
+
if (checks.length) {
|
|
39
|
+
out.push('| # | Check |', '|---|---|');
|
|
40
|
+
checks.forEach((c, i) => out.push(`| ${i + 1} | ${cell(c)} |`));
|
|
41
|
+
} else out.push('No checks yet.');
|
|
42
|
+
if (result) out.push('', `Result: ${String(result).replace(/\s+/g, ' ').trim()}`);
|
|
43
|
+
return out.join('\n') + '\n';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function sync(root, scope, { ledger } = {}) {
|
|
47
|
+
const m = /^experiment:(.+)$/.exec(String(scope || ''));
|
|
48
|
+
if (!m || !ID_RE.test(m[1])) return { ok: true, skipped: 'not an experiment' };
|
|
49
|
+
const id = m[1];
|
|
50
|
+
const A = require('./artefacts.js');
|
|
51
|
+
const loaded = require('./console-state').loadEngine();
|
|
52
|
+
if (!loaded.ok) return refuse(500, loaded.error);
|
|
53
|
+
const L = loaded.engine.layout(root);
|
|
54
|
+
const rec = path.join(L.initiatives, `${id}.md`);
|
|
55
|
+
let text;
|
|
56
|
+
try { if (!fs.lstatSync(rec).isFile()) return { ok: true, skipped: 'the record is not a plain file' }; text = fs.readFileSync(rec, 'utf8'); }
|
|
57
|
+
catch { return { ok: true, skipped: `no initiative record ${id}` }; }
|
|
58
|
+
const fm = /^---\r?\n([\s\S]*?)\r?\n---(\r?\n|$)/.exec(text);
|
|
59
|
+
if (!fm) return { ok: true, skipped: 'the record has no front matter' };
|
|
60
|
+
const lines = fm[1].split(/\r?\n/);
|
|
61
|
+
const val = (key) => { const l = lines.find((x) => x.startsWith(key + ':')); return l ? unquote(l.slice(key.length + 1)) : ''; };
|
|
62
|
+
|
|
63
|
+
const v = A.viewOf(A.fold(A.readLines(ledger)), `experiment:${id}`);
|
|
64
|
+
const art = (k) => (v && v.artefacts.find((a) => a.key === k)) || { fields: {} };
|
|
65
|
+
const dt = art('done-test').fields, ex = art('experiment').fields;
|
|
66
|
+
// a list field holds one line per set; a set may hold several lines (withLine), each one check
|
|
67
|
+
const checks = (dt.check || []).flatMap((x) => String(x.text || '').split(/\n+/)).map((s) => s.trim()).filter(Boolean);
|
|
68
|
+
const result = dt.result && dt.result.text ? dt.result.text : '';
|
|
69
|
+
const kill = ex.kill && ex.kill.text ? String(ex.kill.text).replace(/\s+/g, ' ').trim() : '';
|
|
70
|
+
|
|
71
|
+
const wrote = [];
|
|
72
|
+
let note = '';
|
|
73
|
+
// the done test file
|
|
74
|
+
const named = val('done_test_path');
|
|
75
|
+
const relDefault = (L.kit ? 'pmos/planning/done-tests/' : 'planning/done-tests/') + id + '.md';
|
|
76
|
+
const rel = named || relDefault;
|
|
77
|
+
const abs = path.resolve(root, rel);
|
|
78
|
+
const inside = !path.relative(path.resolve(root), abs).startsWith('..');
|
|
79
|
+
let setPath = false;
|
|
80
|
+
if (!inside) note = `done_test_path '${rel}' is outside the repository: PMOS left it`;
|
|
81
|
+
else if (checks.length || result || fs.existsSync(abs)) {
|
|
82
|
+
let cur = null;
|
|
83
|
+
try { cur = fs.readFileSync(abs, 'utf8'); } catch { cur = null; }
|
|
84
|
+
if (cur != null && !cur.includes(MARK)) note = `the done test ${rel} was written by hand: PMOS left it as it is`;
|
|
85
|
+
else if (cur == null && !checks.length && !result) { /* nothing to write yet */ }
|
|
86
|
+
else {
|
|
87
|
+
const title = val('title');
|
|
88
|
+
const day = new Date().toISOString().slice(0, 10);
|
|
89
|
+
const next = fileText(id, title, checks, result, day);
|
|
90
|
+
// the timestamp alone never rewrites the file
|
|
91
|
+
const same = cur != null && cur.replace(/^timestamp: .*$/m, '') === next.replace(/^timestamp: .*$/m, '');
|
|
92
|
+
if (!same) {
|
|
93
|
+
try { fs.mkdirSync(path.dirname(abs), { recursive: true }); fs.writeFileSync(abs, next); } catch { return refuse(500, `the done test ${rel} could not be written`); }
|
|
94
|
+
wrote.push(rel);
|
|
95
|
+
}
|
|
96
|
+
if (!named) setPath = true;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// the record's two lines
|
|
100
|
+
let changed = false;
|
|
101
|
+
if (setPath) { lines.push(`done_test_path: ${rel}`); changed = true; }
|
|
102
|
+
if (kill && val('kill') !== kill) {
|
|
103
|
+
const at = lines.findIndex((l) => l.startsWith('kill:'));
|
|
104
|
+
if (at >= 0) lines[at] = 'kill: ' + q(kill); else lines.push('kill: ' + q(kill));
|
|
105
|
+
changed = true;
|
|
106
|
+
}
|
|
107
|
+
if (changed) {
|
|
108
|
+
try { fs.writeFileSync(rec, '---\n' + lines.join('\n') + '\n---' + fm[2] + text.slice(fm[0].length)); } catch { return refuse(500, 'the record could not be written'); }
|
|
109
|
+
wrote.push(path.relative(root, rec).split(path.sep).join('/'));
|
|
110
|
+
}
|
|
111
|
+
return { ok: true, id, wrote, note };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** After a set or undo through lib/artefacts.js (called by its three writers: the CLI, POST /api/artefacts/set and the driver's Keep and
|
|
115
|
+
* Undo): mirror it when it touches a done test or a kill condition. Never throws. → the sync answer, or null when it touches neither. */
|
|
116
|
+
function after(root, line, ledger) {
|
|
117
|
+
if (!root || !touches(line)) return null;
|
|
118
|
+
try { return sync(root, line.scope, { ledger }); } catch (e) { return refuse(500, String((e && e.message) || e)); }
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
module.exports = { MARK, touches, sync, after, fileText };
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
const path = require('path');
|
|
13
13
|
const { execFileSync } = require('child_process');
|
|
14
14
|
const A = require('./artefacts.js');
|
|
15
|
+
const MIRROR = require('./artefact-mirror.js');
|
|
15
16
|
const actorLib = require('./actor.js');
|
|
16
17
|
|
|
17
18
|
const COMMANDS = { artefacts: ['show', 'map', 'migrate', 'set', 'undo'] };
|
|
@@ -92,14 +93,27 @@ function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), env = pro
|
|
|
92
93
|
for (const s of flags.source) { const i = s.indexOf('='); if (i < 1) { say('✗ --source is label=ref'); return 2; } sources.push({ label: s.slice(0, i), ref: s.slice(i + 1) }); }
|
|
93
94
|
const r = A.set(f, { scope: pos[0], artefact: pos[1], field: pos[2], text: flags.text, sources }, actor, { now });
|
|
94
95
|
if (!r.ok) { say('✗ ' + r.error); return 1; }
|
|
95
|
-
|
|
96
|
+
r.mirror = MIRROR.after(root, r.line, f); // a done test or kill condition lands on the record too (launch simulation W6)
|
|
97
|
+
if (flags.json) { say(JSON.stringify({ ok: true, id: r.line.id, ...(r.mirror ? { mirror: r.mirror } : {}) })); return 0; }
|
|
98
|
+
say(`✓ ${r.line.artefact}.${r.line.field} on ${r.line.scope} (${r.line.id}; pmos artefacts undo ${r.line.id})`);
|
|
99
|
+
mirrorSay(say, r.mirror);
|
|
96
100
|
return 0;
|
|
97
101
|
}
|
|
98
102
|
if (!pos[0]) { say(USAGE[5]); return 2; }
|
|
99
103
|
const r = A.undo(f, { ref: pos[0] }, actor, { now });
|
|
100
104
|
if (!r.ok) { say('✗ ' + r.error); return 1; }
|
|
105
|
+
r.mirror = MIRROR.after(root, r.line, f);
|
|
101
106
|
say(`✓ ${pos[0]} undone`);
|
|
107
|
+
mirrorSay(say, r.mirror);
|
|
102
108
|
return 0;
|
|
103
109
|
}
|
|
104
110
|
|
|
111
|
+
/** What the mirror wrote (lib/artefact-mirror.js): the done test file and the record, so the ladder and the gates count it. */
|
|
112
|
+
function mirrorSay(say, m) {
|
|
113
|
+
if (!m) return;
|
|
114
|
+
if (!m.ok) { say(' ! the record was not updated: ' + m.error); return; }
|
|
115
|
+
if (m.wrote && m.wrote.length) say(` ✓ wrote ${m.wrote.join(' and ')}: the ladder, the gates and pmos jira draft count it. Commit them to keep them.`);
|
|
116
|
+
if (m.note) say(' ' + m.note);
|
|
117
|
+
}
|
|
118
|
+
|
|
105
119
|
module.exports = { run, COMMANDS, USAGE, mapRows };
|
|
@@ -73,6 +73,7 @@ async function writeRecord(p, actor, ctx, now) {
|
|
|
73
73
|
}
|
|
74
74
|
const r = A.set(f, { scope: d.scope, artefact: d.artefact, field: d.field, text, sources: p.sources }, actor, { now });
|
|
75
75
|
if (!r.ok) return refuse(r.status || 409, r.error);
|
|
76
|
+
require('./artefact-mirror.js').after(ctx.root, r.line, f); // a done test or kill condition lands on the record too (W6)
|
|
76
77
|
return { ok: true, wrote: 'artefact', undo: { op: 'artefact', ref: r.line.id } };
|
|
77
78
|
}
|
|
78
79
|
if (p.what === 'next-step') {
|
|
@@ -180,6 +181,7 @@ async function undo({ file, proposal, actor, ctx = {}, now, stateDir, product =
|
|
|
180
181
|
const A = require('./artefacts.js');
|
|
181
182
|
const r = A.undo(A.file(A.dirOf(ctx.root)), { ref: u.ref }, actor, { now: t });
|
|
182
183
|
if (!r.ok) back = false;
|
|
184
|
+
else require('./artefact-mirror.js').after(ctx.root, r.line, A.file(A.dirOf(ctx.root)));
|
|
183
185
|
} else if (p.what === 'next-step' && u.op === 'next-step' && ctx.itemsDir) {
|
|
184
186
|
const paths = itemsPaths(ctx.itemsDir);
|
|
185
187
|
pmItems.appendEvent(paths.steps, { event: 'step_removed', id: u.step }, new Date(t));
|
|
@@ -1599,7 +1599,21 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1599
1599
|
: briefPath ? firstAppearance(root, range, briefPath) : null;
|
|
1600
1600
|
const docIdx = docPath ? firstAppearance(root, range, docPath) : null;
|
|
1601
1601
|
|
|
1602
|
+
// W6 (launch simulation rerun, 2026-11-15): the kind of work sets this ladder too, as it sets the product-code gate (W5) and the kit gate.
|
|
1603
|
+
// Full SDLC: a done test and a kill condition, never a brief. Project: a dated plan (plan_path), never a brief. A brief already on the
|
|
1604
|
+
// record still passes (a gate passed stays passed). Their deliverable is not a document: the pull requests, or the plan's milestones.
|
|
1605
|
+
const workKind = (() => { const k = String(fm.kind || '').trim().replace(/^["']|["']$/g, ''); return k === 'sdlc' || k === 'project' ? k : 'product'; })();
|
|
1606
|
+
const planPath = String(fm.plan_path || '').trim();
|
|
1607
|
+
const kindSpec = !doneTest && !exists(briefPath) && !foundBrief && (workKind === 'sdlc' || (workKind === 'project'));
|
|
1602
1608
|
if (doneTest && dtPresent && killCond) steps.push(step('brief', def.brief_label, 'done', `done test ${doneTest} + kill condition (D107)`));
|
|
1609
|
+
else if (kindSpec && workKind === 'sdlc') steps.push(step('brief', 'done test', legacy ? 'pending' : 'blocked',
|
|
1610
|
+
'Full SDLC needs a done test and a kill condition before the first pull request — never a brief or a PRD',
|
|
1611
|
+
`write the done test, set done_test_path and kill: in ${recRel} (pmos artefacts set experiment:${id} done-test check --text "…" writes both)`, { blocking: !legacy, rule: 'R2' }));
|
|
1612
|
+
else if (kindSpec && exists(planPath)) steps.push(step('brief', 'dated plan', 'done', `plan ${planPath} present`));
|
|
1613
|
+
else if (kindSpec) steps.push(step('brief', 'dated plan', legacy ? 'pending' : 'blocked',
|
|
1614
|
+
planPath ? `plan_path '${planPath}' does not exist in the repo` : 'Project needs a dated plan before Execute — never a brief or a PRD',
|
|
1615
|
+
planPath ? 'create the plan the record points at, or correct plan_path' : `write the plan (milestones with dates and owners, go-live matching the KR date) and set plan_path in ${recRel}, or a done test`,
|
|
1616
|
+
{ blocking: !legacy, rule: 'R2' }));
|
|
1603
1617
|
else if (doneTest && dtPresent) steps.push(step('brief', def.brief_label, 'blocked', 'no kill condition — an experiment states what would stop it (D107)',
|
|
1604
1618
|
`write kill: "<the result that would make us stop>" in ${recRel}`, { blocking: !legacy, rule: 'R2' }));
|
|
1605
1619
|
else if (doneTest) steps.push(step('brief', def.brief_label, 'blocked', `done_test_path '${doneTest}' does not exist in the repo`,
|
|
@@ -1613,6 +1627,8 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1613
1627
|
{ blocking: enforce, rule: 'P1' }));
|
|
1614
1628
|
|
|
1615
1629
|
if (!flows('draft')) steps.push(skipped('draft', def.draft_label));
|
|
1630
|
+
else if (workKind !== 'product' && !exists(docPath) && !foundDraft) steps.push(step('draft', 'deliverable', 'na',
|
|
1631
|
+
workKind === 'sdlc' ? 'Full SDLC — the pull requests are the deliverable, not a document' : 'Project — the plan\'s milestones are the deliverable, not a document'));
|
|
1616
1632
|
else if (foundDraft) steps.push(step('draft', def.draft_label, 'done', `${foundDraft} — found by the repository scan`));
|
|
1617
1633
|
else if (exists(docPath)) {
|
|
1618
1634
|
const inOrder = briefIdx == null || docIdx == null ? null : docIdx >= briefIdx;
|
|
@@ -171,4 +171,24 @@ function create(deps) {
|
|
|
171
171
|
return { tick, runProduct, refutedPass };
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
/** The refuted outcomes whose ✦ next step still waits for the PM (launch simulation W6): every current refuted verdict, less the ones whose
|
|
175
|
+
* ✦ the PM kept (✓) or dropped (✕). Read without a server (`pmos today --root`), so a ✦ the server has not filed yet is listed too.
|
|
176
|
+
* → [{ ini, title, next, say, id }] */
|
|
177
|
+
function waiting(root, stateDir, { today } = {}) {
|
|
178
|
+
if (!O.anyRefuted(root)) return [];
|
|
179
|
+
const D = O.refutedDrafts(O.scan(root, today ? { today } : {}));
|
|
180
|
+
if (!D.length) return [];
|
|
181
|
+
let F = null;
|
|
182
|
+
try { F = stateDir ? PR.read(stateDir) : null; } catch { F = null; }
|
|
183
|
+
const kept = F ? PR.keptIds(F) : new Set();
|
|
184
|
+
const out = [];
|
|
185
|
+
for (const d of D) {
|
|
186
|
+
const id = PR.idOf(d.data.initiative, 'outcome', 'refuted', d.data.ref || d.data.check);
|
|
187
|
+
const prev = F && F.props.get(id);
|
|
188
|
+
if (kept.has(id) || (prev && F.drops.has(PR.sigOf(prev)))) continue;
|
|
189
|
+
out.push({ ini: d.data.initiative, title: d.data.title || d.data.initiative, next: d.data.next, say: d.say, id });
|
|
190
|
+
}
|
|
191
|
+
return out;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
module.exports = { create, cases, lineOf, off, waiting, PER_DAY };
|
|
@@ -81,6 +81,8 @@ function snapshotOf(root, o = {}) {
|
|
|
81
81
|
files.links = TL.ledgerFile(stateDir);
|
|
82
82
|
files.board = safe(() => RB.ledgerFile(ctx, w));
|
|
83
83
|
files.items = safe(() => require('./plan-ledgers.js').ledgerPath(root, 'plan-items'));
|
|
84
|
+
// an initiative's own tasks (D104, `pmos task add`) live in its task ledger, not the Board's: a milestone made there is cited there (W6)
|
|
85
|
+
files.tasks = safe(() => require('./task-store.js').storeFor(root).file);
|
|
84
86
|
snap.links = TL.linksOf(TL.read(stateDir));
|
|
85
87
|
|
|
86
88
|
// the goals, each with today's forecast
|
|
@@ -112,7 +114,7 @@ function snapshotOf(root, o = {}) {
|
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
/** The sources an effect cites: the line of each link, initiative record, goal record, program charter and ◇ milestone flag.
|
|
115
|
-
* files: { links, board?, krs?, programs?, records: { [initiative]: file } } (absolute paths). */
|
|
117
|
+
* files: { links, board?, items?, tasks?, krs?, programs?, records: { [initiative]: file } } (absolute paths). */
|
|
116
118
|
function refsOf(root, snap, files) {
|
|
117
119
|
const R = { links: {}, rows: {}, goals: {}, programs: {}, tasks: {} }, F = files || {};
|
|
118
120
|
const after = (k) => (line) => (line.includes(k) ? line.slice(line.indexOf(k)) : null);
|
|
@@ -134,7 +136,7 @@ function refsOf(root, snap, files) {
|
|
|
134
136
|
// each task's date: the last line of the Board or breakdown ledger that names the task and its due day (a ◇ flag line for a milestone
|
|
135
137
|
// with no date line). A ledger outside the repository (a worktree's main tree) is not cited: the guard reads only inside the root.
|
|
136
138
|
const inside = (f) => !!f && !path.relative(root, f).startsWith('..') && !path.isAbsolute(path.relative(root, f));
|
|
137
|
-
const ledgers = [F.board, F.items].filter(inside).map((f) => ({ f, lines: safe(() => fs.readFileSync(f, 'utf8').split('\n')) || [] }));
|
|
139
|
+
const ledgers = [F.tasks, F.board, F.items].filter(inside).map((f) => ({ f, lines: safe(() => fs.readFileSync(f, 'utf8').split('\n')) || [] }));
|
|
138
140
|
for (const t of snap.tasks || []) {
|
|
139
141
|
const uid = t.uid || t.key, due = String(t.end || t.due || '').slice(0, 10), id = JSON.stringify(uid);
|
|
140
142
|
if (!uid) continue;
|
|
@@ -55,7 +55,10 @@ async function handle(req, res, url, ctx) {
|
|
|
55
55
|
let dir;
|
|
56
56
|
try { dir = A.dirOf(w.root); } catch (e) { return send(409, { ok: false, error: String((e && e.message) || e) }); }
|
|
57
57
|
const r = A.set(A.file(dir), { scope: b.scope, artefact: b.artefact, field: b.field, text: typeof b.text === 'string' ? b.text : '' }, g.actor);
|
|
58
|
-
|
|
58
|
+
if (!r.ok) return send(r.status, { ok: false, error: r.error });
|
|
59
|
+
// a done test or kill condition lands on the record too, so the gates count it (launch simulation W6, lib/artefact-mirror.js)
|
|
60
|
+
const mirror = require('./artefact-mirror.js').after(w.root, r.line, A.file(dir));
|
|
61
|
+
return send(200, { ok: true, line: pageBy(r.line), ...(mirror ? { mirror } : {}) });
|
|
59
62
|
}
|
|
60
63
|
if (req.method !== 'GET') return send(405, { ok: false, error: 'the artefacts are read here; the PM edits a line with POST /api/artefacts/set' });
|
|
61
64
|
if (sub === 'map') return send(200, { ok: true, artefacts: A.KEYS, rows: require('./artefacts-cli.js').mapRows() });
|
|
@@ -601,6 +601,12 @@ function boardRow(board, base, folded, lib) {
|
|
|
601
601
|
row.oneStage = { ...row.oneStage, stage: row.wfStage.key, step: row.wfStage.key, label: OS.labelOf(row.wfStage.key) };
|
|
602
602
|
}
|
|
603
603
|
if (wx.own) { row.stage = (wx.stages.find((x) => x.key === wx.stage) || {}).name || row.stage; row.cat = null; row.stageSource = 'move'; }
|
|
604
|
+
// launch simulation W6: an initiative on a workflow other than Product feature (a Project's, a Full SDLC's, a library one) shows that
|
|
605
|
+
// workflow's stage name, as the chip draws it (public/pm/stage-chip.js stageName): Initiate, Done test, never the eight-step word its
|
|
606
|
+
// first key `triage` also names. The CLI and the lists read this label. A PM word (shipped, on hold, cancelled) still wins.
|
|
607
|
+
if (row.wfStage && row.wfStage.name && row.wf && row.wf.id !== WF.PRODUCT_FEATURE_ID && !['shipped', 'on-hold', 'cancelled'].includes(one.stage)) {
|
|
608
|
+
row.oneStage = { ...row.oneStage, label: row.wfStage.name, wf: row.wf.id };
|
|
609
|
+
}
|
|
604
610
|
// batch 26 item 5: an initiative in its workflow's terminal stage is finished, so it is never late or at risk. Every surface (the Board's
|
|
605
611
|
// tone, dot, late line and edge tabs, Home, Kanban, the program rollups) reads the status this leaves and row.closed.
|
|
606
612
|
// workspace grill W2: the status from what PMOS read, a passed date, or a risk the PM confirmed on a program milestone; else No signal.
|
|
@@ -77,6 +77,24 @@ async function moveOf(call, ws, { wait = WAIT_MS } = {}) {
|
|
|
77
77
|
return { ok: true, ws, source: 'your-move', count: r.rows.length, rows: r.rows.map(slim), older: r.older.map(slim) };
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
/* A refuted outcome's ✦ next step (launch simulation W2) waits for the PM's ✓ under the initiative's ✦. With a server, Your move lists it.
|
|
81
|
+
* Without one, the cards did not: `pmos today` said "Nothing needs you" while it waited (W6). It joins as a kind-1 card, like a due check. */
|
|
82
|
+
const clip = (v, n) => { const t = String(v == null ? '' : v).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).replace(/\s+\S*$/, '') + '…' : t; };
|
|
83
|
+
function withRefuted(out, root) {
|
|
84
|
+
let list = [];
|
|
85
|
+
try { list = require('./outcome-props.js').waiting(root, today.stateDirOf(root)); } catch { return out; }
|
|
86
|
+
if (!list.length) return out;
|
|
87
|
+
const O = require('./outcomes.js');
|
|
88
|
+
const add = list.filter((x) => !out.cards.some((c) => c.run_id === 'refuted:' + x.ini)).map((x) => ({
|
|
89
|
+
id: `${out.ws}|refuted:${x.ini}`, run_id: `refuted:${x.ini}`, ws: out.ws, kind: 1, source: 'outcomes', row_kind: 'refuted', initiative_id: x.ini,
|
|
90
|
+
cause: `✦ ${O.NEXT_WORDS[x.next] || 'A next step'}: ${x.title}. Its outcome check said it did not work; your ✓ picks the next step.`.slice(0, 200),
|
|
91
|
+
evidence: clip(x.say, 240), act: { label: 'Open', cli: `pmos outcomes propose ${x.ini}` },
|
|
92
|
+
}));
|
|
93
|
+
if (!add.length) return out;
|
|
94
|
+
const cards = today.rank([...out.cards, ...add]);
|
|
95
|
+
return { ...out, cards, count: cards.length, next: null };
|
|
96
|
+
}
|
|
97
|
+
|
|
80
98
|
function printMove(say, mv, cards) {
|
|
81
99
|
const waiting = ((cards && cards.cards) || []).filter((c) => c.kind === 2);
|
|
82
100
|
const n = mv.count + waiting.length;
|
|
@@ -145,6 +163,7 @@ async function run(argv, { say, call }) {
|
|
|
145
163
|
if (f.wait || recordCount(root) <= AUTO_READ) { try { rowsLib.deriveNow(root); } catch { /* the banner says what could not be read */ } }
|
|
146
164
|
out = today.todayFor({ id: 'local', root }, {});
|
|
147
165
|
} finally { rowsLib.setBackground(was); }
|
|
166
|
+
if (out && out.ok) out = withRefuted(out, root);
|
|
148
167
|
}
|
|
149
168
|
if (!out.ok) { say('✗ ' + out.error); return 1; }
|
|
150
169
|
if (sessions) {
|
|
@@ -1599,7 +1599,21 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1599
1599
|
: briefPath ? firstAppearance(root, range, briefPath) : null;
|
|
1600
1600
|
const docIdx = docPath ? firstAppearance(root, range, docPath) : null;
|
|
1601
1601
|
|
|
1602
|
+
// W6 (launch simulation rerun, 2026-11-15): the kind of work sets this ladder too, as it sets the product-code gate (W5) and the kit gate.
|
|
1603
|
+
// Full SDLC: a done test and a kill condition, never a brief. Project: a dated plan (plan_path), never a brief. A brief already on the
|
|
1604
|
+
// record still passes (a gate passed stays passed). Their deliverable is not a document: the pull requests, or the plan's milestones.
|
|
1605
|
+
const workKind = (() => { const k = String(fm.kind || '').trim().replace(/^["']|["']$/g, ''); return k === 'sdlc' || k === 'project' ? k : 'product'; })();
|
|
1606
|
+
const planPath = String(fm.plan_path || '').trim();
|
|
1607
|
+
const kindSpec = !doneTest && !exists(briefPath) && !foundBrief && (workKind === 'sdlc' || (workKind === 'project'));
|
|
1602
1608
|
if (doneTest && dtPresent && killCond) steps.push(step('brief', def.brief_label, 'done', `done test ${doneTest} + kill condition (D107)`));
|
|
1609
|
+
else if (kindSpec && workKind === 'sdlc') steps.push(step('brief', 'done test', legacy ? 'pending' : 'blocked',
|
|
1610
|
+
'Full SDLC needs a done test and a kill condition before the first pull request — never a brief or a PRD',
|
|
1611
|
+
`write the done test, set done_test_path and kill: in ${recRel} (pmos artefacts set experiment:${id} done-test check --text "…" writes both)`, { blocking: !legacy, rule: 'R2' }));
|
|
1612
|
+
else if (kindSpec && exists(planPath)) steps.push(step('brief', 'dated plan', 'done', `plan ${planPath} present`));
|
|
1613
|
+
else if (kindSpec) steps.push(step('brief', 'dated plan', legacy ? 'pending' : 'blocked',
|
|
1614
|
+
planPath ? `plan_path '${planPath}' does not exist in the repo` : 'Project needs a dated plan before Execute — never a brief or a PRD',
|
|
1615
|
+
planPath ? 'create the plan the record points at, or correct plan_path' : `write the plan (milestones with dates and owners, go-live matching the KR date) and set plan_path in ${recRel}, or a done test`,
|
|
1616
|
+
{ blocking: !legacy, rule: 'R2' }));
|
|
1603
1617
|
else if (doneTest && dtPresent) steps.push(step('brief', def.brief_label, 'blocked', 'no kill condition — an experiment states what would stop it (D107)',
|
|
1604
1618
|
`write kill: "<the result that would make us stop>" in ${recRel}`, { blocking: !legacy, rule: 'R2' }));
|
|
1605
1619
|
else if (doneTest) steps.push(step('brief', def.brief_label, 'blocked', `done_test_path '${doneTest}' does not exist in the repo`,
|
|
@@ -1613,6 +1627,8 @@ function pmLadder({ id, fm, lane, effLane, knownLane, legacy, steps, root, L, re
|
|
|
1613
1627
|
{ blocking: enforce, rule: 'P1' }));
|
|
1614
1628
|
|
|
1615
1629
|
if (!flows('draft')) steps.push(skipped('draft', def.draft_label));
|
|
1630
|
+
else if (workKind !== 'product' && !exists(docPath) && !foundDraft) steps.push(step('draft', 'deliverable', 'na',
|
|
1631
|
+
workKind === 'sdlc' ? 'Full SDLC — the pull requests are the deliverable, not a document' : 'Project — the plan\'s milestones are the deliverable, not a document'));
|
|
1616
1632
|
else if (foundDraft) steps.push(step('draft', def.draft_label, 'done', `${foundDraft} — found by the repository scan`));
|
|
1617
1633
|
else if (exists(docPath)) {
|
|
1618
1634
|
const inOrder = briefIdx == null || docIdx == null ? null : docIdx >= briefIdx;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.569.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.569.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
package/workspace/run-tests.js
CHANGED
|
@@ -624,6 +624,15 @@ function traceChanges(changes, ctx) {
|
|
|
624
624
|
if (/^lib\/routes-/.test(g)) { const w = routeModule(g); if (w) return w; continue; }
|
|
625
625
|
const w = users(g); if (w) return w;
|
|
626
626
|
}
|
|
627
|
+
// a needs provider is named by its bare stem in the PROVIDERS list of the needs providers module, which requires it by path.join(__dirname, name + '.js'):
|
|
628
|
+
// that list is its user (launch simulation W6: report-structure-needs.js, named nowhere else, sent every change of routes-boards.js to
|
|
629
|
+
// every suite)
|
|
630
|
+
const NP = ['lib', 'needs-providers'].join('/') + '.js'; // built, so this file does not read as a user of it
|
|
631
|
+
if (!n && /^lib\/[\w.-]+-needs\.js$/.test(f) && f !== NP) {
|
|
632
|
+
const np = sget(NP) || '';
|
|
633
|
+
const list = /const PROVIDERS = Object\.freeze\(\[([\s\S]*?)\]\)/.exec(np);
|
|
634
|
+
if (list && new RegExp(`'${reEsc(stemOf(f))}'`).test(list[1])) { n = 1; const w = users(NP); if (w) return w; }
|
|
635
|
+
}
|
|
627
636
|
named.set(f, n);
|
|
628
637
|
if (!n && /^lib\/.*\.m?js$/.test(f)) return `no file names ${f}`;
|
|
629
638
|
return null;
|