create-pmos 0.761.0 → 0.762.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 +26 -20
- 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 +25 -0
- package/workspace/guide/cli.md +6 -0
- package/workspace/guide/home.md +1 -1
- package/workspace/guide/notes.md +15 -0
- package/workspace/lib/actor.js +8 -3
- package/workspace/lib/contradictions.js +137 -0
- package/workspace/lib/meeting-focus.js +14 -1
- package/workspace/lib/open-questions.js +23 -5
- package/workspace/lib/outcome-judge.js +1 -1
- package/workspace/lib/outcome-props.js +51 -5
- package/workspace/lib/outcomes-cli.js +49 -3
- package/workspace/lib/plan-baseline.js +106 -0
- package/workspace/lib/proposal-runs.js +1 -1
- package/workspace/lib/proposals.js +1 -1
- package/workspace/lib/propose-cli.js +16 -7
- package/workspace/lib/routes-drift.js +30 -0
- package/workspace/lib/routes-meeting-focus.js +6 -1
- package/workspace/lib/routes-open-questions.js +9 -2
- package/workspace/lib/week-moves.js +8 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-rec-tab-test.js +2 -1
- package/workspace/public/pm/buddy-core.js +162 -0
- package/workspace/public/pm/buddy-float.js +63 -0
- package/workspace/public/pm/cozy-buddy.css +26 -0
- package/workspace/public/pm/cozy-buddy.js +59 -7
- package/workspace/public/pm/cozy-rec-tab.js +10 -2
- package/workspace/public/pm/moves-view.js +11 -1
- package/workspace/public/pm/open-questions-view.js +1 -0
- package/workspace/public/premium-buddy.html +4 -0
- package/workspace/skills/initiative-propose.skill +2 -2
- package/workspace/test-lists/outcome-checks-finish.json +9 -0
- package/workspace/test-lists/slip-baseline-contradictions.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.762.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,31 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.762.0",
|
|
38
|
+
"at": "2026-11-24T05:23:23.423Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1717,
|
|
43
|
+
"t": "Every slip against the first plan, and records that disagree become one question (1c A102, A140)",
|
|
44
|
+
"s": "Every slip against the first plan, and records that disagree become one question (1c A102, A140)",
|
|
45
|
+
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1718,
|
|
49
|
+
"t": "The meeting buddy floats over any call app, with a wide topic view, a room view and a walk-in card",
|
|
50
|
+
"s": "The meeting buddy floats over any call app, with a wide topic view, a room view and a walk-in card",
|
|
51
|
+
"k": "new"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"n": 1715,
|
|
55
|
+
"t": "Outcome checks finish by themselves",
|
|
56
|
+
"s": "Outcome checks finish by themselves",
|
|
57
|
+
"k": "new"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
36
61
|
{
|
|
37
62
|
"v": "0.761.0",
|
|
38
63
|
"at": "2026-11-24T04:56:21.207Z",
|
|
@@ -363,25 +388,6 @@
|
|
|
363
388
|
"k": "new"
|
|
364
389
|
}
|
|
365
390
|
]
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"v": "0.741.0",
|
|
369
|
-
"at": "2026-11-23T09:00:39.651Z",
|
|
370
|
-
"f": 4,
|
|
371
|
-
"prs": [
|
|
372
|
-
{
|
|
373
|
-
"n": 1657,
|
|
374
|
-
"t": "Initiative artefacts move into ⋯; Stages and Work breakdown take the full width",
|
|
375
|
-
"s": "Initiative artefacts move into ⋯; Stages and Work breakdown take the full width",
|
|
376
|
-
"k": "new"
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"n": 1658,
|
|
380
|
-
"t": "Every Jira task in a work breakdown can be changed the same way",
|
|
381
|
-
"s": "Every Jira task in a work breakdown can be changed the same way",
|
|
382
|
-
"k": "fix"
|
|
383
|
-
}
|
|
384
|
-
]
|
|
385
391
|
}
|
|
386
392
|
]
|
|
387
393
|
}
|
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-24T05:23:19Z"}
|
|
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-24T05:23:19Z"}
|
|
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-24T05:23:19Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.762.0",
|
|
4
|
+
"at": "2026-11-24T05:23:23.423Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1717,
|
|
9
|
+
"t": "Every slip against the first plan, and records that disagree become one question (1c A102, A140)",
|
|
10
|
+
"s": "Every slip against the first plan, and records that disagree become one question (1c A102, A140)",
|
|
11
|
+
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1718,
|
|
15
|
+
"t": "The meeting buddy floats over any call app, with a wide topic view, a room view and a walk-in card",
|
|
16
|
+
"s": "The meeting buddy floats over any call app, with a wide topic view, a room view and a walk-in card",
|
|
17
|
+
"k": "new"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"n": 1715,
|
|
21
|
+
"t": "Outcome checks finish by themselves",
|
|
22
|
+
"s": "Outcome checks finish by themselves",
|
|
23
|
+
"k": "new"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
2
27
|
{
|
|
3
28
|
"v": "0.761.0",
|
|
4
29
|
"at": "2026-11-24T04:56:21.207Z",
|
package/workspace/guide/cli.md
CHANGED
|
@@ -321,9 +321,14 @@ Run it in the product's repository, or pass `--root <dir>`. It changes nothing,
|
|
|
321
321
|
|
|
322
322
|
- `pmos questions` lists every unanswered question across all initiatives, oldest first: one line per person and initiative. Each line says who can answer, how many days it has waited, and what PMOS does if nobody answers and by when. A question that has no safe default says why it waits for an answer.
|
|
323
323
|
- The list holds the plan changes PMOS holds for want of a source, a drafted ticket's open questions, the outside sign-offs and the open drafts from PMOS's Driver. A draft changes nothing until you keep it, so its default is to drop it, 14 days after it was filed.
|
|
324
|
+
- It also holds records that disagree with each other, one line per initiative: an initiative that is closed or accepted while tasks are still open, a due date moved after the task was done, and an initiative whose tasks have all been closed for 14 days or more while it is still live. These lines have no default, because only you know which record is wrong. PMOS changes neither record. `node workspace/lib/contradictions.js list` in a product's repository shows each one with the ledger lines it comes from.
|
|
324
325
|
- With the workspace running, the list is the same one the workspace reads. Without it, `pmos questions` reads the records on disk and says that held plan changes were not read.
|
|
325
326
|
- `pmos questions age` prints the median age in days of the lines. Its last line is the number, so a script can read it.
|
|
326
327
|
|
|
328
|
+
### Slip against the first plan
|
|
329
|
+
|
|
330
|
+
The first due date a task ever had is its baseline. PMOS reads it from the task's history, so you do not keep it by hand. `node workspace/lib/plan-baseline.js list` in a product's repository lists, per initiative, the open tasks now due later than their baseline, the task-days behind, and how many of those days rest on a move with no source. `node workspace/lib/plan-baseline.js count` prints the task-days with no source on its last line. It changes nothing.
|
|
331
|
+
|
|
327
332
|
### pmos press-release: a press release and FAQ for a bet
|
|
328
333
|
|
|
329
334
|
Write the press release before the build ("working backwards"). Run it in the product's repository, or pass `--root <dir>`. No running workspace is needed.
|
|
@@ -363,6 +368,7 @@ Run them in the product's repository, or pass `--root <dir>`.
|
|
|
363
368
|
- `pmos outcomes record <id> <worked|didnt-work|cant-tell> --evidence "<text>"` records your verdict on a due check.
|
|
364
369
|
- `pmos outcomes test <id> --test "<text>" [--method data-count|fake-door|concierge|other] [--result planned|holds|fails|unclear] [--evidence "<text>"]` records the smallest test that could kill a ranked bet before it is built, and what the test showed. A result other than `planned` needs evidence. When the bet already has a named test, `--test` can be left out.
|
|
365
370
|
- `pmos outcomes tests [--count]` lists the ranked bets with no smallest test, the tests that wait for a result, and the results. `--count` prints the number of bets with a result in the last 14 days.
|
|
371
|
+
- `pmos outcomes rate [--days <n>]` shows how many outcome checks came due in the last n days (30 by default) and at least 2 days ago, how many got a verdict within 2 days of their check date, and how many of those PMOS recorded by itself. The last line is that percent. It changes nothing.
|
|
366
372
|
- `pmos outcomes live --where <place> --version <version>` records the version a place runs now, for example after a deploy. When a record says `shipped_in: "<version>"` and `measured_on: "<place>"`, and that place still runs an older version, its outcome check shows as blocked with the step to fix it. PMOS does not ask for a verdict until the place runs the change.
|
|
367
373
|
- When you record `didnt-work`, the initiative shows **At risk** on every page, with the check as the reason. PMOS compares the evidence with the kill condition and files one next step under the initiative's ✦. If the evidence meets the kill condition, PMOS suggests that you stop the initiative. If this is the second check that did not work, it suggests a new experiment. Otherwise it suggests one more round with a new check date. The Board's Next column asks you the same question. Nothing happens until you press ✓. Undo reverses the step.
|
|
368
374
|
- `pmos outcomes propose` also reads the experiment's hypothesis. When the hypothesis names a different KR from the initiative's anchor, the draft tells you.
|
package/workspace/guide/home.md
CHANGED
|
@@ -54,7 +54,7 @@ Home, the Board, Insights and the Viewer use one typeface, Plus Jakarta Sans, wi
|
|
|
54
54
|
- **One press per initiative.** An initiative's proposals are one row, for example "Checkout: 6 changes to keep" with "3 dates, 2 names, 1 link" under it. Press it to see them grouped as Dates, Names, Done and Links. ✓ keeps all of them, with one Undo for the batch. ✕ drops them, then offers three reasons and **Say why**. A proposal that needs your own check keeps its own ✓ and ✕. **See every change** opens the full list on the initiative.
|
|
55
55
|
- **An ask expires after 14 days with no answer.** PMOS leaves it as it was and writes why in the initiative's History. Your move says it once: "2 asks expired after 14 days with no answer." Dates computed from your tasks never expire: PMOS reads them again each time.
|
|
56
56
|
- **Done** lists what PMOS finished by itself in the last 14 days, one line each with Undo.
|
|
57
|
-
- **What moved last week.** Once a week, one row says how many dates and scope changes (tasks added, removed or put back) happened last week on all your products, and how many have no source, for example "Last week: 14 moves in dates and scope" with "3 with no source. See who to ask." under it. Press it to see one list, grouped by product, with the moves that have no source first. Each move shows its source (your own change, the tracker, or the Jira ticket, meeting note or document it names), or **No source** and the owner to ask. A move PMOS made with no reason is always **No source**. After you open the list, the row goes away until next week. In a week with no moves, there is no row. From a terminal: `node workspace/lib/week-moves.js list` in a product's repository, or `--week <Monday>` for an earlier week.
|
|
57
|
+
- **What moved last week.** Once a week, one row says how many dates and scope changes (tasks added, removed or put back) happened last week on all your products, and how many have no source, for example "Last week: 14 moves in dates and scope" with "3 with no source. See who to ask." under it. Press it to see one list, grouped by product, with the moves that have no source first. Each move shows its source (your own change, the tracker, or the Jira ticket, meeting note or document it names), or **No source** and the owner to ask. A move PMOS made with no reason is always **No source**. A moved date also says how far it is from the task's first plan, for example "30 days behind the first plan (due 1 Nov)", so a slip stays in sight after the date moves. After you open the list, the row goes away until next week. In a week with no moves, there is no row. From a terminal: `node workspace/lib/week-moves.js list` in a product's repository, or `--week <Monday>` for an earlier week.
|
|
58
58
|
- An outbox draft opens with who it is for and the words. **Copy** puts the words on the clipboard, so you send them from your own tool. ✕ discards it, with Undo. Nothing leaves PMOS by itself.
|
|
59
59
|
|
|
60
60
|
## Mentions
|
package/workspace/guide/notes.md
CHANGED
|
@@ -500,3 +500,18 @@ The panel over Meet is PMOS's meeting buddy. Only you see it. The same card show
|
|
|
500
500
|
- **A draft for the call chat.** Sometimes PMOS drafts one short message for the call chat, for example a link the room asked for. PMOS never posts it: press the copy icon and paste it yourself, or press ✗.
|
|
501
501
|
- **Ask PMOS.** Type a question in the box at the bottom. The answer shows in the panel only.
|
|
502
502
|
|
|
503
|
+
#### Float PMOS over any call app
|
|
504
|
+
|
|
505
|
+
The meeting buddy can float in a small window on top of Zoom, Google Meet or Microsoft Teams, in the browser or the desktop app. The call app stays as it is. You need Chrome or Edge on a computer. In other browsers the icon does not show.
|
|
506
|
+
|
|
507
|
+
1. Start recording a meeting. The recording tab opens.
|
|
508
|
+
2. Press the **Float** icon in the bar at the bottom of the recording tab. A small PMOS window opens and stays on top of other windows. Move it where you want.
|
|
509
|
+
3. Use the icons in its head:
|
|
510
|
+
- **Fold** shrinks it to a pill. The pill shows the head only.
|
|
511
|
+
- **Open wide** shows two columns. **For this topic** shows the work and its goal, what blocks it, what was decided before, and the documents of the meeting. It changes when the topic changes. **People** shows who is in the invite and what they owe you. **Filed** shows every row PMOS filed, each with undo.
|
|
512
|
+
- **Room view** is for the whole meeting. Share the PMOS window in the call. When someone in the room asks a question, PMOS shows the answer and where it came from. It also shows what is on the table and what was agreed. Your private rows do not show: drafts, the line to tell the room, undo, your own questions and People. Press it again to go back to your own view.
|
|
513
|
+
|
|
514
|
+
The window remembers the size you left it at. It closes when the recording tab closes or the meeting stops.
|
|
515
|
+
|
|
516
|
+
**Walk-in card.** From 2 minutes before a meeting until PMOS listens, the buddy starts with a short card: the work the meeting is for, what someone owes you and what you owe, the last decision, and one thing to settle. A folded pill opens to a card for it once. A row with nothing behind it does not show.
|
|
517
|
+
|
package/workspace/lib/actor.js
CHANGED
|
@@ -51,11 +51,16 @@ function fromCli({ isTTY = !!(process.stdin.isTTY && process.stdout.isTTY), env
|
|
|
51
51
|
return { by: 'agent:unknown', via: 'cli' };
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
/* The server's own auto apply (lib/routes-proposals.js autoKeep and the 2-day defaults) acts as `{ by: 'agent:auto' }`: no page and no
|
|
55
|
+
* terminal, so it has no `via`. It is an agent, never the PM. Without it here every record writer refused the auto apply's writes in silence
|
|
56
|
+
* (initiative outcome-checks-finish: on idpf 10 kept outcomes and 8 kept descriptions wrote nothing). BY_RE is unchanged: no ledger that
|
|
57
|
+
* checks a line's `by` against it takes agent:auto. */
|
|
58
|
+
const AUTO_BY = 'agent:auto';
|
|
59
|
+
const valid = (a) => !!a && typeof a.by === 'string' && (a.by === AUTO_BY ? (a.via === undefined || VIA.includes(a.via)) : BY_RE.test(a.by) && VIA.includes(a.via));
|
|
55
60
|
const isPm = (a) => valid(a) && a.by.startsWith('pm:');
|
|
56
61
|
const isAgent = (a) => valid(a) && a.by.startsWith('agent:');
|
|
57
62
|
/** The session token of an agent actor, or null. */
|
|
58
|
-
const sessionOf = (a) => (isAgent(a) && a.by !== 'agent:unknown' ? a.by.slice('agent:'.length) : null);
|
|
63
|
+
const sessionOf = (a) => (isAgent(a) && a.by !== 'agent:unknown' && a.by !== AUTO_BY ? a.by.slice('agent:'.length) : null);
|
|
59
64
|
|
|
60
65
|
/** The name the page may show. Strips the session token's secret suffix; anything else passes through. */
|
|
61
66
|
function pageName(by) {
|
|
@@ -88,4 +93,4 @@ function sessionForToken(token, { sessDir } = {}) {
|
|
|
88
93
|
return { session: id, initiative: str(meta.initiative), plan_item: str(meta.plan_item) };
|
|
89
94
|
}
|
|
90
95
|
|
|
91
|
-
module.exports = { tokenHash, sessionForToken, PM_SLUG, SESSION_RE, BY_RE, VIA, fromUi, fromCli, valid, isPm, isAgent, sessionOf, pageName };
|
|
96
|
+
module.exports = { tokenHash, sessionForToken, PM_SLUG, SESSION_RE, BY_RE, VIA, AUTO_BY, fromUi, fromCli, valid, isPm, isAgent, sessionOf, pageName };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* contradictions.js — records that notice they are wrong (initiative slip-baseline-contradictions; bet A140). READ-ONLY: it writes nothing.
|
|
4
|
+
*
|
|
5
|
+
* Proof A140: a plain script found 12 contradictions in 7 of 29 idpf initiatives, each with the edit to propose. No model is needed: the
|
|
6
|
+
* product's own records are checked against each other. Each contradiction becomes ONE question to the PM per initiative in the open-questions
|
|
7
|
+
* register (lib/open-questions.js, kind `record`). PMOS changes no record by itself: which record is wrong is the PM's call.
|
|
8
|
+
*
|
|
9
|
+
* contradictionsOf(facts, { now }) PURE → [item] facts: one lib/drift-facts.js factsOf result, or a list of them
|
|
10
|
+
* forRepo(root, { now, rows }) → { notRead, items } one checkout; `rows` are the initiative rows as already read (no derive)
|
|
11
|
+
*
|
|
12
|
+
* THE KINDS (records only; a source that cannot be read is named in notRead, never guessed):
|
|
13
|
+
* closed-open the initiative is closed (set to Won't do, or stopped) and tasks are still open
|
|
14
|
+
* accepted-open the initiative is accepted and tasks are still open
|
|
15
|
+
* moved-done a task's due date moved after the task was done (PMOS or a person still planning finished work)
|
|
16
|
+
* done-live every task is done or won't do, the last for DONE_DAYS days or more, and the initiative is still live
|
|
17
|
+
*
|
|
18
|
+
* AN ITEM: { kind, product, name, ini, title, n, at (ISO, when it began), say, ask, sources: [{ label, ref, quote }] }. `ref` is path:line
|
|
19
|
+
* from the repository root and `quote` that line's own text (lib/drift-facts.js), so the Checker can read each one.
|
|
20
|
+
*
|
|
21
|
+
* CLI: node lib/contradictions.js list|count [<root>] [--json]. `count` ends with the number of contradictions on its last line.
|
|
22
|
+
* Every log line carries [contradictions]. */
|
|
23
|
+
const path = require('path');
|
|
24
|
+
|
|
25
|
+
const TAG = '[contradictions]';
|
|
26
|
+
const DAY = 86400000;
|
|
27
|
+
const DONE_DAYS = 14;
|
|
28
|
+
const MAX_SOURCES = 3;
|
|
29
|
+
const CLOSED = /^(done|won'?t do|cancel+ed|closed)$/i;
|
|
30
|
+
const DONE = /^done$/i;
|
|
31
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
32
|
+
const isDate = (s) => /^\d{4}-\d{2}-\d{2}/.test(String(s || ''));
|
|
33
|
+
const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).trimEnd() + '…' : t; };
|
|
34
|
+
const plural = (n, a, b) => n + ' ' + (n === 1 ? a : b);
|
|
35
|
+
const short = (ms) => { const d = new Date(ms); return d.getUTCDate() + ' ' + MON[d.getUTCMonth()]; };
|
|
36
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
37
|
+
const localDay = (ms) => { const d = new Date(ms); return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()); };
|
|
38
|
+
const src = (label, s) => (s && s.ref && s.quote ? { label: clip(label, 60), ref: s.ref, quote: s.quote } : null);
|
|
39
|
+
|
|
40
|
+
/** A task's state now, whether it is removed, its last line and its date moves made while it was done. PURE. */
|
|
41
|
+
function taskNow(t) {
|
|
42
|
+
const lines = (t.lines || []).filter((l) => Number.isFinite(l.at)).slice().sort((a, b) => a.at - b.at);
|
|
43
|
+
let state = '', removed = false, due, closedAt = null, closedLine = null, last = null;
|
|
44
|
+
const movedDone = [];
|
|
45
|
+
for (const l of lines) {
|
|
46
|
+
last = l;
|
|
47
|
+
if (l.kind === 'task-remove') removed = true;
|
|
48
|
+
if (l.kind === 'task-restore') removed = false;
|
|
49
|
+
if (l.due !== undefined) {
|
|
50
|
+
const next = isDate(l.due) ? String(l.due).slice(0, 10) : '';
|
|
51
|
+
// a date that moved on a line that does not itself change the state, while the task stood done
|
|
52
|
+
if (due !== undefined && next !== due && DONE.test(state) && !(typeof l.state === 'string' && l.state && !DONE.test(l.state))) movedDone.push(l);
|
|
53
|
+
due = next;
|
|
54
|
+
}
|
|
55
|
+
if (typeof l.state === 'string' && l.state && l.state !== state) {
|
|
56
|
+
state = l.state;
|
|
57
|
+
if (CLOSED.test(state)) { closedAt = l.at; closedLine = l; } else { closedAt = null; closedLine = null; }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return { state, open: !CLOSED.test(state), removed, closedAt, closedLine, last, movedDone, due };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Every contradiction in the records. PURE. */
|
|
64
|
+
function contradictionsOf(facts, { now = Date.now() } = {}) {
|
|
65
|
+
const out = [];
|
|
66
|
+
for (const f of (Array.isArray(facts) ? facts : [facts]).filter(Boolean)) {
|
|
67
|
+
const byIni = new Map();
|
|
68
|
+
for (const t of f.tasks || []) {
|
|
69
|
+
const s = taskNow(t);
|
|
70
|
+
if (s.removed) continue;
|
|
71
|
+
if (!byIni.has(t.initiative)) byIni.set(t.initiative, []);
|
|
72
|
+
byIni.get(t.initiative).push({ t, s });
|
|
73
|
+
}
|
|
74
|
+
for (const i of f.initiatives || []) {
|
|
75
|
+
const ts = byIni.get(i.id) || [];
|
|
76
|
+
if (!ts.length) continue;
|
|
77
|
+
const base = { product: f.ws, name: f.name || f.ws, ini: i.id, title: i.title || i.id };
|
|
78
|
+
const open = ts.filter((x) => x.s.open);
|
|
79
|
+
const today = localDay(now);
|
|
80
|
+
const late = open.filter((x) => x.s.due && x.s.due < today).length;
|
|
81
|
+
const openSources = open.slice(0, MAX_SOURCES - 1).map((x) => src('Open task: ' + x.t.title, x.s.last && x.s.last.src));
|
|
82
|
+
if (!i.live && Number.isFinite(i.closedAt) && open.length) {
|
|
83
|
+
const accepted = i.closedWhy === 'accepted';
|
|
84
|
+
const why = accepted ? 'accepted' : i.closedWhy === 'stopped' ? 'stopped' : "set to Won't do";
|
|
85
|
+
out.push({ ...base, kind: accepted ? 'accepted-open' : 'closed-open', n: open.length, at: new Date(i.closedAt).toISOString(),
|
|
86
|
+
say: `${base.title} is ${why}, but ${plural(open.length, 'task is', 'tasks are')} still open${late ? ` (${late} past due)` : ''}.`,
|
|
87
|
+
ask: accepted ? `Is it delivered? Then close the ${plural(open.length, 'task', 'tasks')}; if not, reopen it.` : `Close the ${plural(open.length, 'task', 'tasks')}, or move them to a live initiative?`,
|
|
88
|
+
sources: [src('The initiative is ' + why, i.closedSrc || i.src), ...openSources].filter(Boolean) });
|
|
89
|
+
}
|
|
90
|
+
const moved = ts.filter((x) => x.s.movedDone.length);
|
|
91
|
+
if (moved.length) {
|
|
92
|
+
const first = Math.min(...moved.map((x) => x.s.movedDone[0].at));
|
|
93
|
+
out.push({ ...base, kind: 'moved-done', n: moved.length, at: new Date(first).toISOString(),
|
|
94
|
+
say: `${plural(moved.length, 'done task', 'done tasks')} on ${base.title} had ${moved.length === 1 ? 'its' : 'their'} due date moved after ${moved.length === 1 ? 'it was' : 'they were'} done.`,
|
|
95
|
+
ask: moved.length === 1 ? 'Keep it done and stop planning it, or reopen it?' : 'Keep them done and stop planning them, or reopen them?',
|
|
96
|
+
sources: moved.slice(0, MAX_SOURCES).map((x) => src('Date moved on done task: ' + x.t.title, x.s.movedDone[x.s.movedDone.length - 1].src)).filter(Boolean) });
|
|
97
|
+
}
|
|
98
|
+
if (i.live && !open.length) {
|
|
99
|
+
const lastDone = ts.reduce((a, x) => (x.s.closedAt && (!a || x.s.closedAt > a.s.closedAt) ? x : a), null);
|
|
100
|
+
if (lastDone && now - lastDone.s.closedAt >= DONE_DAYS * DAY) {
|
|
101
|
+
out.push({ ...base, kind: 'done-live', n: ts.length, at: new Date(lastDone.s.closedAt + DONE_DAYS * DAY).toISOString(),
|
|
102
|
+
say: `Every task on ${base.title} is closed (the last on ${short(lastDone.s.closedAt)}), but it is still live.`,
|
|
103
|
+
ask: 'Accept it or close it, or add the work that is left?',
|
|
104
|
+
sources: [src('The initiative', i.src), src('Last task closed: ' + lastDone.t.title, lastDone.s.closedLine && lastDone.s.closedLine.src)].filter(Boolean) });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return out.sort((a, b) => (a.at < b.at ? -1 : a.at > b.at ? 1 : 0) || String(a.title).localeCompare(String(b.title)));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** One checkout's contradictions. rows: the initiative rows as already read; without them they are derived now (the CLI). */
|
|
113
|
+
function forRepo(root, { now = Date.now(), name, rows, stateDir, id } = {}) {
|
|
114
|
+
const Dr = require('./driver.js');
|
|
115
|
+
const f = require('./drift-facts.js').factsOf({ id: id || Dr.wsIdOf(root), name: name || path.basename(root), root }, { stateDir: stateDir || Dr.stateDirOf(root), rows });
|
|
116
|
+
return { notRead: f.notRead, items: contradictionsOf(f, { now }) };
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function main(argv, { say = (s) => console.log(s), cwd = process.cwd(), now = Date.now() } = {}) {
|
|
120
|
+
const pos = [], flags = {};
|
|
121
|
+
for (const a of argv) { if (a === '--json') flags.json = true; else pos.push(a); }
|
|
122
|
+
const [sub = 'list', rootArg] = pos;
|
|
123
|
+
if (!['list', 'count'].includes(sub)) { say('usage: node lib/contradictions.js list|count [<root>] [--json] — records of a product that disagree with each other'); return 2; }
|
|
124
|
+
const root = path.resolve(cwd, rootArg || '.');
|
|
125
|
+
let r;
|
|
126
|
+
try { r = forRepo(root, { now }); } catch (e) { say(`${TAG} could not read ${root}: ${(e && e.message) || e}`); return 1; }
|
|
127
|
+
if (flags.json) { say(JSON.stringify(sub === 'count' ? { count: r.items.length, notRead: r.notRead } : r)); return 0; }
|
|
128
|
+
if (sub === 'list') for (const x of r.items) say(`- ${x.say} ${x.ask} [${x.sources.map((s) => s.ref).join(', ')}]`);
|
|
129
|
+
const inis = new Set(r.items.map((x) => x.ini)).size;
|
|
130
|
+
say(`${TAG} ${plural(r.items.length, 'contradiction', 'contradictions')} across ${plural(inis, 'initiative', 'initiatives')}${r.notRead.length ? ' (not read: ' + r.notRead.join(', ') + ')' : ''}`);
|
|
131
|
+
if (sub === 'count') say(String(r.items.length));
|
|
132
|
+
return 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
module.exports = { contradictionsOf, taskNow, forRepo, main, TAG, DONE_DAYS };
|
|
136
|
+
|
|
137
|
+
if (require.main === module) process.exitCode = main(process.argv.slice(2));
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* shouldRun(now, state, note, opts) → { run, reason } the rules of when the companion may run
|
|
15
15
|
* pickNow(events, { now, meet, title }) → { ok, event, date, by } | { ok:false, status:404, error, choices } which meeting a Google Meet call is (the Chrome extension, c3-meet-extension)
|
|
16
16
|
* callLinkOf(event) → { url, app: 'meet'|'zoom'|'teams' } | null the address of the meeting's call (meeting-buddy: the play icon, the buddy)
|
|
17
|
+
* goalOf(anchor, resolve) → { kind: 'kr'|'objective'|'health', title } | null the goal an initiative's anchor names (meeting-float)
|
|
17
18
|
*
|
|
18
19
|
* Nothing here reads a file or starts a process; lib/routes-meeting-focus.js does both.
|
|
19
20
|
*
|
|
@@ -467,4 +468,16 @@ function callLinkOf(e) {
|
|
|
467
468
|
return null;
|
|
468
469
|
}
|
|
469
470
|
|
|
470
|
-
|
|
471
|
+
/** The goal an initiative's anchor (parent_kr) names, for the brief (meeting-float: the walk-in card, the wide view, room view).
|
|
472
|
+
* resolve = lib/initiative-rows.js anchorsOf(root).resolve. A key result or objective that resolves gives its name; a health budget
|
|
473
|
+
* gives "<name> health"; an anchor that does not resolve, or none, gives null (zero is silence). Pure. */
|
|
474
|
+
function goalOf(anchor, resolve) {
|
|
475
|
+
const raw = str(anchor, 120); if (!raw || typeof resolve !== 'function') return null;
|
|
476
|
+
let r = null; try { r = resolve(raw); } catch { return null; }
|
|
477
|
+
if (!r || !r.title) return null;
|
|
478
|
+
if (r.kind === 'health' && r.status === 'resolved') return { kind: 'health', title: str(r.title, 120) };
|
|
479
|
+
if ((r.kind === 'kr' || r.kind === 'objective') && r.status === 'resolved' && r.title !== raw) return { kind: r.kind, title: str(r.title, 120) };
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
module.exports = { goalOf, CATS, REF_TYPES, RAISE_KINDS, RAISE_MAX, FROM, MIN_GAP_MS, TAIL_MINUTES, TAIL_MAX, topicsFrom, tailOf, capturedFrom, screenOf, companionPrompt, parseCompanion, showIntent, showLine, foldState, outLine, moveLine, raiseLine, shouldRun, pickNow, meetTitle, callLinkOf, norm, str, off };
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
* THE SOURCES. (1) The day's question list (lib/question-batch.js, annotated by lib/default-decisions.js): the plan changes PMOS holds for
|
|
14
14
|
* want of a source, a drafted ticket's dry-run gaps and the outside sign-offs. Each question already has its owner, `waiting` (days on the
|
|
15
15
|
* list), and `default` or `waits`. (2) The open Driver drafts: a proposal in driver.jsonl with no keep, return or drop. Your move does not
|
|
16
|
-
* list them, and on four test products all 56 were older than 14 days.
|
|
16
|
+
* list them, and on four test products all 56 were older than 14 days. (3) Records that disagree with each other (lib/contradictions.js,
|
|
17
|
+
* initiative slip-baseline-contradictions): kind `record`, one line to the PM per initiative, never a default.
|
|
17
18
|
*
|
|
18
19
|
* THE DEFAULT OF A DRAFT. A draft is a proposal: nothing lands until the PM keeps it. So the safe answer is to drop it, and nothing on the
|
|
19
20
|
* plan changes. It is due DRAFT_DAYS after the draft was filed (Your move's expiry window). The register says the default; it takes none.
|
|
20
21
|
* Taking defaults stays with lib/default-decisions.js.
|
|
21
22
|
*
|
|
22
|
-
* A LINE: { key, owner, toPm, ini, title, n, kinds: { change?, ask?, draft? }, since, age, default: { say, due } | null, waits, text, ids }.
|
|
23
|
+
* A LINE: { key, owner, toPm, ini, title, n, kinds: { change?, ask?, draft?, record? }, since, age, default: { say, due } | null, waits, text, ids }.
|
|
23
24
|
* A line has a default only when every part of it has one; otherwise `waits` says why. Never both, never neither. Oldest first.
|
|
24
25
|
* Nothing here writes or sends anything. */
|
|
25
26
|
|
|
@@ -57,7 +58,7 @@ function draftsOf(state, { titleOf = () => '' } = {}) {
|
|
|
57
58
|
/** One register: the day's questions and the open drafts, one line per owner and initiative, oldest first. PURE.
|
|
58
59
|
* questions: lib/routes-your-move.js questions().questions (each { key, owner, toPm, ini, title, ids, n, text, default, waits, waiting }).
|
|
59
60
|
* drafts: draftsOf(). today: 'YYYY-MM-DD'. pm: the owner word for the PM. */
|
|
60
|
-
function registerOf({ questions = [], drafts = [], today = '', pm = 'PM' } = {}) {
|
|
61
|
+
function registerOf({ questions = [], drafts = [], records = [], today = '', pm = 'PM' } = {}) {
|
|
61
62
|
const t = dn(today);
|
|
62
63
|
const by = new Map();
|
|
63
64
|
const seen = new Set();
|
|
@@ -107,6 +108,21 @@ function registerOf({ questions = [], drafts = [], today = '', pm = 'PM' } = {})
|
|
|
107
108
|
const shown = ds.slice(0, MAX_ID_SHOW).map((d) => d.text);
|
|
108
109
|
l.parts.push(`${plural(ds.length, 'draft from PMOS', 'drafts from PMOS')}: ${shown.join('; ')}${ds.length > shown.length ? `; and ${ds.length - shown.length} more` : ''}.`);
|
|
109
110
|
}
|
|
111
|
+
// (3) records that disagree (lib/contradictions.js): one line to the PM per initiative, no default (which record is wrong is the PM's call)
|
|
112
|
+
for (const c of records || []) {
|
|
113
|
+
if (!isObj(c) || !c.ini || !c.kind) continue;
|
|
114
|
+
const id = 'record:' + c.kind + ':' + c.ini;
|
|
115
|
+
if (seen.has(id)) continue;
|
|
116
|
+
seen.add(id);
|
|
117
|
+
const l = lineOf(pm, true, c.ini, c.title);
|
|
118
|
+
l.kinds.record = (l.kinds.record || 0) + 1;
|
|
119
|
+
l.n += 1;
|
|
120
|
+
l.ids.push(id);
|
|
121
|
+
const d = dn(c.at);
|
|
122
|
+
l.ages.push(d != null && t != null ? Math.max(0, t - d) : 0);
|
|
123
|
+
l.waits.push('The records disagree, and which one is wrong is your call: PMOS changes neither by itself.');
|
|
124
|
+
l.parts.push(one(`${c.say || ''} ${c.ask || ''}`, 300));
|
|
125
|
+
}
|
|
110
126
|
const out = [];
|
|
111
127
|
for (const l of by.values()) {
|
|
112
128
|
const age = l.ages.length ? Math.max(...l.ages) : 0;
|
|
@@ -143,7 +159,7 @@ function diskQuestions(root, { now = Date.now() } = {}) {
|
|
|
143
159
|
}
|
|
144
160
|
|
|
145
161
|
/** The register of a repository. questions: the day's list from the server; without it the disk asks. */
|
|
146
|
-
function read(root, { now = Date.now(), questions = null, pm = 'PM' } = {}) {
|
|
162
|
+
function read(root, { now = Date.now(), questions = null, records = null, pm = 'PM' } = {}) {
|
|
147
163
|
const D = require('./driver.js');
|
|
148
164
|
const today = localDay(now);
|
|
149
165
|
let drafts = [];
|
|
@@ -156,7 +172,9 @@ function read(root, { now = Date.now(), questions = null, pm = 'PM' } = {}) {
|
|
|
156
172
|
}
|
|
157
173
|
} catch { drafts = []; }
|
|
158
174
|
const qs = Array.isArray(questions) ? questions : diskQuestions(root, { now });
|
|
159
|
-
|
|
175
|
+
let recs = records;
|
|
176
|
+
if (!Array.isArray(recs)) { try { recs = require('./contradictions.js').forRepo(root, { now }).items; } catch { recs = []; } }
|
|
177
|
+
const lines = registerOf({ questions: qs, drafts, records: recs, today, pm });
|
|
160
178
|
return { today, lines, median_age: medianAge(lines) };
|
|
161
179
|
}
|
|
162
180
|
|
|
@@ -130,7 +130,7 @@ function judge({ root, it, src, recordsDir, stateDir, refDir = stateDir, today }
|
|
|
130
130
|
return { kind: 'verdict', disposition, evidence, reading, rec, claims };
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
const WORDS = Object.freeze({ validated: 'It worked', refuted: 'It did not work' });
|
|
133
|
+
const WORDS = Object.freeze({ validated: 'It worked', refuted: 'It did not work', inconclusive: 'Can\'t tell yet' });
|
|
134
134
|
|
|
135
135
|
/** The drafts of the due outcomes of one scan (lib/outcomes.js scan). → [{ judged, it, draft | null }] (draft null: nothing to file now) */
|
|
136
136
|
function drafts(S, { src, recordsDir, stateDir, refDir = stateDir, only = null } = {}) {
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
* A DUE CHECK (initiative outcome-checks-run-themselves, bet 1 of the factory line). Every tick in the hours the PM allows, PMOS judges each
|
|
30
30
|
* outcome whose check date passed (duePass, lib/outcome-judge.js): the anchor goal's own reading files a verdict ✦ (class B: recorded by
|
|
31
31
|
* itself with Undo); a goal PMOS failed to read twice the same way files ONE ask (class C); else one short run per initiative and check date
|
|
32
|
-
* reads the records (deps.startRun, <state>/outcome-runs.jsonl).
|
|
32
|
+
* reads the records (deps.startRun, <state>/outcome-runs.jsonl). The run files worked, didn't work or can't tell (initiative
|
|
33
|
+
* outcome-checks-finish); a run that ends, or goes quiet for a day, with no verdict gets PMOS's own can't tell on the next pass (silentDraft),
|
|
34
|
+
* with what the run read. Only a run the PM stopped, or a pass with the switch off, leaves it due, and then Your move asks the PM once.
|
|
33
35
|
*
|
|
34
36
|
* A BLOCKED CHECK (bet A451). A check whose place of measure runs an older version than the one that shipped the change (lib/outcomes.js
|
|
35
37
|
* scan `blocked`) is not due: it is never judged and starts no run. The pass logs one `[outcome-blocked]` line when a check becomes blocked
|
|
@@ -214,9 +216,17 @@ function create(deps) {
|
|
|
214
216
|
filed = (r.filed || []).length; held = !!r.held;
|
|
215
217
|
if (r.off) return { ws: w.id, filed, runs: 0, off: r.off }; // the AI switch is off: no run either
|
|
216
218
|
}
|
|
219
|
+
// a run that ended (or went quiet for a day) with no verdict: PMOS records "can't tell" itself, so the PM is not left the question
|
|
220
|
+
const startedRuns = runsOf(dir);
|
|
221
|
+
for (const x of toRun) {
|
|
222
|
+
const st = startedRuns.get(x.it.id + '|' + x.it.horizon);
|
|
223
|
+
if (!st || verdictFiled(x.it.id, x.it.horizon)) continue;
|
|
224
|
+
const l = silentDraft(dir, x.it, st, x.why, x.board, { now });
|
|
225
|
+
if (l && !F.props.has(l.id)) { PR.append(dir, { by: 'agent:outcomes' }, l); filed++; log(`[outcome-rate] ${w.id} ${x.it.id} can't tell after a silent run ${st.run}`); }
|
|
226
|
+
}
|
|
217
227
|
let runs = 0;
|
|
218
228
|
if (deps.startRun && toRun.length) {
|
|
219
|
-
const started =
|
|
229
|
+
const started = startedRuns;
|
|
220
230
|
for (const x of toRun) {
|
|
221
231
|
if (runs >= RUNS_PER_PASS) break;
|
|
222
232
|
const key = x.it.id + '|' + x.it.horizon;
|
|
@@ -298,12 +308,48 @@ function create(deps) {
|
|
|
298
308
|
|
|
299
309
|
/** The outcome runs started, as `ini|horizon` keys (<state>/outcome-runs.jsonl). */
|
|
300
310
|
function runsOf(dir) {
|
|
301
|
-
const out = new
|
|
311
|
+
const out = new Map(); // 'ini|horizon' → { run, at } of the one run started for it (a Map, so `has` reads as before)
|
|
302
312
|
let text = ''; try { text = fs.readFileSync(path.join(dir, RUNS), 'utf8'); } catch { return out; }
|
|
303
|
-
for (const l of text.split('\n')) { try { const o = JSON.parse(l); if (o && o.ini && o.horizon) out.
|
|
313
|
+
for (const l of text.split('\n')) { try { const o = JSON.parse(l); if (o && o.ini && o.horizon && !out.has(o.ini + '|' + o.horizon)) out.set(o.ini + '|' + o.horizon, { run: o.run || null, at: o.at || '' }); } catch { /* torn */ } }
|
|
304
314
|
return out;
|
|
305
315
|
}
|
|
306
316
|
|
|
317
|
+
/** A SILENT RUN (initiative outcome-checks-finish). The one check run of a due outcome ended, or started more than SILENT_AFTER ago, and filed no
|
|
318
|
+
* verdict: PMOS records "can't tell" itself, from what the run read (its `src` lines) and why the goal's reading did not decide it. A run
|
|
319
|
+
* the PM stopped gets nothing (the PM took it over). Sources: the record's outcome line and the run's own lines in the proposals ledger,
|
|
320
|
+
* so it is never a change with no source. → the proposals line to append | null */
|
|
321
|
+
const SILENT_AFTER = 864e5;
|
|
322
|
+
function silentDraft(dir, it, started, why, board, { now = Date.now() } = {}) {
|
|
323
|
+
if (!started || !started.run) return null;
|
|
324
|
+
const file = PR.ledgerFile(dir);
|
|
325
|
+
let L = []; try { L = fs.readFileSync(file, 'utf8').split('\n'); } catch { return null; }
|
|
326
|
+
const read = [], refs = [];
|
|
327
|
+
let ended = false, stopped = false;
|
|
328
|
+
L.forEach((raw, i) => {
|
|
329
|
+
let o = null; try { o = JSON.parse(raw); } catch { return; }
|
|
330
|
+
if (!o || o.run !== started.run || o.ini !== it.id) return;
|
|
331
|
+
if (o.kind === 'end') { ended = true; stopped = stopped || !!o.stopped; }
|
|
332
|
+
if (o.kind === 'src' && o.state === 'done') { read.push(o.n ? `${o.source} (${String(o.what || '').trim() || o.n + ' found'})` : `${o.source} (nothing)`); refs.push({ label: 'What the run read: ' + o.source, ref: 'state:' + path.relative(dir, file).split(path.sep).join('/') + ':' + (i + 1) }); }
|
|
333
|
+
});
|
|
334
|
+
if (stopped) return null;
|
|
335
|
+
const age = now - Date.parse(started.at || '');
|
|
336
|
+
if (!ended && !(age > SILENT_AFTER)) return null; // still running: wait for it
|
|
337
|
+
const day = String(started.at || '').slice(0, 10);
|
|
338
|
+
const reason = String(why || '').replace(/\s+/g, ' ').trim().replace(/[.\s]+$/, '');
|
|
339
|
+
const evidence = (`PMOS's check run on ${day ? O.short(day) : 'its check date'} ${ended ? 'ended' : 'stopped answering'} without a verdict. `
|
|
340
|
+
+ (read.length ? `It read ${read.join('; ')}. ` : 'It read nothing it could cite. ')
|
|
341
|
+
+ (reason ? `The goal's own reading did not decide it: ${reason}.` : 'No reading of the goal decides it.')).slice(0, 600);
|
|
342
|
+
const sources = [];
|
|
343
|
+
if (it.fm && it.fm.outcome_metric) sources.push({ label: 'Expected outcome', ref: it.record + ':' + it.fm.outcome_metric.n });
|
|
344
|
+
sources.push(...refs.slice(0, 7 - sources.length));
|
|
345
|
+
if (!sources.length) return null;
|
|
346
|
+
const c = PR.clean('outcome', 'verdict', { title: `${J.WORDS.inconclusive}: ${it.title}`.slice(0, 120),
|
|
347
|
+
why: `Its check date was ${O.short(it.horizon)}. ${read.length ? 'PMOS read ' + read.length + ' source' + (read.length === 1 ? '' : 's') + ' and could not tell whether it worked' : 'PMOS could not tell whether it worked'}. PMOS recorded "can't tell". Undo takes it back.`,
|
|
348
|
+
sources, items: [{ id: 'verdict', title: J.WORDS.inconclusive }], data: { disposition: 'inconclusive', evidence, horizon: it.horizon } });
|
|
349
|
+
if (c.error) return null;
|
|
350
|
+
return { kind: 'propose', ini: it.id, board, run: started.run, id: PR.idOf(it.id, 'outcome', 'verdict', it.horizon), ...c.prop };
|
|
351
|
+
}
|
|
352
|
+
|
|
307
353
|
/** The refuted outcomes whose ✦ next step still waits for the PM (launch simulation W6): every current refuted verdict, less the ones whose
|
|
308
354
|
* ✦ the PM kept (✓) or dropped (✕). Read without a server (`pmos today --root`), so a ✦ the server has not filed yet is listed too.
|
|
309
355
|
* → [{ ini, title, next, say, id }] */
|
|
@@ -324,4 +370,4 @@ function waiting(root, stateDir, { today } = {}) {
|
|
|
324
370
|
return out;
|
|
325
371
|
}
|
|
326
372
|
|
|
327
|
-
module.exports = { create, cases, lineOf, off, waiting, runsOf, PER_DAY, RUNS };
|
|
373
|
+
module.exports = { create, cases, lineOf, off, waiting, runsOf, silentDraft, SILENT_AFTER, PER_DAY, RUNS };
|