create-pmos 0.670.0 → 0.672.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 +28 -22
- 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 +27 -8
- package/workspace/guide/agent-capabilities.md +8 -0
- package/workspace/guide/initiatives-and-next-steps.md +12 -2
- package/workspace/guide/settings-and-switches.md +2 -2
- package/workspace/lib/auto-keep.js +8 -0
- package/workspace/lib/autonomy.js +2 -0
- package/workspace/lib/default-decisions.js +199 -0
- package/workspace/lib/driver-run.js +1 -1
- package/workspace/lib/driver.js +4 -1
- package/workspace/lib/proposals.js +4 -0
- package/workspace/lib/question-batch.js +1 -1
- package/workspace/lib/routes-autonomy.js +7 -1
- package/workspace/lib/routes-boards.js +115 -4
- package/workspace/lib/routes-proposals.js +2 -0
- package/workspace/lib/routes-your-move.js +18 -3
- package/workspace/lib/tracker-refresh-run.js +162 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-pop-work.js +23 -3
- package/workspace/public/pm/pop-work-model.js +7 -5
- package/workspace/server.js +27 -0
- package/workspace/skills/tracker-refresh.skill +2 -0
- package/workspace/test-lists/default-decisions-with-a-deadline.json +9 -0
- package/workspace/test-lists/direct-plain-actions.json +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.672.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": {
|
|
@@ -34,21 +34,40 @@
|
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
36
|
{
|
|
37
|
-
"v": "0.
|
|
38
|
-
"at": "2026-11-22T05:
|
|
37
|
+
"v": "0.672.0",
|
|
38
|
+
"at": "2026-11-22T05:15:41.155Z",
|
|
39
39
|
"f": 4,
|
|
40
40
|
"prs": [
|
|
41
|
-
{
|
|
42
|
-
"n": 1457,
|
|
43
|
-
"t": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
44
|
-
"s": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
45
|
-
"k": "new"
|
|
46
|
-
},
|
|
47
41
|
{
|
|
48
42
|
"n": 1463,
|
|
49
43
|
"t": "Settings is built from the design system's blocks",
|
|
50
44
|
"s": "Settings is built from the design system's blocks",
|
|
51
45
|
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1454,
|
|
49
|
+
"t": "Plain ✓ actions write directly, with Undo and no agent turn",
|
|
50
|
+
"s": "Plain ✓ actions write directly, with Undo and no agent turn",
|
|
51
|
+
"k": "new"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"n": 1450,
|
|
55
|
+
"t": "Default decisions with a deadline, and the cost of waiting",
|
|
56
|
+
"s": "Default decisions with a deadline, and the cost of waiting",
|
|
57
|
+
"k": "new"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"v": "0.669.0",
|
|
63
|
+
"at": "2026-11-22T04:57:48.469Z",
|
|
64
|
+
"f": 4,
|
|
65
|
+
"prs": [
|
|
66
|
+
{
|
|
67
|
+
"n": 1457,
|
|
68
|
+
"t": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
69
|
+
"s": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
70
|
+
"k": "new"
|
|
52
71
|
}
|
|
53
72
|
]
|
|
54
73
|
},
|
|
@@ -345,19 +364,6 @@
|
|
|
345
364
|
"k": "new"
|
|
346
365
|
}
|
|
347
366
|
]
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"v": "0.637.0",
|
|
351
|
-
"at": "2026-11-20T00:56:06.689Z",
|
|
352
|
-
"f": 4,
|
|
353
|
-
"prs": [
|
|
354
|
-
{
|
|
355
|
-
"n": 1419,
|
|
356
|
-
"t": "The PMOS design system family (brand, charts, ui, documents, slides)",
|
|
357
|
-
"s": "The PMOS design system family (brand, charts, ui, documents, slides)",
|
|
358
|
-
"k": "new"
|
|
359
|
-
}
|
|
360
|
-
]
|
|
361
367
|
}
|
|
362
368
|
]
|
|
363
369
|
}
|
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-22T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T05:15:37Z"}
|
|
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-22T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T05:15:37Z"}
|
|
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-22T05:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T05:15:37Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"v": "0.
|
|
4
|
-
"at": "2026-11-22T05:
|
|
3
|
+
"v": "0.672.0",
|
|
4
|
+
"at": "2026-11-22T05:15:41.155Z",
|
|
5
5
|
"f": 4,
|
|
6
6
|
"prs": [
|
|
7
|
-
{
|
|
8
|
-
"n": 1457,
|
|
9
|
-
"t": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
10
|
-
"s": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
11
|
-
"k": "new"
|
|
12
|
-
},
|
|
13
7
|
{
|
|
14
8
|
"n": 1463,
|
|
15
9
|
"t": "Settings is built from the design system's blocks",
|
|
16
10
|
"s": "Settings is built from the design system's blocks",
|
|
17
11
|
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1454,
|
|
15
|
+
"t": "Plain ✓ actions write directly, with Undo and no agent turn",
|
|
16
|
+
"s": "Plain ✓ actions write directly, with Undo and no agent turn",
|
|
17
|
+
"k": "new"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"n": 1450,
|
|
21
|
+
"t": "Default decisions with a deadline, and the cost of waiting",
|
|
22
|
+
"s": "Default decisions with a deadline, and the cost of waiting",
|
|
23
|
+
"k": "new"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"v": "0.669.0",
|
|
29
|
+
"at": "2026-11-22T04:57:48.469Z",
|
|
30
|
+
"f": 4,
|
|
31
|
+
"prs": [
|
|
32
|
+
{
|
|
33
|
+
"n": 1457,
|
|
34
|
+
"t": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
35
|
+
"s": "Create-pmos picks the code profile itself; OKR template the board resolves",
|
|
36
|
+
"k": "new"
|
|
18
37
|
}
|
|
19
38
|
]
|
|
20
39
|
},
|
|
@@ -53,6 +53,14 @@ A tidy name that uses only the task's own words is not a name change from a sour
|
|
|
53
53
|
|
|
54
54
|
The changes that wait come together in one list of questions a day: one question for each owner and initiative. The owner is the person the plan names on the task, or you. The list is fixed for the day. A change that waits later that day goes on the next day's list. A question for a teammate is a draft. PMOS does not send it. When you keep or drop the change, its question leaves the list.
|
|
55
55
|
|
|
56
|
+
### Defaults when nobody answers
|
|
57
|
+
|
|
58
|
+
Each question on the list says what PMOS does if nobody answers, and by when. For a change that waits for a source, the default is to leave the plan as it is. The deadline is 2 days after the change first joined the list. When the deadline passes and nobody answered, PMOS takes the default and lists it in "PMOS did" with Undo. Undo brings the question back, and PMOS does not take a default on it again.
|
|
59
|
+
|
|
60
|
+
These changes never take a default, because other people see them or they cannot be undone: the state of a Jira ticket, a stage move, a message to a person, a pull request, a merge, a delete, spending money, and the next step for an outcome that did not work. They wait for you. Each question says how many days it has waited and how many tasks stay as they are until someone answers.
|
|
61
|
+
|
|
62
|
+
To stop defaults, set "Defaults when nobody answers" to Ask first in Settings, or turn PMOS's agents off.
|
|
63
|
+
|
|
56
64
|
### Undo
|
|
57
65
|
|
|
58
66
|
Each change an agent applies is listed for 14 days with Undo. Undo puts the record back as it was. If someone changed the record since, Undo keeps that change.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Initiatives: the Roadmap, next steps, the Driver and done"
|
|
4
4
|
description: "The ranked list of initiatives, how PMOS works out the next steps, the Initiative Driver, and integrated work."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-22
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Initiatives: the Roadmap, next steps, the Driver and done
|
|
@@ -48,6 +48,16 @@ Each step says what you can do with it. The control sits under the step.
|
|
|
48
48
|
| `gate` | The step is yours alone: accepting the initiative, approving the contract, answering an open item. | Words only. There is no start button. |
|
|
49
49
|
| `lifecycle` | The initiative is stopped. | **reopen** |
|
|
50
50
|
|
|
51
|
+
### Plain suggestions finish at once
|
|
52
|
+
|
|
53
|
+
Three suggestions on the initiative popup change the record directly, with Undo. They send nothing to Ask PMOS and start no agent run:
|
|
54
|
+
|
|
55
|
+
- **Move the plan end.** ✓ moves the due day of the open task that sets the plan end today.
|
|
56
|
+
- **Close them** (a closed initiative with open tasks). All its open PMOS tasks go to Done. Jira tickets stay with Jira.
|
|
57
|
+
- **Reopen.** An initiative in Won't do comes out of Won't do. An initiative in its last stage goes back to the stage it came from.
|
|
58
|
+
|
|
59
|
+
When PMOS cannot do the change by itself (for example, a Done task sets the plan end), it sends the words to Ask PMOS as before.
|
|
60
|
+
|
|
51
61
|
### Prepare, then go
|
|
52
62
|
|
|
53
63
|
**Prepare** shows a plan and starts nothing. The plan names the branch and the folder, says whether the initiative's branch already exists (it is reused) or would be created, lists the sessions already running on the initiative, names the read-only sources the session may use, and shows the budget. It also shows the exact first input the session would receive. Preparing creates no branch, folder or session.
|
|
@@ -214,7 +224,7 @@ The Initiative Driver is a short background agent run for one initiative or one
|
|
|
214
224
|
A run starts for one of four reasons:
|
|
215
225
|
|
|
216
226
|
- **Created.** An initiative is created from the page, from Triage (accept), or with `pmos initiative new`. The run starts within one tick of the server (about one minute).
|
|
217
|
-
- **Moved.**
|
|
227
|
+
- **Moved.** An agent moves the initiative to another stage. A move you press on the board starts no run: the daily sweep still asks for the documents of the new stage.
|
|
218
228
|
- **Answered.** You send a proposal back with a note.
|
|
219
229
|
- **Stuck.** The unblock sweep finds a blocker the agent can work on.
|
|
220
230
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Settings, switches and data freshness"
|
|
4
4
|
description: "What each section of Settings holds, every PMOS_ environment variable, and how the workspace keeps each source up to date."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-22
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Settings, switches and data freshness
|
|
@@ -332,7 +332,7 @@ The calendar-sync skill reads today and the next 14 days, read-only, and saves t
|
|
|
332
332
|
|
|
333
333
|
The events are kept in your own runtime folder on this machine, never in a repository.
|
|
334
334
|
|
|
335
|
-
The tracker-refresh
|
|
335
|
+
The tracker-refresh read is a plain script, not an agent run: the schedule and the Refresh press start no session. It reads tracker items from files already in your repository and moves an item only when a newer file shows a new status, so a read can change nothing. It records that the read finished, even when nothing moved. `pmos tracker status` says when tracker items were last read for this repository.
|
|
336
336
|
|
|
337
337
|
The record is kept in your own runtime folder on this machine, never in a repository. Tracker items show the time of this record, or the time the schedule last started the skill if that is later.
|
|
338
338
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
/* auto-keep.js — the ✦ half of D106 ("Full autonomy now"): after the proposal runs, every open class A or B ✦ proposal of a lead
|
|
3
3
|
* workspace is applied by itself, one batch each, with Undo (lib/routes-proposals.js autoKeep, lib/autonomy.js). A workspace is
|
|
4
4
|
* read again only when its proposals ledger changed. `pmos ai off` and PMOS_AUTONOMY=off stop it (autonomy.killed).
|
|
5
|
+
* DEFAULTS (default-decisions-with-a-deadline): once a local day per lead workspace, the day's question list is read the way Your move
|
|
6
|
+
* reads it (lib/routes-your-move.js questions), which takes the defaults due that day, so a question nobody opened still closes.
|
|
5
7
|
*
|
|
6
8
|
* create({ workspaces, isLead, stateDirFor, proposalCtx, settingsDir, env?, warn? }) → { tick() }
|
|
7
9
|
*/
|
|
@@ -10,6 +12,8 @@ const path = require('path');
|
|
|
10
12
|
|
|
11
13
|
function create({ workspaces, isLead, stateDirFor, proposalCtx, settingsDir, env = process.env, warn = () => {} }) {
|
|
12
14
|
const seen = new Map();
|
|
15
|
+
const daySeen = new Map();
|
|
16
|
+
const localDay = (ms = Date.now()) => { const d = new Date(ms); return d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0'); };
|
|
13
17
|
const mtimeOf = (dir) => { try { return fs.statSync(path.join(dir, 'proposals.jsonl')).mtimeMs; } catch { return null; } };
|
|
14
18
|
function tick() {
|
|
15
19
|
if (require('./autonomy.js').killed({ env, settingsDir: settingsDir() })) return;
|
|
@@ -19,6 +23,10 @@ function create({ workspaces, isLead, stateDirFor, proposalCtx, settingsDir, env
|
|
|
19
23
|
try {
|
|
20
24
|
if (!isLead(w)) continue;
|
|
21
25
|
const dir = stateDirFor(w); if (!dir) continue;
|
|
26
|
+
const day = localDay();
|
|
27
|
+
if (daySeen.get(w.id) !== day) {
|
|
28
|
+
try { require('./routes-your-move.js').questions(proposalCtx(), w, day); daySeen.set(w.id, day); } catch (e) { warn('default decisions tick', e); }
|
|
29
|
+
}
|
|
22
30
|
const mt = mtimeOf(dir);
|
|
23
31
|
if (mt == null || seen.get(w.id) === mt) continue;
|
|
24
32
|
const state = D.fold(D.readLines(D.ledgerFile(D.stateDirOf(w.root) || dir)));
|
|
@@ -98,6 +98,8 @@ const KIND_LIST = Object.freeze([
|
|
|
98
98
|
k('description', 'Descriptions and links', ['propose:description', 'propose:links']),
|
|
99
99
|
k('found', 'What PMOS found elsewhere', ['propose:found', 'propose:scanned', 'propose:improved', 'propose:prototyped']),
|
|
100
100
|
k('grill', 'Fixes from a check', ['propose:grill']),
|
|
101
|
+
// default-decisions-with-a-deadline: the day's questions nobody answered by their deadline (lib/default-decisions.js)
|
|
102
|
+
k('defaults', 'Defaults when nobody answers', ['propose:default']),
|
|
101
103
|
]);
|
|
102
104
|
const KIND_OF_JOB = new Map(KIND_LIST.flatMap((x) => x.jobs.map((j) => [j, x.key])));
|
|
103
105
|
const kindOf = (job) => KIND_OF_JOB.get(String(job || '')) || null;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* default-decisions.js — default decisions with a deadline (initiative default-decisions-with-a-deadline; bet 2 in pmos-ideas/bets.md,
|
|
3
|
+
* proofs A26 + A27). Every question on the day's list (lib/question-batch.js) says what PMOS does if nobody answers, and by when. When the
|
|
4
|
+
* deadline passes with no answer, PMOS takes that default by itself, with Undo. A kind that others see or that cannot be taken back has
|
|
5
|
+
* no default: it waits for the PM, and the list says how long it has waited.
|
|
6
|
+
*
|
|
7
|
+
* DEFAULT_DAYS · JOB · WHY
|
|
8
|
+
* defaultOf(p) PURE → { choice: 'leave', say } | { choice: null, waits } the default of one held change
|
|
9
|
+
* firstDays(dayLines) PURE → Map id → the first day it was on the list (question-days.jsonl lines)
|
|
10
|
+
* defaultedOf(lines) PURE → { taken: Map id → batch, undone: Set id, batches: Map batch → [drop line] } from proposals.jsonl
|
|
11
|
+
* annotate(questions, held, { dayLines, lines, today, extra }) PURE → the questions, each with default | null, waits | null, waiting (days),
|
|
12
|
+
* cost (A27, costOf: what the wait holds up)
|
|
13
|
+
* dueOf(held, { dayLines, lines, today }) PURE → the held changes whose default is due today and was never taken or undone
|
|
14
|
+
* take(dir, held, { dayLines, today, product, pm, now, env, settingsDir }) → { taken: [{ batch, ini, board, ids, title }], why? }
|
|
15
|
+
* undo(dir, batch, { product, actor, now }) → { ok, back } | { ok: false, error }
|
|
16
|
+
*
|
|
17
|
+
* THE DEFAULT. A held change is a plan change PMOS has no source for (lib/source-guard.js), so the safe answer is the one that changes
|
|
18
|
+
* nothing: `leave`, PMOS leaves the plan as it is. Its due day is DEFAULT_DAYS after the day the change first joined the list. Taking it
|
|
19
|
+
* writes one drop line per change in proposals.jsonl, marked `default: true` with the batch (by `pmos:default`, so no job learns from it as
|
|
20
|
+
* from the PM's ✕), and one `applied` line for the job `propose:default` in autonomy.jsonl, so "PMOS did" lists it with Undo. The plan
|
|
21
|
+
* itself is not written; nothing is sent.
|
|
22
|
+
* NEVER A DEFAULT (NEVER below): a Jira ticket's state, a stage move, a message to a person, a pull request, a merge, a delete, spend, and
|
|
23
|
+
* a refuted outcome's next step. They wait for the PM, however long.
|
|
24
|
+
* UNDO. An undo line for the batch (lib/proposals.js fold then reads its drops as never written) brings the question back. An undone id is
|
|
25
|
+
* never defaulted again: it waits for the PM. The Undo is a setback of `propose:default` (two in a row demote it for 7 days).
|
|
26
|
+
* STOPS. `pmos ai off`, PMOS_AUTONOMY=off, a demotion, and the Settings kind "Defaults when nobody answers" set to Ask first
|
|
27
|
+
* (lib/autonomy.js decide). */
|
|
28
|
+
|
|
29
|
+
const DEFAULT_DAYS = 2;
|
|
30
|
+
const JOB = 'propose:default';
|
|
31
|
+
const BY = 'pmos:default';
|
|
32
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
33
|
+
const isObj = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
34
|
+
const str = (v) => (typeof v === 'string' ? v : '');
|
|
35
|
+
const one = (v, n) => String(v == null ? '' : v).replace(/\s+/g, ' ').trim().slice(0, n);
|
|
36
|
+
const plural = (n, a, b) => n + ' ' + (n === 1 ? a : b);
|
|
37
|
+
const dn = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? Math.round(Date.UTC(+m[1], +m[2] - 1, +m[3]) / 864e5) : null; };
|
|
38
|
+
const isoOf = (d) => new Date(d * 864e5).toISOString().slice(0, 10);
|
|
39
|
+
const addDays = (day, n) => { const d = dn(day); return d == null ? '' : isoOf(d + n); };
|
|
40
|
+
const md = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
41
|
+
const WHY = (due) => `No answer by ${md(due)}, so PMOS left the plan as it was.`;
|
|
42
|
+
|
|
43
|
+
/* The kinds that never default, each with the reason the list shows. `test(p)` reads a ✦ proposal (group, type, items) or a Driver
|
|
44
|
+
* proposal (`what`). */
|
|
45
|
+
const NEVER = [
|
|
46
|
+
{ key: 'jira', test: (p) => p.group === 'status' && (p.items || []).some((x) => isObj(x) && x.jira), waits: "It changes a Jira ticket's state, which others see." },
|
|
47
|
+
{ key: 'stage', test: (p) => (p.group === 'found' && p.type === 'stage') || p.what === 'move' || (p.items || []).some((x) => isObj(x) && x.op === 'stage'), waits: 'It moves the stage on a board others read.' },
|
|
48
|
+
{ key: 'message', test: (p) => p.what === 'follow-up' || p.group === 'message' || (isObj(p.data) && (p.data.send === true || p.data.to)), waits: 'It sends a message to a person.' },
|
|
49
|
+
{ key: 'pr', test: (p) => p.group === 'build', waits: 'It opens a pull request.' },
|
|
50
|
+
{ key: 'merge', test: (p) => p.group === 'merge' || (isObj(p.data) && p.data.merge === true), waits: 'It merges into a product repository.' },
|
|
51
|
+
{ key: 'delete', test: (p) => p.group === 'delete' || (isObj(p.data) && p.data.delete === true), waits: 'It deletes something.' },
|
|
52
|
+
{ key: 'spend', test: (p) => p.group === 'spend' || (isObj(p.data) && p.data.spend != null), waits: 'It spends money.' },
|
|
53
|
+
{ key: 'next', test: (p) => p.group === 'outcome' && (p.type === 'refuted' || p.type === 'source'), waits: 'What the work should be next is your call.' },
|
|
54
|
+
// the other asks on the same card (dry-run-tickets-before-build): a ticket's dry-run gap, and an outside sign-off
|
|
55
|
+
{ key: 'ticket', test: (p) => p.group === 'ask' && /^dry:/.test(String(p.id || '')), waits: 'What the ticket should say is your call.' },
|
|
56
|
+
{ key: 'signoff', test: (p) => p.group === 'ask', waits: 'It needs an answer from someone outside the team.' },
|
|
57
|
+
];
|
|
58
|
+
const LEAVE_GROUPS = new Set(['dates', 'status', 'names', 'found', 'links']);
|
|
59
|
+
|
|
60
|
+
/** The default of one held change. PURE. */
|
|
61
|
+
function defaultOf(p) {
|
|
62
|
+
if (!isObj(p)) return { choice: null, waits: 'PMOS cannot read this change.' };
|
|
63
|
+
const never = NEVER.find((n) => { try { return n.test(p); } catch { return false; } });
|
|
64
|
+
if (never) return { choice: null, waits: never.waits, never: never.key };
|
|
65
|
+
if (!LEAVE_GROUPS.has(p.group)) return { choice: null, waits: 'PMOS has no safe default for this kind of change.' };
|
|
66
|
+
return { choice: 'leave', say: 'PMOS leaves the plan as it is' };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** id → the first day it was on the list. PURE. dayLines: the lines of question-days.jsonl, { day, ids }. */
|
|
70
|
+
function firstDays(dayLines) {
|
|
71
|
+
const out = new Map();
|
|
72
|
+
for (const l of dayLines || []) {
|
|
73
|
+
if (!isObj(l) || typeof l.day !== 'string' || !Array.isArray(l.ids)) continue;
|
|
74
|
+
for (const id of l.ids) { const k = String(id); const was = out.get(k); if (!was || l.day < was) out.set(k, l.day); }
|
|
75
|
+
}
|
|
76
|
+
return out;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** What PMOS defaulted, from the proposals ledger. PURE. A batch with an undo line is undone: its ids are never defaulted again. */
|
|
80
|
+
function defaultedOf(lines) {
|
|
81
|
+
const undoneB = new Set(), batches = new Map();
|
|
82
|
+
for (const l of lines || []) if (isObj(l) && l.kind === 'undo' && str(l.batch)) undoneB.add(l.batch);
|
|
83
|
+
for (const l of lines || []) {
|
|
84
|
+
if (!isObj(l) || l.kind !== 'drop' || l.default !== true || !str(l.batch)) continue;
|
|
85
|
+
if (!batches.has(l.batch)) batches.set(l.batch, []);
|
|
86
|
+
batches.get(l.batch).push(l);
|
|
87
|
+
}
|
|
88
|
+
const taken = new Map(), undone = new Set();
|
|
89
|
+
for (const [b, ls] of batches) for (const l of ls) { const id = str(l.id); if (!id) continue; if (undoneB.has(b)) undone.add(id); else taken.set(id, b); }
|
|
90
|
+
return { taken, undone, batches, undoneBatches: undoneB };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** One held change's state against the list and the ledger. */
|
|
94
|
+
function stateOf(h, first, D, today) {
|
|
95
|
+
const p = h.prop, id = String(p.id);
|
|
96
|
+
const d = defaultOf(p);
|
|
97
|
+
const since = first.get(id) || '';
|
|
98
|
+
const waiting = since && dn(today) != null ? Math.max(0, dn(today) - dn(since)) : 0;
|
|
99
|
+
if (!d.choice) return { id, d, since, waiting, due: '', open: false };
|
|
100
|
+
if (D.undone.has(id)) return { id, d: { choice: null, waits: 'You undid PMOS\'s default, so it waits for you.' }, since, waiting, due: '', open: false };
|
|
101
|
+
const due = since ? addDays(since, DEFAULT_DAYS) : '';
|
|
102
|
+
return { id, d, since, waiting, due, open: !D.taken.has(id) };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Each question with its default, the reason when it has none, and how long it has waited. PURE. */
|
|
106
|
+
function annotate(questions, held, { dayLines = [], lines = [], today = '', extra = [] } = {}) {
|
|
107
|
+
const first = firstDays(dayLines), D = defaultedOf(lines);
|
|
108
|
+
const byId = new Map((held || []).filter((h) => isObj(h) && isObj(h.prop)).map((h) => [String(h.prop.id), h]));
|
|
109
|
+
// the other asks on the card (dry-run gaps, sign-offs) never default; they still say why they wait and how long they have waited
|
|
110
|
+
for (const x of extra || []) if (isObj(x) && x.id && !byId.has(String(x.id))) byId.set(String(x.id), { ini: x.ini, prop: { id: String(x.id), group: 'ask', items: [] } });
|
|
111
|
+
return (questions || []).map((q) => {
|
|
112
|
+
const st = (q.ids || []).map((id) => byId.get(String(id))).filter(Boolean).map((h) => stateOf(h, first, D, today));
|
|
113
|
+
const yes = st.filter((s) => s.d.choice && s.due), no = st.filter((s) => !s.d.choice);
|
|
114
|
+
const due = yes.map((s) => s.due).sort()[0] || '';
|
|
115
|
+
const part = yes.length && yes.length < st.length ? ` for ${yes.length} of these ${st.length} changes` : '';
|
|
116
|
+
const def = yes.length ? { choice: 'leave', due, n: yes.length, say: `If nobody answers by ${md(due)}, PMOS leaves the plan as it is${part}. You can undo it.` } : null;
|
|
117
|
+
const reasons = [...new Set(no.map((s) => s.d.waits))];
|
|
118
|
+
const waits = no.length ? (reasons.join(' ') + ' So ' + (no.length === st.length ? 'it waits' : plural(no.length, 'change waits', 'changes wait')) + ' for you.') : null;
|
|
119
|
+
const waiting = Math.max(0, ...st.map((s) => s.waiting));
|
|
120
|
+
return { ...q, default: def, waits, waiting, cost: costOf(st.map((s) => byId.get(s.id)), waiting) };
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** A27, the cost of waiting: what the question holds up and for how long. PURE. → { days, tasks, taskDays, say } | null (zero is silence).
|
|
125
|
+
* tasks: the plan's tasks the held changes name; taskDays: tasks × days waited, the slip the plan does not show while nobody answers. */
|
|
126
|
+
function costOf(hs, days) {
|
|
127
|
+
const tasks = new Set();
|
|
128
|
+
for (const h of hs || []) for (const x of (h && h.prop && h.prop.items) || []) if (isObj(x)) tasks.add(String(x.task || x.id || x.title || ''));
|
|
129
|
+
tasks.delete('');
|
|
130
|
+
if (!days) return null;
|
|
131
|
+
const n = tasks.size;
|
|
132
|
+
const say = n ? `Waiting ${plural(days, 'day', 'days')}: ${plural(n, 'task stays', 'tasks stay')} as ${n === 1 ? 'it is' : 'they are'} until someone answers (${plural(n * days, 'task-day', 'task-days')}).`
|
|
133
|
+
: `Waiting ${plural(days, 'day', 'days')}.`;
|
|
134
|
+
return { days, tasks: n, taskDays: n * days, say };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** The held changes whose default is due on `today`, never taken and never undone. PURE. */
|
|
138
|
+
function dueOf(held, { dayLines = [], lines = [], today = '' } = {}) {
|
|
139
|
+
if (!today) return [];
|
|
140
|
+
const first = firstDays(dayLines), D = defaultedOf(lines);
|
|
141
|
+
return (held || []).filter((h) => {
|
|
142
|
+
if (!isObj(h) || !isObj(h.prop) || !h.prop.id || !h.ini) return false;
|
|
143
|
+
const s = stateOf(h, first, D, today);
|
|
144
|
+
return s.open && s.d.choice === 'leave' && s.due && s.due <= today;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Take the defaults due today: one batch per question (owner and initiative). → { taken: [...], why? } */
|
|
149
|
+
function take(dir, held, { dayLines = [], today = '', product = '', pm, now, env = process.env, settingsDir = null } = {}) {
|
|
150
|
+
const out = { taken: [] };
|
|
151
|
+
if (!dir || !today) return out;
|
|
152
|
+
const PR = require('./proposals.js');
|
|
153
|
+
const A = require('./autonomy.js');
|
|
154
|
+
const lines = PR.readLines(PR.ledgerFile(dir));
|
|
155
|
+
const due = dueOf(held, { dayLines, lines, today });
|
|
156
|
+
if (!due.length) return out;
|
|
157
|
+
const dec = A.decide({ stateDir: dir, job: JOB, product, cls: 'B', mode: 'auto', undoable: true, now, env, settingsDir });
|
|
158
|
+
if (!dec.apply) { out.why = dec.why; return out; }
|
|
159
|
+
const first = firstDays(dayLines);
|
|
160
|
+
const groups = require('./question-batch.js').questionsOf(due, { pm });
|
|
161
|
+
const byId = new Map(due.map((h) => [String(h.prop.id), h]));
|
|
162
|
+
for (const q of groups) {
|
|
163
|
+
const batch = PR.newBatch();
|
|
164
|
+
const hs = q.ids.map((id) => byId.get(String(id))).filter(Boolean);
|
|
165
|
+
const dueDay = hs.map((h) => addDays(first.get(String(h.prop.id)), DEFAULT_DAYS)).sort()[0];
|
|
166
|
+
const why = WHY(dueDay);
|
|
167
|
+
for (const h of hs) {
|
|
168
|
+
const p = h.prop;
|
|
169
|
+
const facts = PR.factsOf({ ...p, ini: h.ini });
|
|
170
|
+
PR.append(dir, { by: BY }, { kind: 'drop', ini: h.ini, board: h.board || '', sig: p.sig || PR.sigOf(p), id: String(p.id), group: str(p.group), type: str(p.type),
|
|
171
|
+
...(facts.length ? { facts } : {}), why, default: true, batch });
|
|
172
|
+
}
|
|
173
|
+
const title = `Left the plan as it was on ${one(q.title, 80)}: ${plural(hs.length, 'change', 'changes')} nobody answered by ${md(dueDay)}`;
|
|
174
|
+
A.recordApplied(dir, { job: JOB, product, ref: batch, title, cls: 'B', ini: q.ini, why }, { now, settingsDir });
|
|
175
|
+
out.taken.push({ batch, ini: q.ini, board: q.board, ids: hs.map((h) => String(h.prop.id)), title });
|
|
176
|
+
}
|
|
177
|
+
return out;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Undo one default PMOS took: its question comes back and waits for the PM. */
|
|
181
|
+
function undo(dir, batch, { product = '', actor = { by: 'pm' }, now } = {}) {
|
|
182
|
+
if (!dir || !/^pk-[0-9a-f]{10}$/.test(String(batch || ''))) return { ok: false, error: 'batch is a pk-… id' };
|
|
183
|
+
const PR = require('./proposals.js');
|
|
184
|
+
const D = defaultedOf(PR.readLines(PR.ledgerFile(dir)));
|
|
185
|
+
if (!D.batches.has(batch)) return { ok: false, status: 404, error: 'no default was taken under that id' };
|
|
186
|
+
if (D.undoneBatches.has(batch)) return { ok: false, status: 409, error: 'Nothing to undo' };
|
|
187
|
+
PR.append(dir, actor, { kind: 'undo', batch });
|
|
188
|
+
const r = require('./autonomy.js').recordSetback(dir, { job: JOB, product, ref: batch, kind: 'undo' }, { now });
|
|
189
|
+
return { ok: true, back: true, ...(r.demoted ? { demoted: r.demoted } : {}) };
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Is `batch` a default PMOS took (not a ✓ keep)? */
|
|
193
|
+
function isDefaultBatch(dir, batch) {
|
|
194
|
+
if (!dir) return false;
|
|
195
|
+
const PR = require('./proposals.js');
|
|
196
|
+
return defaultedOf(PR.readLines(PR.ledgerFile(dir))).batches.has(String(batch || ''));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
module.exports = { DEFAULT_DAYS, JOB, BY, WHY, NEVER, defaultOf, firstDays, defaultedOf, annotate, costOf, dueOf, take, undo, isDefaultBatch, addDays };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 1. writes the ledger's `epoch` on the first scan, so only events AFTER it wake a run (an old initiative is history);
|
|
8
8
|
* 2. closes runs that were alive when the server stopped (`run-end`, reason "interrupted"): they still count against the day;
|
|
9
9
|
* 3. finds the wakes: a `created` placement line (the page, Triage accept and `pmos initiative new` all write one), a board
|
|
10
|
-
* `move` line, a proposal the PM sent back with a note. Each key wakes once (the ledger's `wake` line makes it idempotent);
|
|
10
|
+
* `move` line (one the PM pressed on the page, `pressed: true`, wakes none: bet 1f), a proposal the PM sent back with a note. Each key wakes once (the ledger's `wake` line makes it idempotent);
|
|
11
11
|
* 4. every 30 minutes inside the day-check window, and outside quiet hours, runs the unblock sweep (no model, lib/driver.js);
|
|
12
12
|
* 5. starts the queued runs the rules allow (mode, pause, 3 at once) through spawnSession with origin `drive:<kind>:<id>`
|
|
13
13
|
* and the skill prompt, which lib/headless.js turns into a `claude -p` run with a fixed tool list.
|
package/workspace/lib/driver.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* plan(state, { now, running }) → { start: [{ target, board, wakes[] }], refused: [{ target, wakes[], reason }] }
|
|
19
19
|
* detect(facts, state, { now, stalledDays }) → the blockers, each { key, target, board, title, code, owner, cat, text }
|
|
20
20
|
* sweepLines(facts, state, { now, stalledDays }) → { blockers, lines } the lines to append (once per blocker per day)
|
|
21
|
-
* wakesFromLedgers({ created, moved }, state, { ws, epoch }) → wake lines for creations and moves not yet woken
|
|
21
|
+
* wakesFromLedgers({ created, moved }, state, { ws, epoch }) → wake lines for creations and moves not yet woken (a move pressed on the page, `pressed: true`, wakes none)
|
|
22
22
|
* answeredWakes(state) → wake lines for proposals the PM sent back with a note
|
|
23
23
|
* localDay(ms) · targetKey(target) · wsIdOf(root)
|
|
24
24
|
*
|
|
@@ -468,6 +468,9 @@ function wakesFromLedgers({ created = [], moved = [] } = {}, state, { ws, epoch,
|
|
|
468
468
|
}
|
|
469
469
|
for (const m of moved) {
|
|
470
470
|
if (!m || m.kind !== 'move' || typeof m.id !== 'string' || !ID_RE.test(m.id) || !after(m.at)) continue;
|
|
471
|
+
// a move the PM pressed on the page (a Board drag, a direct ✓: `pressed: true`) is the PM's own word: it wakes no follow-up run (bet 1f).
|
|
472
|
+
// The daily sweep still asks for the new stage's due documents. A move kept from a driver proposal, or made by an agent, still wakes one.
|
|
473
|
+
if (m.pressed === true) continue;
|
|
471
474
|
const key = `moved:${ws}:${m.id}:${m.at}`;
|
|
472
475
|
if (state.wakeKeys.has(key)) continue;
|
|
473
476
|
lines.push({ ev: 'wake', key, target: { kind: 'initiative', ws, id: m.id }, board: m.board || boardOf(m.id), reason: 'moved' });
|
|
@@ -265,8 +265,12 @@ function fold(lines) {
|
|
|
265
265
|
const expired = []; // expire lines, oldest first (History and Your move's "N expired")
|
|
266
266
|
const removes = []; // remove lines, oldest first: a deleted prototype version (removedOf)
|
|
267
267
|
let t = '', epoch = '';
|
|
268
|
+
// default-decisions-with-a-deadline: a drop PMOS took as a default carries its batch; the Undo of that batch reads it as never written
|
|
269
|
+
const undoneB = new Set();
|
|
270
|
+
for (const l of lines || []) if (isObj(l) && l.kind === 'undo' && str(l.batch)) undoneB.add(l.batch);
|
|
268
271
|
for (const l of lines || []) {
|
|
269
272
|
if (!isObj(l) || !KINDS.has(l.kind)) continue;
|
|
273
|
+
if (l.kind === 'drop' && str(l.batch) && undoneB.has(l.batch)) continue;
|
|
270
274
|
if (l.at && String(l.at) > t) t = String(l.at);
|
|
271
275
|
const ini = str(l.ini);
|
|
272
276
|
if (l.kind === 'epoch') { if (!epoch) epoch = str(l.at); }
|
|
@@ -102,4 +102,4 @@ function today(stateDir, held, { day, pm, now, extra = [] } = {}) {
|
|
|
102
102
|
return { day, questions: questionsOf(mine, { pm, extra: mineAsks }), later: list.length - mine.length + asks.length - mineAsks.length };
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
module.exports = { questionsOf, today, ownerOf, partOf, LEDGER };
|
|
105
|
+
module.exports = { questionsOf, today, ownerOf, partOf, readDays, LEDGER };
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* line where the work is.
|
|
12
12
|
* GET /api/autonomy/ahead?ws&ini&title → { ok, ws, ini, outcome: { date, metric, src } | null, jobs: [{ date, name, src }] }
|
|
13
13
|
* the initiative's dated things only the server reads, for the Viewer's Coming up list (lib/coming-up.js; batch 29 item 7)
|
|
14
|
-
* POST /api/autonomy/undo { ws, ref } → { ok, back, demoted? } Undo of one change: a Driver proposal (p-…), a ✦ batch (pk
|
|
14
|
+
* POST /api/autonomy/undo { ws, ref } → { ok, back, demoted? } Undo of one change: a Driver proposal (p-…), a ✦ batch (pk-…, also a default PMOS took
|
|
15
|
+
* on a question nobody answered, lib/default-decisions.js) or a lesson (im-…)
|
|
15
16
|
* POST /api/autonomy/seen { ws, job, product, until } → { ok } Home said the demotion once
|
|
16
17
|
* GET /api/autonomy/kinds → { ok, kinds: [{ kind, label, made, kept, undone, auto, set, way, until }], showUntil }
|
|
17
18
|
* How Claude decides (Settings › Claude, boards AwG and AwG2), over every product's state folders: lib/autonomy.js kindsOf. The PM
|
|
@@ -57,6 +58,11 @@ async function undoRef(ctx, w, ref, g) {
|
|
|
57
58
|
const PR = require('./proposals.js');
|
|
58
59
|
const dir = ctx.stateDirFor ? ctx.stateDirFor(w) : null;
|
|
59
60
|
const line = dir ? PR.readLines(PR.ledgerFile(dir)).find((l) => l.kind === 'keep' && l.batch === ref) : null;
|
|
61
|
+
// a default PMOS took on a question nobody answered (lib/default-decisions.js): its Undo brings the question back
|
|
62
|
+
if (!line && dir && require('./default-decisions.js').isDefaultBatch(dir, ref)) {
|
|
63
|
+
const r = require('./default-decisions.js').undo(dir, ref, { product: w.id, actor: g.actor });
|
|
64
|
+
return r.ok ? { status: 200, body: { ok: true, back: true, ...(r.demoted ? { demoted: r.demoted } : {}) } } : bad(r.status || 409, r.error);
|
|
65
|
+
}
|
|
60
66
|
if (!line) return bad(404, 'no change was applied under that id');
|
|
61
67
|
const RP = require('./routes-proposals.js');
|
|
62
68
|
const RB = require('./routes-boards.js');
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
* POST /api/boards/tasks/order { ws, board, initiative, section, tasks: [id] } → { ok, from } the PM's order inside one stage (a drag in the
|
|
33
33
|
* Tasks list, batch 18 item 16): a task-order line; tasks [] takes the order out; Undo sends `from` back
|
|
34
34
|
* POST /api/boards/tasks/state { ws, board, task, state } → { ok, item }
|
|
35
|
+
* POST /api/boards/ini-plan-end { ws, board, id, to } · ini-close-open { ws, board, id } · ini-reopen { ws, board, id }
|
|
36
|
+
* the popup's direct ✓ presses (bet 1f): see "direct ✓ presses" below; { ask: true } sends the words to Ask PMOS
|
|
35
37
|
* POST /api/boards/tasks/reschedule { ws, board, task, days } → { ok, item }
|
|
36
38
|
* POST /api/boards/tasks/undo-add { ws, board, task } → { ok } takes back a task added in the last 2 minutes, still To do
|
|
37
39
|
* POST /api/boards/tasks/rename { ws, board, task, title } → { ok, from, item } only the title changes
|
|
@@ -1145,7 +1147,7 @@ function moveOnWorkflow(ctx, res, body, g, p, own) {
|
|
|
1145
1147
|
if (!before.anchor) warnings.push('No anchor');
|
|
1146
1148
|
const happened = stageHappened(ctx, res, body, p.fr.folded, p.board.id);
|
|
1147
1149
|
if (happened === false) return;
|
|
1148
|
-
append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.wfStage.key, to: t.key, why: body.why || '', warnings, ...(happened ? { happened } : {}) });
|
|
1150
|
+
append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.wfStage.key, to: t.key, why: body.why || '', warnings, ...(happened ? { happened } : {}), ...(g.pressed ? { pressed: true } : {}) });
|
|
1149
1151
|
const f1 = foldOf(ctx, p.w), row = boardRow(p.board, b0, f1);
|
|
1150
1152
|
const made = stageTasks(p.file, f1, p.board, row, g.actor.by); // the new stage's To finish entries, as tasks
|
|
1151
1153
|
ctx.json(res, { ok: true, row, warnings, ...(made ? { tasksMade: made } : {}) });
|
|
@@ -1266,7 +1268,7 @@ const WRITES = {
|
|
|
1266
1268
|
const warnings = B.moveWarnings(p.board, before, before.stage, body.to, { hasSpec: b0.hasSpec });
|
|
1267
1269
|
const happened = stageHappened(ctx, res, body, p.fr.folded, p.board.id);
|
|
1268
1270
|
if (happened === false) return;
|
|
1269
|
-
append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.stage, to: body.to, why: body.why || '', warnings, ...(happened ? { happened } : {}) });
|
|
1271
|
+
append(p.file, g.actor, { kind: 'move', board: p.board.id, id: body.id, from: before.stage, to: body.to, why: body.why || '', warnings, ...(happened ? { happened } : {}), ...(g.pressed ? { pressed: true } : {}) });
|
|
1270
1272
|
const row = boardRow(p.board, b0, foldOf(ctx, p.w));
|
|
1271
1273
|
ctx.json(res, { ok: true, row, warnings });
|
|
1272
1274
|
},
|
|
@@ -1877,6 +1879,112 @@ const WRITES = {
|
|
|
1877
1879
|
},
|
|
1878
1880
|
};
|
|
1879
1881
|
|
|
1882
|
+
/* ── direct ✓ presses (initiative direct-plain-actions, bet 1f): three suggestions of the initiative popup (public/pm/pop-work-model.js
|
|
1883
|
+
* derivedOf d:plan-end and d:closed-open) used to type a sentence into Ask PMOS, and an agent session made a plain change. Each is now one
|
|
1884
|
+
* press that writes through the task and board routes above (writeAs: the same checks, the same ledger lines) and answers its own Undo.
|
|
1885
|
+
* When the plain reading does not hold, a route writes nothing and answers { ok: false, ask: true, error }: the page sends the old words
|
|
1886
|
+
* to Ask PMOS, as before.
|
|
1887
|
+
*
|
|
1888
|
+
* POST /api/boards/ini-plan-end { ws, board, id, to } → { ok, task, title, from: { due }, to, said } | { ok: true, same: true, said }
|
|
1889
|
+
* The plan end is not stored: it is the latest due day of the initiative's PMOS tasks and breakdown items. The open one that sets it
|
|
1890
|
+
* today gets `to` as its due day. A Done task that sets it, or no dated task at all, is { ask: true }.
|
|
1891
|
+
* POST /api/boards/ini-close-open { ws, board, id } → { ok, closed: [{ task, title, from }], said }
|
|
1892
|
+
* Every open PMOS task and breakdown item goes to Done. A Jira ticket is Jira's and is never written here. Undo: tasks/state with
|
|
1893
|
+
* each `from`.
|
|
1894
|
+
* POST /api/boards/ini-reopen { ws, board, id } → { ok, did: 'wontdo' | 'stage', to, undo: { route, body }, said }
|
|
1895
|
+
* Won't do: out of Won't do, back to the stage it was in. The last stage: back to the stage of the last move into it, else the stage
|
|
1896
|
+
* before it. Anything else is { ask: true }. */
|
|
1897
|
+
const OPEN_STATES = ['To do', 'In progress'];
|
|
1898
|
+
/** The PMOS tasks and breakdown items of one initiative, as { id, store, title, state, due }. Won't do and Archived are left out. */
|
|
1899
|
+
function workOfIni(p, id) {
|
|
1900
|
+
const out = [];
|
|
1901
|
+
for (const t of tasksOfIni(p.fr.folded, id)) {
|
|
1902
|
+
if (!t || t.initiative !== id || t.board !== p.board.id || t.state === "Won't do" || t.state === 'Archived') continue;
|
|
1903
|
+
out.push({ id: t.id, store: 'task', title: t.title, state: t.state, due: t.due ? String(t.due).slice(0, 10) : null });
|
|
1904
|
+
}
|
|
1905
|
+
for (const r of TI.rowsOf(p.w.root, new Set([id]), p.board.id)) out.push({ id: r.uid, store: 'item', title: r.title, state: r.status, due: r.end ? String(r.end).slice(0, 10) : null });
|
|
1906
|
+
return out;
|
|
1907
|
+
}
|
|
1908
|
+
/** The initiative of a direct press on this board: { p, b0, row } or null (the failure is answered). */
|
|
1909
|
+
function directFrame(ctx, res, body) {
|
|
1910
|
+
const p = postFrame(ctx, res, body);
|
|
1911
|
+
if (!p) return null;
|
|
1912
|
+
if (p.board.self) { fail(ctx, res, 409, SELF_REFUSAL); return null; }
|
|
1913
|
+
if (typeof body.id !== 'string' || !body.id) { fail(ctx, res, 400, 'id is required'); return null; }
|
|
1914
|
+
if (!p.file) { fail(ctx, res, 409, NO_STATE); return null; }
|
|
1915
|
+
const base = needRows(ctx, res, p.w);
|
|
1916
|
+
if (!base) return null;
|
|
1917
|
+
const b0 = base.find((r) => r.id === body.id);
|
|
1918
|
+
if (!b0 || boardIdOf(b0, p.fr.boards, p.fr.folded, p.w) !== p.board.id) { fail(ctx, res, 404, `no initiative ${body.id} on this board`); return null; }
|
|
1919
|
+
return { p, b0, row: boardRow(p.board, b0, p.fr.folded) };
|
|
1920
|
+
}
|
|
1921
|
+
const askBack = (ctx, res, error) => ctx.json(res, { ok: false, ask: true, error }, 409);
|
|
1922
|
+
const DAY_ONLY = /^\d{4}-\d{2}-\d{2}$/;
|
|
1923
|
+
Object.assign(WRITES, {
|
|
1924
|
+
'/api/boards/ini-plan-end': (ctx, res, body, g) => {
|
|
1925
|
+
if (typeof body.to !== 'string' || !DAY_ONLY.test(body.to)) return fail(ctx, res, 400, 'to is a day, YYYY-MM-DD');
|
|
1926
|
+
const f = directFrame(ctx, res, body);
|
|
1927
|
+
if (!f) return;
|
|
1928
|
+
const end = f.row.end ? String(f.row.end).slice(0, 10) : null;
|
|
1929
|
+
if (end && end >= body.to) return ctx.json(res, { ok: true, same: true, said: 'The plan already ends on ' + end + '.' });
|
|
1930
|
+
const work = workOfIni(f.p, body.id);
|
|
1931
|
+
const setter = end ? work.find((x) => x.due === end && OPEN_STATES.includes(x.state)) : null;
|
|
1932
|
+
if (!setter) return askBack(ctx, res, end ? 'a task that is done sets the plan end, so PMOS cannot move it by itself' : 'no dated PMOS task sets the plan end');
|
|
1933
|
+
const r = writeAs(ctx, '/api/boards/tasks/edit', { ws: body.ws, board: body.board, task: setter.id, due: body.to }, g);
|
|
1934
|
+
if (!r.body || r.body.ok === false) return ctx.json(res, r.body || { ok: false, error: 'the plan end was not moved' }, r.status);
|
|
1935
|
+
ctx.json(res, { ok: true, task: setter.id, title: setter.title, from: { due: end }, to: body.to, said: 'The plan end moved to ' + body.to + ': ' + setter.title + ' is due then.' });
|
|
1936
|
+
},
|
|
1937
|
+
'/api/boards/ini-close-open': (ctx, res, body, g) => {
|
|
1938
|
+
const f = directFrame(ctx, res, body);
|
|
1939
|
+
if (!f) return;
|
|
1940
|
+
const open = workOfIni(f.p, body.id).filter((x) => OPEN_STATES.includes(x.state));
|
|
1941
|
+
if (!open.length) return askBack(ctx, res, 'it has no open PMOS task: the open ones are Jira tickets, and Jira owns them');
|
|
1942
|
+
const closed = [], failed = [];
|
|
1943
|
+
for (const x of open) {
|
|
1944
|
+
const r = writeAs(ctx, '/api/boards/tasks/state', { ws: body.ws, board: body.board, task: x.id, state: 'Done', why: 'closed with its initiative' }, g);
|
|
1945
|
+
if (r.body && r.body.ok !== false) closed.push({ task: x.id, title: x.title, from: x.state }); else failed.push(x.title);
|
|
1946
|
+
}
|
|
1947
|
+
if (!closed.length) return fail(ctx, res, 500, 'no task was closed: ' + failed.join(', '));
|
|
1948
|
+
ctx.json(res, { ok: true, closed, said: closed.length + (closed.length === 1 ? ' task' : ' tasks') + ' closed.' + (failed.length ? ' Not closed: ' + failed.join(', ') + '.' : '') });
|
|
1949
|
+
},
|
|
1950
|
+
'/api/boards/ini-reopen': (ctx, res, body, g) => {
|
|
1951
|
+
const f = directFrame(ctx, res, body);
|
|
1952
|
+
if (!f) return;
|
|
1953
|
+
const { row } = f, k = B.key(f.p.board.id, body.id), stages = row.wfStages || [];
|
|
1954
|
+
const stageOf = (ref) => stages.find((s) => s.key === ref || s.name === ref) || null;
|
|
1955
|
+
const ended = f.p.fr.folded.ends ? f.p.fr.folded.ends.get(k) : null;
|
|
1956
|
+
const moves = (f.p.fr.folded.moves || []).filter((m) => m.board === f.p.board.id && m.id === body.id && m.via === 'move');
|
|
1957
|
+
if (ended) {
|
|
1958
|
+
const r = writeAs(ctx, '/api/boards/wontdo', { ws: body.ws, board: body.board, id: body.id, back: true }, g);
|
|
1959
|
+
if (!r.body || r.body.ok === false) return ctx.json(res, r.body || { ok: false, error: 'it was not reopened' }, r.status);
|
|
1960
|
+
// back from Won't do lands in Triage (scripts/boards.js): the stage it was in goes back too, by the name of the last move before Won't do
|
|
1961
|
+
const before = [...moves].reverse().find((m) => !ended.at || !m.at || m.at <= ended.at);
|
|
1962
|
+
const want = before ? before.to : (stageOf(ended.stage) || {}).name;
|
|
1963
|
+
let to = (r.body.row && r.body.row.stage) || 'Triage';
|
|
1964
|
+
if (want && want !== to) { const m = writeAs(ctx, '/api/boards/move', { ws: body.ws, board: body.board, id: body.id, to: want, why: 'reopened' }, g); if (m.body && m.body.ok) to = want; }
|
|
1965
|
+
return ctx.json(res, { ok: true, did: 'wontdo', to, undo: { route: '/api/boards/wontdo', body: { id: body.id, reason: ended.reason || 'other', note: ended.note || (ended.reason === 'other' ? 'closed again' : '') } }, said: 'Reopened in ' + to + '.' });
|
|
1966
|
+
}
|
|
1967
|
+
if (!row.closed || !row.wfStage) return askBack(ctx, res, 'it is not in Won\'t do or in its last stage, so PMOS cannot tell where it goes back to');
|
|
1968
|
+
const cur = row.wfStage, here = [row.stage, cur.key, cur.name].filter(Boolean);
|
|
1969
|
+
const into = [...moves].reverse().find((m) => here.includes(m.to));
|
|
1970
|
+
let back = into && into.from && !here.includes(into.from) ? into.from : null;
|
|
1971
|
+
if (!back) {
|
|
1972
|
+
// no move into it (a stage read from Jira or the files): the stage before it on the board's own list, else on the workflow's
|
|
1973
|
+
const cols = (row.workflow || []).map((x) => ({ name: x.name, cat: x.cat }));
|
|
1974
|
+
const list = cols.some((x) => x.name === row.stage) ? cols : stages.map((x) => ({ name: x.name, cat: x.cat, key: x.key }));
|
|
1975
|
+
const i = list.findIndex((x) => here.includes(x.name) || (x.key && here.includes(x.key)));
|
|
1976
|
+
const prev = list.slice(0, Math.max(0, i)).reverse().find((x) => String(x.cat || '').toLowerCase() !== 'done' && !END_RE.test(x.name || ''));
|
|
1977
|
+
back = prev ? prev.name : null;
|
|
1978
|
+
}
|
|
1979
|
+
if (!back) return askBack(ctx, res, 'it has no stage before its last one to go back to');
|
|
1980
|
+
const shut = into ? into.to : row.stage || cur.name;
|
|
1981
|
+
const r = writeAs(ctx, '/api/boards/move', { ws: body.ws, board: body.board, id: body.id, to: back, why: 'reopened' }, g);
|
|
1982
|
+
if (!r.body || r.body.ok === false) return ctx.json(res, r.body || { ok: false, error: 'it was not reopened' }, r.status);
|
|
1983
|
+
const to = (r.body.row && r.body.row.stage) || back;
|
|
1984
|
+
ctx.json(res, { ok: true, did: 'stage', to, undo: { route: '/api/boards/move', body: { id: body.id, to: shut, why: 'closed again' } }, said: 'Reopened in ' + to + '.' });
|
|
1985
|
+
},
|
|
1986
|
+
});
|
|
1987
|
+
|
|
1880
1988
|
async function handle(req, res, url, ctx) {
|
|
1881
1989
|
const p = url.pathname;
|
|
1882
1990
|
if (req.method === 'GET') {
|
|
@@ -1893,8 +2001,11 @@ async function handle(req, res, url, ctx) {
|
|
|
1893
2001
|
if (!got.ok) return fail(ctx, res, 400, 'invalid JSON body');
|
|
1894
2002
|
const body = got.body;
|
|
1895
2003
|
if (!isObj(body)) return fail(ctx, res, 400, 'the body must be a JSON object');
|
|
1896
|
-
const
|
|
1897
|
-
if (!
|
|
2004
|
+
const g0 = guard.requirePagePress(req, body);
|
|
2005
|
+
if (!g0.ok) return fail(ctx, res, g0.status, g0.error);
|
|
2006
|
+
// pressed: the write came straight from a press on the page (not a driver Keep, which calls the same route through writeAs). A stage move
|
|
2007
|
+
// made this way (by the PM, not an agent session sending its header) carries `pressed: true`, and the Driver wakes no follow-up run for it (bet 1f, lib/driver.js wakesFromLedgers).
|
|
2008
|
+
const g = { ...g0, pressed: !!(g0.actor && /^pm:/.test(String(g0.actor.by || ''))) };
|
|
1898
2009
|
fn(ctx, res, body, g);
|
|
1899
2010
|
return true;
|
|
1900
2011
|
}
|
|
@@ -98,6 +98,8 @@ function keepCore(ctx, p, g, f, ini, want, choices = {}, extra = {}) {
|
|
|
98
98
|
function undoCore(ctx, p, g, id) {
|
|
99
99
|
const dir = dirOf(ctx, p.w), F = PR.read(dir);
|
|
100
100
|
const k = F.kept.find((x) => x.batch === id);
|
|
101
|
+
// a default PMOS took on a question nobody answered (lib/default-decisions.js): no keep line, its drops go back
|
|
102
|
+
if (!k && require('./default-decisions.js').isDefaultBatch(dir, id)) { const r = require('./default-decisions.js').undo(dir, id, { product: p.w.id, actor: g.actor }); return r.ok ? { ok: true, back: 1, kept: 0, demoted: r.demoted || null } : { ok: false, status: r.status || 409, error: r.error }; }
|
|
101
103
|
if (!k || F.undone.has(id)) return { ok: false, status: 409, error: 'Nothing to undo' };
|
|
102
104
|
const f = TLR.frame(ctx, p.w, p.board);
|
|
103
105
|
if (!f) return { ok: false, status: 202, error: 'The board is still being read. Try again in a moment.' };
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
* DONE (C2, board CsD): what an agent kept by itself in the last 14 days, one line per batch with its Undo (lib/done-feed.js).
|
|
17
17
|
* QUESTIONS (act-alone-only-with-a-source): { day, questions: [lib/question-batch.js question], later } — the changes PMOS holds for want
|
|
18
18
|
* of a source, one question per owner and initiative, the PM's first; the list is fixed for the day (one line in question-days.jsonl).
|
|
19
|
-
* On the same card (dry-run-tickets-before-build): the dry-run gaps of drafted tickets and the outside sign-offs with no answer.
|
|
19
|
+
* On the same card (dry-run-tickets-before-build): the dry-run gaps of drafted tickets and the outside sign-offs with no answer.
|
|
20
|
+
* DEFAULTS (default-decisions-with-a-deadline, lib/default-decisions.js): each question carries `default` ({ choice, due, n, say } | null),
|
|
21
|
+
* `waits` (why it has no default | null), `waiting` (days on the list) and `cost` (A27: what the wait holds up | null). The read takes the
|
|
22
|
+
* defaults due today (one batch each, with Undo in "PMOS did"), and `taken` lists them. A dry-run gap or a sign-off never defaults. */
|
|
20
23
|
const YM = require('./your-move.js');
|
|
21
24
|
|
|
22
25
|
const localDay = (ms = Date.now()) => { const d = new Date(ms); return d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0'); };
|
|
@@ -68,13 +71,25 @@ function expire(ctx, w, now = Date.now()) {
|
|
|
68
71
|
|
|
69
72
|
/** The day's question list (act-alone-only-with-a-source): the changes PMOS holds for want of a source, one question per owner and
|
|
70
73
|
* initiative, fixed once a day (lib/question-batch.js). Questions for teammates are drafts: nothing is sent. */
|
|
71
|
-
function questions(ctx, w, today) {
|
|
74
|
+
function questions(ctx, w, today, { take = true } = {}) {
|
|
72
75
|
const dir = ctx.stateDirFor ? ctx.stateDirFor(w) : null;
|
|
76
|
+
const QB = require('./question-batch.js'), DD = require('./default-decisions.js');
|
|
73
77
|
let held = [];
|
|
74
78
|
try { held = require('./routes-proposals.js').heldOf(ctx, w); } catch { held = []; }
|
|
75
79
|
let extra = [];
|
|
76
80
|
try { extra = asksOf(w.root); } catch { extra = []; }
|
|
77
|
-
|
|
81
|
+
let Q = QB.today(dir, held, { day: today, extra });
|
|
82
|
+
if (!dir) return Q;
|
|
83
|
+
// default-decisions-with-a-deadline: a change nobody answered by its due day takes its default (PMOS leaves the plan as it is, with
|
|
84
|
+
// Undo); the question then leaves the list. Every question left says its default or why it waits, and what the wait costs (A27).
|
|
85
|
+
let taken = [];
|
|
86
|
+
if (take) {
|
|
87
|
+
try { taken = DD.take(dir, held, { dayLines: QB.readDays(dir), today, product: w.id, settingsDir: ctx.runtimeDir || null }).taken; } catch { taken = []; }
|
|
88
|
+
if (taken.length) { const gone = new Set(taken.flatMap((t) => t.ids)); held = held.filter((h) => !gone.has(String(h.prop.id))); Q = QB.today(dir, held, { day: today, extra }); }
|
|
89
|
+
}
|
|
90
|
+
const PR = require('./proposals.js');
|
|
91
|
+
const questions2 = DD.annotate(Q.questions, held, { dayLines: QB.readDays(dir), lines: PR.readLines(PR.ledgerFile(dir)), today, extra });
|
|
92
|
+
return { ...Q, questions: questions2, ...(taken.length ? { taken: taken.map((t) => ({ batch: t.batch, ini: t.ini, board: t.board, n: t.ids.length, title: t.title })) } : {}) };
|
|
78
93
|
}
|
|
79
94
|
|
|
80
95
|
/** The other asks on the same card (dry-run-tickets-before-build): each ticket's dry-run gaps nobody answered (lib/ticket-dry-run.js),
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* tracker-refresh-run.js — the weekly tracker refresh as a plain script, not an agent session (initiative direct-plain-actions, bet 1f B4).
|
|
3
|
+
*
|
|
4
|
+
* refresh(root, { runtimeDir, now }) → { ok, moved: [line], left: [line], notFound: [line], skipped: n, read }
|
|
5
|
+
* line: { item, title, ref, from?, to?, file?, date?, why? }
|
|
6
|
+
*
|
|
7
|
+
* The tracker-refresh skill (skills/tracker-refresh.skill) was an agent run that needed no judgement: find the plan items a tracker owns,
|
|
8
|
+
* find the local file that states each one's status, and move the item to that state with the file as its evidence. This module does the
|
|
9
|
+
* same procedure by code, under the same rules (D71):
|
|
10
|
+
* 1. LOCAL FILES ONLY: no tracker call, no network, no git fetch.
|
|
11
|
+
* 2. READ-ONLY on every source; the only write is a `moved` line in the plan-items ledger with `file:<path>` evidence, by the same writer
|
|
12
|
+
* `pmos item move` uses (lib/plan-items.js), plus the freshness record of the read (lib/tracker-read.js), which is not a ledger line.
|
|
13
|
+
* 3. Evidence for every move: no file, no move.
|
|
14
|
+
* 4. Nothing invented: a file that states more than one status for the reference is not evidence; no file, the item is "not found".
|
|
15
|
+
* 5. Light on content: only the lines that name the reference are read for a status. A file whose name says private, personal,
|
|
16
|
+
* confidential or HR is skipped and counted.
|
|
17
|
+
* 6. Never a Done or Withdrawn item: only items in todo, doing or review are read.
|
|
18
|
+
* 7. A file PMOS writes is never evidence: no `*.jsonl`, nothing under <state>/runs/, <state>/reports/ or <state>/tracker/jira/ (the Jira
|
|
19
|
+
* snapshot belongs to the Jira tickets tab, not to plan items).
|
|
20
|
+
* 8. An old file never undoes a newer move: the file's date (its `timestamp` frontmatter, else its last commit) must be later than the
|
|
21
|
+
* item's last move. A file with neither date is not evidence.
|
|
22
|
+
* Where it looks, in order: <state>/requirements/, the rest of <state>/, then docs/. <state> is pmos/state/ when it exists, else planning/.
|
|
23
|
+
* The newest accepted file wins; when two accepted files disagree, the line says so.
|
|
24
|
+
*/
|
|
25
|
+
const fs = require('fs');
|
|
26
|
+
const path = require('path');
|
|
27
|
+
const { execFileSync } = require('child_process');
|
|
28
|
+
const planItems = require('./plan-items.js');
|
|
29
|
+
const TR = require('./tracker-read.js');
|
|
30
|
+
|
|
31
|
+
const OPEN = new Set(['todo', 'doing', 'review']);
|
|
32
|
+
// the skill's table, most specific first so "In Progress" is never read as "Open" or "Done"
|
|
33
|
+
const STATUS = [
|
|
34
|
+
['review', /\b(in review|code review|qa|testing)\b/i],
|
|
35
|
+
['doing', /\b(in progress|doing|started)\b/i],
|
|
36
|
+
['done', /\b(done|closed|resolved|released)\b/i],
|
|
37
|
+
['todo', /\b(to do|todo|open|backlog|ready)\b/i],
|
|
38
|
+
];
|
|
39
|
+
const PRIVATE = /private|personal|confidential|(^|[^a-z])hr([^a-z]|$)/i;
|
|
40
|
+
const TEXT = /\.(md|markdown|txt|csv|tsv|json|ya?ml|html?)$/i;
|
|
41
|
+
const MAX_BYTES = 1 << 20;
|
|
42
|
+
const MAX_FILES = 5000;
|
|
43
|
+
|
|
44
|
+
function stateDirOf(root) {
|
|
45
|
+
const kit = path.join(root, 'pmos', 'state');
|
|
46
|
+
try { if (fs.statSync(kit).isDirectory()) return kit; } catch { /* not a kit layout */ }
|
|
47
|
+
return path.join(root, 'planning');
|
|
48
|
+
}
|
|
49
|
+
const escapeRe = (s) => String(s).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
50
|
+
|
|
51
|
+
/** The text files to search, in the skill's order, with the files PMOS writes left out. → { files: [abs], skipped } */
|
|
52
|
+
function filesOf(root, state) {
|
|
53
|
+
const out = [], seen = new Set();
|
|
54
|
+
let skipped = 0;
|
|
55
|
+
const banned = [path.join(state, 'runs'), path.join(state, 'reports'), path.join(state, 'tracker', 'jira')].map((d) => d + path.sep);
|
|
56
|
+
const walk = (dir) => {
|
|
57
|
+
let names;
|
|
58
|
+
try { names = fs.readdirSync(dir, { withFileTypes: true }); } catch { return; }
|
|
59
|
+
for (const d of names.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
60
|
+
if (out.length >= MAX_FILES) return;
|
|
61
|
+
if (d.name.startsWith('.') || d.name === 'node_modules') continue;
|
|
62
|
+
const p = path.join(dir, d.name);
|
|
63
|
+
if (d.isDirectory()) { if (!banned.some((b) => (p + path.sep).startsWith(b))) walk(p); continue; }
|
|
64
|
+
if (!d.isFile() || seen.has(p) || /\.jsonl$/i.test(d.name) || !TEXT.test(d.name) || banned.some((b) => p.startsWith(b))) continue;
|
|
65
|
+
if (PRIVATE.test(d.name)) { skipped++; seen.add(p); continue; }
|
|
66
|
+
seen.add(p); out.push(p);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
walk(path.join(state, 'requirements'));
|
|
70
|
+
walk(state);
|
|
71
|
+
walk(path.join(root, 'docs'));
|
|
72
|
+
return { files: out, skipped };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** The date of a file: its `timestamp` frontmatter, else its last commit, else null. */
|
|
76
|
+
function dateOf(root, abs, text) {
|
|
77
|
+
const fm = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text);
|
|
78
|
+
const ts = fm && /^timestamp:\s*["']?([0-9]{4}-[0-9]{2}-[0-9]{2}[^"'\s]*)/m.exec(fm[1]);
|
|
79
|
+
if (ts && Number.isFinite(Date.parse(ts[1]))) return new Date(Date.parse(ts[1])).toISOString();
|
|
80
|
+
try {
|
|
81
|
+
const out = execFileSync('git', ['log', '-1', '--format=%cI', '--', path.relative(root, abs)], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'], timeout: 5000 }).trim();
|
|
82
|
+
if (out && Number.isFinite(Date.parse(out))) return new Date(Date.parse(out)).toISOString();
|
|
83
|
+
} catch { /* not a git repository, or not committed */ }
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** The status one file states for a reference: { state } | { many: [states] } | null (the file does not name it, or names no status). */
|
|
88
|
+
function statusIn(text, ref) {
|
|
89
|
+
const re = new RegExp('(^|[^A-Za-z0-9-])' + escapeRe(ref) + '(?![A-Za-z0-9])', 'i');
|
|
90
|
+
const found = new Set();
|
|
91
|
+
for (const line of text.split(/\r?\n/)) {
|
|
92
|
+
if (!re.test(line)) continue;
|
|
93
|
+
const rest = line.replace(new RegExp(escapeRe(ref), 'ig'), ' ');
|
|
94
|
+
// every status the line names counts: "was In Review, now Done" states two, and two is not evidence
|
|
95
|
+
let left = rest;
|
|
96
|
+
for (const [state, sre] of STATUS) { const g = new RegExp(sre.source, 'ig'); if (g.test(left)) { found.add(state); left = left.replace(g, ' '); } }
|
|
97
|
+
}
|
|
98
|
+
if (!found.size) return null;
|
|
99
|
+
return found.size === 1 ? { state: [...found][0] } : { many: [...found] };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** The item's last move (or its creation): the day a file must be later than. */
|
|
103
|
+
function lastMoveOf(it) {
|
|
104
|
+
const moved = (it.history || []).filter((h) => h && h.ev === 'moved' && h.at).map((h) => h.at).sort();
|
|
105
|
+
return moved.length ? moved[moved.length - 1] : it.createdAt || null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function refresh(root, { runtimeDir, now = new Date() } = {}) {
|
|
109
|
+
let fold;
|
|
110
|
+
try { fold = planItems.readFold(root); } catch (e) { return { ok: false, error: 'could not read the plan items: ' + String((e && e.message) || e).slice(0, 160) }; }
|
|
111
|
+
const state = stateDirOf(root);
|
|
112
|
+
const items = Object.values(fold.items || {}).filter((it) => it && !it.proposed && OPEN.has(it.state) && /^tracker:./.test(String(it.owner || '')));
|
|
113
|
+
const moved = [], left = [], notFound = [];
|
|
114
|
+
const { files, skipped } = items.length ? filesOf(root, state) : { files: [], skipped: 0 };
|
|
115
|
+
const texts = new Map();
|
|
116
|
+
const textOf = (f) => {
|
|
117
|
+
if (!texts.has(f)) { let t = null; try { if (fs.statSync(f).size <= MAX_BYTES) t = fs.readFileSync(f, 'utf8'); } catch { t = null; } texts.set(f, t); }
|
|
118
|
+
return texts.get(f);
|
|
119
|
+
};
|
|
120
|
+
const events = [];
|
|
121
|
+
for (const it of items) {
|
|
122
|
+
const ref = String(it.owner).slice('tracker:'.length).trim();
|
|
123
|
+
const base = { item: it.id, title: it.title, ref };
|
|
124
|
+
const hits = [];
|
|
125
|
+
let many = null;
|
|
126
|
+
for (const f of files) {
|
|
127
|
+
const text = textOf(f);
|
|
128
|
+
if (!text || !text.toLowerCase().includes(ref.toLowerCase())) continue;
|
|
129
|
+
const st = statusIn(text, ref);
|
|
130
|
+
if (!st) continue;
|
|
131
|
+
const rel = path.relative(root, f).split(path.sep).join('/');
|
|
132
|
+
if (st.many) { many = many || { file: rel, states: st.many }; continue; }
|
|
133
|
+
const date = dateOf(root, f, text);
|
|
134
|
+
if (!date) continue;
|
|
135
|
+
hits.push({ file: rel, date, state: st.state });
|
|
136
|
+
}
|
|
137
|
+
if (!hits.length) { notFound.push({ ...base, why: many ? `${many.file} states more than one status (${many.states.join(', ')})` : 'no local file states its status' }); continue; }
|
|
138
|
+
hits.sort((a, b) => b.date.localeCompare(a.date) || a.file.localeCompare(b.file));
|
|
139
|
+
const top = hits[0];
|
|
140
|
+
const disagree = hits.some((h) => h.state !== top.state) ? ` (older files say ${[...new Set(hits.filter((h) => h.state !== top.state).map((h) => h.state))].join(', ')}; the newest is used)` : '';
|
|
141
|
+
const since = lastMoveOf(it);
|
|
142
|
+
if (since && !(top.date > since)) { left.push({ ...base, file: top.file, date: top.date, why: 'file older than the last move' + disagree }); continue; }
|
|
143
|
+
if (top.state === it.state) { left.push({ ...base, file: top.file, date: top.date, why: 'already ' + it.state + disagree }); continue; }
|
|
144
|
+
events.push({ ev: 'moved', item: it.id, to: top.state, evidence: 'file:' + top.file });
|
|
145
|
+
moved.push({ ...base, from: it.state, to: top.state, file: top.file, date: top.date, ...(disagree ? { why: disagree.trim() } : {}) });
|
|
146
|
+
}
|
|
147
|
+
if (events.length) {
|
|
148
|
+
const w = planItems.appendFromCli(root, events, { isTTY: false, env: {}, now: now.getTime ? now.getTime() : undefined });
|
|
149
|
+
if (!w.ok) return { ok: false, error: 'the moves were not saved: ' + w.error, moved: [], left, notFound };
|
|
150
|
+
}
|
|
151
|
+
let read = null;
|
|
152
|
+
if (runtimeDir) { try { read = TR.write(runtimeDir, root, { moved: moved.length, left: left.length, not_found: notFound.length }, now); } catch { read = null; } }
|
|
153
|
+
return { ok: true, moved, left, notFound, skipped, read };
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** One short summary line for a run record. */
|
|
157
|
+
function summary(r) {
|
|
158
|
+
if (!r || !r.ok) return (r && r.error) || 'the refresh failed';
|
|
159
|
+
return `${r.moved.length} moved, ${r.left.length} left as they are, ${r.notFound.length} not found` + (r.skipped ? `, ${r.skipped} private files skipped` : '');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
module.exports = { refresh, summary, statusIn, stateDirOf };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.672.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.672.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -382,8 +382,8 @@ function sugPageHtml(s, W) {
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
/* ── writes ── */
|
|
385
|
-
/* the suggestions PMOS reads from the record (pop-work-model.js derivedOf): ✓ puts a task in a stage,
|
|
386
|
-
* does it in a real session; ✕ hides it on this computer */
|
|
385
|
+
/* the suggestions PMOS reads from the record (pop-work-model.js derivedOf): ✓ puts a task in a stage, writes a plain change at once (direct),
|
|
386
|
+
* or sends the words to Ask PMOS, which does it in a real session; ✕ hides it on this computer */
|
|
387
387
|
const DROP = 'pw-dropped';
|
|
388
388
|
const dropped = () => new Set(store.get(DROP, []));
|
|
389
389
|
let ASK_AT = null; // the initiative shown ({ id, ws }): a phone sends the words to Ask PMOS about it
|
|
@@ -399,10 +399,30 @@ function sendToChat(text) {
|
|
|
399
399
|
const f = ta.closest('form'); if (f && f.requestSubmit) f.requestSubmit(); else ta.focus();
|
|
400
400
|
return true;
|
|
401
401
|
}
|
|
402
|
+
/* a direct ✓ (bet 1f): the plan end, closing the open tasks, reopening. One press writes through POST /api/boards/ini-<act> with Undo; no chat
|
|
403
|
+
* message, no session. Only when the route answers ask: true (the plain reading does not hold) do the words go to Ask PMOS, as before. */
|
|
404
|
+
async function direct(d, ask, x, h) {
|
|
405
|
+
const w = h.where ? h.where() : {}, id = x.o().id;
|
|
406
|
+
const res = await pmPost('/api/boards/ini-' + d.act, { ws: w.ws, board: w.board, id, ...(d.to ? { to: d.to } : {}) }).catch(() => null);
|
|
407
|
+
if (!res || res.ask) { if (ask && !sendToChat(ask) && h.toast) h.toast('Open Ask PMOS to send this.'); return; }
|
|
408
|
+
if (res.ok === false) { if (h.toast) h.toast(res.error || 'Nothing was changed.'); return; }
|
|
409
|
+
if (h.reload) await h.reload();
|
|
410
|
+
if (res.same) { if (h.toast) h.toast(res.said || 'Nothing to change.'); return; }
|
|
411
|
+
const back = async (route, body) => { const u = await pmPost(route, { ws: w.ws, board: w.board, ...body }).catch(() => null); return !!u && u.ok !== false; };
|
|
412
|
+
undoToast(res.said || 'Done.', async () => {
|
|
413
|
+
let ok = true;
|
|
414
|
+
if (d.act === 'plan-end') ok = await back('/api/boards/tasks/edit', { task: res.task, due: (res.from && res.from.due) || '' });
|
|
415
|
+
else if (d.act === 'close-open') { for (const c of res.closed || []) ok = (await back('/api/boards/tasks/state', { task: c.task, state: c.from })) && ok; }
|
|
416
|
+
else if (res.undo && /^\/api\/boards\/(move|wontdo)$/.test(res.undo.route)) ok = await back(res.undo.route, res.undo.body);
|
|
417
|
+
if (!ok && h.toast) h.toast('The undo did not land.');
|
|
418
|
+
if (h.reload) await h.reload();
|
|
419
|
+
});
|
|
420
|
+
}
|
|
402
421
|
async function keepSug(s, x, h) {
|
|
403
422
|
if (s.derived) {
|
|
404
423
|
if (s.move && h.move) { await h.move(s.move.uid, { to: s.move.to, from: '', name: s.move.name }); return; }
|
|
405
424
|
if (s.moveAll) { await moveAll(s.moveAll, h); return; }
|
|
425
|
+
if (s.direct) { await direct(s.direct, s.ask, x, h); return; }
|
|
406
426
|
if (s.ask && !sendToChat(s.ask) && h.toast) h.toast('Open Ask PMOS to send this.');
|
|
407
427
|
return;
|
|
408
428
|
}
|
|
@@ -506,7 +526,7 @@ export function wire(body, h0, x0) {
|
|
|
506
526
|
if (d.pwLdrop) { const dd = dropped(); for (const k of d.pwLdrop.split(',')) dd.add(k); store.set(DROP, [...dd].slice(-200)); redraw(); return; }
|
|
507
527
|
if ('pwPdocs' in d) { if (PH_ARTS.has(c.id)) PH_ARTS.delete(c.id); else PH_ARTS.add(c.id); redraw(); return; }
|
|
508
528
|
if (d.pwSrc) { if (h.doc) h.doc(d.pwSrc); return; }
|
|
509
|
-
if (d.pwChoice) { const [sid, k] = d.pwChoice.split('|'), s = findSug(W, sid), ch = s && s.choices && s.choices[+k]; if (ch && !sendToChat(ch.ask) && h.toast) h.toast('Open Ask PMOS to send this.'); return; }
|
|
529
|
+
if (d.pwChoice) { const [sid, k] = d.pwChoice.split('|'), s = findSug(W, sid), ch = s && s.choices && s.choices[+k]; if (ch && ch.direct) { b.disabled = true; await direct(ch.direct, ch.ask, x, h); return; } if (ch && !sendToChat(ch.ask) && h.toast) h.toast('Open Ask PMOS to send this.'); return; }
|
|
510
530
|
if (d.pwMore != null) { S.moreOpen.add(d.pwMore); redraw(); return; }
|
|
511
531
|
if (d.pwVer) { if (ARTOPEN.has(d.pwVer)) ARTOPEN.delete(d.pwVer); else ARTOPEN.add(d.pwVer); redraw(); return; }
|
|
512
532
|
if (d.pwRowMore) { rowMenu(b, d.pwRowMore, c, h, body); return; }
|
|
@@ -439,8 +439,10 @@ const whenOf = (w, t) => { const s = String(w || ''); return day(s) ? dayText(s,
|
|
|
439
439
|
|
|
440
440
|
/* ── what PMOS suggests from the record itself (board 3, 25), next to what lib/proposals.js proposes ── */
|
|
441
441
|
const andList = (a) => (a.length <= 1 ? a.join('') : a.slice(0, -1).join(', ') + ' and ' + a[a.length - 1]);
|
|
442
|
-
/** derivedOf(r, v, o, bd, arts) → { top: [s], rows: Map(uid → s) }. Each s: { id, derived: true, say, why, ask?, move? }. ask: the words ✓
|
|
443
|
-
* to Ask PMOS, which does it in a real session; move: { uid, to, name } ✓ puts a task in a stage.
|
|
442
|
+
/** derivedOf(r, v, o, bd, arts) → { top: [s], rows: Map(uid → s) }. Each s: { id, derived: true, say, why, ask?, move?, direct? }. ask: the words ✓
|
|
443
|
+
* sends to Ask PMOS, which does it in a real session; move: { uid, to, name } ✓ puts a task in a stage. direct: { act, to? } ✓ (or a choice)
|
|
444
|
+
* writes at once through POST /api/boards/ini-<act>, with Undo, and sends `ask` only when the route answers ask: true (bet 1f). o.dropped: the
|
|
445
|
+
* ids the PM said No to. */
|
|
444
446
|
export function derivedOf(r, v, o, bd, arts) {
|
|
445
447
|
const t = todayOf(o), drop = o.dropped || new Set(), top = [], rows = new Map(), title = v.title || r.title || 'this initiative';
|
|
446
448
|
const live = r.status !== 'done' && !r.ended && !r.closed;
|
|
@@ -451,7 +453,7 @@ export function derivedOf(r, v, o, bd, arts) {
|
|
|
451
453
|
const last = all.sort((a, b) => b.end.localeCompare(a.end))[0];
|
|
452
454
|
if (last) top.push({ id: 'd:plan-end', derived: true, say: 'Move the plan end to ' + dayText(last.end, t) + '. It follows ' + last.title + '.',
|
|
453
455
|
why: 'The plan ended on ' + dayText(r.end, t) + ', and ' + last.title + ' is due on ' + dayText(last.end, t) + '.',
|
|
454
|
-
ask: 'Move the plan end of ' + title + ' to ' + last.end + ': it follows the task ' + last.title + '. Tell me what else moves.' });
|
|
456
|
+
ask: 'Move the plan end of ' + title + ' to ' + last.end + ': it follows the task ' + last.title + '. Tell me what else moves.', direct: { act: 'plan-end', to: last.end } });
|
|
455
457
|
}
|
|
456
458
|
// a document the gate needs is not written: PMOS drafts it from what is written, for the PM to read
|
|
457
459
|
const miss = (arts || []).filter((a) => a.missing).map((a) => a.title);
|
|
@@ -466,8 +468,8 @@ export function derivedOf(r, v, o, bd, arts) {
|
|
|
466
468
|
if ((r.closed || r.ended || r.status === 'done') && nOpen > 0) {
|
|
467
469
|
const w = r.status === 'done' && !r.closed && !r.ended ? 'done' : 'closed';
|
|
468
470
|
top.unshift({ id: 'd:closed-open', derived: true, say: 'It is ' + w + ', but ' + plural(nOpen, 'task is', 'tasks are') + ' open. Close them, or reopen the initiative?',
|
|
469
|
-
why: '', choices: [{ label: 'Close them', ask: 'Close the ' + plural(nOpen, 'open task', 'open tasks') + ' of ' + title + '. It is ' + w + '. Tell me what you closed.' },
|
|
470
|
-
{ label: 'Reopen', ask: 'Reopen ' + title + ': it has ' + plural(nOpen, 'open task', 'open tasks') + '. Put it back in the stage it was in before, and tell me where.' }] });
|
|
471
|
+
why: '', choices: [{ label: 'Close them', ask: 'Close the ' + plural(nOpen, 'open task', 'open tasks') + ' of ' + title + '. It is ' + w + '. Tell me what you closed.', direct: { act: 'close-open' } },
|
|
472
|
+
{ label: 'Reopen', ask: 'Reopen ' + title + ': it has ' + plural(nOpen, 'open task', 'open tasks') + '. Put it back in the stage it was in before, and tell me where.', direct: { act: 'reopen' } }] });
|
|
471
473
|
}
|
|
472
474
|
// one ✦ on the Not in a stage row (round 3 point 21), keyed 'stage:' (the row of no stage)
|
|
473
475
|
const lz = (bd && bd.loose) || [];
|
package/workspace/server.js
CHANGED
|
@@ -2640,9 +2640,27 @@ function endSupersededRuns(origin, now = Date.now()) {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
return ended;
|
|
2642
2642
|
}
|
|
2643
|
+
/* A skill done by code, not an agent session (bet 1f): the tracker refresh reads local files and moves items by a fixed procedure, so it
|
|
2644
|
+
* needs no model (lib/tracker-refresh-run.js). → { ok, got?, error? } */
|
|
2645
|
+
function isCodeSkill(skill) { return skill === 'tracker-refresh'; }
|
|
2646
|
+
function codeSkillRun(skill, wsId) {
|
|
2647
|
+
if (!isCodeSkill(skill)) return { ok: false, error: `${skill} is not done by code` };
|
|
2648
|
+
const w = (wsId && workspaces.get(wsId)) || homeWorkspace();
|
|
2649
|
+
if (!w) return { ok: false, error: 'no workspace' };
|
|
2650
|
+
const TRR = require('./lib/tracker-refresh-run.js');
|
|
2651
|
+
const r = TRR.refresh(w.root, { runtimeDir: STATE });
|
|
2652
|
+
try { if (r.ok && r.moved.length) boardCache.invalidate(w.root); } catch { /* the next read rebuilds */ }
|
|
2653
|
+
return r.ok ? { ok: true, got: TRR.summary(r), result: r } : { ok: false, error: r.error };
|
|
2654
|
+
}
|
|
2643
2655
|
function fireSchedule(sched, opts = {}) {
|
|
2644
2656
|
const w = workspaces.get(sched.ws) || homeWorkspace();
|
|
2645
2657
|
const root = w ? w.root : SELF_ROOT;
|
|
2658
|
+
if (isCodeSkill(sched.skill) || isCodeSkill(sched.task)) {
|
|
2659
|
+
const r = codeSkillRun(isCodeSkill(sched.skill) ? sched.skill : sched.task, sched.ws);
|
|
2660
|
+
const list = readSchedules(); const cur = list.find((x) => x.id === sched.id);
|
|
2661
|
+
if (cur) { cur.lastRun = nowISO(); cur.lastStatus = r.ok ? 'ok' : 'fail'; if (!opts.release) { cur.nextRun = scheduleLogic.nextRun(cur); if (cur.cadence === 'once') cur.enabled = false; countRun(cur); } writeSchedules(list); }
|
|
2662
|
+
return { ok: r.ok, kind: 'code', sessionId: null, reason: r.ok ? r.got : r.error };
|
|
2663
|
+
}
|
|
2646
2664
|
// One corpus load probing both keys — taskById would re-read every .skill file per probe.
|
|
2647
2665
|
const tasks = loadTasks(root);
|
|
2648
2666
|
const byId = (id) => tasks.find((t) => t.id === id || t.skill === id) || null;
|
|
@@ -5702,6 +5720,15 @@ function myWorkRead(wsId) {
|
|
|
5702
5720
|
/** Refresh now (workspace-data-freshness R7): start skill `skillId` in a session of repository `wsId`, as myWorkRead does. */
|
|
5703
5721
|
function startSkillSession(wsId, skillId, name, origin, opts) {
|
|
5704
5722
|
if (Array.isArray(skillId)) return startSharedRefreshSession(wsId, skillId, name, origin, opts); // smart refresh step 2: several due sources, one session
|
|
5723
|
+
// a skill done by code (bet 1f: the tracker refresh): no session; the refresh engine writes its run lines from the answer (code: true)
|
|
5724
|
+
// the refresh log records it as a run with no session: started, then ended with the script's answer (lib/refresh-run.js started, ended)
|
|
5725
|
+
if (isCodeSkill(skillId)) {
|
|
5726
|
+
const s = { id: 'code-' + crypto.randomBytes(4).toString('hex'), ws: wsId || null, origin: origin || 'refresh:' + (refreshLib.SKILL_OF.get(skillId) || skillId), state: 'running' };
|
|
5727
|
+
try { refreshRun.started(s); } catch (e) { warnWriteFail('refresh log (code run)', e); }
|
|
5728
|
+
const r = codeSkillRun(skillId, wsId);
|
|
5729
|
+
try { refreshRun.ended(s, { result: r.ok ? 'done' : 'failed', got: r.got || null, error: r.ok ? null : r.error }); } catch (e) { warnWriteFail('refresh log (code run)', e); }
|
|
5730
|
+
return { ...r, code: true, session: null };
|
|
5731
|
+
}
|
|
5705
5732
|
const w = getWs(wsId);
|
|
5706
5733
|
if (!w) return { ok: false, status: 400, error: 'no workspace' };
|
|
5707
5734
|
const task = taskById(skillId, w.root);
|
|
@@ -13,6 +13,8 @@ output:
|
|
|
13
13
|
|
|
14
14
|
/tracker-refresh — bring the plan items that a tracker owns up to date for THIS repository. A tracker-owned item has an owner that starts with `tracker:`. You read files that are already here and you append evidence lines. You call no tracker.
|
|
15
15
|
|
|
16
|
+
The weekly schedule and the Refresh press do this procedure by code, with no agent session (lib/tracker-refresh-run.js, bet 1f). You run it only when the PM asks an agent for it.
|
|
17
|
+
|
|
16
18
|
This skill runs before the bi-weekly report (`report-biweekly`). The report script reads only the ledgers. It cannot call a tracker (R30, D71), so the evidence lines you write are the only way a tracker item reaches the report.
|
|
17
19
|
|
|
18
20
|
Rules that always hold (D71):
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Default decisions with a deadline (initiative default-decisions-with-a-deadline, done test D1-D11): each question on the day's list says its default and due day, or why it waits and what the wait costs (A27); past the due day PMOS takes the default with Undo; irreversible kinds never default. Pure checks, a temp state folder and one scratch server. No connector, model or network.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"default-decisions.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"default-decisions.test.js": 15
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Plain ✓ actions write directly (initiative direct-plain-actions, done test C1-C10): the popup's plan end, close-open and reopen presses write through board routes with Undo; a move the PM pressed wakes no Driver run; the tracker refresh is a script. Scratch server and pure checks. No connector, model or network.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"direct-acts.test.js",
|
|
5
|
+
"tracker-refresh-run.test.js"
|
|
6
|
+
],
|
|
7
|
+
"seconds": {
|
|
8
|
+
"direct-acts.test.js": 40,
|
|
9
|
+
"tracker-refresh-run.test.js": 10
|
|
10
|
+
}
|
|
11
|
+
}
|