@1aboveio/engineering-skills 0.1.19 → 0.1.20
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 +2 -2
- package/skills/better-review/SKILL.md +5 -4
- package/skills/better-review/references/passes.md +15 -0
- package/skills/better-review/references/result.md +14 -0
- package/skills/e2e-test/SKILL.md +1 -1
- package/skills/engineering/SKILL.md +1 -1
- package/skills/engineering-runtime/SKILL.md +1 -1
- package/skills/engineering-runtime/coherence/workflow.json +13 -13
- package/skills/ensure-coverage/SKILL.md +1 -1
- package/skills/golden-path/SKILL.md +1 -1
- package/skills/harness-runtime/SKILL.md +1 -1
- package/skills/resolve-issues/SKILL.md +11 -8
- package/skills/resolve-issues/references/ci.md +3 -1
- package/skills/resolve-issues/references/delivery-progress.md +16 -0
- package/skills/resolve-issues/references/done.md +7 -0
- package/skills/resolve-issues/references/dropbox.md +31 -6
- package/skills/resolve-issues/references/expire.md +6 -3
- package/skills/resolve-issues/references/implementation.md +67 -6
- package/skills/resolve-issues/references/review.md +42 -9
- package/skills/resolve-issues/references/task-plan.md +17 -2
- package/skills/resolve-issues/scripts/dropbox.mjs +2 -1
- package/skills/resolve-issues/scripts/next-actions.mjs +79 -4
- package/skills/resolve-issues/scripts/review-verdict.mjs +63 -10
- package/skills/resolve-release/SKILL.md +1 -1
- package/skills/rush-issues/SKILL.md +1 -1
- package/skills/rush-release/SKILL.md +1 -1
- package/skills/test-quality/SKILL.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1aboveio/engineering-skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "Issue-to-PR and release orchestrators, review, coverage, golden paths and test quality.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"id": "engineering",
|
|
28
28
|
"core": "@1aboveio/core-skills",
|
|
29
29
|
"coreSkills": [],
|
|
30
|
-
"digest": "
|
|
30
|
+
"digest": "15f2b59c8d45ae4fc24cc3f8dd2da1996c0a937d64ca3e7869c5e2c2814fe61b"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -4,7 +4,7 @@ description: "Slash/explicit-only (/better-review). Single-agent adversarial rev
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
dependencies:
|
|
6
6
|
- engineering-runtime
|
|
7
|
-
release-version: 0.
|
|
7
|
+
release-version: 0.50.0
|
|
8
8
|
---
|
|
9
9
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
10
10
|
# Better Review
|
|
@@ -184,7 +184,7 @@ architecture opinions would be P3, and this review never reports P3.
|
|
|
184
184
|
|
|
185
185
|
- Run the tests for the changed files, plus lint or typecheck when cheap. Rerun any check a
|
|
186
186
|
P0/P1 rests on. Record each exact command in `commands`; never accept a producer's log instead.
|
|
187
|
-
`commands` lists checks
|
|
187
|
+
`commands` lists code checks only. For diagnostic probes, follow [Diagnostic checks](references/passes.md#diagnostic-checks).
|
|
188
188
|
- Apply the [finding bar](references/passes.md#the-finding-bar) before reporting: a few strong
|
|
189
189
|
findings beat many weak ones, and "no blocking issues" is a valid result.
|
|
190
190
|
- **Caller gave a result path:** write the JSON in [result.md](references/result.md), including
|
|
@@ -229,8 +229,9 @@ then check each finding you were told about as in Re-review step 3 below.
|
|
|
229
229
|
delta round is mostly about making few of them.
|
|
230
230
|
3. **Each open finding** is resolved only when every `paths` row, re-derived from the tree
|
|
231
231
|
([principles 2, 4, 6](references/passes.md#review-the-rule-not-the-instance)), is closed at a `file:line`; a new
|
|
232
|
-
witness of its rule is an open row under its old id at its old severity.
|
|
233
|
-
|
|
232
|
+
witness of its rule is an open row under its old id at its old severity. The caller
|
|
233
|
+
owns P2 disposition: raise a previous P2 again only when it is now P1. If the caller
|
|
234
|
+
selected supporting P2 work, assess its changed behavior in the fix diff at the same bar.
|
|
234
235
|
4. **The fix diff** (`fixDiff`): run passes 1-4 on it at full depth, selecting `boundaries` and
|
|
235
236
|
`windows` by the changed contract and material risks; re-check each `sweepRecheck` point.
|
|
236
237
|
5. **The carried files:** re-check correctness at the `callSites` lines and every open `paths`
|
|
@@ -84,6 +84,21 @@ Shapes to look for while doing this:
|
|
|
84
84
|
auth redirect into a layout, error handling into a shared hook) silently loses edges the old
|
|
85
85
|
paths handled. Check relevant old behavior against the changed contract and any required proof.
|
|
86
86
|
|
|
87
|
+
## Diagnostic checks
|
|
88
|
+
|
|
89
|
+
A diagnostic probe fails the process on an unexpected exception, failed assertion or
|
|
90
|
+
incorrect result. A catch that prints context rethrows or exits nonzero; preserve that
|
|
91
|
+
status through cleanup and log pipelines, for example with shell `pipefail`.
|
|
92
|
+
An expected-exception test passes only when it asserts the expected exception and
|
|
93
|
+
relevant contract details; a missing or different exception fails. A zero exit from
|
|
94
|
+
a probe that swallowed its failure is not passing evidence. Use assertions and process
|
|
95
|
+
status to encode the result instead of having the model classify arbitrary log text.
|
|
96
|
+
Keep coordination CLIs' documented structured-verdict/exit contracts unchanged.
|
|
97
|
+
Record the actual command and failure in the existing review result. Link an executable
|
|
98
|
+
witness to its finding with `reproducer` ([result.md](result.md#the-result-file)), including
|
|
99
|
+
the candidate-relative working directory and required result. Preserve the case's defining
|
|
100
|
+
input/state and retain its probe through the fix loop; no separate evidence document is needed.
|
|
101
|
+
|
|
87
102
|
## Enforcement-point sweep
|
|
88
103
|
|
|
89
104
|
For a rule that must hold in more than one place: an all-or-none field contract, a canonical
|
|
@@ -64,6 +64,12 @@ P2 lacks its follow-up URL when the caller asked for follow-ups.
|
|
|
64
64
|
"file": "src/billing/refund.ts", "line": 42,
|
|
65
65
|
"trigger": "refund 100 USD at rate 0.9 returns 111.11 EUR, expected 90.00",
|
|
66
66
|
"rule": "every currency conversion multiplies by the source-to-target rate",
|
|
67
|
+
"reproducer": {
|
|
68
|
+
"command": "pnpm test -- src/billing/refund.test.ts",
|
|
69
|
+
"cwd": ".",
|
|
70
|
+
"expected": "refund 100 USD at rate 0.9 returns 90.00 EUR",
|
|
71
|
+
"evidence": "<run>/reviews/1201/refund-probe.log"
|
|
72
|
+
},
|
|
67
73
|
"paths": [
|
|
68
74
|
{ "path": "src/billing/refund.ts:42", "status": "open", "evidence": "divides by rate" },
|
|
69
75
|
{ "path": "src/billing/charge.ts:31", "status": "closed", "evidence": "convert() at :31" }
|
|
@@ -104,6 +110,14 @@ P2 lacks its follow-up URL when the caller asked for follow-ups.
|
|
|
104
110
|
- `trigger` is required on P0/P1: the concrete input, state, or sequence that breaks it; for
|
|
105
111
|
an explicitly unmet requirement or missing required proof, identify the requirement and the
|
|
106
112
|
evidence of what is missing.
|
|
113
|
+
- `reproducer` is optional on P0/P1. When an executable case established the finding,
|
|
114
|
+
attach its actual `command`, workspace-relative `cwd` (`.` for the root), and `expected`
|
|
115
|
+
observable result from the existing contract. An optional `evidence` names its retained
|
|
116
|
+
probe/log. Keep the probe available through the fix loop. The command must exercise the
|
|
117
|
+
reported trigger; establish its defining state in the case so a different fixture cannot
|
|
118
|
+
silently bypass the failure. An unmet written requirement need not have an executable case.
|
|
119
|
+
The caller carries these references, including distinct earlier witnesses of a still-open
|
|
120
|
+
finding, into the fix brief. Their old results are baseline evidence, never candidate passes.
|
|
107
121
|
- `rule` and `paths` are required on P0/P1, with at least one row `open`: the rule as one
|
|
108
122
|
sentence, and one row per path the diff adds, changes, or relies on (a writer, caller, sweep
|
|
109
123
|
place, or async cell), each `open` or `closed`, a closed row citing its guard's `file:line`.
|
package/skills/e2e-test/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: e2e-test
|
|
3
3
|
description: "Playwright end-to-end guidance for affected browser journeys, render health and presentation checks, with route manifests and sweeps for broader audits. Use when browser routes or user flows ship or change, or a Playwright test flakes. NOT for non-browser tests, defining what to test (ensure-coverage), the curated ALIVE/DEAD golden-path gate (golden-path), or CI workflow YAML (github-actions)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.50.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# E2E Testing Standard
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: engineering
|
|
3
3
|
description: "Engineering conventions: feature-delivery priorities, focused verification and review, operational boundaries, and tracker routing. Standalone /engineering offers Global, Project, or Session setup and targeted resets for configured scopes; /engineering init keeps explicit project setup. Use when setting up AGENTS.md or CONTRIBUTING.md, saving or resetting engineering defaults, or before creating an engineering issue, spec, epic, ticket, or sub-issue on GitHub or Linear. Reads existing policy without writing during ordinary work. NOT the issue-to-PR workflow (resolve-issues), release execution (resolve-release), Git delivery (github-flow), or CI setup (github-actions)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.50.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Engineering
|
|
@@ -3,7 +3,7 @@ name: engineering-runtime
|
|
|
3
3
|
description: Internal support package for shared Engineering Workflow executable behavior. Never select or invoke this package as a user capability.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
user-invocable: false
|
|
6
|
-
release-version: 0.
|
|
6
|
+
release-version: 0.50.0
|
|
7
7
|
---
|
|
8
8
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
9
9
|
# Engineering Runtime
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
"repository": "1aboveio/ai",
|
|
370
370
|
"revision": "main"
|
|
371
371
|
},
|
|
372
|
-
"contentDigest": "
|
|
372
|
+
"contentDigest": "46f0a76cadebab0a7de8dabf7a93eb194c7f41e0c872fa9c1a04dec86ee0fd88",
|
|
373
373
|
"digestExcludes": []
|
|
374
374
|
},
|
|
375
375
|
{
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"repository": "1aboveio/ai",
|
|
383
383
|
"revision": "main"
|
|
384
384
|
},
|
|
385
|
-
"contentDigest": "
|
|
385
|
+
"contentDigest": "e1a794446b04b5b70d356ceb9bbbe2a3c518eac486286d5905da98a3d038de65",
|
|
386
386
|
"digestExcludes": []
|
|
387
387
|
},
|
|
388
388
|
{
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
"repository": "1aboveio/ai",
|
|
396
396
|
"revision": "main"
|
|
397
397
|
},
|
|
398
|
-
"contentDigest": "
|
|
398
|
+
"contentDigest": "451349ddb0393831abe922cd66c77dd96ea6a4bdd6950c1546e507f5d056dc84",
|
|
399
399
|
"digestExcludes": []
|
|
400
400
|
},
|
|
401
401
|
{
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
"repository": "1aboveio/ai",
|
|
409
409
|
"revision": "main"
|
|
410
410
|
},
|
|
411
|
-
"contentDigest": "
|
|
411
|
+
"contentDigest": "b4c6ae8cb2e708e3695330e65567aab4a301b963d86a4b6706c324fd5e56a36e",
|
|
412
412
|
"digestExcludes": []
|
|
413
413
|
},
|
|
414
414
|
{
|
|
@@ -421,7 +421,7 @@
|
|
|
421
421
|
"repository": "1aboveio/ai",
|
|
422
422
|
"revision": "main"
|
|
423
423
|
},
|
|
424
|
-
"contentDigest": "
|
|
424
|
+
"contentDigest": "2dc4ffd9d459c1c61ff9472caf6b318bd45531995d8b8f142e775252c496b22b",
|
|
425
425
|
"digestExcludes": []
|
|
426
426
|
},
|
|
427
427
|
{
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
"repository": "1aboveio/ai",
|
|
435
435
|
"revision": "main"
|
|
436
436
|
},
|
|
437
|
-
"contentDigest": "
|
|
437
|
+
"contentDigest": "25ac49e98ce28203feccc17b4f85c67627db9c979511cca349df9dd1fe156d58",
|
|
438
438
|
"digestExcludes": []
|
|
439
439
|
},
|
|
440
440
|
{
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
"repository": "1aboveio/ai",
|
|
448
448
|
"revision": "main"
|
|
449
449
|
},
|
|
450
|
-
"contentDigest": "
|
|
450
|
+
"contentDigest": "bde840d0e6ea6d333c48b47f2635c31c54e1e86a1beee21e26d5a9788c5f7977",
|
|
451
451
|
"digestExcludes": []
|
|
452
452
|
},
|
|
453
453
|
{
|
|
@@ -460,7 +460,7 @@
|
|
|
460
460
|
"repository": "1aboveio/ai",
|
|
461
461
|
"revision": "main"
|
|
462
462
|
},
|
|
463
|
-
"contentDigest": "
|
|
463
|
+
"contentDigest": "be04047cebb486d9f0b56c59705210038c13ce8f3f10c5ecf7acb361f3a56d0c",
|
|
464
464
|
"digestExcludes": []
|
|
465
465
|
},
|
|
466
466
|
{
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
"repository": "1aboveio/ai",
|
|
474
474
|
"revision": "main"
|
|
475
475
|
},
|
|
476
|
-
"contentDigest": "
|
|
476
|
+
"contentDigest": "d7c62210fdfdfa3504a056a8977aa3b67370b65f92d5d32e001fd394fabd44bd",
|
|
477
477
|
"digestExcludes": []
|
|
478
478
|
},
|
|
479
479
|
{
|
|
@@ -486,7 +486,7 @@
|
|
|
486
486
|
"repository": "1aboveio/ai",
|
|
487
487
|
"revision": "main"
|
|
488
488
|
},
|
|
489
|
-
"contentDigest": "
|
|
489
|
+
"contentDigest": "f1acfff02ba2ddb0e0d4ffbcd9b5411a394b3b38e9a48ab2ab01ba46fb9bed1f",
|
|
490
490
|
"digestExcludes": []
|
|
491
491
|
},
|
|
492
492
|
{
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
"repository": "1aboveio/ai",
|
|
500
500
|
"revision": "main"
|
|
501
501
|
},
|
|
502
|
-
"contentDigest": "
|
|
502
|
+
"contentDigest": "cd858ed046f7c4ecb10817307e906a8057db5b8fb5a8c8e9334ef04aff34b9b2",
|
|
503
503
|
"digestExcludes": []
|
|
504
504
|
},
|
|
505
505
|
{
|
|
@@ -512,13 +512,13 @@
|
|
|
512
512
|
"repository": "1aboveio/ai",
|
|
513
513
|
"revision": "main"
|
|
514
514
|
},
|
|
515
|
-
"contentDigest": "
|
|
515
|
+
"contentDigest": "c3cbfef912ac7448710a7ed5a5014a76928d0350e2032c264c3e0a3212468b6d",
|
|
516
516
|
"digestExcludes": [
|
|
517
517
|
"coherence/workflow.json"
|
|
518
518
|
]
|
|
519
519
|
}
|
|
520
520
|
],
|
|
521
|
-
"releaseIdentity": "
|
|
521
|
+
"releaseIdentity": "b2e273424d4ceb9a24d78ad163daeb516538defae3f7e6ebea4f59edb055df9a",
|
|
522
522
|
"lifecycleAuthority": "native-skills-cli",
|
|
523
523
|
"repairRecipe": {
|
|
524
524
|
"id": "engineering-workflow-dependency-first",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ensure-coverage
|
|
3
3
|
description: "Define or audit behavior-first test criteria — ACs, required test levels, mock/integration/E2E policy — across three axes: breadth (Coverage Ledger), depth (over-mocking), presentation (perceivability of browser surfaces). NOT judging whether a single test is any good (test-quality), authoring browser tests (e2e-test), reviewing a PR (better-review), or delivering issues (resolve-issues)."
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
-
release-version: 0.
|
|
5
|
+
release-version: 0.50.0
|
|
6
6
|
---
|
|
7
7
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
8
8
|
# Ensure Coverage
|
|
@@ -3,7 +3,7 @@ name: golden-path
|
|
|
3
3
|
description: "Golden-path E2E: the short list of user journeys whose failure blocks a release, kept in a repo as one contract (golden-paths.json) with a generated GOLDEN_PATHS.md and a generated GitHub Actions workflow, and run against a local build or a deployed URL for an ALIVE/DEAD verdict. Use to set golden paths up in a repo ('init golden paths', 'add golden-path CI'), to migrate an older smoke.manifest.json or a hand-built smoke setup ('audit', 'migrate smoke'), to add, change, or remove a golden path, to ask 'is the build alive?' or run them before a PR or release, or when a change touches a flow listed in GOLDEN_PATHS.md. NOT for writing the Playwright specs themselves (e2e-test), deciding what a change must prove (ensure-coverage), or general workflow YAML (github-actions)."
|
|
4
4
|
dependencies:
|
|
5
5
|
- e2e-test
|
|
6
|
-
release-version: 0.
|
|
6
|
+
release-version: 0.50.0
|
|
7
7
|
---
|
|
8
8
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
9
9
|
# Golden path
|
|
@@ -3,7 +3,7 @@ name: harness-runtime
|
|
|
3
3
|
description: Internal import-only library shared by first-party engineering packages. Not a workflow skill; never select or invoke it as a user capability.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
user-invocable: false
|
|
6
|
-
release-version: 0.
|
|
6
|
+
release-version: 0.50.0
|
|
7
7
|
---
|
|
8
8
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
9
9
|
# Harness Runtime
|
|
@@ -8,7 +8,7 @@ dependencies:
|
|
|
8
8
|
- better-review
|
|
9
9
|
- golden-path
|
|
10
10
|
- harness-runtime
|
|
11
|
-
release-version: 0.
|
|
11
|
+
release-version: 0.50.0
|
|
12
12
|
---
|
|
13
13
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
14
14
|
# Resolve issues
|
|
@@ -63,8 +63,8 @@ preflight: ready label -> model fills -> plan draft
|
|
|
63
63
|
-> when a unit's code is done, for that unit:
|
|
64
64
|
rebase on its parent (stack, chain) or the target (wait)
|
|
65
65
|
-> independent review, while CI runs -> review-verdict.mjs decides:
|
|
66
|
-
`pass`: review passes (P2
|
|
67
|
-
|
|
66
|
+
`pass`: review passes (route P2 by its contribution to delivery;
|
|
67
|
+
P3 is skipped); `fix`: its fixBrief (P0/P1) plus explicitly selected supporting P2,
|
|
68
68
|
push, re-review; `review-again`: review again
|
|
69
69
|
-> CI red: fix, push; after a passing review, carry it (no reviewer)
|
|
70
70
|
-> review passed and CI green on one HEAD: mark ready
|
|
@@ -116,8 +116,10 @@ Read each procedure right before its stage; never substitute your own.
|
|
|
116
116
|
- **The human.** Ask once, at the approval. Record every decision, correction, and scope change in
|
|
117
117
|
`decisions` at once, and each standing instruction in `standingOrders`; re-read the standing orders on
|
|
118
118
|
resume and before any push, enqueue, data write, or deletion. Default merge mode is `autonomous`.
|
|
119
|
-
- **Proof.** Treat producer reports as claims until the reviewer or CI checks them.
|
|
120
|
-
|
|
119
|
+
- **Proof.** Treat producer reports as claims until the reviewer or CI checks them. Tests and diagnostic probes
|
|
120
|
+
encode failure in their exit status under [Proof](references/implementation.md#proof); printing an exception
|
|
121
|
+
and returning 0 is not a passing check. Coordination CLIs keep their documented structured-verdict contracts.
|
|
122
|
+
A unit owes coding acceptance only: its criteria at its `proof.level` plus the required CI
|
|
121
123
|
on its final HEAD. Integrated release acceptance (a device or system campaign the spec or repository assigns
|
|
122
124
|
to a release or campaign gate) runs at that gate, never per unit; the handback links its owning issue. Produce
|
|
123
125
|
no evidence documents; the plan, findings, and reviews are the only records.
|
|
@@ -169,7 +171,8 @@ efforts are run metadata, never a question.
|
|
|
169
171
|
### 2. Implement and open the PR
|
|
170
172
|
|
|
171
173
|
Give each unit a branch, its prepared workspace, and an implementer with its findings entry
|
|
172
|
-
and parents' contracts;
|
|
174
|
+
and parents' contracts; retain its [implementation owner](references/implementation.md#implementation-owner)
|
|
175
|
+
through review/CI fixes, separately from its active worker slot. State outcome and validation, not method. Refill
|
|
173
176
|
slots at once. At a unit's first coherent commit its PR opens as a draft, so CI
|
|
174
177
|
starts and the work is safe; later work goes to the same PR (in a Mergify stack
|
|
175
178
|
repository, amend the one commit); review starts when its code is done
|
|
@@ -178,13 +181,13 @@ the unit's own PR branch need no approval.
|
|
|
178
181
|
|
|
179
182
|
### 3. Review
|
|
180
183
|
|
|
181
|
-
Spawn one `better-review` reviewer once the unit's code is done, unless a
|
|
184
|
+
Spawn one fresh `better-review` reviewer once the unit's code is done, unless a
|
|
182
185
|
trusted complete result for that HEAD is posted on the PR; it runs alongside
|
|
183
186
|
CI. From round 2, carry a HEAD that follows a pass, else pick the tier: a
|
|
184
187
|
carry or skip writes its record and spawns no reviewer ([review.md](references/review.md#tier-then-verdict)).
|
|
185
188
|
Merge [GitHub reviews](references/review.md#github-reviews) into its result,
|
|
186
189
|
run `review-verdict.mjs`, and follow the `verdict` it prints (exit 0; 2 only if it could not run): `pass`; `fix`, give the
|
|
187
|
-
`fixBrief` (P0/P1
|
|
190
|
+
`fixBrief` (P0/P1), its retained reproducers and any selected supporting P2 under [dropbox routing](references/dropbox.md#supporting-p2-work) to the implementation owner as its `action` says, then review
|
|
188
191
|
again; `review-again`; `handback`, defer the PR with its open findings; `wait`,
|
|
189
192
|
request the awaited re-review; `decide`, answer the `decide` file
|
|
190
193
|
([expire.md](references/expire.md#decide-before-you-defer)) and rerun with `--decision`.
|
|
@@ -105,7 +105,9 @@ provider shows that PR merged.
|
|
|
105
105
|
|
|
106
106
|
Clean that unit's workspace and resources, then finish it, in every scheduler
|
|
107
107
|
mode: `next-actions.mjs` prints `cleanup-workspace` until its cleanup settles.
|
|
108
|
-
First
|
|
108
|
+
First [release any session retention still held](implementation.md#settle-session-retention)
|
|
109
|
+
for it, even while other units remain active; a conversation launched without protection has
|
|
110
|
+
nothing to release. Then record the intent through the [checkpoint mechanism](task-plan.md#checkpoints) (`lifecycle.cleanup`
|
|
109
111
|
`{state: applying, headSha: <the unit's headSha>}`), then run:
|
|
110
112
|
|
|
111
113
|
```bash
|
|
@@ -13,6 +13,12 @@ units keep their own checkpoints and continue in parallel within actual resource
|
|
|
13
13
|
observation that would distinguish the remaining causes. Run the relevant host,
|
|
14
14
|
integration or device check before another broad acceptance cycle. After a correction,
|
|
15
15
|
run affected checks and the required delivery checks, not extra assurance work.
|
|
16
|
+
- **Keep the repair's contract intact.** Reproduce the reported input/state and check
|
|
17
|
+
the observable result the existing criteria require. Reuse sufficient checks; an added
|
|
18
|
+
regression establishes the condition that reaches the failure. If that operation exposes
|
|
19
|
+
another failure of the same contract, continue the repair while preserving earlier
|
|
20
|
+
assertions. Return when affected criteria and required local checks pass, or an existing
|
|
21
|
+
stop/handback condition applies. This adds no fixed journey or test layer.
|
|
16
22
|
- **Justify infrastructure before adding it.** State which existing criterion requires
|
|
17
23
|
it, why the current path cannot provide that proof, and the smallest alternative.
|
|
18
24
|
Record the choice in the existing decision/note, within current authorization. Routine
|
|
@@ -39,6 +45,13 @@ issue or automatic scheduler gate. They do not waive required validation.
|
|
|
39
45
|
|
|
40
46
|
## Every brief contains
|
|
41
47
|
|
|
48
|
+
Use the full checklist for a fresh or replacement worker. For a retained conversation,
|
|
49
|
+
send the new feedback, current checkpoint, latest failure/fix brief and local evidence,
|
|
50
|
+
current standing orders and changed decisions, affected skill/proof pointers, and new
|
|
51
|
+
result path. Re-read the saved source/criteria after context loss; do not resend the original
|
|
52
|
+
role or whole assignment already in that session. This shorter continuation keeps the same
|
|
53
|
+
acceptance bar, launch-authority rules and history; it is not a new setup or proof campaign.
|
|
54
|
+
|
|
42
55
|
- the source and criteria, as a file already in the run directory
|
|
43
56
|
- the plan's `standingOrders`, verbatim, and the decisions that answer this unit's questions
|
|
44
57
|
- absolute run, workspace, and findings paths; for implementers, the unit's
|
|
@@ -51,6 +64,9 @@ issue or automatic scheduler gate. They do not waive required validation.
|
|
|
51
64
|
test; retain the same checkpoint/history when changing workers
|
|
52
65
|
- for a fix after a failed check or case, the last `failure` block (case, step, error,
|
|
53
66
|
evidence path) verbatim, so the worker starts from the cause
|
|
67
|
+
- for review fixes, the generated brief's `reproducers` with their original triggers,
|
|
68
|
+
source rounds/HEADs, command, workspace-relative cwd, expected result and retained evidence;
|
|
69
|
+
run them against the candidate, rather than replaying in the reviewer's old checkout
|
|
54
70
|
- a concise worker-specific contract: business outcome and context, full acceptance,
|
|
55
71
|
security and quality requirements, and principles relevant to the assigned work; a
|
|
56
72
|
reviewer gets review.md's two rules instead. Do not forward coordinator scheduling
|
|
@@ -15,6 +15,13 @@ nothing is left to settle.
|
|
|
15
15
|
|
|
16
16
|
## Clean before handoff
|
|
17
17
|
|
|
18
|
+
[Release any session retention still held](implementation.md#settle-session-retention) for each
|
|
19
|
+
unit before normal workspace cleanup; this also applies at each merge while other units
|
|
20
|
+
continue. A launch that asked for none has nothing to release, and an acknowledgement is
|
|
21
|
+
recorded only where protection was actually held. Record any
|
|
22
|
+
resource intentionally kept under the existing lifecycle; never claim it was cleaned
|
|
23
|
+
because its worker exited.
|
|
24
|
+
|
|
18
25
|
Clean every delivered unit's workspace and resources before the report, in every
|
|
19
26
|
scheduler mode ([workspaces.md](workspaces.md#cleanup-after-delivery-before-finish)).
|
|
20
27
|
Its `lifecycle.cleanup` is `complete`, or `retained` with the current `headSha`
|
|
@@ -8,8 +8,9 @@ Workers report problems; you route them.
|
|
|
8
8
|
|
|
9
9
|
## Route every problem
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Skip P3: no repair, dropbox entry or follow-up issue. For the remaining problems,
|
|
12
|
+
ask these in order; the first yes decides. A P2 label alone does not decide whether
|
|
13
|
+
work supports this delivery.
|
|
13
14
|
|
|
14
15
|
1. **Could it hurt someone now?** Security, auth, tenancy, money, data loss,
|
|
15
16
|
a failure users see, a flake that knocks other PRs out of the queue, or a
|
|
@@ -19,15 +20,17 @@ labels miss in both directions.
|
|
|
19
20
|
Example: a reviewer notes, as P2, that a provider webhook amount is parsed
|
|
20
21
|
without a check, "unreachable today". The input is external: file it now.
|
|
21
22
|
2. **Does it stop this unit from being finished or proven?** Small and in the
|
|
22
|
-
unit's files: fix it in the unit
|
|
23
|
+
unit's files: fix it in the unit; for P2, first record the explicit selection
|
|
24
|
+
under [Supporting P2 work](#supporting-p2-work). A question: take its automatic answer
|
|
23
25
|
([preflight.md](preflight.md#never-block-on-the-human)); defer it only when it is human-only. Anything else outside the unit's files, code or
|
|
24
26
|
environment: an [infrastructure failure](expire.md#infrastructure-failures).
|
|
25
27
|
Example: the shared test helper the unit's tests need is broken on the
|
|
26
28
|
target: an infrastructure failure.
|
|
27
29
|
3. **Did this unit cause it?** Fix it in the unit, however small; it costs
|
|
28
30
|
less now than as an issue. `dropbox.mjs check` decides (`inDiff` true inside the
|
|
29
|
-
unit's diff), and `add` refuses an implementer entry there.
|
|
30
|
-
|
|
31
|
+
unit's diff), and `add` refuses an implementer entry there. For a reviewer's P2,
|
|
32
|
+
`inDiff` records location, not repair authorization: apply the supporting-work
|
|
33
|
+
test below; otherwise keep it in the dropbox.
|
|
31
34
|
4. **Would fixing it change nothing** for behavior or for a reader? A style
|
|
32
35
|
nit, a smell no documented rule names, hardening the
|
|
33
36
|
code shows cannot trigger (internal input only, and this unit adds no new
|
|
@@ -44,6 +47,28 @@ labels miss in both directions.
|
|
|
44
47
|
Record a blocking relation with `--blocks <#n | owner/name#n | issue URL>`:
|
|
45
48
|
the posted issue says `Blocks #n` so a later run takes it first.
|
|
46
49
|
|
|
50
|
+
## Supporting P2 work
|
|
51
|
+
|
|
52
|
+
Select a P2 for the current unit only when it directly enables an existing
|
|
53
|
+
authorized outcome, agreed verification or delivery. For example, include the
|
|
54
|
+
unit's new regression module in its existing CI test list. Nearby cleanup,
|
|
55
|
+
optional hardening and unrelated performance work stay deferred, even inside the diff.
|
|
56
|
+
|
|
57
|
+
Record the finding/dropbox id, existing criterion and concrete reason in the plan's
|
|
58
|
+
`decisions`, and include that selection in the implementer or fix brief. Keep P2
|
|
59
|
+
nonblocking: its severity alone changes no verdict, fix counter or acceptance bar.
|
|
60
|
+
Use the existing implementation or fix work when available. When review already
|
|
61
|
+
passed, return the unit to implementation for the selected repair while retaining
|
|
62
|
+
its passed review. After the repair push, use the existing post-pass carry and final
|
|
63
|
+
CI rules; it does not reopen the blocking review loop.
|
|
64
|
+
|
|
65
|
+
After the selected work is verified, record its SHA and check result in the unit's
|
|
66
|
+
existing result/note and mark the dropbox entry with `--drop "fixed on <sha>; <check
|
|
67
|
+
and result>"` so it is not filed as unfinished work. Leave the original review
|
|
68
|
+
unchanged. If the work is not completed, retain its pending entry and report it
|
|
69
|
+
truthfully. Shared-environment changes and changes to required checks keep their
|
|
70
|
+
existing authorization boundaries.
|
|
71
|
+
|
|
47
72
|
## Commands
|
|
48
73
|
|
|
49
74
|
```bash
|
|
@@ -56,7 +81,7 @@ node $D add --dropbox <run>/dropbox.json --unit <id> --source implementer \
|
|
|
56
81
|
--summary "<one line: what is wrong>" [--pr <url>] [--blocks <issue>] \
|
|
57
82
|
--git <workspace> --base <review base>
|
|
58
83
|
# coordinator, after every review round, before the verdict: adds every P2 (P3 is skipped),
|
|
59
|
-
# then route each new entry
|
|
84
|
+
# then route each new entry, including any explicitly selected supporting work:
|
|
60
85
|
node $D from-review --dropbox <run>/dropbox.json --review <run>/reviews/<unit>-r<N>.json \
|
|
61
86
|
--pr <url> --git <unit review clone> --base <review base>
|
|
62
87
|
node $D post --dropbox <run>/dropbox.json --repo <owner/name> --ids D3 # 1: file now
|
|
@@ -235,15 +235,18 @@ missing, or names a step without a reason.
|
|
|
235
235
|
| Review: `review-verdict.mjs` verdict `fix` | Follow its `action` ([review.md](review.md#fix-loop)). |
|
|
236
236
|
| Review: `review-verdict.mjs` verdict `handback` (`not-converging`) | Stop fixing; mark the unit `blocked` (`blockedReason: review-handback`) and defer the PR with its open findings on its issue. |
|
|
237
237
|
| Review: `review-verdict.mjs` verdict `decide`, or a worker's `decisionNeeded` | [Decide before you defer](#decide-before-you-defer). |
|
|
238
|
-
| CI: a fix cycle without progress | Treat the failing check as the failing test: the
|
|
238
|
+
| CI: a fix cycle without progress | Treat the failing check as the failing test: continue the implementation owner with the required escalation fill and that check as its only target, using the [continuation/replacement selection](task-plan.md#worker-selection-on-resume) rather than fabricating a pin. 2 cycles in a row without progress: `blocked` (`blockedReason: retry-ci`), deferred on its issue. |
|
|
239
239
|
| Too big for one attempt | Resume in the kept workspace while each resume makes [progress](#retry-by-failure-mode); after 2 in a row without verified checkpoint/failure-count progress, draft a split in `<run>/splits/`, file it into the spec's tree, and run the slices the sync adds ([preflight.md](preflight.md#put-every-filed-issue-in-the-tree)). |
|
|
240
240
|
| A required proof the unit has no environment for yet | The unit builds it; see [Proof stays with its unit](#proof-stays-with-its-unit). |
|
|
241
241
|
| Dependency | Fix the edge; resume when runnable. |
|
|
242
242
|
| A capability the unit needs is missing and no unit builds it (a shared driver, fixture, or hook) | Build it inside the first unit that needs it; units that need it later get `dependsOn` on that unit. Only when that puts the unit past the size check's line limit, file it as its own issue beside them, with `blocked_by` on the units that use it, never on their parent issue. Example: three proof units each need a device-state reader: the first builds it, the other two depend on the first. |
|
|
243
243
|
| [Human-only](#human-only) blocker | Take its automatic answer ([preflight.md](preflight.md#never-block-on-the-human)); when that defers it, mark `blocked` (`blockedReason: human-decision`, its `humanItem` and `humanNeed`), keep the work, and record what is needed on its owning issue; never ship part of the unit. |
|
|
244
244
|
|
|
245
|
-
Continue in the kept workspace with the
|
|
246
|
-
|
|
245
|
+
Continue the retained owner in the kept workspace with the current checkpoint, findings
|
|
246
|
+
and failure evidence. If its process state or required selection prevents continuation,
|
|
247
|
+
use an explicit replacement under the [owner contract](implementation.md#implementation-owner),
|
|
248
|
+
keeping its old session reference for settlement; replacement briefs use those local facts
|
|
249
|
+
rather than an old transcript. Keep the response limits and history above. Record a queue stall with the
|
|
247
250
|
provider pending as a wait and watch again. End the run only when
|
|
248
251
|
`next-actions.mjs`, invoked with [live capacity](implementation.md#live-capacity), prints `finish`, and never claim the spec complete.
|
|
249
252
|
|
|
@@ -53,6 +53,55 @@ independent clone prepared before its first spawn; after that, never pass
|
|
|
53
53
|
`git_clone_workspace:true` again, and use `sandbox:false` only when the caller
|
|
54
54
|
accepts unrestricted writes.
|
|
55
55
|
|
|
56
|
+
## Implementation owner
|
|
57
|
+
|
|
58
|
+
Keep one implementation conversation per unit through local proof, independent review,
|
|
59
|
+
review fixes and CI repairs. Its saved conversation outlives the active worker slot: launch
|
|
60
|
+
each worker normally, single or batch as the assignment needs, and record the receipt as
|
|
61
|
+
`implementationOwner` ([task-plan.md](task-plan.md#shape)). `retain_session` is optional
|
|
62
|
+
protection from later cleanup, not a precondition for continuing: a completed conversation is
|
|
63
|
+
resumed by its `runId` whether or not retention was requested, and the harness never asks for
|
|
64
|
+
it on resume. Request it only when this caller needs the conversation protected through a long
|
|
65
|
+
wait before cleanup, using the exact argument the launched tool advertises and never inventing
|
|
66
|
+
one for a call that lacks it. A parked owner has no live process and reserves no slot. The
|
|
67
|
+
coordinator still owns scheduling, plan writes, external CI, readiness and delivery;
|
|
68
|
+
reviewers use separate conversations.
|
|
69
|
+
|
|
70
|
+
`next-actions.mjs` supplies `continuation`, `workerKind`, and, for
|
|
71
|
+
`owner-resume`, `owner`. Resume that completed attempt with
|
|
72
|
+
`subagent_resume({id: owner.runId, prompt: <current brief>})`; record the new attempt ID
|
|
73
|
+
without changing the conversation ID. Selection follows [continuation versus new launch](task-plan.md#worker-selection-on-resume): omit model/effort for ordinary continuation. Use only
|
|
74
|
+
authorized, supported explicit overrides; when a required role-only fill cannot be expressed
|
|
75
|
+
by the resume API, replace from that fill with the retained evidence instead of creating a
|
|
76
|
+
pin from its resolved model ID. Clear `worker` when an attempt
|
|
77
|
+
ends, but keep `implementationOwner` while review or CI is pending. Keep all counters and
|
|
78
|
+
earlier results across attempts. `one-by-one` fixes findings sequentially in this owner.
|
|
79
|
+
|
|
80
|
+
A missing history/workspace, an unusable saved owner, or an owner that cannot continue
|
|
81
|
+
requires an explicit replacement reason and the retained checkpoint, failures and reproducer
|
|
82
|
+
references in the replacement brief. Try the saved conversation first: a `retentionReleased`
|
|
83
|
+
marker says only that optional protection lapsed, so it is not a replacement reason by itself
|
|
84
|
+
and the conversation it names usually still resumes. Report lost continuity; never label a
|
|
85
|
+
new conversation a resume. Existing recovery/stop rules still apply, and old plans without
|
|
86
|
+
an owner use the fresh-worker path. Do not install or update the harness during a run merely
|
|
87
|
+
to obtain continuation.
|
|
88
|
+
|
|
89
|
+
### Settle session retention
|
|
90
|
+
|
|
91
|
+
When this unit settles (merged, cancelled, deferred or handed back merge-ready), release any
|
|
92
|
+
retention still held for its `implementationOwner`, `reviewSession` and `retiredSessions` with
|
|
93
|
+
`subagent_release({id: <runId>})` before its normal workspace/resource cleanup. Only a
|
|
94
|
+
conversation launched with `retain_session` has anything to release, so a normal launch skips
|
|
95
|
+
this and a second release is not owed. Record the acknowledgement on that reference when it
|
|
96
|
+
was actually held; an unavailable or refused release stays explicit rather than being
|
|
97
|
+
recorded as done.
|
|
98
|
+
|
|
99
|
+
Reopening is the ordinary case: resume the saved conversation even when its protection was
|
|
100
|
+
released, because release stops protection and leaves the history in place. Start a fresh
|
|
101
|
+
replacement only when continuation is genuinely unavailable, and carry the original
|
|
102
|
+
checkpoint/findings/counters into it. The same rule covers a released unfinished review,
|
|
103
|
+
keeping its round and existing full-review fallback.
|
|
104
|
+
|
|
56
105
|
## Brief
|
|
57
106
|
|
|
58
107
|
Add to SKILL.md's brief list: whole-spec context and neighboring unit
|
|
@@ -83,8 +132,8 @@ handback step. Never edit `findings.json`.
|
|
|
83
132
|
|
|
84
133
|
## Per-unit loop
|
|
85
134
|
|
|
86
|
-
On `resume` (in flight, no worker, code not done),
|
|
87
|
-
|
|
135
|
+
On `resume` (in flight, no worker, code not done), continue the unit's
|
|
136
|
+
[implementation owner](#implementation-owner) in its kept workspace with the current brief.
|
|
88
137
|
|
|
89
138
|
1. **Implement:** change only the unit's scope; commit coherent progress.
|
|
90
139
|
2. **Validate:** prove the criteria with the repository's checks: the
|
|
@@ -119,13 +168,25 @@ implementer in its kept workspace with the brief and its findings entry.
|
|
|
119
168
|
not prohibit long local tests or builds needed for the assigned validation.
|
|
120
169
|
|
|
121
170
|
After 2 fix cycles without progress, or a stuck or late worker, follow
|
|
122
|
-
[expire.md](expire.md).
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
171
|
+
[expire.md](expire.md). Apply the next response through the retained owner where its
|
|
172
|
+
completed conversation and required launch controls permit continuation. A replacement
|
|
173
|
+
uses the same workspace and the findings entry, failing command/output and `git diff <base>`;
|
|
174
|
+
record why it replaces the owner and retain its session reference as above. Give replacement
|
|
175
|
+
workers those local facts rather than copying the old transcript. Keep all progress counters.
|
|
126
176
|
|
|
127
177
|
## Proof
|
|
128
178
|
|
|
179
|
+
- **Make diagnostic failures executable.** Reuse the existing test runner/assertions.
|
|
180
|
+
A standalone probe exits nonzero for an unexpected exception, failed assertion or
|
|
181
|
+
result outside the expected contract. A catch used to add context rethrows or sets
|
|
182
|
+
a nonzero exit; log capture and cleanup preserve that failure status. For shell
|
|
183
|
+
pipelines, preserve the tested command's failure, for example with `set -o pipefail`.
|
|
184
|
+
An expected-exception test passes only when it asserts the expected exception and
|
|
185
|
+
relevant contract details; no exception or the wrong exception fails. Assess the
|
|
186
|
+
process status under that contract, rather than having the model classify log text.
|
|
187
|
+
Coordination commands that exit 0 to return a structured verdict keep that protocol;
|
|
188
|
+
read their verdict as documented. Record the command, status and failing step in
|
|
189
|
+
the existing result/failure fields; no new harness or evidence document is needed.
|
|
129
190
|
- Prove `browser` and `emulator` levels with the existing end-to-end suite;
|
|
130
191
|
with none, the unit builds the journey its proof needs
|
|
131
192
|
([expire.md](expire.md#proof-stays-with-its-unit)).
|
|
@@ -8,6 +8,13 @@ restate its rules in the brief beyond the two below.
|
|
|
8
8
|
|
|
9
9
|
## Brief
|
|
10
10
|
|
|
11
|
+
- Start a fresh reviewer conversation after each completed review round; the existing
|
|
12
|
+
scope script still chooses delta/full/skip, so freshness adds no review round or test
|
|
13
|
+
campaign. Give it retained records and code evidence as claims to verify, not an
|
|
14
|
+
implementer transcript. Launch it normally and keep its attempt reference as
|
|
15
|
+
`reviewSession`, separate from `implementationOwner`, so an unfinished same-HEAD round
|
|
16
|
+
can continue in that saved conversation; `retain_session` is optional protection, not
|
|
17
|
+
what makes it continuable. A round after a completed review is a fresh conversation.
|
|
11
18
|
- Reviewer model: a different id from the implementer's
|
|
12
19
|
([preflight.md](preflight.md#1-model-slots)). Launch the reviewer with the
|
|
13
20
|
plan's recorded reviewer fill — its `launch`, `instructions`, `selection` and
|
|
@@ -119,9 +126,23 @@ the unfinished work rather than repeating the whole assignment; preserve complet
|
|
|
119
126
|
valid passes. A wrong HEAD or invalid scope must be corrected, not carried as
|
|
120
127
|
completed proof.
|
|
121
128
|
|
|
129
|
+
On Pi, use `subagent_resume({id: reviewSession.runId, prompt: <unfinished work>})`
|
|
130
|
+
when that attempt completed as a process and its saved conversation is available;
|
|
131
|
+
update only its attempt reference, keeping this review's round, HEAD and counter.
|
|
132
|
+
A killed/lost attempt or an unavailable continuation follows replacement below. Once the
|
|
133
|
+
review record is complete, the next required review is a fresh conversation. Clear an
|
|
134
|
+
unpinned `reviewSession` directly. If it holds retention, release that protection before
|
|
135
|
+
clearing; on failure, save its exact reference and error in `retiredSessions` before clearing
|
|
136
|
+
so settlement can retry while the fresh review proceeds. Never use a reviewer as the
|
|
137
|
+
implementation owner.
|
|
138
|
+
|
|
122
139
|
If that reviewer cannot continue, state why replacement is necessary, which
|
|
123
140
|
retained evidence the replacement reads, and what it redoes before launching it.
|
|
124
|
-
|
|
141
|
+
A `retentionReleased` marker on the old reference is not a reason by itself: released
|
|
142
|
+
protection leaves the saved conversation in place, so try it again before replacing it.
|
|
143
|
+
While an old reference is still worth resuming or still needs release, keep it as an entry
|
|
144
|
+
in `retiredSessions` ([task-plan.md](task-plan.md#shape)) rather than dropping it; a later
|
|
145
|
+
release of the new session does not release the old conversation. The replacement reviews every pass with `tier: "full"`. Keep the round number,
|
|
125
146
|
`fixRound`, unit `attempt` and earlier round files; incompleteness neither resets
|
|
126
147
|
history nor counts as progress. Launch the replacement from the same recorded
|
|
127
148
|
reviewer fill, in the same structured launch arguments as [the brief](#brief)
|
|
@@ -221,10 +242,10 @@ the PR author; `github-reviews.mjs` reads them and decides what blocks.
|
|
|
221
242
|
|
|
222
243
|
- **P0/P1** block (`better-review`'s severity table defines them): fix on the
|
|
223
244
|
unit branch, validate, review again.
|
|
224
|
-
- **P2** never blocks
|
|
225
|
-
|
|
226
|
-
[
|
|
227
|
-
|
|
245
|
+
- **P2** never blocks or starts a blocking-fix round by severity alone. Route each
|
|
246
|
+
entry by the [dropbox questions](dropbox.md#route-every-problem); explicitly selected
|
|
247
|
+
[supporting P2 work](dropbox.md#supporting-p2-work) may be fixed in the unit.
|
|
248
|
+
Keep unrelated P2 in the dropbox; preserve the severity and review verdict.
|
|
228
249
|
- **P3** is skipped: no dropbox entry, no issue, no round. A P3 that still
|
|
229
250
|
reaches the result file (a posted result, an older reviewer) is ignored.
|
|
230
251
|
- Dispose of every P0-P2 finding: `resolved` on the reviewed HEAD, or `deferred`
|
|
@@ -232,13 +253,24 @@ the PR author; `github-reviews.mjs` reads them and decides what blocks.
|
|
|
232
253
|
|
|
233
254
|
## Fix loop
|
|
234
255
|
|
|
235
|
-
Give the
|
|
256
|
+
Give the [implementation owner](implementation.md#implementation-owner) the `fixBrief`
|
|
257
|
+
and act on its `action`. Keep the generated `reproducers` intact: their source rounds,
|
|
258
|
+
HEADs and original triggers identify earlier witnesses, not passing results on this
|
|
259
|
+
candidate. Read the retained cases and run against the candidate workspace at their
|
|
260
|
+
relative `cwd`; preserve their input/state and expected contract when adapting a checkout
|
|
261
|
+
path. `reproducerGaps` identifies malformed historical metadata without supplying a runnable
|
|
262
|
+
command: inspect the original record, establish a valid candidate-local case, and report any
|
|
263
|
+
remaining gap without rewriting history. Findings without an executable witness retain their
|
|
264
|
+
existing requirement evidence.
|
|
265
|
+
Add only supporting P2
|
|
266
|
+
explicitly selected under [dropbox routing](dropbox.md#supporting-p2-work), with the
|
|
267
|
+
recorded criterion and reason; the generated blocker list remains P0/P1 only.
|
|
236
268
|
|
|
237
269
|
| `action` | When | Fix worker |
|
|
238
270
|
|---|---|---|
|
|
239
271
|
| `fix` | first blocking round | Make the smallest complete fix for each finding's `rule` and close every applicable row in its `paths`; do not require centralization. |
|
|
240
272
|
| `test-first` | a P0/P1 survived the last fix | On the escalation model, for each `recurring` finding, before changing code: name the broken rule and its concrete open paths, reuse sufficient tests and add focused cases for missing proof, and see the open cases fail. Fix the rule until the applicable cases pass. A table-driven test may cover several paths; no new architecture is required. |
|
|
241
|
-
| `one-by-one` | the last fix introduced new P0/P1 |
|
|
273
|
+
| `one-by-one` | the last fix introduced new P0/P1 | The implementation owner fixes findings sequentially in its continued session, each with the smallest change that closes every row of its `paths` at the rule's owner. |
|
|
242
274
|
|
|
243
275
|
**Fix the broken rule on every applicable path, without requiring a refactor.**
|
|
244
276
|
A shared owner is useful when it makes the fix smaller and clearer; it is not a
|
|
@@ -251,8 +283,9 @@ different-person sign-in cases without inventing unrelated event combinations.
|
|
|
251
283
|
Have each fix worker run the checks its change affects and return the
|
|
252
284
|
commands and results; push, and let CI run. Then pick the new HEAD's
|
|
253
285
|
[tier](#tier-then-verdict): a fix is delta or full, never skip, so spawn the
|
|
254
|
-
next round's reviewer with the previous result file and the `fixBrief
|
|
255
|
-
|
|
286
|
+
next round's fresh reviewer with the previous result file and the `fixBrief`, naming any
|
|
287
|
+
supporting P2 changed in that patch. Deferred P2 return as findings only if now rated
|
|
288
|
+
P1; evaluate changed supporting work as part of the fix diff. Record `reviewedHead` only on a `pass` verdict. A later
|
|
256
289
|
commit, a CI fix included, needs its own `pass`: a [carry](#carry-after-a-pass) when this round passed.
|
|
257
290
|
|
|
258
291
|
A `decide` verdict pauses the fix loop on a question: a spec finding came back after a
|
|
@@ -92,6 +92,9 @@ Fleet `status`: `pending`, `in-flight`, `succeeded`, `failed`,
|
|
|
92
92
|
| `attempt`, `retries`, `escalations` | Attempt number; cycle counts; escalation-model attempts |
|
|
93
93
|
| `worker`, `workerSince`, `clock` | Slot identifier of any worker running for the unit (implementer, reviewer, fix), `null` when none; when that worker started (ISO time, for [stuck-worker checks](expire.md#waits)); attempt and cumulative wall time |
|
|
94
94
|
| `workerKind` | `implement`, `fix`, or `review`, set with `worker`; the [live-capacity scheduler](implementation.md#live-capacity) (`next-actions.mjs`) prints `worker-kind` for any other kind or none. An infrastructure diagnosis or a test-first worker is a `fix` worker. The explorer is the `explore` fleet row's worker, never a unit's; a merge-queue watcher is not a worker |
|
|
95
|
+
| `implementationOwner` | Optional saved implementation conversation: `{runId, sessionId?, cwd?, kind?, retentionReleased?}`. `runId` is its latest attempt; `kind` is `implement` (default) or `fix`, never `review`; `cwd`, when recorded, matches `workspace`. Save spawn/resume receipts here, independently of `worker`; a parked owner occupies no slot. The scheduler emits `owner-resume` for a usable owner or an explicit `ownerUnavailable` reason for replacement; `retentionReleased: true` only records that optional cleanup protection lapsed, so it never makes the owner unusable and the saved conversation stays the resume target while the harness holds it. Old plans remain readable. See [ownership](implementation.md#implementation-owner). |
|
|
96
|
+
| `reviewSession` | Optional `{runId, sessionId?, head, round, retentionReleased?}` for the current unfinished review. Keep it only for same-HEAD/same-scope continuation, and clear it when that round completes so the next completed-review round starts fresh. A `retentionReleased` marker is history, not a reason to replace: try the same round's saved conversation while it exists. It is never an implementation owner or a slot reservation. |
|
|
97
|
+
| `retiredSessions` | Optional references kept beside a replaced implementation owner or unfinished reviewer: `{runId, sessionId?, kind, retentionReleased?, reason?}`. Only for a conversation still worth resuming or still holding protection that must be released later; an ordinary resume or replacement needs no entry here, and a later release of the new session does not release an older conversation. |
|
|
95
98
|
| `estimatedLines` | Preflight assessment estimate |
|
|
96
99
|
| `sizeCheck` | Measures, `verdict` (the size check's per-unit verdict; `stop` means held), scope and proof verdicts, split or verification path; `runWhole: true` once a recommendation to run a held unit whole is accepted |
|
|
97
100
|
| `note` | SHA, expiry reason code, failure and response, or blocker; for active debugging, the immediate acceptance checkpoint, baseline/result link and next distinguishing test ([delivery progress](../SKILL.md#delivery-progress)) |
|
|
@@ -142,7 +145,10 @@ what a later launch of the slot repeats; a pair of model ids is not.
|
|
|
142
145
|
(`open`, `resolved`, `deferred`), `resolvedHead`, `dropboxId` or `followUpUrl`. Copy them
|
|
143
146
|
from `review-verdict.mjs`: on `fix` its `fix` list as `open`; on `pass` its
|
|
144
147
|
`deferred` list as `deferred` and every open P0/P1 as `resolved`. Never defer
|
|
145
|
-
a P0/P1.
|
|
148
|
+
a P0/P1. For selected [supporting P2 work](dropbox.md#supporting-p2-work), record the
|
|
149
|
+
selection in `decisions`; after verification, mark its plan finding `resolved` with
|
|
150
|
+
`resolvedHead` and put the check/result in the unit's existing note/result. Preserve
|
|
151
|
+
the original review and retire its pending dropbox entry as documented there.
|
|
146
152
|
|
|
147
153
|
`decisions` entry: id, timestamp, the human's words, what it changes,
|
|
148
154
|
`supersedes` when it replaces one, and `answers`: the run-relative file of each
|
|
@@ -153,7 +159,16 @@ recommendation's reason; its human's words are the invocation.
|
|
|
153
159
|
|
|
154
160
|
### Worker selection on resume
|
|
155
161
|
|
|
156
|
-
|
|
162
|
+
Distinguish resuming the workflow from continuing one saved conversation. For an ordinary
|
|
163
|
+
same-conversation `subagent_resume`, pass its attempt ID and new feedback, omitting role,
|
|
164
|
+
model and effort so the harness preserves its recorded recipe. The resume tool's schema
|
|
165
|
+
may differ from spawn: do not replay a role selector it cannot accept. A required changed
|
|
166
|
+
selection can continue only through controls both explicitly authorized and advertised by
|
|
167
|
+
that API; otherwise record why replacement is needed and launch fresh from the required
|
|
168
|
+
fill with its retained evidence. A resolved role default alone never authorizes a model pin.
|
|
169
|
+
Keep the original model/effort as run evidence and preserve all review/progress counters.
|
|
170
|
+
|
|
171
|
+
**A fresh or replacement launch repeats the saved fill, never a reconstruction of it.** On Pi the
|
|
157
172
|
launch authority stays the live role resolver ([shared-modules.md](shared-modules.md#model-slots)):
|
|
158
173
|
its `launch` is `{ role }` unless an explicit task override or this host's own
|
|
159
174
|
preference asked for a model or effort, and a resolved role default is never
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
// --line, any change to the file counts)? Prints { inDiff, do }: `inDiff` true means fix it in this unit.
|
|
21
21
|
// add: append one entry; the coordinator is the only writer. An implementer entry inside the
|
|
22
22
|
// unit's diff is refused (`refused` in the output) because the unit caused it. A review entry inside the diff
|
|
23
|
-
// is kept and marked `inDiff`: the
|
|
23
|
+
// is kept and marked `inDiff`: the coordinator selects supporting work by the delivery
|
|
24
|
+
// criterion, not location or severity alone. The same location, kind and
|
|
24
25
|
// summary (or, for a review, the same unit and finding id) is one entry. `--decision` records
|
|
25
26
|
// a question for the human: never posted, listed in the handback. Prints { id, duplicate, inDiff }.
|
|
26
27
|
// from-review: add every P2 in a review result that has no followUpUrl or dropboxId, and
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// next-actions.mjs --run <run dir> [--capacity-json '<snapshot>' | --slots N] [--quiet-minutes 45] [--resume] [--sync] [--json] [--peek] [--mode full|narrow|off] [--rules] [--exit-due]
|
|
6
6
|
//
|
|
7
7
|
// Reads <run>/task-plan.json (units with status, stage, worker, workerSince, workspace,
|
|
8
|
-
// dependsOn, pr, headSha, reviewedHead) and <run>/reviews/<unit>-r<N>.json (+ .fix.json; its head, complete, and
|
|
8
|
+
// implementationOwner, dependsOn, pr, headSha, reviewedHead) and <run>/reviews/<unit>-r<N>.json (+ .fix.json; its head, complete, and
|
|
9
9
|
// external.awaiting, and whether it holds a P0/P1). A unit with `worker`
|
|
10
10
|
// set is busy. Actions, in priority order:
|
|
11
11
|
//
|
|
@@ -75,6 +75,28 @@
|
|
|
75
75
|
// fetch failed, it prints `sync` instead. A run never finishes on a tree it
|
|
76
76
|
// could not read
|
|
77
77
|
//
|
|
78
|
+
// A unit's optional `implementationOwner` is the retained implement-or-fix conversation that outlives
|
|
79
|
+
// the worker slot, recorded from the harness as { runId, sessionId?, cwd?, kind }: `runId` is the
|
|
80
|
+
// attempt to resume, `kind` ("implement" or "fix", default "implement") says which worker owned it,
|
|
81
|
+
// and `sessionId` and `cwd` (the unit's workspace) identify that conversation and its tree. It is
|
|
82
|
+
// independent of `worker`, which records whichever worker is active now, so the owner survives the
|
|
83
|
+
// review phase and a later fix continues the same conversation instead of starting over.
|
|
84
|
+
//
|
|
85
|
+
// Every action that spawns a worker therefore carries the structured continuation the coordinator
|
|
86
|
+
// launches, beside its name: `continuation: "fresh"` for a first start or a new worker, launched
|
|
87
|
+
// normally, with no retention argument (a saved conversation stays continuable by its id;
|
|
88
|
+
// `retain_session: true` is optional protection a caller adds only for a long wait before cleanup).
|
|
89
|
+
// Implement and fix sessions become the unit's owner; `continuation: "owner-resume"` with
|
|
90
|
+
// `owner: { runId, kind, sessionId?, cwd? }` for a fix, a restack, or an unfinished implementation
|
|
91
|
+
// whose owner is still usable (subagent_resume({ id: owner.runId, ... }) returns a new attempt on
|
|
92
|
+
// the same conversation). `workerKind` names the slot the action launches. A review round is
|
|
93
|
+
// always a fresh reviewer: a finished review
|
|
94
|
+
// is never resumed, and a review recorded as an owner is not usable. An owner without a `runId`,
|
|
95
|
+
// with a `kind` outside implement and fix, or whose `cwd` is not the unit's workspace is not usable,
|
|
96
|
+
// so a fresh action reports ownerUnavailable rather than claiming continuity. A `retentionReleased`
|
|
97
|
+
// marker records that optional protection lapsed, so it never makes an owner unusable. A completed
|
|
98
|
+
// worker holds no slot: the owner is a reference, never an occupancy.
|
|
99
|
+
//
|
|
78
100
|
// Text output ends with one short line pointing to the skill path. With --resume or --rules it
|
|
79
101
|
// ends with RULES instead, the rules a compaction summary most often drops (in narrow and off
|
|
80
102
|
// modes, a one-line rules reminder for that mode).
|
|
@@ -120,6 +142,13 @@ import { BLOCKING } from './review-verdict.mjs'
|
|
|
120
142
|
// No skill-owned concurrency default: the caller supplies fresh host capacity.
|
|
121
143
|
// The only workers a unit runs (SKILL.md, Your role). A watcher is not a worker.
|
|
122
144
|
export const WORKER_KINDS = Object.freeze(['implement', 'fix', 'review'])
|
|
145
|
+
// The worker each worker-spawning action launches, in the plan's `workerKind` vocabulary. These are
|
|
146
|
+
// the actions that carry a structured continuation (`continuation`, `workerKind`, `owner`) for the
|
|
147
|
+
// coordinator.
|
|
148
|
+
export const WORKER_ACTION_KINDS = Object.freeze({ 'fill-slot': 'implement', resume: 'implement', 'start-fix': 'fix', restack: 'fix', 'start-review': 'review' })
|
|
149
|
+
// The kinds that may own a unit's implementation. A review is never resumed for the next round, so
|
|
150
|
+
// it is not one.
|
|
151
|
+
export const IMPLEMENTATION_OWNER_KINDS = Object.freeze(['implement', 'fix'])
|
|
123
152
|
export const SKILL_PATH = join(dirname(dirname(fileURLToPath(import.meta.url))), 'SKILL.md')
|
|
124
153
|
// Printed after every text call, and by rehydrate.mjs after a compaction.
|
|
125
154
|
export const RULES = 'Per unit, run only implement, fix, and review workers, recorded as workerKind: no planning, architecture, product, or setup workers. You own preflight findings; use an optional explorer on the fleet explore row only for concrete planning unknowns (exploration.md). You coordinate: never edit product code. In full mode take every step from next-actions.mjs; in every mode the run ends only when it reports done. A HEAD after a passing review is carried; any other new HEAD takes the tier rereview-scope.mjs picks, never yours. Decide before you defer: a question a worker or review raises is answered and recorded, then the unit continues; retrying or deferring never answers it. Never block on the human: take the automatic answer and keep going. Fix the root cause, never only its symptom. Before each scheduling pass, refresh subagent_settings and pass its snapshot with --capacity-json; do not reuse a run-start budget or subtract workflow workers again.'
|
|
@@ -176,6 +205,25 @@ export function normalizeCapacity(input) {
|
|
|
176
205
|
const hasWorker = (u) => u.worker !== undefined && u.worker !== null && u.worker !== ''
|
|
177
206
|
const codeDone = (u) => u.stage === 'done'
|
|
178
207
|
|
|
208
|
+
// A unit's usable implementation owner, normalized to { runId, kind, sessionId?, cwd? }, or null.
|
|
209
|
+
// Usable means it names the attempt to resume (`runId`), its `kind` is an implement or fix worker
|
|
210
|
+
// (never a reviewer: a finished review is never resumed for the next round), and, when both are
|
|
211
|
+
// recorded, its `cwd` is the unit's workspace (a conversation cannot be resumed in another tree).
|
|
212
|
+
// A plan that records nothing here keeps today's behavior: a fresh worker.
|
|
213
|
+
export function implementationOwnerOf(unit) {
|
|
214
|
+
const saved = unit?.implementationOwner
|
|
215
|
+
if (!saved || typeof saved !== 'object' || Array.isArray(saved)) return null
|
|
216
|
+
if (saved.cwd !== undefined && saved.cwd !== null && typeof saved.cwd !== 'string') return null
|
|
217
|
+
const runId = typeof saved.runId === 'string' ? saved.runId.trim() : ''
|
|
218
|
+
const kind = saved.kind === undefined ? 'implement' : saved.kind
|
|
219
|
+
if (!runId || !IMPLEMENTATION_OWNER_KINDS.includes(kind)) return null
|
|
220
|
+
const cwd = typeof saved.cwd === 'string' ? saved.cwd.trim() : ''
|
|
221
|
+
const workspace = typeof unit.workspace === 'string' ? unit.workspace.trim() : ''
|
|
222
|
+
if (cwd && workspace && cwd !== workspace) return null
|
|
223
|
+
const sessionId = typeof saved.sessionId === 'string' ? saved.sessionId.trim() : ''
|
|
224
|
+
return { runId, kind, ...(sessionId ? { sessionId } : {}), ...(cwd ? { cwd } : {}) }
|
|
225
|
+
}
|
|
226
|
+
|
|
179
227
|
export function workspaceCleanupSettled(unit) {
|
|
180
228
|
const result = unit.lifecycle?.cleanup
|
|
181
229
|
return typeof unit.headSha === 'string' && unit.headSha.length > 0 && result?.headSha === unit.headSha &&
|
|
@@ -338,6 +386,18 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
338
386
|
}
|
|
339
387
|
const actions = []
|
|
340
388
|
const add = (action, u, detail) => actions.push({ action, unit: String(u.id), detail })
|
|
389
|
+
// Keep owners through delivery and their saved conversations through later repair.
|
|
390
|
+
// A new review round starts fresh even when the preceding session remains available.
|
|
391
|
+
const continuationFor = (u, workerKind) => {
|
|
392
|
+
const owner = workerKind === 'review' ? null : implementationOwnerOf(u)
|
|
393
|
+
if (owner) return { continuation: 'owner-resume', workerKind, owner }
|
|
394
|
+
const ownerUnavailable = workerKind !== 'review' && u.implementationOwner != null
|
|
395
|
+
? 'Saved implementationOwner is malformed, names another role, or does not match the unit workspace; record replacement and retain its evidence.' : undefined
|
|
396
|
+
return { continuation: 'fresh', workerKind, ...(ownerUnavailable ? { ownerUnavailable } : {}) }
|
|
397
|
+
}
|
|
398
|
+
// Appended to an owner-resumed action: the work is the same, so the action keeps its name; only
|
|
399
|
+
// the launch changes, and it is a resume rather than a second worker for the unit.
|
|
400
|
+
const ownerNote = (id, owner) => `; launch it as a resume of unit ${id}'s implementation owner: subagent_resume({ id: ${JSON.stringify(owner.runId)}, prompt: <that brief or task> }) returns a new attempt on the same conversation${owner.sessionId ? ` (session ${owner.sessionId})` : ''}${owner.cwd ? ` in ${owner.cwd}` : ''}; record the returned id as implementationOwner.runId and keep the owner through review`
|
|
341
401
|
const managed = (u) => plan.workspaceLifecycle === 1 || u.lifecycle?.version === 1
|
|
342
402
|
for (const u of units) {
|
|
343
403
|
if (TERMINAL.has(u.status) && hasWorker(u) && (u.status !== 'blocked' || reasonOk(u))) {
|
|
@@ -346,7 +406,7 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
346
406
|
}
|
|
347
407
|
if (!managed(u) || u.status !== 'succeeded' || !u.workspace) continue
|
|
348
408
|
if (!hasWorker(u) && !workspaceCleanupSettled(u)) {
|
|
349
|
-
add('cleanup-workspace', u, `unit ${u.id} landed: record lifecycle.cleanup with state applying and headSha ${u.headSha ?? '(record the delivered HEAD first)'}, then run cleanup-runs.mjs cleanup --run <run> --unit ${u.id} --revision <saved planRevision> --apply --json; inspect and persist the returned lifecycle. A refusal is retained with its reason, never complete; do this before finish and alongside independent units`)
|
|
409
|
+
add('cleanup-workspace', u, `unit ${u.id} landed: release any retain_session protection it still holds and record that acknowledgement (implementation.md#settle-session-retention), then record lifecycle.cleanup with state applying and headSha ${u.headSha ?? '(record the delivered HEAD first)'}, then run cleanup-runs.mjs cleanup --run <run> --unit ${u.id} --revision <saved planRevision> --apply --json; inspect and persist the returned lifecycle. A refusal is retained with its reason, never complete; do this before finish and alongside independent units`)
|
|
350
410
|
}
|
|
351
411
|
}
|
|
352
412
|
const chainReady = []
|
|
@@ -637,6 +697,16 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
637
697
|
// One restack per unit per pass: the first reason found; the next pass sees the new HEAD.
|
|
638
698
|
const restacked = new Set()
|
|
639
699
|
for (let i = 0; i < actions.length; i++) if (actions[i].action === 'restack') { if (restacked.has(actions[i].unit)) actions.splice(i--, 1); else restacked.add(actions[i].unit) }
|
|
700
|
+
// One place attaches each worker action's continuation, so no site can spawn a worker without
|
|
701
|
+
// saying whether it starts fresh or resumes the unit's owner.
|
|
702
|
+
for (const a of actions) {
|
|
703
|
+
const workerKind = WORKER_ACTION_KINDS[a.action]
|
|
704
|
+
if (!workerKind) continue
|
|
705
|
+
const continuation = continuationFor(byId.get(a.unit), workerKind)
|
|
706
|
+
Object.assign(a, continuation)
|
|
707
|
+
if (continuation.owner) a.detail += ownerNote(a.unit, continuation.owner)
|
|
708
|
+
if (continuation.ownerUnavailable) a.detail += `; ${continuation.ownerUnavailable}`
|
|
709
|
+
}
|
|
640
710
|
const busy = units.filter(hasWorker).length
|
|
641
711
|
// The Harness already counted our workers along with other work and reservations.
|
|
642
712
|
// Without a capacity source every worker-needing action is due: the harness spawn limit governs.
|
|
@@ -652,9 +722,14 @@ export function nextActions(plan, reviews = {}, capacity, { resume = false, now,
|
|
|
652
722
|
const reviewReady = a.action !== 'start-review' || u.lifecycle?.resources?.some((r) => r.role === 'review' && r.state === 'ready')
|
|
653
723
|
const needsPreparation = managed(u) && (u.lifecycle?.workspace?.state !== 'ready' || !reviewReady)
|
|
654
724
|
const removalPending = managed(u) && u.lifecycle?.cleanup?.state === 'applying'
|
|
655
|
-
|
|
725
|
+
// A gating action keeps the worker action's continuation, so the launch stays explicit after
|
|
726
|
+
// the workspace is prepared or its cleanup is resolved.
|
|
727
|
+
const launch = { unit: a.unit, continuation: a.continuation, workerKind: a.workerKind,
|
|
728
|
+
...(a.owner ? { owner: a.owner } : {}),
|
|
729
|
+
...(a.ownerUnavailable ? { ownerUnavailable: a.ownerUnavailable } : {}) }
|
|
730
|
+
const admitted = removalPending ? { action: 'recover-workspace', ...launch,
|
|
656
731
|
detail: `before ${a.action} for unit ${a.unit}, resolve its applying cleanup: inspect cleanup-runs.mjs recover --repo <repo-root> --json, collect any running cleanup operation's terminal result, and verify its receipt and every owned resource before updating lifecycle. Never admit a worker while removal of its environment is unresolved` }
|
|
657
|
-
: needsPreparation ? { action: 'prepare-workspace',
|
|
732
|
+
: needsPreparation ? { action: 'prepare-workspace', ...launch,
|
|
658
733
|
detail: `before ${a.action} for unit ${a.unit}, record its exact workspace, branch, base SHA and lifecycle preparation intent${reviewReady ? '' : ', including its one review clone'}; run cleanup-runs.mjs prepare --run <run> --unit ${a.unit} --revision <saved planRevision> --apply --json and persist its returned ready identity. Reuse an existing matching workspace; never reset, replace or create another one on retry` } : a
|
|
659
734
|
due.push(unlimited ? { ...admitted, detail: `${admitted.detail} [needs a free worker slot]` } : admitted)
|
|
660
735
|
free--
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
// codes below for one release (DEPRECATED: read `verdict` instead). Old exit codes:
|
|
29
29
|
// 0 pass: no P0/P1 on --head (or a confirmed skip); record `reviewedHead`; ready
|
|
30
30
|
// once CI is green
|
|
31
|
-
// 1 fix: the printed `fixBrief` file holds the P0/P1
|
|
32
|
-
//
|
|
31
|
+
// 1 fix: the printed `fixBrief` file holds the P0/P1 blocker list. The coordinator
|
|
32
|
+
// may also name supporting P2 work selected in the plan. `action` says how to fix, from a
|
|
33
33
|
// comparison with the previous round's file (`<unit>-r<N-1>.json` beside
|
|
34
34
|
// it, or --prior):
|
|
35
35
|
// fix first blocking round: fix each finding's rule across its
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
// focused cases for missing proof, see the open cases fail,
|
|
40
40
|
// then fix until all pass, with the
|
|
41
41
|
// escalation model
|
|
42
|
-
// one-by-one only new P0/P1, introduced by the last fix:
|
|
43
|
-
//
|
|
42
|
+
// one-by-one only new P0/P1, introduced by the last fix: the owner fixes
|
|
43
|
+
// findings in turn, the smallest change that closes
|
|
44
44
|
// every row across the applicable paths
|
|
45
45
|
// 5 wait: no P0/P1 is open, but a GitHub reviewer whose changes request a fix brief
|
|
46
46
|
// already carried has not re-reviewed (`awaiting`, from github-reviews.mjs merge);
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
// on a skip record too, which carries only the reviewer's approval.
|
|
67
67
|
|
|
68
68
|
import { existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'
|
|
69
|
-
import { basename, dirname, join } from 'node:path'
|
|
69
|
+
import { basename, dirname, isAbsolute, join } from 'node:path'
|
|
70
70
|
|
|
71
71
|
import { execFileSync } from 'node:child_process'
|
|
72
72
|
|
|
@@ -101,10 +101,26 @@ const isCarry = (review) => reviewTier(review) === 'skip' && review?.carry === A
|
|
|
101
101
|
// A blocking finding names its rule and every path that must hold it, at least one open; a P0/P1
|
|
102
102
|
// with every row closed is resolved and belongs out of the file. Checked on the current review
|
|
103
103
|
// only, so earlier records written without the fields stay readable as priors.
|
|
104
|
+
function reproducerProblems(repro, label) {
|
|
105
|
+
const problems = []
|
|
106
|
+
if (!isRecord(repro) || !isText(repro.command) || !isText(repro.expected)) {
|
|
107
|
+
problems.push(`${label}.reproducer needs a command and expected result`)
|
|
108
|
+
}
|
|
109
|
+
if (!isText(repro?.cwd) || isAbsolute(repro.cwd) || repro.cwd.startsWith('\\') || /^[A-Za-z]:/.test(repro.cwd)
|
|
110
|
+
|| repro.cwd.replaceAll('\\', '/').split('/').includes('..')) {
|
|
111
|
+
problems.push(`${label}.reproducer.cwd must be relative to the candidate workspace, without parent traversal`)
|
|
112
|
+
}
|
|
113
|
+
if (isRecord(repro) && Object.hasOwn(repro, 'evidence') && !isText(repro.evidence)) {
|
|
114
|
+
problems.push(`${label}.reproducer.evidence must name retained evidence when present`)
|
|
115
|
+
}
|
|
116
|
+
return problems
|
|
117
|
+
}
|
|
118
|
+
|
|
104
119
|
function blockingShapeProblems(f, label) {
|
|
105
120
|
const problems = []
|
|
106
121
|
if (!isText(f?.trigger)) problems.push(`${label} (P0/P1) has no trigger`)
|
|
107
122
|
if (!isText(f?.rule)) problems.push(`${label} (P0/P1) has no rule`)
|
|
123
|
+
if (Object.hasOwn(f, 'reproducer')) problems.push(...reproducerProblems(f.reproducer, label))
|
|
108
124
|
if (!Array.isArray(f?.paths) || f.paths.length === 0) return [...problems, `${label} (P0/P1) has no paths rows`]
|
|
109
125
|
for (const [j, row] of f.paths.entries()) {
|
|
110
126
|
if (!isText(row?.path)) problems.push(`${label}.paths[${j}] has no path`)
|
|
@@ -213,6 +229,35 @@ export function roundsWithoutNewLow(review, history = []) {
|
|
|
213
229
|
return since
|
|
214
230
|
}
|
|
215
231
|
|
|
232
|
+
// Preserve concrete witnesses for the still-broken rule, including earlier triggers.
|
|
233
|
+
// These are source references, not claims that the candidate has passed them.
|
|
234
|
+
function fixReproducers(blocking, records) {
|
|
235
|
+
const ids = new Set(blocking.map((finding) => finding.id))
|
|
236
|
+
const lastPass = records.findLastIndex((record) => isRecord(record)
|
|
237
|
+
&& Array.isArray(record.findings) && reviewCompletionProblems(record).length === 0
|
|
238
|
+
&& !record.findings.some((finding) => BLOCKING.includes(finding?.severity)))
|
|
239
|
+
const seen = new Set()
|
|
240
|
+
const out = []
|
|
241
|
+
const gaps = []
|
|
242
|
+
for (const record of records.slice(lastPass + 1)) {
|
|
243
|
+
for (const finding of Array.isArray(record?.findings) ? record.findings : []) {
|
|
244
|
+
if (!ids.has(finding?.id) || !BLOCKING.includes(finding.severity) || !Object.hasOwn(finding, 'reproducer')) continue
|
|
245
|
+
const key = JSON.stringify([finding.id, finding.trigger, finding.reproducer])
|
|
246
|
+
if (seen.has(key)) continue
|
|
247
|
+
seen.add(key)
|
|
248
|
+
const problems = reproducerProblems(finding.reproducer, finding.id)
|
|
249
|
+
if (problems.length) {
|
|
250
|
+
gaps.push({ finding: finding.id, round: record.round, head: record.head,
|
|
251
|
+
trigger: finding.trigger, reason: problems.join('; ') })
|
|
252
|
+
continue
|
|
253
|
+
}
|
|
254
|
+
out.push({ finding: finding.id, round: record.round, head: record.head,
|
|
255
|
+
trigger: finding.trigger, reproducer: structuredClone(finding.reproducer) })
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return { reproducers: out, reproducerGaps: gaps }
|
|
259
|
+
}
|
|
260
|
+
|
|
216
261
|
// How to act on a blocking round. better-review keeps a still-open finding's id across
|
|
217
262
|
// rounds, so a shared id means the last fix did not resolve it.
|
|
218
263
|
// `history` is every record before `prior`, oldest first, or a function that reads them; it is
|
|
@@ -294,7 +339,12 @@ export function reviewVerdict(review, head, prior = null, { confirmSkip, earlier
|
|
|
294
339
|
return awaiting.length ? { verdict: 'wait', ...base, ...skipped } : { verdict: 'pass', reviewedHead: head, ...base, ...skipped }
|
|
295
340
|
}
|
|
296
341
|
if (skip && blocking.some((f) => !GITHUB_ID.test(String(f.id)))) throw new ReviewIncomplete('a skip record cannot hold findings; spawn the reviewer')
|
|
297
|
-
|
|
342
|
+
let retainedHistory
|
|
343
|
+
const readHistoryOnce = () => retainedHistory ??= typeof history === 'function' ? history() : history
|
|
344
|
+
const action = fixAction(review, blocking, prior, readHistoryOnce, { decision })
|
|
345
|
+
const witnesses = action.verdict === 'fix'
|
|
346
|
+
? fixReproducers(blocking, [...readHistoryOnce(), prior, review]) : {}
|
|
347
|
+
return { ...action, ...base, fix: blocking, ...witnesses }
|
|
298
348
|
}
|
|
299
349
|
|
|
300
350
|
// The record --carry writes for `head`: the previous round's approval, carried with no
|
|
@@ -333,12 +383,13 @@ export function carryRecord(prior, head, identity = {}) {
|
|
|
333
383
|
}
|
|
334
384
|
|
|
335
385
|
const INSTRUCTIONS = {
|
|
336
|
-
'fix': 'Fix
|
|
386
|
+
'fix': 'Fix these blocking findings. For each, make the smallest complete fix for its `rule` across the applicable paths and close every row in its `paths`. Use a shared owner when useful, but do not require a refactor; focused fixes on individual paths are acceptable.',
|
|
337
387
|
'test-first': 'The findings listed in `recurring` survived a fix: the last fix closed one path and missed others. For each, before changing code: name the rule the bug breaks; list every code path that can break it, including the trigger of this finding id in each earlier round\'s review file beside this one; reuse sufficient tests and add focused cases from the concrete triggers, then run them to see it fail on each open path. One table-driven test may cover several paths. Then make the smallest complete fix across the applicable paths until every test passes. Use a shared owner when useful, but do not require a refactor; focused fixes on individual paths are acceptable. "Fixed" is every path\'s test passing. Fix the rest as usual.',
|
|
338
|
-
'one-by-one': 'The last fix introduced these findings. Fix them
|
|
388
|
+
'one-by-one': 'The last fix introduced these findings. Fix them sequentially in this assignment, with the smallest complete change that closes every row of its `paths`. Use a shared owner when useful, but do not require a refactor; focused fixes on individual paths are acceptable.',
|
|
339
389
|
}
|
|
340
390
|
|
|
341
|
-
// The
|
|
391
|
+
// The generated blocker list stays P0/P1. Supporting P2 selections come from the
|
|
392
|
+
// coordinator's plan decision and accompanying brief; P3 is always skipped.
|
|
342
393
|
export function fixBriefOf(result) {
|
|
343
394
|
const fixRound = hasFixRound(result) ? result.fixRound : result.round
|
|
344
395
|
if (!isCounter(result.round) || !isCounter(fixRound) || fixRound > result.round) {
|
|
@@ -350,9 +401,11 @@ export function fixBriefOf(result) {
|
|
|
350
401
|
fixRound,
|
|
351
402
|
head: result.head,
|
|
352
403
|
action: result.action,
|
|
353
|
-
instruction: `${INSTRUCTIONS[result.action]}${result.decision ? ` Decision ${result.decision} in the plan's \`decisions\` settles what the recurring spec finding requires: fix it as that decision reads.` : ''}
|
|
404
|
+
instruction: `${INSTRUCTIONS[result.action]}${result.decision ? ` Decision ${result.decision} in the plan's \`decisions\` settles what the recurring spec finding requires: fix it as that decision reads.` : ''} Read each retained reproducer before using it; run against the candidate workspace at its workspace-relative cwd, preserving the recorded trigger and expected contract. Earlier results are baseline evidence, not candidate passes. A reproducerGaps entry is a source reference, not a runnable command: inspect its original review and establish a valid candidate-local case, retaining the original evidence and reporting any remaining gap. Keep subsequent failures of the affected operation in this repair until its existing criteria pass or an existing stop condition applies. Also perform only supporting P2 work explicitly selected by the coordinator in the plan and accompanying brief, naming the existing authorized outcome, verification or delivery it enables. P2 remains nonblocking; defer unselected P2 to the dropbox or a follow-up issue. Skip P3. Preserve the acceptance bar and existing authorization boundaries.`,
|
|
354
405
|
...(result.decision ? { decision: result.decision } : {}),
|
|
355
406
|
recurring: result.recurring,
|
|
407
|
+
reproducers: result.reproducers ?? [],
|
|
408
|
+
reproducerGaps: result.reproducerGaps ?? [],
|
|
356
409
|
fix: result.fix,
|
|
357
410
|
}
|
|
358
411
|
}
|
|
@@ -4,7 +4,7 @@ description: "Slash/explicit-only (/resolve-release). Full GitHub Flow release f
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
metadata:
|
|
6
6
|
workflow-role: coordinator
|
|
7
|
-
release-version: 0.
|
|
7
|
+
release-version: 0.50.0
|
|
8
8
|
---
|
|
9
9
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
10
10
|
# Resolve release
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-quality
|
|
3
3
|
description: "Seven principles for tests that catch real bugs, and an audit that reports weak, redundant, and not-coverage tests without fixing them. Use when writing, changing, or reviewing tests, or when asked whether tests are useful, redundant, over-mocked, flaky, only assert static text, or test config files, or asked to make a slow test suite faster without losing coverage, or when the user asks to write the testing conventions into a repo's CONTRIBUTING.md. NOT defining what a spec must prove (ensure-coverage) or authoring browser tests (e2e-test)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.50.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Test Quality
|