@staix/agent-research 0.3.1 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,54 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## [0.4.1] - 2026-11-25
6
+
7
+ Version 0.4.0 was tagged but never published to npm or GitHub Releases. Version 0.4.1 is the first published release in the 0.4 line and carries all 0.4.0 features. Its N-1 compatibility statements remain those in the 0.4.0 section below.
8
+
9
+ - The 0.4.0 tag was not published because the release smoke could not install the new runtime dependency from its empty offline cache. The smoke now pre-caches exact-pinned dependencies in isolation, then installs the staged package offline. Main CI stages and smoke-tests the package before tagging.
10
+
11
+ ## [0.4.0] - 2026-11-25
12
+
13
+ ### N-1 compatibility with 0.3.1
14
+
15
+ - **CLI** Retains all 90 published commands and their usage forms. Adds eight commands for external renders, renderer configuration, selection calibration, idea categories and the idea report. Paper check, build and render accept an optional `--doc`. Reports default to text. Use `--json` for compact machine output. Usage errors exit 2 instead of 1. Operational failures still exit 1, and command-specific help exits 0.
16
+ - **MCP tools** Retains all 85 published tool names and `readOnly` values. Adds eight tools (93 total): `ares_paper_render_record`, `ares_paper_render_show`, `ares_renderer_set`, `ares_renderer_show`, `ares_renderer_check`, `ares_selection_calibrate`, `ares_idea_categories` and `ares_idea_report`. Existing calls keep their request forms.
17
+ - **Study and ledger formats** Reads existing 0.3.1 surveys, experiments and ledgers without migration. The installed-package check verifies read-only access, the original no-input protocol hash, design binding and approved gate, and a 0.4.0-created study v2 that 0.3.1 reads unchanged. New optional fields and derived files require a compatible reader for their full behavior.
18
+
19
+ | 0.4.0 change | What 0.3.1 does |
20
+ | --- | --- |
21
+ | Paper plan v3 (dependencies and figures), paper evidence v3 (figures), selection v2, or a protocol carrying `screen` | Refuses the unsupported version or unknown field. Figure-free builds still write evidence v1 or v2. |
22
+ | A `paper.render` plan step, `[paper] requireRender`, or `[review] readback` | Refuses the unknown step or settings key when loading the corresponding record. |
23
+ | Harness contrast `presentations` or a new review input with `readback` | Refuses the extra field when validating the contrast or a review submission. Stored review replay ignores the read-back field. |
24
+ | Render receipts (v1), machine-local renderer config (v1), calibration receipts (v1), category vocabulary or slides build/render files | Ignores the new files and their capabilities. It has no document selector or renderer, calibration or category commands. It ignores the new render, calibration, screen-refusal and category event kinds. |
25
+ | New fields on idea events | Replays the events and ignores the optional fields. A closed investigation can appear stale because its input hash includes those fields in 0.4.0. |
26
+ | Slides `paper.built` event | Treats it as a manuscript build event. If it is the latest build, 0.3.1 can mark the manuscript build stale. Use 0.4.0 to read mixed-document build history. |
27
+
28
+ - Reviewer read-back (#173, ships in 0.4.0): a review report may carry an optional `readback.claims` list (1 to 8 single-line claims, at most 500 Unicode characters each) saying what the built manuscript claims. `review show` (MCP `ares_review_show`) adds `readback` (the mode), `readbacks` for current-build reports and, when the plan has writing points, `planClaims`. ares never matches or scores them, and they never change readiness. `study.toml` `[review] readback` is `off`, `show` (default) or `require`; `require` refuses a report without the block at `review add`. Reports without the block keep their bytes and event hashes. N-1 (0.3.1): a 0.3.1 `review add` refuses a report carrying `readback` as an unknown field, and a 0.3.1 `study.toml` reader refuses the `readback` key. A 0.3.1 `review show` still replays a ledger holding read-back reports, because stored events are read leniently.
29
+
30
+ - Idea predictions and report (#166): `idea add` accepts optional `category`, `bundle` (1..16) and `predicts` (1..4 declared metrics with `expect` and optional `minDelta`, required for `no-change` on a non-primary metric); inputs without them are stored byte-for-byte as before. `ares idea categories` (MCP `ares_idea_categories`) writes `design/idea-categories.json` and one `idea.categories.set` event; `idea add` then refuses unknown categories. `ares idea report` (MCP `ares_idea_report`, read-only, default window 5) folds the ledger and the investigation pairing into prediction outcomes, unpredicted regressions, per-category recent gain, confounded bundles, a stalled flag and untried categories. It is advisory and writes nothing. `ares manifest` adds `formats.ideaCategories: 1`, `formats.ideaReport: 1` and the event `idea.categories.set`. A 0.3.1 reader replays idea events carrying the new fields and ignores them; it has no `idea categories` or `idea report` command. Because ideas join the investigate input hash, a result closed by 0.4.0 for ideas with these fields reads as stale in 0.3.1.
31
+
32
+ - Evidence-bound slides (#164): Use paper check and paper build with --doc slides to validate paper/slides.md using the same evidence placeholders, citation checks and negative-result requirements as the manuscript. The slides use separate rendered Markdown and evidence files. For external decks, use paper render record and paper render show with --doc slides. The manuscript plan and review workflow apply to the manuscript. Existing manuscript output paths and bytes are preserved.
33
+
34
+ - Paper figures (#168): optional paper plan v3 figures bind local files under paper/ to the build. Declare each image by id, file and kind; plots need current-study card/attempt references or a written waiver, and diagrams need neither. Paper check blocks undeclared or missing assets and unresolved plot evidence. Builds record figure hashes and provenance in paper evidence v3, so changed figures reopen review and make old render receipts stale. Existing plans without figures retain their evidence bytes. Version 0.3.1 refuses plan v3 and evidence v3 with its existing unsupported-version diagnostics.
35
+
36
+ - Selection v2 (#165) adds optional paired-seed guards and a relative cost rule to investigation and reserved final qualification. `selection calibrate` and MCP `ares_selection_calibrate` record an advisory minimum delta from baseline variance or paired A/A deltas. A bound recommendation reports `belowNoise` without changing eligibility. V1 rule and result bytes are preserved. The 0.3.1 selection reader refuses v2 with its unsupported-version diagnostic.
37
+
38
+ - `paper.render` plan step (#163, new feature, ships in 0.4.0): a no-argument step runs this machine's renderer on the current build and records its receipt through the #162 render-record path. It emits the rendered output `{sha256}` for a downstream `plan:<id>` gate. `ares renderer set|show|check` (MCP `ares_renderer_set|show|check`) keep the renderer argv (with `{study}` and `{out}` placeholders) and wall time under the family home, never in `plan.json` or a committed study file. No renderer, a nonzero exit, a timeout or a missing or mismatching receipt fails the step and writes nothing. An unchanged retry is a no-op. `ares manifest` adds `formats.rendererConfig: 1`. Existing plans and studies are unchanged.
39
+
40
+ - CLI reports (#172): human output highlights actionable findings, summarizes checks, and presents filtered views, mutation receipts and confirmation commands. The executor human check reports independent failures and skipped prerequisites. Attempt logs use section headings and strip terminal controls in text mode. Explicit `--json` and MCP results retain their existing forms and exit codes.
41
+
42
+ - Harness contrasts (#169) can declare swapped presentation orders for blinded judgments. Agreement determines the outcome and disagreement is recorded as inconclusive. The round and composition views count order-controlled records. Existing fingerprints are preserved.
43
+
44
+ - CLI help (#172): the overview groups commands by workflow. `ares help <command>` and `ares <command> --help` print the command help on stdout and exit 0. Existing command forms remain available.
45
+
46
+ - CLI output standard v1 (#158): command results default to human-readable text on stdout. Use `--json` for the existing compact JSON bytes and exit status. Help, version, playbook, Markdown output, raw attempt logs and MCP framing keep their existing forms. Usage errors exit 2 (previously 1), with the diagnostic and usage on stderr. Operational errors stay on stderr with exit 1, and existing retry advice has its own stderr line. Check failures and temporary refusals keep their original exit codes and result stream.
47
+ - External render receipts (#162, new feature, ships in 0.4.0): `ares paper render record <dir> --file PATH --receipt PATH` and `paper render show` (MCP `ares_paper_render_record`, `ares_paper_render_show`) record a document rendered outside ares from the current build. The receipt format `renderReceipt: 1` is renderer-agnostic. Recording refuses unless the receipt's evidence and manuscript hashes match the current build and the file's SHA-256 matches a receipt output. The file and receipt are stored under the derived path `paper/build/render/`, so `accept:paper` is unchanged, and one `paper.rendered` event is appended. A rebuild makes an earlier render stale without deleting it. `review show` and archive preview gain a `render` field. The optional `study.toml` key `[paper] requireRender = true` makes review readiness require a current render. `study export` carries the receipt hashes and renderer identity only. `ares manifest` adds `formats.paperRender: 1` and the ledger event `paper.rendered`. Existing studies, events and results are unchanged.
48
+
49
+ - Paper plan v3 experiment dependencies (#167): `paper/plan.json` may declare up to 200 `dependencies` entries of kind `dataset`, `metric`, `baseline`, `model`, `method` or `software`, each with exactly one nonempty `cites` list of included, identifier-verified keys or a written `waiver` of at most 500 UTF-8 bytes. `paper check` then adds blocking `uncited-dependency` (no declared key occurs in manuscript prose, or a cited key is no longer included and identifier-verified) and, for experiment studies with a protocol, `undeclared-metric` (a protocol metric name with no metric dependency of the same trimmed name); `paper plan show` reports dependency coverage `{cited, waived, total}` beside routed coverage. A plan without `dependencies` checks exactly as before, and a waiver alone satisfies a metric dependency. `ares manifest` reports `paperPlan: 3`; 0.3.1 readers refuse v3 plans without rewriting them, and plan-bound evidence stays v2 unless the plan declares figures.
50
+
51
+ - Candidate screen (#170): protocol v1 and v2 accept an optional `screen`. `evaluatorInputs: true` compares the git blob ids of each input mounted only for the evaluator with the blob ids of `git ls-tree -r <commit>`, so a renamed byte copy is refused and no commit file content is read on this host; it needs a sha-1 object-format repository and refuses above 20,000 files per input. `literals` holds 1 to 64 fixed strings of 8 to 200 UTF-8 bytes searched verbatim. `attempt run` screens after the commit is resolved and before any attempt record, budget use or container starts: a hit appends `attempt.screen.refused {commit, hits:[{rule, path, line?}]}` without the matched text and refuses with the recovery step, while a clean screen is summarised in `attempt.started` as `screen:{rules, sha256}`. A protocol without `screen` keeps its hash, seal and flow, and stage protocols screen literals only because they declare no protocol inputs. Only verbatim material is caught. A 0.3.1 reader refuses a protocol carrying `screen` as an unknown field and keeps the new event kind untouched, so screened protocols need 0.4.0 or a compatible reader.
52
+
5
53
  ## [0.3.1] - 2026-11-10
6
54
 
7
55
  Finish or reconcile running attempts before downgrading to 0.3.0.
package/README.md CHANGED
@@ -57,7 +57,7 @@ ares lit bib study # writes study/refs/references.bib
57
57
  ares cite check study draft.md # exit 1 on unknown or unverified [@keys]
58
58
  ```
59
59
 
60
- `ares playbook` prints the full standalone workflow and its rules. Study commands accept `--json`; see the command list for exact usage.
60
+ `ares playbook` prints the full standalone workflow and its rules. Command results default to text. Views omit internal hashes and use relative times. Checks put findings first and list skipped executor prerequisites. Preview commands print the confirmation command for the reviewed inputs. The `lit list` table shows identifier, year, status, verification and title. Include `--json` when you need authors or abstracts. Use `--json` for compact machine output on commands that support it, `--color=auto|always|never` to control color, or `--ascii` for ASCII markers. Results go to stdout and diagnostics go to stderr. Usage errors exit 2. Run `ares --help` for the grouped overview or `ares help <command>` for usage, flags and examples.
61
61
 
62
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
63
 
@@ -153,7 +153,7 @@ ares attempt cancel experiment <id> --reason "stop this run"
153
153
 
154
154
  Executor hosts need `tar --no-xattrs` support (GNU tar >=1.27 or bsdtar). Unsupported implementations such as BusyBox tar fail with the generic "stage log collection failed" executor error; ares does not fall back to archives containing metadata.
155
155
 
156
- Create the executor workdir on that host, owned by its user with mode `0700`. The path is required and absolute; a shared `/tmp` default is not used. `executor check` reports the Docker server version, image availability and non-root uid:gid, and may pull missing images. It stores the alias, never SSH credentials.
156
+ Create the executor workdir on that host, owned by its user with mode `0700`. The path is required and absolute; a shared `/tmp` default is not used. `executor check` reports the Docker server version, image availability and non-root uid:gid, and may pull missing images. Text mode reports independent probes and marks checks with failed prerequisites as skipped. The JSON and MCP paths stop on the first failure. It stores the alias, never SSH credentials.
157
157
 
158
158
  The task contains `task.md`, evaluator entrypoint/data under `evaluator/`, and optional `rubric.md`. Use regular files only, at most 500 files and 64 MiB total; symlinks are refused. A protocol has this shape (the pinned BusyBox image below can run the synthetic shell fixtures):
159
159
 
@@ -187,6 +187,7 @@ For v1 protocols with inputs, `executor check` requires and reports Python3 on t
187
187
 
188
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
189
 
190
+ A protocol may also refuse material held out from the candidate before any attempt starts: `screen: {"evaluatorInputs": true, "literals": ["<fixed string>"]}`. `evaluatorInputs` compares the git blob ids of each input mounted only for the evaluator with the blob ids of `git ls-tree -r <commit>`, so a renamed byte copy is caught without reading any commit file content here; it needs a sha-1 object-format repository and refuses above 20,000 files per input. `literals` holds 1 to 64 fixed strings of 8 to 200 UTF-8 bytes, searched verbatim over the candidate commit's files. `attempt run` screens after the commit is resolved and before any attempt record, budget use or container exists: a hit appends `attempt.screen.refused {commit, hits: [{rule, path, line?}]}` with the rule and path only, never the matched text, and refuses with the remove-the-material-or-change-the-design step; a clean screen appears in `attempt.started` as `screen: {rules, sha256}`. Only verbatim material is caught, so transformed, compressed or paraphrased material passes. Stage protocols declare no protocol inputs and therefore screen `literals` only.
190
191
 
191
192
  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.
192
193
 
@@ -267,9 +268,13 @@ ares investigate close experiment --json
267
268
 
268
269
  `metric` must be declared in the protocol; its unit and max/min direction come from there. `minSeeds` is 1..the number of declared seeds, and `minDelta` is finite and >=0 in that unit. A new or changed rule adds its raw file hash to the design seal and reopens approval. Identical validated bytes are a no-op, so they cannot erase earlier results by moving the cutoff. Protocol edits that invalidate an existing rule refuse before writing. Studies without selection retain the original design binding and approval.
269
270
 
271
+ Selection v2 optionally sets `guards: [{metric, maxRegression}]` (up to eight distinct declared nonprimary metrics) and `cost: {metric, free, perUnit}` (one declared `min` metric). A guard compares the direction-adjusted mean change across the paired seeds. Missing measurements make the candidate ineligible. The cost rule caps relative growth against a positive baseline at `free + perUnit * delta`, using the primary paired delta. Lower cost passes this rule. The same gates apply on reserved final seeds. Rules with no optional criteria keep v1 decision semantics.
272
+
273
+ Run `ares selection calibrate experiment --from-run baseline --json` (MCP `ares_selection_calibrate`) after recording the baseline on at least three non-reserved seeds. The default uses the sample standard deviation and assumes independent arms, a conservative assumption when pairing removes shared variation. Use `--null COMMIT` for paired A/A deltas from two commits with the same recorded tree. Both methods default to `--z 2`. Calibration records `runs/<run>/calibration.json` and retains a copy by digest so recalibration does not invalidate older bindings. Add the returned SHA-256 as `calibration: {sha256}` in selection v2 to report `belowNoise` when the sealed `minDelta` falls below the recommendation. The recommendation never changes the rule or restricts eligibility.
274
+
270
275
  `investigate show` is read-only. Counting uses the selected run, current protocol hash and `attempt.started` ledger order after the latest recorded `selection.set`. Only the earliest successful attempt per commit/seed counts. Later successes, other-protocol, before-selection, undeclared-seed and missing-start attempts are listed with reasons; failed, cancelled, unknown and excluded records remain in run totals. Labels do not choose the baseline, its commit in the rule does.
271
276
 
272
- Each candidate compares its mean primary metric against the baseline on their shared successful seeds. It needs at least `minSeeds` pairs, a direction-adjusted delta strictly above zero and at least `minDelta`. Eligible candidates rank by paired delta, not raw mean, because paired seed sets can differ. An exact best-delta tie yields no winner. Other no-winner reasons are `no-baseline`, `baseline-seeds`, `no-candidate` and `below-margin`. Means are descriptive, with no significance test.
277
+ Each candidate compares its mean primary metric against the baseline on their shared successful seeds. It needs at least `minSeeds` pairs, a direction-adjusted delta strictly above zero and at least `minDelta`. Eligible candidates rank by paired delta, not raw mean, because paired seed sets can differ. An exact best-delta tie yields no winner. Other no-winner reasons are `no-baseline`, `baseline-seeds`, `no-candidate`, `below-margin` and `constraints` for guard or cost rejection. Means are descriptive, with no significance test.
273
278
 
274
279
  Close refuses while any attempt in the selected run is running, including excluded attempts. It writes `runs/<run>/investigate.json` and `investigate.closed` together. The timestamp-free result includes rule/input hashes, baseline/candidate rows, paired values and means, exclusions, totals and a winner or `null` with its reason. Closing unchanged inputs writes nothing. Show/close starts no attempt, Docker process or hub; the tests use synthetic offline records.
275
280
 
@@ -291,6 +296,17 @@ ares idea decide experiment variant-1 pivot --reason "Drop this direction" --att
291
296
 
292
297
  Pivot optionally records `--cause` and `--retry-when` (at most 2,000 UTF-8 bytes each); refine refuses these fields. Missing pivot fields export as `not recorded`. Refine adds the uniquely owned commit. Pivot refuses `--commit`, closes further decisions and keeps historical attempts and totals. Evidence is at most 200 existing, non-running, same-study attempt ids from the idea's commits; reasons are at most 2,000 bytes. An untested idea may omit `commit` when added, then omit `--attempts` for a first `refine --commit` or a pivot before testing. Once it has commits, nonempty evidence is required. Investigation rows and winner references carry the owning idea id; journal changes join the result's input hash. Survey studies refuse all selection, idea and investigate commands.
293
298
 
299
+ An idea may also declare what it expects to move. These fields are optional and older inputs stay valid:
300
+
301
+ ```json
302
+ {"id": "aug-mixup", "title": "Synthetic", "hypothesis": "Mixup helps", "commit": "<40-hex>", "category": "data", "bundle": 1,
303
+ "predicts": [{"metric": "accuracy", "expect": "improve", "minDelta": 0.01}, {"metric": "train_seconds", "expect": "no-change"}]}
304
+ ```
305
+
306
+ `predicts` holds 1..4 entries, one per declared protocol metric, with `expect` `improve`, `no-change` or `regress` in that metric's direction and an optional finite `minDelta >= 0`. A `no-change` prediction on a metric other than the selection's primary metric requires `minDelta`. `bundle` (1..16) self-declares how many independent changes the commit holds. `idea decide` cannot add or edit predictions. `ares idea categories <dir> --file PATH` writes `design/idea-categories.json` `{v:1, categories:[...]}` (1..32 names) and one `idea.categories.set` event; once it exists, `idea add` refuses an unknown category and names the declared ones. The vocabulary is a planning aid outside the design seal.
307
+
308
+ `ares idea report <dir> [--run RUN] [--window 5]` (MCP `ares_idea_report`) is read-only and advisory: it opens no gate, refuses nothing and schedules nothing. Per idea it reports the investigation's own paired delta for the latest measured commit, prediction timing and outcomes, and unpredicted regressions. A prediction counts only when its idea was added before the first attempt of any of its commits started; later ones are `post-hoc` and never scored. `improve` hits when the delta is positive and at least its `minDelta`, `regress` when negative, `no-change` when the absolute delta is below the selection `minDelta` for the primary metric or the prediction's own `minDelta` otherwise. Per category it counts ideas, measured ideas and hits, with the best primary delta of the last `window` measured ideas and `noRecentGain` when that is <= 0. Ideas with `bundle > 1` are listed under `confounded` and left out of category and search counts. The search is `stalled` when the best eligible primary delta among the last `window` measured ideas is no better than before them (or none is positive), and `untried` lists declared categories without a measured idea. Failed, cancelled and unknown attempts stay in per-idea totals.
309
+
294
310
  A conductor can put a no-argument `investigate.close` step after its agent-work hub unit, then bind a local plan gate to that result:
295
311
 
296
312
  ```json
@@ -325,7 +341,7 @@ ares final close experiment
325
341
 
326
342
  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.
327
343
 
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.
344
+ 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. A v2 rule also applies its guards and cost ceiling to the decisive pairs. `runs/final/final.json` and `final.closed` are committed together; unchanged inputs record nothing, unsupported versions are preserved.
329
345
 
330
346
  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.
331
347
 
@@ -335,6 +351,10 @@ Final here means reserved seeds, the frozen Git snapshot and the sealed evaluato
335
351
 
336
352
  ## Paper and review workflow
337
353
 
354
+ Use paper check and paper build with --doc slides to validate paper/slides.md using the same evidence placeholders, citation checks and negative-result requirements as the manuscript. The slides use separate rendered Markdown and evidence files. For external decks, use paper render record and paper render show with --doc slides. The manuscript plan and review workflow apply to the manuscript. The derived files are `paper/build/slides.md` and `paper/build/slides.evidence.json`. The slides render and its receipt go under `paper/build/slides.render/`. Slides share the existing `accept:paper` gate. The manifest lists both document names in `paperDocuments`. Slides receipts use `doc: "slides"` on the existing `paper.built` and `paper.rendered` events.
355
+
356
+ Optional paper plan v3 figures bind local files under paper/ to the build. Declare each image by id, file and kind; plots need current-study card/attempt references or a written waiver, and diagrams need neither. Paper check blocks undeclared or missing assets and unresolved plot evidence. Builds record figure hashes and provenance in paper evidence v3, so changed figures reopen review and make old render receipts stale. Each file is capped at 16 MiB, with at most 100 figures. An exact match to recorded artifact bytes is labelled `artifact`; a valid evidence pointer without a byte match is labelled `referenced`. These labels describe the source relationship.
357
+
338
358
  A4 renders Markdown from recorded evidence; it does not write a manuscript or run reviewers for you. Write `paper/manuscript.md` (at most 2 MiB) and put measured values in `{{n:REF}}` placeholders, optionally `{{n:REF|.Nf}}` with N from 0 to 6. At most 5,000 numeric and literal placeholders are allowed together. Use `{{lit:TEXT}}` for a reviewer-visible literal such as a year or cohort label. Every literal is listed by the check; it is an explicit exception, not a measured-value match.
339
359
 
340
360
  | Ref | Closed source |
@@ -351,6 +371,24 @@ ares paper check experiment --json
351
371
  ares paper build experiment --json
352
372
  ```
353
373
 
374
+ The venue-formatted document is rendered outside ares. `paper render record` stores what was rendered from which build; it never runs a renderer or judges whether the rendering is faithful:
375
+
376
+ ```sh
377
+ ares paper render record experiment --file paper.pdf --receipt receipt.json --json
378
+ ares paper render show experiment --json
379
+ ```
380
+
381
+ The receipt is `renderReceipt` v1, renderer-agnostic: `{v, tool, version, environment, evidenceSha256, manuscriptSha256, template, outputs: [{name, sha256, pages}]}`. Recording refuses before any write unless the receipt's evidence and manuscript hashes equal the current build and the file's SHA-256 equals one receipt output. The file (regular file, at most 64 MiB) and the exact receipt bytes, unknown fields included, are stored under `paper/build/render/` and one `paper.rendered` event records the hashes, size and renderer identity. That path is derived output, so `accept:paper` stays unchanged. An identical file and receipt record nothing. A newer receipt version is refused and left unchanged. A rebuild with a new evidence hash makes the render stale without deleting it. `review show` and archive preview report `render.current`. With `requireRender = true` under `[paper]` in `study.toml`, review readiness needs a current render. `study export` carries the receipt hashes and closed renderer tokens, never the document bytes. MCP uses `ares_paper_render_record` (absolute `file` and `receipt`) and `ares_paper_render_show`.
382
+
383
+ A no-argument `paper.render` plan step runs a renderer and records its receipt through the same path. The renderer command is machine-local, like the executor settings: it is stored under the family home (`$AGENTHUB_HOME/research/renderers/<study-id>.json`), never in `plan.json` or any committed study file, and a `renderer.json` in the study is refused. For agent-tex:
384
+
385
+ ```sh
386
+ ares renderer set study --command '["atex","ares","build","{study}","{out}"]' --timeout-s 600
387
+ ares renderer check study
388
+ ```
389
+
390
+ `{study}` is the study directory and `{out}` a fresh output directory outside the study, where the renderer writes the document and `receipt.json`. The step requires a current `paper build`, runs the command in the study directory with the configured wall time (default 600 s), then records the render and emits `{sha256}` of the rendered output for a downstream `plan:<id>` gate. No renderer, a nonzero exit, a timeout, or a missing or mismatching receipt fails the step with the reason and writes nothing. A retry with an unchanged build and identical output records nothing. The step starts no agent and no network request of its own; isolation is the renderer's. `renderer check` reads the configuration and looks the program up on PATH without running it. MCP uses `ares_renderer_set`, `ares_renderer_show` and `ares_renderer_check`.
391
+
354
392
  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.
355
393
 
356
394
  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:
@@ -364,7 +402,7 @@ blocking = ["citation-stack", "bare-identifier"]
364
402
 
365
403
  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.
366
404
 
367
- An optional `paper/plan.json` declares section citation scopes. Assign bibliography keys first, then provide a version-1 JSON plan, for example:
405
+ An optional `paper/plan.json` declares section citation scopes and, in version 3, the experiment dependencies the manuscript must cite or waive. Assign bibliography keys first, then provide a version-1 JSON plan, for example:
368
406
 
369
407
  ```json
370
408
  {"v":1,"sections":[{"id":"introduction","heading":"Introduction","cites":["synthetic2026"]}]}
@@ -375,7 +413,7 @@ ares paper plan set study --file routing.json
375
413
  ares paper plan show study --json
376
414
  ```
377
415
 
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.
416
+ `--file -` reads bounded JSON from stdin; MCP uses `ares_paper_plan_set` with `plan` and `ares_paper_plan_show`. Plans with neither dependencies nor writing points store `v: 1`; a plan containing any point stores `v: 2`, and a plan containing any dependency stores `v: 3`. Authoring input may omit `v`, and empty `points`/`dependencies` arrays are removed so the lower-version bytes stay unchanged. Explicit v1 with points or v1/v2 with a nonempty `dependencies` refuses; unsupported stored versions are preserved and refused. A formatted plan is at most 64 KiB, with at most 64 unique section ids/headings, 300 distinct keys per section and 200 dependencies whose ids are unique. 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 and dependency coverage cited / waived / total. Routing is declared by the caller, never generated or judged semantically by ares.
379
417
 
380
418
  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
419
 
@@ -397,7 +435,18 @@ Every occurrence is checked from its anchor to the next well-formed point anchor
397
435
 
398
436
  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
437
 
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.
438
+ A version-3 plan also declares the experiment dependencies a manuscript relies on, so results on a dataset, with a metric, against a baseline, on a base model, method or software cannot stay uncited. Each entry has a unique slug `id`, one `kind` (`dataset`, `metric`, `baseline`, `model`, `method` or `software`), a trimmed nonempty single-line `name`, and exactly one nonempty `cites` list or a written `waiver` of at most 500 UTF-8 bytes. Dependency keys pass the same included, identifier-verified and unique-key rules as section keys, and there are at most 200 entries. For example:
439
+
440
+ ```json
441
+ {"v":3,"sections":[{"id":"introduction","heading":"Introduction","cites":["synthetic2026"]}],
442
+ "dependencies":[
443
+ {"id":"ds-main","kind":"dataset","name":"synthetic benchmark","cites":["synthetic2026"]},
444
+ {"id":"m-acc","kind":"metric","name":"accuracy","waiver":"standard definition, stated in Section 4.1"}]}
445
+ ```
446
+
447
+ With `dependencies` present, `paper check` adds two blocking findings. `uncited-dependency` fires when none of an entry's keys occurs in manuscript prose, or a cited key is no longer included and identifier-verified; citing one of its keys or replacing `cites` with a `waiver` clears it. `undeclared-metric` fires in a study with a protocol when a protocol metric name has no `metric` dependency of the same trimmed name; a cited or waived metric dependency satisfies it. A plan without `dependencies` checks exactly as before, and dependencies are never inferred from the protocol or the manuscript.
448
+
449
+ Build refuses every blocking finding before writes. It commits `paper/build/manuscript.md` (rendered values), `paper/build/evidence.json` (`paperEvidence: 1` without a plan, v2 with a plan that omits figures, v3 with declared figures) 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.
401
450
 
402
451
  Have reviewers inspect the current output, evidence, literals and code-number list. Save each report and add it against the current evidence hash:
403
452
 
@@ -427,6 +476,8 @@ A finding may also carry `repair` (`edit`, `paragraph` or `section`; omitted mea
427
476
 
428
477
  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
478
 
479
+ A report may carry an optional reviewer read-back, `"readback": {"claims": [...]}`: 1 to 8 single-line claims of at most 500 Unicode characters each, saying what the built manuscript claims to show. Reviewers write the read-back from the manuscript before reading the paper plan. `review show` lists `readbacks` (review id, reviewer, model family, claims) for current-build reports and, when the plan has writing points, `planClaims` (point id and claim) so a person reads the two lists together. ares never matches or scores them, and the read-back is not a finding and never changes readiness. `study.toml` `[review] readback` is `off`, `show` (default) or `require`: `off` returns an empty `readbacks` array, `require` refuses a report without the block at `review add`. An unreadable `study.toml` keeps `show` and adds one `review-readback-settings` note under `info`. Reports without the block keep their bytes and event hashes.
480
+
430
481
  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.
431
482
 
432
483
  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.
@@ -484,7 +535,7 @@ A separate read-only library mapper accepts agent-hub public `GuidanceReadResult
484
535
 
485
536
  `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
537
 
487
- After importing admitted fixtures, use the current `transitions.fingerprint` from `ares harness show --json` in each form:
538
+ After importing admitted fixtures, use the current `transitions.fingerprint` from `ares harness show study --json` in each form:
488
539
 
489
540
  ```sh
490
541
  ares harness contrast study round-one --file contrast.json
@@ -495,7 +546,7 @@ ares harness adopt study round-one --file adoption.json
495
546
  ares harness adopt study round-one --file adoption.json --confirm CONFIRMATION_FINGERPRINT
496
547
  ```
497
548
 
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).
549
+ Contrasts distinguish deterministic-check, blinded-judgment and actor-claim provenance and cite exact admitted probe/output hashes. A blinded contrast may declare two presentations with reversed order. Agreement on the same side determines improved or regressed, two ties yield unchanged, and disagreement yields inconclusive. The view reports `orderControl` per contrast and counts per round and composition section. 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
550
 
500
551
  ## Reviewed harness lesson candidates
501
552
 
@@ -737,9 +788,11 @@ Approvals use the existing CLI/MCP gate handler, record the actor and bind the c
737
788
  | `runs/final/final.json` | one-shot qualification, decisive attempts and all final attempts |
738
789
  | `runs/<run>/investigate.json` | deterministic winner/no-winner result, candidate rows and totals |
739
790
  | `paper/manuscript.md` | source Markdown with numeric refs and literal escapes |
740
- | `paper/plan.json` | optional citation scopes and writing points |
741
- | `paper/build/manuscript.md` | rendered manuscript |
742
- | `paper/build/evidence.json` | versioned placeholder values, source paths/hashes and input manuscript hash |
791
+ | `paper/plan.json` | optional citation scopes, experiment dependencies, writing points and figures |
792
+ | `paper/slides.md` | optional source Markdown with the same evidence syntax |
793
+ | `paper/build/manuscript.md` and `paper/build/slides.md` | rendered documents |
794
+ | `paper/build/evidence.json` and `paper/build/slides.evidence.json` | separate document evidence, including figure hashes for opted-in manuscripts |
795
+ | `paper/build/render/` and `paper/build/slides.render/` | external renders and their receipts |
743
796
  | `proposals/skills/<name>.md` | bounded versioned skill proposal, hash-bound to its ledger receipt |
744
797
  | `proposals/lessons.json` | receipt-bound reviewed harness lesson candidates |
745
798
  | `executor.json` | executor kind, optional SSH alias and required workdir |
@@ -798,6 +851,8 @@ ares status <dir> [--json]
798
851
  ares study export <dir> --bundle DIR [--list] [--json]
799
852
  ares scope <dir> --file PATH|- [--json]
800
853
  ares idea add <dir> --file PATH|- [--json]
854
+ ares idea categories <dir> --file PATH|- [--json]
855
+ ares idea report <dir> [--run RUN] [--window N] [--json]
801
856
  ares idea decide <dir> <id> <refine|pivot> --reason TEXT [--attempts ID[,ID...]] [--commit SHA] [--cause TEXT] [--retry-when TEXT] [--json]
802
857
  ares investigate show <dir> [--json]
803
858
  ares investigate close <dir> [--json]
@@ -808,6 +863,7 @@ ares posthoc show <dir> [--json]
808
863
  ares final close <dir> [--json]
809
864
  ares final seeds <dir> --file PATH|- [--json]
810
865
  ares selection <dir> --file PATH|- [--json]
866
+ ares selection calibrate <dir> --from-run RUN [--null COMMIT] [--z NUMBER] [--json]
811
867
  ares protocol <dir> --file PATH|- [--json]
812
868
  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
869
  ares executor inputs hash <dir> <path> [--json]
@@ -836,10 +892,15 @@ ares review add <dir> --file PATH|- [--json]
836
892
  ares review resolve <dir> <review-id>/<finding-id> --reason TEXT [--json]
837
893
  ares review show <dir> [--json]
838
894
  ares review checklist [--json]
839
- ares paper build <dir> [--json]
895
+ ares paper build <dir> [--doc manuscript|slides] [--json]
896
+ ares paper render record <dir> --file PATH --receipt PATH [--doc manuscript|slides] [--json]
897
+ ares paper render show <dir> [--doc manuscript|slides] [--json]
898
+ ares renderer set <dir> --command JSON [--timeout-s N] [--json]
899
+ ares renderer show <dir> [--json]
900
+ ares renderer check <dir> [--json]
840
901
  ares paper plan set <dir> --file PATH|- [--json]
841
902
  ares paper plan show <dir> [--json]
842
- ares paper check <dir> [--json]
903
+ ares paper check <dir> [--doc manuscript|slides] [--json]
843
904
  ares cite check <dir> <draft> [--json]
844
905
  ares playbook
845
906
  ares mcp
@@ -847,7 +908,7 @@ ares mcp
847
908
  <!-- /facts:commands -->
848
909
 
849
910
  <!-- facts:mcp-tools -->
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`.
911
+ The MCP server publishes 93 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_idea_categories`, `ares_idea_report`, `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_selection_calibrate`, `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_render_record`, `ares_paper_render_show`, `ares_renderer_set`, `ares_renderer_show`, `ares_renderer_check`, `ares_paper_check`, `ares_cite_check`, `ares_playbook`.
851
912
  <!-- /facts:mcp-tools -->
852
913
 
853
914
  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.
@@ -856,13 +917,13 @@ Memory tools are `ares_archive`, `ares_lessons`, `ares_skill_propose`, `ares_ski
856
917
 
857
918
  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.
858
919
 
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`.
920
+ 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_selection_calibrate`, `ares_idea_add`, `ares_idea_decide`, `ares_idea_categories`, `ares_idea_report`, `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_paper_render_record`, `ares_paper_render_show`, `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`.
860
921
 
861
922
  ## Version and format discovery
862
923
 
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.
924
+ Experiment interchange advertises `experimentProtocol: 2`, `protocolScreen: 1` and `experimentAttempt: 3`. `protocolScreen: 1` covers the optional `screen` field inside protocol v1 and v2; it is a field, not a new protocol version, so a protocol without it keeps its hash and flow. 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, paper-plan and candidate-screen event kinds in the existing version-1 ledger envelope; those additive events do not migrate a study or rewrite prior receipts.
864
925
 
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.
926
+ `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: 3` is the highest supported `paper/plan.json` format: plans that declare dependencies or figures use v3. Point-only plans use v2 and legacy scope-only plans can stay v1. Older readers refuse the versions they do not support without rewriting them. `paperEvidence: 3` binds declared figures. Plan-bound builds without figures keep v2, and plan-free builds keep v1. `paperDocuments` advertises manuscript and slides. The same manifest reports `paperRender: 1`, `rendererConfig: 1`, `experimentSelection: 2`, `selectionCalibration: 1`, `ideaCategories: 1` and `ideaReport: 1`. `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.
866
927
 
867
928
  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.
868
929
 
@@ -888,14 +949,18 @@ Prepare a release on a clean release branch with `bun run release:prepare <versi
888
949
 
889
950
  Documentation stamps must be fresh before tagging. `docs/verified.json` records, for `README.md` and `src/playbook.ts` (the `ares playbook` text), the commit their prose was last checked against and the source paths it describes; edits to the stamped documents themselves are not counted as source drift. `bun run check` warns about a stale document; `bun run release:tag` and the tag workflow run `bun scripts/check-docs.mjs --require-fresh` and refuse. To restamp in the release PR, reread each stale document against the release PR's base commit on `origin/main`, fix the prose, and set its `verifiedAgainst` to that base commit (it survives the squash merge; never stamp a branch commit). Mechanical README facts (install line, command list, MCP tools) are generated: run `bun scripts/readme-facts.ts --write` after changing `package.json`, `src/commands-table.ts` or the MCP tool table.
890
951
 
952
+ The required networked CI job stages the candidate and smoke-tests it on pull requests and main pushes. The smoke fetches exact-pinned runtime dependencies into an isolated npm cache, then installs the staged tarball offline before checking the CLI, manifest and MCP.
953
+
891
954
  The tag workflow first waits up to 30 minutes for the exact commit's main-push `Check` workflow and `ci-ok` aggregate to succeed. A failed, skipped or cancelled result refuses release. It checks fresh documentation stamps, the matching package version, dated CHANGELOG and main ancestry before staging. It reuses CI rather than rerunning the full suite, then installs dependencies, stages a hash-bound tarball and runs clean-prefix CLI, manifest and MCP smoke checks on Ubuntu and macOS. Publication uses the exact validated Linux tarball with provenance. The GitHub release follows with the dated notes, tarball and hash manifest; reruns edit the existing release and replace assets, with three bounded attempts for GitHub 429/5xx errors. When the `SITE_DISPATCH_TOKEN` secret is set, the workflow then sends a `product-release` dispatch to STAIxBWLB/agent-hub-site so the family portal re-syncs; a dispatch failure does not fail the release. npm publication remains one-time; an already published version cannot be republished.
892
955
 
893
956
  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.
894
957
 
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.
958
+ N-1 for the 0.4 line is 0.3.1, the latest published patch of the 0.3 line. The installed-package check retains all 90 CLI command forms and 85 MCP tool names and `readOnly` values (98 commands and 93 tools total). It verifies representative survey and experiment reads without rewriting study or ledger bytes, preserves an existing approved no-input design, and confirms that 0.3.1 reads a newly written study v2 unchanged. The networked `n1` CI job resolves the latest published patch of the previous minor line and feeds the required `ci-ok` check. See the 0.4.0 CHANGELOG entry for newer versions and settings that 0.3.1 refuses or ignores, including how slides build events can make an older reader report a manuscript build as stale.
896
959
 
897
960
  ## Development
898
961
 
962
+ Pull requests run Ubuntu checks by default. The `ci:macos` label adds macOS, and pushes to `main` run both. CI uses Bun 1.4.4.
963
+
899
964
  ```sh
900
965
  bun install --frozen-lockfile
901
966
  bun run check # typecheck, boundary check, README facts, doc stamps, tests (no network), package dry-run
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staix/agent-research",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Research engine for the agent family: literature with verified references, study ledger and gates (ares)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,6 +11,9 @@
11
11
  "engines": {
12
12
  "bun": ">=1.4.2"
13
13
  },
14
+ "dependencies": {
15
+ "@staix/cli-output": "0.1.3"
16
+ },
14
17
  "devDependencies": {
15
18
  "@staix/agent-console": "git+https://github.com/STAIxBWLB/agent-console.git#27e4f89babc7a25df8038918d1181d0af35384e0",
16
19
  "@types/bun": "^1.3.0",