@open-agent-toolkit/cli 0.2.77 → 0.3.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.
Files changed (73) hide show
  1. package/assets/agents/oat-phase-implementer.md +5 -5
  2. package/assets/agents/oat-reviewer.md +15 -15
  3. package/assets/agents/recon-worker.md +12 -12
  4. package/assets/bundle-metadata.json +1 -1
  5. package/assets/docs/cli-utilities/workflow-gates.md +1 -1
  6. package/assets/docs/workflows/projects/artifacts.md +2 -2
  7. package/assets/docs/workflows/projects/autonomy.md +1 -1
  8. package/assets/docs/workflows/projects/implementation-execution.md +4 -4
  9. package/assets/docs/workflows/projects/lifecycle.md +1 -1
  10. package/assets/docs/workflows/projects/reviews.md +11 -11
  11. package/assets/docs/workflows/skills/recon.md +53 -27
  12. package/assets/public-package-versions.json +4 -4
  13. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +3 -3
  14. package/assets/skills/oat-docs-analyze/SKILL.md +3 -3
  15. package/assets/skills/oat-project-autonomous/SKILL.md +2 -2
  16. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +14 -14
  17. package/assets/skills/oat-project-design/SKILL.md +2 -2
  18. package/assets/skills/oat-project-discover/SKILL.md +2 -2
  19. package/assets/skills/oat-project-document/SKILL.md +1 -1
  20. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +14 -14
  21. package/assets/skills/oat-project-implement/SKILL.md +2 -2
  22. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +1 -1
  23. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +14 -14
  24. package/assets/skills/oat-project-implement/references/phase-execution.md +3 -3
  25. package/assets/skills/oat-project-implement/references/plan-and-resume.md +2 -2
  26. package/assets/skills/oat-project-import-plan/SKILL.md +2 -2
  27. package/assets/skills/oat-project-lite/SKILL.md +1 -1
  28. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +14 -14
  29. package/assets/skills/oat-project-plan/SKILL.md +2 -2
  30. package/assets/skills/oat-project-plan-writing/SKILL.md +4 -4
  31. package/assets/skills/oat-project-pr-final/SKILL.md +1 -1
  32. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +14 -14
  33. package/assets/skills/oat-project-quick-start/SKILL.md +2 -2
  34. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +14 -14
  35. package/assets/skills/oat-project-review-provide/SKILL.md +14 -14
  36. package/assets/skills/oat-project-review-provide-remote/SKILL.md +10 -10
  37. package/assets/skills/oat-project-review-receive/SKILL.md +64 -45
  38. package/assets/skills/oat-project-review-receive-remote/SKILL.md +6 -6
  39. package/assets/skills/oat-project-revise/SKILL.md +2 -2
  40. package/assets/skills/oat-review-provide/SKILL.md +2 -2
  41. package/assets/skills/oat-review-provide/references/review-artifact-template.md +3 -3
  42. package/assets/skills/oat-review-provide-remote/SKILL.md +11 -11
  43. package/assets/skills/oat-review-receive/SKILL.md +18 -17
  44. package/assets/skills/oat-review-receive-remote/SKILL.md +13 -13
  45. package/assets/skills/oat-wave-execute/SKILL.md +2 -2
  46. package/assets/skills/recon/SKILL.md +37 -19
  47. package/assets/skills/recon/references/packet-contract.md +33 -30
  48. package/assets/skills/recon/references/profiles.md +18 -15
  49. package/assets/skills/recon/references/worker-contract.md +87 -7
  50. package/assets/skills/recon/scripts/create-review-brief.mjs +2 -25
  51. package/assets/skills/recon/scripts/lib/cli-entry.mjs +21 -0
  52. package/assets/skills/recon/scripts/lib/contracts.mjs +144 -38
  53. package/assets/skills/recon/scripts/lib/routing.mjs +2 -5
  54. package/assets/skills/recon/scripts/lib/validated-run.mjs +1 -1
  55. package/assets/skills/recon/scripts/prepare-routing.mjs +2 -26
  56. package/assets/skills/recon/scripts/reconcile-ledger.mjs +269 -2
  57. package/assets/skills/recon/scripts/render-packet.mjs +2 -25
  58. package/assets/skills/recon/scripts/validate-artifact.mjs +2 -25
  59. package/assets/skills/recon/scripts/validate-packet.mjs +73 -43
  60. package/assets/templates/plan.md +1 -1
  61. package/dist/commands/gate/__fixtures__/fake-runtime.mjs +4 -4
  62. package/dist/commands/gate/index.d.ts.map +1 -1
  63. package/dist/commands/gate/index.js +20 -11
  64. package/dist/commands/gate/review-verdict.d.ts +2 -2
  65. package/dist/commands/gate/review-verdict.d.ts.map +1 -1
  66. package/dist/commands/gate/review-verdict.js +223 -57
  67. package/dist/review-remote/body-builder.d.ts +3 -3
  68. package/dist/review-remote/body-builder.d.ts.map +1 -1
  69. package/dist/review-remote/body-builder.js +12 -12
  70. package/dist/review-remote/reviewer-dispatch.d.ts +2 -2
  71. package/dist/review-remote/reviewer-dispatch.d.ts.map +1 -1
  72. package/dist/review-remote/reviewer-dispatch.js +15 -7
  73. package/package.json +2 -2
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.3.1
8
+ version: 1.3.2
9
9
  ---
10
10
 
11
11
  # Remote Review Receive (Ad-hoc GitHub PR)
@@ -71,8 +71,8 @@ Normalize every finding to this shape:
71
71
 
72
72
  ```yaml
73
73
  finding:
74
- id: "C1" | "I1" | "M1" | "m1"
75
- severity: critical | important | medium | minor
74
+ id: "C1" | "H1" | "M1" | "L1"
75
+ severity: critical | high | medium | low
76
76
  title: string
77
77
  file: string | null
78
78
  line: number | null
@@ -86,9 +86,9 @@ finding:
86
86
  Severity conventions:
87
87
 
88
88
  - `critical`: Broken behavior, security risk, or missing P0 requirement.
89
- - `important`: Missing P1 requirement, major robustness issue.
89
+ - `high`: Missing P1 requirement, major robustness issue.
90
90
  - `medium`: Meaningful but non-blocking quality/maintainability issue.
91
- - `minor`: Cosmetic/style/documentation issue.
91
+ - `low`: Cosmetic/style/documentation issue.
92
92
 
93
93
  ## Process
94
94
 
@@ -126,16 +126,16 @@ For each item in JSON:
126
126
 
127
127
  - Capture `type` (`review_comment`, `issue_comment`, `review`).
128
128
  - Map location fields (`path`, `line`) when present.
129
- - Use comment body + context to assign severity (`critical`, `important`, `medium`, `minor`).
130
- - Treat `CHANGES_REQUESTED` review state as a strong hint toward `important+`, not an automatic override.
129
+ - Use comment body + context to assign severity (`critical`, `high`, `medium`, `low`).
130
+ - Treat `CHANGES_REQUESTED` review state as a strong hint toward `high+`, not an automatic override.
131
131
  - Normalize into the shared findings model.
132
132
 
133
133
  ID assignment per severity bucket:
134
134
 
135
135
  - Critical: `C1`, `C2`, ...
136
- - Important: `I1`, `I2`, ...
136
+ - High: `H1`, `H2`, ...
137
137
  - Medium: `M1`, `M2`, ...
138
- - Minor: `m1`, `m2`, ...
138
+ - Low: `L1`, `L2`, ...
139
139
 
140
140
  ### Step 4: Present Findings Overview and Triage
141
141
 
@@ -146,21 +146,21 @@ Before triage prompts, output:
146
146
 
147
147
  Disposition options per finding:
148
148
 
149
- - `convert` (default for critical/important/medium/minor)
149
+ - `convert` (default for critical/high/medium/low)
150
150
  - `defer`
151
151
  - `dismiss`
152
152
 
153
153
  Rules:
154
154
 
155
- - Require concrete rationale for `defer`/`dismiss` at any severity, including minor. Small findings are usually cheaper to fix inline than to track as backlog items, so a minor `defer` must be justified just like any other deferral.
156
- - For any deferral (minor included), require a concrete reason (duplicate, dependency, explicit out-of-scope follow-up, risky churn).
155
+ - Require concrete rationale for `defer`/`dismiss` at any severity, including low. Small findings are usually cheaper to fix inline than to track as backlog items, so a low `defer` must be justified just like any other deferral.
156
+ - For any deferral (low included), require a concrete reason (duplicate, dependency, explicit out-of-scope follow-up, risky churn).
157
157
 
158
158
  ### Step 5: Generate Standalone Task List
159
159
 
160
160
  Task entry format:
161
161
 
162
162
  ```markdown
163
- - [ ] [important] Add null-guard in OAuth callback parser (`packages/auth/src/callback.ts:142`) - Validate provider payload before dereference.
163
+ - [ ] [high] Add null-guard in OAuth callback parser (`packages/auth/src/callback.ts:142`) - Validate provider payload before dereference.
164
164
  ```
165
165
 
166
166
  Output modes:
@@ -6,7 +6,7 @@ disable-model-invocation: false
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task
8
8
  metadata:
9
- version: 1.9.4
9
+ version: 1.9.5
10
10
  ---
11
11
 
12
12
  # Execute a Wave of External Plans
@@ -181,7 +181,7 @@ excluded from groups) — never mid-run. **Reconciliation contract:** when recon
181
181
  reveals a stale plan premise, the reconciliation must be NON-NARROWING (WHERE
182
182
  the work happens may change; WHAT must be true may not), recorded exactly once
183
183
  in the Drift Refresh Record with pointer-only references elsewhere — a
184
- reconciliation that waives a source-plan requirement is a plan-gate Important
184
+ reconciliation that waives a source-plan requirement is a plan-gate High
185
185
  (wave-4 evidence).
186
186
 
187
187
  Recon is delegated; the Drift Refresh Record entries and any reconciliation
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Write, Glob, Grep, Bash, AskUserQuestion, Agent, mcp__*
8
8
  metadata:
9
- version: 1.1.3
9
+ version: 1.1.5
10
10
  ---
11
11
 
12
12
  # Recon
@@ -127,8 +127,8 @@ Use the complete mode policy from `references/profiles.md` and
127
127
  `scripts/lib/routing.mjs`. Map manifest wave modes to the worker's closed
128
128
  assignment vocabulary: `redundant-gather` to `gather`;
129
129
  `semantic-verification` and `redundant-verification` to `verify`; `adversarial`
130
- and `contradiction-resolution` to `adversary`; and only `reconciliation` to
131
- `reconcile`. The remaining modes keep their same-named assignment. All lanes
130
+ and `contradiction-resolution` to `adversary`. The remaining worker modes keep
131
+ their same-named assignment; reconciliation is controller-owned. All lanes
132
132
  within one launch are a homogeneous wave. Select each wave independently; a
133
133
  stronger wave never raises unrelated waves' targets or effort.
134
134
 
@@ -164,9 +164,14 @@ task class and class floor. Preserve provider, route, role, model, effort,
164
164
  reasoning mode, and service tier as separate provider-native axes. A null axis
165
165
  means the adapter exposes no independently requested control; never translate
166
166
  effort between harnesses or normalize an opaque selector. Prefer the canonical
167
- `recon-worker` role. If that role is unavailable, plan the generic role with the
168
- complete worker contract as a visible generic role fallback before approval. A
169
- fallback after approval is forbidden.
167
+ `recon-worker` role only when the current live Task catalog exposes it. A
168
+ materialized `.cursor/agents/recon-worker.md` file proves installation, not that
169
+ the current Cursor Task catalog can launch the role. If the role is absent from
170
+ that observed catalog, plan the generic role with the complete worker contract
171
+ as a visible generic role fallback before approval. A fallback after approval
172
+ is forbidden. Every Cursor recon leaf, including that generic fallback, must be
173
+ launched as a background task so a new parent-chat message cannot turn parent
174
+ turn interruption into an apparent worker crash.
170
175
 
171
176
  Prepare a `schemaVersion: 2` draft manifest. Its execution object contains a
172
177
  complete inherited `target`, limits, waves, conditions, and later the approval.
@@ -218,7 +223,8 @@ result. If any approved axis cannot be satisfied, stop with a
218
223
  launch nothing. Never substitute a different axis to make the launch fit.
219
224
 
220
225
  Launch each wave through the dispatch dependency with exactly the approved
221
- axes. Immediately before each launch, check the constructed target through the
226
+ axes. On Cursor, launch both the custom worker role and the pre-approved generic
227
+ fallback in the background. Immediately before each launch, check the constructed target through the
222
228
  same production helper used by preview:
223
229
 
224
230
  ```bash
@@ -235,13 +241,22 @@ approved `waveId` and `laneId`. This structured identity is required for
235
241
  conditional and non-conditional lanes alike; prose is descriptive, not
236
242
  identity.
237
243
 
244
+ Worker completion is decided from the approved-path artifact before interpreting
245
+ a later provider transport error. When the artifact's identity, closed schema,
246
+ bytes, and digest validate, the lane is complete; a subsequent stream-close or
247
+ RPC error is recorded as a non-material diagnostic and never triggers a
248
+ replacement launch. Missing or invalid output remains a terminal `PASS_FAILED`
249
+ outcome with no retry or replacement.
250
+
238
251
  Run the passes in this order:
239
252
 
240
253
  1. `map` and `gather` workers write unique dossiers under `raw/dossiers/`.
241
254
  Thorough runs complete their independent `redundant-gather` wave here too.
242
255
  2. `compile` writes a candidate canonical claim ledger. A thorough candidate
243
256
  directly references a complete dossier from every approved primary and
244
- redundant gather lane before any review brief is created.
257
+ redundant gather lane before any review brief is created. Every display
258
+ excerpt is an exact contiguous substring of its cited source, apart from the
259
+ declared `redacted-exact` representation; paraphrase is invalid evidence.
245
260
  3. Source preflight: run `scripts/validate-artifact.mjs` on the candidate
246
261
  manifest and ledger, then reopen every declared source and evidence locator
247
262
  with the checks in `scripts/validate-packet.mjs`. Resolve source roots to
@@ -251,23 +266,26 @@ Run the passes in this order:
251
266
  manifest and ledger pair validates.
252
267
  4. Profile-required `verify`, `adversary`, and `coverage` workers consume only
253
268
  immutable selectively blind briefs created by
254
- `scripts/create-review-brief.mjs` at unique paths.
269
+ `scripts/create-review-brief.mjs` at unique paths. Each review-producing
270
+ wave has exactly one lane; partition source or question fan-out in the
271
+ applicable gather wave instead.
255
272
  5. Evaluate each predeclared evidence condition only after its completed
256
273
  predecessor artifacts exist. Record exactly one root-authored condition
257
274
  outcome. A triggered `contradiction-resolution` wave runs once as an
258
275
  `adversary` evidence assignment; a not-triggered or unresolved wave supplies
259
276
  no artifact. Accepted failure, cancellation, timeout, or missing output never
260
277
  authorizes replacement work.
261
- 6. Standard and thorough execute exactly one terminal `reconciliation` wave,
262
- mapped to `reconcile`, after required review evidence and any triggered
263
- contradiction investigation. It writes a new candidate ledger without
264
- mutating the prior ledger.
265
-
266
- If `reconciliation-needs-judgment` is foreseeable, select an adequate target
267
- for that one terminal wave before approval. If it appears after approval and
268
- the approved target is inadequate, preserve completed evidence and return an
269
- explicit unresolved, out-of-envelope gap for renewed approval or a new run.
270
- Never mutate the target, launch a second reconciliation, or substitute a
278
+ 6. Standard and thorough run one deterministic controller reconciliation after
279
+ required review evidence and any triggered contradiction investigation. The
280
+ controller invokes `scripts/reconcile-ledger.mjs` once using the manifest's
281
+ `execution.reconciliation` paths and literal producer
282
+ `controller:reconcile-ledger-v1`, validates both candidate outputs, copies
283
+ the exact ledger bytes to a packet-contained temporary file, and atomically
284
+ renames it to `claims.json`. No reconciliation worker is dispatched.
285
+
286
+ If reconciliation requires new semantic judgment, preserve completed evidence
287
+ and return an explicit unresolved caller-owned gap. Never mutate the target or
288
+ substitute a
271
289
  contradiction search for synthesis.
272
290
 
273
291
  Use `references/worker-contract.md` for every assignment. Never allow two
@@ -125,18 +125,21 @@ condition contains `conditionId`, `destinationWaveId`, `afterWaveIds`, one of
125
125
  `insufficient-evidence` or `unresolved-material-challenge`, and
126
126
  `maxActivations: 1`. Each conditional destination is a uniquely identified
127
127
  `contradiction-resolution` evidence wave, has exactly one condition, appears
128
- after every named predecessor and before the one terminal reconciliation, and
128
+ after every named predecessor and before controller reconciliation, and
129
129
  owns unique lane IDs and write roots. Conversely, every wave marked
130
130
  `conditional: true` must be the destination of exactly one activating condition;
131
131
  dead conditional waves are invalid. Quick permits no conditional wave;
132
- standard permits one and thorough two. The profile's 4/10/20 adaptive-lane cap
132
+ standard and thorough each permit one. The profile's 4/10/20 evidence-lane cap
133
133
  counts `gather`, `semantic-verification`, `adversarial`, `coverage`,
134
134
  `redundant-gather`, `redundant-verification`, and
135
135
  `contradiction-resolution` when those modes are permitted by the profile.
136
- Every permitted mode outside that counted set is fixed at exactly one lane:
137
- `map` and `compile` for quick, plus terminal `reconciliation` for standard and
138
- thorough. The resulting total lane maxima are 6/13/23, and concurrency remains
139
- capped at 4/6/8.
136
+ Only `gather` and `redundant-gather` may partition a wave across multiple lanes.
137
+ Every typed review wave and every permitted mode outside the counted set is
138
+ fixed at exactly one lane, including `map` and `compile`. The resulting
139
+ worker-lane maxima are 6/12/22, and concurrency remains capped at 4/6/8.
140
+ Each review lane's approved write root must contain the corresponding fixed
141
+ path in `execution.reconciliation`; a different approved root is invalid before
142
+ launch.
140
143
 
141
144
  Triggered dispositions require exact complete same-run artifacts from every
142
145
  approved predecessor and concrete typed predicate evidence from those same-run
@@ -150,17 +153,14 @@ no achieved pass. Accepted failed, cancelled, timed-out, or missing predecessor
150
153
  work cannot activate replacement work. Required profile passes remain required
151
154
  regardless of conditional annotations.
152
155
 
153
- `reconciliation-needs-judgment` is a controller escalation outcome, never a
154
- condition predicate. Foreseeable judgment changes the one terminal target before
155
- approval. A need discovered later preserves completed work and records an
156
- unresolved out-of-envelope gap until renewed approval or a new run; it never
157
- mutates the approved target or launches a second reconciliation.
156
+ `reconciliation-needs-judgment` is a caller-owned unresolved outcome, never a
157
+ condition predicate or target escalation. The controller preserves completed
158
+ work and records the gap; it never dispatches reconciliation work.
158
159
 
159
- The controller maps the ten manifest wave modes onto the worker contract's
160
- seven assignment modes: redundant gathering uses `gather`; semantic and
160
+ The controller maps the nine manifest wave modes onto the worker contract's
161
+ six assignment modes: redundant gathering uses `gather`; semantic and
161
162
  redundant verification use `verify`; adversarial and contradiction-resolution
162
- use `adversary`; and only terminal reconciliation uses `reconcile`. This mapping
163
- does not change the approved manifest mode used for artifact and pass checks.
163
+ use `adversary`. Reconciliation is not a worker mode or approval target.
164
164
 
165
165
  Approval is `{ type: "explicit-user-approval", approvedAt }`. It is valid only
166
166
  for the exact proposal shown in the same uninterrupted controller flow. Resume,
@@ -183,7 +183,6 @@ complete typed artifacts of the same run:
183
183
  | `semantic-verification` | a `recon.review-result` with kind `semantic` |
184
184
  | `adversarial` | a `recon.review-result` with kind `adversarial` |
185
185
  | `coverage` | a `recon.review-result` with kind `coverage` |
186
- | `reconciliation` | a `recon.review-result` with kind `reconciliation` |
187
186
  | `redundant-gather` | a complete `gather` dossier owned by the approved `redundant-gather` wave |
188
187
  | `redundant-verification` | a `recon.review-result` with kind `redundant-verification` |
189
188
  | `contradiction-resolution` | a `recon.review-result` with kind `contradiction-resolution` |
@@ -191,11 +190,11 @@ complete typed artifacts of the same run:
191
190
  `quick` requires `map` and `gather`; the canonical ledger itself is the
192
191
  compile result, so an approved `compile` lane needs no separate artifact, and
193
192
  locator validation is performed by the validator.
194
- `standard` adds `semantic-verification`, `adversarial`, `coverage`, and
195
- `reconciliation`. `thorough` adds `redundant-gather` and
193
+ `standard` adds `semantic-verification`, `adversarial`, and `coverage`, then
194
+ requires the manifest-bound controller reconciliation. `thorough` adds `redundant-gather` and
196
195
  `redundant-verification`. A predeclared conditional
197
196
  `contradiction-resolution` evidence pass may feed the same mandatory terminal
198
- reconciliation when its predicate triggers; it is not a second terminal pass.
197
+ controller reconciliation when its predicate triggers.
199
198
 
200
199
  Thorough routing completes `redundant-gather` before `compile`. The compiled
201
200
  ledger must directly reference by exact path and digest at least one complete
@@ -346,17 +345,21 @@ branch; source ineligibility never bypasses persistence safety.
346
345
  claim/evidence associations, coverage findings, unresolved issues, and
347
346
  completion status. Every new evidence record has at least one exact
348
347
  association, and an association cannot name evidence absent from that result
349
- or a claim without a disposition in that result. Reconciliation results
350
- replace the brief reference with prior-ledger/revision, additions/removals,
351
- exact transitions, and coverage-disposition bindings. Coverage findings are
352
- closed records bound to affected claims and exact manifest gaps. Accepted
353
- material gaps require a legal downgrade for every affected claim; a resolved
354
- finding instead names exact typed evidence. Non-material coverage gaps
355
- downgrade verified claims and transition provisional claims to unresolved,
356
- while existing supported claims remain supported without verified promotion.
357
- Thorough redundant verification and contradiction resolution are
358
- claim-bearing typed review results, not raw dossiers: they bind immutable
359
- briefs, claim dispositions, and explicit affected-contradiction dispositions.
348
+ or a claim without a disposition in that result.
349
+
350
+ Every `unresolvedIssues` member is a string. Review results are closed objects:
351
+ unknown fields and object-valued issue entries are invalid.
352
+ Reconciliation results replace the brief reference with prior-ledger/revision,
353
+ additions/removals, exact transitions, and coverage-disposition bindings.
354
+ Coverage findings are closed records bound to affected claims and exact
355
+ manifest gaps. Accepted
356
+ material gaps require a legal downgrade for every affected claim; a resolved
357
+ finding instead names exact typed evidence. Non-material coverage gaps
358
+ downgrade verified claims and transition provisional claims to unresolved,
359
+ while existing supported claims remain supported without verified promotion.
360
+ Thorough redundant verification and contradiction resolution are
361
+ claim-bearing typed review results, not raw dossiers: they bind immutable
362
+ briefs, claim dispositions, and explicit affected-contradiction dispositions.
360
363
 
361
364
  Create immutable mode-specific review projections with
362
365
  `scripts/create-review-brief.mjs`. Verification briefs expose only claim
@@ -28,19 +28,20 @@ claims are sufficient.
28
28
  Use for load-bearing evidence that needs independent semantic challenge.
29
29
 
30
30
  - Required: quick topology plus selectively blind semantic verification,
31
- adversarial review, coverage review, and reconciliation.
32
- - Adaptive evidence lanes: `gather`, `semantic-verification`, `adversarial`,
31
+ adversarial review, coverage review, and deterministic controller reconciliation.
32
+ - Counted evidence lanes: `gather`, `semantic-verification`, `adversarial`,
33
33
  `coverage`, and any predeclared `contradiction-resolution`; hard cap 10
34
- across those counted modes. Required `map`, `compile`, and terminal
35
- `reconciliation` waves are fixed at exactly one lane each, so the total
36
- maximum is 13 lanes.
34
+ across those modes. `gather` may partition work across lanes. Every typed
35
+ review wave, plus required `map` and `compile`, is fixed at exactly one lane,
36
+ so the total maximum is 12 worker lanes.
37
+ One deterministic controller reconciliation follows.
37
38
  - Maximum concurrency: 6.
38
39
  - Assurance ceiling: `verified` only after exact locator validation, affirmative
39
40
  independent semantic review, no unresolved material challenge, and adequate
40
41
  coverage.
41
42
  - Conditional work: at most one predeclared `contradiction-resolution`
42
43
  evidence wave for a material challenge, followed when triggered or not by
43
- the same one mandatory terminal reconciliation.
44
+ the same one mandatory controller reconciliation.
44
45
 
45
46
  ## thorough
46
47
 
@@ -51,17 +52,19 @@ reopening and verification.
51
52
  redundant verification for load-bearing claims. Redundant gathering finishes
52
53
  before compilation, and every completed primary or redundant gather lane is
53
54
  represented in the compiled ledger inputs before review briefs are created.
54
- - Adaptive evidence lanes: the standard counted modes plus `redundant-gather`
55
+ - Counted evidence lanes: the standard counted modes plus `redundant-gather`
55
56
  and `redundant-verification`; hard cap 20 across those counted modes.
56
- Required `map`, `compile`, and terminal `reconciliation` waves are fixed at
57
- exactly one lane each, so the total maximum is 23 lanes.
57
+ `gather` and `redundant-gather` may partition work across lanes. Every typed
58
+ review wave, plus required `map` and `compile`, is fixed at exactly one lane,
59
+ so the total maximum is 22 worker lanes.
60
+ One deterministic controller reconciliation follows.
58
61
  - Maximum concurrency: 8.
59
62
  - Assurance ceiling: `verified` only for claims affirmed by the required
60
63
  independent passes and left without unresolved material challenge.
61
- - Conditional work: optionally predeclare up to two condition-bound
62
- `contradiction-resolution` evidence waves within the manifest's hard cap.
63
- Each runs only when its approved predicate triggers; both branches feed
64
- exactly one mandatory terminal reconciliation.
64
+ - Conditional work: optionally predeclare one condition-bound
65
+ `contradiction-resolution` evidence wave within the manifest's hard cap. It
66
+ runs only when its approved predicate triggers; both branches feed exactly
67
+ one mandatory controller reconciliation.
65
68
 
66
69
  ## Planning Rules
67
70
 
@@ -69,8 +72,8 @@ reopening and verification.
69
72
  2. Classify required and conditional waves before target preparation.
70
73
  3. Classify the actual bounded assignment. Citation reopening, explicit
71
74
  inventory comparison, counterexample search, and mechanical dossier
72
- compilation can remain economical; judgment-bearing interpretation or
73
- reconciliation may require a stronger independently approved wave.
75
+ compilation can remain economical. Reconciliation is deterministic
76
+ controller work; new semantic judgment is a caller-owned unresolved gap.
74
77
  4. Resolve and explain each wave's exact provider-native target and unsupported
75
78
  controls without cross-harness normalization.
76
79
  5. Reduce lanes when scope is small; never invent work to fill a profile cap.
@@ -21,7 +21,7 @@ Reject an incomplete or contradictory assignment before reading sources. Never
21
21
  request credentials, mutate an investigated source, broaden scope, or choose an
22
22
  alternate write path.
23
23
 
24
- The manifest's ten wave modes map to the worker's closed seven-mode vocabulary:
24
+ The manifest's nine wave modes map to the worker's closed six-mode vocabulary:
25
25
 
26
26
  | Manifest wave mode | Worker assignment mode |
27
27
  | -------------------------- | ---------------------- |
@@ -31,7 +31,6 @@ The manifest's ten wave modes map to the worker's closed seven-mode vocabulary:
31
31
  | `semantic-verification` | `verify` |
32
32
  | `adversarial` | `adversary` |
33
33
  | `coverage` | `coverage` |
34
- | `reconciliation` | `reconcile` |
35
34
  | `redundant-gather` | `gather` |
36
35
  | `redundant-verification` | `verify` |
37
36
  | `contradiction-resolution` | `adversary` |
@@ -47,17 +46,16 @@ wave target; the worker neither selects nor upgrades it.
47
46
  - `gather`: inspect assigned sources and emit source-grounded findings with
48
47
  typed locators, minimal display excerpts, uncertainty, and contradictions.
49
48
  - `compile`: consume only designated dossiers and create a provisional claim
50
- ledger candidate. Deduplicate without inventing evidence.
49
+ ledger candidate. Deduplicate without inventing evidence. Display excerpts
50
+ must be exact contiguous source substrings, except for the explicit
51
+ `redacted-exact` representation; never paraphrase an excerpt.
51
52
  - `verify`: consume an immutable verification brief, reopen only its declared
52
53
  sources, test locators and claim semantics, and report claim dispositions.
53
54
  - `adversary`: consume scope, questions, and provisional statements only; seek
54
55
  counterevidence, unsupported inference, and missing alternatives.
55
56
  - `coverage`: compare declared scope and questions with ledger coverage without
56
57
  reading gatherer reasoning.
57
- - `reconcile`: apply review dispositions and contradiction outcomes to a new
58
- ledger candidate. Preserve prior revisions and never invent evidence.
59
-
60
- No other mode is valid.
58
+ No other mode is valid.
61
59
 
62
60
  ## Output Contract
63
61
 
@@ -83,11 +81,93 @@ Persist minimal excerpts only. Detect and redact secret spans before writing;
83
81
  never persist the secret or its sensitive-span digest. Finish by returning the
84
82
  artifact path and compact outcome only.
85
83
 
84
+ Before returning, run the supplied deterministic validator against the sole
85
+ unpromoted `writePath`. Correct an invalid candidate within the same accepted
86
+ task and validate again. A terminal invalid candidate is `PASS_FAILED`; it does
87
+ not authorize controller retry or replacement.
88
+
89
+ Closed review-result examples (all omitted arrays are still required as shown):
90
+
91
+ ```json
92
+ {
93
+ "kind": "recon.review-result",
94
+ "schemaVersion": 1,
95
+ "id": "review-semantic",
96
+ "runId": "run-1",
97
+ "reviewKind": "semantic",
98
+ "reviewerLane": "lane-semantic",
99
+ "status": "complete",
100
+ "brief": {
101
+ "path": "reviews/briefs/verify.json",
102
+ "digest": "sha256:0000000000000000000000000000000000000000000000000000000000000000"
103
+ },
104
+ "permittedInputs": [],
105
+ "excludedInputs": [],
106
+ "dispositions": [],
107
+ "newEvidence": [],
108
+ "evidenceAssociations": [],
109
+ "coverageFindings": [],
110
+ "unresolvedIssues": []
111
+ }
112
+ ```
113
+
114
+ ```json
115
+ {
116
+ "kind": "recon.review-result",
117
+ "schemaVersion": 1,
118
+ "id": "review-adversarial",
119
+ "runId": "run-1",
120
+ "reviewKind": "adversarial",
121
+ "reviewerLane": "lane-adversarial",
122
+ "status": "complete",
123
+ "brief": {
124
+ "path": "reviews/briefs/adversary.json",
125
+ "digest": "sha256:0000000000000000000000000000000000000000000000000000000000000000"
126
+ },
127
+ "permittedInputs": [],
128
+ "excludedInputs": [],
129
+ "dispositions": [],
130
+ "newEvidence": [],
131
+ "evidenceAssociations": [],
132
+ "coverageFindings": [],
133
+ "unresolvedIssues": []
134
+ }
135
+ ```
136
+
137
+ ```json
138
+ {
139
+ "kind": "recon.review-result",
140
+ "schemaVersion": 1,
141
+ "id": "review-coverage",
142
+ "runId": "run-1",
143
+ "reviewKind": "coverage",
144
+ "reviewerLane": "lane-coverage",
145
+ "status": "complete",
146
+ "brief": {
147
+ "path": "reviews/briefs/coverage.json",
148
+ "digest": "sha256:0000000000000000000000000000000000000000000000000000000000000000"
149
+ },
150
+ "permittedInputs": [],
151
+ "excludedInputs": [],
152
+ "dispositions": [],
153
+ "newEvidence": [],
154
+ "evidenceAssociations": [],
155
+ "coverageFindings": [],
156
+ "unresolvedIssues": []
157
+ }
158
+ ```
159
+
86
160
  The controller validates the candidate against `packet-contract.md` with the
87
161
  bundled deterministic artifact validator. A validation failure quarantines the
88
162
  candidate; it never authorizes the worker to rewrite a shared artifact, retry,
89
163
  or launch a replacement.
90
164
 
165
+ For an accepted launch, the approved-path artifact is authoritative over the
166
+ return transport. If its identity, schema, bytes, and digest validate, a later
167
+ stream-close diagnostic is non-material and the lane is complete. Missing or
168
+ invalid output remains terminal `PASS_FAILED`; neither outcome authorizes a
169
+ replacement launch.
170
+
91
171
  ## Invariants
92
172
 
93
173
  - Read only the assignment's allowed inputs using its source-read authority.
@@ -1,11 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { realpathSync } from 'node:fs';
4
3
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
5
4
  import { dirname, relative, resolve } from 'node:path';
6
- import { fileURLToPath } from 'node:url';
7
5
 
8
6
  import { canonicalJson, hashFile } from './lib/canonical-json.mjs';
7
+ import { isDirectExecution } from './lib/cli-entry.mjs';
9
8
  import { issue, isObject, validateArtifactShape } from './lib/contracts.mjs';
10
9
  import { assertSafeOutputPath } from './lib/safe-path.mjs';
11
10
 
@@ -442,29 +441,7 @@ async function main(argv) {
442
441
  process.stdout.write(`${JSON.stringify(reference, null, 2)}\n`);
443
442
  }
444
443
 
445
- /**
446
- * Direct invocation, compared as canonical paths on both sides. Comparing a raw
447
- * `process.argv[1]` against `import.meta.url` makes this script a silent no-op
448
- * that exits 0 whenever the skill is reached through a symlinked install root,
449
- * and canonicalizing only one side has the same effect under
450
- * `--preserve-symlinks-main`, which keeps the link in `import.meta.url`.
451
- * A path that cannot be canonicalized is not a module Node loaded as the entry
452
- * point, so a thrown `realpathSync` means "not invoked directly" and returns
453
- * `false`; it never masks a direct run.
454
- */
455
- function isDirectInvocation(invokedPath) {
456
- if (!invokedPath) return false;
457
- try {
458
- return (
459
- realpathSync(fileURLToPath(import.meta.url)) ===
460
- realpathSync(resolve(invokedPath))
461
- );
462
- } catch {
463
- return false;
464
- }
465
- }
466
-
467
- if (isDirectInvocation(process.argv[1])) {
444
+ if (isDirectExecution(import.meta.url)) {
468
445
  main(process.argv.slice(2)).catch((error) => {
469
446
  process.stderr.write(`${error instanceof Error ? error.message : error}\n`);
470
447
  process.exitCode = 1;
@@ -0,0 +1,21 @@
1
+ import { realpathSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ /**
6
+ * Compare canonical paths on both sides so direct execution works through a
7
+ * symlinked install root, including with `--preserve-symlinks-main`. A path
8
+ * that cannot be canonicalized is not the loaded entry module, so resolution
9
+ * failure returns false without masking a direct run.
10
+ */
11
+ export function isDirectExecution(moduleUrl, entryPath = process.argv[1]) {
12
+ if (!entryPath) return false;
13
+ try {
14
+ return (
15
+ realpathSync(fileURLToPath(moduleUrl)) ===
16
+ realpathSync(resolve(entryPath))
17
+ );
18
+ } catch {
19
+ return false;
20
+ }
21
+ }