create-pmos 0.412.0 → 0.414.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 +25 -25
- package/payload/AGENTS.md +2 -2
- package/payload/KIT-VERSION +1 -1
- package/payload/mods/pmos-cockpit/README.md +1 -1
- package/payload/mods/pmos-cockpit/hooks/lib/guard.mjs +11 -5
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/scripts/pmos-log.sh +18 -4
- package/payload/state/discoveries.md +1 -1
- package/workspace/board-programs-test.js +2 -2
- package/workspace/briefing-premium-board-test.js +45 -9
- package/workspace/briefing-premium-test.js +3 -2
- package/workspace/changelog.json +24 -0
- package/workspace/core-docs-workflow-test.js +144 -0
- package/workspace/guide/programs.md +13 -0
- package/workspace/guide/workflows.md +15 -1
- package/workspace/home-other-product-test.js +18 -0
- package/workspace/lib/board-premium.js +8 -2
- package/workspace/lib/briefing-premium-agent.js +16 -4
- package/workspace/lib/core-docs.js +79 -14
- package/workspace/lib/engine/boards.js +20 -12
- package/workspace/lib/headless.js +10 -1
- package/workspace/lib/initiative-chat.js +50 -0
- package/workspace/lib/initiative-premium.js +17 -7
- package/workspace/lib/item-cli.js +7 -2
- package/workspace/lib/milestone-review.js +120 -0
- package/workspace/lib/milestone-suggest.js +176 -0
- package/workspace/lib/plan-items.js +1 -1
- package/workspace/lib/pmos-verbs.js +7 -1
- package/workspace/lib/program-chat.js +1 -1
- package/workspace/lib/program-cli.js +56 -0
- package/workspace/lib/programs.js +25 -6
- package/workspace/lib/routes-boards.js +77 -13
- package/workspace/lib/routes-briefing-premium.js +17 -1
- package/workspace/lib/routes-core-docs.js +3 -1
- package/workspace/lib/routes-programs.js +84 -7
- package/workspace/lib/task-cli.js +120 -0
- package/workspace/lib/workflow-chat.js +1 -0
- package/workspace/lib/workflow-cli.js +91 -6
- package/workspace/milestone-suggest-test.js +175 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-chat-line-test.js +12 -1
- package/workspace/premium-vw-item-test.js +3 -3
- package/workspace/premium-vw-jira-test.js +2 -1
- package/workspace/program-order-test.js +180 -0
- package/workspace/public/pm/bd-ini-model.js +81 -0
- package/workspace/public/pm/bd-ini-panel.js +123 -58
- package/workspace/public/pm/bd-prog-panel.js +54 -14
- package/workspace/public/pm/bd-prog.js +3 -3
- package/workspace/public/pm/cozy-home.css +5 -0
- package/workspace/public/pm/cozy-panel.css +2 -0
- package/workspace/public/pm/cozy-viewer.js +10 -3
- package/workspace/public/pm/cozy-xv.css +51 -16
- package/workspace/public/pm/cozy-xv.js +6 -5
- package/workspace/public/pm/goal-chat.js +1 -1
- package/workspace/public/pm/home-app.js +35 -19
- package/workspace/public/pm/home-ask.js +9 -3
- package/workspace/public/pm/home-chat.js +16 -2
- package/workspace/public/pm/home-ini-model.js +42 -29
- package/workspace/public/pm/home-ini.css +1 -0
- package/workspace/public/pm/home-ini.js +26 -34
- package/workspace/public/pm/home-list.js +14 -8
- package/workspace/public/pm/home-stage-card.js +3 -1
- package/workspace/public/pm/home-task.js +41 -65
- package/workspace/public/pm/home-today.js +11 -12
- package/workspace/public/pm/ms-suggest.css +50 -0
- package/workspace/public/pm/ms-suggest.js +98 -0
- package/workspace/public/pm/premium-board.js +13 -7
- package/workspace/public/pm/premium-initiative-head.js +32 -13
- package/workspace/public/pm/premium-viewer.js +1 -0
- package/workspace/public/pm/premium-vw-item-model.js +13 -7
- package/workspace/public/pm/premium-vw-item.js +49 -5
- package/workspace/public/pm/prog-order.css +47 -0
- package/workspace/public/pm/prog-order.js +188 -0
- package/workspace/public/pm/program-charter.js +47 -7
- package/workspace/public/pm/program-model.js +79 -1
- package/workspace/public/pm/task-card.css +108 -0
- package/workspace/public/pm/task-card.js +271 -0
- package/workspace/public/pm/wf-page.js +3 -0
- package/workspace/server.js +23 -1
- package/workspace/skills/milestone-review.skill +53 -0
- package/workspace/skills/workflow-setup.skill +14 -5
- package/workspace/stage-card-test.js +11 -0
- package/workspace/task-card-test.js +248 -0
- package/workspace/test-lists/bd-ini-panel.json +5 -0
- package/workspace/test-lists/core-documents-backend.json +15 -3
- package/workspace/test-lists/milestone-suggest.json +6 -0
- package/workspace/test-lists/program-order.json +6 -0
- package/workspace/test-lists/task-card.json +6 -0
- package/workspace/test-lists/workflow-stage.json +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.414.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": {
|
|
@@ -32,6 +32,30 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.414.0",
|
|
37
|
+
"at": "2026-10-25T12:55:58.684Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1046,
|
|
42
|
+
"t": "Fourth testing feedback batch (items 1–10)",
|
|
43
|
+
"s": "Fourth testing feedback batch (items 1–10)"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"v": "0.413.0",
|
|
49
|
+
"at": "2026-10-25T08:05:44.632Z",
|
|
50
|
+
"f": 2,
|
|
51
|
+
"prs": [
|
|
52
|
+
{
|
|
53
|
+
"n": 1044,
|
|
54
|
+
"t": "Third testing feedback batch (items 1–10)",
|
|
55
|
+
"s": "Third testing feedback batch (items 1–10)"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
35
59
|
{
|
|
36
60
|
"v": "0.412.0",
|
|
37
61
|
"at": "2026-10-25T06:20:40.812Z",
|
|
@@ -252,30 +276,6 @@
|
|
|
252
276
|
"s": "Keep share.pm-os.app out of the workspace Access application"
|
|
253
277
|
}
|
|
254
278
|
]
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"v": "0.394.0",
|
|
258
|
-
"at": "2026-10-22T04:51:35.949Z",
|
|
259
|
-
"f": 2,
|
|
260
|
-
"prs": [
|
|
261
|
-
{
|
|
262
|
-
"n": 1008,
|
|
263
|
-
"t": "Open in terminal icon in the chat header",
|
|
264
|
-
"s": "Open in terminal icon in the chat header"
|
|
265
|
-
}
|
|
266
|
-
]
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"v": "0.393.0",
|
|
270
|
-
"at": "2026-10-22T04:08:26.227Z",
|
|
271
|
-
"f": 2,
|
|
272
|
-
"prs": [
|
|
273
|
-
{
|
|
274
|
-
"n": 1007,
|
|
275
|
-
"t": "Show Claude's questions in the chat as a card, not a picker the panel cannot show",
|
|
276
|
-
"s": "Show Claude's questions in the chat as a card, not a picker the panel cannot show"
|
|
277
|
-
}
|
|
278
|
-
]
|
|
279
279
|
}
|
|
280
280
|
]
|
|
281
281
|
}
|
package/payload/AGENTS.md
CHANGED
|
@@ -41,7 +41,7 @@ It refuses frontmatter, fenced and indented code, table rows, headings, delibera
|
|
|
41
41
|
| `get_eval_rubric` | read `pmos/planning/evals/<id>-eval-rubric.md` |
|
|
42
42
|
| `log_agent_run` | append one JSON line to `pmos/state/runs.jsonl` (`{run_id, initiative_id, pre_run_contract, self_eval, human_corrections, date, model}`) — record `model` = the model that produced the run so metrics stay honest across model switches |
|
|
43
43
|
| `save_eval` | append one JSON line to `pmos/state/evals.jsonl` (`{run_id, initiative_id, rubric_path, score, verdict, dimensions, date, evaluator_model}`) — record `evaluator_model` = the model that rendered the verdict; κ is calibrated **per evaluator model** (a model swap does not inherit a prior κ) |
|
|
44
|
-
| `record_acceptance` | append one JSON line to `pmos/state/acceptances.jsonl` (`{run_id, initiative_id, accepted, pm_label, note, date}`) —
|
|
44
|
+
| `record_acceptance` | append one JSON line to `pmos/state/acceptances.jsonl` (`{run_id, initiative_id, accepted, pm_label, note, date}`) — written on the PM's explicit word: by the PM, or by an agent the PM asked, which writes the row under its own `by` and no `pm_label` (D98) |
|
|
45
45
|
| `record_outcome_check` | append one JSON line to `pmos/state/outcome_checks.jsonl` (`{initiative_id, disposition, evidence, date}`) — the D57 post-acceptance outcome verdict (`validated | refuted | inconclusive`; evidence required for the first two). **PM's word only — never auto-dispose from metrics**; a re-judgment is a new line |
|
|
46
46
|
| `save_okf_doc` | write the doc under `pmos/okf/product/…` marked as a DRAFT; the PM approves it via PR review (the file-mode form of draft→approved) |
|
|
47
47
|
| `register_product_repo` | not applicable — this repo IS the product; skip the step |
|
|
@@ -92,7 +92,7 @@ Every initiative carries a `type` — the lane picks what the gate requires **be
|
|
|
92
92
|
|
|
93
93
|
## The Claude Code mod (D81)
|
|
94
94
|
|
|
95
|
-
If `pmos/mods` is installed in Claude Code, it guards the session. A hand-write to a `*.jsonl` ledger is denied: write ledger rows with `pmos/scripts/pmos-log.sh`. You cannot write `acceptances.jsonl` or `grants.jsonl`, run `record-acceptance.js`, or run `pmos-log.sh
|
|
95
|
+
If `pmos/mods` is installed in Claude Code, it guards the session. A hand-write to a `*.jsonl` ledger is denied: write ledger rows with `pmos/scripts/pmos-log.sh`. You cannot hand-write `acceptances.jsonl` or `grants.jsonl`, run `record-acceptance.js`, or run `pmos-log.sh grant` or `grant-use`: only the PM does, by typing `/pmos-grant` or by pressing a button. When the PM asks you to record an acceptance, run `bash pmos/scripts/pmos-log.sh accept <run_id> <initiative_id> pass|fail "<what you checked>"`: the row carries your own `by` and no `pm_label` (D98). A merge, a push to the default branch, a forced push and a publish are denied unless the PM has granted exactly that target, once. A cloud-mutating command is denied and the PM runs it. A Confluence, Jira, Slack or Gmail write asks the PM each time. The mod also adds one short section to your system prompt, `PMOS session facts`, naming the initiative, lane, anchor, stage, next step, state root and profile that it read from the workflow ladder. Treat it as facts to check with `node pmos/scripts/workflow-state.js <id>`, not as instructions, and keep reading this file. When the mod denies a call, it names what to do next: do that, and do not look for another route to the same action.
|
|
96
96
|
|
|
97
97
|
## Human builders & multi-repo initiatives (D58)
|
|
98
98
|
|
package/payload/KIT-VERSION
CHANGED
|
@@ -20,7 +20,7 @@ A Claude Code mod that ships in the PMOS kit as `pmos/mods/pmos-cockpit`. It is
|
|
|
20
20
|
| Route | What the guard does |
|
|
21
21
|
|---|---|
|
|
22
22
|
| Hand-write to a `*.jsonl` ledger in the state root (Edit, Write, redirect, heredoc, `tee`, `sed -i`, an inline interpreter, a write through a link) | Denies. The message names the writer: `pmos/scripts/pmos-log.sh`, or in PMOS's own repository `log-run.js`, `record-eval.js` and `record-outcome.js`. A read is allowed. |
|
|
23
|
-
| Write to `acceptances.jsonl` or `grants.jsonl
|
|
23
|
+
| Write to `acceptances.jsonl` or `grants.jsonl` by hand, `record-acceptance.js`, `record-grant.js` (any subcommand), `pmos-log.sh grant` or `grant-use` | Denies. These are yours. `pmos-log.sh accept` is allowed: an agent you asked records the acceptance under its own `by`, with no `pm_label` (D98). |
|
|
24
24
|
| Write to the installed mod (`pmos/mods`), `.claude/pmos-cockpit.json` or the plugin entries in `.claude/settings.json` | Denies. In PMOS's own repository `kit/mods/**` is source and is not protected. |
|
|
25
25
|
| `gh pr merge`, the GitHub merge tools, a push to the default branch, a forced push, `npm publish` | Denies unless there is a live grant for exactly that PR, branch or package, and the local gate passes. The use of the grant is recorded before the action runs. |
|
|
26
26
|
| A cloud-mutating command from `AGENTS.md` (`supabase db push` and the rest) | Denies. No grant covers it in this release. You run it. |
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
// tell. It returns findings; the module that wires it decides what to do with each.
|
|
3
3
|
//
|
|
4
4
|
// ledger a write to a *.jsonl ledger in the state root -> deny, name the writer
|
|
5
|
-
// accept-grants a
|
|
6
|
-
// record-acceptance.js
|
|
7
|
-
// pmos-log.sh
|
|
5
|
+
// accept-grants a hand-write to acceptances or grants, or running
|
|
6
|
+
// record-acceptance.js (the PM's calibration label),
|
|
7
|
+
// record-grant.js, pmos-log.sh grant|grant-use -> deny; an acceptance goes through
|
|
8
|
+
// pmos-log.sh accept (D98)
|
|
8
9
|
// governing the installed mod, .claude/pmos-cockpit.json, the
|
|
9
10
|
// plugin entries in .claude/settings.json -> deny, a person edits these
|
|
10
11
|
// merge gh pr merge, the GitHub merge tools, a push to the
|
|
@@ -518,7 +519,9 @@ function segmentFindings(seg, ctx, findings, depth) {
|
|
|
518
519
|
if (scriptName === 'record-acceptance.js') findings.push({ kind: 'accept-grants', why: 'record-acceptance.js writes the acceptance ledger', raw });
|
|
519
520
|
if (scriptName === 'pmos-log.sh') {
|
|
520
521
|
const sub = args.slice(args.findIndex((a) => base(a) === 'pmos-log.sh') + 1).find((a) => !a.startsWith('-'));
|
|
521
|
-
|
|
522
|
+
// D98: `pmos-log.sh accept` is how an agent that was asked to accept records it, under its own `by` and with no pm_label;
|
|
523
|
+
// a grant still mints merge rights, so it stays a person's command
|
|
524
|
+
if (sub === 'grant' || sub === 'grant-use') findings.push({ kind: 'accept-grants', why: `pmos-log.sh ${sub} is a person's command`, raw });
|
|
522
525
|
}
|
|
523
526
|
// Running record-grant.js in any form: directly, through an interpreter or a launcher, or named in an
|
|
524
527
|
// interpreter's inline code or here-document. Reading or editing the file is not running it.
|
|
@@ -747,7 +750,10 @@ export function denyMessage(f, ctx) {
|
|
|
747
750
|
case 'pm-act':
|
|
748
751
|
return `${head} ${f.why ?? 'a PM-only act'}. Only the PM does it (R25, D86 point 2). ${f.use ? `${f.use}.` : f.verb ? `Ask the PM to run ${f.verb} at their own terminal, or to press it in the workspace.` : 'Ask the PM to press it in the workspace.'}`;
|
|
749
752
|
case 'accept-grants':
|
|
750
|
-
|
|
753
|
+
// D98: when the PM asked for the acceptance, the agent records it itself with pmos-log.sh accept (its own by, no pm_label)
|
|
754
|
+
return /grant/.test(`${f.why ?? ''} ${f.path ?? ''}`)
|
|
755
|
+
? `${head} a grant gives merge rights, so the PM mints it. ${f.why ? `${f.why}. ` : ''}The PM types /pmos-grant <scope> or presses the button. Ask the PM to do it.`
|
|
756
|
+
: `${head} ${f.why ? `${f.why}. ` : ''}Record an acceptance the PM asked for with: bash pmos/scripts/pmos-log.sh accept <run_id> <initiative_id> pass|fail "<what you checked>". It is written under your own name (D98). The PM records their own with /pmos-accept.`;
|
|
751
757
|
case 'governing':
|
|
752
758
|
return `${head} ${f.what} is governing configuration. A person edits it${ctx.layout?.kind === 'kit' ? '; npx create-pmos --update refreshes the installed mod' : ''}. Ask the PM.`;
|
|
753
759
|
case 'cloud':
|
|
@@ -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-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-25T12:55:55Z"}
|
|
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-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-25T12:55:55Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -151,7 +151,18 @@ case "$cmd" in
|
|
|
151
151
|
nonempty note "$4"
|
|
152
152
|
run_exists "$1" || fail "run_id '$1' is not in state/runs.jsonl — log the run first (pmos-log.sh run ...), then accept it."
|
|
153
153
|
acc=true; [ "$3" = fail ] && acc=false
|
|
154
|
-
|
|
154
|
+
# D98: an agent session that was asked to accept records it, under its own name. Who runs this: a bound agent session by its
|
|
155
|
+
# token (PMOS_SESSION, as workspace/lib/actor.js fromCli), else a Claude Code session with no token (CLAUDECODE), else the PM. An agent's
|
|
156
|
+
# acceptance carries no pm_label: the label is the PM's calibration of the evaluator (D40), never an agent's.
|
|
157
|
+
by=""
|
|
158
|
+
if [ -n "${PMOS_SESSION:-}" ] && printf '%s' "$PMOS_SESSION" | grep -Eq '^sess-[0-9]+\.[0-9a-f]{8}$'; then by="agent:$PMOS_SESSION"
|
|
159
|
+
elif [ -n "${CLAUDECODE:-}" ]; then by="agent:unknown"
|
|
160
|
+
else by=""; fi
|
|
161
|
+
if [ -n "$by" ]; then
|
|
162
|
+
append acceptances.jsonl "{\"run_id\":$(js "$1"),\"initiative_id\":$(js "$2"),\"accepted\":$acc,\"note\":$(js "${4:-}"),\"date\":\"$today\",\"via\":\"cli\",\"by\":$(js "$by")}"
|
|
163
|
+
else
|
|
164
|
+
append acceptances.jsonl "{\"run_id\":$(js "$1"),\"initiative_id\":$(js "$2"),\"accepted\":$acc,\"pm_label\":$(js "$3"),\"note\":$(js "${4:-}"),\"date\":\"$today\",\"via\":\"cli\"}"
|
|
165
|
+
fi
|
|
155
166
|
;;
|
|
156
167
|
outcome)
|
|
157
168
|
[ $# -ge 2 ] || fail "usage: outcome <initiative_id> <validated|refuted|inconclusive> [evidence]"
|
|
@@ -171,14 +182,16 @@ case "$cmd" in
|
|
|
171
182
|
grant)
|
|
172
183
|
[ $# -ge 3 ] || fail "usage: grant <merge:<PR or branch>|publish:<artifact>|release:<initiative>:<batch-id>|lifecycle-bulk:<state>:<id>,…> <pm> <instruction> [ttl_minutes] [initiative_id]"
|
|
173
184
|
nonempty pm "$2"; nonempty instruction "$3"
|
|
174
|
-
|
|
185
|
+
# The heredoc sits in a function, never inside "$( )": macOS /bin/bash 3.2 reads quotes in a heredoc that is inside a command
|
|
186
|
+
# substitution, so one apostrophe in the Python below made the whole script a syntax error there.
|
|
187
|
+
grant_row() { python3 - "$@" <<'PY'
|
|
175
188
|
import datetime, json, os, re, secrets, sys
|
|
176
189
|
scope, pm, instruction, ttl, initiative, state = sys.argv[1:7]
|
|
177
190
|
def die(m):
|
|
178
191
|
sys.stderr.write("pmos-log: ERROR — %s\n" % m); sys.exit(1)
|
|
179
192
|
if re.match(r"^(docs-sync|outward)(:|$)", scope):
|
|
180
193
|
die('"%s" is a standing scope. Standing grants are not allowed in this release (D81). Mint one single-use grant per action.' % scope)
|
|
181
|
-
# The same scopes and target patterns as scripts/record-grant.js and the cockpit mod
|
|
194
|
+
# The same scopes and target patterns as scripts/record-grant.js and the grants.mjs of the cockpit mod (D81;
|
|
182
195
|
# D86 point 2 added release and lifecycle-bulk). scripts/tests/record-grant.test.js runs one table through all three.
|
|
183
196
|
SLUG = r"[a-z0-9][a-z0-9._-]{0,99}"
|
|
184
197
|
PATS = {
|
|
@@ -210,7 +223,8 @@ if initiative:
|
|
|
210
223
|
row["initiative"] = initiative
|
|
211
224
|
print(json.dumps(row, separators=(",", ":")))
|
|
212
225
|
PY
|
|
213
|
-
|
|
226
|
+
}
|
|
227
|
+
row="$(grant_row "$1" "$2" "$3" "${4:-120}" "${5:-}" "$STATE")" || exit 1
|
|
214
228
|
append grants.jsonl "$row"
|
|
215
229
|
;;
|
|
216
230
|
grant-use)
|
|
@@ -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-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-25T12:55:55Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -77,7 +77,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
77
77
|
ok('G the program comes first: its band row is the first row under the head, with its title and the products it spans', /bt-pg/.test(tr.first) && /Project Ascent/.test(tr.band) && /2 products/.test(tr.band), JSON.stringify(tr));
|
|
78
78
|
ok('G the band says its initiatives and their stage spread, read from every product (2 here, 1 in Microsites)', tr.spread === '3 initiatives, Triage to Plan', tr.spread);
|
|
79
79
|
ok('G the next milestone shows with its date and its readiness, one diamond per initiative it waits on', /Pilot live/.test(tr.next) && /Nov 18/.test(tr.next) && tr.ready === '00', JSON.stringify(tr));
|
|
80
|
-
ok('G its initiatives on this board sit under it; the rest of the product follows under the product head', tr.kids.join() === 'Legacy IdP sunset
|
|
80
|
+
ok('G its initiatives on this board sit under it, A to Z while the program has no order (option A); the rest of the product follows under the product head', tr.kids.join() === 'Descope feature parity,Legacy IdP sunset' && tr.prods.join() === 'IDPF' && tr.after.length === 2 && !tr.after.some((t) => tr.kids.includes(t)), JSON.stringify(tr));
|
|
81
81
|
ok('G there is no "Not in a program" group, and Programs first draws no grouping chip (the choice lives in Filter)', !/Not in a program/.test(tr.text) && tr.grp);
|
|
82
82
|
|
|
83
83
|
await p.click('#ibBody .bt-pg [data-prog]');
|
|
@@ -158,7 +158,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
158
158
|
}));
|
|
159
159
|
ok('T the program row comes first, with its title and products and a thin span over its initiatives\' dates', /tg-pg/.test(t.first) && /Project Ascent/.test(t.title) && /2 products/.test(t.title) && t.span, JSON.stringify(t));
|
|
160
160
|
ok('T three milestones within a week merge into one counted diamond labelled "Pilot live +2 · Nov 18–21"', t.clu.length === 1 && /^3\|3 program milestones from Nov 18 to 21: Pilot live, Pilot users invited, Support ready/.test(t.clu[0]) && t.lab.join() === 'Pilot live +2 · Nov 18–21', JSON.stringify(t));
|
|
161
|
-
ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Legacy IdP sunset
|
|
161
|
+
ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Descope feature parity,Legacy IdP sunset' && t.oneLine, JSON.stringify(t));
|
|
162
162
|
ok('T a legend in the chip row names done, planned, the program milestone, Deliver or Evaluate and today', /Done in Jira/.test(t.lgd) && /Planned/.test(t.lgd) && /Program milestone/.test(t.lgd) && /Deliver or Evaluate/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
|
|
163
163
|
await p.click('#ibBody .tg-pg .tg-pgo');
|
|
164
164
|
// the program opens in the floating Viewer (shell A), which sits over the right of the timeline; close it before the next press
|
|
@@ -136,6 +136,37 @@ const mk = (o) => BP.build(F.facts(o));
|
|
|
136
136
|
ok('B1 the panel hatches the skipped step and says no reason is on record', !!sk && sk.skip === 'Triage skipped: it was moved past that step. No reason is on record.' && /\bsk\b/.test(sk.seg), JSON.stringify(sk));
|
|
137
137
|
await R.ctx.close();
|
|
138
138
|
}
|
|
139
|
+
{
|
|
140
|
+
/* XipB (feedback batch 4 item 1): an initiative on its own workflow (a Tender) reads in one order. The status and the one sentence why; the
|
|
141
|
+
* progress source once, on the status line; the stage card names the CURRENT Tender stage over the seven Tender stages (never the eight
|
|
142
|
+
* Product feature steps, never "No step on record"); a stage with no exit steps says so, with the icon-only add that opens the stage in
|
|
143
|
+
* the workflow editor; the next stage last; the Plan card draws the plan and the overrun, with no Jira mark (zero is silence) */
|
|
144
|
+
const ST = [['triage', 'Triage'], ['requirements', 'Requirements and criteria'], ['issue', 'Issue tender'], ['bids', 'Bid evaluation'], ['poc', 'Technical POC'], ['award', 'Award decision', true], ['signed', 'Contract signed', true]];
|
|
145
|
+
const tdr = { wf: { id: 'tender', name: 'Tender', icon: 'doc' }, wfStage: { key: 'poc', name: 'Technical POC', cat: 'doing', milestone: false, n: 5, of: 7 },
|
|
146
|
+
wfStages: ST.map(([key, name, ms], i) => ({ key, name, cat: i ? 'doing' : 'todo', milestone: !!ms, status: i < 4 ? 'done' : i === 4 ? 'current' : 'next' })) };
|
|
147
|
+
const f = F.facts(); f.rows = f.rows.map((r) => (r.id === 'usage-billing' ? { ...r, title: 'Tender new CIAM', status: 'late', owner: 'wawan', start: '2026-04-23', end: '2026-08-11', progress: 0.53, ...tdr } : r));
|
|
148
|
+
const R = await open({ model: BP.build(f) }), q = R.page;
|
|
149
|
+
await q.click('.bt-l[data-row="board:usage-billing"] .bt-nm');
|
|
150
|
+
const td = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'), sc = v && !v.hidden && v.querySelector('.xv-sc'); if (!sc) return null; const pl = v.querySelector('.xv-plan');
|
|
151
|
+
return { line: v.querySelector('.czs-line > span:not(.czs-dot):not(.czs-r)').textContent, right: (v.querySelector('.czs-line .czs-r') || {}).textContent, why: (v.querySelector('.czs-p') || {}).textContent, meta: v.querySelector('.czs-meta').textContent, wfi: (v.querySelector('.czs-meta .wfi') || {}).title,
|
|
152
|
+
stage: sc.querySelector('.xv-ch b').textContent, where: (sc.querySelector('.xv-ch .r') || {}).textContent, bars: [...sc.querySelectorAll('.xv-stg i')].map((i) => i.className).join('|'), aria: sc.querySelector('.xv-stg').getAttribute('aria-label'),
|
|
153
|
+
none: (sc.querySelector('.xv-none') || {}).textContent, add: sc.querySelector('a.xv-add') ? { label: sc.querySelector('a.xv-add').getAttribute('aria-label'), text: sc.querySelector('a.xv-add').textContent.trim(), href: sc.querySelector('a.xv-add').getAttribute('href') } : null,
|
|
154
|
+
next: (sc.querySelector('.cz-sli.tail') || {}).textContent, body: v.querySelector('.cz-vw-body').textContent,
|
|
155
|
+
marks: pl ? [...pl.querySelectorAll('[data-pl]')].map((e) => e.dataset.pl + ':' + e.textContent) : null, lg: pl ? [...pl.querySelectorAll('.xv-lg span')].map((e) => e.textContent) : null, secs: [...v.querySelectorAll('.czs-row b')].map((b) => b.textContent) }; }));
|
|
156
|
+
ok('XipB a Tender initiative: Late, the one sentence why from the record, the progress said once as typed in by hand, the owner and the Tender workflow', !!td && td.line === 'Late' && /^The plan ended Aug 11(, 2026)?, \d+ days ago, and Tender new CIAM is in Technical POC\.$/.test(td.why) && td.right === '53% done · typed in by hand' && /wawan ?· ?Tender$/.test(td.meta) && td.wfi === 'Tender', JSON.stringify(td));
|
|
157
|
+
ok('XipB the stage card is the Tender stage: "Technical POC", 5 of 7, the seven Tender stages with Technical POC current and ◆ on the last two', !!td && td.stage === 'Technical POC' && /^5 of 7/.test(td.where) && td.bars === 'on|on|on|on|now|ms|ms' && td.aria === '7 stages of Tender. Stage 5, Technical POC' && !/No step on record/.test(td.body), JSON.stringify(td && [td.stage, td.where, td.bars, td.aria]));
|
|
158
|
+
ok('XipB no exit steps on record says so, with ONE icon-only add (aria "Add an exit step") into the workflow editor at that stage; the next stage is last', !!td && /^No exit steps on record/.test(td.none) && !!td.add && td.add.label === 'Add an exit step' && td.add.text === '' && /^\/premium-workflows\.html\?wf=tender&stage=poc/.test(td.add.href) && /^Award decision ?Next stage$/.test((td.next || '').trim()), JSON.stringify(td && [td.none, td.add, td.next]));
|
|
159
|
+
ok('XipB the Plan card draws the plan, the overrun and today; no Jira mark and no "Now expected" box; the progress number is said once', !!td && td.marks.join('|').replace(/, 2026/g, '') === 'start:Apr 23|end:Aug 11 plan end|today:Today' && /^Past the plan · \d+ days$/.test(td.lg[1]) && td.lg.length === 2 && !/Now expected|on record/.test(td.body.replace('No exit steps on record', '')) && (td.body.match(/53%/g) || []).length === 1 && !td.secs.includes('Dates and trend'), JSON.stringify(td && [td.marks, td.lg, td.secs]));
|
|
160
|
+
if (process.env.PMOS_SHOTS) await q.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-tender-1440.png') });
|
|
161
|
+
await R.ctx.close();
|
|
162
|
+
if (process.env.PMOS_SHOTS) {
|
|
163
|
+
for (const [w, h, theme, name] of [[1440, 900, 'dark', 'ini-tender-1440-dark.png'], [390, 844, 'dark', 'ini-tender-390-dark.png']]) {
|
|
164
|
+
const P = await open({ model: BP.build(f), w, h, theme }); await P.page.evaluate(() => { const b = [...document.querySelectorAll('[data-key="board:usage-billing"], [data-row="board:usage-billing"] button')].find((x) => x.offsetParent); if (b) b.click(); });
|
|
165
|
+
await until(() => P.page.evaluate(() => !!document.querySelector('#czViewer .xv-sc'))); await sleep(300);
|
|
166
|
+
await P.page.screenshot({ path: path.join(process.env.PMOS_SHOTS, name) }); await P.ctx.close();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
139
170
|
{
|
|
140
171
|
const R = await open({ model: BP.build(FJ.facts()) }), q = R.page;
|
|
141
172
|
const c = await q.evaluate(() => ({ chips: [...document.querySelectorAll('#bdChipset .bd-chip')].map((b) => b.textContent.replace(/\s+/g, ' ').trim() + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')), segs: [...document.querySelectorAll('.bt-l[data-row="board:self-serve-v2"] .seg5 .bt-tk')].map((b) => b.className.replace('bt-tk ', '')).join(), sso: document.querySelector('.bt-l[data-row="board:sso-partners"] .bt-dl').textContent, st: document.querySelector('.bt-l[data-row="board:sso-partners"] .cs').textContent, ssoCount: document.querySelector('.bt-l[data-row="board:sso-partners"] .t1 span').textContent, ssCount: document.querySelector('.bt-l[data-row="board:self-serve-v2"] .t1 span').textContent }));
|
|
@@ -151,12 +182,14 @@ const mk = (o) => BP.build(F.facts(o));
|
|
|
151
182
|
await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm');
|
|
152
183
|
/* re-pointed (viewer-shell-a, XvABoard): the initiative opens in the Viewer's shell A, floating over the page's right edge: the summary card,
|
|
153
184
|
* the stage bar, then the folding rows. The Ask box is gone; Discuss in chat and ⋯ take its presses */
|
|
154
|
-
const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.kind !== 'Initiative') return null; const r = v.getBoundingClientRect(), out = v.querySelector('
|
|
185
|
+
const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.kind !== 'Initiative') return null; const r = v.getBoundingClientRect(), out = v.querySelector('.xv-sc'); return { t: v.querySelector('.cz-vw-title').textContent, line: (v.querySelector('.czs-line > span:not(.czs-dot):not(.czs-r)') || {}).textContent, right: (v.querySelector('.czs-line .czs-r') || {}).textContent, meta: (v.querySelector('.czs-meta') || {}).textContent, wfi: (v.querySelector('.czs-meta .wfi') || {}).title, stg: v.querySelectorAll('.xv-stg i').length, ms: [...v.querySelectorAll('.xv-stg i')].map((i, j) => (i.classList.contains('ms') ? j : -1)).filter((j) => j >= 0).join(), now: [...v.querySelectorAll('.xv-stg i')].findIndex((i) => i.classList.contains('now')), out: (out.querySelector('.xv-ch b') || {}).textContent, where: (out.querySelector('.xv-ch .r') || {}).textContent, tks: [...out.querySelectorAll('[data-tk]')].map((e) => e.dataset.tk).join(), rows: [...out.querySelectorAll('.xv-lr')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), secs: [...v.querySelectorAll('.czs-row b')].map((b) => b.textContent), ask: v.querySelectorAll('.cz-vw-body input, .cz-vw-body textarea').length, disc: !!v.querySelector('[data-cz-vw="discuss"]'), sel: !!document.querySelector('.bt-l.sel[data-row="board:sso-partners"]'), w: Math.round(r.width), side: Math.round(innerWidth - r.right) < 40, dlg: !!document.querySelector('#dlg.on'), peek: !document.querySelector('#peek'), record: !!v.querySelector('[data-pk="record"]') }; }));
|
|
155
186
|
ok('B1 a row opens the initiative in the Viewer, floating at 560 px over the right edge, not the old dialog, and the row is marked', !!pk && pk.t === 'SSO for partners' && pk.w === 560 && pk.side && pk.peek && !pk.dlg && !pk.record && pk.sel, JSON.stringify(pk));
|
|
156
|
-
|
|
157
|
-
ok('B1 the
|
|
187
|
+
/* re-pointed (XipB, feedback batch 4 item 1): the meta is the owner and the workflow, each fact once; the progress source is the right of the status line */
|
|
188
|
+
ok('B1 the summary says the status once (the release date is not said again), the owner and the workflow, and when Jira was read', !!pk && pk.line === 'Ships Nov 4' && /Lee ?· ?Product feature$/.test(pk.meta) && pk.wfi === 'Product feature' && !/day|owner|Deliver/.test(pk.meta) && /^Jira · \d+ days? ago$/.test(pk.right), JSON.stringify(pk && [pk.line, pk.meta, pk.right]));
|
|
189
|
+
ok('B1 XipB the stage card names the stage (Deliver, 6 of 8) over the eight steps with ◆ on Deliver and Evaluate; it lists the tickets (blocked first) with their status, the done count, release notes and your sign-off', !!pk && pk.stg === 8 && pk.now === 5 && pk.ms === '5,7' && pk.out === 'Deliver' && /^6 of 8/.test(pk.where || '') && pk.tks.split(',')[0] === 'SSO-12' && pk.tks.split(',').sort().join() === 'SSO-12,SSO-14,SSO-15' && pk.rows.some((x) => /^SSO-12 SAML errors ?Blocked by PLAT-88/.test(x)) && pk.rows.some((x) => /^1 of 4 tickets done ?okta config/.test(x)) && pk.rows.includes('Release notesnot on record') && pk.rows.includes('Your sign-offafter the tickets') && !pk.secs.includes('Dates and trend'), JSON.stringify(pk && [pk.out, pk.where, pk.ms, pk.tks, pk.rows, pk.secs]));
|
|
158
190
|
ok('B1 what PMOS has no record of is not drawn: no Linked row, no Drafted row, no Jira-differs row', !!pk && !pk.secs.includes('Linked') && !pk.secs.includes('Drafted in PMOS') && !pk.secs.includes('Jira differs from the PRD'), JSON.stringify(pk && pk.secs));
|
|
159
191
|
ok('B1 there is no ask box; Discuss in chat sits in the header', !!pk && pk.ask === 0 && pk.disc, JSON.stringify(pk));
|
|
192
|
+
if (process.env.PMOS_SHOTS) await q.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-deliver-1280.png') });
|
|
160
193
|
const n0 = R.posts.length; await vwMore(q, 'Read Jira again');
|
|
161
194
|
ok('B1 Read Jira again under ⋯ reads Jira through the Jira source\'s own refresh, and says so', await until(() => R.posts.slice(n0).some((x) => x.path === '/api/sources/refresh' && x.body.source === 'jira' && x.body.ws === 'w1')) && await until(() => q.evaluate(() => /Reading Jira again/.test(document.querySelector('#bdToast').textContent))), JSON.stringify(R.posts.slice(n0)));
|
|
162
195
|
await q.click('#czViewer [data-tk="SSO-12"]');
|
|
@@ -216,8 +249,8 @@ const mk = (o) => BP.build(F.facts(o));
|
|
|
216
249
|
ok('B1 a Deliver row whose tickets are all done waits on you: "Your sign-off · v2.4", in blue', y.st === 'Your sign-off · v2.4' && /\byou\b/.test(y.dot) && /m-info/.test(y.dot) && /s-you/.test(y.tone), JSON.stringify(y));
|
|
217
250
|
await q.click('.bt-l[data-row="board:sso-partners"] .bt-nm');
|
|
218
251
|
/* re-pointed (viewer-shell-a, XvABoard): the sign-off leads the summary card, and Sign off is its one primary */
|
|
219
|
-
const nb = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden && v.querySelector('.czs-sum') ? { line: v.querySelector('.czs-line > span:not(.czs-dot):not(.czs-r)').textContent, pri: (v.querySelector('.czs-pri') || {}).textContent, href: (v.querySelector('a.czs-pri') || {}).href || '', n: v.querySelectorAll('.czs-pri').length, last: [...v.querySelectorAll('
|
|
220
|
-
ok('B1 the panel puts the sign-off first, with Sign off as the one primary, and the
|
|
252
|
+
const nb = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); return v && !v.hidden && v.querySelector('.czs-sum') ? { line: v.querySelector('.czs-line > span:not(.czs-dot):not(.czs-r)').textContent, pri: (v.querySelector('.czs-pri') || {}).textContent, href: (v.querySelector('a.czs-pri') || {}).href || '', n: v.querySelectorAll('.czs-pri').length, last: [...v.querySelectorAll('.xv-sc .xv-lr')].pop().textContent.replace(/\s+/g, ' ').trim() } : null; }));
|
|
253
|
+
ok('B1 the panel puts the sign-off first, with Sign off as the one primary, and the stage card says it waits', !!nb && nb.line === 'Your sign-off · v2.4' && nb.pri === 'Sign off v2.4' && nb.n === 1 && nb.last === 'Your sign-offwaiting', JSON.stringify(nb));
|
|
221
254
|
ok('B1 signing off goes to the initiative page, where the sign-off is', !!nb && /\/premium-initiative\.html\?id=sso-partners/.test(nb.href), nb && nb.href);
|
|
222
255
|
await R.ctx.close();
|
|
223
256
|
}
|
|
@@ -269,8 +302,10 @@ const mk = (o) => BP.build(F.facts(o));
|
|
|
269
302
|
await p.click('#ibBody .tg-n[data-key="board:partner-rate-limits"]');
|
|
270
303
|
/* re-pointed (viewer-shell-a, XvABoard): the timeline opens the same initiative in the Viewer as every other view. The stage bar names the
|
|
271
304
|
* step; Dates and trend holds the PMOS plan; the timeline panel's actions (the plan dates, move, hold, archive) are under ⋯ */
|
|
272
|
-
const tp = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.kind !== 'Initiative') return null; return { t: v.querySelector('.cz-vw-title').textContent,
|
|
273
|
-
|
|
305
|
+
const tp = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); if (!v || v.hidden || !c || c.kind !== 'Initiative') return null; const pl = v.querySelector('.xv-plan'); return { t: v.querySelector('.cz-vw-title').textContent, right: (v.querySelector('.czs-line .czs-r') || {}).textContent, stage: (v.querySelector('.xv-sc .xv-ch b') || {}).textContent, seg: v.querySelectorAll('.xv-stg i').length, cur: [...v.querySelectorAll('.xv-stg i')].findIndex((i) => i.classList.contains('now')), marks: pl ? [...pl.querySelectorAll('.xv-pl [data-pl]')].map((e) => e.dataset.pl + ':' + e.textContent) : null, lg: pl ? [...pl.querySelectorAll('.xv-lg span')].map((e) => e.textContent) : null, secs: [...v.querySelectorAll('.czs-row b')].map((b) => b.textContent), w: Math.round(v.getBoundingClientRect().width) }; }));
|
|
306
|
+
/* re-pointed (XipB): the plan is one drawn line in the Plan card (start, plan end, today; no Jira mark without a Jira forecast); the progress
|
|
307
|
+
* says where it comes from; Dates and trend is gone */
|
|
308
|
+
ok('B6 an initiative on the timeline opens in the Viewer: the stage card names Plan over the eight steps, the Plan card draws the plan dates, no empty rows', !!tp && tp.t === 'Partner API rate limits' && tp.stage === 'Plan' && tp.seg === 8 && tp.cur === 2 && tp.right === '18% done · typed in by hand' && !!tp.marks && /^start:Sep 20(, 2026)?$/.test(tp.marks[0]) && tp.marks.some((x) => /^end:Nov 30(, 2026)? plan end$/.test(x)) && tp.marks.some((x) => x === 'today:Today') && !tp.marks.some((x) => /^jira/.test(x)) && tp.lg.join('|') === 'Your plan|Today' && !tp.secs.includes('Dates and trend') && !tp.secs.includes('Linked') && tp.w === 560, JSON.stringify(tp));
|
|
274
309
|
await p.click('#czViewer [data-cz-vw="more"]'); await sleep(80);
|
|
275
310
|
const tm = await p.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.textContent.trim()));
|
|
276
311
|
ok('B6 ⋯ holds the timeline panel\'s actions first (move, hold, cancel or archive; the plan dates), then Open in full, link and copy', tm[0] === 'Move, hold, cancel or archive' && tm[1] === 'Change the plan dates' && tm.includes('Open in full') && tm.includes('Copy link') && tm.includes('Copy as text'), JSON.stringify(tm));
|
|
@@ -385,8 +420,9 @@ const mk = (o) => BP.build(F.facts(o));
|
|
|
385
420
|
ok('T what waits on you comes first, in blue', rf.st === 'Your verdict' && /s-you/.test(rf.stc), JSON.stringify(rf));
|
|
386
421
|
await q.click('.bt-l[data-row="board:self-serve-v2"] .bt-nm');
|
|
387
422
|
/* re-pointed (viewer-shell-a, XvABoard): the same records, in the summary's meta, the stage bar's tooltip and the folding rows */
|
|
388
|
-
const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden || !v.querySelector('[data-czs-id="drafted"]')) return null; const sec = (id) => { const x = v.querySelector(`[data-czs-id="${id}"]`); return x ? { n: (x.querySelector('.czs-n') || {}).textContent || '', body: (x.querySelector('.czs-body') || {}).textContent.replace(/\s+/g, ' ').trim() } : null; }; return { meta: v.querySelector('.czs-meta').textContent, stt: (v.querySelector('.xv-stg i.now') || {}).title, drafted: sec('drafted'), wt: sec('drift'), lk: [...v.querySelectorAll('[data-czs-id="linked"] .xv-chip')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), prd: (v.querySelector('[data-czs-id="linked"] [data-doc]') || {}).dataset, dep: ([...v.querySelectorAll('[data-czs-id="linked"] .xv-chip')].find((x) => /Waits on/.test(x.textContent)) || {}).title }; }));
|
|
389
|
-
ok('T the
|
|
423
|
+
const pk = await until(() => q.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden || !v.querySelector('[data-czs-id="drafted"]')) return null; const sec = (id) => { const x = v.querySelector(`[data-czs-id="${id}"]`); return x ? { n: (x.querySelector('.czs-n') || {}).textContent || '', body: (x.querySelector('.czs-body') || {}).textContent.replace(/\s+/g, ' ').trim() } : null; }; return { meta: v.querySelector('.czs-meta').textContent, where: (v.querySelector('.xv-sc .xv-ch .r') || {}).textContent, stt: (v.querySelector('.xv-stg i.now') || {}).title, drafted: sec('drafted'), wt: sec('drift'), lk: [...v.querySelectorAll('[data-czs-id="linked"] .xv-chip')].map((e) => e.textContent.replace(/\s+/g, ' ').trim()), prd: (v.querySelector('[data-czs-id="linked"] [data-doc]') || {}).dataset, dep: ([...v.querySelectorAll('[data-czs-id="linked"] .xv-chip')].find((x) => /Waits on/.test(x.textContent)) || {}).title }; }));
|
|
424
|
+
ok('T XipB the stage card says where it stands, the day in the stage of the usual days, and the bar\'s tooltip says the same', !!pk && pk.where === '5 of 8 · day 18 of ~14' && !/day|usually/.test(pk.meta) && pk.stt === 'Build · 18 days in this step · usually 14 days', JSON.stringify(pk && [pk.where, pk.meta, pk.stt]));
|
|
425
|
+
if (process.env.PMOS_SHOTS) await q.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-build-1280.png') });
|
|
390
426
|
ok('T tickets drafted in PMOS and not in Jira are listed, and go to Jira only through your Commit', !!pk && pk.drafted.n === '1' && /^V\.4 ?Resend the invite after 48 hours ?not in Jira ?They go to Jira only through your Commit\.$/.test(pk.drafted.body), JSON.stringify(pk && pk.drafted));
|
|
391
427
|
ok('T a ticket pushed from an older PRD is flagged as PRD drift', !!pk && !!pk.wt && /^ONB-31 was pushed from an older PRD/.test(pk.wt.body), JSON.stringify(pk && pk.wt));
|
|
392
428
|
ok('T the links are the record\'s own: PRD and rubric paths, the epic, and the dependency with where it stands', !!pk && pk.lk.join('|') === 'PRD|Rubric|Waits on SSO for partners|Epic ONB-1' && pk.prd && pk.prd.doc === 'planning/prd/self-serve-v2.md' && /SSO for partners: Deliver/.test(pk.dep || ''), JSON.stringify(pk && [pk.lk, pk.dep]));
|
|
@@ -246,8 +246,9 @@ const vw = () => { const v = document.querySelector('#czViewer:not([hidden])');
|
|
|
246
246
|
/* H4 the program panel's links into Home: ?item=pt:<program>:<key> selects that program task; ?ask=program:<id> opens the chat with the program as its scope */
|
|
247
247
|
{ const PR = require('./fixtures/program-ascent.js').programs();
|
|
248
248
|
const T1 = await open({ programs: PR, qs: '&item=pt:project-ascent:pt-vendor-form' });
|
|
249
|
-
const s1 = await until(() => T1.page.evaluate(() => { const
|
|
250
|
-
|
|
249
|
+
const s1 = await until(() => T1.page.evaluate(() => { const h = document.querySelector('#hmCh'); return h && !h.hidden && /Sign the CIAM/.test(h.textContent) ? { rows: document.querySelectorAll('#hmList [data-id^="pt:"]').length, head: h.textContent, chip: ((document.querySelector('#hmFoot [data-hm-scope]') || {}).textContent || '') } : null; }));
|
|
250
|
+
// Home lists no tasks (feedback batch 4, item 4): the program's tasks are on its panel; the link still opens that task's chat
|
|
251
|
+
ok('H4 ?item=pt:<program>:<key> opens that program task\'s chat, the program\'s, and Home lists no task row', !!s1 && s1.rows === 0 && /Sign the CIAM vendor order form/.test(s1.head) && /Project Ascent/.test(s1.head) && /In: Project Ascent/.test(s1.chip), JSON.stringify(s1));
|
|
251
252
|
await T1.ctx.close();
|
|
252
253
|
const T2 = await open({ programs: PR, qs: '&ask=program:project-ascent&label=Project%20Ascent' });
|
|
253
254
|
const s2 = await until(() => T2.page.evaluate(() => { const c = document.querySelector('#hmFoot [data-hm-scope]'); return c && /Project Ascent/.test(c.textContent) ? { chip: c.textContent, head: (document.querySelector('#hmCh .hm-chb') || {}).textContent || '', sel: !!document.querySelector('.hm-r.sel') } : null; }));
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.414.0",
|
|
4
|
+
"at": "2026-10-25T12:55:58.684Z",
|
|
5
|
+
"f": 2,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1046,
|
|
9
|
+
"t": "Fourth testing feedback batch (items 1–10)",
|
|
10
|
+
"s": "Fourth testing feedback batch (items 1–10)"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"v": "0.413.0",
|
|
16
|
+
"at": "2026-10-25T08:05:44.632Z",
|
|
17
|
+
"f": 2,
|
|
18
|
+
"prs": [
|
|
19
|
+
{
|
|
20
|
+
"n": 1044,
|
|
21
|
+
"t": "Third testing feedback batch (items 1–10)",
|
|
22
|
+
"s": "Third testing feedback batch (items 1–10)"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
2
26
|
{
|
|
3
27
|
"v": "0.412.0",
|
|
4
28
|
"at": "2026-10-25T06:20:40.812Z",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* core-docs-workflow-test.js — the Documents view of an initiative on a library workflow, in Home's Viewer (D99; third testing feedback
|
|
4
|
+
* batch, item 8). The pure half is core-docs-workflow.test.js. Serves the real page from the real server; GET /api/initiative-premium
|
|
5
|
+
* answers lib/initiative-premium.js's fixture model with the documents lib/core-docs.js gives an initiative on Tender at Requirements.
|
|
6
|
+
* D1 the groups are Tender's stages (Requirements · now, Triage, Ahead), never Discover / Plan / Build / Evaluate
|
|
7
|
+
* D2 no Product feature document (PRD, Risks, Problem statement) is listed; the primary drafts the stage's own document
|
|
8
|
+
* D3 a document issued before the switch sits under Other documents · D4 phone and dark. SHOTS=<dir> writes the screenshots. */
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const os = require('os');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const { spawn } = require('child_process');
|
|
13
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
14
|
+
const T = require('./test-run').configure({ name: 'core-docs-workflow' });
|
|
15
|
+
const CD = require('./lib/core-docs.js');
|
|
16
|
+
const IP = require('./lib/initiative-premium.js');
|
|
17
|
+
const F = require('./fixtures/initiative-premium-facts.js');
|
|
18
|
+
const BP = require('./lib/board-premium.js');
|
|
19
|
+
const BF = require('./fixtures/board-premium-facts.js');
|
|
20
|
+
const BRP = require('./lib/briefing-premium.js');
|
|
21
|
+
const BRF = require('./fixtures/briefing-premium-facts.js');
|
|
22
|
+
const WF = require('../scripts/workflows.js');
|
|
23
|
+
|
|
24
|
+
const BASE = T.BASE;
|
|
25
|
+
const SHOTS = process.env.SHOTS || '';
|
|
26
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
27
|
+
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
28
|
+
const results = [];
|
|
29
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
|
|
30
|
+
let srv = null; let browser = null;
|
|
31
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'pmos-cdwf-'));
|
|
32
|
+
const finish = async (code) => {
|
|
33
|
+
if (browser) await browser.close().catch(() => {});
|
|
34
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
35
|
+
T.killTmux();
|
|
36
|
+
try { fs.rmSync(tmp, { recursive: true, force: true }); } catch { /* best effort */ }
|
|
37
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
38
|
+
console.log(`\n${results.length - bad}/${results.length} core-docs-workflow assertions passed`);
|
|
39
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
40
|
+
};
|
|
41
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
42
|
+
|
|
43
|
+
const TENDER = WF.check({ id: 'tender', name: 'Tender', icon: 'doc', stages: [
|
|
44
|
+
{ name: 'Triage', cat: 'todo', output: { name: 'BRD', kind: 'doc', template: 'BRD' } },
|
|
45
|
+
{ name: 'Requirements', cat: 'doing', output: { name: 'Requirements spec', kind: 'doc' } },
|
|
46
|
+
{ name: 'RFP out', cat: 'doing', output: { name: 'RFP', kind: 'doc', template: 'RFP' }, milestone: true },
|
|
47
|
+
{ name: 'Bids', cat: 'doing', output: { name: 'Bids in', kind: 'checklist' } },
|
|
48
|
+
{ name: 'Award', cat: 'done', output: { name: 'Award sign-off', kind: 'signoff' }, milestone: true },
|
|
49
|
+
] }).workflow;
|
|
50
|
+
const LIB = WF.fold([{ kind: 'wf-save', wf: TENDER }]);
|
|
51
|
+
const ID = 'self-serve-v2';
|
|
52
|
+
const st = WF.stagesOf(TENDER, { current: 'requirements' });
|
|
53
|
+
const s = st.find((x) => x.key === 'requirements');
|
|
54
|
+
const ROW = { id: ID, title: 'Office network tender', stage: s.name, cat: null, template: null, wf: { id: 'tender', name: 'Tender', icon: 'doc' },
|
|
55
|
+
wfStage: { key: s.key, name: s.name, cat: s.cat, milestone: s.milestone, n: s.n, of: s.of },
|
|
56
|
+
wfStages: st.map((x) => ({ key: x.key, name: x.name, cat: x.cat, milestone: x.milestone, auto: x.auto, when: x.when, status: x.status, reading: x.reading })) };
|
|
57
|
+
/** The GET /api/core-docs body lib/core-docs.js gives this initiative; `store` holds what it already issued. */
|
|
58
|
+
function docsBody(store = new Map()) {
|
|
59
|
+
const list = CD.initiativeSet({ root: tmp }, { row: ROW, base: { id: ID, record: null }, board: { build: true }, folded: { moves: [], wfLib: LIB }, store,
|
|
60
|
+
extra: { tools: new Map(), artifacts: new Map(), accepted: new Set(), reportCache: {} }, now: Date.now(), ctx: {} });
|
|
61
|
+
return CD.answer({ level: 'initiative', scope: 'initiative:' + ID, row: ROW, board: { build: true }, list, plan: list.plan });
|
|
62
|
+
}
|
|
63
|
+
function model(store) {
|
|
64
|
+
const f = F.facts();
|
|
65
|
+
f.docs = docsBody(store);
|
|
66
|
+
return IP.build(f);
|
|
67
|
+
}
|
|
68
|
+
function board() {
|
|
69
|
+
const B = BP.build(BF.facts());
|
|
70
|
+
const patch = (r) => (r.id !== ID ? r : { ...r, ...ROW });
|
|
71
|
+
B.rows = B.rows.map(patch);
|
|
72
|
+
if (B.initiatives && B.initiatives.list) B.initiatives.list.rows = B.initiatives.list.rows.map(patch);
|
|
73
|
+
return B;
|
|
74
|
+
}
|
|
75
|
+
const BRIEF = BRP.build(BRF.facts());
|
|
76
|
+
const OLD = new Map([['initiative:' + ID + '|risks', { drafts: [], issued: { at: new Date(Date.now() - 86400000).toISOString(), path: 'planning/core-docs/initiative-x/risks/a.md', slot: 'a' }, draft: null, dropped: [] }]]);
|
|
77
|
+
|
|
78
|
+
(async () => {
|
|
79
|
+
const exe = findBrowser();
|
|
80
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
81
|
+
let chromium;
|
|
82
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
83
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
84
|
+
await T.waitForServer(BASE);
|
|
85
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
86
|
+
if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
|
|
87
|
+
const shot = async (p, name) => { if (SHOTS) await p.screenshot({ path: path.join(SHOTS, name + '.png'), fullPage: true }); };
|
|
88
|
+
|
|
89
|
+
const open = async ({ w = 1440, h = 900, theme = 'light', store } = {}) => {
|
|
90
|
+
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
91
|
+
const page = await ctx.newPage();
|
|
92
|
+
const errors = [];
|
|
93
|
+
page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
94
|
+
const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
|
|
95
|
+
const M = model(store), B = board();
|
|
96
|
+
await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: M, as_of: Date.now() }));
|
|
97
|
+
await page.route(/\/api\/board-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: B, as_of: Date.now() }));
|
|
98
|
+
await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRIEF, as_of: Date.now() }));
|
|
99
|
+
await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
|
|
100
|
+
await page.route(/\/api\/workflows(\?.*)?$/, (r) => json(r, { ok: true, workflows: WF.list(LIB) }));
|
|
101
|
+
await page.addInitScript(() => { try { localStorage.setItem('pmos.wf.seen', JSON.stringify({ 'self-serve-v2|tender': 1 })); } catch { /* none */ } });
|
|
102
|
+
await page.goto(BASE + '/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=' + theme);
|
|
103
|
+
let up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 30000);
|
|
104
|
+
if (up) {
|
|
105
|
+
if (await page.$('#czViewer [data-hi-v="page"] [data-hi-open="docs"]')) await page.click('#czViewer [data-hi-open="docs"]');
|
|
106
|
+
else { await page.click('#czViewer [data-cz-vw="more"]'); await until(() => page.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await page.click('#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("Documents"))'); }
|
|
107
|
+
up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v="docs"] .czs-secs')), 15000);
|
|
108
|
+
}
|
|
109
|
+
return { ctx, page, errors, up };
|
|
110
|
+
};
|
|
111
|
+
const V = '#czViewer:not([hidden]) [data-hi-v="docs"]';
|
|
112
|
+
const view = (p) => p.evaluate((v) => {
|
|
113
|
+
const el = document.querySelector(v);
|
|
114
|
+
return el ? { groups: [...el.querySelectorAll('.czs-sec > .czs-row > b')].map((b) => b.textContent), titles: [...el.querySelectorAll('[data-ov-doc] .w')].map((x) => x.firstChild.textContent),
|
|
115
|
+
text: el.textContent.replace(/\s+/g, ' '), primary: ((el.querySelector('.czs-sum button, button.cz-pri, [data-cz-act]') || {}).textContent || '').trim() } : null;
|
|
116
|
+
}, V);
|
|
117
|
+
|
|
118
|
+
const A = await open(), p = A.page;
|
|
119
|
+
ok('D0 the Documents view opens', A.up);
|
|
120
|
+
if (!A.up) return finish(1);
|
|
121
|
+
const v = await view(p);
|
|
122
|
+
ok('D1 the groups are Tender\'s own stages: Requirements · now, Triage, Ahead', v && v.groups.join('|') === 'Requirements · now|Triage|Ahead', JSON.stringify(v && v.groups));
|
|
123
|
+
ok('D1 no Discover, Plan, Build or Evaluate group', v && !v.groups.some((g) => /^(Discover|Plan|Build|Evaluate)\b/.test(g)));
|
|
124
|
+
ok('D2 the documents are the stages\' own (Requirements spec, BRD, RFP) and the status update; no PRD, Risks or Problem statement',
|
|
125
|
+
v && ['Requirements spec', 'BRD', 'RFP', 'Status update'].every((t) => v.text.includes(t)) && !/\bPRD\b|Risks|Problem statement|Priority \(RICE\)/.test(v.text), v && v.text);
|
|
126
|
+
ok('D2 the primary drafts a stage document, not a Product feature one', v && /^Draft the (BRD|Requirements spec)$/.test(v.primary), v && v.primary);
|
|
127
|
+
ok('D2 no page error', A.errors.length === 0, A.errors.join(' | '));
|
|
128
|
+
await shot(p, 'docs-tender-1440');
|
|
129
|
+
await A.ctx.close();
|
|
130
|
+
|
|
131
|
+
const O = await open({ store: OLD });
|
|
132
|
+
const vo = O.up ? await view(O.page) : null;
|
|
133
|
+
ok('D3 a Risks issued before the switch is kept, under Other documents', vo && vo.groups.includes('Other documents') && /Risks/.test(vo.text), JSON.stringify(vo && vo.groups));
|
|
134
|
+
await shot(O.page, 'docs-tender-other-1440');
|
|
135
|
+
await O.ctx.close();
|
|
136
|
+
|
|
137
|
+
const N = await open({ w: 390, h: 844, theme: 'dark' });
|
|
138
|
+
const vn = N.up ? await view(N.page) : null;
|
|
139
|
+
const over = N.up ? await N.page.evaluate(() => document.documentElement.scrollWidth > innerWidth + 1) : true;
|
|
140
|
+
ok('D4 at 390 px in dark the same stage groups, no sideways scroll', vn && vn.groups[0] === 'Requirements · now' && !over, JSON.stringify(vn && vn.groups));
|
|
141
|
+
await shot(N.page, 'docs-tender-390-dark');
|
|
142
|
+
await N.ctx.close();
|
|
143
|
+
return finish();
|
|
144
|
+
})();
|
|
@@ -36,6 +36,19 @@ Press a program's name on the Board to open its panel. Home links to it with `?p
|
|
|
36
36
|
- After **Turn into a program**, a card counts the tasks that have no level yet. Press the arrow to ask Claude in Home to suggest a level for each task.
|
|
37
37
|
- The tabs are **Tree**, **Tasks**, **Milestones** and **Documents**. The panel has no chat box: use Home to talk about the program.
|
|
38
38
|
|
|
39
|
+
## Claude suggests milestones
|
|
40
|
+
|
|
41
|
+
Claude suggests milestones for a program and checks them again when something changes. Claude never writes a milestone without you.
|
|
42
|
+
|
|
43
|
+
- A new program with no milestones shows Claude's first suggestions where the track would be. Each row says why and where the idea comes from, for example the ◆ Deliver dates of its initiatives, a task or the steering notes.
|
|
44
|
+
- Later changes show as rows in **Waits on you**: add, move, rename, drop or mark at risk. Home's **Your move** has one line for each program with changes.
|
|
45
|
+
- Press **✓** to keep a change. The charter saves it at once.
|
|
46
|
+
- Press the pencil to open the charter with the change filled in. Change it, then press **Save**.
|
|
47
|
+
- Press **✕** to drop a change. Claude does not suggest it again unless its source changes.
|
|
48
|
+
- Claude checks when a program is new, when an initiative joins or leaves, when a ◆ date moves, when a milestone's date comes, and every Monday from 09:00, inside your working hours. When nothing changed, nothing new shows.
|
|
49
|
+
- The charter says when Claude last checked. Press the refresh icon beside it to check now.
|
|
50
|
+
- The review is a background run. It reads the initiatives' records, plan items and meeting notes, and Jira where your Claude Code settings allow it. Its only write is `pmos program suggest`, which files a suggestion for you to keep, change or drop. `PMOS_MS_REVIEW=off` turns the review off.
|
|
51
|
+
|
|
39
52
|
## Side panels
|
|
40
53
|
|
|
41
54
|
On a desktop, the initiative panel and the program panel use 60 % of the width. Drag the grip on the panel's edge to set a width from 50 % to 70 %. The Board remembers the width. On a phone, a panel opens as a sheet.
|