@open-agent-toolkit/cli 0.2.53 → 0.2.54

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 (87) hide show
  1. package/assets/agents/recon-worker.md +105 -0
  2. package/assets/bundle-metadata.json +1 -1
  3. package/assets/docs/cli-utilities/tool-packs.md +62 -8
  4. package/assets/docs/contributing/skills.md +26 -0
  5. package/assets/docs/workflows/skills/index.md +3 -0
  6. package/assets/docs/workflows/skills/recon.md +194 -0
  7. package/assets/public-package-versions.json +4 -4
  8. package/assets/skills/oat-dispatch-subagents/SKILL.md +105 -4
  9. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +226 -0
  10. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +2 -2
  11. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +2 -2
  12. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +2 -2
  13. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +2 -2
  14. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +2 -2
  15. package/assets/skills/recon/SKILL.md +260 -0
  16. package/assets/skills/recon/references/packet-contract.md +307 -0
  17. package/assets/skills/recon/references/profiles.md +58 -0
  18. package/assets/skills/recon/references/worker-contract.md +71 -0
  19. package/assets/skills/recon/scripts/create-review-brief.mjs +452 -0
  20. package/assets/skills/recon/scripts/lib/canonical-json.mjs +55 -0
  21. package/assets/skills/recon/scripts/lib/contracts.mjs +2462 -0
  22. package/assets/skills/recon/scripts/lib/safe-path.mjs +120 -0
  23. package/assets/skills/recon/scripts/lib/validated-run.mjs +86 -0
  24. package/assets/skills/recon/scripts/reconcile-ledger.mjs +360 -0
  25. package/assets/skills/recon/scripts/render-packet.mjs +392 -0
  26. package/assets/skills/recon/scripts/validate-artifact.mjs +96 -0
  27. package/assets/skills/recon/scripts/validate-packet.mjs +2359 -0
  28. package/dist/commands/doctor/index.js +5 -5
  29. package/dist/commands/init/index.d.ts.map +1 -1
  30. package/dist/commands/init/index.js +6 -7
  31. package/dist/commands/status/index.d.ts +2 -2
  32. package/dist/commands/status/index.d.ts.map +1 -1
  33. package/dist/commands/status/index.js +7 -4
  34. package/dist/commands/sync/index.d.ts.map +1 -1
  35. package/dist/commands/sync/index.js +24 -8
  36. package/dist/commands/sync/sync.types.d.ts +2 -2
  37. package/dist/commands/sync/sync.types.d.ts.map +1 -1
  38. package/dist/commands/tools/migrate/index.d.ts.map +1 -1
  39. package/dist/commands/tools/migrate/index.js +25 -1
  40. package/dist/commands/tools/migrate/migrate-pack.d.ts +5 -0
  41. package/dist/commands/tools/migrate/migrate-pack.d.ts.map +1 -1
  42. package/dist/commands/tools/migrate/migrate-pack.js +66 -7
  43. package/dist/commands/tools/remove/index.js +1 -1
  44. package/dist/commands/tools/remove/remove-tools.d.ts +5 -1
  45. package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -1
  46. package/dist/commands/tools/remove/remove-tools.js +81 -1
  47. package/dist/commands/tools/shared/apply-pack-reconcile.d.ts +3 -0
  48. package/dist/commands/tools/shared/apply-pack-reconcile.d.ts.map +1 -1
  49. package/dist/commands/tools/shared/apply-pack-reconcile.js +40 -9
  50. package/dist/commands/tools/shared/format-pack-inventory.d.ts.map +1 -1
  51. package/dist/commands/tools/shared/format-pack-inventory.js +3 -0
  52. package/dist/commands/tools/shared/install-sync-context.d.ts +2 -1
  53. package/dist/commands/tools/shared/install-sync-context.d.ts.map +1 -1
  54. package/dist/commands/tools/shared/install-sync-context.js +14 -3
  55. package/dist/commands/tools/shared/pack-dependencies.d.ts +14 -0
  56. package/dist/commands/tools/shared/pack-dependencies.d.ts.map +1 -0
  57. package/dist/commands/tools/shared/pack-dependencies.js +54 -0
  58. package/dist/commands/tools/shared/pack-inventory.d.ts.map +1 -1
  59. package/dist/commands/tools/shared/pack-inventory.js +9 -9
  60. package/dist/commands/tools/shared/pack-lifecycle.d.ts +9 -1
  61. package/dist/commands/tools/shared/pack-lifecycle.d.ts.map +1 -1
  62. package/dist/commands/tools/shared/pack-lifecycle.js +102 -9
  63. package/dist/commands/tools/shared/pack-manifest.d.ts +2 -2
  64. package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
  65. package/dist/commands/tools/shared/pack-manifest.js +91 -2
  66. package/dist/commands/tools/shared/pack-reconcile.d.ts +15 -1
  67. package/dist/commands/tools/shared/pack-reconcile.d.ts.map +1 -1
  68. package/dist/commands/tools/shared/pack-reconcile.js +75 -13
  69. package/dist/commands/tools/shared/scoped-pack-intent.d.ts +8 -0
  70. package/dist/commands/tools/shared/scoped-pack-intent.d.ts.map +1 -1
  71. package/dist/commands/tools/shared/scoped-pack-intent.js +61 -15
  72. package/dist/commands/tools/shared/types.d.ts +7 -0
  73. package/dist/commands/tools/shared/types.d.ts.map +1 -1
  74. package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
  75. package/dist/commands/tools/update/update-tools.js +7 -1
  76. package/dist/config/oat-config.d.ts +5 -1
  77. package/dist/config/oat-config.d.ts.map +1 -1
  78. package/dist/config/oat-config.js +19 -0
  79. package/dist/engine/index.d.ts +1 -1
  80. package/dist/engine/index.d.ts.map +1 -1
  81. package/dist/engine/scanner.d.ts +9 -1
  82. package/dist/engine/scanner.d.ts.map +1 -1
  83. package/dist/engine/scanner.js +61 -4
  84. package/dist/shared/types.d.ts +1 -0
  85. package/dist/shared/types.d.ts.map +1 -1
  86. package/dist/shared/types.js +3 -0
  87. package/package.json +2 -2
@@ -0,0 +1,307 @@
1
+ # Recon Packet Contract v1
2
+
3
+ Every JSON artifact carries a `kind` discriminator and integer
4
+ `schemaVersion`. Version 1 rejects unknown versions; extend the contract through
5
+ a new version rather than accepting untyped fields.
6
+
7
+ ## Directory
8
+
9
+ ```text
10
+ <topic>-<run-id>/
11
+ ├── packet.md
12
+ ├── manifest.json
13
+ ├── claims.json
14
+ ├── reviews/
15
+ │ ├── briefs/
16
+ │ ├── locator-validation.json
17
+ │ ├── semantic/
18
+ │ ├── adversarial/
19
+ │ ├── coverage/
20
+ │ └── reconciliation.json
21
+ └── raw/
22
+ ├── dossiers/
23
+ ├── drafts/
24
+ ├── dispatch/
25
+ ├── quarantine/
26
+ └── failure.json
27
+ ```
28
+
29
+ `manifest.json` and `claims.json` are canonical. `packet.md` is a generated
30
+ consumer view. Each worker owns one unique path; candidates are immutable and
31
+ never promoted over the last valid canonical artifact in place.
32
+
33
+ ## Artifact References and Canonical JSON
34
+
35
+ An artifact reference is `{ "path": "packet-relative/path", "digest":
36
+ "sha256:<64 lowercase hex>" }`. Paths must remain inside the packet directory.
37
+ Digests cover the exact bytes on disk.
38
+
39
+ Approval evidence embeds the existing `oat-dispatch-approval/v1` canonical
40
+ prepared projection without reducing or renaming its fields. Fingerprints use
41
+ canonical JSON: UTF-8, object keys sorted lexicographically, array order
42
+ preserved, no insignificant whitespace, and SHA-256 with the `sha256:` prefix.
43
+ The stored canonical JSON text and fingerprint cover the whole projection.
44
+ Every `writable_roots`, `escalate_when`, and `candidates_considered` member is a
45
+ non-empty string. These arrays use stable sorted-set form: entries are unique
46
+ and lexicographically ordered before approval, and packet validation rejects
47
+ nulls, empty strings, duplicates, or unstable ordering rather than normalizing
48
+ them after approval.
49
+
50
+ ## One Validation Boundary
51
+
52
+ Version 1 compiles persisted packet inputs exactly once into one non-persisted,
53
+ deeply immutable `ValidatedRun`. This value is an internal normalized graph,
54
+ not an artifact kind, schema version, file, cache, or caller-selectable profile.
55
+ Assurance derivation and rendering accept only `ValidatedRun`; they never
56
+ reopen or independently reinterpret raw manifest, ledger, review, receipt, or
57
+ reconciliation artifacts.
58
+
59
+ Construction is all-or-nothing. A valid graph contains:
60
+
61
+ - one complete `oat-dispatch-approval/v1` projection with its request,
62
+ selection, every planned and conditional wave, per-wave task class and model
63
+ floor, lane scope, authority and authorization scope, writable roots,
64
+ fallback and context controls, payload digest, run maximum floor, pinned
65
+ target, and original live catalog identity;
66
+ - one exact approved wave/lane topology, with one terminal stage and matching
67
+ accepted/completed receipt resolution for every required lane;
68
+ - exactly one terminal reconciliation for standard or thorough runs and one
69
+ immutable canonical prior-ledger identity used by all review, transition,
70
+ addition, and removal checks;
71
+ - exact byte digests for `manifest.json`, `claims.json`, and every validated
72
+ referenced packet artifact, retained from the same reads that constructed
73
+ the normalized graph;
74
+ - canonical absolute realpaths for the packet, repository, file, capture,
75
+ command-output, and publication trust roots, rechecked before use;
76
+ - only secret-safe persisted evidence and diagnostics, including ineligible
77
+ audit evidence;
78
+ - material gaps derived from stale, invalid, or unavailable canonical sources,
79
+ with exact affected-claim coverage and legal assurance downgrades; and
80
+ - derived claim assurance, achieved profile, material gaps, and publication
81
+ status.
82
+
83
+ Reject partial approval envelopes, omitted receipt axes, unknown selection
84
+ shapes, duplicate or shadow reconciliation results, symlink root aliases,
85
+ retargeted roots, raw secret-bearing stale excerpts, and caller-downgraded gap
86
+ materiality. Equivalent-looking inputs do not excuse a failed invariant.
87
+
88
+ The approved, accepted, and completed receipts carry the manifest's exact
89
+ `approvedAt` value. The accepted and completed receipts also carry one
90
+ identical launch-acceptance record, including the accepted child handle; a
91
+ different terminal handle is a replacement and fails validation. The catalog
92
+ recheck is a distinct observation from the projection's original catalog
93
+ observation, occurs strictly after approval and strictly before launch
94
+ acceptance, and retains the approved catalog source, context, and relevant
95
+ fingerprint. The completed receipt's terminal timestamp is parseable and cannot
96
+ precede launch acceptance; equality is valid at the contract's millisecond
97
+ precision. Copied, non-fresh, or causally impossible receipt evidence cannot
98
+ support publication.
99
+
100
+ ## Manifest
101
+
102
+ `recon.packet-manifest` version 1 contains:
103
+
104
+ - `run`: stable ID, topic, status, requested and achieved profile, timestamps;
105
+ - `request`: objective, questions, included/excluded scope, stable context
106
+ references, confirmed output path;
107
+ - discriminated `sources`;
108
+ - `execution`: exact prepared projection, canonical JSON, fingerprint,
109
+ explicit-user approval evidence, approval timestamp, and fresh catalog
110
+ recheck. The projection is identical to the dispatch dependency's canonical
111
+ v1 object rather than a packet-local summary;
112
+ - `stages`: `recon.stage-result` records whose single artifact ID, lane, and
113
+ exact `waveId` plus prepared/approved/accepted/completed receipt IDs bind
114
+ every completed pass to one hashed same-run artifact of the required kind;
115
+ - `artifacts`: direct references; and
116
+ - `gaps`: categorical omitted, unavailable, stale, or failed work, each with an
117
+ explicit boolean `material` classification and affected source, claim, and
118
+ coverage-finding IDs when applicable.
119
+
120
+ Run status is `preparing`, `awaiting-approval`, `running`, `complete`, `partial`,
121
+ or `failed`. The validator—not a worker—derives achieved profile.
122
+ It derives rigor from the exact required wave/lane/stage multiset, never from a
123
+ set of mode names. Every approved required lane has one terminal stage; only
124
+ lanes whose typed artifact is named by matching accepted and completed receipts
125
+ can contribute to achieved rigor.
126
+
127
+ ## Source Descriptors and Locators
128
+
129
+ All source descriptors carry `kind`, stable `id`, `available`, `authority`,
130
+ `observedAt`, and `validationState`. Every declared path trust root must be an
131
+ absolute canonical realpath, not a symlink alias, and its filesystem identity is
132
+ rechecked before reads, hashes, or publication.
133
+
134
+ Validation state is closed to `pinned`, `unpinned`, `stale`, `invalid`, or
135
+ `unavailable`. Only an available `pinned` source is assurance-eligible;
136
+ everything else requires an explicit affected-source/claim gap. A stale,
137
+ invalid, or unavailable source used by the canonical ledger deterministically
138
+ creates a material gap and forces `partial`. It may remain as auditable
139
+ non-exact evidence only when that gap names the source and every affected claim,
140
+ all affected claims are below `supported`, and every persisted excerpt and
141
+ diagnostic is secret-safe. Caller-declared non-materiality, missing coverage,
142
+ or a stronger claim state is invalid.
143
+
144
+ - `repository`: canonical `root`, revision, dirty state, and per-path content
145
+ hashes. Locator: relative path, matching revision, line start/end.
146
+ - `file`: canonical path and content hash. Locator: path and optional line
147
+ start/end.
148
+ - `url`: canonical URL plus persisted capture path/digest or explicit validator
149
+ state containing an ETag or last-modified value and a pinned validation
150
+ snapshot path/digest. Locator: URL, retrieval time, optional fragment, and
151
+ the canonical validator-state token when that alternative is used.
152
+ - `command-output`: canonical argv, cwd, exit status, output path/digest, and
153
+ names-only environment metadata. Locator: output path, line range, command
154
+ digest.
155
+ - `connected-resource`: system, resource ID, resource version or retrieval
156
+ token, and capture path/digest. Locator: matching system/resource/version,
157
+ retrieval time, and optional field or section.
158
+
159
+ Missing minimum provenance makes evidence ineligible for `supported` or
160
+ `verified`. Path escape, digest change, version drift, shifted lines, or excerpt
161
+ mismatch invalidates the locator. Only `exact` and `redacted-exact` states are
162
+ assurance-eligible. Managed packet, capture, repository, and output paths reject
163
+ both ancestor and final-component symlinks before reads, hashes, or writes.
164
+
165
+ ## Claim Ledger
166
+
167
+ `recon.claim-ledger` version 1 contains run ID, monotonic revision, direct input
168
+ references, synthesis, evidence, claims, unresolved questions, and explicit
169
+ claim transitions.
170
+
171
+ Claim states are categorical:
172
+
173
+ - `provisional`: compiled, not mechanically validated;
174
+ - `supported`: supporting evidence and exact locators validate;
175
+ - `verified`: independent semantic review affirmed the claim without unresolved
176
+ material challenge;
177
+ - `contested`: credible counterevidence or incompatible interpretations remain;
178
+ - `unresolved`: available evidence cannot settle the claim; and
179
+ - `unsupported`: no valid support remains.
180
+
181
+ A revision-one claim may honestly begin as `provisional`: that genesis is
182
+ represented by the claim itself and has no transition entry. Revision one
183
+ rejects any incoming or self-transition used to manufacture provisional
184
+ genesis. In later revisions, `provisional` must result from an explicit legal
185
+ incoming transition; the genesis exception cannot be reused.
186
+
187
+ Quick packets never contain `verified` claims. Standard and thorough claims need
188
+ recorded independent semantic, adversarial, and coverage reviews. Every review
189
+ ID resolves to a unique, complete, typed, hashed result bound to the exact
190
+ immutable brief digest, the claim's required disposition, and the matching
191
+ accepted/completed stage receipts. An unreceipted result cannot contribute
192
+ assurance or reconciliation. A material unresolved challenge or coverage
193
+ finding prevents verification. A run with contested claims may publish as
194
+ `complete` when all declared questions and claims are resolved or
195
+ characterized; contested claims are rendered under "Contradictions and
196
+ Qualifications". If an unresolved challenge represents an unanswered question
197
+ or missing source evidence that leaves investigation incomplete, it must be
198
+ recorded as a material gap in `manifest.gaps` and the run published as
199
+ `partial`. Review workers propose; only a reconciler writes
200
+ a new ledger candidate. Reconciliation binds the prior ledger reference and
201
+ revision, the next revision, the exact receipted review-result set, and the exact
202
+ canonical claim transitions. Standard and thorough output is exactly the next
203
+ revision of the bound prior ledger; revision one cannot bypass reconciliation.
204
+ It also binds additions, removals, and every prior/current state change;
205
+ preserves statement, evidence-link, and qualification continuity; accepts new
206
+ evidence only when an incorporated review supplied the exact record plus a
207
+ closed `{ evidenceId, claimId, relation }` association to one of that review's
208
+ disposition claims; preserves every unaffected evidence link byte-for-byte; and
209
+ requires a receipted typed rejection disposition before removing a prior claim.
210
+
211
+ ## Evidence and Secret Redaction
212
+
213
+ Evidence records bind a stable ID and source ID to one typed locator, a minimal
214
+ display excerpt, observation time, locator-validation state, and provenance
215
+ reference. States are `exact`, `redacted-exact`, `stale`, or `invalid`.
216
+
217
+ Validate a sensitive source span transiently, redact before persistence, and
218
+ store `redaction.applied: true`, categories, and
219
+ `redaction.originalPersisted: false`. `redacted-exact` stores neither the secret
220
+ nor a digest of the sensitive span. Diagnostics must never echo the span.
221
+ Secret scanning precedes every assurance, ineligible-audit, gap, and render
222
+ branch; source ineligibility never bypasses persistence safety.
223
+
224
+ ## Other Artifacts
225
+
226
+ - `recon.raw-dossier`: assignment identity, mode, inputs/exclusions, findings,
227
+ uncertainty, contradictions, gaps, and outcome.
228
+ - `recon.review-brief`: immutable selective-blind projection and digest.
229
+ - `recon.review-result`: review kind, lane, exact brief reference,
230
+ permitted/excluded inputs, dispositions, new evidence, closed typed
231
+ claim/evidence associations, coverage findings, unresolved issues, and
232
+ completion status. Every new evidence record has at least one exact
233
+ association, and an association cannot name evidence absent from that result
234
+ or a claim without a disposition in that result. Reconciliation results replace the
235
+ brief reference with prior-ledger/revision, additions/removals, exact
236
+ transitions, and coverage-disposition bindings. Coverage findings are closed
237
+ records bound to affected claims and exact manifest gaps. Accepted material
238
+ gaps require a legal downgrade for every affected claim; a resolved finding
239
+ instead names exact typed evidence. Non-material coverage gaps downgrade
240
+ verified claims and transition provisional claims to unresolved, while
241
+ existing supported claims remain supported without verified promotion.
242
+ Thorough redundant verification and
243
+ contradiction resolution are claim-bearing typed review results, not raw
244
+ dossiers: they bind immutable briefs, claim dispositions, and explicit
245
+ affected-contradiction dispositions.
246
+ - `recon.stage-result`: stable stage ID, mode, lane, status, exactly one output
247
+ artifact ID, accepted/completed receipt IDs, and safe diagnostics.
248
+ - `recon.dispatch-receipt`: immutable prepared, approved, accepted, or
249
+ completed evidence. Every state repeats the exact canonical projection,
250
+ canonical JSON, and fingerprint. Approved and later states bind the same
251
+ explicit approval evidence; accepted and completed states bind the fresh
252
+ catalog recheck and launch acceptance; completed binds the terminal outcome
253
+ and artifact IDs.
254
+
255
+ Create immutable mode-specific review projections with
256
+ `scripts/create-review-brief.mjs`. Verification briefs expose only claim
257
+ statements, display excerpts, typed locators, and required source descriptors.
258
+ Adversarial briefs expose only scope, questions, and provisional statements.
259
+ Coverage briefs expose only scope, questions, and claim ID/statement pairs.
260
+ All reject dossier paths, compiler reasoning, synthesis prose, provenance
261
+ references, and prior review IDs.
262
+
263
+ ## Validation and Publication
264
+
265
+ Run `scripts/validate-artifact.mjs` on every candidate. Use
266
+ `--quarantine-root <packet-dir>` to move an invalid candidate and a safe failure
267
+ record under `raw/quarantine/`. Never promote invalid output.
268
+
269
+ Run `scripts/validate-packet.mjs <packet-dir>` before rendering or publication.
270
+ It delegates to the single validation boundary, which validates schemas, IDs,
271
+ references, containment, hashes, source reopening, locators, the complete
272
+ approval and receipt selection, exact topology, the one terminal
273
+ reconciliation, legal transitions, secret-safe persistence, derived gaps,
274
+ assurance, and requested vs achieved profile. Candidate validation is
275
+ non-destructive for canonical diagnostic artifacts, but a non-publishable
276
+ candidate withdraws any existing `packet.md` and does not authorize rendering.
277
+ Only a valid `complete` or honest `partial` candidate is publishable, so a
278
+ rejected canonical generation cannot retain a consumer entry point from another
279
+ generation.
280
+
281
+ `complete` requires the requested profile and no material gap. `partial` is
282
+ valid when either a lower profile was achieved or at least one material gap is
283
+ declared, including honest same-profile partials.
284
+
285
+ Use `scripts/render-packet.mjs <packet-dir>` to generate the deterministic
286
+ consumer view. Its public path entry point first obtains `ValidatedRun`; the
287
+ render core accepts only that graph. It writes an exclusive unpredictable
288
+ temporary sibling, retains that file's identity through hashing and atomic
289
+ promotion, and verifies the promoted digest. Immediately before and after
290
+ promotion it also verifies that the canonical manifest, ledger, and validated
291
+ referenced artifacts still match the byte digests retained by `ValidatedRun`.
292
+ A mismatch is a categorical integrity failure and withdraws `packet.md`.
293
+ Withdrawal first proves the retained packet-root identity; if the root changed,
294
+ the renderer preserves that identity failure and does not follow or unlink the
295
+ replacement path. Rendering or promotion failure on an unchanged root likewise
296
+ withdraws `packet.md` while leaving canonical diagnostics available. Its result
297
+ is the directory path plus a compact status summary and digest, never raw
298
+ dossier content.
299
+
300
+ ## Version 1 Non-Goals
301
+
302
+ This boundary does not add another schema version, review pass, persisted
303
+ intermediate, generalized plugin artifact kind, saved validation profile,
304
+ provider behavior, or integration surface. It does not change p01 dispatch,
305
+ research-pack distribution, documentation, backlog integrations,
306
+ `quick`/`standard`/`thorough`, selective blindness, categorical claim states,
307
+ honest partial publication, or directory-only handoff.
@@ -0,0 +1,58 @@
1
+ # Recon Profiles
2
+
3
+ Profiles define assurance topology, not a model tier. The controller sizes
4
+ adaptive lanes from a mechanical source inventory, shows exact counts before
5
+ approval, and never exceeds the approved hard cap. Every wave remains
6
+ homogeneous and every pass uses the same approved model and effort.
7
+
8
+ ## quick
9
+
10
+ Use for bounded orientation where independently checked locators and supported
11
+ claims are sufficient.
12
+
13
+ - Required: one mapping wave, one or more non-overlapping gather lanes, one
14
+ compile lane, deterministic schema and locator validation, and rendering.
15
+ - Adaptive lane range: 1–4 gather lanes; hard cap 4.
16
+ - Maximum concurrency: 4.
17
+ - Assurance ceiling: `supported`; a quick packet is never `verified`.
18
+ - Conditional work: no semantic, adversarial, or coverage worker is implied.
19
+
20
+ ## standard
21
+
22
+ Use for load-bearing evidence that needs independent semantic challenge.
23
+
24
+ - Required: quick topology plus selectively blind semantic verification,
25
+ adversarial review, coverage review, and reconciliation.
26
+ - Adaptive lane range: 1–6 gather lanes and 1–3 verification lanes; hard cap 10
27
+ total worker lanes.
28
+ - Maximum concurrency: 6.
29
+ - Assurance ceiling: `verified` only after exact locator validation, affirmative
30
+ independent semantic review, no unresolved material challenge, and adequate
31
+ coverage.
32
+ - Conditional work: at most one approved reconciliation lane for a material
33
+ contradiction.
34
+
35
+ ## thorough
36
+
37
+ Use when expensive failure or correlated blind spots justify redundant source
38
+ reopening and explicit contradiction resolution.
39
+
40
+ - Required: standard topology plus redundant independent gathering and
41
+ verification for load-bearing claims and explicit contradiction resolution.
42
+ - Adaptive lane range: 2–10 gather lanes and 2–6 verification or adversarial
43
+ lanes; hard cap 20 total worker lanes.
44
+ - Maximum concurrency: 8.
45
+ - Assurance ceiling: `verified` only for claims affirmed by the required
46
+ independent passes and left without unresolved material challenge.
47
+ - Conditional work: up to two approved contradiction-resolution lanes within
48
+ the manifest's hard cap.
49
+
50
+ ## Planning Rules
51
+
52
+ 1. Partition by source or question so lane inputs and outputs never overlap.
53
+ 2. Classify required and conditional waves before target preparation.
54
+ 3. Compute the run-wide maximum model-class floor from every allowed wave.
55
+ 4. Reduce lanes when scope is small; never invent work to fill a profile cap.
56
+ 5. If runtime limits prevent the requested topology, prepare a different
57
+ profile for approval or publish an honest partial after an accepted failure.
58
+ 6. Never add a lane, retry, or replacement beyond the approved envelope.
@@ -0,0 +1,71 @@
1
+ # Recon Worker Contract
2
+
3
+ Every recon assignment is a non-interactive leaf task. The controller supplies
4
+ the complete assignment; a worker does not infer broader authority.
5
+
6
+ ## Required Assignment Envelope
7
+
8
+ The assignment must declare:
9
+
10
+ - `runId`, `waveId`, `laneId`, and exactly one mode;
11
+ - bounded objective, included scope, and excluded scope;
12
+ - allowed inputs and excluded inputs;
13
+ - source-read authority in `readSources`, including allowed read-only tools;
14
+ - sole `writePath`, contained by the packet directory and unique to the lane;
15
+ - required artifact `kind`, `schemaVersion`, and output schema;
16
+ - enforcement level and deadline; and
17
+ - whether failure should be recorded as required, optional, or conditional.
18
+
19
+ Reject an incomplete or contradictory assignment before reading sources. Never
20
+ request credentials, mutate an investigated source, broaden scope, or choose an
21
+ alternate write path.
22
+
23
+ ## Modes
24
+
25
+ - `map`: inventory only the assigned source partition and report candidate
26
+ evidence areas, unavailable inputs, and coverage gaps.
27
+ - `gather`: inspect assigned sources and emit source-grounded findings with
28
+ typed locators, minimal display excerpts, uncertainty, and contradictions.
29
+ - `compile`: consume only designated dossiers and create a provisional claim
30
+ ledger candidate. Deduplicate without inventing evidence.
31
+ - `verify`: consume an immutable verification brief, reopen only its declared
32
+ sources, test locators and claim semantics, and report claim dispositions.
33
+ - `adversary`: consume scope, questions, and provisional statements only; seek
34
+ counterevidence, unsupported inference, and missing alternatives.
35
+ - `coverage`: compare declared scope and questions with ledger coverage without
36
+ reading gatherer reasoning.
37
+ - `reconcile`: apply review dispositions and contradiction outcomes to a new
38
+ ledger candidate. Preserve prior revisions and never invent evidence.
39
+
40
+ No other mode is valid.
41
+
42
+ ## Output Contract
43
+
44
+ Write exactly one JSON artifact at `writePath`. The artifact must include:
45
+
46
+ - `kind`, `schemaVersion`, run/wave/lane identity, mode, and outcome;
47
+ - the exact allowed and excluded inputs actually honored;
48
+ - findings or dispositions with evidence IDs and typed locators;
49
+ - uncertainty, contradictions, and gaps as explicit arrays;
50
+ - safe categorical diagnostics for unavailable or invalid inputs; and
51
+ - direct input artifact references and digests when applicable.
52
+
53
+ Persist minimal excerpts only. Detect and redact secret spans before writing;
54
+ never persist the secret or its sensitive-span digest. Finish by returning the
55
+ artifact path and compact outcome only.
56
+
57
+ The controller validates the candidate against `packet-contract.md` with the
58
+ bundled deterministic artifact validator. A validation failure quarantines the
59
+ candidate; it never authorizes the worker to rewrite a shared artifact, retry,
60
+ or launch a replacement.
61
+
62
+ ## Invariants
63
+
64
+ - Read only the assignment's allowed inputs using its source-read authority.
65
+ - Write only the assigned artifact; never update a shared ledger or manifest.
66
+ - Never interact with the user.
67
+ - Never dispatch children, helpers, reviewers, or replacement workers.
68
+ - Never read excluded inputs, prior review conclusions, or raw reasoning that
69
+ the selected mode is required to remain blind to.
70
+ - Report uncertainty and contradiction instead of converting them to
71
+ confidence scores.