@staix/agent-research 0.2.1 → 0.3.1

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/CHANGELOG.md +129 -0
  2. package/README.md +261 -24
  3. package/package.json +2 -2
  4. package/src/cli.ts +117 -10
  5. package/src/commands-table.ts +39 -8
  6. package/src/commands.ts +201 -34
  7. package/src/exp/artifacts.ts +20 -2
  8. package/src/exp/attempts.ts +505 -65
  9. package/src/exp/executor.ts +264 -17
  10. package/src/exp/final.ts +1 -1
  11. package/src/exp/logs.ts +25 -12
  12. package/src/exp/metrics.ts +8 -9
  13. package/src/exp/pipeline.ts +92 -0
  14. package/src/exp/protocol.ts +87 -20
  15. package/src/exp/retention-script.ts +649 -0
  16. package/src/exp/retention.ts +70 -0
  17. package/src/exp/reuse-admission.ts +65 -0
  18. package/src/exp/reuse-contract.ts +48 -0
  19. package/src/exp/reuse-runtime.ts +91 -0
  20. package/src/exp/reuse.ts +87 -0
  21. package/src/exp/selection.ts +1 -1
  22. package/src/exp/snapshot.ts +30 -10
  23. package/src/exp/stages.ts +117 -0
  24. package/src/harness/experience-source.ts +34 -0
  25. package/src/harness/experience.ts +206 -0
  26. package/src/harness/hub-guidance.ts +140 -0
  27. package/src/harness/hub-reference.ts +18 -0
  28. package/src/harness/lesson-candidates.ts +162 -0
  29. package/src/harness/limits.ts +2 -0
  30. package/src/harness/privacy.ts +4 -0
  31. package/src/harness/receipts.ts +84 -0
  32. package/src/harness/rounds.ts +198 -0
  33. package/src/harness/transitions.ts +152 -0
  34. package/src/lit/candidates.ts +13 -5
  35. package/src/lit/cards.ts +55 -4
  36. package/src/lit/flow.ts +82 -0
  37. package/src/lit/queries.ts +62 -0
  38. package/src/manifest.ts +13 -6
  39. package/src/mcp-tools.ts +123 -25
  40. package/src/mcp.ts +4 -0
  41. package/src/memory/amem-show.ts +135 -0
  42. package/src/memory/amem.ts +3 -0
  43. package/src/memory/archive.ts +17 -8
  44. package/src/memory/evidence-local.ts +77 -0
  45. package/src/memory/evidence.ts +39 -0
  46. package/src/memory/lessons.ts +4 -2
  47. package/src/memory/skill-check.ts +56 -0
  48. package/src/memory/skill-format.ts +77 -0
  49. package/src/memory/skills.ts +72 -26
  50. package/src/memory/source-budget.ts +11 -0
  51. package/src/memory/vault-cards.ts +226 -0
  52. package/src/paper/build.ts +16 -7
  53. package/src/paper/check.ts +37 -10
  54. package/src/paper/headings.ts +39 -0
  55. package/src/paper/hygiene.ts +153 -0
  56. package/src/paper/placeholders.ts +16 -1
  57. package/src/paper/plan.ts +170 -0
  58. package/src/paper/point-evidence.ts +63 -0
  59. package/src/paper/points.ts +83 -0
  60. package/src/paper/review.ts +102 -9
  61. package/src/paper/scopes.ts +51 -0
  62. package/src/plan/definition.ts +5 -1
  63. package/src/plan/hub.ts +6 -0
  64. package/src/plan/state.ts +5 -0
  65. package/src/playbook.ts +35 -20
  66. package/src/privacy.ts +9 -0
  67. package/src/provenance.ts +679 -0
  68. package/src/scope.ts +24 -3
  69. package/src/study-export.ts +55 -27
  70. package/src/study.ts +54 -14
  71. package/src/ui/panel.css +4 -0
  72. package/src/ui/panel.js +263 -6
  73. package/src/ui/plugin.ts +68 -10
package/README.md CHANGED
@@ -45,10 +45,12 @@ Setup is dry-run by default and lists config, receipt and lock paths plus the en
45
45
  ares init study --question "How do research agents verify citations?"
46
46
  ares scope study --file scope.json # question, subquestions, include, exclude, yearFrom, yearTo, maxCandidates
47
47
  ares gate approve study scope
48
- ares lit search study "citation verification agents"
48
+ ares lit search study "citation verification agents" --intent lexical
49
+ ares lit queries study # per-query yield by intent
49
50
  ares lit list study
50
51
  ares lit screen study <id>... --include --reason "on topic"
51
- ares lit card study <id> --file card.json # summary, claims, methods, findings, limitations, relevance
52
+ ares lit flow study --markdown # selection flow table with {{n:lit.flow.*}} numbers
53
+ ares lit card study <id> --file card.json # summary, claims, methods, findings, limitations, relevance, datasets, results, motivation
52
54
  ares lit verify study
53
55
  ares gate approve study screen
54
56
  ares lit bib study # writes study/refs/references.bib
@@ -57,6 +59,12 @@ ares cite check study draft.md # exit 1 on unknown or unverified [@
57
59
 
58
60
  `ares playbook` prints the full standalone workflow and its rules. Study commands accept `--json`; see the command list for exact usage.
59
61
 
62
+ `lit search --intent lexical|semantic|background` records why a query was issued: exact terms and acronyms, a concept description, or adjacent foundations. Without it the `lit.search` event keeps its earlier shape and reports as `unspecified`. Each candidate a search creates stores that search's id (`firstQuery`, `search-<n>` by order in the ledger); later merges never change it, and candidates from older studies have none. `lit queries` lists every search with its intent, sources, added/merged counts and how many of the candidates it first added are now included, excluded or still new, plus a per-intent summary, the queries with no included yield and the count of unattributed candidates. ares does not write, rank or embed queries. `study export --bundle` keeps query text out and adds the intent to `lit.search` rows and a per-intent summary to `counts.litQueries`.
63
+
64
+ `lit flow` reports the selection flow from the ledger and candidate file alone: search window (first and last search, `--year-from` values given, scope years), records per source, total records, duplicates merged, unique candidates, screened, excluded by code, unscreened, included, identifier-verified and with extraction cards. `scope.json` may declare `exclusionCodes: [{"code": "off-topic", "label": "Outside the review topic"}]` (at most 30, lower-case slugs); `lit screen --exclude --code off-topic` records one, an undeclared code is refused, and without codes every exclusion counts as one `uncoded` group. Manuscripts cite the counts as `{{n:lit.flow.records}}`, `duplicates`, `unique`, `screened`, `excluded`, `excluded.<code>`, `unscreened`, `included`, `verified` and `cards`; they resolve in survey and experiment studies only while the `screen` gate is approved for the current included set, and give `unresolved-ref` otherwise. `lit flow --markdown` prints a table whose numbers are those placeholders, ready to paste. Searches record `--year-from` only when it is given.
65
+
66
+ Cards can be reused across studies through vault-mem reference notes, as a planning aid only. Both card commands need the current `scope` gate, like `lit card`. `lit card export <dir> <id>... --vault ID` previews the cards (own cards whose identifier is verified in this study) with provenance `{studySha256, extractedAt, extractor: {kind, modelFamily?}}`, where `extractedAt` and `extractor.kind` come from the `lit.card` event that recorded the card, not from the exporter; rerun with `--confirm FINGERPRINT` to write each one under an `ares card` section of the single reference note whose `doi` or `arxiv_id` matches, guarded by the note hash. vault-mem search indexes `doi` and `citekey` but not `arxiv_id`, so arXiv-only papers are found through their arXiv DOI, citekey, bare id or title and then matched on the frontmatter key exactly; a note whose frontmatter or card section does not fit in 64 KiB, or whose card section is duplicated or has no json block, is refused rather than skipped or appended to. Room for the export receipt is checked before any vault write, so a full ledger changes nothing. `lit card import <dir> <id>... --vault ID` copies a card back only for an included candidate whose identifier is verified in this study and stores it with `reused: {from: "vault", vault, note, at, provenance}`. A reused card never verifies a reference, screens a candidate, changes a gate or the bibliography, and never counts as support evidence. `lit card list` shows each card's fields and reuse record, and `paper check` (and so `review show`) lists cited candidates backed by reused cards under `reusedCards` and cited cards it cannot read under `unreadableCards`; each appears only when nonempty, so reports without them keep their bytes, and neither blocks the check. Cards also accept optional `datasets`, `results` and `motivation` (at most 4,000 characters each).
67
+
60
68
  ## Literature watch workflow
61
69
 
62
70
  A watch is a saved, bounded search pass for either a survey or an experiment study. It is not a resident watcher. Configure an initialized study with a scope first; in gates mode, approve its current scope before running:
@@ -173,13 +181,68 @@ Commands are argv arrays, never shell strings. An optional `candidate.env` accep
173
181
 
174
182
  The candidate gets its frozen Git archive at `/workspace:ro` and writable `/out`, with no evaluator or `/result` mount. A different container gets `/eval:ro`, `/candidate:ro` and writable `/result`. Both use network none, read-only root filesystems, a temporary `/tmp`, dropped capabilities, no-new-privileges, protocol resource limits and the executor user's non-root uid:gid. The commit must be a full 40-hex SHA; the archive is capped at 256 MiB and ignores later HEAD/worktree edits.
175
183
 
184
+ V1 protocols can reference large or private inputs already on the executor, staged by a person or an external setup script. Hash a directory with `ares executor inputs hash experiment /absolute/staged/input --json` (MCP `ares_executor_inputs_hash`); ares never downloads inputs or copies their contents into the study. Declare optional protocol `inputs`, for example `{ "weights": { "path": "/absolute/staged/weights", "sha256": "<manifest digest>", "mount": { "candidate": "/in/weights", "evaluator": "/in/weights" } } }`. At most 8 names use `[a-z0-9_-]{1,32}`; `__proto__`, `prototype` and `constructor` are reserved. Mount targets are normalized, disjoint paths under `/in/`, always read-only; evaluator-only inputs are absent from the candidate. Sources must stay separate from the attempt workspace, and overlapping sources cannot cross stage privacy boundaries.
185
+
186
+ For v1 protocols with inputs, `executor check` requires and reports Python3 on that host; v1 protocols without inputs require no Python. V2 stage retention requires Python3 separately, including when no external input is declared. The manifest is SHA-256 over UTF-8 byte-sorted compact JSON lines `[relativePath,size,sha256]`, each terminated by a newline. Only regular files/directories are read, without symlinks or special files. The input path and every ancestor directory must be symlink-free; on macOS use canonical `/private/tmp/...` rather than the `/tmp/...` symlink. Hashing streams in 1 MiB chunks, with ceilings of 100,000 files, 100,000 directories, 200,000 total entries, depth 64, 4,096 UTF-8 bytes per relative path and 5 minutes per input; only the bounded digest/count/byte summary crosses the transport. GB-sized files are not subject to the task or output byte cap. Keep staged inputs stable: read-only container mounts do not prevent an independent host writer changing them after verification.
187
+
188
+ Before admission and when preparing a stage launch, ares verifies input manifests outside the launch claim/control transaction and refuses mismatches naming the input. Inside the short launch claim it rechecks that current input identities still match the frozen attempt before starting the container. The design seal and protocol identity bind names, hashes and mounts, so locator-only edits preserve approval; content-hash or mount edits require design approval again. Attempts freeze path-free descriptors plus `verifiedInputs`; stage receipts contain mount targets only. Reconciliation resolves locators from the current design only when its input identities match the frozen attempt, otherwise it names the restore step. Input inspection checks stage targets, read-only flags and source isolation rather than requiring the current locator to equal an already-running mount. An evaluator blocked before launch by input verification stays pending; after restoring the input, reconcile re-verifies and launches that stage instead of marking it lost. There is no locator store. Study bundles export input names and verified hashes only. V1 protocols without inputs retain their existing hashes, raw-byte design bindings and execution behavior; earlier readers refuse the optional inputs field rather than silently accepting it. Network remains none, and candidate outputs remain limited to 500 files / 256 MiB (pass adapters rather than full model weights).
189
+
190
+
176
191
  Only the evaluator's `/result/metrics.json` supplies metrics: at most 64 KiB, exactly the declared names with finite numeric values, for example `{"score": 7}`. Units and directions come from the protocol. Missing, malformed or undeclared metrics fail at the evaluator stage; candidate-printed scores never become metrics.
177
192
 
193
+ Task snapshot archives use the shared content-only tar rule (`COPYFILE_DISABLE=1 tar --no-xattrs`) and check streamed members against the staged task files. AppleDouble `._*` or unexpected/mismatched members are refused by name; frozen task tree hashes and receipt formats are unchanged. Offline archive checks do not establish native Docker isolation.
194
+
178
195
  Without `--detach`, `attempt run` reconciles until finished. Detached runs and MCP `ares_attempt_run` return while running; call `attempt reconcile` again to advance stages and collect results. States progress from running candidate to running evaluator, then succeeded, failed, cancelled or unknown. A gone container without an exit record becomes unknown (`lost`); reconcile never creates a new attempt. One attempt may be active per study. A host watchdog enforces each stage's wall-clock limit.
179
196
 
197
+ New stage records store a container name derived from the study and attempt identities; two studies with the same attempt identity no longer share a container name. Inspection, reconciliation, cleanup and watchdogs use the recorded name. Older stage records without it keep their legacy name. Finish or reconcile running attempts before downgrading to 0.3.0, whose reader recomputes the legacy name.
198
+
180
199
  The same protocol hash, commit/tree, seed and run return the same attempt. Use `--retry <id>` for a linked new attempt; a different commit or seed is a new attempt, not a reproduction. Every status counts toward study budgets (attempt count, wall hours, GPU hours). `attempt list` returns summaries and whole-study totals for every status regardless of filters or page; default page size 50, maximum 200, with `--offset` for later pages. `attempt show` returns the full record.
181
200
 
182
- Raw outputs and logs stay in the private executor attempt directory. The study holds output paths, sha256 and byte counts (regular files only, at most 500 files and 256 MiB total), plus each log stream's path, hash, bytes and truncation flag. Each stdout/stderr copy is capped at 16 MiB; excess log volume does not fail an attempt. `attempt logs` checks the recorded copies and prints tails without changing the study; `--tail` accepts 0..65536 bytes (default 16384), and omitted stage/stream filters return all recorded streams. No log content is persisted in the study.
201
+ Raw outputs and logs stay in the private executor attempt directory. The study holds output paths, sha256 and byte counts (regular files only, at most 500 files and 256 MiB total), plus each log stream's path, hash, bytes and truncation flag. Each stdout/stderr copy is capped at 16 MiB; excess log volume does not fail an attempt. `attempt logs` checks the recorded copies and prints tails without changing the study; `--tail` accepts 0..65536 bytes per stream (default 16384), and omitted stage/stream filters return all recorded streams, including completed v2 candidates. Use `--candidate-stage NAME` (MCP `candidateStage`) to select one named current or completed candidate. Combined returned tails are capped at 256 KiB: defaults shrink across many streams, while an oversized explicit tail requires a narrower selection or smaller value. No log content is persisted in the study.
202
+
203
+
204
+ On a shared Linux NVIDIA executor, admission can be enabled explicitly:
205
+
206
+ ```sh
207
+ ares executor set experiment --kind ssh --host ALIAS --workdir /private/owned/path --gpu-devices 0,1 --gpu-min-free-memory-mb 8192 --gpu-max-load-ratio 0.8
208
+ ```
209
+
210
+ The equivalent MCP `ares_executor_set` setting is `gpu: { devices: [0, 1], minFreeMemoryMb: 8192, maxLoadRatio: 0.8 }`. All three fields are required together; omitting GPU settings preserves the existing behavior. The allow list has 1..64 device indexes or full `GPU-...` UUIDs. Memory is a per-device minimum in MB, and load ratio is the one-minute host load average divided by CPU count. Configuration itself performs no probe.
211
+
212
+ For a new attempt with GPUs and admission settings, ares makes one bounded read-only transport call to `nvidia-smi`, `/proc/loadavg` and `nproc` (or `getconf _NPROCESSORS_ONLN`). It picks the first eligible devices in allow-list order, deduplicating index/UUID aliases for the same device. Not enough free devices, excessive load, or missing/malformed telemetry returns `{status:"deferred",reason:"devices"|"load"|"probe",message,exitCode:75}`. The CLI exits 75 and MCP returns the same object. No attempt, approval event or budget is recorded, and no container starts. Ares never queues, waits for admission, automatically retries or preempts other jobs; invoke the command again explicitly when conditions improve. A plan step records a known failed node with a distinguishable `deferred:devices|load|probe` reason and an `ares plan control <dir> retry <node>` next step. The predicted attempt id is cleared, no Attempt or budget is consumed, and admission is not probed again without explicit recovery. In step autonomy, this failed node pauses as usual; no special step accounting is introduced.
213
+
214
+ Chosen UUIDs are frozen in `gpuDevices` and used for each candidate stage and the evaluator with explicit Docker device selection; inspection checks those UUIDs. Study bundles retain `gpuDeviceCount` only. Duplicate requests for an existing attempt do not probe again. Admission is a point-in-time check, not a resource reservation: host pressure can change after it. GPU settings affect new attempts only; without settings, GPU argv remains the existing `--gpus <n>` path. CPU-only attempts do not probe, even when the executor has GPU settings. Missing telemetry is never treated as an idle host. Tests use fake transport responses; no live GPU admission or training run is claimed.
215
+
216
+ ## Serial stage experiments and retained outputs
217
+
218
+ Opt-in protocol v2 uses 1..16 fresh candidate stages in declared order, named task/upstream-output inputs, digest-pinned images and a separate fresh evaluator. See [the schema and lifecycle contract](docs/design/stage-protocol.md). V1 protocols keep the existing execution and identity behavior. V2 needs Python3 on the executor and a compatible minor release for distribution; no release is performed by setting a protocol.
219
+
220
+ Each candidate receives frozen code at `/workspace`, named read-only inputs at `/in/<port>` and fresh writable `/out`. The evaluator receives all sealed stage trees at `/candidate/<stage>`, its private `/eval`, and fresh writable `/result`. Only evaluator metrics are parsed. By default every stage executes fresh. Eligible reuse requires the separate declaration and explicit controls below; retaining bytes alone does not enable reuse or create an independent sample.
221
+
222
+ The attempt shares 500 output files, 256 MiB payload, 256 KiB total output metadata including manifest sidecars, a 1 MiB record, and aggregate wall/compute budgets. Seals are published atomically after observed successful termination and bounded verification. Consumption rechecks code, task and parent snapshots and copies selected inputs to private read-only snapshots. Same-user/executor tampering is an integrity limit; permissions alone are not attestation.
223
+
224
+ Retention defaults to a 1 GiB study cap including in-flight reservations. Configure an explicit cap with `ares executor set <dir> --kind local --workdir PATH --retention-cap-bytes BYTES` (up to 1 TiB). Full capacity refuses admission and never evicts evidence. `ares retention inspect <dir> --json` returns a bounded page of identities, capacity, active reservations and archived-history counts; use `--offset N --limit N` to page through retained evidence and tombstones. Released history is preserved in immutable shards, keeping the active index bounded; administration bytes count against quota. Save selected `{attemptId,stage,sha256}` references as a JSON array, preview `ares retention prune <dir> --file refs.json --json`, then add `--confirm FINGERPRINT` for the exact reviewed selection. Active producers/consumers refuse disposal; tombstones preserve provenance. Current design approval is checked at confirmation.
225
+
226
+ After an interrupted release, explicit `ares attempt reconcile <dir>` can free terminal or orphan reservation holds only after the executor confirms no owned live container. Unknown work is never rerun. Prune commits executor tombstones before disposal; a crash before the local audit commit leaves authoritative remote tombstones and no false local success or automatic approval. Inspect and preview again before retrying. This is not an atomic transaction spanning the executor and study filesystem.
227
+
228
+ ## Eligible stage-artifact reuse
229
+
230
+ Fresh execution is the default. To use deterministic candidate artifacts in an investigation, declare each eligible `stages[].reuse` contract in protocol v2, review its actual toolchain/complete inputs and approve the current design. The contract fields and safety limits are described in [Stage-artifact reuse](docs/design/stage-reuse.md). Its `kind: pure-artifact`, byte-exact determinism, declared-only inputs, no external state/model outputs and documented toolchain digest are required declarations, not automatic proof of purity.
231
+
232
+ ```sh
233
+ ares attempt run experiment --repo ./candidate --commit FULL_SHA --run investigate --reuse eligible --detach
234
+ ares attempt reconcile experiment
235
+ # New explicit attempt, with reuse if a verified source is available:
236
+ ares attempt run experiment --repo ./candidate --commit FULL_SHA --run investigate --reuse eligible --retry SOURCE_ID --detach
237
+ # Recompute instead of consuming hits:
238
+ ares attempt run experiment --repo ./candidate --commit FULL_SHA --run investigate --reuse eligible --force-fresh --retry SOURCE_ID --detach
239
+ ```
240
+
241
+ Eligible reuse requires the run to match the current selection rule. Outside a matching investigation run, the request still executes fresh and its CLI/MCP result adds `warnings[{code:"outside-investigation", cause, nextStep}]`, naming the cause and advising a matching selection run or dropping `--reuse`; the warning is not persisted. MCP `ares_attempt_run` accepts equivalent `reuse: off|eligible` and `forceFresh` fields. Plan `attempt.run` steps forward the corresponding `reuse` and `force-fresh` arguments admitted by the shared command table. Re-delivery with the same controls returns the existing running or terminal attempt, including force-fresh requests. Changing reuse/force-fresh controls on an existing identity is refused with its recorded controls and an explicit retry hint. Off-mode artifacts are not indexed retroactively. Evaluators, ablation, final and posthoc always execute fresh. Only a `succeeded` source attempt can supply a reuse hit; a cancelled or unknown source is an `ineligible-source` miss even if its stage bytes remain intact. Missing/pruned/corrupt/unsupported sources are reasoned misses with ordinary budget checks. GPU ABI reuse is currently unsupported and falls back to fresh execution.
242
+
243
+ Keys bind the study and frozen selection/reserved-seed population, protocol comparison domain, complete selected stage, full code tree and snapshot digest, exact declared input hashes, seed, producer version/source/runtime and observed executor/platform ABI. A changed code tree therefore misses even if only a downstream stage changed. Unavailable platform facts give a reasoned miss; caller assertions cannot supply them.
244
+
245
+ Hits revalidate and pin original bytes and record source references atomically with local stage admission. Current policy, gates and budgets are checked again; old approval is not inherited. Console/provenance/export separate original computation, current verification/materialization, executed/reused stages and independent counts. Reused work is not a new independent sample, and evaluator metrics are never reused. Unmeasured costs stay unknown. Source logs belong to the original attempt; the log reader reports that source id for a reused named stage. No measured speedup or adoption decision is claimed. Native container proof and the measured reuse pilot remain separate pending work; fake-runner equivalence checks are not that proof.
183
246
 
184
247
  ## Investigation workflow
185
248
 
@@ -262,7 +325,7 @@ ares final close experiment
262
325
 
263
326
  The final gate binds SHA-256 of the investigate result sha, the ablate result sha or none, and the design binding. Approval requires current closed upstream results. Changed content reopens it; re-close changed upstream inputs and re-approve before final close. Start checks require a reserved seed, the current winner or selection baseline, and final-gate authorization before any Git resolution, record or container. In auto autonomy, final approval is recorded only with a verified candidate start, so failed preparation records no automatic approval.
264
327
 
265
- Final is one shot: the first ledger-started attempt for each winner/baseline commit and reserved seed is decisive, whatever its status. Retries stay visible and never replace it. Close refuses running final attempts or missing decisive pairs. It requires the final gate currently approved even for a negative result. Every decisive attempt must succeed and the direction-adjusted paired delta must be positive and at least `minDelta`; otherwise the result is `not_qualified` with a named reason. There is no significance test. Reapproval keeps existing data fixed; old seal/input bindings alone never disqualify it. A changed evaluation protocol gives `protocol-changed`. A winner change after any final attempt, including baseline-only trials, gives `winner-changed` without demanding new-winner pairs and blocks new final starts. Reason priority is winner change, protocol change, first decisive failure status, then below-margin. `runs/final/final.json` and `final.closed` are committed together; unchanged inputs record nothing, unsupported versions are preserved.
328
+ Final is one shot: the first ledger-started attempt for each winner/baseline commit and reserved seed is decisive, whatever its status. Retries stay visible and never replace it. Close refuses running final attempts or missing decisive pairs. It requires the final gate currently approved even for a negative result. Every decisive attempt must succeed and the direction-adjusted paired delta must be positive and at least `minDelta`; otherwise the result is `not_qualified` with a named reason. There is no significance test. Reapproval keeps existing data fixed; old seal/input bindings alone never disqualify it. A changed comparable evaluation identity gives `protocol-changed`; input locator-only and budget-only edits do not change that identity. A winner change after any final attempt, including baseline-only trials, gives `winner-changed` without demanding new-winner pairs and blocks new final starts. Reason priority is winner change, protocol change, first decisive failure status, then below-margin. `runs/final/final.json` and `final.closed` are committed together; unchanged inputs record nothing, unsupported versions are preserved.
266
329
 
267
330
  After a historical `final.closed` receipt exists, run additional non-reserved seeds/commits with `--run posthoc`. `ares posthoc show experiment` lists all posthoc statuses and metrics labeled `exploratory`. Posthoc work never changes final result bytes, the final input fingerprint or its close receipt, even while an exploratory attempt runs. These are experiment-only commands; survey studies refuse them on CLI and MCP.
268
331
 
@@ -290,9 +353,51 @@ ares paper build experiment --json
290
353
 
291
354
  In experiment prose, other digits give `bare-number`; matching a free number against an existing metric is never allowed. Digits are allowed in link targets, placeholder/literal payloads and line-start ordered-list markers. Citation keys may contain digits, but bracket prose is checked: only locator terms (`p.`, `pp.`, `sec.`, `§`, `ch.`, `chap.`, `fig.`, `tbl.`, `table`, `eq.`, `l.`, `ll.`, `para.`) followed by integers, ranges or lists are exempt. `[@key, improved accuracy by 12.5%]` still fails. Inline/fenced/indented code numbers are nonblocking but listed as `codeNumbers` (first 500 values with line/column) and `codeNumberCount` (total). Paragraph and list continuations are prose. Unknown or unverified citation keys fail, including citations inside literal escapes; verification means identifier existence plus title/year match, never support for a claim.
292
355
 
356
+ Citation hygiene findings (both modes) carry `severity: "warning"`, a line/column and the section heading path: `adjacent-duplicate-citation` (a key twice in one bracket group or in two adjacent groups with no prose between), `citation-stack` (a group with more than `maxGroup` keys, default 6), `repeated-bundle` (the same set of 3+ keys in more than `maxBundleRepeats` places, default 2), `bare-identifier` (an arXiv id, DOI or URL in prose outside citations, link targets, code and reference definitions) and `duplicate-heading` (identical sibling headings). Warnings do not fail `paper check` or `paper build`. An optional `study.toml` next to `study.json` sets thresholds and makes listed codes blocking; unknown keys or codes refuse:
357
+
358
+ ```toml
359
+ [paper]
360
+ maxGroup = 6
361
+ maxBundleRepeats = 2
362
+ blocking = ["citation-stack", "bare-identifier"]
363
+ ```
364
+
293
365
  Negative results must be visible: when final.json exists, include `{{n:final.status}}`; when the closed investigation has no winner, include `{{n:investigate.reason}}`. Code examples, link targets, HTML comments and reference-definition metadata cannot satisfy this rule. Include a reason or numeric ref only when that source field exists; null values stay unresolved. The check is read-only and reports positions for every finding; a failing CLI check exits 1. Survey studies check citations without the experiment bare-number rule and refuse experiment placeholders with `unresolved-ref`; they can build citation-only manuscripts.
294
366
 
295
- Build refuses every finding before writes. It commits `paper/build/manuscript.md` (rendered values), `paper/build/evidence.json` (`paperEvidence: 1`) and `paper.built` together. The evidence map keeps the input manuscript hash and each active placeholder's syntax, value, rendering, position, source file and raw source hash; literal sources point to the input manuscript. Outputs are bounded to 2 MiB rendered Markdown and 8 MiB evidence. Identical outputs with a matching receipt are a no-op. Changed provenance rebuilds evidence even if rendered text is identical; unknown evidence versions preserve original bytes. The returned `manuscriptSha256` is the rendered output hash; `evidenceSha256` is the review's build identity.
367
+ An optional `paper/plan.json` declares section citation scopes. Assign bibliography keys first, then provide a version-1 JSON plan, for example:
368
+
369
+ ```json
370
+ {"v":1,"sections":[{"id":"introduction","heading":"Introduction","cites":["synthetic2026"]}]}
371
+ ```
372
+
373
+ ```sh
374
+ ares paper plan set study --file routing.json
375
+ ares paper plan show study --json
376
+ ```
377
+
378
+ `--file -` reads bounded JSON from stdin; MCP uses `ares_paper_plan_set` with `plan` and `ares_paper_plan_show`. Plans without writing points store `v: 1`; a plan containing any point stores `v: 2`. Authoring input may omit `v`, and empty `points` arrays are removed so point-free v1 bytes stay unchanged. Explicit v1 with points refuses; unsupported stored versions are preserved and refused. A formatted plan is at most 64 KiB, with at most 64 unique section ids/headings and 300 distinct keys per section. Ids are lowercase alphanumeric hyphenated slugs of at most 64 characters. Keys must currently be included and identifier-verified; unknown fields and stale/excluded references refuse before mutation. Show reports included references routed / total. Routing is declared by the caller, never generated or judged semantically by ares.
379
+
380
+ Heading content after ATX/Setext markers must match exactly, including inner whitespace and inline Markdown; multiline Setext content retains its LF/CRLF text. Code/comment headings are ignored. Text before the first planned heading has no scope restriction; ordinary citation verification still applies. Only another matching planned heading changes scope, so an unplanned heading does not silently clear the prior scope. `out-of-scope-citation` is blocking and includes the section id and source position. `unplanned-section` (unplanned level-2 heading) and `unrouted-reference` (once per included reference with no scope) are fixed warnings and do not block build; they are separate from the configurable hygiene codes above.
381
+
382
+ Sections may also declare optional writing points. Each point has a globally unique slug id, one single-line claim of at most 500 Unicode characters, and distinct `requires` keys drawn from that section's `cites`. There are at most 40 points per section, within the same 64 KiB plan bound. For example:
383
+
384
+ ```json
385
+ {"v":2,"sections":[{"id":"introduction","heading":"Introduction","cites":["synthetic2026"],"points":[{"id":"method-boundary","claim":"Explain the synthetic method boundary.","requires":["synthetic2026"],"evidence":["card:doi:10.0000/synthetic"]}]}]}
386
+ ```
387
+
388
+ Place a point's marker before its paragraph in its own planned section:
389
+
390
+ ```markdown
391
+ ## Introduction
392
+ <!-- point:method-boundary -->
393
+ Describe the boundary [@synthetic2026].
394
+ ```
395
+
396
+ Every occurrence is checked from its anchor to the next well-formed point anchor or planned-section boundary, whichever comes first. Any well-formed next anchor ends the window, including an unknown id or an id in the wrong section. Only anchors in a point's own section count. A satisfied copy does not mask another occurrence missing citations; no separate duplicate-anchor finding is added. Escaped markers, code, ordinary-comment text, link destinations/titles, reference-definition metadata and placeholders do not create point anchors. `missing-point`, `missing-required-citation` and `unresolved-point-evidence` block check/build with point/section positions. Claims are validated for shape only: ares never matches them against prose or judges whether a reference supports them.
397
+
398
+ Optional `evidence` has at most 64 local `card:<paper-id>` or `attempt:<16-hex-id>` references per point, each at most 4,096 UTF-8 bytes. Set/show requires them to resolve; disappearance later is reported by paper check. Attempt lookup reads only the addressed payload and scans at most 4,096 physical run directories; archive an oversized study before retrying. Resolution establishes local record existence only, without a success, claim-support or citation-entailment assertion. Review report `location` may be the exact token `point:<id>` (apart from surrounding whitespace). For current-build reports containing such locations, review show adds `openByPoint` with unresolved finding ids and open/blocking counts; it does not resolve the id against the plan or infer support. Without points, section-scope checks and v1 plan behavior remain unchanged.
399
+
400
+ Build refuses every blocking finding before writes. It commits `paper/build/manuscript.md` (rendered values), `paper/build/evidence.json` (`paperEvidence: 1` without a plan, `paperEvidence: 2` with a plan) and `paper.built` together. Plan-bound evidence includes the exact raw `paper/plan.json` SHA-256, so changing, adding or removing the plan invalidates the current build/review even if rendered prose is unchanged. Plan absence preserves the prior check report and v1 evidence bytes. The evidence map keeps the input manuscript hash and each active placeholder's syntax, value, rendering, position, source file and raw source hash; literal sources point to the input manuscript. Outputs are bounded to 2 MiB rendered Markdown and 8 MiB evidence. Identical outputs with a matching receipt are a no-op. Changed provenance rebuilds evidence even if rendered text is identical; unknown evidence versions preserve original bytes. The returned `manuscriptSha256` is the rendered output hash; `evidenceSha256` is the review's build identity.
296
401
 
297
402
  Have reviewers inspect the current output, evidence, literals and code-number list. Save each report and add it against the current evidence hash:
298
403
 
@@ -318,6 +423,10 @@ ares gate approve experiment review
318
423
 
319
424
  A finding is `{id,kind,location,text,blocking}`; kinds are `contradiction`, `unsupported-claim`, `number`, `citation`, `method`, `clarity`, `other`. Contradictions are always blocking, even if submitted as false. A reasoned resolution records its actor; clean votes never resolve another review's finding. Reports use self-reported family labels, normalized for whitespace at the ends and case; ares neither launches nor attests to the reviewers. Limits: 100 reports per build, 200 findings per report, 4,000-byte texts/reasons, 128-byte reviewer/family/finding identifiers. The existing ledger event ceiling also limits a combined report to 60 KiB; shorten a report rather than raising the ledger bound.
320
425
 
426
+ A finding may also carry `repair` (`edit`, `paragraph` or `section`; omitted means `edit`) and `section` (a plan section id or heading path, at most 256 bytes); other repair values refuse. A section's round count is the number of reports with at least one finding for it, across every evidence hash. `review show` lists `sections` (rounds, pass when no finding for it is open at the current hash, overBudget), `openBySection` (open findings grouped by section and repair scope) and `overBudget` for sections past `[paper] reviewRounds` in `study.toml` (default 3), with the advice "replan the section or ask a person". The same advice appears under `info`, never under `unmet`: the budget does not change the gate. ares does not repair or choose a scope. `study export --bundle` adds `counts.reviewSections` (hashed section ids with rounds and pass, plus the repair-scope histogram) and per-report `repairs` counts, with no finding or section text.
427
+
428
+ Survey reviews can also answer `checklist.survey`, six booleans: `taxonomyPrinciple`, `noEnumeration`, `specificGaps`, `citationRelations`, `selectionReported`, `scopeControl`. `ares review checklist` (MCP `ares_review_checklist`) prints the question for each key, so every reviewer answers the same wording. `study.toml` `[review] surveyChecklist` is `off`, `show` or `require` (default `show` for survey studies, `off` for experiments). `show` lists each report's answers in `review show` under `surveyAnswers` and in its `checklists` row, including false answers; `off` returns an empty `surveyAnswers` array and omits the survey block from `checklists`. An unreadable `study.toml` keeps that default and adds one `review-survey-settings` note under `info`, never under `unmet`. `require` refuses a report without the block at `review add`; it requires the block to be present, not true. Answers never become a gate condition, and unknown keys inside `survey` refuse.
429
+
321
430
  The global `review` gate needs a clean current check/build, at least two distinct model families for that evidence hash, and no open blocking finding. Checklist answers are shown, including false answers, rather than adding a separate approval condition. Readiness names every unmet condition. Approval is checked in the shared command under the study lock; reject still needs a reason but no readiness. No current command auto-requires the review gate. The gate binds both output hashes and sorted added/resolved event hashes for that build. A changed build, added review or resolution reopens it; old reviews stay in the ledger but do not count toward a new build.
322
431
 
323
432
  A no-argument `paper.build` conductor step emits `{sha256}` of the committed evidence file; a downstream `plan:<id>` gate binds it. That local gate does not replace the global manuscript `review` gate. MCP paper/review operations never start the controller loop. Claim-to-passage evidence and its contradictions await [agent-hub#931](https://github.com/STAIxBWLB/agent-hub/issues/931); readiness currently reports `claims: unavailable (STAIxBWLB/agent-hub#931)` without blocking on it. Claim verdicts stay outside ares. LaTeX/PDF container builds and venue templates are out of scope. Acceptance uses offline synthetic fixtures, not live hub/executor DAG proof.
@@ -330,6 +439,7 @@ Lessons and archive call the `amem` CLI on PATH (`search --json --explain`, `bri
330
439
  ares lessons study --for "compare candidate hypotheses" --half-life 180 --limit 50 --json
331
440
  ares skill propose study --file proposal.json
332
441
  ares skill list study --json
442
+ ares skill check study reusable-procedure --json
333
443
  ares skill decide study reusable-procedure accept --reason "Reviewed against recorded evidence" --pr https://github.com/example/project/pull/1
334
444
  ares archive study --json
335
445
  ares archive study --confirm <fingerprint> --json
@@ -337,12 +447,81 @@ ares archive study --confirm <fingerprint> --json
337
447
 
338
448
  `lessons` searches with `--for` text, otherwise with the study question, in the study's amem project. An intent also adds a typed `amem brief`. It reports age in fractional days (future timestamps clamp to zero), T1 relevance with amem recency removed, half-life-decayed score and 1-based rank. The formula is `score = relevance * 0.5^(age / halfLife)`; ties put fail notes first, then lexical id. Half-life defaults to 180 days, bounded to 1..3650; result limit defaults to 50, bounded to 1..50. The command is read-only and takes no study lock.
339
449
 
340
- Archive derives fail notes from pivot decisions, findings from current closed investigation/final results and resolved review contradictions, and decisions from selection/final seeds. Fail fields use recorded cause/retryWhen or `not recorded`; outcomes retain negative reasons. Open contradictions stay out. Each note starts with study id/question; evidence uses study-scoped attempt/run refs, split into consecutive notes of at most 16 refs so none are dropped. Preview writes nothing. Its fingerprint binds the full canonical note list and stays valid across receipts. Confirmation writes at most the first 200 pending notes in stable order, reports `remaining`, and records returned ids/content hashes in one `archive.exported` event. Repeat the same confirmation for later batches; already-exported hashes are skipped. Partial failures commit successful receipts and explain how to continue. Changed source notes invalidate confirmation. Receipt capacity is checked before any outward write, and confirmed calls hold the study lock. Errors never include amem stdout/stderr. Note text travels on stdin, and `--`-leading option values get one leading space for the amem parser. Agent markers and home/config context are allowlisted; API credentials stay stripped.
450
+ Archive derives fail notes from pivot decisions, findings from current closed investigation/final results and resolved review contradictions, and decisions from selection/final seeds. Fail fields use recorded cause/retryWhen or `not recorded`; outcomes retain negative reasons. Open contradictions stay out. Existing study-result notes start with study id/question; their evidence uses study-scoped attempt/run refs, split into consecutive notes of at most 16 refs so none are dropped. Preview writes nothing. Its fingerprint binds the full canonical note list and stays valid across receipts. Confirmation writes at most the first 200 pending notes in stable order, reports `remaining`, and records returned ids/content hashes in one `archive.exported` event. Repeat the same confirmation for later batches; already-exported hashes are skipped. Partial failures commit successful receipts and explain how to continue. Changed source notes invalidate confirmation. Receipt capacity is checked before any outward write, and confirmed calls hold the study lock. Errors never include amem stdout/stderr. Note text travels on stdin, and `--`-leading option values get one leading space for the amem parser. Agent markers and home/config context are allowlisted; API credentials stay stripped.
451
+
452
+ New proposals write `skillProposal: 2` by default, with no opt-in or downgrade. Input is `{name,summary,steps,evidence,applicability?,limitations?,counterevidence?}`. Name follows the run-name rule; summary is at most 4,000 UTF-8 bytes, steps 1..64 nonblank strings of at most 1,000 bytes, optional applicability at most 2,000 bytes, and limitations at most 16 strings of 1,000 bytes. Evidence requires a source; evidence plus counterevidence have at most 64 unique current-study typed refs or full 32-hex amem ids, including compatibility display strings. Caller-supplied inspections are refused. The source owner creates body-free inspection receipts before one file/event commit. The complete deterministic Markdown, including receipts, must fit 16 KiB. At most 100 proposals including terminal states are kept. Missing/unsupported evidence never becomes valid just because the proposal can be queued.
453
+
454
+ `ares skill check <dir> <name>` explicitly returns availability, integrity, recorded outcome and reviewer-support status separately. It reads sources without study writes or export. A check/accept has one aggregate 25-second/262,144-byte response budget across the shared local provenance projection and all amem stdout/stderr, not a fresh budget per ref. Local source files retain the provenance reader's existing bounds. Unsupported local record versions stay unsupported and require a compatible ares version or restoration of the local record, keeping original bytes unchanged; this is distinct from the amem >=0.22.1 screened-reader dependency. Local refs use one captured producer graph and a generation recheck rather than re-scanning it for every ref. The monotonic wall budget cannot be stretched by an injected observation clock. Expiry-normalized unavailable receipts clear the digest; proposal budget/journal failures identify skill propose and give retry/revise guidance.
455
+
456
+ V2 acceptance reruns all required evidence AND cited counterevidence under the owned study lock. Both must remain available with the same digest, integrity, recorded meaning and source version as the proposal's source-owned receipts. Missing, privacy-refused, changed, unsupported or over-budget sources refuse acceptance with a revised-proposal/honest-limitations next step; counterevidence cannot disappear silently and make a rule easier to accept. Local source/proposal generation is checked again before the single atomic decision commit. Before commit, the pending decision is replay-validated. Decision inspections are validated independently of the immutable proposal Markdown ceiling (and remain within the ledger bounds), so a longer valid observation timestamp does not corrupt a near-limit proposal. The receipt stores a fingerprint over the actual inspections, source generation and response observation times. Accepted v2 receipts require a 64-hex localGeneration whenever any evidence or counterevidence is an ares ref; amem-only receipts require null. A terminal proposal can still report available source inspections, but acceptReady is always false and a new/revised proposal is needed for new evidence. External observations are what the owner returned at those times, not an atomic cross-store snapshot. Negative/no-winner/unfinished results retain non-success meanings; even a recorded successful experiment does not establish support or entailment.
457
+
458
+ Accept requires a reviewed HTTP(S) PR URL without credentials, kept only as the actor's supplied reference; ares never opens, validates or merges the PR. Reject and withdraw need no source recheck. Every terminal state is final, and withdrawal is allowed only while proposed. Historical v1 Markdown and terminal decisions remain untouched and display `legacy-unresolved`; an explicit check reports that the old record lacks the v2 contract rather than retroactively rejecting its decision. Older readers refuse new v2 records with version guidance, so default v2 writes need a compatible minor release. No automatic installation, activation, vault promotion or new export path is added.
459
+
460
+ The console displays stored applicability, limitations, counterevidence and receipt strengths separately. Polling/listing never calls a source reader; proposal/check/accept are explicit source-inspection operations. Stored `inspection-required` receipts are not a current privacy check, and acceptance always rechecks. Synthetic executable tests exercise actual owned-process cleanup/spawn/output bounds without real amem, while provider/OS fixtures make no live interoperability or scientific-support claim.
461
+
462
+ A local ref is an `ExecutionReferenceV1` with the current study id as `projectKey`, a `PROVENANCE_KINDS` kind and the exact native id. Compatibility strings `ares:<study>/<kind>:<native-id>` map directly to that address; aliases such as `run` and arbitrary file/URL inference are unsupported. Wrong-study or ambiguous refs never trigger another study scan. The read-only resolver returns available, missing, changed, unavailable or unsupported, with permitted digest/version/status metadata only. Digests for ledger sources bind the relevant canonical record or folded idea/dispatch state, excluding unrelated later appends. Valid negative/no-winner results stay visible with their negative meaning; unfinished, corrupt, missing and historical-only sources cannot be represented as validated successful outcomes. An artifact inventory is receipt-only evidence, not a read of executor bytes. Availability or a recorded success never establishes scientific entailment or support for a reusable rule; that remains a reviewer judgment.
463
+
464
+ Amem exact-id inspection uses the screened `amem_show` MCP contract pinned to agent-mem 0.22.1 (`src/mcp.ts` and `src/mcp-memory.ts`), with a short-lived `amem mcp` child scoped by the startup study cwd. The reader requires advertised `{id}` support and serverInfo version >=0.22.1, sends the full 32-hex id, and requires a byte-for-byte returned-id match. Missing contract capabilities are unsupported and need a separately specified compatible dependency, never CLI show/search or storage fallback. A standalone session has a 25-second/262,144-byte cap, further reduced by the shared multi-source budget; it forwards only actual inherited identity/config environment values, never fabricates agent markers, and closes its owned process group. Hidden, absent and refused results, plus raw capture/repo response wrappers, collapse to the same unavailable projection. A curated View source label is provenance text rather than a curation discriminator. A permitted body is hashed transiently and discarded; only digest, version, kind and the actual response observation time may survive. No live amem/vault interoperability is claimed by the fake-stream fixtures.
341
465
 
342
- A proposal input is `{name, summary, steps, evidence}`: a run-name `name`, nonblank summary, at least one step, and 1..64 evidence refs (32-hex amem ids or `ares:<study-id>/...`). Unknown fields are refused. Deterministic Markdown at `proposals/skills/<name>.md` is bounded to 16 KiB and bound to its `skill.proposed` hash receipt. At most 100 proposals, including terminal states, are retained. List verifies bounded file bytes against receipts and shows proposed/accepted/rejected/withdrawn. Accept requires an HTTP(S) PR URL without credentials; ares records the actor's reference without opening, checking or merging the PR. Every terminal state is final; withdraw is allowed only while proposed. Durable vault promotion remains amem's `vault-candidates` pipeline; ares never writes the vault.
466
+ Receipt deduplication applies only to successful exports recorded in ares. A crash after amem writes but before the ares receipt commit remains ambiguous: reconcile with the owner before retrying an interrupted/crashed archive, because an unreceipted retry may duplicate a note. This is receipt-only recovery, not exactly-once cross-store export. PR URLs are actor-supplied references, not proof that a PR exists or merged.
343
467
 
344
468
  Survey and experiment studies both support lessons, archive and all skill commands. Survey archives can export resolved review contradictions, and are empty when no eligible lessons exist. Selection, ideas and experiment-result operations remain experiment-only. All A5 acceptance tests use synthetic records and fake runners; no live amem or vault interoperability is claimed.
345
469
 
470
+ ## Harness rounds (fixture-only)
471
+
472
+ Experiment studies can record an independent bounded improvement-round declaration without a container protocol or any model/probe launch:
473
+
474
+ ```sh
475
+ ares harness set study --file round.json
476
+ ares gate approve study harness:round-one
477
+ ares harness import study round-one --file synthetic-probe-fixture.json
478
+ ares harness show study --round round-one --json
479
+ ```
480
+
481
+ These are local ares-owned forms, not agent-hub producer wire import or attestation. The matching MCP tools are `ares_harness_set`, `ares_harness_import` and read-only `ares_harness_show`, through shared operations. At most 16 exact task identities and two candidates per round are allowed; each form is at most 64 KiB and the index at most 1 MiB. The `harness:<id>` gate binds config/guidance/frozen refs, uses the study default autonomy and reopens on explicit definition changes. Previous events remain; duplicate identical sets/imports write nothing. Existing protocol/design/final gates, attempt records and scientific denominators stay independent.
482
+
483
+ A separate read-only library mapper accepts agent-hub public `GuidanceReadResult` metadata pinned to `50100a8`, preserving native variant/experiment/task identities, lifecycle, layer, section, hashes, byte counts and evidence-key status. It omits rationale text with `rationaleOmitted: true`; unavailable stays explicit. Opaque `ahub` references are decoded as addresses only. This adds no CLI/MCP command, hub resolver, skill evidence, probe receipt, handoff assurance or live import; the local fixture forms above remain unchanged. See the [public-metadata boundary](docs/design/harness-guidance-mapper.md).
484
+
485
+ `controlled-lane` authoring must name source execution refs for its measured stages, but current real imports and end-to-end evaluation are always unavailable. Synthetic comparisons can be compatible only, never matched or host-observed. Unknown usage and sampling remain unknown; model/config/input/environment/toolset/budget drift stays explicit. No raw transcript, environment or assurance claim is imported. Nothing starts a probe, calls a model or mutates a hub. Local contrast/composition/adoption and the read-only Harness rounds panel are available; all dispositions remain experimental and fixture-only. Frozen prior-experience controls are described below. See [the T1 schema and fixture boundary](docs/design/harness-rounds.md) for fields, source strengths, limits and what remains unverified.
486
+
487
+ After importing admitted fixtures, use the current `transitions.fingerprint` from `ares harness show --json` in each form:
488
+
489
+ ```sh
490
+ ares harness contrast study round-one --file contrast.json
491
+ ares harness compose study round-one --file composition.json
492
+ ares harness close study round-one --file closure.json
493
+ ares harness close study round-one --file closure.json --confirm CONFIRMATION_FINGERPRINT
494
+ ares harness adopt study round-one --file adoption.json
495
+ ares harness adopt study round-one --file adoption.json --confirm CONFIRMATION_FINGERPRINT
496
+ ```
497
+
498
+ Contrasts distinguish deterministic-check, blinded-judgment and actor-claim provenance and cite exact admitted probe/output hashes. Per-section keep/drop/revise decisions link current contrasts. A new successor remains unexecuted until its own exact fixture import; preserving identical previously executed bytes reuses that record instead of counting another sample. Adoption must cite the selected arm's admitted execution in checks (an identical-byte successor may reuse its reported existing execution); missing execution refuses before preview. It records a distinct independent deterministic check (unavailable for all current fixtures), first previews, then writes adopted-experimental disposition and closure together under the harness gate. Separate `harness close` records baseline-kept, inconclusive or withdrawn without adoption. Every closure immutably binds the round/evidence hashes, outcome, actor and reason; stale closures remain visible in history. Stale confirmations refuse; changed evidence makes old readiness stale, and definition changes reopen it without rewriting decisions. Correctness remains unavailable and transfer not demonstrated. Baseline preservation and inconclusive are normal closures, not scientific outcomes. The console Harness rounds panel shows the same comparison/edit-to-evidence table with no action or implicit source reads. See [the bounded forms and readiness contract](docs/design/harness-rounds.md#contrast-composition-and-experimental-closure).
499
+
500
+ ## Reviewed harness lesson candidates
501
+
502
+ After a current harness closure, use `ares lesson propose <dir> --file PATH|-`, `lesson list`, `lesson check <dir> <name>` and `lesson decide <dir> <name> --file PATH|-`. A proposal binds the closure hash, concrete contrast/composition changes, probe/output behavior refs and typed counterevidence, with procedure, applicability, limitations, when-not-to-use, failure and retry conditions. The typed source reference kind is `harness-closure`. Bounds are 64 proposals, 16 KiB per proposal and a 1 MiB receipt-checked local index.
503
+
504
+ Current fixture sources may produce only single-task `observation`, `fail` or `limitation` notes; `no-lesson` is never exported. Acceptance rechecks unchanged sources and counterevidence under the study lock, binds proposal/evidence hashes, records the reviewer reason, and requires `acknowledgeStrength` to equal `synthetic-fixture; not evidence of real agent behavior`. An accepted candidate can be withdrawn. Listing is local; checking is an explicit source read. Reflection metadata and an experimental closure never establish real behavior, successful improvement or transfer.
505
+
506
+ Accepted, current candidates enter ordinary archive preview/confirmation. Every exported note retains the literal fixture label, single-task scope and limitations; observation maps to finding, failure/limitation to fail. Export rechecks accepted evidence and counterevidence. Archive is still the final study step. Successful returned ids are receipted, but an interrupted amem write without an ares receipt requires operator reconciliation and may duplicate on retry; no exactly-once cross-store guarantee is made. Real producer execution and live transfer remain future work.
507
+
508
+ ## Frozen prior-experience context
509
+
510
+ Fix a study-local order before the first round, freeze an empty baseline/no-library control or an eligible prepare-only fixture selection, then bind its returned `streamSha256` and `improverContextHash` in the round's optional `context`:
511
+
512
+ ```sh
513
+ ares harness stream set study --file stream.json
514
+ ares harness stream show study --json
515
+ ares experience select study --file selection.json --json
516
+ ares experience freeze study --file selection.json --json
517
+ ares experience check study round-two --model synthetic-model --runtime synthetic-runtime --json
518
+ # Nonempty contexts also require the matching --toolset-sha256 HASH.
519
+ ```
520
+
521
+ Streams have 1..16 ordered unique task ids and immutable membership/order. Snapshots are body-free, bounded to 16 entries/16 KiB and frozen before the round starts. Legacy rounds without `context` keep their binding. Improver context stays separate from worker baseline/effective-input hashes; nothing activates guidance or starts a session.
522
+
523
+ Nonempty prior-experience and retrieval-only preparation now require an earlier same-study task in the immutable stream, its current native harness closure, an accepted unchanged lesson, a unique archive receipt, and an exact current screened amem note matching the exported content. Model, runtime and toolset hash must match; model identities allow up to 256 UTF-8 bytes across fixture, lesson, experience and MCP validation. Temporal and compatibility eligibility is checked locally before any exact-id counterevidence or note read. Ranking alone grants no eligibility: generic unreceipted ids refuse before an exact-id read. Frozen pins retain fixture strength and `transfer: not-demonstrated`; checks return `prepareOnly: true`, and selection reports `liveEligible: false`. Controlled-lane and live-trial use refuse fixture entries. Pre-handoff checks recheck the local chain, counterevidence and current screened digest/version; changed, withdrawn, missing or privacy-refused sources block the context. Note text is transient and never stored in the snapshot; empty controls invoke no source process. Retrieval-only exposes a transient guidance slot while worker context remains baseline-only. No guidance activation or session launch is added. [Schema, reviewed lesson chain and preparation limits](docs/design/harness-experience.md) describe the full boundary.
524
+
346
525
  ## Console workflow
347
526
 
348
527
  Register only studies the console should read; ares never scans the disk:
@@ -358,7 +537,9 @@ ares console remove /absolute/path/to/study
358
537
 
359
538
  The bounded version-1 registry is `$AGENTHUB_HOME/research/studies.json` (at most 200 absolute/canonical study directories, private 0600 file in a 0700 directory). Add requires a readable study; add/remove are idempotent. A moved or unreadable study remains registered and appears as `unavailable`, with its restore reason. Remove can use its listed path without reopening the study.
360
539
 
361
- The API-1 plugin supplies `studies` and `study` panels, plus inbox items for pending gates, still-new recorded watch candidates with the current display rubric, proposed skills, open review findings, failed/unknown attempts and unavailable studies. A truncated watch receipt produces an event-timed overflow notice rather than guessing provenance for unrecorded ids. Partially unreadable records produce an alert instead of false zero counts; empty stores and unfinished optional phases are normal. The study view links only the fresh built manuscript (at most 2 MiB) as `text/plain`; ares generates no PDF or figures. Reads stay in process, with no search, container or plan-control subprocess.
540
+ The API-1 plugin supplies `studies`, `study`, `lineage` and `compare` panels, plus inbox items for pending gates, still-new recorded watch candidates with the current display rubric, proposed skills, open review findings, failed/unknown attempts and unavailable studies. A truncated watch receipt produces an event-timed overflow notice rather than guessing provenance for unrecorded ids. Partially unreadable records produce an alert instead of false zero counts; empty stores and unfinished optional phases are normal. The study view links only the fresh built manuscript (at most 2 MiB) as `text/plain`; ares generates no PDF or figures. Reads stay in process, with no search, container or plan-control subprocess.
541
+
542
+ The study detail's Lineage and Compare buttons open local read-only views. Lineage rows preserve typed native ids, revisions and hashes; relationship rows show their source proof. Current, historical, corrupt, missing and not-read states stay explicit. Continue with Next lineage page, or restart when the source snapshot changes; capped graphs remain partial. Graph pagination uses its own opaque cursor, separate from the console polling cursor. Compare accepts one to eight attempt ids or full candidate commits, keeps failed/unknown attempts and retry ancestry visible, and shows original metrics, units, code/protocol hashes, artifact digests, recorded wall milliseconds and output bytes. Unmeasured cost dimensions remain unknown. Aggregation is unavailable and never performed; the panels create no winner, result receipt, gate decision or recovery action. Existing closed investigation and fresh final results remain the authorities.
362
543
 
363
544
  Every console write first returns a write-free preview and fingerprint. Confirmation recomputes the selected study and bound content under the existing command lock and refuses drift. The wire ids are `gate.approve`, `gate.reject`, `screen.include`, `screen.exclude`, `skill.accept`, `skill.reject`, `skill.withdraw` and `archive.confirm`. The id selects the decision; there is no separate page-supplied decision field. Rejections and screening/skill decisions require reasons; skill acceptance also requires the reviewed HTTP(S) PR URL. The ledger actor is the person, with verified `meta.identity` when the console supplies it; page actor/meta fields and other unsupported action fields are refused. A read-only console (`acon serve --read-only`) refuses actions before invoking the plugin.
364
545
 
@@ -401,7 +582,7 @@ ares plan show plan-study --json
401
582
 
402
583
  `run` exits 0 when the plan is done. Each controller start restores an unfinished plan paused; resume it explicitly from another terminal or MCP client. SIGINT/SIGTERM stops admission, drains active command calls, records paused when still running, and releases the controller lock. Detached attempts stay alive for `attempt reconcile`. A live or foreign controller owner is refused; a dead same-host owner is recoverable by pid and process start identity, never by lock age. Waiting observations use 1 s to 30 s backoff, reset on progress, and unchanged polls write nothing.
403
584
 
404
- Plan definitions accept at most 128 nodes, 512 explicit edges and 128-byte ids, with no cycles or missing dependency endpoints. `needs` and `edges` both supply dependencies; a gate's `binds` may name only upstream nodes. A step command is one of `lit.search`, `lit.verify`, `lit.bib`, `cite.check`, `attempt.run`, `investigate.close`, `ablate.close`, `final.close`, `paper.build`, `watch.run`. Close/build and `watch.run` steps take no args. `watch.run` uses the saved watch synchronously and emits the completed `{added}` count; every-source failure records the run and fails the node. Named `args` carry CLI options without `--`, including `year-from`; positional inputs are `query` for search, optional `ids` for verify, and `draft` for cite check. `attempt.run` needs `repo` and `commit`, always detaches, and accepts the existing seed/run/label/retry options. Steps refuse controller-owned `json` and `detach` arguments. Relative `repo` and `draft` resolve against the study directory. Scope, screen and design prerequisites still apply to the underlying commands.
585
+ Plan definitions accept at most 128 nodes, 512 explicit edges and 128-byte ids, with no cycles or missing dependency endpoints. `needs` and `edges` both supply dependencies; a gate's `binds` may name only upstream nodes. A step command is one of `lit.search`, `lit.verify`, `lit.bib`, `cite.check`, `attempt.run`, `investigate.close`, `ablate.close`, `final.close`, `paper.build`, `watch.run`. Close/build and `watch.run` steps take no args. `watch.run` uses the saved watch synchronously and emits the completed `{added}` count; every-source failure records the run and fails the node. Named `args` carry CLI options without `--`, including `year-from`; positional inputs are `query` for search, optional `ids` for verify, and `draft` for cite check. `attempt.run` needs `repo` and `commit`, always detaches, and accepts seed/run/label/retry plus the reuse/force-fresh controls described above. Steps refuse controller-owned `json` and `detach` arguments. Relative `repo` and `draft` resolve against the study directory. Scope, screen and design prerequisites still apply to the underlying commands.
405
586
 
406
587
  `--parallel` admits 1..8 step nodes (default 1); the existing one-active-attempt-per-study rule still applies. Plan state is replayed from ledger events. `plan show` is lock-free and lists each node's current status, last observation, attempt/retry/task references, gate decisions, uncertain nodes and controller owner. It also shows `hubProject` when a hub read resolves a board.
407
588
 
@@ -421,6 +602,24 @@ The planner drafts that campaign and a person approves/activates it in agent-hub
421
602
 
422
603
  A ready hub node records its unit's child task id and waits for that task's approval. Pending campaign approval or activation waits without a manual retry. An initial read outage may leave the dispatch unbound until its first successful read; the task is then pinned for that plan revision, including across restarts and retries. Missing units/tasks, cancelled tasks and a different binding fail with the reason. A new plan revision can bind the unit's new task. Hub waits use the controller backoff, do not consume step slots, and do not redispatch agent work. Their completed output is an id/hash reference, so a downstream plan gate can bind to it.
423
604
 
605
+ ## Execution lineage
606
+
607
+ Read local execution references and their recorded relationships with `ares lineage show <dir> --json`. Focus the read with `--root KIND --id ID`; optional `--revision REV` and `--sha256 HASH` preserve the exact source address. The CLI supplies the current study's project key. `--cursor CURSOR` continues the same source snapshot; restart from the first page after source bytes change. Pages contain at most 100 nodes, 200 edges and 256 KiB, with explicit unavailable, changed or capped results instead of a claim of complete provenance.
608
+
609
+ `ares lineage compare <dir> --attempts ID,... --json` selects up to eight existing attempts. Alternatively, `--candidates COMMIT,...` selects up to eight full commits from the closed investigation. The flags are mutually exclusive. Rows retain failed and unknown outcomes, retry relationships, original metrics and source hashes. Retries are not independent samples. The result exposes `aggregation.compatible` and its reasons, with `aggregation.available: false` even for compatible rows. Comparison performs no new arithmetic aggregation and supplies no new winner or verdict; current closed investigation, selection and fresh final results remain the authorities.
610
+
611
+ MCP exposes the same reads as `ares_lineage_show({study, root?, cursor?})` and `ares_lineage_compare({study, attempts?, candidates?})`. An MCP root is a local `ExecutionReferenceV1` with `v: 1`, `tool: "ares"`, `projectKey`, `kind`, native `id`, and optional `revision`/`sha256`. Both tools are read-only and closed-world. Reads do not acquire study locks, repair files, read executor output bodies, contact a hub or executor, or start network requests. Source receipts can remain historical or unavailable; an artifact digest is not proof that its bytes are retained. Synthetic fixture checks establish surface parity only, with no measured diagnosis or usability benefit claimed.
612
+
613
+ ## Evaluation fixtures and treatment evidence
614
+
615
+ The repository preregisters synthetic Diagnose, Reuse and Supervision comparisons and preserves the frozen corpus, thresholds and T2a baseline receipts. These developer scripts are separate from product study results. The read-only `bun scripts/execution-eval.ts integration-check` verifies the seal and committed code binding and reports all 36 frozen cases; it launches no treatment arm, writes no receipt and reports zero treatment observations.
616
+
617
+ Diagnose has a read-only adapter to the actual lineage/comparison readers. The separate Reuse r2 amendment rematerializes sources from frozen source workloads with setup costs recorded separately; it supersedes the original opaque-byte source setup without changing the v1 corpus or seal. Supervision consumes the producer-owned snapshot pinned to agent-hub#1221 at `a470ebbd5d809e421c6fc82fab8a69434c1b2e08`. The original v1 Supervision inputs remain unsupported; a separately sealed v2 corpus supplies twelve T1-fact inputs and intent labels. Check-only integration and freeze/verify modes launch no treatment trial and create no product result authority. The v2 intent join counts present wrong/false proposals independently of absent-action coverage; the current snapshot cannot establish correct non-triggers.
618
+
619
+ Authorized CPU-only synthetic T3 trials are now recorded in the [measured treatment report](docs/verification/execution-eval-t3-report.md), with fresh controls for Diagnose and Reuse, immutable receipts and full denominators. Diagnose remains insufficient evidence: parity is by construction and human time-to-find is unmeasured. Reuse is restricted rather than adopted because the eligible-compute and no-hit-overhead gates fail. Supervision is at most retained in shadow mode, insufficient for adoption; arms A and C were not executed, and the twelve changed-deliverable misses remain unrelabeled. These are harness-observed fixture results, not native isolation, human benefit or live-board evidence. The [T4 closeout](docs/verification/execution-eval-t4-status.md) records evidence hashes, defaults and remaining live-evidence gaps: lineage remains read-only utility, eligible reuse stays off by default with explicit operator opt-in and no performance/cost claim, and advisory mode remains off without separate authorization. The sealed v1/v2 corpora and r2 receipt remain unchanged.
620
+
621
+ The separate [guidance-improvement preregistration](docs/verification/harness-eval-protocol.md) includes deterministic prerecorded controls through `scripts/harness-eval.ts`. Controls, fixture conformance and metadata decoding do not establish real model behavior, transfer, native isolation or measured cost benefit. Treatment trials and native/account/model proof still need their own authorization and evidence.
622
+
424
623
  ## Study export
425
624
 
426
625
  ```sh
@@ -443,7 +642,7 @@ Paths, mounts, container ids, argv, env, image names (digests are kept), free te
443
642
 
444
643
  ## What sealed means
445
644
 
446
- The `design` gate binds the exact protocol bytes and the sorted `task/` file tree hashes, plus the raw selection file hash when present. Editing any sealed input reopens the gate. A budget-only change also reopens it, while the comparable attempt protocol hash excludes budget. The executor configuration is outside the seal; the attempt records the executor it used.
645
+ The `design` gate binds the sorted `task/` file tree hashes and optional raw selection/final-seed file hashes. V1 protocols without `inputs` retain their original exact-byte seal; v1 with inputs binds the canonical path-free identity, including input names, content hashes and stage mounts. V2 binds its canonical validated definition, including stage order, data dependencies and any reuse contracts. Editing sealed identity reopens approval; relocating the same v1 input identity does not. A budget-only change still reopens the gate, while the comparable attempt protocol hash excludes budget and input locators. The executor configuration is outside the seal; the attempt records the executor it used.
447
646
 
448
647
  Sealing and metrics are **ares-observed**: ares builds the argv and checks the observed container configuration. They are never **host-observed** or **runner-attested**. agent-hub 0.26.0 added signed receipts from a registered external runner for hub research attempts ([agent-hub#1018](https://github.com/STAIxBWLB/agent-hub/issues/1018)), so far covered by source and test-key fixtures only. Ares does not read or bind those receipts; that integration and a live registered runner are still needed before an ares attempt can be runner-attested. This seal neither attests to an untrusted host nor establishes support for a research claim.
449
648
 
@@ -532,13 +731,17 @@ Approvals use the existing CLI/MCP gate handler, record the actor and bind the c
532
731
  | `design/protocol.json` | validated experiment protocol |
533
732
  | `design/selection.json` | sealed investigation rule, when set |
534
733
  | `design/final.json` | sealed unused reserved seeds |
734
+ | `design/harness.json` | bounded harness-round declarations |
735
+ | `design/harness-stream.json`, `design/harness-experience.json` | immutable task stream and frozen body-free contexts |
535
736
  | `runs/ablate/ablate.json` | declaration rows paired with winner replication, without ranking |
536
737
  | `runs/final/final.json` | one-shot qualification, decisive attempts and all final attempts |
537
738
  | `runs/<run>/investigate.json` | deterministic winner/no-winner result, candidate rows and totals |
538
739
  | `paper/manuscript.md` | source Markdown with numeric refs and literal escapes |
740
+ | `paper/plan.json` | optional citation scopes and writing points |
539
741
  | `paper/build/manuscript.md` | rendered manuscript |
540
742
  | `paper/build/evidence.json` | versioned placeholder values, source paths/hashes and input manuscript hash |
541
743
  | `proposals/skills/<name>.md` | bounded versioned skill proposal, hash-bound to its ledger receipt |
744
+ | `proposals/lessons.json` | receipt-bound reviewed harness lesson candidates |
542
745
  | `executor.json` | executor kind, optional SSH alias and required workdir |
543
746
  | `runs/<run>/attempts/<id>.json` | attempt identity, stage receipts, status, metrics and artifact/log metadata |
544
747
 
@@ -550,8 +753,29 @@ The implemented CLI surface below comes from `src/commands-table.ts`; `ares --he
550
753
 
551
754
  <!-- facts:commands -->
552
755
  ```text
756
+ ares retention inspect <dir> [--offset N] [--limit N] [--json]
757
+ ares retention prune <dir> --file PATH|- [--confirm FINGERPRINT] [--json]
758
+ ares skill check <dir> <name> [--json]
759
+ ares harness close <dir> <round> --file PATH|- [--confirm FINGERPRINT] [--json]
760
+ ares harness contrast <dir> <round> --file PATH|- [--json]
761
+ ares harness compose <dir> <round> --file PATH|- [--json]
762
+ ares harness adopt <dir> <round> --file PATH|- [--confirm FINGERPRINT] [--json]
763
+ ares harness stream set <dir> --file PATH|- [--json]
764
+ ares harness stream show <dir> [--json]
765
+ ares experience select <dir> --file PATH|- [--json]
766
+ ares experience freeze <dir> --file PATH|- [--json]
767
+ ares experience check <dir> <round> --model MODEL --runtime VERSION [--toolset-sha256 HASH] [--json]
768
+ ares harness set <dir> --file PATH|- [--json]
769
+ ares harness show <dir> [--round ID] [--json]
770
+ ares harness import <dir> <round> --file FIXTURE_PATH|- [--json]
771
+ ares lineage show <dir> [--root KIND --id ID --revision REV --sha256 HASH] [--cursor CURSOR] [--json]
772
+ ares lineage compare <dir> (--attempts ID,... | --candidates COMMIT,...) [--json]
553
773
  ares autonomy show <dir> [--json]
554
774
  ares autonomy set <dir> <auto|gates|copilot|step> [--phase PHASE] [--json]
775
+ ares lesson propose <dir> --file PATH|- [--json]
776
+ ares lesson list <dir> [--json]
777
+ ares lesson check <dir> <name> [--json]
778
+ ares lesson decide <dir> <name> --file PATH|- [--json]
555
779
  ares skill propose <dir> --file PATH|- [--json]
556
780
  ares skill decide <dir> <name> <accept|reject|withdraw> --reason TEXT [--pr URL] [--json]
557
781
  ares skill list <dir> [--json]
@@ -585,27 +809,36 @@ ares final close <dir> [--json]
585
809
  ares final seeds <dir> --file PATH|- [--json]
586
810
  ares selection <dir> --file PATH|- [--json]
587
811
  ares protocol <dir> --file PATH|- [--json]
588
- ares executor set <dir> --kind local|ssh [--host ALIAS] --workdir PATH [--json]
812
+ ares executor set <dir> --kind local|ssh [--host ALIAS] --workdir PATH [--retention-cap-bytes BYTES] [--gpu-devices IDS --gpu-min-free-memory-mb MB --gpu-max-load-ratio RATIO] [--json]
813
+ ares executor inputs hash <dir> <path> [--json]
589
814
  ares executor check <dir> [--json]
590
815
  ares gate list <dir> [--json]
591
- ares gate approve <dir> <scope|screen|design|final|review|plan:node-id|accept:artifact> [--reason TEXT] [--json]
592
- ares gate reject <dir> <scope|screen|design|final|review|plan:node-id|accept:artifact> --reason TEXT [--json]
593
- ares attempt run <dir> --repo PATH --commit SHA [--seed N] [--run NAME] [--label TEXT] [--retry ID] [--detach] [--json]
816
+ ares gate approve <dir> <scope|screen|design|final|review|plan:node-id|accept:artifact|harness:round-id> [--reason TEXT] [--json]
817
+ ares gate reject <dir> <scope|screen|design|final|review|plan:node-id|accept:artifact|harness:round-id> --reason TEXT [--json]
818
+ ares attempt run <dir> --repo PATH --commit SHA [--seed N] [--run NAME] [--label TEXT] [--retry ID] [--reuse off|eligible] [--force-fresh] [--detach] [--json]
594
819
  ares attempt list <dir> [--run NAME] [--status running|succeeded|failed|cancelled|unknown] [--limit N] [--offset N] [--json]
595
820
  ares attempt show <dir> <id> [--json]
596
821
  ares attempt cancel <dir> <id> [--reason TEXT] [--json]
597
822
  ares attempt reconcile <dir> [--json]
598
- ares attempt logs <dir> <id> [--stage candidate|evaluator] [--stream stdout|stderr] [--tail BYTES] [--json]
599
- ares lit search <dir> <query> [--source openalex|s2|arxiv|all] [--limit 1..50] [--year-from YYYY] [--json]
823
+ ares attempt logs <dir> <id> [--stage candidate|evaluator] [--candidate-stage NAME] [--stream stdout|stderr] [--tail BYTES] [--json]
824
+ ares lit search <dir> <query> [--source openalex|s2|arxiv|all] [--limit 1..50] [--year-from YYYY] [--intent lexical|semantic|background] [--json]
825
+ ares lit queries <dir> [--json]
826
+ ares lit flow <dir> [--markdown] [--json]
600
827
  ares lit list <dir> [--status new|included|excluded] [--limit 1..500] [--json]
601
- ares lit screen <dir> <id>... --include|--exclude [--reason TEXT] [--json]
828
+ ares lit screen <dir> <id>... --include|--exclude [--code CODE] [--reason TEXT] [--json]
602
829
  ares lit card <dir> <id> --file PATH|- [--json]
830
+ ares lit card export <dir> <id>... --vault ID [--model-family NAME] [--confirm FINGERPRINT] [--json]
831
+ ares lit card import <dir> <id>... --vault ID [--json]
832
+ ares lit card list <dir> [--json]
603
833
  ares lit verify <dir> [<id>...] [--json]
604
834
  ares lit bib <dir> [--json]
605
835
  ares review add <dir> --file PATH|- [--json]
606
836
  ares review resolve <dir> <review-id>/<finding-id> --reason TEXT [--json]
607
837
  ares review show <dir> [--json]
838
+ ares review checklist [--json]
608
839
  ares paper build <dir> [--json]
840
+ ares paper plan set <dir> --file PATH|- [--json]
841
+ ares paper plan show <dir> [--json]
609
842
  ares paper check <dir> [--json]
610
843
  ares cite check <dir> <draft> [--json]
611
844
  ares playbook
@@ -614,22 +847,26 @@ ares mcp
614
847
  <!-- /facts:commands -->
615
848
 
616
849
  <!-- facts:mcp-tools -->
617
- The MCP server publishes 55 tools: `ares_autonomy_show`, `ares_autonomy_set`, `ares_watch_set`, `ares_watch_run`, `ares_watch_show`, `ares_console_add`, `ares_console_remove`, `ares_console_list`, `ares_setup`, `ares_manifest`, `ares_archive`, `ares_lessons`, `ares_skill_propose`, `ares_skill_decide`, `ares_skill_list`, `ares_plan_set`, `ares_plan_control`, `ares_plan_show`, `ares_status`, `ares_study_export`, `ares_scope_set`, `ares_gate`, `ares_idea_add`, `ares_idea_decide`, `ares_investigate_show`, `ares_investigate_close`, `ares_ablate_add`, `ares_ablate_show`, `ares_ablate_close`, `ares_posthoc_show`, `ares_final_close`, `ares_final_seeds`, `ares_selection_set`, `ares_protocol_set`, `ares_executor_set`, `ares_executor_check`, `ares_attempt_run`, `ares_attempt_list`, `ares_attempt_show`, `ares_attempt_cancel`, `ares_attempt_reconcile`, `ares_attempt_logs`, `ares_lit_search`, `ares_lit_list`, `ares_lit_screen`, `ares_lit_card`, `ares_lit_verify`, `ares_lit_bib`, `ares_review_add`, `ares_review_resolve`, `ares_review_show`, `ares_paper_build`, `ares_paper_check`, `ares_cite_check`, `ares_playbook`.
850
+ The MCP server publishes 85 tools: `ares_retention_inspect`, `ares_retention_prune`, `ares_lesson_propose`, `ares_lesson_list`, `ares_lesson_check`, `ares_lesson_decide`, `ares_skill_check`, `ares_harness_close`, `ares_harness_contrast`, `ares_harness_compose`, `ares_harness_adopt`, `ares_harness_stream_set`, `ares_harness_stream_show`, `ares_experience_select`, `ares_experience_freeze`, `ares_experience_check`, `ares_harness_set`, `ares_harness_show`, `ares_harness_import`, `ares_lineage_show`, `ares_lineage_compare`, `ares_autonomy_show`, `ares_autonomy_set`, `ares_watch_set`, `ares_watch_run`, `ares_watch_show`, `ares_console_add`, `ares_console_remove`, `ares_console_list`, `ares_setup`, `ares_manifest`, `ares_archive`, `ares_lessons`, `ares_skill_propose`, `ares_skill_decide`, `ares_skill_list`, `ares_plan_set`, `ares_plan_control`, `ares_plan_show`, `ares_status`, `ares_study_export`, `ares_scope_set`, `ares_gate`, `ares_idea_add`, `ares_idea_decide`, `ares_investigate_show`, `ares_investigate_close`, `ares_ablate_add`, `ares_ablate_show`, `ares_ablate_close`, `ares_posthoc_show`, `ares_final_close`, `ares_final_seeds`, `ares_selection_set`, `ares_protocol_set`, `ares_executor_set`, `ares_executor_inputs_hash`, `ares_executor_check`, `ares_attempt_run`, `ares_attempt_list`, `ares_attempt_show`, `ares_attempt_cancel`, `ares_attempt_reconcile`, `ares_attempt_logs`, `ares_lit_search`, `ares_lit_queries`, `ares_lit_flow`, `ares_lit_list`, `ares_lit_screen`, `ares_lit_card`, `ares_lit_card_export`, `ares_lit_card_import`, `ares_lit_card_list`, `ares_lit_verify`, `ares_lit_bib`, `ares_review_add`, `ares_review_resolve`, `ares_review_show`, `ares_review_checklist`, `ares_paper_plan_set`, `ares_paper_plan_show`, `ares_paper_build`, `ares_paper_check`, `ares_cite_check`, `ares_playbook`.
618
851
  <!-- /facts:mcp-tools -->
619
852
 
620
- Memory tools are `ares_archive`, `ares_lessons`, `ares_skill_propose`, `ares_skill_decide` and `ares_skill_list`; `ares_idea_decide` accepts pivot cause/retryWhen. Archive may write external amem notes; lessons reads external amem. Both carry `openWorldHint`; skill operations stay local. MCP calls preserve agent attribution even without a native shell marker.
853
+ Reviewed harness lesson tools are `ares_lesson_propose`, `ares_lesson_list`, `ares_lesson_check` and `ares_lesson_decide`; their mutations and explicit source checks share the CLI operations. Listing remains local.
854
+
855
+ Memory tools are `ares_archive`, `ares_lessons`, `ares_skill_propose`, `ares_skill_check`, `ares_skill_decide`, `ares_skill_list` and explicit `ares_experience_select`/`ares_experience_check`; `ares_idea_decide` accepts pivot cause/retryWhen. Archive may write external amem notes; lessons reads external amem. Explicit proposal/check/accept and experience reads can inspect owning screened amem sources and carry `openWorldHint`; skill list and console polling use stored local records only. MCP calls preserve agent attribution even without a native shell marker.
621
856
 
622
857
  Watch tools are `ares_watch_set` (`{study, watch}`), `ares_watch_run` and `ares_watch_show` (`{study}`). `ares_watch_run` always returns the detached admission result `{started:true,configSha256}` after config/scope/year preflight under the study lock. Read the eventual completed result through `ares_watch_show`; `watch.ran` records an all-source failure as `ok:false`. The finite pass stays in the MCP process, which can still answer ping and `tools/list`; another start while locked refuses. CLI `watch run` and the `watch.run` plan step remain synchronous. Registry tools are `ares_console_add` and `ares_console_remove` (`{study}`), and `ares_console_list` (no arguments). These use the same shared operations as the CLI. Registry commands manage local registration only; they do not start a console.
623
858
 
624
- MCP uses shared command handlers; `ares_setup` exposes the same registration preview/apply/undo operations. `init`, the controller loop `run`, and the server entrypoint `mcp` are CLI-only. Investigation tools are `ares_selection_set`, `ares_idea_add`, `ares_idea_decide`, `ares_investigate_show` and `ares_investigate_close`. Plan tools are `ares_plan_set`, `ares_plan_show` and `ares_plan_control`; `ares_gate` accepts `plan:<node-id>`. Setting, showing or controlling a plan never starts the controller loop. Start `ares run` in a separate terminal before resuming through MCP. Autonomy tools are `ares_autonomy_show` and `ares_autonomy_set`; `ares_gate` also accepts `accept:<artifact>`. `ares_study_export` writes the same bundle as `study export` and needs an absolute `bundle`. Experiment tools are `ares_protocol_set`, `ares_executor_set`, `ares_executor_check`, `ares_attempt_run`, `ares_attempt_list`, `ares_attempt_show`, `ares_attempt_cancel`, `ares_attempt_reconcile` and `ares_attempt_logs`; `ares_gate` accepts `design`, `final` and `review`. Paper/review tools are `ares_paper_check`, `ares_paper_build`, `ares_review_add`, `ares_review_resolve` and `ares_review_show`. Phase tools include `ares_final_seeds`, `ares_ablate_add`, `ares_ablate_show`, `ares_ablate_close`, `ares_final_close` and `ares_posthoc_show`. Attempt run is always detached over MCP, and executor-reaching tools carry `openWorldHint`.
859
+ MCP uses shared command handlers; `ares_setup` exposes the same registration preview/apply/undo operations. `init`, the controller loop `run`, and the server entrypoint `mcp` are CLI-only. Investigation tools are `ares_selection_set`, `ares_idea_add`, `ares_idea_decide`, `ares_investigate_show` and `ares_investigate_close`. Plan tools are `ares_plan_set`, `ares_plan_show` and `ares_plan_control`; `ares_gate` accepts `plan:<node-id>`. Setting, showing or controlling a plan never starts the controller loop. Start `ares run` in a separate terminal before resuming through MCP. Autonomy tools are `ares_autonomy_show` and `ares_autonomy_set`; `ares_gate` also accepts `accept:<artifact>`. `ares_study_export` writes the same bundle as `study export` and needs an absolute `bundle`. Experiment tools are `ares_protocol_set`, `ares_executor_set`, `ares_executor_check`, `ares_attempt_run`, `ares_attempt_list`, `ares_attempt_show`, `ares_attempt_cancel`, `ares_attempt_reconcile` and `ares_attempt_logs`; `ares_gate` accepts `design`, `final` and `review`. Paper/review tools are `ares_paper_plan_set`, `ares_paper_plan_show`, `ares_paper_check`, `ares_paper_build`, `ares_review_add`, `ares_review_resolve` and `ares_review_show`. Phase tools include `ares_final_seeds`, `ares_ablate_add`, `ares_ablate_show`, `ares_ablate_close`, `ares_final_close` and `ares_posthoc_show`. Attempt run is always detached over MCP, and executor-reaching tools carry `openWorldHint`.
625
860
 
626
861
  ## Version and format discovery
627
862
 
628
- `ares manifest --json` (MCP `ares_manifest`, no arguments) reports the running package version, implemented command names/usages and the schema versions of family-readable records. It needs no study, network or executor. Current versions are `manifest`, `ledgerEvent`, `experimentProtocol`, `executor`, `experimentAttempt`, `studyPlan`, `experimentSelection`, `investigateResult`, `experimentFinalSeeds`, `ablateResult`, `finalResult` and `paperEvidence`, all version 1, carried by each record's `v` field. `study: 2` is the latest supported study format; legacy v1 is also supported. `skillProposal: 1` is also listed; proposal Markdown carries `skillProposal: 1` frontmatter and skill events carry that version in their data. The `ledgerEvents` list advertises `archive.exported`, `skill.proposed`, `skill.decided`, `watch.set`, `watch.ran` and `autonomy.set` in the version-1 ledger envelope. The manifest also lists `studyRegistry: 1`, `watchConfig: 1` and `studyBundle: 1`; a `study export` bundle manifest carries its version as `bundle: 1` rather than `v`. Unsupported ledger/proposal/registry/watch versions are refused without rewriting their bytes. `mcp.tools` publishes `{name, readOnly}` for installers; grants are fail-closed for mutating or outside-reaching tools.
863
+ Experiment interchange advertises `experimentProtocol: 2` and `experimentAttempt: 3`. Legacy v1 protocols and attempts remain readable; fresh v2 pipelines use attempt v2, while v2 requests with eligible reuse or force-fresh use v3 with explicit control and stage receipts. Older readers refuse versions they do not support without rewriting them. The manifest also advertises retention, stage-progress, reuse and paper-plan event kinds in the existing version-1 ledger envelope; those additive events do not migrate a study or rewrite prior receipts.
864
+
865
+ `ares manifest --json` (MCP `ares_manifest`, no arguments) reports the running package version, implemented command names/usages and the schema versions of family-readable records. It needs no study, network or executor. The `formats` map reports the highest supported version for each implemented record family; older supported records are not rewritten. `paperPlan: 2` is the highest supported `paper/plan.json` format: points plans use v2, while point-free plans keep v1 without migration. Older v1-only readers refuse points plans without rewriting them. `paperEvidence: 2` supports plan-bound builds, while plan-free builds keep v1. Older evidence readers refuse v2 without rewriting it; planned studies need a compatible reader. `study: 2` is the latest supported study format; legacy v1 is also supported. `lessonProposal: 1` covers receipt-bound reviewed harness lesson candidates and `lesson.proposed`/`lesson.decided` events. `harnessStream: 1` and `harnessExperience: 1` cover the immutable stream and body-free context; their ledger events are `experience.stream.set` and `experience.frozen`. `harnessTransition: 1` covers local contrast/composition/experimental closure. `harnessRound: 1` and `harnessFixtureProjection: 1` cover the local round namespace and explicitly synthetic projections; their ledger events are `harness.round.set` and `harness.probe.declared`. `skillProposal: 2` is the latest readable proposal format; legacy v1 remains supported and new writes default to source-inspected v2 with evidence-bound acceptance; v1 bytes and terminal decisions remain unchanged. Proposal Markdown and skill events carry their own `skillProposal` version. Older readers refuse v2 with unsupported-version guidance rather than silently treating it as v1. The `ledgerEvents` list advertises `archive.exported`, `skill.proposed`, `skill.decided`, `lesson.proposed`, `lesson.decided`, `watch.set`, `watch.ran`, `autonomy.set`, `harness.round.set`, `harness.probe.declared`, `harness.contrast.recorded`, `harness.composition.recorded`, `harness.adoption.decided`, `harness.round.closed`, `experience.stream.set` and `experience.frozen` in the version-1 ledger envelope. The manifest also lists `studyRegistry: 1`, `watchConfig: 1` and `studyBundle: 1`; a `study export` bundle manifest carries its version as `bundle: 1` rather than `v`. Unsupported ledger/proposal/registry/watch versions are refused without rewriting their bytes. `mcp.tools` publishes `{name, readOnly}` for installers; grants are fail-closed for mutating or outside-reaching tools.
629
866
 
630
867
  Within a supported schema, readers preserve additive fields on study/attempt records and keep ledger events with unknown kinds. Appending to the ledger leaves prior lines intact; updating an attempt keeps unrecognized fields and stage entries. Unknown stage entries remain readable, including logs and totals, but budget-gated starts refuse with an upgrade instruction because this version cannot account for their resource use. A future schema version or unknown execution status/stage is refused with an upgrade instruction, leaving the original data unchanged. Unknown plan versions or node kinds are refused without changing plan.json. Command input remains strict so unknown options or protocol fields cannot silently change an experiment.
631
868
 
632
- The private scope/card/candidate storage and evaluator metrics object are not family interchange schemas. The console registration uses agent-console API 1 rather than an ares interchange format. Signed runner receipts, campaign contracts and vault notes are not implemented or advertised here. Setup and `--root` registration are available. See Release below for the first-publication procedure.
869
+ The private scope/card/candidate storage and evaluator metrics object are not family interchange schemas. The console registration uses agent-console API 1 rather than an ares interchange format. Signed runner receipts, campaign contracts and vault-note schemas are not ares-readable interchange formats; the explicit card-copy workflow does not add a vault resolver to lineage or skill evidence. Setup and `--root` registration are available. See Release below for the publication procedure.
633
870
 
634
871
  ## Environment
635
872
 
@@ -643,7 +880,7 @@ Keys are sent with requests only; they are never written to the study.
643
880
 
644
881
  ## Not implemented yet
645
882
 
646
- Automatic idea generation, parallel attempts, held-out evaluator data, significance tests, binding agent-hub runner receipts (agent-hub#1018) to ares attempts, automatic manuscript writing/reviewing, LaTeX/PDF builds and venue templates, claim-passage evidence pending agent-hub#931, exporting verified references as vault-mem reference notes (vault-mem 0.5.0 accepts reference metadata since vault-mem#73; the ares side is not built).
883
+ Automatic idea generation, parallel attempts, significance tests, binding agent-hub runner receipts (agent-hub#1018) to ares attempts, automatic manuscript writing/reviewing, LaTeX/PDF builds and venue templates, claim-passage evidence pending agent-hub#931, exporting verified references as vault-mem reference notes (vault-mem 0.5.0 accepts reference metadata since vault-mem#73; the ares side is not built).
647
884
 
648
885
  ## Release
649
886
 
@@ -655,7 +892,7 @@ The tag workflow first waits up to 30 minutes for the exact commit's main-push `
655
892
 
656
893
  Publication runs only when `NPM_PUBLISH_ENABLED` is `true` and a reviewer approves `npm-production`. It uses Node 24 and npm 11.5.1 or newer with [npm OIDC trusted publishing](https://docs.npmjs.com/trusted-publishers), without an npm token. The owner manages trusted-publisher settings, environment approval and branch protection requiring `ci-ok`; the scripts do not change those settings.
657
894
 
658
- N-1 compatibility is stated per minor release in CHANGELOG.md, separately for CLI, MCP tools and study/ledger formats. For 0.2.0, N-1 is 0.1.0: every 0.1.0 CLI command and usage and every 0.1.0 MCP tool with its `readOnly` value remain, and this version reads 0.1.0 studies and ledgers without rewriting them. 0.1.0 refuses records only newer features write: study v2 (object, `copilot` or `step` autonomy policies) and plans with a node `phase`, each without changing the file. The `n1` CI job (`bun scripts/n1-check.ts`), required by `ci-ok`, checks these claims on every build against the latest published patch of the minor line directly below the checkout's version (0.1.x for every 0.2 release). On the initial publication line it prints a skip.
895
+ N-1 compatibility is stated per minor release in CHANGELOG.md, separately for CLI, MCP tools and study/ledger formats. For the 0.3 minor line, N-1 remains 0.2.1: all 60 published commands/usages and 55 MCP tool names/readOnly values are retained (90 commands and 85 tools total). The installed-package check verifies unchanged reads of 0.2.1 survey/experiment studies and ledgers, and preserves a no-input protocol's hash, design binding and approved gate; 0.2.1 can also read a newly written study v2 unchanged. Its old readers refuse protocol v2, attempt v2/v3, skill-proposal v2 and paper-evidence v2, plus new fields in closed protocol/executor/scope/plan-step schemas. It has no reader for paper-plan v1/v2, harness/experience/lesson namespaces or study.toml, so ignored files do not provide routing, points or other newer checks. Use 0.3.0 for those feature semantics; supporting an old format does not promise identical readiness or safe downgrade. See the dated CHANGELOG block for the refusal/ignore distinctions. The networked n1 CI job (bun scripts/n1-check.ts), required by ci-ok, resolves the latest published patch of the previous minor line (0.2.x for every 0.3 release); it checks the stated manifest and representative read paths, not every new feature. It does not create populated attempt records, so this check alone does not verify the optional stage containerName field against 0.2.1 or safe reconciliation after a downgrade.
659
896
 
660
897
  ## Development
661
898