@open-agent-toolkit/cli 0.2.53 → 0.2.55
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/assets/agents/recon-worker.md +105 -0
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/tool-packs.md +62 -8
- package/assets/docs/contributing/skills.md +26 -0
- package/assets/docs/workflows/skills/index.md +3 -0
- package/assets/docs/workflows/skills/recon.md +210 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
- package/assets/skills/recon/SKILL.md +298 -0
- package/assets/skills/recon/references/packet-contract.md +340 -0
- package/assets/skills/recon/references/profiles.md +58 -0
- package/assets/skills/recon/references/worker-contract.md +71 -0
- package/assets/skills/recon/scripts/create-review-brief.mjs +452 -0
- package/assets/skills/recon/scripts/lib/canonical-json.mjs +55 -0
- package/assets/skills/recon/scripts/lib/contracts.mjs +1969 -0
- package/assets/skills/recon/scripts/lib/safe-path.mjs +120 -0
- package/assets/skills/recon/scripts/lib/validated-run.mjs +80 -0
- package/assets/skills/recon/scripts/reconcile-ledger.mjs +360 -0
- package/assets/skills/recon/scripts/render-packet.mjs +379 -0
- package/assets/skills/recon/scripts/validate-artifact.mjs +96 -0
- package/assets/skills/recon/scripts/validate-packet.mjs +2192 -0
- package/dist/commands/doctor/index.js +5 -5
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +6 -7
- package/dist/commands/status/index.d.ts +2 -2
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +7 -4
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +24 -8
- package/dist/commands/sync/sync.types.d.ts +2 -2
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/commands/tools/migrate/index.d.ts.map +1 -1
- package/dist/commands/tools/migrate/index.js +25 -1
- package/dist/commands/tools/migrate/migrate-pack.d.ts +5 -0
- package/dist/commands/tools/migrate/migrate-pack.d.ts.map +1 -1
- package/dist/commands/tools/migrate/migrate-pack.js +66 -7
- package/dist/commands/tools/remove/index.js +1 -1
- package/dist/commands/tools/remove/remove-tools.d.ts +5 -1
- package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -1
- package/dist/commands/tools/remove/remove-tools.js +81 -1
- package/dist/commands/tools/shared/apply-pack-reconcile.d.ts +3 -0
- package/dist/commands/tools/shared/apply-pack-reconcile.d.ts.map +1 -1
- package/dist/commands/tools/shared/apply-pack-reconcile.js +40 -9
- package/dist/commands/tools/shared/format-pack-inventory.d.ts.map +1 -1
- package/dist/commands/tools/shared/format-pack-inventory.js +3 -0
- package/dist/commands/tools/shared/install-sync-context.d.ts +2 -1
- package/dist/commands/tools/shared/install-sync-context.d.ts.map +1 -1
- package/dist/commands/tools/shared/install-sync-context.js +14 -3
- package/dist/commands/tools/shared/pack-dependencies.d.ts +14 -0
- package/dist/commands/tools/shared/pack-dependencies.d.ts.map +1 -0
- package/dist/commands/tools/shared/pack-dependencies.js +54 -0
- package/dist/commands/tools/shared/pack-inventory.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-inventory.js +9 -9
- package/dist/commands/tools/shared/pack-lifecycle.d.ts +9 -1
- package/dist/commands/tools/shared/pack-lifecycle.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-lifecycle.js +102 -9
- package/dist/commands/tools/shared/pack-manifest.d.ts +2 -2
- package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.js +91 -2
- package/dist/commands/tools/shared/pack-reconcile.d.ts +15 -1
- package/dist/commands/tools/shared/pack-reconcile.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-reconcile.js +75 -13
- package/dist/commands/tools/shared/scoped-pack-intent.d.ts +8 -0
- package/dist/commands/tools/shared/scoped-pack-intent.d.ts.map +1 -1
- package/dist/commands/tools/shared/scoped-pack-intent.js +61 -15
- package/dist/commands/tools/shared/types.d.ts +7 -0
- package/dist/commands/tools/shared/types.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.js +7 -1
- package/dist/config/oat-config.d.ts +5 -1
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +19 -0
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/scanner.d.ts +9 -1
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +61 -4
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recon
|
|
3
|
+
version: 1.1.0
|
|
4
|
+
description: Use when a bounded investigation needs source-grounded evidence before analysis or implementation. Produces a validated evidence-packet directory through approved provider-neutral worker waves.
|
|
5
|
+
argument-hint: '<question-or-target> [--profile quick|standard|thorough] [--scope description] [--context path] [--output directory] [--strict]'
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
user-invocable: true
|
|
8
|
+
allowed-tools: Read, Write, Glob, Grep, Bash, AskUserQuestion, Agent, mcp__*
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Recon
|
|
12
|
+
|
|
13
|
+
Compile a bounded investigation into a durable, validated evidence-packet
|
|
14
|
+
directory. `recon` is a provider-neutral controller: it owns decomposition,
|
|
15
|
+
artifact boundaries, assurance, and user interaction while installed dispatch
|
|
16
|
+
dependencies own live catalogs, target selection, and launch mechanics.
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
Use `recon` when a downstream agent needs precise evidence, source locators,
|
|
21
|
+
contradictions, and gaps without loading every reconnaissance transcript.
|
|
22
|
+
|
|
23
|
+
Do not use it to make the final product or architecture decision, modify the
|
|
24
|
+
investigated system, perform an unbounded survey, or maintain a persistent
|
|
25
|
+
research workspace.
|
|
26
|
+
|
|
27
|
+
## Arguments
|
|
28
|
+
|
|
29
|
+
Parse from `$ARGUMENTS`:
|
|
30
|
+
|
|
31
|
+
- **question-or-target**: bounded objective or target (required).
|
|
32
|
+
- **--profile**: `quick`, `standard`, or `thorough`; default `standard`.
|
|
33
|
+
- **--scope**: included and excluded investigation boundaries.
|
|
34
|
+
- **--context**: stable caller-provided context path or resource identifier.
|
|
35
|
+
- **--output**: explicit packet parent or run directory.
|
|
36
|
+
- **--strict**: require provider-enforced read and write authority for every
|
|
37
|
+
lane; default false.
|
|
38
|
+
|
|
39
|
+
Ask only for missing information required to make the objective, authority, or
|
|
40
|
+
destination safe. A calling skill may supply a fully resolved request.
|
|
41
|
+
|
|
42
|
+
## Progress Indicators (User-Facing)
|
|
43
|
+
|
|
44
|
+
Report these compact stage transitions:
|
|
45
|
+
|
|
46
|
+
- `[1/8] Resolving request and destination…`
|
|
47
|
+
- `[2/8] Preflighting sources and authority…`
|
|
48
|
+
- `[3/8] Planning profile and worker lanes…`
|
|
49
|
+
- `[4/8] Preparing exact dispatch manifest…`
|
|
50
|
+
- `[5/8] Awaiting approval…`
|
|
51
|
+
- `[6/8] Running approved artifact pipeline…`
|
|
52
|
+
- `[7/8] Validating and publishing packet…`
|
|
53
|
+
- `[8/8] Returning packet directory…`
|
|
54
|
+
|
|
55
|
+
Do not print worker transcripts or raw dossier content.
|
|
56
|
+
|
|
57
|
+
When a run stops early or publishes a partial, label every failure with one of
|
|
58
|
+
these categories so a controller problem is never reported as a worker
|
|
59
|
+
problem:
|
|
60
|
+
|
|
61
|
+
- `worker`: an accepted lane failed, was cancelled, or wrote an invalid
|
|
62
|
+
artifact;
|
|
63
|
+
- `provider/dispatch`: the launch surface could not satisfy the approved
|
|
64
|
+
envelope, or a launched axis drifted from approval;
|
|
65
|
+
- `contract validation`: artifacts were produced but the packet or a
|
|
66
|
+
candidate failed deterministic validation;
|
|
67
|
+
- `source availability`: a declared source was unavailable, stale, or lacked
|
|
68
|
+
a read-only boundary.
|
|
69
|
+
|
|
70
|
+
State whether every accepted lane reached a terminal result.
|
|
71
|
+
|
|
72
|
+
## Workflow
|
|
73
|
+
|
|
74
|
+
### Step 1: Complete the Request
|
|
75
|
+
|
|
76
|
+
Normalize the objective, explicit questions, included and excluded scope,
|
|
77
|
+
caller context references, requested profile, strictness, and destination.
|
|
78
|
+
Refuse requests whose read-only evidence boundary cannot be stated.
|
|
79
|
+
|
|
80
|
+
Resolve the destination in this precedence order:
|
|
81
|
+
|
|
82
|
+
1. explicit output override;
|
|
83
|
+
2. active project `references/evidence/` directory when supplied by a caller;
|
|
84
|
+
3. repository `.oat/repo/reference/evidence/` directory;
|
|
85
|
+
4. a caller-approved fallback.
|
|
86
|
+
|
|
87
|
+
Create a new topic-and-run directory. Never escape the confirmed parent or
|
|
88
|
+
overwrite an existing run. Create only the packet directory and its artifacts.
|
|
89
|
+
|
|
90
|
+
### Step 2: Preflight Sources and Authority
|
|
91
|
+
|
|
92
|
+
Inventory repository, file, URL, read-only command-output, and connected-system
|
|
93
|
+
sources that are actually available. Record unavailable or excluded sources as
|
|
94
|
+
gaps. Pin stable identities, observations, captures, revisions, and hashes
|
|
95
|
+
before dispatch.
|
|
96
|
+
|
|
97
|
+
Give every lane an explicit authority envelope containing:
|
|
98
|
+
|
|
99
|
+
- allowed inputs and excluded inputs;
|
|
100
|
+
- `readSources` and approved read-only tools;
|
|
101
|
+
- exactly one worker-owned output path; and
|
|
102
|
+
- enforcement level: `provider-enforced`, `contract-enforced`, or
|
|
103
|
+
`unavailable`.
|
|
104
|
+
|
|
105
|
+
Mutation-capable source access is unavailable unless the interface enforces a
|
|
106
|
+
read-only operation. In strict mode, stop unless every lane is
|
|
107
|
+
provider-enforced. Otherwise, contract-enforced local reads are permitted only
|
|
108
|
+
with the audited leaf-worker contract. Never broaden authority silently.
|
|
109
|
+
|
|
110
|
+
Initialize `manifest.json` and the directory skeleton, but do not create
|
|
111
|
+
`packet.md`.
|
|
112
|
+
|
|
113
|
+
### Step 3: Expand the Profile
|
|
114
|
+
|
|
115
|
+
Read `references/profiles.md`. Partition the scope into non-overlapping,
|
|
116
|
+
adaptive lanes within the profile's hard caps. Classify every required and
|
|
117
|
+
conditionally allowed wave before selection. Record each wave's task class and
|
|
118
|
+
floor, then compute the run-wide maximum model-class floor.
|
|
119
|
+
|
|
120
|
+
All lanes within a launch are a homogeneous wave. All waves use the same
|
|
121
|
+
approved model and effort. Profiles change topology, redundancy, and
|
|
122
|
+
concurrency—not the target tier.
|
|
123
|
+
|
|
124
|
+
### Step 4: Prepare One Exact Dispatch Manifest
|
|
125
|
+
|
|
126
|
+
Before reading either installed dispatch dependency, resolve one shared utility
|
|
127
|
+
skills root. Probe these candidate roots in order: from this loaded skill use
|
|
128
|
+
`${SKILL_DIR}/..`, then `${HOME}/.agents/skills` at user scope, then
|
|
129
|
+
`<repo-root>/.agents/skills` at project scope. The first candidate containing
|
|
130
|
+
both `oat-dispatch-subagents/SKILL.md` and
|
|
131
|
+
`subagent-orchestration/SKILL.md` becomes `${UTILITY_SKILLS_ROOT}`; bind every
|
|
132
|
+
dependency read to that same scope. Never resolve the dependencies
|
|
133
|
+
independently or mix different scopes.
|
|
134
|
+
|
|
135
|
+
If no candidate contains both dependencies, name the missing dependency and
|
|
136
|
+
stop before preparing or launching workers. Give the recovery command for the
|
|
137
|
+
intended scope: `oat tools install utility --scope <user|project>` or, when the
|
|
138
|
+
pack is already installed, `oat tools update --pack utility --scope
|
|
139
|
+
<user|project>`.
|
|
140
|
+
|
|
141
|
+
Read `${UTILITY_SKILLS_ROOT}/oat-dispatch-subagents/SKILL.md` and perform
|
|
142
|
+
only the selection steps of its Full-Information Selection: observe the
|
|
143
|
+
catalog, resolve one exact target, and record the selection. Stop before its
|
|
144
|
+
launch step; nothing launches until Step 5 runs after approval. From the same
|
|
145
|
+
root, read
|
|
146
|
+
`subagent-orchestration/references/model-selection-principles.md`, exactly one
|
|
147
|
+
active-provider selection reference, and the matching
|
|
148
|
+
`oat-dispatch-subagents` provider mechanics reference. Do not copy provider
|
|
149
|
+
catalogs or exact launch construction into this skill.
|
|
150
|
+
|
|
151
|
+
Resolve every planned and conditional wave against one exact target satisfying
|
|
152
|
+
the run-wide floor. Prefer the canonical `recon-worker` role. If that role is
|
|
153
|
+
unavailable, plan the generic role with the complete worker contract as a
|
|
154
|
+
visible generic role fallback before approval. A fallback after approval is
|
|
155
|
+
forbidden.
|
|
156
|
+
|
|
157
|
+
Write the approval envelope into `manifest.execution`. It binds:
|
|
158
|
+
|
|
159
|
+
- provider, route, role, model, effort, reasoning mode, and service tier;
|
|
160
|
+
- authority level, maximum concurrency, per-lane deadline, and retry limit; and
|
|
161
|
+
- every wave with its mode, task class, and conditional flag, and every lane
|
|
162
|
+
with its identity, read scope, and worker-owned write root.
|
|
163
|
+
|
|
164
|
+
Its canonical fingerprint covers every field above.
|
|
165
|
+
|
|
166
|
+
Present the exact provider, model and effort for explicit approval before any
|
|
167
|
+
worker launch, together with the full topology and hard execution limits. Named model examples are
|
|
168
|
+
illustrative and non-normative; never route from an example. Declining approval
|
|
169
|
+
leaves the run at `awaiting-approval` and launches nothing. Approval records
|
|
170
|
+
`explicit-user-approval`, the approval time, and the fingerprint.
|
|
171
|
+
|
|
172
|
+
**Deadlines.** Choose the per-lane deadline from the expected task class and
|
|
173
|
+
scope, and show it in the approval envelope; it is an approved execution limit,
|
|
174
|
+
not a short watchdog. A deadline authorizes the provider to end a lane and
|
|
175
|
+
report a terminal timeout. It never authorizes the controller to interrupt an
|
|
176
|
+
accepted lane by hand: elapsed display time is not a failure. If the provider
|
|
177
|
+
cannot enforce the deadline, wait or poll and report elapsed time, or obtain
|
|
178
|
+
renewed approval before any cancellation.
|
|
179
|
+
|
|
180
|
+
### Step 5: Preflight the Launch Surface, Then Execute
|
|
181
|
+
|
|
182
|
+
Before any worker launch, confirm that the live launch surface can run the
|
|
183
|
+
approved role, model, effort, and authority level, and can return each lane's
|
|
184
|
+
result. If any approved axis cannot be satisfied, stop with a
|
|
185
|
+
`provider/dispatch` diagnostic, leave the run at `awaiting-approval`, and
|
|
186
|
+
launch nothing. Never substitute a different axis to make the launch fit.
|
|
187
|
+
|
|
188
|
+
Launch each wave through the dispatch dependency with exactly the approved
|
|
189
|
+
axes. Immediately before each launch, compare the axes that will actually run
|
|
190
|
+
against the approval fingerprint. Any drift returns the complete manifest for
|
|
191
|
+
renewed approval. Launch acceptance is distinct from worker completion. After
|
|
192
|
+
acceptance there is no replacement child, alternate route, target
|
|
193
|
+
substitution, or no silent retry. If an accepted lane fails, is cancelled, or
|
|
194
|
+
times out, record that pass as failed with a material `PASS_FAILED` gap
|
|
195
|
+
naming the pass.
|
|
196
|
+
|
|
197
|
+
Run the passes in this order:
|
|
198
|
+
|
|
199
|
+
1. `map` and `gather` workers write unique dossiers under `raw/dossiers/`.
|
|
200
|
+
2. `compile` writes a candidate canonical claim ledger.
|
|
201
|
+
3. Source preflight: run `scripts/validate-artifact.mjs` on the candidate
|
|
202
|
+
manifest and ledger, then reopen every declared source and evidence locator
|
|
203
|
+
with the checks in `scripts/validate-packet.mjs`. Resolve source roots to
|
|
204
|
+
canonical realpaths, pin one observation time per source, capture URLs or
|
|
205
|
+
mark them unavailable, and add a material gap for every ineligible source
|
|
206
|
+
and each affected claim. Do not create review briefs until the candidate
|
|
207
|
+
manifest and ledger pair validates.
|
|
208
|
+
4. profile-required `verify`, `adversary`, and `coverage` workers consume only
|
|
209
|
+
immutable selectively blind briefs created by
|
|
210
|
+
`scripts/create-review-brief.mjs` at unique paths.
|
|
211
|
+
5. `reconcile` writes a new candidate ledger without mutating the prior ledger.
|
|
212
|
+
|
|
213
|
+
Use `references/worker-contract.md` for every assignment. Never allow two
|
|
214
|
+
workers to share a write path. Every dossier records its approved wave and lane;
|
|
215
|
+
every review result records its approved lane.
|
|
216
|
+
|
|
217
|
+
Read `references/packet-contract.md` before creating any packet artifact. Run
|
|
218
|
+
`scripts/validate-artifact.mjs` on each candidate and record its canonical
|
|
219
|
+
digest before the next stage consumes it.
|
|
220
|
+
|
|
221
|
+
### Step 6: Preserve the Context Firewall
|
|
222
|
+
|
|
223
|
+
Treat `raw/` as worker-facing audit material, not normal consumer input. A
|
|
224
|
+
verification brief may contain only claim statements, display excerpts, typed
|
|
225
|
+
locators, and required source descriptors. An adversarial brief may contain
|
|
226
|
+
only declared scope, questions, and provisional statements.
|
|
227
|
+
|
|
228
|
+
Raw dossier content, dossier paths, compiler reasoning, synthesis prose,
|
|
229
|
+
provenance artifact references, prior review identifiers, and worker
|
|
230
|
+
transcripts must not enter review briefs, `packet.md`, or the parent handoff.
|
|
231
|
+
This selective blindness and context firewall are mandatory even when one
|
|
232
|
+
approved model performs every pass.
|
|
233
|
+
|
|
234
|
+
### Step 7: Validate and Publish
|
|
235
|
+
|
|
236
|
+
Run `scripts/validate-artifact.mjs` on every candidate, then
|
|
237
|
+
`scripts/validate-packet.mjs` on the complete directory. Quarantine invalid
|
|
238
|
+
candidates under `raw/`; never promote shared artifacts in place and never
|
|
239
|
+
overwrite the last valid ledger. Candidate packet validation is
|
|
240
|
+
non-destructive for the canonical diagnostic artifacts: when it fails, do not
|
|
241
|
+
invoke the renderer, withdraw any existing `packet.md`, and report the
|
|
242
|
+
candidate failure separately. Only a publishable candidate proceeds to
|
|
243
|
+
`scripts/render-packet.mjs`; failure leaves no consumer entry point that could
|
|
244
|
+
refer to a different canonical generation.
|
|
245
|
+
|
|
246
|
+
Derive the achieved profile from complete, typed, digest-bound same-run
|
|
247
|
+
artifacts written by approved lanes. Do not accept a worker or manifest
|
|
248
|
+
assertion of achievement. A `quick` run can reach `supported` but never `verified`.
|
|
249
|
+
`verified` claims require unique complete semantic, adversarial, and coverage
|
|
250
|
+
results bound to immutable briefs and correct claim dispositions. Unresolved
|
|
251
|
+
material challenge prevents verification. A run with contested claims may
|
|
252
|
+
publish as `complete` when all declared questions and claims are resolved or
|
|
253
|
+
characterized; contested claims are rendered under "Contradictions and
|
|
254
|
+
Qualifications". If an unresolved challenge represents an unanswered question
|
|
255
|
+
or missing source evidence that leaves investigation incomplete, it must be
|
|
256
|
+
recorded as a material gap in `manifest.gaps` and the run published as
|
|
257
|
+
`partial`.
|
|
258
|
+
|
|
259
|
+
Render `packet.md` with `scripts/render-packet.mjs` only from the final validated
|
|
260
|
+
manifest and ledger. Publish through a symlink-safe temporary sibling followed
|
|
261
|
+
by atomic promotion. A complete run meets the requested profile and has no
|
|
262
|
+
material gap. An honest partial records requested profile, achieved profile,
|
|
263
|
+
failed or omitted passes, material coverage gaps, and claim downgrades; a
|
|
264
|
+
same-profile partial is valid when a material gap remains. Structural failure
|
|
265
|
+
leaves no `packet.md`. Renderer promotion failure also withdraws that consumer
|
|
266
|
+
entry point. Both retain the canonical manifest, ledger, reviews, raw
|
|
267
|
+
diagnostics, and safe failure record for diagnosis.
|
|
268
|
+
|
|
269
|
+
### Step 8: Return the Directory-Only Handoff
|
|
270
|
+
|
|
271
|
+
Return only the packet directory path plus a compact summary containing status,
|
|
272
|
+
requested and achieved profile, claim-state counts, unresolved gaps, failed or
|
|
273
|
+
omitted passes, and each failure's category from the list above. Do not inline
|
|
274
|
+
raw dossiers, source bodies, or worker reasoning. The consumer may open `packet.md` and selectively follow compact
|
|
275
|
+
references.
|
|
276
|
+
|
|
277
|
+
## Examples
|
|
278
|
+
|
|
279
|
+
### Basic Usage
|
|
280
|
+
|
|
281
|
+
```text
|
|
282
|
+
/recon "How is provider sync materialized?" --profile standard --scope packages/cli/src/providers
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Conversational
|
|
286
|
+
|
|
287
|
+
```text
|
|
288
|
+
Build a quick recon packet for the current repository's release version gates.
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Success Criteria
|
|
292
|
+
|
|
293
|
+
- No worker launches before exact manifest approval.
|
|
294
|
+
- Every worker reads only declared inputs and writes one unique artifact.
|
|
295
|
+
- Every published locator is independently validated against a pinned source.
|
|
296
|
+
- Stronger claim states require their recorded profile passes.
|
|
297
|
+
- Partial and failed runs never overstate assurance.
|
|
298
|
+
- The normal handoff contains a packet directory and compact status only.
|
|
@@ -0,0 +1,340 @@
|
|
|
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
|
+
│ ├── semantic/
|
|
17
|
+
│ ├── adversarial/
|
|
18
|
+
│ ├── coverage/
|
|
19
|
+
│ └── reconciliation.json
|
|
20
|
+
└── raw/
|
|
21
|
+
├── dossiers/
|
|
22
|
+
├── drafts/
|
|
23
|
+
├── quarantine/
|
|
24
|
+
└── failure.json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`manifest.json` and `claims.json` are canonical. `packet.md` is a generated
|
|
28
|
+
consumer view. Each worker owns one unique path; candidates are immutable and
|
|
29
|
+
never promoted over the last valid canonical artifact in place.
|
|
30
|
+
|
|
31
|
+
## Artifact References and Canonical JSON
|
|
32
|
+
|
|
33
|
+
An artifact reference is `{ "path": "packet-relative/path", "digest":
|
|
34
|
+
"sha256:<64 lowercase hex>" }`. Paths must remain inside the packet directory.
|
|
35
|
+
Digests cover the exact bytes on disk.
|
|
36
|
+
|
|
37
|
+
Fingerprints use canonical JSON: UTF-8, object keys sorted lexicographically,
|
|
38
|
+
array order preserved, no insignificant whitespace, and SHA-256 with the
|
|
39
|
+
`sha256:` prefix.
|
|
40
|
+
|
|
41
|
+
## One Validation Boundary
|
|
42
|
+
|
|
43
|
+
Version 1 compiles persisted packet inputs exactly once into one non-persisted,
|
|
44
|
+
deeply immutable `ValidatedRun`. This value is an internal normalized graph,
|
|
45
|
+
not an artifact kind, schema version, file, cache, or caller-selectable profile.
|
|
46
|
+
Assurance derivation and rendering accept only `ValidatedRun`; they never
|
|
47
|
+
reopen or independently reinterpret raw manifest, ledger, review, or
|
|
48
|
+
reconciliation artifacts.
|
|
49
|
+
|
|
50
|
+
Construction is all-or-nothing. A valid graph contains:
|
|
51
|
+
|
|
52
|
+
- one approved execution envelope whose canonical fingerprint matches the
|
|
53
|
+
recorded explicit user approval;
|
|
54
|
+
- complete typed same-run artifacts, each written by an approved wave and lane,
|
|
55
|
+
from which the achieved profile is derived;
|
|
56
|
+
- exactly one terminal reconciliation for standard or thorough runs and one
|
|
57
|
+
immutable canonical prior-ledger identity used by all review, transition,
|
|
58
|
+
addition, and removal checks;
|
|
59
|
+
- exact byte digests for `manifest.json`, `claims.json`, and every validated
|
|
60
|
+
referenced packet artifact, retained from the same reads that constructed
|
|
61
|
+
the normalized graph;
|
|
62
|
+
- canonical absolute realpaths for the packet, repository, file, capture,
|
|
63
|
+
command-output, and publication trust roots, rechecked before use;
|
|
64
|
+
- only secret-safe persisted evidence and diagnostics, including ineligible
|
|
65
|
+
audit evidence;
|
|
66
|
+
- material gaps derived from stale, invalid, or unavailable canonical sources,
|
|
67
|
+
with exact affected-claim coverage and legal assurance downgrades; and
|
|
68
|
+
- derived claim assurance, achieved profile, material gaps, and publication
|
|
69
|
+
status.
|
|
70
|
+
|
|
71
|
+
Reject approval fingerprint drift, unknown execution fields, artifacts from
|
|
72
|
+
unapproved lanes, duplicate or shadow reconciliation results, symlink root
|
|
73
|
+
aliases, retargeted roots, raw secret-bearing stale excerpts, and
|
|
74
|
+
caller-downgraded gap materiality. Equivalent-looking inputs do not excuse a
|
|
75
|
+
failed invariant.
|
|
76
|
+
|
|
77
|
+
## Manifest
|
|
78
|
+
|
|
79
|
+
`recon.packet-manifest` version 1 contains:
|
|
80
|
+
|
|
81
|
+
- `run`: stable ID, topic, status, requested and achieved profile, timestamps;
|
|
82
|
+
- `request`: objective, questions, included/excluded scope, stable context
|
|
83
|
+
references, confirmed output path;
|
|
84
|
+
- discriminated `sources`;
|
|
85
|
+
- `execution`: the approved execution envelope described below;
|
|
86
|
+
- `artifacts`: direct references; and
|
|
87
|
+
- `gaps`: categorical omitted, unavailable, stale, or failed work, each with an
|
|
88
|
+
explicit boolean `material` classification and affected source, claim, and
|
|
89
|
+
coverage-finding IDs when applicable.
|
|
90
|
+
|
|
91
|
+
### Execution Envelope
|
|
92
|
+
|
|
93
|
+
`execution` is a closed object binding exactly what the user approved:
|
|
94
|
+
|
|
95
|
+
- `provider`, `route`, `role`, `model`, `effort`: non-empty strings;
|
|
96
|
+
- `reasoningMode`, `serviceTier`: string or `null`;
|
|
97
|
+
- `authority`: `provider-enforced` or `contract-enforced`;
|
|
98
|
+
- `maxConcurrency`, `deadlineSeconds`: integers of at least 1; `retryLimit`:
|
|
99
|
+
integer of at least 0;
|
|
100
|
+
- `waves`: closed `{ waveId, mode, taskClass, lanes, conditional }` records
|
|
101
|
+
with a unique wave identity, a mode from the wave-mode set, a task class from
|
|
102
|
+
the durable task-class order, and at least one closed
|
|
103
|
+
`{ laneId, scope, writeRoot }` lane whose identity is unique across the run
|
|
104
|
+
and whose write root is a packet-relative path; and
|
|
105
|
+
- `approval`: `{ type: "explicit-user-approval", approvedAt, fingerprint }`.
|
|
106
|
+
|
|
107
|
+
The fingerprint is the canonical SHA-256 of `execution` with `approval`
|
|
108
|
+
removed. Validation recomputes it; any difference is
|
|
109
|
+
`APPROVAL_FINGERPRINT_MISMATCH`. The envelope records what will run, not proof
|
|
110
|
+
that a launcher ran it. Launch acceptance and per-lane terminal outcomes are
|
|
111
|
+
reported in the controller's status and as `PASS_FAILED` gaps, not as packet
|
|
112
|
+
artifacts.
|
|
113
|
+
|
|
114
|
+
Wave modes are `map`, `gather`, `compile`, `semantic-verification`,
|
|
115
|
+
`adversarial`, `coverage`, `reconciliation`, `redundant-gather`,
|
|
116
|
+
`redundant-verification`, and `contradiction-resolution`.
|
|
117
|
+
|
|
118
|
+
### Passes and Achieved Profile
|
|
119
|
+
|
|
120
|
+
Run status is `preparing`, `awaiting-approval`, `running`, `complete`, `partial`,
|
|
121
|
+
or `failed`. The validator, not a worker, derives the achieved profile from
|
|
122
|
+
complete typed artifacts of the same run:
|
|
123
|
+
|
|
124
|
+
| Pass | Complete artifact |
|
|
125
|
+
| -------------------------- | ------------------------------------------------------------ |
|
|
126
|
+
| `map` | a `recon.raw-dossier` with mode `map` |
|
|
127
|
+
| `gather` | a `recon.raw-dossier` with mode `gather` |
|
|
128
|
+
| `semantic-verification` | a `recon.review-result` with kind `semantic` |
|
|
129
|
+
| `adversarial` | a `recon.review-result` with kind `adversarial` |
|
|
130
|
+
| `coverage` | a `recon.review-result` with kind `coverage` |
|
|
131
|
+
| `reconciliation` | a `recon.review-result` with kind `reconciliation` |
|
|
132
|
+
| `redundant-gather` | complete `gather` dossiers from at least two distinct lanes |
|
|
133
|
+
| `redundant-verification` | a `recon.review-result` with kind `redundant-verification` |
|
|
134
|
+
| `contradiction-resolution` | a `recon.review-result` with kind `contradiction-resolution` |
|
|
135
|
+
|
|
136
|
+
`quick` requires `map` and `gather`; the canonical ledger itself is the
|
|
137
|
+
compile result, so an approved `compile` lane needs no separate artifact, and
|
|
138
|
+
locator validation is performed by the validator.
|
|
139
|
+
`standard` adds `semantic-verification`, `adversarial`, `coverage`, and
|
|
140
|
+
`reconciliation`. `thorough` adds `redundant-gather`,
|
|
141
|
+
`redundant-verification`, and `contradiction-resolution`.
|
|
142
|
+
|
|
143
|
+
Every dossier records the approved `waveId` and `laneId` that wrote it; every
|
|
144
|
+
review result records its approved `reviewerLane`. The lane must belong to a
|
|
145
|
+
wave whose mode matches the artifact (a semantic result to a
|
|
146
|
+
`semantic-verification` wave, a gather dossier to a `gather` or
|
|
147
|
+
`redundant-gather` wave, and so on); otherwise the artifact is
|
|
148
|
+
`UNAPPROVED_LANE`. The artifact path must equal or sit under the lane's
|
|
149
|
+
approved `writeRoot`; otherwise it is `LANE_WRITE_PATH_VIOLATION`. Every
|
|
150
|
+
non-conditional approved lane must either have written an artifact or be
|
|
151
|
+
covered by a material `PASS_FAILED` or `PASS_OMITTED` gap naming its wave
|
|
152
|
+
mode; otherwise the packet fails with `MISSING_LANE_OUTCOME`. Each required
|
|
153
|
+
pass of the requested profile that has no complete artifact must likewise be
|
|
154
|
+
named by such a gap, or the packet fails with
|
|
155
|
+
`MISSING_PASS_OUTCOME_EVIDENCE`.
|
|
156
|
+
|
|
157
|
+
## Source Descriptors and Locators
|
|
158
|
+
|
|
159
|
+
All source descriptors carry `kind`, stable `id`, `available`, `authority`,
|
|
160
|
+
`observedAt`, and `validationState`. Every declared path trust root must be an
|
|
161
|
+
absolute canonical realpath, not a symlink alias, and its filesystem identity is
|
|
162
|
+
rechecked before reads, hashes, or publication.
|
|
163
|
+
|
|
164
|
+
Validation state is closed to `pinned`, `unpinned`, `stale`, `invalid`, or
|
|
165
|
+
`unavailable`. Only an available `pinned` source is assurance-eligible;
|
|
166
|
+
everything else requires an explicit affected-source/claim gap. A stale,
|
|
167
|
+
invalid, or unavailable source used by the canonical ledger deterministically
|
|
168
|
+
creates a material gap and forces `partial`. It may remain as auditable
|
|
169
|
+
non-exact evidence only when that gap names the source and every affected claim,
|
|
170
|
+
all affected claims are below `supported`, and every persisted excerpt and
|
|
171
|
+
diagnostic is secret-safe. Caller-declared non-materiality, missing coverage,
|
|
172
|
+
or a stronger claim state is invalid.
|
|
173
|
+
|
|
174
|
+
- `repository`: canonical `root`, revision, dirty state, and per-path content
|
|
175
|
+
hashes. Locator: relative path, matching revision, line start/end.
|
|
176
|
+
- `file`: canonical path and content hash. Locator: path and optional line
|
|
177
|
+
start/end.
|
|
178
|
+
- `url`: canonical URL plus persisted capture path/digest or explicit validator
|
|
179
|
+
state containing an ETag or last-modified value and a pinned validation
|
|
180
|
+
snapshot path/digest. Locator: URL, retrieval time, optional fragment, and
|
|
181
|
+
the canonical validator-state token when that alternative is used.
|
|
182
|
+
- `command-output`: canonical argv, cwd, exit status, output path/digest, and
|
|
183
|
+
names-only environment metadata. Locator: output path, line range, command
|
|
184
|
+
digest.
|
|
185
|
+
- `connected-resource`: system, resource ID, resource version or retrieval
|
|
186
|
+
token, and capture path/digest. Locator: matching system/resource/version,
|
|
187
|
+
retrieval time, and optional field or section.
|
|
188
|
+
|
|
189
|
+
Missing minimum provenance makes evidence ineligible for `supported` or
|
|
190
|
+
`verified`. Path escape, digest change, version drift, shifted lines, or excerpt
|
|
191
|
+
mismatch invalidates the locator. Only `exact` and `redacted-exact` states are
|
|
192
|
+
assurance-eligible. Managed packet, capture, repository, and output paths reject
|
|
193
|
+
both ancestor and final-component symlinks before reads, hashes, or writes.
|
|
194
|
+
|
|
195
|
+
Source preflight runs these checks on the candidate manifest and ledger before
|
|
196
|
+
any review brief is created, so ineligible sources and broken locators are
|
|
197
|
+
found before the expensive review passes rather than at publication.
|
|
198
|
+
|
|
199
|
+
## Claim Ledger
|
|
200
|
+
|
|
201
|
+
`recon.claim-ledger` version 1 contains run ID, monotonic revision, direct input
|
|
202
|
+
references, synthesis, evidence, claims, unresolved questions, and explicit
|
|
203
|
+
claim transitions.
|
|
204
|
+
|
|
205
|
+
Every claim evidence link is a closed `{ evidenceId, relation }` object whose
|
|
206
|
+
`evidenceId` resolves to an evidence record in the same ledger and whose
|
|
207
|
+
`relation` is `supports`, `contradicts`, `qualifies`, or `context`. A claim
|
|
208
|
+
links each evidence record at most once. String links, open objects, unknown
|
|
209
|
+
relations, unresolved IDs, and duplicates fail `validate-artifact.mjs` before
|
|
210
|
+
any review brief can consume the ledger.
|
|
211
|
+
|
|
212
|
+
Claim states are categorical:
|
|
213
|
+
|
|
214
|
+
- `provisional`: compiled, not mechanically validated;
|
|
215
|
+
- `supported`: supporting evidence and exact locators validate;
|
|
216
|
+
- `verified`: independent semantic review affirmed the claim without unresolved
|
|
217
|
+
material challenge;
|
|
218
|
+
- `contested`: credible counterevidence or incompatible interpretations remain;
|
|
219
|
+
- `unresolved`: available evidence cannot settle the claim; and
|
|
220
|
+
- `unsupported`: no valid support remains.
|
|
221
|
+
|
|
222
|
+
A revision-one claim may honestly begin as `provisional`: that genesis is
|
|
223
|
+
represented by the claim itself and has no transition entry. Revision one
|
|
224
|
+
rejects any incoming or self-transition used to manufacture provisional
|
|
225
|
+
genesis. In later revisions, `provisional` must result from an explicit legal
|
|
226
|
+
incoming transition; the genesis exception cannot be reused.
|
|
227
|
+
|
|
228
|
+
Quick packets never contain `verified` claims. Standard and thorough claims need
|
|
229
|
+
recorded independent semantic, adversarial, and coverage reviews. Every review
|
|
230
|
+
ID resolves to a unique, complete, typed, hashed result from an approved lane,
|
|
231
|
+
bound to the exact immutable brief digest and the claim's required disposition.
|
|
232
|
+
An incomplete or unapproved result cannot contribute assurance or
|
|
233
|
+
reconciliation. A material unresolved challenge or coverage finding prevents
|
|
234
|
+
verification. A run with contested claims may publish as `complete` when all
|
|
235
|
+
declared questions and claims are resolved or characterized; contested claims
|
|
236
|
+
are rendered under "Contradictions and Qualifications". If an unresolved
|
|
237
|
+
challenge represents an unanswered question or missing source evidence that
|
|
238
|
+
leaves investigation incomplete, it must be recorded as a material gap in
|
|
239
|
+
`manifest.gaps` and the run published as `partial`. Review workers propose;
|
|
240
|
+
only a reconciler writes a new ledger candidate. Reconciliation binds the prior
|
|
241
|
+
ledger reference and revision, the next revision, the exact complete
|
|
242
|
+
assurance-review set, and the exact canonical claim transitions. Standard and
|
|
243
|
+
thorough output is exactly the next revision of the bound prior ledger;
|
|
244
|
+
revision one cannot bypass reconciliation. It also binds additions, removals,
|
|
245
|
+
and every prior/current state change; preserves statement, evidence-link, and
|
|
246
|
+
qualification continuity; accepts new evidence only when an incorporated review
|
|
247
|
+
supplied the exact record plus a closed `{ evidenceId, claimId, relation }`
|
|
248
|
+
association to one of that review's disposition claims; preserves every
|
|
249
|
+
unaffected evidence link byte-for-byte; and requires a typed rejection
|
|
250
|
+
disposition from a complete review before removing a prior claim.
|
|
251
|
+
|
|
252
|
+
## Evidence and Secret Redaction
|
|
253
|
+
|
|
254
|
+
Evidence records bind a stable ID and source ID to one typed locator, a minimal
|
|
255
|
+
display excerpt, observation time, locator-validation state, and provenance
|
|
256
|
+
reference. States are `exact`, `redacted-exact`, `stale`, or `invalid`.
|
|
257
|
+
|
|
258
|
+
Validate a sensitive source span transiently, redact before persistence, and
|
|
259
|
+
store `redaction.applied: true`, categories, and
|
|
260
|
+
`redaction.originalPersisted: false`. `redacted-exact` stores neither the secret
|
|
261
|
+
nor a digest of the sensitive span. Diagnostics must never echo the span.
|
|
262
|
+
Secret scanning precedes every assurance, ineligible-audit, gap, and render
|
|
263
|
+
branch; source ineligibility never bypasses persistence safety.
|
|
264
|
+
|
|
265
|
+
## Other Artifacts
|
|
266
|
+
|
|
267
|
+
- `recon.raw-dossier`: assignment identity, approved wave and lane, mode,
|
|
268
|
+
inputs/exclusions, findings, uncertainty, contradictions, gaps, and outcome.
|
|
269
|
+
- `recon.review-brief`: immutable selective-blind projection and digest.
|
|
270
|
+
- `recon.review-result`: review kind, approved lane, exact brief reference,
|
|
271
|
+
permitted/excluded inputs, dispositions, new evidence, closed typed
|
|
272
|
+
claim/evidence associations, coverage findings, unresolved issues, and
|
|
273
|
+
completion status. Every new evidence record has at least one exact
|
|
274
|
+
association, and an association cannot name evidence absent from that result
|
|
275
|
+
or a claim without a disposition in that result. Reconciliation results
|
|
276
|
+
replace the brief reference with prior-ledger/revision, additions/removals,
|
|
277
|
+
exact transitions, and coverage-disposition bindings. Coverage findings are
|
|
278
|
+
closed records bound to affected claims and exact manifest gaps. Accepted
|
|
279
|
+
material gaps require a legal downgrade for every affected claim; a resolved
|
|
280
|
+
finding instead names exact typed evidence. Non-material coverage gaps
|
|
281
|
+
downgrade verified claims and transition provisional claims to unresolved,
|
|
282
|
+
while existing supported claims remain supported without verified promotion.
|
|
283
|
+
Thorough redundant verification and contradiction resolution are
|
|
284
|
+
claim-bearing typed review results, not raw dossiers: they bind immutable
|
|
285
|
+
briefs, claim dispositions, and explicit affected-contradiction dispositions.
|
|
286
|
+
|
|
287
|
+
Create immutable mode-specific review projections with
|
|
288
|
+
`scripts/create-review-brief.mjs`. Verification briefs expose only claim
|
|
289
|
+
statements, display excerpts, typed locators, and required source descriptors.
|
|
290
|
+
Adversarial briefs expose only scope, questions, and provisional statements.
|
|
291
|
+
Coverage briefs expose only scope, questions, and claim ID/statement pairs.
|
|
292
|
+
All reject dossier paths, compiler reasoning, synthesis prose, provenance
|
|
293
|
+
references, and prior review IDs.
|
|
294
|
+
|
|
295
|
+
## Validation and Publication
|
|
296
|
+
|
|
297
|
+
Run `scripts/validate-artifact.mjs` on every candidate. Use
|
|
298
|
+
`--quarantine-root <packet-dir>` to move an invalid candidate and a safe failure
|
|
299
|
+
record under `raw/quarantine/`. Never promote invalid output.
|
|
300
|
+
|
|
301
|
+
Run `scripts/validate-packet.mjs <packet-dir>` before rendering or publication.
|
|
302
|
+
It delegates to the single validation boundary, which validates schemas, IDs,
|
|
303
|
+
references, containment, hashes, source reopening, locators, the approval
|
|
304
|
+
fingerprint, approved lanes, pass outcomes, the one terminal reconciliation,
|
|
305
|
+
legal transitions, secret-safe persistence, derived gaps, assurance, and
|
|
306
|
+
requested vs achieved profile. Candidate validation is non-destructive for
|
|
307
|
+
canonical diagnostic artifacts, but a non-publishable candidate withdraws any
|
|
308
|
+
existing `packet.md` and does not authorize rendering. Only a valid `complete`
|
|
309
|
+
or honest `partial` candidate is publishable, so a rejected canonical
|
|
310
|
+
generation cannot retain a consumer entry point from another generation.
|
|
311
|
+
|
|
312
|
+
`complete` requires the requested profile and no material gap. `partial` is
|
|
313
|
+
valid when either a lower profile was achieved or at least one material gap is
|
|
314
|
+
declared, including honest same-profile partials.
|
|
315
|
+
|
|
316
|
+
Use `scripts/render-packet.mjs <packet-dir>` to generate the deterministic
|
|
317
|
+
consumer view. Its public path entry point first obtains `ValidatedRun`; the
|
|
318
|
+
render core accepts only that graph. It writes an exclusive unpredictable
|
|
319
|
+
temporary sibling, retains that file's identity through hashing and atomic
|
|
320
|
+
promotion, and verifies the promoted digest. Immediately before and after
|
|
321
|
+
promotion it also verifies that the canonical manifest, ledger, and validated
|
|
322
|
+
referenced artifacts still match the byte digests retained by `ValidatedRun`.
|
|
323
|
+
A mismatch is a categorical integrity failure and withdraws `packet.md`.
|
|
324
|
+
Withdrawal first proves the retained packet-root identity; if the root changed,
|
|
325
|
+
the renderer preserves that identity failure and does not follow or unlink the
|
|
326
|
+
replacement path. Rendering or promotion failure on an unchanged root likewise
|
|
327
|
+
withdraws `packet.md` while leaving canonical diagnostics available. Its result
|
|
328
|
+
is the directory path plus a compact status summary and digest, never raw
|
|
329
|
+
dossier content.
|
|
330
|
+
|
|
331
|
+
## Version 1 Non-Goals
|
|
332
|
+
|
|
333
|
+
This boundary does not add another schema version, review pass, persisted
|
|
334
|
+
intermediate, generalized plugin artifact kind, saved validation profile,
|
|
335
|
+
provider behavior, or integration surface. It does not require launcher-emitted
|
|
336
|
+
dispatch receipts; reintroduce those only when a launcher exists that produces
|
|
337
|
+
them itself. It does not change research-pack distribution, documentation,
|
|
338
|
+
backlog integrations, `quick`/`standard`/`thorough`, selective blindness,
|
|
339
|
+
categorical claim states, honest partial publication, or directory-only
|
|
340
|
+
handoff.
|