create-pmos 0.778.0 → 0.779.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 +22 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +21 -0
- package/workspace/guide/agent-capabilities.md +3 -2
- package/workspace/guide/cli.md +1 -0
- package/workspace/guide/settings-and-switches.md +1 -1
- package/workspace/lib/grill-runs.js +1 -1
- package/workspace/lib/job-graph.js +4 -0
- package/workspace/lib/orchestrator-keeprate.js +3 -2
- package/workspace/lib/report-readers.js +216 -0
- package/workspace/lib/settings-store.js +3 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/grill-words.js +6 -2
- package/workspace/public/pm/readonly.js +2 -2
- package/workspace/server.js +3 -0
- package/workspace/test-lists/report-reader-review.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.779.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,27 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.779.0",
|
|
38
|
+
"at": "2026-11-24T15:18:38.678Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1743,
|
|
43
|
+
"t": "PMOS reads each report draft as the CFO, engineer and sceptic, questions under the ✦",
|
|
44
|
+
"s": "PMOS reads each report draft as the CFO, engineer and sceptic, questions under the ✦",
|
|
45
|
+
"k": "new",
|
|
46
|
+
"h": "PMOS reads each report draft as the CFO, engineer and sceptic, questions under the ✦",
|
|
47
|
+
"try": {
|
|
48
|
+
"steps": [
|
|
49
|
+
"Open Library and draft a report (or ask the chat: draft the weekly report)",
|
|
50
|
+
"Wait about a minute, then open Work and the ✦ on an initiative the report covers"
|
|
51
|
+
],
|
|
52
|
+
"see": "The ✦ lists up to 6 questions such as 'CFO asks: What does a slip of the cutover cost?', each quoting the report, with the smallest fix as its next step"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
36
57
|
{
|
|
37
58
|
"v": "0.778.0",
|
|
38
59
|
"at": "2026-11-24T14:17:30.065Z",
|
|
@@ -427,19 +448,6 @@
|
|
|
427
448
|
}
|
|
428
449
|
}
|
|
429
450
|
]
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
"v": "0.759.0",
|
|
433
|
-
"at": "2026-11-24T02:32:35.299Z",
|
|
434
|
-
"f": 4,
|
|
435
|
-
"prs": [
|
|
436
|
-
{
|
|
437
|
-
"n": 1710,
|
|
438
|
-
"t": "Workflows stage panel follows the picked workspace; a removed pick never opens on a 404",
|
|
439
|
-
"s": "Workflows stage panel follows the picked workspace; a removed pick never opens on a 404",
|
|
440
|
-
"k": "fix"
|
|
441
|
-
}
|
|
442
|
-
]
|
|
443
451
|
}
|
|
444
452
|
]
|
|
445
453
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-24T15:18:35Z"}
|
|
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-24T15:18:35Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-24T15:18:35Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.779.0",
|
|
4
|
+
"at": "2026-11-24T15:18:38.678Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1743,
|
|
9
|
+
"t": "PMOS reads each report draft as the CFO, engineer and sceptic, questions under the ✦",
|
|
10
|
+
"s": "PMOS reads each report draft as the CFO, engineer and sceptic, questions under the ✦",
|
|
11
|
+
"k": "new",
|
|
12
|
+
"h": "PMOS reads each report draft as the CFO, engineer and sceptic, questions under the ✦",
|
|
13
|
+
"try": {
|
|
14
|
+
"steps": [
|
|
15
|
+
"Open Library and draft a report (or ask the chat: draft the weekly report)",
|
|
16
|
+
"Wait about a minute, then open Work and the ✦ on an initiative the report covers"
|
|
17
|
+
],
|
|
18
|
+
"see": "The ✦ lists up to 6 questions such as 'CFO asks: What does a slip of the cutover cost?', each quoting the report, with the smallest fix as its next step"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
2
23
|
{
|
|
3
24
|
"v": "0.778.0",
|
|
4
25
|
"at": "2026-11-24T14:17:30.065Z",
|
|
@@ -115,6 +115,7 @@ A loop never sends a message, moves a Jira ticket, merges into a product reposit
|
|
|
115
115
|
| [New dates, done and tidy names](claude-proposes.md) | Each morning, and when a date passes | The tasks of the initiative, and the evidence that work happened | The initiative's ✦ | `PMOS_PROPOSE=off` |
|
|
116
116
|
| [Grill](claude-proposes.md) | Before an initiative leaves a stage, when a forecast turns at risk, when scope or dates move a lot, and once a month on running work with late work. Also when you write "grill this" in the initiative's chat. | The initiative, your stored research, your meeting notes and the decisions that stand | "PMOS grilled it" under the initiative's ✦ | Settings › Checks: Off. `PMOS_GRILL=off` |
|
|
117
117
|
| [You decided this before](claude-proposes.md) | You add an initiative that repeats an earlier decision | `DECISIONS.md`, the decision records, the PM journal, `planning/out-of-scope/` and the initiative records | The initiative's ✦ | `pmos ai off past-repeat` |
|
|
118
|
+
| [Report readers](claude-proposes.md) | A report draft is written | The draft, read as the CFO, the engineering lead and the sceptic | The ✦ of each initiative the question quotes | `pmos ai off report-readers` |
|
|
118
119
|
| [Initiative descriptions](claude-proposes.md) | Once a day. At most 3 drafts a day for each product. | The PRD's first Problem or Why paragraph, or the record's own first paragraph | "Description" under the initiative's ✦ | `pmos ai off descriptions`. `PMOS_DESCRIPTIONS=off` |
|
|
119
120
|
| [Expected outcomes](claude-proposes.md) | Once a day. At most 3 drafts a day for each product. When a check date passes: the verdict, from the goal's reading or one short run. | The PRD's success criteria, or the anchored key result. For a verdict: the goal's reading, or the lines the run cites | "Expected outcome" under the initiative's ✦. A verdict is recorded with Undo. Your move when PMOS cannot tell. | `pmos ai off outcomes`. `PMOS_OUTCOMES=off` |
|
|
120
121
|
| [Metric drafts](claude-proposes.md) | A product with no North Star, the first 14 days of a quarter, a program with no goal, and an initiative that gets a PRD | The last 8 weeks of real readings | The page of that product, program or initiative | `PMOS_METRIC_DRAFT=off` |
|
|
@@ -164,7 +165,7 @@ When you ask an agent session to do a piece of work, it can finish it, including
|
|
|
164
165
|
- `pmos ai log [<job>]`: the last audit lines. Each dropped proposal shows why.
|
|
165
166
|
- `pmos ai off [<job>]` and `pmos ai on [<job>]`: turn every AI job, or one job, off or on. `PMOS_AI=off` in the environment wins over the setting.
|
|
166
167
|
|
|
167
|
-
The AI jobs are `past-repeat`, `decision-memory`, `outcomes`, `descriptions`, `drift`, `rehearse`, `next-prompt`, `sharpen-prompt`, `idle-lab` and `live-round` (`pmos ai off live-round` stops new live rounds; one that runs ends by itself). The switch also covers each job in the queue by its queue name: `schedules`, `proactive`, `prepare`, `day`, `refresh`, `reports`, `meeting-prewarm`, `driver`, `goal-loops`, `finder`, `coredocs`, `milestones`, `propose`, `grill`, `metric-drafts`, `impact`, `metric-reads`, `forecast`, `report-design`, `report-structure`, `team`, `scan` and `idle-lab`. `pmos ai off` with no job stops all of them. Git sync uses no model, so the switch does not stop it. A background run cannot change the switch.
|
|
168
|
+
The AI jobs are `past-repeat`, `report-readers`, `decision-memory`, `outcomes`, `descriptions`, `drift`, `rehearse`, `next-prompt`, `sharpen-prompt`, `idle-lab` and `live-round` (`pmos ai off live-round` stops new live rounds; one that runs ends by itself). The switch also covers each job in the queue by its queue name: `schedules`, `proactive`, `prepare`, `day`, `refresh`, `reports`, `meeting-prewarm`, `driver`, `goal-loops`, `finder`, `coredocs`, `milestones`, `propose`, `grill`, `metric-drafts`, `impact`, `metric-reads`, `forecast`, `report-design`, `report-structure`, `team`, `scan` and `idle-lab`. `pmos ai off` with no job stops all of them. Git sync uses no model, so the switch does not stop it. A background run cannot change the switch.
|
|
168
169
|
|
|
169
170
|
## The team of role agents
|
|
170
171
|
|
|
@@ -240,7 +241,7 @@ What each part does:
|
|
|
240
241
|
- **What the canvas can do.** The prototype runs in a sandboxed frame. It cannot reach PMOS. The canvas talks to it only to show a screen, point, pin, play and apply your edits.
|
|
241
242
|
- **Your prototype rules.** After a version renders and before it opens, PMOS checks it against your prototype rules: no device or browser frame, no instructions on the screen, no sample copy, and each rule PMOS learns from your corrections. When a correction is true of every prototype (for example "no device frame"), the chat adds it as a rule (`pmos lab rule add`). PMOS keeps a rule only when it fails a bad example and passes a good one, so a button such as "See the week" is never read as an instruction. A change to one version ("make the alert orange") or a taste ("calmer") never becomes a rule. A version that breaks a rule gets one fix run, given only the lines that broke it. You see only the fixed version, with one quiet line: "PMOS fixed 3 things before showing you this." When the fix does not reach a rule, the version still opens and the line names the rule it breaks. When nothing was fixed, there is no line. Settings › Prototype rules lists the rules with Undo.
|
|
242
243
|
- **The design critic.** After the prototype rules, a separate read-only session reads the version's desk and phone screenshots and its page against every standing design rule of your product. Each rule is a named check: each numbered principle in your design principles and each rule in your `design-rules.json`. A finding must name the rule it breaks, so the critic reports broken rules, not taste. Its findings go into the same one fix run. After the fix it reads only those rules again, so "PMOS fixed n things" is never claimed unchecked. A critic that cannot run never holds the version. `pmos lab critic` runs it on any screenshots, and `PMOS_CRITIC=off` turns it off.
|
|
243
|
-
- **The sceptical reviewer.** Before you share a document, the chat's agent runs `pmos critic <file>`: a separate read-only session reads it as a sceptical reviewer and lists at most 3 hard questions. Each names its lens, quotes the document and gives the smallest fix; a question whose quote is not in the document is dropped. For a report or an update that goes to leadership, it runs `pmos critic <file> --as all`: the same pass reads it as the CFO (cost, return, the cost of a slip), the engineering lead (can it be built as written, what it waits on, who builds it) and the sceptic, at most 2 questions each. `pmos critic stats` shows how many you called real, for each reader, and the gaps that repeat across documents.
|
|
244
|
+
- **The sceptical reviewer.** Before you share a document, the chat's agent runs `pmos critic <file>`: a separate read-only session reads it as a sceptical reviewer and lists at most 3 hard questions. Each names its lens, quotes the document and gives the smallest fix; a question whose quote is not in the document is dropped. For a report or an update that goes to leadership, it runs `pmos critic <file> --as all`: the same pass reads it as the CFO (cost, return, the cost of a slip), the engineering lead (can it be built as written, what it waits on, who builds it) and the sceptic, at most 2 questions each. `pmos critic stats` shows how many you called real, for each reader, and the gaps that repeat across documents. PMOS also does this by itself for every report draft: once a draft is written, the same pass reads it as all three readers, and each question that quotes an initiative's part of the report shows under that initiative's ✦ as "CFO asks: …", with the smallest fix as its next step (✓ adds it as a task, ✕ drops it). The same text is read once. `pmos ai off report-readers` stops it.
|
|
244
245
|
- **No time limit.** A version takes as long as the ask needs. While PMOS makes it, the Viewer shows what it is doing now (for example "Building screen 3 of 7"), the steps done, a progress bar and the time so far, with a Stop press. A run that writes nothing for 10 minutes is stuck: PMOS stops it. A version that does not render, that is stuck or that you stop is "not made" with the reason, and the chat says so. The Viewer still opens it: it says why and shows the version it was made from. While a version is being made, a new ask on the same initiative waits: PMOS says what is running.
|
|
245
246
|
- **Lessons.** Each change sentence, ✓ and ✕ is a Lessons line of the experiment (`pmos artefacts show`). Each version that rendered is a Specimens line. The one you keep is the kept specimen.
|
|
246
247
|
- **The grill runs after the session, not during it.** When you keep a version, the grill runs once on the kept specimen, as the Review step. Its findings wait under the ✦ (D60 as amended on 2026-11-17).
|
package/workspace/guide/cli.md
CHANGED
|
@@ -877,6 +877,7 @@ The benchmark needs a signed-in agent CLI. It never pushes and never opens a pul
|
|
|
877
877
|
- `pmos jira criteria-ask <initiative> [KEY …]` says yes to them. Tickets assigned to you get the criteria in Jira; the others go to the draft for their owners.
|
|
878
878
|
- `pmos jira criteria-asks [--direct|--draft|--health]` lists the criteria asks that wait for Jira, prints the draft by owner, or prints the health number.
|
|
879
879
|
- `pmos jira criteria-done <ask id>` or `--refused "<why>"` records the answer for one criteria ask.
|
|
880
|
+
- `pmos jira criteria-reach [--count]`: how many open tickets get acceptance criteria, from the done test and from the initiative's files.
|
|
880
881
|
- `pmos jira criteria <initiative>`: the done-test checks each ticket carries as acceptance criteria, and the checks on no ticket
|
|
881
882
|
- `pmos jira digest [--since <YYYY-MM-DD or time>]`: what moved in the tracker since the last working day, who moved it, the moved tickets with no task in PMOS, and what is worth a question (blocked, reopened, nobody assigned, stuck, not in the last read). It reads only the stored Jira reads. The daily Jira read also asks Jira for every status change in the projects PMOS reads, so a ticket no initiative or task names is in the digest too, under "Not in PMOS yet".
|
|
882
883
|
|
|
@@ -120,7 +120,7 @@ An "off" switch accepts `off`, `0`, `false` or `no` unless the row says a differ
|
|
|
120
120
|
|---|---|---|---|
|
|
121
121
|
| `PMOS_HEADLESS` | `off` sends every background job back to a terminal pane. | on | — |
|
|
122
122
|
| `PMOS_AI` | `off` turns every AI job off (the kill switch of [what agents may do](agent-capabilities.md)). | on | `pmos ai off` (the `ai.on` setting) |
|
|
123
|
-
| `PMOS_AI_<JOB>` | `off` turns one AI job off. The names are `PMOS_AI_PAST_REPEAT`, `PMOS_AI_DECISION_MEMORY`, `PMOS_AI_OUTCOMES`, `PMOS_AI_DESCRIPTIONS`, `PMOS_AI_DRIFT`, `PMOS_AI_REHEARSE`, `PMOS_AI_NEXT_PROMPT`, `PMOS_AI_SHARPEN_PROMPT` and `PMOS_AI_IDLE_LAB`. | on | `pmos ai off <job>` (the `ai.off` setting) |
|
|
123
|
+
| `PMOS_AI_<JOB>` | `off` turns one AI job off. The names are `PMOS_AI_PAST_REPEAT`, `PMOS_AI_REPORT_READERS`, `PMOS_AI_DECISION_MEMORY`, `PMOS_AI_OUTCOMES`, `PMOS_AI_DESCRIPTIONS`, `PMOS_AI_DRIFT`, `PMOS_AI_REHEARSE`, `PMOS_AI_NEXT_PROMPT`, `PMOS_AI_SHARPEN_PROMPT` and `PMOS_AI_IDLE_LAB`. | on | `pmos ai off <job>` (the `ai.off` setting) |
|
|
124
124
|
| `PMOS_CRITIC` | `off` stops the design critic and the sceptical reviewer: no critic reads a prototype version before it opens, and `pmos lab critic` and `pmos critic` refuse. The prototype rules still run. | on | — |
|
|
125
125
|
| `PMOS_AUTONOMY` | `off` stops every change PMOS applies by itself (D106) and every goal loop; proposals still wait for your ✓. | on | `pmos ai off` |
|
|
126
126
|
| `PMOS_BUILD_SANDBOX` | `docker` or `podman` runs `pmos build check` in a container with no network (the image is `check.image` in `pmos/factory.json`). Without it the check runs in the worktree, and only you can run it. | off | — |
|
|
@@ -106,7 +106,7 @@ function create(deps) {
|
|
|
106
106
|
const row = (deps.rowOf && deps.rowOf(w, ini)) || {};
|
|
107
107
|
const lines = PR.readLines(PR.ledgerFile(dir)), P = PR.fold(lines), kept = PR.keptIds(P);
|
|
108
108
|
// the learning edge (OS evaluation T1): the last 3 reasons the PM gave this job on this initiative, ✕ why and ✎ rewrites
|
|
109
|
-
const lessons = PR.lessonsOf(lines, { ini, match: (p) => p.group === 'grill' && p.type !== 'past' && p.type !== 'decision', n: 3, wide: true });
|
|
109
|
+
const lessons = PR.lessonsOf(lines, { ini, match: (p) => p.group === 'grill' && p.type !== 'past' && p.type !== 'decision' && p.type !== 'reader', n: 3, wide: true });
|
|
110
110
|
const mine = [...P.props.values()].filter((p) => p.ini === ini && p.group === 'grill');
|
|
111
111
|
const dropped = mine.filter((p) => P.drops.has(PR.sigOf(p))).slice(0, 20).map((p) => one(p.title, 120));
|
|
112
112
|
const open = mine.filter((p) => !P.drops.has(PR.sigOf(p)) && !kept.has(p.id)).slice(0, 20).map((p) => one(p.title, 120));
|
|
@@ -45,6 +45,9 @@ const LEDGERS = Object.freeze({
|
|
|
45
45
|
'<runtime>/grill-runs.jsonl': { concept: 'grill-spend', owner: 'lib/grill.js', readers: [
|
|
46
46
|
r('lib/bg-queue.js', 'grill-runs.jsonl', 'the spend limit that holds step 5'),
|
|
47
47
|
r('lib/routes-grill.js', null, "Settings › PMOS's checks: this month's spend")] },
|
|
48
|
+
'<runtime>/spec-critic.jsonl': { concept: 'critic-runs', owner: 'lib/spec-critic.js', readers: [
|
|
49
|
+
r('lib/critic-cli.js', 'SC.stats', '`pmos critic stats` and `pmos critic show`: each pass, its readers and the PM\'s real or noise labels'),
|
|
50
|
+
r('lib/report-readers.js', 'SC.latest', 'a report draft whose text was already read is not read again')] },
|
|
48
51
|
'<runtime>/goal-loops.jsonl': { concept: 'goal-loops', owner: 'lib/goal-loop.js', readers: [
|
|
49
52
|
r('lib/loop-cli.js', null, '`pmos loop status`: each goal, its round and its state')] },
|
|
50
53
|
'<state>/autonomy.jsonl': { concept: 'autonomy', owner: 'lib/autonomy.js', readers: [
|
|
@@ -167,6 +170,7 @@ const JOBS = Object.freeze([
|
|
|
167
170
|
q('live-round', 'lib/live-round.js', [props], [props], 'step 1: the PM\'s ✓ or `pmos lab round` starts it at once; three runs, each file proven before it shows; it also adds Specimens and Lessons lines (lib/artefacts.js)'),
|
|
168
171
|
q('meeting-prewarm', 'lib/live-round-meeting.js', ['<runtime>/idle-lab/meeting-prewarm.jsonl'], [props, 'calendar', '<runtime>/meeting-material.jsonl'], 'round 1 itself is filed by lib/live-round.js (W1)'),
|
|
169
172
|
ai('past-repeat', 'lib/past-repeat.js', [props], ['repo:DECISIONS.md']),
|
|
173
|
+
ai('report-readers', 'lib/report-readers.js', [props, '<runtime>/spec-critic.jsonl'], ['report drafts']), // report-reader-review: each report draft read as the CFO, the engineer and the sceptic
|
|
170
174
|
ai('decision-memory', 'lib/decision-memory.js', [props], ['repo:DECISIONS.md']),
|
|
171
175
|
ai('outcomes', 'lib/outcome-props.js', [props, '<state>/outcome-runs.jsonl'], ['initiative records', 'repo:planning/runs/outcome_checks.jsonl', '<state>/metric-reads.jsonl']),
|
|
172
176
|
ai('descriptions', 'lib/description-props.js', [props], ['initiative records']),
|
|
@@ -75,6 +75,7 @@ const JOBS = Object.freeze([
|
|
|
75
75
|
{ job: 'grill', label: 'Grill' },
|
|
76
76
|
{ job: 'past-repeat', label: 'You decided this before' },
|
|
77
77
|
{ job: 'decision-memory', label: 'Decision memory' },
|
|
78
|
+
{ job: 'report-readers', label: 'Report readers' },
|
|
78
79
|
{ job: 'descriptions', label: 'Descriptions' },
|
|
79
80
|
{ job: 'outcomes', label: 'Expected outcomes' },
|
|
80
81
|
{ job: 'idle-lab', label: 'Idle lab' },
|
|
@@ -82,10 +83,10 @@ const JOBS = Object.freeze([
|
|
|
82
83
|
]);
|
|
83
84
|
const GROUP_JOB = { found: 'found-elsewhere', dates: 'dates', status: 'looks-done', names: 'names', description: 'descriptions', outcome: 'outcomes',
|
|
84
85
|
prototyped: 'idle-lab', improved: 'idle-lab', scanned: 'idle-lab' };
|
|
85
|
-
/** The ✦ job of a proposal { group, type }: a grill finding of type past or
|
|
86
|
+
/** The ✦ job of a proposal { group, type }: a grill finding of type past, decision or reader is its own job. null: not a ✦ job. */
|
|
86
87
|
function jobOf(p) {
|
|
87
88
|
if (!p) return null;
|
|
88
|
-
if (p.group === 'grill') return p.type === 'past' ? 'past-repeat' : p.type === 'decision' ? 'decision-memory' : 'grill';
|
|
89
|
+
if (p.group === 'grill') return p.type === 'past' ? 'past-repeat' : p.type === 'decision' ? 'decision-memory' : p.type === 'reader' ? 'report-readers' : 'grill';
|
|
89
90
|
// the live round (lib/live-round.js): its ✦ ask, and a round it made (data.live), are its own job, apart from the idle lab
|
|
90
91
|
if (p.group === 'live' || ((p.group === 'prototyped' || p.group === 'improved') && p.data && p.data.live)) return 'live-round';
|
|
91
92
|
return GROUP_JOB[p.group] || null;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* report-readers.js — PMOS reads each report draft as the CFO, the engineering lead and the sceptic, by itself, and files their questions
|
|
3
|
+
* under the blue ✦ of the initiatives the report covers (initiative report-reader-review; bet A110 on the A330 critic).
|
|
4
|
+
*
|
|
5
|
+
* WHY. `pmos critic <file> --as all` (lib/spec-critic.js, initiatives spec-critic and review-lenses-cfo-engineer-sceptic) asks a report the
|
|
6
|
+
* questions its readers will ask, but only when the chat is told the PM is about to share it, and only in a terminal. The A110 proof found an
|
|
7
|
+
* unanswered reader question in all 15 reader reviews of 5 real reports. PMOS acts by itself: no run button, the findings are ✦ proposals.
|
|
8
|
+
*
|
|
9
|
+
* WHEN IT RUNS. After every report draft this process writes (lib/report-draft.js onDraftWritten: Draft now, Redraft, a schedule). One
|
|
10
|
+
* read-only session through the spec critic's ask path (kind `ask`), with every reader. The same text is read once: a run on the same file and
|
|
11
|
+
* the same text (spec-critic.jsonl) starts none. Off: Settings `critic.reports` off, PMOS_CRITIC=off, or the AI kill switch for job
|
|
12
|
+
* `report-readers` (PMOS_AI_REPORT_READERS=off, `pmos ai off report-readers`). Wawan said yes to a run on every draft on 2026-11-24.
|
|
13
|
+
*
|
|
14
|
+
* WHAT IT FILES. Each question whose quote sits in one initiative's block of the report (`### Title (id)` under `## Initiatives`, or a Timeline
|
|
15
|
+
* row whose first cell is one block's title) becomes one proposal under that initiative's ✦: lib/proposals.js group `grill`, type `reader`, section `check` (its
|
|
16
|
+
* own ✓, never Keep all). Title "CFO asks: <question>", why the quoted line, next step the smallest fix (✓ adds it as a task). Every proposal
|
|
17
|
+
* passes lib/ai-guard.js first: its quote must be at its `<report>:<line>`. A question that quotes no block stays in the critic ledger only.
|
|
18
|
+
*
|
|
19
|
+
* blockOf(text) PURE → [id | null] per line (index 0 = line 1)
|
|
20
|
+
* lineOf(lines, quote) PURE → the 1-based line the quote starts near, or 0
|
|
21
|
+
* proposalsOf({ text, rel, cadence, questions }) PURE → the guard's proposals, each with data.ini
|
|
22
|
+
* grillProp(p) the lib/proposals.js `propose` fields for one guarded proposal
|
|
23
|
+
* cases() · replayRoot() the replay (a recorded critic answer, never the model)
|
|
24
|
+
* file({ root, rel, cadence, dir, runtime, ask, ws?, board?, env?, guard? }) → Promise<{ filed, dropped, skipped?, off?, held? }>
|
|
25
|
+
* attach(ctxFactory) hook onDraftWritten once; ctx: { workspaceList, stateDirFor, runtimeDir, spawnScheduled|spawnSession, boardOf? }
|
|
26
|
+
* filedCount(dir) reader proposals in a state folder (the health number; `node lib/report-readers.js filed`)
|
|
27
|
+
*/
|
|
28
|
+
const fs = require('fs');
|
|
29
|
+
const path = require('path');
|
|
30
|
+
const crypto = require('crypto');
|
|
31
|
+
const SC = require('./spec-critic.js');
|
|
32
|
+
const G = require('./grill.js');
|
|
33
|
+
const PR = require('./proposals.js');
|
|
34
|
+
|
|
35
|
+
const JOB = 'report-readers';
|
|
36
|
+
const VERSION = '1';
|
|
37
|
+
const MAX = 6;
|
|
38
|
+
const SETTING = 'critic.reports';
|
|
39
|
+
const one = (v, n) => String(v == null ? '' : v).replace(/\s+/g, ' ').trim().slice(0, n);
|
|
40
|
+
const norm = (s) => String(s == null ? '' : s).toLowerCase().replace(/\s+/g, ' ').trim();
|
|
41
|
+
const hash = (s) => crypto.createHash('sha1').update(String(s)).digest('hex').slice(0, 10);
|
|
42
|
+
const ASKS = { cfo: 'CFO asks', engineer: 'Engineer asks', sceptic: 'Sceptic asks' };
|
|
43
|
+
|
|
44
|
+
/** PURE. The initiative block each line sits in. Outside the blocks, a table row whose first cell is one block's title gets that block. */
|
|
45
|
+
function blockOf(text) {
|
|
46
|
+
const L = String(text || '').split('\n');
|
|
47
|
+
const out = new Array(L.length).fill(null);
|
|
48
|
+
const titles = new Map();
|
|
49
|
+
let inInis = false, cur = null;
|
|
50
|
+
L.forEach((l, i) => {
|
|
51
|
+
if (/^##\s/.test(l)) { inInis = /^##\s+Initiatives\s*$/i.test(l); cur = null; return; }
|
|
52
|
+
const m = inInis && /^###\s+(.+?)\s+\(([A-Za-z0-9._-]{1,80})\)\s*$/.exec(l);
|
|
53
|
+
if (m) { cur = m[2]; titles.set(m[2], m[1].trim()); }
|
|
54
|
+
if (inInis) out[i] = cur;
|
|
55
|
+
});
|
|
56
|
+
// outside the blocks, only a table row whose first cell is one block's title (the Timeline): prose that names a title, such as the
|
|
57
|
+
// headline, may be about something else, so it is never filed on that initiative
|
|
58
|
+
L.forEach((l, i) => {
|
|
59
|
+
if (out[i]) return;
|
|
60
|
+
const m = /^\|\s*([^|]+?)\s*\|/.exec(l);
|
|
61
|
+
if (!m) return;
|
|
62
|
+
const hit = [...titles].filter(([, t]) => norm(t) === norm(m[1]));
|
|
63
|
+
if (hit.length === 1) out[i] = hit[0][0];
|
|
64
|
+
});
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** PURE. The 1-based line a quote sits at (the quote may run over up to 3 lines), or 0. */
|
|
69
|
+
function lineOf(lines, quote) {
|
|
70
|
+
const q = norm(quote);
|
|
71
|
+
if (!q) return 0;
|
|
72
|
+
for (let i = 0; i < lines.length; i++) if (norm(lines[i]).includes(q)) return i + 1;
|
|
73
|
+
for (let i = 0; i < lines.length; i++) if (norm(lines.slice(i, i + 3).join(' ')).includes(q)) return i + 1;
|
|
74
|
+
return 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** PURE. Critic questions → the guard's proposals. rel: the report, repository-relative. */
|
|
78
|
+
function proposalsOf({ text, rel, cadence = '', questions } = {}) {
|
|
79
|
+
const lines = String(text || '').split('\n');
|
|
80
|
+
const blocks = blockOf(text);
|
|
81
|
+
const out = [];
|
|
82
|
+
for (const q of Array.isArray(questions) ? questions : []) {
|
|
83
|
+
if (out.length >= MAX) break;
|
|
84
|
+
if (!q || !q.quote || !q.question) continue;
|
|
85
|
+
const at = lineOf(lines, q.quote);
|
|
86
|
+
const ini = at ? blocks[at - 1] : null;
|
|
87
|
+
if (!ini) continue;
|
|
88
|
+
const reader = ASKS[q.reader] ? q.reader : 'sceptic';
|
|
89
|
+
const key = [cadence, reader, q.lens].join('|');
|
|
90
|
+
out.push({
|
|
91
|
+
id: 'rr-' + hash([ini, key].join('|')),
|
|
92
|
+
title: one(q.question, 140),
|
|
93
|
+
say: one(`"${one(q.quote, 160)}"${q.why ? ' ' + q.why : ''}`, 300),
|
|
94
|
+
confidence: 'medium',
|
|
95
|
+
claims: [{ text: one(q.question, 300), sources: [{ label: one(`${path.basename(String(rel || 'report'))} · ${q.lens}`, 80), ref: `${rel}:${at}`, quote: q.quote }] }],
|
|
96
|
+
data: { ini, reader, lens: one(q.lens, 40), key, next: one(q.fix || 'Answer it in the report before it is sent', 140) },
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return out;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** The lib/proposals.js `propose` fields for one guarded proposal (group grill, type reader). */
|
|
103
|
+
function grillProp(p) {
|
|
104
|
+
const d = p.data || {};
|
|
105
|
+
const src = (p.claims[0] && p.claims[0].sources[0]) || {};
|
|
106
|
+
return {
|
|
107
|
+
id: G.idOf(d.ini, 'reader', d.key), group: 'grill', type: 'reader', section: 'check',
|
|
108
|
+
title: one((ASKS[d.reader] || 'Sceptic asks') + ': ' + p.title, 200),
|
|
109
|
+
why: one(p.say + ' Next: ' + d.next, 460),
|
|
110
|
+
sources: [{ label: one(src.label || 'the report', 80), ref: one(src.ref, 500) }],
|
|
111
|
+
items: [], data: { angle: 'reader', reader: d.reader, lens: d.lens, next: d.next, rank: d.reader === 'sceptic' ? 4 : 3 },
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* The replay: a recorded critic answer on a fixture report. A question in a block is filed; one that quotes the headline is not. */
|
|
116
|
+
const FIXTURE_REL = 'planning/reports/weekly/2026-11-20.md';
|
|
117
|
+
const FIXTURE = ['---', 'type: Reference', 'title: "Weekly report 2026-11-20"', '---', '', '## Headline', '', 'Sign-in work is on track for the March cutover.', '',
|
|
118
|
+
'## Initiatives', '', '### Move sign-in to the new provider (ciam-cutover)', '', 'Stage: Build · On track · 4 of 9', '',
|
|
119
|
+
'Cutover planned for 15 or 30 March 2026, load tests to follow.', ''].join('\n');
|
|
120
|
+
const RECORDED = [
|
|
121
|
+
{ reader: 'cfo', lens: 'cost-of-delay', question: 'What does a slip of the cutover cost?', quote: 'Cutover planned for 15 or 30 March 2026', why: 'No cost is named.', fix: 'Add the cost of a two-week slip next to the date' },
|
|
122
|
+
{ reader: 'sceptic', lens: 'evidence', question: 'What says it is on track?', quote: 'Sign-in work is on track for the March cutover', why: '', fix: 'Name the reading' },
|
|
123
|
+
];
|
|
124
|
+
let fixtureRoot = null;
|
|
125
|
+
function replayRoot() {
|
|
126
|
+
if (fixtureRoot && fs.existsSync(fixtureRoot)) return fixtureRoot;
|
|
127
|
+
fixtureRoot = fs.mkdtempSync(path.join(require('os').tmpdir(), 'pmos-report-readers-replay-'));
|
|
128
|
+
const p = path.join(fixtureRoot, FIXTURE_REL);
|
|
129
|
+
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
130
|
+
fs.writeFileSync(p, FIXTURE);
|
|
131
|
+
return fixtureRoot;
|
|
132
|
+
}
|
|
133
|
+
function cases() {
|
|
134
|
+
return [{ name: 'a reader question in an initiative block is filed; one outside every block is not', run: async () => proposalsOf({ text: FIXTURE, rel: FIXTURE_REL, cadence: 'weekly', questions: RECORDED }),
|
|
135
|
+
expect: { filed: 1, cites: [FIXTURE_REL] } }];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function guardOf() { try { return require('./ai-guard.js'); } catch { return null; } }
|
|
139
|
+
function settingOff(runtime) {
|
|
140
|
+
if (!runtime) return false;
|
|
141
|
+
try { return require('./settings-store.js').get(runtime, SETTING) === 'off'; } catch { return false; }
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** One reader review of one report draft. dir: the workspace's PMOS state folder (proposals.jsonl); runtime: the per-user folder. */
|
|
145
|
+
async function file({ root, rel, cadence = '', dir, runtime, ask, ws = '', board = '', env = process.env, guard = guardOf(), now = Date.now() } = {}) {
|
|
146
|
+
if (SC.off(env)) return { filed: [], dropped: [], off: 'the critic is off (PMOS_CRITIC=off)' };
|
|
147
|
+
if (settingOff(runtime)) return { filed: [], dropped: [], off: `Settings ${SETTING} is off` };
|
|
148
|
+
if (!guard) return { filed: [], dropped: [], off: 'the AI guardrail (lib/ai-guard.js) is not installed' };
|
|
149
|
+
if (!root || !rel || !dir) return { filed: [], dropped: [], off: 'no report or no PMOS state folder' };
|
|
150
|
+
const gdir = runtime || dir;
|
|
151
|
+
const stop = guard.off(JOB, { env, settingsDir: runtime || null });
|
|
152
|
+
if (stop) return { filed: [], dropped: [], off: stop };
|
|
153
|
+
const abs = path.resolve(root, rel);
|
|
154
|
+
let raw = '';
|
|
155
|
+
try { raw = fs.readFileSync(abs, 'utf8'); } catch { return { filed: [], dropped: [], off: 'the report could not be read' }; }
|
|
156
|
+
const text = SC.textOf(raw, abs);
|
|
157
|
+
const prev = runtime ? SC.latest(runtime, abs) : null;
|
|
158
|
+
if (prev && prev.ok && prev.sha === SC.sha(text)) return { filed: [], dropped: [], skipped: 'this text was read already' };
|
|
159
|
+
if (!guard.ready(gdir, JOB, VERSION)) {
|
|
160
|
+
const rp = await guard.replay(JOB, VERSION, cases(), { root: replayRoot(), stateDir: gdir, max: MAX });
|
|
161
|
+
if (!rp.ok) return { filed: [], dropped: [], held: true };
|
|
162
|
+
}
|
|
163
|
+
const K = SC.lensesFor(root, { as: 'all' });
|
|
164
|
+
const r = await SC.critique(ask, { lenses: K.lenses, text: raw, file: abs });
|
|
165
|
+
if (runtime) SC.record(runtime, { from: 'report', ws, file: abs, sha: SC.sha(text), chars: text.length, lenses: r.lenses || [], readers: K.readers,
|
|
166
|
+
ok: r.ok, why: r.why, questions: r.questions, dropped: r.dropped, ms: r.ms });
|
|
167
|
+
if (!r.ok) return { filed: [], dropped: [], off: r.why };
|
|
168
|
+
const props = proposalsOf({ text: raw, rel, cadence, questions: r.questions });
|
|
169
|
+
if (!props.length) return { filed: [], dropped: [], none: true };
|
|
170
|
+
const run = 'rr' + Number(now).toString(36);
|
|
171
|
+
const got = await guard.file({ job: JOB, version: VERSION, run, root, stateDir: gdir, settingsDir: runtime || null, env, max: MAX }, props, async (accepted) => {
|
|
172
|
+
const F = PR.read(dir), kept = PR.keptIds(F);
|
|
173
|
+
for (const p of accepted) {
|
|
174
|
+
const prop = grillProp(p);
|
|
175
|
+
if (F.drops.has(PR.sigOf(prop)) || kept.has(prop.id)) continue;
|
|
176
|
+
PR.append(dir, null, { kind: 'propose', ini: p.data.ini, board: board || '', run, ...prop, at: new Date(now).toISOString() });
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
console.log(`[report-readers] ${rel}: ${got.filed.length} filed, ${got.dropped.length} dropped`);
|
|
180
|
+
return got;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
let attached = false;
|
|
184
|
+
/** server.js calls this once: every draft this process writes gets one reader review, in the background. */
|
|
185
|
+
function attach(ctxFactory) {
|
|
186
|
+
if (attached || typeof ctxFactory !== 'function') return;
|
|
187
|
+
attached = true;
|
|
188
|
+
require('./report-draft.js').onDraftWritten(({ root, cadence, path: rel }) => {
|
|
189
|
+
setImmediate(() => {
|
|
190
|
+
let ctx = null; try { ctx = ctxFactory(); } catch { ctx = null; }
|
|
191
|
+
if (!ctx) return;
|
|
192
|
+
const abs = path.resolve(String(root));
|
|
193
|
+
const list = typeof ctx.workspaceList === 'function' ? ctx.workspaceList() : [];
|
|
194
|
+
const w = list.find((x) => x && x.root && path.resolve(x.root) === abs) || { id: '', root: abs };
|
|
195
|
+
let dir = null; try { dir = ctx.stateDirFor ? ctx.stateDirFor(w) : null; } catch { dir = null; }
|
|
196
|
+
const spawn = ctx.spawnScheduled || ctx.spawnSession;
|
|
197
|
+
if (!dir || typeof spawn !== 'function') return;
|
|
198
|
+
let board = ''; try { board = (ctx.boardOf && ctx.boardOf(w)) || ''; } catch { board = ''; }
|
|
199
|
+
file({ root: abs, rel, cadence, dir, runtime: ctx.runtimeDir || null, ask: SC.askVia(spawn), ws: w.id || '', board })
|
|
200
|
+
.catch((e) => console.log(`[report-readers] ${rel}: not run (${one(e && e.message, 160)})`));
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** Reader proposals filed in one state folder: the health number. */
|
|
206
|
+
function filedCount(dir) {
|
|
207
|
+
try { const F = PR.read(dir); return [...F.props.values()].filter((p) => p.group === 'grill' && p.type === 'reader').length; } catch { return 0; }
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
module.exports = { JOB, VERSION, MAX, SETTING, ASKS, blockOf, lineOf, proposalsOf, grillProp, cases, replayRoot, file, attach, filedCount, FIXTURE, FIXTURE_REL, RECORDED };
|
|
211
|
+
|
|
212
|
+
if (require.main === module && process.argv[2] === 'filed') {
|
|
213
|
+
const cwd = process.cwd();
|
|
214
|
+
const dir = [['pmos', 'state'], ['state'], ['.pmos']].map((r) => path.join(cwd, ...r)).find((d) => { try { return fs.statSync(d).isDirectory(); } catch { return false; } });
|
|
215
|
+
console.log(dir ? filedCount(dir) : 0);
|
|
216
|
+
}
|
|
@@ -106,6 +106,9 @@ const DEFS = Object.freeze({
|
|
|
106
106
|
// and the monthly credit cap in US dollars. At the cap Claude pauses. `pmos grill mode|cap` reads and sets them.
|
|
107
107
|
'grill.mode': one('checks', 'computer', ['full', 'exits', 'off'], 'full'),
|
|
108
108
|
'grill.cap': { section: 'checks', scope: 'computer', type: 'dollars', min: 0, max: 500, def: 10 },
|
|
109
|
+
// report-reader-review: PMOS reads each report draft as the CFO, the engineer and the sceptic and files their questions under the ✦
|
|
110
|
+
// (lib/report-readers.js). On by default (Wawan, 2026-11-24: "Yes, on every report draft").
|
|
111
|
+
'critic.reports': one('checks', 'computer', ['on', 'off'], 'on'),
|
|
109
112
|
// Background use with no dollar limit (Wawan 2026-11-17: the runs use the subscription plan). On: the step-5 spend hold never holds
|
|
110
113
|
// (lib/bg-queue.js spendHold); the usage-limit hold a failed run leaves is the brake. `pmos grill cap unlimited` sets it.
|
|
111
114
|
'ai.unlimited': bool('checks', 'computer', false),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.779.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.779.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* pm/grill-words.js — the words and marks every page uses for Claude's checks (Grill and Forecast screens; canvas GrillResult, GrillLenses,
|
|
2
2
|
* FcIntel, FcPhone). Pure: Node can import it.
|
|
3
3
|
*
|
|
4
|
-
* ANGLE { [angle]: { label, icon (a 24-unit path) } }: premortem · redteam · voices · reframe · scope · whatif · decision · past
|
|
4
|
+
* ANGLE { [angle]: { label, icon (a 24-unit path) } }: premortem · redteam · voices · reframe · scope · whatif · decision · past · reader
|
|
5
|
+
* (reader: a report reader's question, lib/report-readers.js; labelled by its reader, "CFO asks")
|
|
5
6
|
* findingOf(p) a grill proposal (lib/grill.js finding) → { angle, label, icon, title, why, next, simulated }
|
|
6
7
|
* the title and why without the angle prefix and the "Next:" tail lib/grill.js writes into them
|
|
7
8
|
* whenWord(iso, now) 'overnight' · 'today' · 'yesterday' · 'on Oct 30'
|
|
@@ -20,6 +21,7 @@ export const ANGLE = Object.freeze({
|
|
|
20
21
|
whatif: { label: 'What-if', icon: 'M4 18c4 0 4-12 8-12s4 12 8 12M4 12c4 0 4-6 8-6' },
|
|
21
22
|
decision: { label: 'Earlier decision', icon: 'M6 3h9l3 3v15H6zM9 9h6M9 13h6M9 17h3' },
|
|
22
23
|
past: { label: 'You decided this before', icon: 'M3 12a9 9 0 1 0 3-6.7M3 4v4h4M12 7v5l3 2' },
|
|
24
|
+
reader: { label: 'A reader asks', icon: 'M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8M4 21c1-4 4-6 8-6s7 2 8 6' },
|
|
23
25
|
});
|
|
24
26
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
25
27
|
|
|
@@ -31,7 +33,9 @@ export function findingOf(p) {
|
|
|
31
33
|
const next = String(d.next || '');
|
|
32
34
|
let why = String((p && p.why) || '');
|
|
33
35
|
if (next && why.endsWith(' Next: ' + next)) why = why.slice(0, -(' Next: ' + next).length);
|
|
34
|
-
|
|
36
|
+
const ASKS = { cfo: 'CFO asks', engineer: 'Engineer asks', sceptic: 'Sceptic asks' };
|
|
37
|
+
const label = angle === 'reader' && ASKS[d.reader] ? ASKS[d.reader] : A.label;
|
|
38
|
+
return { angle, label, icon: A.icon, title: title || label, why, next, simulated: d.simulated || '' };
|
|
35
39
|
}
|
|
36
40
|
const dayKey = (t) => { const d = new Date(t); return d.getFullYear() * 400 + d.getMonth() * 32 + d.getDate(); };
|
|
37
41
|
export function whenWord(iso, now = Date.now()) {
|
|
@@ -17,8 +17,8 @@ export const RO = !!PACK;
|
|
|
17
17
|
|
|
18
18
|
/** What a reader can do. Each is a selector; a press inside a match is let through. */
|
|
19
19
|
export const VIEW_CONTROLS = [
|
|
20
|
-
// the Timeline: the span, the legend behind (i), a column's sort, back to today, the Deliveries lane, the folds, an initiative's name (opens its viewer)
|
|
21
|
-
'#bdLgdBtn', '.tg-chd', '.tg-tback', '.dl-fb', '.dl-dn', '.dl-e[aria-label*="press to open"]', '.bd-fold', '.bd-prdb', 'label.tg-n', 'button.tg-n.ini2',
|
|
20
|
+
// the Timeline: the span, the legend behind (i), a column's sort, back to today, the edge tab that scrolls to a bar off the view, the Deliveries lane, the folds, an initiative's name (opens its viewer)
|
|
21
|
+
'#bdLgdBtn', '.tg-chd', '.tg-tback', '.tg-edge', '.dl-fb', '.dl-dn', '.dl-e[aria-label*="press to open"]', '.bd-fold', '.bd-prdb', 'label.tg-n', 'button.tg-n.ini2',
|
|
22
22
|
// the stage track: the switch between it and the Timeline (the two views a publisher shares), an initiative's name, the Monitor and Evaluate fold
|
|
23
23
|
// (UI grill U2: they live in the View chip with the span, and the menu draws only these two for a reader)
|
|
24
24
|
'#bdView', '#bdViewMenu [data-pv="track"]', '#bdViewMenu [data-pv="time"]', '#bdViewMenu [data-spick]', 'button.bt-nm', '#fold',
|
package/workspace/server.js
CHANGED
|
@@ -2939,6 +2939,9 @@ const reportDesignTick = () => {
|
|
|
2939
2939
|
try { m.sweep(reportDesignCtx()); } catch (e) { warnWriteFail('report design tick', e); }
|
|
2940
2940
|
};
|
|
2941
2941
|
try { require('./lib/routes-report-design.js').attach(reportDesignCtx); } catch { /* a checkout without the module still starts */ }
|
|
2942
|
+
// report-reader-review: every report draft this process writes is read once as the CFO, the engineer and the sceptic; their questions go under the
|
|
2943
|
+
// ✦ of the initiatives the report covers (lib/report-readers.js, through lib/ai-guard.js). The read runs through spawnScheduled (the capacity governor).
|
|
2944
|
+
try { require('./lib/report-readers.js').attach(() => ({ ...reportDesignCtx(), stateDirFor })); } catch { /* a checkout without the module still starts */ }
|
|
2942
2945
|
// report-structure: the structure jobs, the source checks (interactive sessions started like Work's approved steps, STEP_FLAGS) and the draft gate.
|
|
2943
2946
|
// The tick collects check answers and starts the drafts that waited for a failing source (4 hours, then without it).
|
|
2944
2947
|
// agent-orchestrator: the checks of a draft the schedule tick fired, and the tick's retries of them, use spawnScheduled (the capacity governor). A press uses spawnSession.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "PMOS reads each report draft as the CFO, the engineer and the sceptic and files their questions under the initiative's ✦ (initiative report-reader-review, bet A110 on the A330 critic): lib/report-readers.js on report-draft.js onDraftWritten, through lib/ai-guard.js; Settings critic.reports. Backend only.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"report-readers.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"report-readers.test.js": 1
|
|
8
|
+
}
|
|
9
|
+
}
|