@staix/agent-research 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +137 -0
- package/README.md +356 -31
- package/package.json +4 -2
- package/src/autonomy.ts +50 -0
- package/src/cli.ts +134 -14
- package/src/commands-table.ts +43 -9
- package/src/commands.ts +244 -43
- package/src/copilot.ts +91 -0
- package/src/exp/attempts.ts +512 -69
- package/src/exp/executor.ts +235 -12
- package/src/exp/final.ts +1 -1
- package/src/exp/investigate.ts +7 -2
- package/src/exp/logs.ts +25 -12
- package/src/exp/metrics.ts +6 -5
- package/src/exp/pipeline.ts +92 -0
- package/src/exp/protocol.ts +88 -18
- package/src/exp/retention-script.ts +649 -0
- package/src/exp/retention.ts +70 -0
- package/src/exp/reuse-admission.ts +63 -0
- package/src/exp/reuse-contract.ts +48 -0
- package/src/exp/reuse-runtime.ts +87 -0
- package/src/exp/reuse.ts +87 -0
- package/src/exp/selection.ts +1 -1
- package/src/exp/snapshot.ts +3 -3
- package/src/exp/stages.ts +117 -0
- package/src/harness/experience-source.ts +34 -0
- package/src/harness/experience.ts +206 -0
- package/src/harness/hub-guidance.ts +140 -0
- package/src/harness/hub-reference.ts +18 -0
- package/src/harness/lesson-candidates.ts +162 -0
- package/src/harness/limits.ts +2 -0
- package/src/harness/privacy.ts +4 -0
- package/src/harness/receipts.ts +84 -0
- package/src/harness/rounds.ts +198 -0
- package/src/harness/transitions.ts +152 -0
- package/src/http.ts +46 -2
- package/src/lit/candidates.ts +13 -5
- package/src/lit/cards.ts +55 -4
- package/src/lit/flow.ts +82 -0
- package/src/lit/queries.ts +62 -0
- package/src/lit/watch.ts +14 -1
- package/src/manifest.ts +15 -7
- package/src/mcp-tools.ts +140 -32
- package/src/mcp.ts +6 -0
- package/src/memory/amem-show.ts +135 -0
- package/src/memory/amem.ts +3 -0
- package/src/memory/archive.ts +20 -8
- package/src/memory/evidence-local.ts +77 -0
- package/src/memory/evidence.ts +39 -0
- package/src/memory/lessons.ts +4 -2
- package/src/memory/skill-check.ts +56 -0
- package/src/memory/skill-format.ts +77 -0
- package/src/memory/skills.ts +72 -26
- package/src/memory/source-budget.ts +11 -0
- package/src/memory/vault-cards.ts +226 -0
- package/src/paper/build.ts +20 -8
- package/src/paper/check.ts +40 -12
- package/src/paper/headings.ts +39 -0
- package/src/paper/hygiene.ts +153 -0
- package/src/paper/placeholders.ts +21 -4
- package/src/paper/plan.ts +170 -0
- package/src/paper/point-evidence.ts +63 -0
- package/src/paper/points.ts +83 -0
- package/src/paper/review.ts +116 -11
- package/src/paper/scopes.ts +51 -0
- package/src/plan/controller.ts +42 -12
- package/src/plan/definition.ts +22 -6
- package/src/plan/hub.ts +6 -0
- package/src/plan/state.ts +58 -17
- package/src/playbook.ts +47 -20
- package/src/privacy.ts +9 -0
- package/src/provenance.ts +679 -0
- package/src/scope.ts +24 -3
- package/src/study-export.ts +282 -0
- package/src/study.ts +94 -26
- package/src/ui/panel.css +4 -0
- package/src/ui/panel.js +271 -9
- package/src/ui/plugin.ts +89 -17
package/README.md
CHANGED
|
@@ -2,16 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Research engine for the agent family ([agent-hub](https://github.com/STAIxBWLB/agent-hub), [agent-mem](https://github.com/STAIxBWLB/agent-mem), [vault-mem](https://github.com/STAIxBWLB/vault-mem), [agent-console](https://github.com/STAIxBWLB/agent-console)). The plan and phases are in [#1](https://github.com/STAIxBWLB/agent-research/issues/1).
|
|
4
4
|
|
|
5
|
-
This checkout implements A1 literature studies, A2 container experiments and the A3 plan DAG: an append-only ledger, approval gates, verified reference identifiers, frozen candidate snapshots, separate evaluator containers, attempt records and a resumable controller with read-only hub task references. Investigation selection, idea decisions, winner/no-winner results, declared ablations, reserved-seed final evaluation and exploratory posthoc results are available. Paper check/build and build-bound review gates render evidence-backed Markdown. A5 adds amem lesson reads/archive and a reviewed skill proposal queue. A6 adds local client setup, registered-study console panels and confirmed decisions, and finite literature watch passes. Automatic idea generation/writing/reviewing remains later work.
|
|
5
|
+
This checkout implements A1 literature studies, A2 container experiments and the A3 plan DAG: an append-only ledger, approval gates, verified reference identifiers, frozen candidate snapshots, separate evaluator containers, attempt records and a resumable controller with read-only hub task references. Investigation selection, idea decisions, winner/no-winner results, declared ablations, reserved-seed final evaluation and exploratory posthoc results are available. Paper check/build and build-bound review gates render evidence-backed Markdown. A5 adds amem lesson reads/archive and a reviewed skill proposal queue. A6 adds local client setup, registered-study console panels and confirmed decisions, and finite literature watch passes. Per-phase autonomy (`auto`, `gates`, `copilot`, `step`) sets how far each phase runs before a recorded approval, and `study export` writes a content-free dataset bundle. Automatic idea generation/writing/reviewing remains later work.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<!-- facts:install -->
|
|
10
|
+
Requires Bun 1.4.2 or newer. Install from npm:
|
|
10
11
|
|
|
11
12
|
```sh
|
|
12
13
|
bun add -g @staix/agent-research
|
|
13
14
|
ares --help
|
|
14
15
|
```
|
|
16
|
+
<!-- /facts:install -->
|
|
17
|
+
|
|
18
|
+
0.1.0 was the first npm release. v0.2.0 was tagged but never published because its release smoke failed; 0.2.1 carries the fix without moving that tag.
|
|
15
19
|
|
|
16
20
|
Or run from a checkout:
|
|
17
21
|
|
|
@@ -41,10 +45,12 @@ Setup is dry-run by default and lists config, receipt and lock paths plus the en
|
|
|
41
45
|
ares init study --question "How do research agents verify citations?"
|
|
42
46
|
ares scope study --file scope.json # question, subquestions, include, exclude, yearFrom, yearTo, maxCandidates
|
|
43
47
|
ares gate approve study scope
|
|
44
|
-
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
|
|
45
50
|
ares lit list study
|
|
46
51
|
ares lit screen study <id>... --include --reason "on topic"
|
|
47
|
-
ares lit
|
|
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
|
|
48
54
|
ares lit verify study
|
|
49
55
|
ares gate approve study screen
|
|
50
56
|
ares lit bib study # writes study/refs/references.bib
|
|
@@ -53,6 +59,12 @@ ares cite check study draft.md # exit 1 on unknown or unverified [@
|
|
|
53
59
|
|
|
54
60
|
`ares playbook` prints the full standalone workflow and its rules. Study commands accept `--json`; see the command list for exact usage.
|
|
55
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
|
+
|
|
56
68
|
## Literature watch workflow
|
|
57
69
|
|
|
58
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:
|
|
@@ -169,13 +181,64 @@ Commands are argv arrays, never shell strings. An optional `candidate.env` accep
|
|
|
169
181
|
|
|
170
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.
|
|
171
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
|
+
|
|
172
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.
|
|
173
192
|
|
|
174
193
|
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.
|
|
175
194
|
|
|
176
195
|
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.
|
|
177
196
|
|
|
178
|
-
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.
|
|
197
|
+
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.
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
On a shared Linux NVIDIA executor, admission can be enabled explicitly:
|
|
201
|
+
|
|
202
|
+
```sh
|
|
203
|
+
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
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
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.
|
|
207
|
+
|
|
208
|
+
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.
|
|
209
|
+
|
|
210
|
+
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.
|
|
211
|
+
|
|
212
|
+
## Serial stage experiments and retained outputs
|
|
213
|
+
|
|
214
|
+
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.
|
|
215
|
+
|
|
216
|
+
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.
|
|
217
|
+
|
|
218
|
+
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.
|
|
219
|
+
|
|
220
|
+
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.
|
|
221
|
+
|
|
222
|
+
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.
|
|
223
|
+
|
|
224
|
+
## Eligible stage-artifact reuse
|
|
225
|
+
|
|
226
|
+
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.
|
|
227
|
+
|
|
228
|
+
```sh
|
|
229
|
+
ares attempt run experiment --repo ./candidate --commit FULL_SHA --run investigate --reuse eligible --detach
|
|
230
|
+
ares attempt reconcile experiment
|
|
231
|
+
# New explicit attempt, with reuse if a verified source is available:
|
|
232
|
+
ares attempt run experiment --repo ./candidate --commit FULL_SHA --run investigate --reuse eligible --retry SOURCE_ID --detach
|
|
233
|
+
# Recompute instead of consuming hits:
|
|
234
|
+
ares attempt run experiment --repo ./candidate --commit FULL_SHA --run investigate --reuse eligible --force-fresh --retry SOURCE_ID --detach
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
The run must match the current selection rule. 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. Missing/pruned/corrupt/unsupported sources are reasoned misses with ordinary budget checks. GPU ABI reuse is currently unsupported and falls back to fresh execution.
|
|
238
|
+
|
|
239
|
+
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.
|
|
240
|
+
|
|
241
|
+
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.
|
|
179
242
|
|
|
180
243
|
## Investigation workflow
|
|
181
244
|
|
|
@@ -258,7 +321,7 @@ ares final close experiment
|
|
|
258
321
|
|
|
259
322
|
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.
|
|
260
323
|
|
|
261
|
-
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
|
|
324
|
+
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.
|
|
262
325
|
|
|
263
326
|
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.
|
|
264
327
|
|
|
@@ -286,9 +349,51 @@ ares paper build experiment --json
|
|
|
286
349
|
|
|
287
350
|
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.
|
|
288
351
|
|
|
352
|
+
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:
|
|
353
|
+
|
|
354
|
+
```toml
|
|
355
|
+
[paper]
|
|
356
|
+
maxGroup = 6
|
|
357
|
+
maxBundleRepeats = 2
|
|
358
|
+
blocking = ["citation-stack", "bare-identifier"]
|
|
359
|
+
```
|
|
360
|
+
|
|
289
361
|
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.
|
|
290
362
|
|
|
291
|
-
|
|
363
|
+
An optional `paper/plan.json` declares section citation scopes. Assign bibliography keys first, then provide a version-1 JSON plan, for example:
|
|
364
|
+
|
|
365
|
+
```json
|
|
366
|
+
{"v":1,"sections":[{"id":"introduction","heading":"Introduction","cites":["synthetic2026"]}]}
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
```sh
|
|
370
|
+
ares paper plan set study --file routing.json
|
|
371
|
+
ares paper plan show study --json
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
`--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.
|
|
375
|
+
|
|
376
|
+
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.
|
|
377
|
+
|
|
378
|
+
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:
|
|
379
|
+
|
|
380
|
+
```json
|
|
381
|
+
{"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"]}]}]}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Place a point's marker before its paragraph in its own planned section:
|
|
385
|
+
|
|
386
|
+
```markdown
|
|
387
|
+
## Introduction
|
|
388
|
+
<!-- point:method-boundary -->
|
|
389
|
+
Describe the boundary [@synthetic2026].
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
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.
|
|
393
|
+
|
|
394
|
+
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.
|
|
395
|
+
|
|
396
|
+
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.
|
|
292
397
|
|
|
293
398
|
Have reviewers inspect the current output, evidence, literals and code-number list. Save each report and add it against the current evidence hash:
|
|
294
399
|
|
|
@@ -314,18 +419,23 @@ ares gate approve experiment review
|
|
|
314
419
|
|
|
315
420
|
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.
|
|
316
421
|
|
|
422
|
+
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.
|
|
423
|
+
|
|
424
|
+
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.
|
|
425
|
+
|
|
317
426
|
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.
|
|
318
427
|
|
|
319
428
|
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.
|
|
320
429
|
|
|
321
430
|
## Memory and skill proposal workflow
|
|
322
431
|
|
|
323
|
-
|
|
432
|
+
Lessons and archive call the `amem` CLI on PATH (`search --json --explain`, `brief --json`, `note add - --json`). Its output parser was written against amem 0.20.3; the tests use a fake runner, so no amem version is tested live here. Start each phase with an intent-specific lesson read, then archive only at the end of the study:
|
|
324
433
|
|
|
325
434
|
```sh
|
|
326
435
|
ares lessons study --for "compare candidate hypotheses" --half-life 180 --limit 50 --json
|
|
327
436
|
ares skill propose study --file proposal.json
|
|
328
437
|
ares skill list study --json
|
|
438
|
+
ares skill check study reusable-procedure --json
|
|
329
439
|
ares skill decide study reusable-procedure accept --reason "Reviewed against recorded evidence" --pr https://github.com/example/project/pull/1
|
|
330
440
|
ares archive study --json
|
|
331
441
|
ares archive study --confirm <fingerprint> --json
|
|
@@ -333,12 +443,81 @@ ares archive study --confirm <fingerprint> --json
|
|
|
333
443
|
|
|
334
444
|
`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.
|
|
335
445
|
|
|
336
|
-
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.
|
|
446
|
+
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.
|
|
447
|
+
|
|
448
|
+
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.
|
|
449
|
+
|
|
450
|
+
`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.
|
|
451
|
+
|
|
452
|
+
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.
|
|
337
453
|
|
|
338
|
-
|
|
454
|
+
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.
|
|
455
|
+
|
|
456
|
+
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.
|
|
457
|
+
|
|
458
|
+
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.
|
|
459
|
+
|
|
460
|
+
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.
|
|
461
|
+
|
|
462
|
+
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.
|
|
339
463
|
|
|
340
464
|
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.
|
|
341
465
|
|
|
466
|
+
## Harness rounds (fixture-only)
|
|
467
|
+
|
|
468
|
+
Experiment studies can record an independent bounded improvement-round declaration without a container protocol or any model/probe launch:
|
|
469
|
+
|
|
470
|
+
```sh
|
|
471
|
+
ares harness set study --file round.json
|
|
472
|
+
ares gate approve study harness:round-one
|
|
473
|
+
ares harness import study round-one --file synthetic-probe-fixture.json
|
|
474
|
+
ares harness show study --round round-one --json
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
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.
|
|
478
|
+
|
|
479
|
+
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).
|
|
480
|
+
|
|
481
|
+
`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.
|
|
482
|
+
|
|
483
|
+
After importing admitted fixtures, use the current `transitions.fingerprint` from `ares harness show --json` in each form:
|
|
484
|
+
|
|
485
|
+
```sh
|
|
486
|
+
ares harness contrast study round-one --file contrast.json
|
|
487
|
+
ares harness compose study round-one --file composition.json
|
|
488
|
+
ares harness close study round-one --file closure.json
|
|
489
|
+
ares harness close study round-one --file closure.json --confirm CONFIRMATION_FINGERPRINT
|
|
490
|
+
ares harness adopt study round-one --file adoption.json
|
|
491
|
+
ares harness adopt study round-one --file adoption.json --confirm CONFIRMATION_FINGERPRINT
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
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).
|
|
495
|
+
|
|
496
|
+
## Reviewed harness lesson candidates
|
|
497
|
+
|
|
498
|
+
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.
|
|
499
|
+
|
|
500
|
+
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.
|
|
501
|
+
|
|
502
|
+
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.
|
|
503
|
+
|
|
504
|
+
## Frozen prior-experience context
|
|
505
|
+
|
|
506
|
+
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`:
|
|
507
|
+
|
|
508
|
+
```sh
|
|
509
|
+
ares harness stream set study --file stream.json
|
|
510
|
+
ares harness stream show study --json
|
|
511
|
+
ares experience select study --file selection.json --json
|
|
512
|
+
ares experience freeze study --file selection.json --json
|
|
513
|
+
ares experience check study round-two --model synthetic-model --runtime synthetic-runtime --json
|
|
514
|
+
# Nonempty contexts also require the matching --toolset-sha256 HASH.
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
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.
|
|
518
|
+
|
|
519
|
+
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.
|
|
520
|
+
|
|
342
521
|
## Console workflow
|
|
343
522
|
|
|
344
523
|
Register only studies the console should read; ares never scans the disk:
|
|
@@ -354,7 +533,9 @@ ares console remove /absolute/path/to/study
|
|
|
354
533
|
|
|
355
534
|
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.
|
|
356
535
|
|
|
357
|
-
The API-1 plugin supplies `studies` and `
|
|
536
|
+
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.
|
|
537
|
+
|
|
538
|
+
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.
|
|
358
539
|
|
|
359
540
|
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.
|
|
360
541
|
|
|
@@ -397,7 +578,7 @@ ares plan show plan-study --json
|
|
|
397
578
|
|
|
398
579
|
`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.
|
|
399
580
|
|
|
400
|
-
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
|
|
581
|
+
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.
|
|
401
582
|
|
|
402
583
|
`--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.
|
|
403
584
|
|
|
@@ -417,11 +598,47 @@ The planner drafts that campaign and a person approves/activates it in agent-hub
|
|
|
417
598
|
|
|
418
599
|
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.
|
|
419
600
|
|
|
601
|
+
## Execution lineage
|
|
602
|
+
|
|
603
|
+
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.
|
|
604
|
+
|
|
605
|
+
`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.
|
|
606
|
+
|
|
607
|
+
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.
|
|
608
|
+
|
|
609
|
+
## Evaluation fixtures and pending trials
|
|
610
|
+
|
|
611
|
+
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.
|
|
612
|
+
|
|
613
|
+
Diagnose has a read-only adapter to the actual lineage/comparison readers. Reuse uses the attempt/retention/fresh-evaluator path through a synthetic container seam, but the frozen cached strings cannot establish numeric producer manifests, so those cases stay fresh fallback. A separate non-frozen fixture proves byte-exact producer hits, without becoming a treatment observation. Supervision has a record consumer pinned to agent-hub#1221 at `bc6f46b077dd3a255debaee8152fa17f1f13b79c`; all 12 frozen task-state inputs are unsupported T1 rule facts. Coverage stays 0 supported / 12 unsupported, helpful/false/missed remain `null`, and person decisions stay 0. No hub rule evaluator or live hub is called. Corpus amendments and T3 launch authorization remain separate from this released v1 integration. See [the integration boundaries and pending trials](docs/verification/execution-eval-treatment-integration.md).
|
|
614
|
+
|
|
615
|
+
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.
|
|
616
|
+
|
|
617
|
+
## Study export
|
|
618
|
+
|
|
619
|
+
```sh
|
|
620
|
+
ares study export study --bundle /absolute/path/to/new-bundle --list --json
|
|
621
|
+
ares study export study --bundle /absolute/path/to/new-bundle --json
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
`study export` writes a dataset bundle from committed study files only; it never reads the executor workdir or logs. The target must be a new or empty directory outside the study (symlinks are resolved first); `--list` names the six files and writes nothing. Reads take the study lock once; files are written after it is released.
|
|
625
|
+
|
|
626
|
+
| File | Content |
|
|
627
|
+
| --- | --- |
|
|
628
|
+
| `manifest.json` | `bundle: 1`, format versions, hashed study id, protocol hash, seal binding, ledger time window, counts by status and run, and each file's sha256 |
|
|
629
|
+
| `ledger.jsonl` | event envelopes with hashed actor ids; `data` keeps only per-event-type allowlisted closed fields |
|
|
630
|
+
| `attempts.jsonl` | one row per attempt: identity hashes, seed, `labelSha256`, status, stage, reason class, per-stage exit code, duration, network, limits and image digest, metrics with provenance, output hashes and sealing booleans |
|
|
631
|
+
| `results.json` | receipt-verified closed investigate, ablate and final results reduced to numbers, booleans, hashes, closed tokens and metric identifiers |
|
|
632
|
+
| `reviews.jsonl` | reviewer model family, build hash, finding kinds and counts, blocking count and resolutions |
|
|
633
|
+
| `evidence.json` | placeholder ref hashes, families, attempt bindings and source hashes |
|
|
634
|
+
|
|
635
|
+
Paths, mounts, container ids, argv, env, image names (digests are kept), free text and malformed identity fields are dropped. Metric names/units and the selection metric stay because the dataset needs them to read values. Every key and string value is then scanned; an absolute POSIX/Windows/UNC path, URL, `NAME=value` assignment or key-like token refuses the whole export, and nothing is written. Each file is bound-checked in memory first.
|
|
636
|
+
|
|
420
637
|
## What sealed means
|
|
421
638
|
|
|
422
|
-
The `design` gate binds the
|
|
639
|
+
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.
|
|
423
640
|
|
|
424
|
-
Sealing and metrics are **ares-observed**: ares builds the argv and checks the observed container configuration. They are never **host-observed** or **runner-attested**.
|
|
641
|
+
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.
|
|
425
642
|
|
|
426
643
|
## What the checks mean
|
|
427
644
|
|
|
@@ -434,6 +651,63 @@ Sealing and metrics are **ares-observed**: ares builds the argv and checks the o
|
|
|
434
651
|
|
|
435
652
|
`scope` binds to the content of `scope.json`; `screen` binds to the set of included papers; `design` binds the experiment protocol and task tree, plus selection/final-seeds files when present; `final` binds closed upstream results and design; `review` binds the current rendered/evidence hashes and current-build review/resolution event hashes; `plan:<node-id>` binds a plan gate to all upstream observed output references. Changing bound content returns its gate to pending. With `--autonomy auto` a pending gate is approved as `auto` when a command needs it; with `gates` (default) someone must run `ares gate approve`. The ledger records who approved: a person, an agent (detected from the agent environment) or `auto`. Which of them may approve is the workspace's policy, not the tool's. For experiments, automatic design and final approval is committed with a verified candidate start; a failed preparation records no approval. The review gate is approved explicitly after its readiness conditions pass; no current command auto-requires it.
|
|
436
653
|
|
|
654
|
+
### Autonomy policy
|
|
655
|
+
|
|
656
|
+
`ares autonomy show <dir> --json` reads the stored policy and effective mode for every phase. `ares autonomy set <dir> <auto|gates|copilot|step> [--phase PHASE]` changes the default or one override in a single study/ledger commit. The event records the actor, the complete `from` and `to` policies, and `phase` (null for a default change). A default change retains existing overrides. Earlier gate approvals and rejections are kept; policy changes do not re-decide them.
|
|
657
|
+
|
|
658
|
+
```sh
|
|
659
|
+
ares autonomy set study gates
|
|
660
|
+
ares autonomy set study auto --phase literature
|
|
661
|
+
ares autonomy show study --json
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
Phases are `scope`, `literature`, `hypotheses`, `design`, `investigate`, `ablate`, `final`, `posthoc`, `write`, `review` and `archive`. Only `auto` approves pending gates automatically; `gates`, `copilot` and `step` require recorded approval. Step execution and copilot draft acceptance are described below. Approval authority remains workspace policy, with no person-only restriction.
|
|
665
|
+
|
|
666
|
+
| Gate | Phase |
|
|
667
|
+
| --- | --- |
|
|
668
|
+
| `scope` | `scope` |
|
|
669
|
+
| `screen` | `literature` |
|
|
670
|
+
| `design` | `design` |
|
|
671
|
+
| `final` | `final` |
|
|
672
|
+
| `review` | `review` |
|
|
673
|
+
| `accept:hypotheses` | `hypotheses` |
|
|
674
|
+
| `accept:paper` | `write` |
|
|
675
|
+
| `accept:reviews` | `review` |
|
|
676
|
+
| `plan:<id>` | The declared phase shared by every guarded immediate downstream node; otherwise the study default |
|
|
677
|
+
|
|
678
|
+
Plan nodes may declare `phase` from the same list. Dependencies through `needs` and explicit edges both identify guarded downstream nodes. Mixed phases, any undeclared target, no targets or a hub target use the study default; a gate's own `phase` is not a substitute, and command/run names are not inferred. Phase edits participate in node staleness; changing policy does not invalidate already-approved gates. The controller reloads policy inside each approval transaction.
|
|
679
|
+
|
|
680
|
+
With an effective `step` policy, the CLI controller keeps step work exclusive even with `--parallel` greater than 1. For effect nodes (step and hub), every terminal outcome (`done`, `failed`, `cancelled`, `uncertain`, including reconciliation) and its `plan.paused` receipt (`reason: step`) are committed together when work remains. Gate approvals do not consume a step. When no work remains, the plan finishes `done` or `failed` without a pause or acknowledgement resume; a failed terminal plan makes `ares run` exit nonzero. `ares plan show` exposes `pauseReason: step`; that pause survives controller restart, and unchanged observation polls do not append receipts. Detached attempt admission is not completion: the pause follows the observed terminal result. Gates in a step phase still require approval, with no automatic grant.
|
|
681
|
+
|
|
682
|
+
Use `ares plan control <dir> resume --command-id <new-id> --expected-revision <revision>` to continue. A resume through CLI or MCP changes the same durable plan state; MCP does not start a controller. The controller must already be running via `ares run` to admit work. Mode and phase are read again inside admission and completion transactions, so pending work follows the current recorded policy. Manual-only pending gate polls do not take a study lock.
|
|
683
|
+
|
|
684
|
+
Legacy `auto|gates` string studies retain study v1 and their existing JSON layout. Object policies (`{default, phases}`), `copilot` and `step` require study v2. Once a study is v2, later policy changes never downgrade it. This reader supports v1 and v2; the published 0.1.0 reader rejects v2 with its unsupported-version guidance and leaves the file untouched. Plan `phase` is an optional v1 field: phase-free plans keep their previous shape, while the older strict 0.1.0 plan reader rejects a declared phase without changing the file.
|
|
685
|
+
|
|
686
|
+
### Copilot draft acceptance
|
|
687
|
+
|
|
688
|
+
A copilot phase produces drafts until an ordinary `accept:<artifact>` gate approves their current content hash. There are three aggregate artifacts; the guard is enabled by the **producing** phase's mode, not the consuming phase. `auto`, `gates` and `step` do not enable these guards. New studies still default to `gates`, with no implicit copilot override or automatic drafting.
|
|
689
|
+
|
|
690
|
+
| Artifact gate and phase | Producer and content | Guarded consumers |
|
|
691
|
+
| --- | --- | --- |
|
|
692
|
+
| `accept:hypotheses`, `hypotheses` | Optional `hypotheses.md` plus the complete `idea.added`/`idea.decided` journal, produced by source edits and `idea add`/`idea decide` | `protocol`, attempt admission (all runs and plan preparation), `investigate close`, the closed-investigation reader used by ablate/final trusted-source paths, `paper build`, archive preview/export |
|
|
693
|
+
| `accept:paper`, `write` | Manuscript source files under `paper/`, including notes/assets; `paper/build/` is derived and excluded | `review add`, `review resolve`, review readiness/approval, archive preview/export |
|
|
694
|
+
| `accept:reviews`, `review` | Complete `review.added`/`review.resolved` journal across all builds, produced by `review add`/`review resolve` | Review readiness/approval, archive preview/export |
|
|
695
|
+
|
|
696
|
+
Source edits or new relevant journal records make the prior accept stale (the gate becomes pending for its new hash). Gate decisions and unrelated ledger entries are excluded from artifact hashes, so approval never invalidates itself. Rebuilding or repairing `paper/build/` does not stale `accept:paper`; existing fresh-build, citation, number and review-readiness checks still apply. Acceptance is a workflow checkpoint, not scientific verification or a way to clear blocking findings.
|
|
697
|
+
|
|
698
|
+
```sh
|
|
699
|
+
ares autonomy set study copilot --phase write
|
|
700
|
+
# Author or edit paper/manuscript.md and any source assets.
|
|
701
|
+
ares paper check study
|
|
702
|
+
ares paper build study
|
|
703
|
+
ares gate list study
|
|
704
|
+
ares gate approve study accept:paper
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
In-phase editing and own-draft diagnostics remain usable before acceptance: idea edits/list, paper check/build and review edits/show do not require accepting the artifact they produce. A build still consumes accepted hypotheses when that producing phase is copilot; review edits consume accepted paper source. Diagnostics that cannot use an unaccepted trusted source report the required gate and approval command. Plan adapters preserve the same refusal guidance and do not prepare an attempt backend before hypotheses acceptance.
|
|
708
|
+
|
|
709
|
+
Approvals use the existing CLI/MCP gate handler, record the actor and bind the current hash. No agent/person exemption or person-only restriction is added, and accepts are never implicit auto approvals. Source reads are bounded: hypotheses Markdown at most 2 MiB; paper source at most 500 regular files, 64 MiB total, 1000 directories and 64 levels. Source links and special files are refused. Existing study-v2 copilot policy and version-1 gate/ledger records carry the feature; no new draft store or interchange format is introduced.
|
|
710
|
+
|
|
437
711
|
## Study files
|
|
438
712
|
|
|
439
713
|
| File | Content |
|
|
@@ -451,13 +725,17 @@ Sealing and metrics are **ares-observed**: ares builds the argv and checks the o
|
|
|
451
725
|
| `design/protocol.json` | validated experiment protocol |
|
|
452
726
|
| `design/selection.json` | sealed investigation rule, when set |
|
|
453
727
|
| `design/final.json` | sealed unused reserved seeds |
|
|
728
|
+
| `design/harness.json` | bounded harness-round declarations |
|
|
729
|
+
| `design/harness-stream.json`, `design/harness-experience.json` | immutable task stream and frozen body-free contexts |
|
|
454
730
|
| `runs/ablate/ablate.json` | declaration rows paired with winner replication, without ranking |
|
|
455
731
|
| `runs/final/final.json` | one-shot qualification, decisive attempts and all final attempts |
|
|
456
732
|
| `runs/<run>/investigate.json` | deterministic winner/no-winner result, candidate rows and totals |
|
|
457
733
|
| `paper/manuscript.md` | source Markdown with numeric refs and literal escapes |
|
|
734
|
+
| `paper/plan.json` | optional citation scopes and writing points |
|
|
458
735
|
| `paper/build/manuscript.md` | rendered manuscript |
|
|
459
736
|
| `paper/build/evidence.json` | versioned placeholder values, source paths/hashes and input manuscript hash |
|
|
460
737
|
| `proposals/skills/<name>.md` | bounded versioned skill proposal, hash-bound to its ledger receipt |
|
|
738
|
+
| `proposals/lessons.json` | receipt-bound reviewed harness lesson candidates |
|
|
461
739
|
| `executor.json` | executor kind, optional SSH alias and required workdir |
|
|
462
740
|
| `runs/<run>/attempts/<id>.json` | attempt identity, stage receipts, status, metrics and artifact/log metadata |
|
|
463
741
|
|
|
@@ -467,7 +745,31 @@ Experiment logs and outputs live on the executor at `<workdir>/<study-id>/<attem
|
|
|
467
745
|
|
|
468
746
|
The implemented CLI surface below comes from `src/commands-table.ts`; `ares --help` prints current usage. Every operation exposing `--json` supports structured output.
|
|
469
747
|
|
|
748
|
+
<!-- facts:commands -->
|
|
470
749
|
```text
|
|
750
|
+
ares retention inspect <dir> [--offset N] [--limit N] [--json]
|
|
751
|
+
ares retention prune <dir> --file PATH|- [--confirm FINGERPRINT] [--json]
|
|
752
|
+
ares skill check <dir> <name> [--json]
|
|
753
|
+
ares harness close <dir> <round> --file PATH|- [--confirm FINGERPRINT] [--json]
|
|
754
|
+
ares harness contrast <dir> <round> --file PATH|- [--json]
|
|
755
|
+
ares harness compose <dir> <round> --file PATH|- [--json]
|
|
756
|
+
ares harness adopt <dir> <round> --file PATH|- [--confirm FINGERPRINT] [--json]
|
|
757
|
+
ares harness stream set <dir> --file PATH|- [--json]
|
|
758
|
+
ares harness stream show <dir> [--json]
|
|
759
|
+
ares experience select <dir> --file PATH|- [--json]
|
|
760
|
+
ares experience freeze <dir> --file PATH|- [--json]
|
|
761
|
+
ares experience check <dir> <round> --model MODEL --runtime VERSION [--toolset-sha256 HASH] [--json]
|
|
762
|
+
ares harness set <dir> --file PATH|- [--json]
|
|
763
|
+
ares harness show <dir> [--round ID] [--json]
|
|
764
|
+
ares harness import <dir> <round> --file FIXTURE_PATH|- [--json]
|
|
765
|
+
ares lineage show <dir> [--root KIND --id ID --revision REV --sha256 HASH] [--cursor CURSOR] [--json]
|
|
766
|
+
ares lineage compare <dir> (--attempts ID,... | --candidates COMMIT,...) [--json]
|
|
767
|
+
ares autonomy show <dir> [--json]
|
|
768
|
+
ares autonomy set <dir> <auto|gates|copilot|step> [--phase PHASE] [--json]
|
|
769
|
+
ares lesson propose <dir> --file PATH|- [--json]
|
|
770
|
+
ares lesson list <dir> [--json]
|
|
771
|
+
ares lesson check <dir> <name> [--json]
|
|
772
|
+
ares lesson decide <dir> <name> --file PATH|- [--json]
|
|
471
773
|
ares skill propose <dir> --file PATH|- [--json]
|
|
472
774
|
ares skill decide <dir> <name> <accept|reject|withdraw> --reason TEXT [--pr URL] [--json]
|
|
473
775
|
ares skill list <dir> [--json]
|
|
@@ -481,12 +783,13 @@ ares console add <dir> [--json]
|
|
|
481
783
|
ares console remove <dir> [--json]
|
|
482
784
|
ares console list [--json]
|
|
483
785
|
ares manifest [--json]
|
|
484
|
-
ares init <dir> --question TEXT [--mode survey|experiment] [--autonomy auto|gates] [--json]
|
|
786
|
+
ares init <dir> --question TEXT [--mode survey|experiment] [--autonomy auto|gates|copilot|step] [--json]
|
|
485
787
|
ares run <dir> [--parallel 1..8] [--json]
|
|
486
788
|
ares plan set <dir> --file PATH|- [--json]
|
|
487
789
|
ares plan control <dir> <pause|resume|retry|cancel|skip> [node] --command-id ID --expected-revision N [--json]
|
|
488
790
|
ares plan show <dir> [--json]
|
|
489
791
|
ares status <dir> [--json]
|
|
792
|
+
ares study export <dir> --bundle DIR [--list] [--json]
|
|
490
793
|
ares scope <dir> --file PATH|- [--json]
|
|
491
794
|
ares idea add <dir> --file PATH|- [--json]
|
|
492
795
|
ares idea decide <dir> <id> <refine|pivot> --reason TEXT [--attempts ID[,ID...]] [--commit SHA] [--cause TEXT] [--retry-when TEXT] [--json]
|
|
@@ -500,46 +803,64 @@ ares final close <dir> [--json]
|
|
|
500
803
|
ares final seeds <dir> --file PATH|- [--json]
|
|
501
804
|
ares selection <dir> --file PATH|- [--json]
|
|
502
805
|
ares protocol <dir> --file PATH|- [--json]
|
|
503
|
-
ares executor set <dir> --kind local|ssh [--host ALIAS] --workdir PATH [--json]
|
|
806
|
+
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]
|
|
807
|
+
ares executor inputs hash <dir> <path> [--json]
|
|
504
808
|
ares executor check <dir> [--json]
|
|
505
809
|
ares gate list <dir> [--json]
|
|
506
|
-
ares gate approve <dir> <scope|screen|design|final|review|plan:node-id> [--reason TEXT] [--json]
|
|
507
|
-
ares gate reject <dir> <scope|screen|design|final|review|plan:node-id> --reason TEXT [--json]
|
|
508
|
-
ares attempt run <dir> --repo PATH --commit SHA [--seed N] [--run NAME] [--label TEXT] [--retry ID] [--detach] [--json]
|
|
810
|
+
ares gate approve <dir> <scope|screen|design|final|review|plan:node-id|accept:artifact|harness:round-id> [--reason TEXT] [--json]
|
|
811
|
+
ares gate reject <dir> <scope|screen|design|final|review|plan:node-id|accept:artifact|harness:round-id> --reason TEXT [--json]
|
|
812
|
+
ares attempt run <dir> --repo PATH --commit SHA [--seed N] [--run NAME] [--label TEXT] [--retry ID] [--reuse off|eligible] [--force-fresh] [--detach] [--json]
|
|
509
813
|
ares attempt list <dir> [--run NAME] [--status running|succeeded|failed|cancelled|unknown] [--limit N] [--offset N] [--json]
|
|
510
814
|
ares attempt show <dir> <id> [--json]
|
|
511
815
|
ares attempt cancel <dir> <id> [--reason TEXT] [--json]
|
|
512
816
|
ares attempt reconcile <dir> [--json]
|
|
513
|
-
ares attempt logs <dir> <id> [--stage candidate|evaluator] [--stream stdout|stderr] [--tail BYTES] [--json]
|
|
514
|
-
ares lit search <dir> <query> [--source openalex|s2|arxiv|all] [--limit 1..50] [--year-from YYYY] [--json]
|
|
817
|
+
ares attempt logs <dir> <id> [--stage candidate|evaluator] [--candidate-stage NAME] [--stream stdout|stderr] [--tail BYTES] [--json]
|
|
818
|
+
ares lit search <dir> <query> [--source openalex|s2|arxiv|all] [--limit 1..50] [--year-from YYYY] [--intent lexical|semantic|background] [--json]
|
|
819
|
+
ares lit queries <dir> [--json]
|
|
820
|
+
ares lit flow <dir> [--markdown] [--json]
|
|
515
821
|
ares lit list <dir> [--status new|included|excluded] [--limit 1..500] [--json]
|
|
516
|
-
ares lit screen <dir> <id>... --include|--exclude [--reason TEXT] [--json]
|
|
822
|
+
ares lit screen <dir> <id>... --include|--exclude [--code CODE] [--reason TEXT] [--json]
|
|
517
823
|
ares lit card <dir> <id> --file PATH|- [--json]
|
|
824
|
+
ares lit card export <dir> <id>... --vault ID [--model-family NAME] [--confirm FINGERPRINT] [--json]
|
|
825
|
+
ares lit card import <dir> <id>... --vault ID [--json]
|
|
826
|
+
ares lit card list <dir> [--json]
|
|
518
827
|
ares lit verify <dir> [<id>...] [--json]
|
|
519
828
|
ares lit bib <dir> [--json]
|
|
520
829
|
ares review add <dir> --file PATH|- [--json]
|
|
521
830
|
ares review resolve <dir> <review-id>/<finding-id> --reason TEXT [--json]
|
|
522
831
|
ares review show <dir> [--json]
|
|
832
|
+
ares review checklist [--json]
|
|
523
833
|
ares paper build <dir> [--json]
|
|
834
|
+
ares paper plan set <dir> --file PATH|- [--json]
|
|
835
|
+
ares paper plan show <dir> [--json]
|
|
524
836
|
ares paper check <dir> [--json]
|
|
525
837
|
ares cite check <dir> <draft> [--json]
|
|
526
838
|
ares playbook
|
|
527
839
|
ares mcp
|
|
528
840
|
```
|
|
841
|
+
<!-- /facts:commands -->
|
|
842
|
+
|
|
843
|
+
<!-- facts:mcp-tools -->
|
|
844
|
+
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`.
|
|
845
|
+
<!-- /facts:mcp-tools -->
|
|
529
846
|
|
|
530
|
-
|
|
847
|
+
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.
|
|
848
|
+
|
|
849
|
+
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.
|
|
531
850
|
|
|
532
851
|
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.
|
|
533
852
|
|
|
534
|
-
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. 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`.
|
|
853
|
+
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`.
|
|
535
854
|
|
|
536
855
|
## Version and format discovery
|
|
537
856
|
|
|
538
|
-
|
|
857
|
+
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.
|
|
858
|
+
|
|
859
|
+
`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.
|
|
539
860
|
|
|
540
861
|
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.
|
|
541
862
|
|
|
542
|
-
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
|
|
863
|
+
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.
|
|
543
864
|
|
|
544
865
|
## Environment
|
|
545
866
|
|
|
@@ -553,21 +874,25 @@ Keys are sent with requests only; they are never written to the study.
|
|
|
553
874
|
|
|
554
875
|
## Not implemented yet
|
|
555
876
|
|
|
556
|
-
Automatic idea generation, parallel attempts,
|
|
877
|
+
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).
|
|
557
878
|
|
|
558
879
|
## Release
|
|
559
880
|
|
|
560
|
-
|
|
881
|
+
Prepare a release on a clean release branch with `bun run release:prepare <version>`. This bumps `package.json` and moves the Unreleased notes into a dated CHANGELOG section. Review and merge that bump through a PR, then fast-forward local `main` to `origin/main`. On clean, synchronized `main`, the owner runs `bun run release:tag`. It verifies the version, dated notes and successful `Check` / `ci-ok` result for that exact main commit, refuses an existing local or remote tag, and creates and pushes an annotated `v<version>` tag. Never hand-create or move a release tag or reuse a published version.
|
|
882
|
+
|
|
883
|
+
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.
|
|
884
|
+
|
|
885
|
+
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.
|
|
561
886
|
|
|
562
|
-
Publication runs only when
|
|
887
|
+
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.
|
|
563
888
|
|
|
564
|
-
|
|
889
|
+
N-1 compatibility is stated per minor release in CHANGELOG.md, separately for CLI, MCP tools and study/ledger formats. For 0.3.0, N-1 is 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.
|
|
565
890
|
|
|
566
891
|
## Development
|
|
567
892
|
|
|
568
893
|
```sh
|
|
569
894
|
bun install --frozen-lockfile
|
|
570
|
-
bun run check # typecheck, boundary check, tests (no network), package dry-run
|
|
895
|
+
bun run check # typecheck, boundary check, README facts, doc stamps, tests (no network), package dry-run
|
|
571
896
|
```
|
|
572
897
|
|
|
573
898
|
Live executor acceptance is separate from the offline gate. From a checkout with the configured SSH executor, run `bun scripts/live-exp.ts --host dgx-h100-2`. It uses a CPU-only synthetic Git repository, checks commit-specific scores, evaluator isolation, oversized logs, read-only log retrieval and archive containment, and prints a bounded summary. It removes its labeled containers and leaves private artifacts for inspection. The recorded A2 live proof is in [PR #14](https://github.com/STAIxBWLB/agent-research/pull/14); it covers that dgx Docker configuration, not every host or the local backend.
|