From 5935aaf40d706e0dfe7bfc6da175b839c4571c82 Mon Sep 17 00:00:00 2001
From: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Date: Wed, 25 Nov 2026 15:58:51 +0800
Subject: [PATCH] Organize SkillEval and standalone documentation guides
Route readers from the documentation index and place the Realtime-Venus case with the field notes. Preserve old entry points used by the Knowledge operations guide and frozen evidence, and follow the new paths in the contract and PR checks.
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Agent-assisted-by: Codex / unknown [effort=max] (author)
---
AGENTS.md | 6 +-
CHANGELOG.md | 2 +-
README.md | 4 +-
docs/README.md | 6 +-
docs/apps-module-migrations.json | 62 +-
docs/architecture.md | 22 +-
docs/contracts/current-design.md | 2 +-
.../gate-policy-runstore-and-first-prs.md | 4 +-
docs/contributing.md | 2 +-
docs/dashboard/campaign-summary-chart.md | 2 +-
docs/field-notes/realtime-venus-vllm-omni.md | 218 +++++++
docs/guides/apps-output.md | 2 +-
docs/guides/goal-checkpoints.md | 2 +-
docs/guides/harness-improvement.md | 2 +-
docs/guides/knowledge/external-channels.md | 2 +-
docs/guides/knowledge/knowledge-layout.md | 2 +-
.../knowledge/knowledge-retrieval-trace.md | 2 +-
docs/{ => guides}/module-layout.md | 34 +-
docs/guides/operations.md | 542 ++++++++++++++++++
docs/guides/skill-evaluation/README.md | 145 +++++
.../local-skill-evaluation.md | 2 +-
.../skill-eval-budget-core.md | 0
.../skill-eval-cloud-replay.md | 0
.../skill-evaluation/skill-eval-comparison.md | 12 +-
.../skill-eval-daily-admission.md | 2 +-
.../skill-eval-deployment-215.md | 0
.../skill-eval-full-context.md | 0
.../skill-eval-generation-only.md | 0
.../skill-eval-historical-job.md | 0
.../skill-evaluation/skill-eval-quarantine.md | 0
.../skill-eval-reviewer-qualification.md | 0
.../skill-eval-yibuapi-preflight.md | 2 +-
docs/guides/speculative-search.md | 488 ++++++++++++++++
docs/guides/task-input.md | 4 +-
docs/operations.md | 541 +----------------
docs/quickstart.md | 8 +-
docs/realtime-venus-vllm-omni.md | 220 +------
.../issue148-flare-source-distillation.md | 2 +-
docs/skill-eval-deployment-215.md | 8 +-
docs/skill-eval-historical-job.md | 8 +-
docs/skill-eval-pr.md | 14 +-
docs/skill-evaluation/README.md | 143 +----
docs/speculative-search.md | 486 +---------------
src/inferrsi/harness/README.md | 2 +-
src/inferrsi/harness/search_tree.py | 2 +-
.../skill-comparison/report-example.md | 2 +-
.../test_architecture_closed_loop.py | 2 +-
tests/repository/test_pr_references.py | 2 +-
.../test_target_module_import_gate.py | 2 +-
tools/check_pr_references.py | 2 +-
50 files changed, 1519 insertions(+), 1498 deletions(-)
create mode 100644 docs/field-notes/realtime-venus-vllm-omni.md
rename docs/{ => guides}/module-layout.md (95%)
create mode 100644 docs/guides/operations.md
create mode 100644 docs/guides/skill-evaluation/README.md
rename docs/{ => guides}/skill-evaluation/local-skill-evaluation.md (99%)
rename docs/{ => guides}/skill-evaluation/skill-eval-budget-core.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-cloud-replay.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-comparison.md (97%)
rename docs/{ => guides}/skill-evaluation/skill-eval-daily-admission.md (98%)
rename docs/{ => guides}/skill-evaluation/skill-eval-deployment-215.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-full-context.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-generation-only.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-historical-job.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-quarantine.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-reviewer-qualification.md (100%)
rename docs/{ => guides}/skill-evaluation/skill-eval-yibuapi-preflight.md (98%)
create mode 100644 docs/guides/speculative-search.md
diff --git a/AGENTS.md b/AGENTS.md
index 96b29f854..f184c2637 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -6,12 +6,12 @@ Coding agents (Cursor, Codex, Claude, etc.) should treat this file as the **entr
**InferRSI** is InferMatrixLab’s canonical home for a **portable RSI / evidence-driven scaffold**. Work is organized as **SIAS**: harness × model × infra planes of the system being optimized, with runnable examples and a first-class `evidence/` tree. InferRSI's own code lives under `src/inferrsi/` (rename on copy) in four cores: Knowledge, Harness, Benchmark and Apps.
-This entry contract is portable for derived scaffolds. The repository itself is the maintained workbench: delivering an independent engine uses the [engine delivery template](docs/template/README.md) and does not copy or depend on this runtime. Route your task: modify InferRSI via [contributing](docs/contributing.md); run experiments via [quickstart](docs/quickstart.md); find any CLI/Python operation via the [operation guide](docs/operations.md).
+This entry contract is portable for derived scaffolds. The repository itself is the maintained workbench: delivering an independent engine uses the [engine delivery template](docs/template/README.md) and does not copy or depend on this runtime. Route your task: modify InferRSI via [contributing](docs/contributing.md); run experiments via [quickstart](docs/quickstart.md); find any CLI/Python operation via the [operation guide](docs/guides/operations.md).
| Start here | Purpose |
| --- | --- |
| [README.md](README.md) | Layout, dev smoke, copy checklist |
-| [docs/operations.md](docs/operations.md) | Every CLI/Python operation: entry, effect class, boundary |
+| [Operation guide](docs/guides/operations.md) | Every CLI/Python operation: entry, effect class, boundary |
| [docs/contributing.md](docs/contributing.md) | Development, acceptance, evidence and CI |
| [Collaboration skills](.agents/skills/README.md) | Choose a skill for the current Issue or PR step |
| [docs/architecture.md](docs/architecture.md) | Module boundaries and extension contracts |
@@ -98,7 +98,7 @@ Portable operator guidance and candidate procedures live in the [skill library](
Benchmark comparisons, ordinary project optimization and packaged optimization
tasks each have one entry workflow; see
-[optimization requests](docs/operations.md#optimization-requests).
+[optimization requests](docs/guides/operations.md#optimization-requests).
## Dev smoke (local)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee66e9779..6384c20ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,7 +24,7 @@
- Apps module retirement (0.3.4). Use the [documented replacements](docs/apps-module-migrations.json).
The public evaluation API remains at `inferrsi.apps.api`. See the
- [migration instructions](docs/module-layout.md#apps-modules-and-retired-imports) for
+ [migration instructions](docs/guides/module-layout.md#apps-modules-and-retired-imports) for
script entries, retained pickles and frozen runs.
- `inferrsi benchmarks compare` keeps every attempt of an arm (Refs #509, P1.1). The new
diff --git a/README.md b/README.md
index 8d0e9069c..02d4ec24c 100644
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ listed baseline. The evidence column gives the scope and validation status.
| --- | --- | --- | --- |
| **DeepSeek V4.1 Flash** | vLLM-Ascend · 8× Ascend 910C | The W8A8 service ran with 8K input tokens and 1K output tokens. At concurrency levels of 1, 4, and 16, the medians of the six run-level mean times per output token were 39.28, 44.07, and 56.86 ms/token, respectively. All three exceeded the 25 ms/token target. | [Historical six-run TPOT calibration table](https://github.com/InferMatrixLab/InferRSI/issues/353#issuecomment-6641425447) |
| **Qwen3.8-27B** | Standalone nano-vLLM-derived engine · 1× H20 | FP8 service passed scoped HTTP/SSE lifecycle checks; quality and performance qualification incomplete. | [Service bring-up](https://github.com/InferMatrixLab/InferRSI/issues/57) · [Performance campaign](https://github.com/InferMatrixLab/InferRSI/issues/67) |
-| **Realtime-Venus Omni** | vLLM-Omni · 1× NVIDIA L20X | Fixed text/image/video and speech round-trip smoke completed; full duplex and quality qualification remain inconclusive. | [Day-0 adaptation case](docs/realtime-venus-vllm-omni.md) · [Acceptance scope](https://github.com/InferMatrixLab/InferRSI/issues/593) |
+| **Realtime-Venus Omni** | vLLM-Omni · 1× NVIDIA L20X | Fixed text/image/video and speech round-trip smoke completed; full duplex and quality qualification remain inconclusive. | [Day-0 adaptation case](docs/field-notes/realtime-venus-vllm-omni.md) · [Acceptance scope](https://github.com/InferMatrixLab/InferRSI/issues/593) |
| **LFM3-Omni-2B** | vLLM-Omni · 1× Ascend 910B1 | ✅ Two real-weight serving tests passed; a functional eager adapter served as the offline audio baseline. | [Serving checks and A/B benchmark](https://github.com/vllm-project/vllm-omni/pull/9827) |
@@ -166,7 +166,7 @@ request per engine and measure audio frames per second and median time to first
Browse the [documentation index](docs/README.md) for setup, workflows, benchmarks,
knowledge, architecture and field notes.
-- [CLI and Python operations](docs/operations.md) · [YAML task file](docs/guides/task-input.md) · [Result delivery](docs/guides/result-delivery.md)
+- [CLI and Python operations](docs/guides/operations.md) · [YAML task file](docs/guides/task-input.md) · [Result delivery](docs/guides/result-delivery.md)
- [Skill library](src/inferrsi/knowledge/data/skill_library/README.md) · [CANNbot](docs/guides/knowledge/external-channels.md#setting-one-up) · [MindIE](docs/guides/plugins/codex-plugin.md#enable-and-revoke)
- [Architecture](docs/architecture.md) · [Standalone engine template](docs/template/README.md) · [Changelog](CHANGELOG.md)
diff --git a/docs/README.md b/docs/README.md
index b3153fb40..5f011dd46 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -3,8 +3,8 @@
Open the entry for the task at hand and follow its links when you need a procedure or evidence.
- **First run or installation.** Start with the [quickstart](quickstart.md). Choose a [Codex](guides/plugins/codex-plugin.md), [DeepSeek Harness](guides/plugins/dsh-plugin.md) or [WorkSwarm](guides/plugins/workswarm-plugin.md) plugin. See [releases](release-notes/) for versions and channels.
-- **Run an optimization.** The [operation guide](operations.md) maps commands to Python entry points. Use the [task input guide](guides/task-input.md) to define a workload, the [workflow](guides/optimization-workflow-unification.md) to run it and the [dashboard](dashboard.md) to inspect results. [Task guides](guides/)
-- **Choose a benchmark or check a claim.** Start with [engineering benchmarks](benchmarks/engineering-benchmarks.md) or [recorded results](benchmarks/optimization-results.md). For skill changes, use [skill evaluation](skill-evaluation/) or the [PR evidence handoff](skill-eval-pr.md).
+- **Run an optimization.** The [operation guide](guides/operations.md) maps commands to Python entry points. Use the [task input guide](guides/task-input.md) to define a workload, the [workflow](guides/optimization-workflow-unification.md) to run it and the [dashboard](dashboard.md) to inspect results. [Task guides](guides/)
+- **Choose a benchmark or check a claim.** Start with [engineering benchmarks](benchmarks/engineering-benchmarks.md) or [recorded results](benchmarks/optimization-results.md). For skill changes, follow [local evaluation](guides/skill-evaluation/local-skill-evaluation.md) or the [PR evidence handoff](skill-eval-pr.md#nonpaid-author-handoff). See the [SkillEval guide](guides/skill-evaluation/) for reviewer and operator procedures.
- **Find or contribute knowledge.** Start with [Find and Collect](knowledge-operations.md) or the [contribution guide](guides/knowledge/knowledge-contribution-workflow.md). The [Knowledge module](../src/inferrsi/knowledge/README.md) links to the library and its contracts.
-- **Change the repository.** Read the [contributor guide](contributing.md) and [collaboration rules](agent-collaboration.md). [Architecture](architecture.md) records shared boundaries. [Module layout](module-layout.md#module-documentation) links to the four module guides. [Versioned contracts](contracts/) and the [engine template](template/) support implementation.
+- **Change the repository.** Read the [contributor guide](contributing.md) and [collaboration rules](agent-collaboration.md). [Architecture](architecture.md) records shared boundaries, and [module layout](guides/module-layout.md#module-documentation) links to the four module guides. [Versioned contracts](contracts/) and the [engine template](template/) support implementation.
- **Trace a result.** [Field notes](field-notes/) describe specific workloads. [Source audits](reviews/) and [campaign evidence](../evidence/) retain their scope and provenance. Check the [privacy and security guide](privacy-security.md) before sharing artifacts.
diff --git a/docs/apps-module-migrations.json b/docs/apps-module-migrations.json
index ab813ecf1..cff09bbdd 100644
--- a/docs/apps-module-migrations.json
+++ b/docs/apps-module-migrations.json
@@ -18,8 +18,8 @@
"consumers": [
"docs/guides/apps-output.md",
"docs/architecture.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"src/inferrsi/apps/api.py",
"src/inferrsi/apps/cli/evaluate.py",
"src/inferrsi/apps/delivery/__init__.py",
@@ -62,8 +62,8 @@
"consumers": [
"docs/guides/apps-output.md",
"docs/architecture.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"src/inferrsi/apps/api.py",
"src/inferrsi/apps/cli/evaluate.py",
"src/inferrsi/apps/handoff/candidate_provider.py",
@@ -99,8 +99,8 @@
"consumers": [
"docs/guides/apps-output.md",
"docs/architecture.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"src/inferrsi/apps/delivery/adapters.py",
"src/inferrsi/apps/handoff/bridge.py",
"src/inferrsi/apps/handoff/candidate_provider.py",
@@ -126,8 +126,8 @@
"docs/guides/apps-output.md",
"docs/architecture.md",
"docs/contracts/current-design.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"src/inferrsi/contracts/evidence.py",
"tests/repository/_gate_policy_support.py",
"tests/repository/check_installed.py",
@@ -152,8 +152,8 @@
"consumers": [
"docs/guides/apps-output.md",
"docs/architecture.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"src/inferrsi/apps/handoff/candidate_provider.py",
"src/inferrsi/apps/views/attempt.py",
"src/inferrsi/apps/workflows/evaluation.py",
@@ -181,8 +181,8 @@
"consumers": [
"docs/guides/apps-output.md",
"docs/architecture.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"tests/repository/check_installed.py",
"tests/apps/test_apps_context_provider.py",
"tests/apps/test_apps_module_migrations.py",
@@ -201,8 +201,8 @@
"consumers": [
"docs/guides/apps-output.md",
"docs/architecture.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"src/inferrsi/apps/api.py",
"tests/repository/check_installed.py",
"tests/apps/test_apps_module_migrations.py"
@@ -222,8 +222,8 @@
"consumers": [
"docs/architecture.md",
"docs/guides/knowledge/knowledge-retrieval-trace.md",
- "docs/module-layout.md",
- "docs/operations.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/operations.md",
"docs/guides/optimization-workflow-unification.md",
"src/inferrsi/apps/cli/__init__.py",
"src/inferrsi/apps/views/capture_delivery.py",
@@ -254,7 +254,7 @@
],
"consumers": [
"docs/architecture.md",
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/cli/__init__.py",
"tests/repository/_gate_policy_support.py",
"tests/repository/check_installed.py",
@@ -280,7 +280,7 @@
"consumers": [
"docs/contracts/function-owners.md",
"docs/guides/harness-improvement.md",
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/workflows/search_benchmarks.py",
"tests/repository/check_installed.py",
"tests/apps/test_apps_module_migrations.py",
@@ -300,8 +300,8 @@
],
"consumers": [
"docs/contracts/function-owners.md",
- "docs/module-layout.md",
- "docs/skill-evaluation/README.md",
+ "docs/guides/module-layout.md",
+ "docs/guides/skill-evaluation/README.md",
"tests/repository/check_installed.py",
"tests/apps/test_anthropic_agent.py",
"tests/apps/test_apps_module_migrations.py",
@@ -324,8 +324,8 @@
],
"consumers": [
"docs/contracts/function-owners.md",
- "docs/skill-evaluation/local-skill-evaluation.md",
- "docs/module-layout.md",
+ "docs/guides/skill-evaluation/local-skill-evaluation.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/workflows/skill_evaluation.py",
"tests/repository/check_installed.py",
"tests/apps/test_apps_module_migrations.py",
@@ -359,7 +359,7 @@
],
"consumers": [
"docs/architecture.md",
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/cli/__init__.py",
"tests/repository/check_installed.py",
"tests/apps/test_apps_module_migrations.py",
@@ -451,7 +451,7 @@
"consumers": [
"docs/architecture.md",
"docs/guides/knowledge/external-channels.md",
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"tests/repository/check_installed.py",
"tests/apps/test_apps_module_migrations.py"
],
@@ -467,7 +467,7 @@
"export_context"
],
"consumers": [
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/cli/__init__.py",
"src/inferrsi/apps/integrations/mindie/mcp.py",
"src/inferrsi/apps/integrations/mindie/navigation.py",
@@ -493,7 +493,7 @@
"dispatch"
],
"consumers": [
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/cli/__init__.py",
"src/inferrsi/apps/integrations/mindie/mcp.py",
"src/inferrsi/apps/integrations/mindie/navigation.py",
@@ -512,7 +512,7 @@
"serve"
],
"consumers": [
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/integrations/mindie/project.py",
"tests/repository/check_installed.py",
"tests/apps/test_apps_module_migrations.py",
@@ -528,7 +528,7 @@
"read"
],
"consumers": [
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"tests/repository/check_installed.py",
"tests/apps/test_apps_module_migrations.py"
],
@@ -544,7 +544,7 @@
"read"
],
"consumers": [
- "docs/operations.md",
+ "docs/guides/operations.md",
"src/inferrsi/apps/cli/__init__.py",
"tests/apps/test_apps_context_provider.py",
"tests/apps/test_apps_knowledge.py",
@@ -581,7 +581,7 @@
"write_json"
],
"consumers": [
- "docs/skill-evaluation/local-skill-evaluation.md",
+ "docs/guides/skill-evaluation/local-skill-evaluation.md",
"examples/qwen21_turbo_b300.py",
"examples/qwen21_turbo_quality.py",
"src/inferrsi/apps/delivery/__init__.py",
@@ -642,7 +642,7 @@
],
"consumers": [
"docs/contracts/current-design.md",
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"src/inferrsi/apps/cli/__init__.py",
"tests/apps/test_inspection.py",
"tests/repository/check_installed.py",
diff --git a/docs/architecture.md b/docs/architecture.md
index a86700694..edd61dd17 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -32,7 +32,7 @@ The optional [service-reuse protocol](guides/service-reuse-campaigns.md) adds pr
assessment and foreground service ownership within this same controller. Its
protocol and result rules live in `harness.project_service`, with process
lifetime managed by `local_process`.
-The [experimental speculative search](speculative-search.md) composes immutable
+The [experimental speculative search](guides/speculative-search.md) composes immutable
candidate trees, bounded completion menus, synchronous VATS and CPU GVO roles.
Its work controller uses shared RunStore transactions and the existing local
process executor. Apps supplies Engine/Skill grading; the support matrix identifies
@@ -65,7 +65,7 @@ criteria are specifications for review.
[D001](contracts/current-design.md#d001--one-distribution-three-cores-plus-apps-document-contracts-rather-than-shared-business-dtos)
keeps Knowledge, Harness and Benchmark as sibling cores and Apps as the only
-assembler, so the [import gate](module-layout.md#import-gate) restricts
+assembler, so the [import gate](guides/module-layout.md#import-gate) restricts
cross-core imports and admits the exact `python -m inferrsi` CLI delegation,
while [shared layers](#module-responsibilities-and-dependencies) stay
independent of campaigns in `examples/`.
@@ -78,13 +78,13 @@ independent of campaigns in `examples/`.
Cross-core traffic uses versioned JSON envelopes with explicit conversion and
core-owned business types, with shared technical leaves limited to the exact
[D001 list](contracts/current-design.md#d001--one-distribution-three-cores-plus-apps-document-contracts-rather-than-shared-business-dtos)
-and its [neutral-leaf importer rule](module-layout.md#permanent-neutral-leaf-importer-rule-proposed).
+and its [neutral-leaf importer rule](guides/module-layout.md#permanent-neutral-leaf-importer-rule-proposed).
**Checked by** `tests/repository/test_first_wave_isolation_policy.py`.
### A3 — Retired paths
-[Retired module paths](module-layout.md#retired-root-modules) stay retired
+[Retired module paths](guides/module-layout.md#retired-root-modules) stay retired
without forwarders or aliases, and the [tracked package root](contracts/current-design.md#d018--first-wave-gate-policy-detail)
holds only `__init__.py` and `__main__.py`.
@@ -123,7 +123,7 @@ defaults to `INCONCLUSIVE` under the frozen rules.
[D013](contracts/current-design.md#d013--legacy-entry-point-compatibility)
preserves its legacy CLI entry points, arguments, `Path` behavior, output bytes
-and [old `run` exit codes](module-layout.md#old-run-exit-codes), while
+and [old `run` exit codes](guides/module-layout.md#old-run-exit-codes), while
[historical evidence](#compatibility-and-historical-evidence) retains its
original bytes and a new campaign with a changed implementation requires
fresh frozen references.
@@ -141,7 +141,7 @@ process cleanup and performance adjudication.
### A9 — Governing approval for contract changes
-Changes to these anchors, `docs/contracts/**`, the `docs/module-layout.md`
+Changes to these anchors, `docs/contracts/**`, the `docs/guides/module-layout.md`
rules or `docs/legacy-knowledge-manifest.json` require a same-repository
governing Issue whose recorded decision accepts the specific change and
independent review under the [review rules](agent-collaboration.md#pr-review-and-merge)
@@ -216,9 +216,9 @@ and the CLI calls that composition. The `apps/host/` package moved from Infra in
module. `apps/host/inspection.py` reads a
repository-pack description through the neutral `resources.repository_packs`
leaf, under the one permanent importer rule in
-[module-layout.md](module-layout.md#permanent-neutral-leaf-importer-rule-proposed).
+[module-layout.md](guides/module-layout.md#permanent-neutral-leaf-importer-rule-proposed).
-The [target module layout](module-layout.md) describes the migration and the
+The [target module layout](guides/module-layout.md) describes the migration and the
scope of the static import checks. The [migration manifest](legacy-knowledge-manifest.json)
records the retired compatibility pairs and the permanent neutral-leaf importer rule.
@@ -271,14 +271,14 @@ The four core READMEs cover current entry points and extension rules.
The [contracts](contracts/) define versioned interfaces. The neutral
[resources package](../src/inferrsi/resources/) reads repository-pack
-descriptors. Use the [module layout](module-layout.md) for ownership,
+descriptors. Use the [module layout](guides/module-layout.md) for ownership,
compatibility and placement rules.
The package root holds exactly two tracked files: `__init__.py` and `__main__.py`.
`__main__.py` and the console script call `inferrsi.apps.cli:main`.
The build generates `_version.py` as wheel metadata. See the
-[retired paths and replacements](module-layout.md#retired-root-modules) and
-the [import gate](module-layout.md#import-gate) for migration and dependency rules.
+[retired paths and replacements](guides/module-layout.md#retired-root-modules) and
+the [import gate](guides/module-layout.md#import-gate) for migration and dependency rules.
## Where to extend
diff --git a/docs/contracts/current-design.md b/docs/contracts/current-design.md
index 33f75a917..d1699d6dd 100644
--- a/docs/contracts/current-design.md
+++ b/docs/contracts/current-design.md
@@ -169,7 +169,7 @@ Current status after R1 (#412):
- `overall isolation_complete` is true since R3 (#412). A1 (#408) cleared that temporary entry, R2 cleared the twelve `harness` → `inferrsi.infra` hits in six Harness modules and R3 cleared the five runtime resource loaders (a child-process protocol, two folded sibling modules and a permanent two-evaluator rule). The package root holds the two tracked files `__init__.py` and `__main__.py`.
- The permanent rule and that manifest revision require formal architecture review. The implementer does not self-approve them, and passing tests are not that review.
-[`../module-layout.md`](../module-layout.md) has the exact rules and their negative controls.
+[Module layout](../guides/module-layout.md) has the exact rules and their negative controls.
## D019 — first PRs and numbering
diff --git a/docs/contracts/gate-policy-runstore-and-first-prs.md b/docs/contracts/gate-policy-runstore-and-first-prs.md
index 53f8e7b65..50d82f368 100644
--- a/docs/contracts/gate-policy-runstore-and-first-prs.md
+++ b/docs/contracts/gate-policy-runstore-and-first-prs.md
@@ -39,7 +39,7 @@ The symbol inventory is AST-derived and does not claim to have found every third
1. The default cross-core prohibition stays. Only the seven leaf→exact-K-module edges above may serve as migration-compatibility exceptions; a module prefix does not authorize adjacent new modules.
2. Shape checks allow only a module docstring, a `future` import, the listed `ImportFrom` lines (alias only as `name as name`), and an `__all__` constant string list. No business definitions, other imports, assignment side effects, or dynamic module hooks.
3. The static graph resolves absolute/relative imports, `from package import name`, and known export edges, and builds the transitive closure. Any target K/B/H core API entry that reaches another core, Apps, or a legacy facade fails. The D020 neutral technical leaf is not a legacy facade and must be independently verified to contain only raw data reading/data constants and no core imports; "only indirectly, so it passes" is not allowed. Target H entry points are the new `harness.api`/`execution_service`/`run_store`; the current mixed `harness` does not automatically count as an isolated core.
-4. The existing `harness/skill_evaluation.py → knowledge_operations → knowledge.*` edge is a registered **exact residual legacy dependency**: retained, and it keeps `overall isolation_complete=false`. It is not erased from the report and no new/expanded H bypass is permitted. It is not an exception available to a target H new entry. The skill-evaluation split (#410) later removed this edge and its exemption; [`../module-layout.md`](../module-layout.md#first-wave-compatibility-exceptions-proposed) records the current rule.
+4. The existing `harness/skill_evaluation.py → knowledge_operations → knowledge.*` edge is a registered **exact residual legacy dependency**: retained, and it keeps `overall isolation_complete=false`. It is not erased from the report and no new/expanded H bypass is permitted. It is not an exception available to a target H new entry. The skill-evaluation split (#410) later removed this edge and its exemption; [Module layout](../guides/module-layout.md#first-wave-compatibility-exceptions-proposed) records the current rule.
5. `test_clean_scan_is_not_isolation` becomes a staged-model test. It does not permanently assert that all three package directories are absent. It verifies that `overall` is still false when any target package, any compat exception, or an old H→model/infra transitive residual is missing. Green is not manufactured by deleting assertions.
6. A non-empty allowlist forces `overall isolation_complete=false`; "new core business closure isolated" is reported as a separate verifiable result and cannot impersonate isolation of the whole historical namespace.
7. New Apps entries call core public APIs only and never pass through old root shells; cores never import Apps. If a dynamic import is genuinely needed later, it must declare exact static edges and get extra review; in the first wave all compatibility shells prohibit it.
@@ -47,7 +47,7 @@ The symbol inventory is AST-derived and does not claim to have found every third
Synthetic negative controls run item by item per D020; an empty graph pass is not allowed on the grounds that target H files do not exist yet. Repository policy review is a process prerequisite, not another user choice. Without formal acceptance, these shells cannot be written and the gate cannot be changed.
-P0b review package (Proposed): the exact pairs, shape rules, and staged isolation model are in [`../module-layout.md`](../module-layout.md#first-wave-compatibility-exceptions-proposed), [`../legacy-knowledge-manifest.json`](../legacy-knowledge-manifest.json), and `tests/repository/test_target_module_import_gate.py`.
+P0b review package (Proposed): the exact pairs, shape rules, and staged isolation model are in [Module layout](../guides/module-layout.md#first-wave-compatibility-exceptions-proposed), [`../legacy-knowledge-manifest.json`](../legacy-knowledge-manifest.json), and `tests/repository/test_target_module_import_gate.py`.
### B3. Later legacy evaluation entry (not mixed into the first wave)
diff --git a/docs/contributing.md b/docs/contributing.md
index 624fc0687..044660495 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -113,7 +113,7 @@ When a command, module or workflow changes owners, search the old name and path
across the checkout. Include module READMEs, CLI help, plugin builders, workflow
files, tests and generated indexes. Use each match in context. For example,
`SkillEval` names GitHub workflows, while local skill evaluation runs through
-[`python -m tools.skill_eval_compare`](skill-evaluation/local-skill-evaluation.md). Verify the
+[`python -m tools.skill_eval_compare`](guides/skill-evaluation/local-skill-evaluation.md). Verify the
actual entry point before renaming it in a guide.
Update the owning module README or task guide in the same PR as the code.
diff --git a/docs/dashboard/campaign-summary-chart.md b/docs/dashboard/campaign-summary-chart.md
index b2acc5366..00f7062c8 100644
--- a/docs/dashboard/campaign-summary-chart.md
+++ b/docs/dashboard/campaign-summary-chart.md
@@ -6,7 +6,7 @@ renderer produces a standalone figure for a multi-step campaign.
The renderer is [inferrsi/apps/views/summary_chart.py](../../src/inferrsi/apps/views/summary_chart.py),
also exposed as [tools/campaign_summary_chart.py](../../tools/campaign_summary_chart.py)
-and listed in the [operation guide](../operations.md#campaign-summary-figure).
+and listed in the [operation guide](../guides/operations.md#campaign-summary-figure).
It uses only the standard library and writes SVG, so a committed figure
reproduces without installing a plotting package.
diff --git a/docs/field-notes/realtime-venus-vllm-omni.md b/docs/field-notes/realtime-venus-vllm-omni.md
new file mode 100644
index 000000000..1dec4e17c
--- /dev/null
+++ b/docs/field-notes/realtime-venus-vllm-omni.md
@@ -0,0 +1,218 @@
+# Realtime-Venus: day-0 adaptation in vLLM-Omni
+
+This case records an Omni-checkpoint adaptation and a bounded execution-mode
+experiment. The governing [acceptance issue](https://github.com/InferMatrixLab/InferRSI/issues/593)
+owns revision pins, frozen conditions, run outcomes and the downstream PR link.
+The overall conclusion is **INCONCLUSIVE** for full model parity and general
+performance: basic generation does not validate the external delegation runtime,
+long-video memory, perceptual speech quality or sustained duplex service.
+
+## What failed before generation
+
+The [released repository](https://huggingface.co/inclusionAI/Realtime-Venus)
+contains separate Omni and Audio checkpoints. The Omni child `config.json` is a
+reference to a separately pinned root YAML, rather than a complete language
+model configuration. Treating the child as an ordinary Qwen3 config loses the
+backbone dimensions and the version used by the stage router.
+
+With Transformers 5.20.2, the released configuration code also calls the removed
+`_set_token_in_kwargs` API. Loading the released image processor hits another
+incompatibility: its legacy registration uses a string where the current
+`AutoImageProcessor.register` API expects a configuration class. These were
+observed startup failures, not hypothetical compatibility concerns.
+
+The adaptation uses a native config class that reads the sibling root YAML,
+verifies its referenced SHA-256 and identity, and constructs the nested vision,
+audio, TTS and slice configurations. Both `get_config_dict` and `from_dict`
+need coverage: `AutoConfig` can select the registered class and call `from_dict`
+without going through that class's `get_config_dict`. A direct-class unit test
+alone missed that second path during bring-up.
+
+The processor fix shares the existing MiniCPM compatibility context, ignores
+only the two known redundant string registrations and restores the registration
+method on success or failure. The tokenizer and processor still require trusted
+checkpoint code. The config adapter deliberately requires a complete local
+snapshot; it does not silently fetch a different root YAML on an offline host.
+
+## Reuse boundaries matter
+
+The Omni architecture derives from MiniCPM-o 4.5. Its stage pipeline can reuse
+the existing Thinker, Talker and Code2Wav implementations, including compiled
+execution and Talker multi-frame decoding. A separate architecture-to-pipeline
+mapping and deployment overlay are sufficient; copying the model kernels would
+create another implementation to maintain without solving the loader failures.
+
+Reuse does not imply that every inherited tuning choice preserves the released
+checkpoint's behavior. The existing MiniCPM CUDA recipe uses five Flow steps and
+FP16 Flow weights. The Venus overlay retains ten steps and FP32 Flow, disables
+the Flow TF32 override, and uses one codec replica. Those choices separate an
+execution optimization from an unvalidated sampling or precision change.
+
+Venus also introduces `…` spans. The native duplex handoff
+must remove the same rows from token IDs and hidden states, retain the text
+stream, carry masking state across units, and reset it at a turn boundary.
+The follow-up adds an explicit full-duplex deployment and completes the speech
+boundary handling. A fully muted unit flushes preceding speech using only the
+Talker's audio-begin embedding, a 26-token ceiling and no minimum. The codec
+bridge drains its pending frames and resets the vocoder without closing the
+dialogue turn. Later silent units do not synthesize again; newly spoken content
+replaces the Talker prompt and KV. The real turn terminator still closes the
+dialogue, including when its speech row was masked by an unclosed delegation.
+
+Filtering alone also missed an output-contract problem: the shared data plane
+normally waits for waveform frames before publishing text. An intentionally
+silent delegation needs its text delivered immediately. Model-owned metadata
+now carries that distinction through Talker and Code2Wav; the bridge consumes
+the queued text at the silent unit boundary and the data plane deduplicates it
+by cache epoch and chunk sequence. It cannot be lost or replayed with later
+speech. Regression tests cover the full producer-to-consumer metadata path.
+
+These changes reuse the existing session engine, model-native listen/speak
+policy, input append and interruption mechanisms. The external asynchronous
+delegation executor and long-video memory runtime remain outside this adapter.
+
+## Full-duplex follow-up lessons
+
+The turn profile and `realtime_venus_omni_duplex.yaml` both retain ten-step FP32
+Flow. Switching the serving mode is necessary but does not prove the model's
+session behavior: exercise speech and dialogue boundaries independently, then
+verify the actual public text/audio events.
+
+A subsequent configuration-only change makes `realtime_venus_omni.yaml` default
+to full duplex, including automatic deployment selection. The `_duplex.yaml`
+profile remains an equivalent alias; `_turn.yaml` explicitly selects ordinary
+HTTP serving. Resolving all inherited fields confirms that the new default
+matches the previously tested duplex configuration and the explicit turn profile
+matches the previous default. The historical measurements below keep their
+original source pins and serving modes; changing a default is not a new benchmark.
+
+The model's delegation capability also differs from serving-side tool execution:
+the official [Harness](https://github.com/inclusionAI/Realtime-Venus/tree/main/harness)
+executes `` requests and returns `` feedback. The current
+adapter preserves delegate text without speaking it, but does not integrate that
+executor or translate delegates into OpenAI `tool_calls`.
+
+The first paced audio/video probe used a short “Hello, welcome” waveform. The
+model chose to listen for all twenty units; there was no protocol error, but
+also no generated audio. That establishes input acceptance only. A separate
+text-seeded duplex probe produced a spoken introduction and returned to
+listening. Neither result alone establishes multi-turn audio conversation or
+interruption recovery.
+
+Widening the CPU check to the vocoder's isolated import test caught a new circular
+import: placing transport constants under the duplex package caused Code2Wav
+to import the plugin, which imports Code2Wav. Moving the constants to the shared
+handoff module fixed the ownership boundary without duplicating their strings.
+This illustrates why a passing in-process suite can miss an import-order defect.
+
+Follow-up functional results are retained separately from the earlier HTTP
+measurement. They are not extra repetitions of that experiment, and its latency
+ratio is not a full-duplex speedup claim.
+
+At downstream commit `59b193b992ce3d6b5c80a583bac7d82f8a43474e`, the related
+CPU regression run completed with 681 passed and six CUDA-embedding cases
+skipped. Applicable pre-commit hooks passed. A paced 30-second synthetic video
+plus eight seconds of tail input produced four completed responses and nine
+audio chunks at 24 kHz, with no protocol errors. Its first color answer was
+wrong; this is transport/lifecycle evidence, not semantic acceptance.
+
+The natural-input lifecycle probe resumed the same WebSocket session, asked
+about a red circle, cancelled the first spoken response, then asked about a
+blue circle in the same session. Transcripts were “红色。” then “蓝色。”; the
+first response terminated as cancelled and the second completed. No audio
+from the cancelled response arrived after cancellation acknowledgement, and
+session close completed without protocol errors. A separate seeded-story
+probe also recovered transport after cancellation, but resumed its initial
+story context rather than answering the new scene question; it is not evidence
+of semantic interruption recovery.
+
+An untimed Transformers 4.51.3 reference check used the released duplex class
+on the same 38 audio/video units with speech synthesis disabled and greedy
+decoding. It also produced incorrect descriptions on the complex fixture.
+The adapted service used its default sampling, so these runs do not establish
+token parity or identify the cause of either model's wrong answers. The
+[functional summary](../../evidence/realtime-venus-day0/results/duplex-functional.json)
+retains the outputs and separates them from the prior managed performance round.
+
+Review subsequently found that the archived lifecycle script's gate could also
+accept a failed or pre-input audio response. The positive trace above remains
+a historical observation, but that script cannot qualify a new run. The
+[revised probe](../../tools/realtime_venus_lifecycle.py) waits for matching cancel
+and input-clear acknowledgements, binds a new response to the fresh-input
+phase, and requires nonempty audio plus terminal `completed`. Its
+[replay instructions](../../evidence/realtime-venus-day0/validator/README.md)
+distinguish offline regression coverage from the unperformed live-model rerun.
+
+## Validation and experiment boundaries
+
+A tokenizer warning was checked against the isolated Transformers 4.51.3
+reference. Nine fixed English, Chinese, mixed-Unicode, whitespace and special-token
+inputs produced identical token IDs under 5.20.2 after the native config
+registration. This is sample parity, not an exhaustive tokenizer proof; no regex
+rewrite was applied to the checkpoint.
+
+The task entered InferRSI through `skills enter task-day-0`, inspected the
+checkpoint's configuration and reference implementation, and first established
+real-weight generation. The isolated Transformers 4.51.3 reference produced the
+expected Paris and red-image answers. The adapted HTTP service returned text,
+image answers and speech audio. An initial text request exhausted its token
+budget in a thinking span; subsequent fixed requests explicitly disabled
+thinking and rejected truncated completions. Startup and first-request timings
+are not used as an optimization baseline.
+
+At the submitted downstream revision, automatic deployment selection also served
+a fixed Chinese question and a short red/blue video correctly. Audio round-trip
+checking exposed why structural WAV validation is insufficient: the initial
+bring-up waveform produced unrelated marker-like transcriptions in both
+vLLM-Omni and the isolated reference. A waveform generated by the final Venus
+profile transcribed as “Hello, welcome.” in both implementations, including
+both reference TTS-template settings. The initial/final generation settings also
+differed in the thinking template, so this does not isolate Flow precision or
+step count as the cause. Perceptual speech quality remains unqualified.
+
+The managed project experiment uses `campaign start`, `campaign diagnose` and
+one `campaign round`. Its common source is the already adapted model. The only
+candidate change is Thinker `enforce_eager=true` to `false`; it does not compare
+an unsupported upstream model against a working implementation. Model weights,
+Flow settings, speculation and workload stay fixed.
+
+The issue freezes a small C1 HTTP workload, warmup policy, point metric and
+exact-text comparison before execution. It also distinguishes structural WAV
+validation from speech-quality scoring. The initial trace places text generation
+in stage 0; it does not independently prove that launch overhead is the dominant
+bottleneck. Compilation/CUDA-graph benefit is therefore a tested hypothesis,
+not a diagnosis inferred from the model family.
+
+The operator requested one baseline measurement and one candidate measurement.
+No repeated sampling or independent `campaign final` retest is authorized. The
+managed round's retained observations are reported as exploratory evidence; the
+campaign is not presented as finalized. There is no confidence interval, service
+SLO, broad quality acceptance or full-duplex speedup claim.
+
+## Reproduce the contribution
+
+The contribution in
+[vLLM-Omni PR #10976](https://github.com/vllm-project/vllm-omni/pull/10976)
+merged on 2026-11-24 as
+[`123c96e4a81a597e08526d46c54dc2325fc01488`](https://github.com/vllm-project/vllm-omni/commit/123c96e4a81a597e08526d46c54dc2325fc01488).
+Use this immutable revision for the integrated contribution. The observations
+and validation limits in this case refer to the earlier issue-pinned sources;
+they do not qualify changes added between those sources and the merged revision.
+Follow its recipe to download the Omni subdirectory and root YAML together,
+then serve the local model path with the Venus deployment overlay. Preserve the
+root YAML when moving the checkpoint to an offline host.
+
+Run the configuration, native-duplex-hook and Thinker-to-Talker handoff tests
+listed in that PR. For performance work, declare a new issue-scoped workload,
+quality gate and budget; freeze its protocol before measuring. Do not copy the
+exploratory latency threshold as an acceptance default for other hardware or
+service traffic.
+
+The [compact evidence bundle](../../evidence/realtime-venus-day0/README.md) retains
+the frozen measurement scripts and derived summary. The local original logs
+and managed source snapshots remain retained by the
+operator. They are not a published, independently downloadable archive; external
+replay of those exact originals is unverified. The PR and acceptance issue
+provide the public code, commands, compact outcomes and explicit limitations.
+This case does not promote a reusable knowledge-library record or a campaign
+`PASS` on the basis of unarchived smoke results.
diff --git a/docs/guides/apps-output.md b/docs/guides/apps-output.md
index 9c7eafa4e..dee9831ba 100644
--- a/docs/guides/apps-output.md
+++ b/docs/guides/apps-output.md
@@ -141,7 +141,7 @@ seal, and `handoff.candidate_provider` owns generation planning and candidate
collection. `inferrsi.apps.api.CandidateProvider` exports the same canonical
class. Use the registered handoff paths to bind the original attempt and read
its fixed references. Historical context pickles have an explicit
-[migration reader](../module-layout.md#apps-modules-and-retired-imports).
+[migration reader](module-layout.md#apps-modules-and-retired-imports).
## Fixed artifact reader
diff --git a/docs/guides/goal-checkpoints.md b/docs/guides/goal-checkpoints.md
index 54b64de15..1b24370a9 100644
--- a/docs/guides/goal-checkpoints.md
+++ b/docs/guides/goal-checkpoints.md
@@ -1,7 +1,7 @@
# Offline goal checkpoints
`python -m tools.goal_checkpoint` rebuilds a goal view from explicit owner
-records and one existing [configured skill comparison](../skill-evaluation/skill-eval-comparison.md).
+records and one existing [configured skill comparison](skill-evaluation/skill-eval-comparison.md).
It reads the retained artifacts through the comparison controller's
`read_report` function. It does not call a model or write comparison reports.
diff --git a/docs/guides/harness-improvement.md b/docs/guides/harness-improvement.md
index 60e084744..5cb258255 100644
--- a/docs/guides/harness-improvement.md
+++ b/docs/guides/harness-improvement.md
@@ -139,7 +139,7 @@ be presented as the fallback H0 score.
## Reproduce the offline experiment
Requires Python 3.10+, dev dependencies and Git 2.45+ as in
-[configured comparisons](../skill-evaluation/skill-eval-comparison.md). From a development checkout:
+[configured comparisons](skill-evaluation/skill-eval-comparison.md). From a development checkout:
```bash
python -m tests.fixtures.harness_improvement_demo --output
diff --git a/docs/guides/knowledge/external-channels.md b/docs/guides/knowledge/external-channels.md
index d3bdb30ef..8bccdede3 100644
--- a/docs/guides/knowledge/external-channels.md
+++ b/docs/guides/knowledge/external-channels.md
@@ -240,7 +240,7 @@ conclusion.
## Related
-- [Operation guide](../../operations.md) — every entry point, effect class, boundary
+- [Operation guide](../operations.md) — every entry point, effect class, boundary
- [#476](https://github.com/InferMatrixLab/InferRSI/issues/476) — access design and licence boundary
- [#388](https://github.com/InferMatrixLab/InferRSI/issues/388) — external dependency governance
- [Knowledge base](../../knowledge-base.md) — the packaged corpus this sits beside
diff --git a/docs/guides/knowledge/knowledge-layout.md b/docs/guides/knowledge/knowledge-layout.md
index d3e7baf50..8caf9ec7f 100644
--- a/docs/guides/knowledge/knowledge-layout.md
+++ b/docs/guides/knowledge/knowledge-layout.md
@@ -96,7 +96,7 @@ flowchart LR
The [skill library](../../../src/inferrsi/knowledge/data/skill_library/README.md) owns the directory map. Each procedure and its resources live under one registered owner. Each [engineering finding](../../../src/inferrsi/knowledge/data/skill_library/records/README.md) carries its own sources, applicability and verification status.
-The [Collect contract](../../knowledge-operations.md#ranked-discovery-and-budgeted-context) defines byte ranges and source identity. The [Find contract](../../operations.md#find--find--inferrsiknowledgeknowledge_findfind) defines read sizes and reproducible reads.
+The [Collect contract](../../knowledge-operations.md#ranked-discovery-and-budgeted-context) defines byte ranges and source identity. The [Find contract](../operations.md#find--find--inferrsiknowledgeknowledge_findfind) defines read sizes and reproducible reads.
Claude reads `disable-model-invocation` from the native YAML header. Across this migration, the 33 procedures that previously exposed that flag and `metadata.disco-role` still expose them. For 22 other procedures (nine PyTorch, nine TorchNPU and four Lithos), the old sidecar alone contained those values. Readers of imported metadata can decode the same Boolean and role from `metadata.inferrsi`; promoting them into the native header would change host invocation behavior. [Claude skill invocation](https://code.claude.com/docs/en/skills#control-who-invokes-a-skill)
diff --git a/docs/guides/knowledge/knowledge-retrieval-trace.md b/docs/guides/knowledge/knowledge-retrieval-trace.md
index bba302006..6e3bf1f3f 100644
--- a/docs/guides/knowledge/knowledge-retrieval-trace.md
+++ b/docs/guides/knowledge/knowledge-retrieval-trace.md
@@ -63,7 +63,7 @@ and synthetic measurements; they are not real optimization results:
`campaign capture-context` uses Find ranking for a single free-text question,
then assembles selected material through Collect. The capture records both
operations. Pass one question as a positional query or `--relevance`. Explicit
-IDs select material in caller order. See the [migration guide](../../operations.md#migrate-old-text-queries)
+IDs select material in caller order. See the [migration guide](../operations.md#migrate-old-text-queries)
for callers that previously passed a separate query filter and ranking cue.
```sh
diff --git a/docs/module-layout.md b/docs/guides/module-layout.md
similarity index 95%
rename from docs/module-layout.md
rename to docs/guides/module-layout.md
index cd0a05caa..167d0aadb 100644
--- a/docs/module-layout.md
+++ b/docs/guides/module-layout.md
@@ -2,10 +2,10 @@
Four peer modules own the runtime. Knowledge owns retrieval, Harness owns
execution and retention, Benchmark owns assessment, and Apps composes these
-through CLI and Python entry points. [Architecture](architecture.md) describes
+through CLI and Python entry points. [Architecture](../architecture.md) describes
the dependencies. This page defines placement, import rules and compatibility.
The [retired path inventory](#retired-root-modules) records the old package
-root and the [Apps migration inventory](apps-module-migrations.json) records
+root and the [Apps migration inventory](../apps-module-migrations.json) records
retired Apps paths and their replacements.
@@ -17,31 +17,31 @@ from a short README next to the code. Describe what it owns, where callers
enter, the invariants an extension must preserve and where to find the tests.
Small internal packages can share their parent README.
-- [Apps](guides/apps.md) covers assembly, host adapters and result delivery.
-- [Benchmark](../src/inferrsi/benchmark/README.md) covers task discovery and independent assessment.
-- [Harness](../src/inferrsi/harness/README.md) covers execution, retention and recovery.
-- [Knowledge](../src/inferrsi/knowledge/README.md) covers package data, lookup and reads.
+- [Apps](apps.md) covers assembly, host adapters and result delivery.
+- [Benchmark](../../src/inferrsi/benchmark/README.md) covers task discovery and independent assessment.
+- [Harness](../../src/inferrsi/harness/README.md) covers execution, retention and recovery.
+- [Knowledge](../../src/inferrsi/knowledge/README.md) covers package data, lookup and reads.
Keep a local design decision in the module README when a short explanation is
enough. A module with a longer lifecycle, rationale or failure model can link to
a `DESIGN.md` beside its README. Document designs shared by several modules in
-the relevant topic under `docs/`. [Architecture](architecture.md) owns
-cross-module boundaries, dependencies and composition. [Contracts](contracts/)
+the relevant topic under `docs/`. [Architecture](../architecture.md) owns
+cross-module boundaries, dependencies and composition. [Contracts](../contracts/)
own versioned interfaces, schemas and evidence rules. Link to the owning design
or contract from the module README. When ownership changes, follow the
-[documentation refactor procedure](contributing.md#documentation-during-a-refactor).
+[documentation refactor procedure](../contributing.md#documentation-during-a-refactor).
## Target modules
### Apps modules and retired imports
-The [Apps overview](guides/apps.md) describes the CLI and public Python entry points.
+The [Apps overview](apps.md) describes the CLI and public Python entry points.
The package root contains `__init__.py` and `api.py`. Workflows compose core ports;
handoff binds and projects records; storage owns fixed reads, writes and result envelopes.
Host inspection binds platform probes, integrations own external adapters, and delivery,
views and legacy own report delivery, read-only presentation and previous run formats.
-The [migration inventory](apps-module-migrations.json) gives each retired import, its
+The [migration inventory](../apps-module-migrations.json) gives each retired import, its
replacement, exported names and first removal version. From 0.3.4 use those
canonical imports. For the engineering verifier use
`python -m inferrsi.apps.workflows.skill_eval_engineering`, or invoke that installed
@@ -57,7 +57,7 @@ its classes then name their canonical modules and ordinary `pickle.load` reads i
Keep original files and digests. For other old Python pickles, controller snapshots,
or frozen optimization runs, use the original wheel and its pinned worker to inspect
or resume them, including `status` and `recover`. Follow the
-[release-boundary recovery rules](guides/optimization-workflow-unification.md#release-boundary-recovery).
+[release-boundary recovery rules](optimization-workflow-unification.md#release-boundary-recovery).
`apps.api.CandidateProvider` and `EvidenceCapture` refer to the canonical handoff
classes. `EvaluationPort` remains defined in `apps.api`. Storage has no dependency
@@ -85,7 +85,7 @@ nothing. C2 (#451) moved these out of root
no forwarding shell or alias.
The package root has exactly two tracked files, `__init__.py` and `__main__.py`,
-as pinned by [the inventory test](../tests/repository/test_package_root_inventory.py).
+as pinned by [the inventory test](../../tests/repository/test_package_root_inventory.py).
The build-generated `_version.py` is wheel metadata. New implementation belongs
in an owning subpackage. See [retired root modules](#retired-root-modules) for
the former paths and their replacements.
@@ -262,9 +262,9 @@ section keeps the record of the nine pairs and the rules that still apply. The
heading is unchanged because other pages link to it.
These exceptions implement D018/D020 in
-[`contracts/gate-policy-runstore-and-first-prs.md`](contracts/gate-policy-runstore-and-first-prs.md)
+[`contracts/gate-policy-runstore-and-first-prs.md`](../contracts/gate-policy-runstore-and-first-prs.md)
and
-[`contracts/isolation-errors-and-cli.md`](contracts/isolation-errors-and-cli.md).
+[`contracts/isolation-errors-and-cli.md`](../contracts/isolation-errors-and-cli.md).
They stay Proposed until this policy passes formal architecture review. K01
must not start before that review accepts them.
@@ -492,7 +492,7 @@ starts.
Importing a retired path raises `ModuleNotFoundError`, in external code too,
and a pickle that names a class or function by one no longer loads.
-[`CHANGELOG.md`](../CHANGELOG.md) states the full import and pickle impact.
+[`CHANGELOG.md`](../../CHANGELOG.md) states the full import and pickle impact.
Frozen evidence is not rewritten; a historical campaign replays with its
original bundle.
@@ -539,7 +539,7 @@ the top level and takes `mindie_knowledge` inside `read()`. It is not described
as standard-library-only overall. The grant file, its explicit opt-in, the
recorded read receipts and the OBS layout are unchanged. The `inferrsi mindie`
and `inferrsi campaign import-mindie` commands, the Codex configuration in
-[codex-plugin.md](guides/plugins/codex-plugin.md) and the MCP server name are unchanged.
+[codex-plugin.md](plugins/codex-plugin.md) and the MCP server name are unchanged.
The root now holds exactly the two files `__init__.py` and `__main__.py`. The
build-generated `_version.py` is separate wheel metadata.
diff --git a/docs/guides/operations.md b/docs/guides/operations.md
new file mode 100644
index 000000000..24a168e62
--- /dev/null
+++ b/docs/guides/operations.md
@@ -0,0 +1,542 @@
+# Operation guide
+
+Use the intent map to choose a command or Python entry point, then follow the
+linked contract for the complete procedure.
+
+Effect classes used below:
+
+- **Read-only** — no writes outside caller-chosen output files.
+- **Candidate-writing** — writes only inside one explicitly authorized local store.
+- **Report-generating** — writes an HTML report into the caller-selected run directory.
+- **Experiment-executing** — runs caller-supplied commands under the experiment contract.
+
+## Intent map
+
+| Intent | Entry | Effect class | Boundary |
+| --- | --- | --- | --- |
+| Verify whether RSI knowledge improves optimization efficiency | CLI `benchmarks compare`; [comparison workflow](../benchmarks/benchmark-comparison.md) | Local experiment records / explicit native handoff / report-generating | Apps freezes two-task on/off plans, returns host actions, verifies retained finals and reports Benchmark comparisons; no hidden Agent launch |
+| Complete a task optimization in the current Agent | CLI `benchmarks session start/knowledge/round/status/final/recover` | Experiment-executing / local records | Frozen budget, actual candidates and independent task outcomes. The current Agent drives edits. Real usage is imported explicitly. Recovery collects an existing execution using its [pinned runtime](optimization-workflow-unification.md#release-boundary-recovery) |
+| Optimize an ordinary project in the current Agent | CLI `campaign start/knowledge/round/status/final/recover` | Experiment-executing / local records | Harness freezes explicit caller-provided checks, manages multi-file candidates, executes and assesses retained results. This path does not depend on Benchmark or infer acceptance from the goal. See [shared workflow](optimization-workflow-unification.md) |
+| Reuse one project service across multi-scenario checks | CLI `campaign start --evaluation-mode service_reuse`, then `baseline/round/profile/status/recover/final` | Experiment-executing / local records | Caller supplies protocol and service scripts. An optional profiler can run inline or on a settled round. `resume`, `refresh-references` and explicit retry retain recovery decisions. See [service reuse](service-reuse-campaigns.md) |
+| Prepare and record a fresh native Agent | CLI `agents prepare/dispatch/bind/record/status` | Local records / explicit host handoff | The initiating Agent calls native host tools. Records prevent repeated dispatch; exported host observations do not establish task acceptance. See [native sessions](native-agent-sessions.md) |
+| Discover packaged tasks | CLI `benchmarks list [--iterative]` / `benchmarks show`; Python `benchmark.registry.builtin_tasks` / `describe_task` | Read-only | Reads the installed registry and [task manifests](../benchmarks/engineering-benchmarks.md). The optional filter selects task packages with an `optimization.py` file at their root |
+| Execute one packaged task | CLI `benchmarks run`; Python `apps.workflows.benchmark_operations.run_task` | Experiment-executing | Application launches the task entry, supplies the execution callback and preserves arguments and exit status. The task owns its device, measurement and assessment protocol |
+| Find relevant cases, skills and records | CLI `find` | Read-only | Default discovery across the registered library and package records. Follow the emitted command to read a hit and its revision |
+| Inspect the package catalog | CLI `knowledge search` / `knowledge show`; catalog API | Read-only | Filtered inventory and existing catalog scripts. Uses the installed package's tier/repo/backend/scenario filters and IDs |
+| Prepare model-aware engine research | CLI `knowledge research`; Python `research_knowledge` | Read-only | Independent model/framework/task/modality/mechanism queries over the same package catalog; source-grounded known profiles, deduplicated matches and explicit target annotations; no engine/hardware qualification |
+| Enter an inference task or discover/read skills | CLI `skills enter` / `list` / `show` / `resource` / `reference` | Read-only | `enter` loads one primary owner's complete procedure before evidence search. `list`/ `show` inspect skill metadata and instructions. `resource`/`reference` resolve paths for your file reader. |
+| Retrieve and cite external round knowledge | CLI `benchmarks session knowledge / knowledge-read`, AB/BA `campaign knowledge / knowledge-read` | Local evidence-writing | Requires an explicit `--cannbot-platform` at start and an approved project grant. Retains search and read metadata. Cite a delivered receipt with `round --knowledge-ref`. See [round retrieval](../benchmarks/optimization-benchmarks.md#include-cannbot-in-the-round) |
+| Collect selected knowledge | CLI `collect`; Python `KnowledgeReader.collect` | Read-only | Batch selection and budgeted assembly by query or exact IDs, with revisions and omissions. The only accepted explicit `--relevance-method` value is `find-lexical-v1` |
+| Read exact material/resources | CLI `read` / `resource`; Python `KnowledgeReader.read` / `KnowledgeReader.resource` | Read-only | Returns the requested revision or an explicit unavailable/stale error; never substitutes newer bytes |
+| Export legacy cited material | CLI `context` | Read-only | Cited package export for manual use with a coding agent; not a conversation store and not a full Collect equivalent |
+| Create/update a store candidate | Python `KnowledgeStore.create` / `KnowledgeStore.update` | Candidate-writing | One explicitly authorized local store; expected-revision updates with reason and evidence; retained history; no promotion and no edits to package/checkout content |
+| Inspect a store candidate's history | Python `open_knowledge_store(...).history` | Read-only | Opens an existing store and reads the revision lineage for one store ID |
+| Amend repository-owned knowledge | Scoped repository PR | — | Repository review and integration authority apply; this is not a runtime store Update |
+| Validate or preview a YAML task file | CLI `task validate` / `task preview [--json]` / `task schema` / `task template`; [task input](task-input.md) | Read-only | Reads one schema v1 task file and prints field errors, effective normalized values, their sources and plan/run blockers. Starts no process or probe and writes no workspace, plan, run or evidence file. A complete preview does not authorize execution |
+| Inspect/prepare experiments | CLI `doctor`; `plan` or `--dry-run` | Read-only inspection / preview | `doctor` may invoke bounded probes and does not certify target compatibility; `plan` previews a specification without persisting a campaign or authorizing execution |
+| Execute/inspect experiments | CLI `run`; `status`; `report` | Experiment-executing / read-only / report-generating | `run` executes caller-supplied commands and records evidence; `status` reads recorded progress; `report` generates HTML from recorded evidence |
+| Deliver retained results | CLI `export --input --output [--agent-job]`; Python `apps.delivery.export_bundle` / `read_bundle` | Report-generating | Publishes Markdown, offline HTML, versioned result JSON and artifact index from one snapshot without remeasurement. Optional native-job input verifies standalone Benchmark terminal token usage. Iterative CLI final returns separate delivery status. See [result delivery](result-delivery.md) and [Benchmark metrics](../benchmarks/benchmark-metrics.md) |
+| Inspect/verify archived evidence | `python tools/verify_evidence_archive.py`; [archive contract](evidence-archiving.md) | Read-only by default; explicit network/local scratch with `--download` | Default validates metadata offline; `--archive`/`--download` authenticates and bounds archive reading; `--recomputed` compares separately generated v2 results; never executes archived code or changes verdicts |
+| Rebuild scoped legacy evidence views | `python tools/rebuild_model_evidence.py --archive --output ` | CPU-only; creates a new output directory | Authenticates original bytes and pinned projection/code; no extraction, network, archived-code execution or campaign qualification |
+| Inspect evidence inventory / generate budget input | `python tools/validate_evidence.py [--budget-assets]` | Read-only | Offline layout/hash/schema checks; optional disposable #328 metadata view derived from campaign authority; no downloads |
+| Execute one ordinary local CPU command with a fixed record | Python `inferrsi.harness.api.Harness.allocate` / `execute` / `read` | Experiment-executing / record-writing | One explicit RunStore root and one trusted local CPU target; ordinary command mode only; a record holds execution facts, so exit 0 is not a verdict; no device, model or network fallback |
+| Seal a generation request before execution | Python `inferrsi.harness.generation.prepare_generation`; [original bounds](../contracts/generation-bounds.md) | Local record-writing | Seals approved context, plan and original deadline/budget metadata; allocates no attempt, starts no process and does not enable generation-lineage evaluation |
+| Verify a frozen preparation binding before registration | Python `inferrsi.harness.prepared_binding.verify` / `read` / `project` | Read-only / pure projection | Fixed ArtifactRef and read-only stream capability; no registration, entry resolution or execution; [binding contract](../contracts/harness-prepared-binding.md) |
+| Verify and execute one frozen source evaluation entry | Python `inferrsi.harness.api.Harness.execute` with trusted `LocalCpuTarget(module_root=...)` | Experiment-executing / record-writing | Fixed preparation and expected code digest; actual source captured after registration; T37 refusals start no worker; [source-entry contract](../contracts/harness-entry-verification.md) |
+| Evaluate one retained generated candidate | Python `inferrsi.harness.api.Harness.execute` with `generation_record_ref`; [same-Store lineage](../contracts/generation-lineage.md) | Experiment-executing / record-writing | Same authorized Store, sealed successful generation and exact retained candidate; distinct attempt, original deadline/budget scope and policy; registered replay precedes fresh source reads; no worker-manifest parsing or automatic rerun |
+| Capture and seal evaluation proofs | Python `Harness(..., evidence_capture=...)`; [capture contract](../contracts/harness-evidence-capture.md) | Read-only capture callback / record-writing | H authorizes attempt bytes, seals actual provenance and retains drafts before one commit; ordinary mode and replay never call the observer |
+| Assemble evidence capture by role | Python `apps.api.EvidenceCapture`; [host adapter](../contracts/apps-evidence-capture.md) | Read-only byte assembly / injected pure projection | Reads only H-authorized candidate/report refs; no grading, producer sealing or record/archive writes; reentry is short-circuited by H |
+| Replay the same saved execution request | Python `inferrsi.harness.api.Harness.execute` | Existing-state query / fixed record-reading | Same attempt and canonical digest; existing state short-circuits fresh binding/execution; [replay and original limits](../contracts/harness-evaluation-replay.md) |
+| Freeze a configured P1 preparation | Python `benchmark.preparation.PreparationService.prepare`; [production prepare](../contracts/production-prepare.md) | Read-only resource access / pure encoding | Verifies supplied frozen worker/resource bytes and returns a preparation, protocol and role-keyed closure; Apps separately archives them before publishing a Ref |
+| Evaluate saved requests | CLI `evaluate prepare/execute/assess`; [saved-request CLI](apps-evaluate-cli.md) | Local archive/output writing; execute additionally runs the configured H target | Explicit saved request, output ID, storage and trusted runtime configuration; reuses Apps ports and results without allocating attempts, selecting feedback or retrying |
+| Assess one fixed P1 record offline | Python `benchmark.assessment.assess`; [production assess](../contracts/production-assess.md) | Read-only retained evidence / pure encoding | Verifies the frozen protocol, actual capture and proof bytes; returns independent claims without launching a worker or writing an archive; Apps selects the primary key and archives the result |
+| Project P1 worker reports into capture drafts | Python `benchmark.proofs` codecs / `ProofProjector.project`; [proof drafts](../contracts/production-proofs.md) | Pure computation | Produces proof bytes from supplied capture facts and reports; H must authenticate, retain and seal them before commit; no worker or grader execution |
+| Configure the CPU evidence-smoke task | Python `benchmark.cpu_smoke.prepare_service`; [task contract](../contracts/p1-cpu-smoke.md) | Read-only owned resource configuration | Freezes the standalone worker and same-source baseline for the existing prepare port; actual execution/retention stays in H; no performance-gain claim |
+| Seal a generation with frozen feedback authorization | Python `harness.generation.prepare_generation`; [opt-in feedback profile](../contracts/generation-feedback-policy.md) | Local context / policy / generation-plan retention | Optional fixed policy and source record Refs authorize original scope/check proofs before provider calls. Absent-policy calls remain a trusted-host path; no automatic execution or policy-approval authentication |
+| Seal host-approved generation context without a policy Ref | Python `harness.generation.prepare_generation`; [feedback boundary](../contracts/generation-feedback.md) | Local context / generation-plan retention | The trusted host authorizes feedback and excludes final-only results before handoff. Without the opt-in policy Ref, H seals supplied material and does not prove feedback-policy enforcement or execute a worker |
+| Visualize a recorded run or campaign | CLI `dashboard`; [dashboard](../dashboard.md) | Report-generating / local read-only serving | Writes an offline HTML snapshot or serves an optional live view on loopback; does not run an agent or validate a claim |
+| Capture a knowledge context | CLI `campaign capture-context`; [offline dashboard](../dashboard.md#record-the-optimization-story-campaign-trace) | Local evidence-writing | Saves assembled context and resource hashes in a new `knowledge/.json`. Supports ordinary questions and explicit IDs. The only accepted explicit `--relevance-method` value is `find-lexical-v1` |
+| Retain an executed retrieval | Python `apps.workflows.campaign.save_retrieval`; [capture contract](knowledge/knowledge-retrieval-trace.md#retain-a-standalone-result) | Local evidence-writing | Saves an existing catalog/collect result under a fresh campaign capture ID; no new search or automatic publication |
+| Import one round of knowledge searches | CLI `campaign import-search`; [round import](../dashboard.md#import-one-rounds-searches) | Local evidence-writing | Reads a Codex rollout window or context captures. With `--archive-review`, retains excerpts of attributable tool returns and reviewed decisions for readers of the evidence bundle. |
+| Record the optimization log | CLI `campaign log`; [offline dashboard](../dashboard.md#record-the-optimization-story-campaign-trace) | Local evidence-writing | Validates and stores a new numbered campaign log version; the dashboard cross-checks it against captures and runs |
+| Assemble an optimization trace | CLI `campaign assemble-trace`; [per-candidate narrative](../dashboard.md#per-candidate-narrative-schema-version-1) | Local evidence-writing | Copies an explicitly reviewed context into a new bounded campaign-root snapshot; caller owns redaction and narrative accuracy |
+| Import a MindIE read | CLI `campaign import-mindie`; [Codex workflow](plugins/codex-plugin.md#mindie-knowledge) | Local evidence-writing | Retains caller-supplied query/explain bytes and hashes, exports delivered graded bodies and a trace context fragment; no activation, model call, transcript capture or automatic caller review |
+| Associate runs with a local campaign | CLI `campaign init` / `campaign record` / `campaign decide`; [offline dashboard](../dashboard.md) | Local evidence-writing | Legacy manual records reference existing artifacts and never start an agent; record/decide cannot mutate a managed optimization campaign |
+| Adapt existing Flare delivery evidence | [Offline qualification adapter](../benchmarks/flare-qualification.md), `python -m inferrsi.benchmark.validators.flare` | Read-only | Existing raw packets and a separate receipt; one HTTP delivery metric, no model/server/device execution |
+| Evaluate selected skill revisions | [Bounded skill-evaluation driver](skill-evaluation/README.md) | Experiment-executing | Explicitly authorized real Codex calls, independent task verdicts and private evidence; separate from numeric engine-performance scoring |
+| Compare skill additions or updates | [Configured skill comparison](skill-evaluation/skill-eval-comparison.md), `python -m tools.skill_eval_compare` | Read-only preparation / experiment-executing / report-generating | Fixed Git snapshots and one shared exam; explicit plan authorization for execution; JSON + Markdown regeneration makes no model calls |
+| Export a cloud-generated parser pair | [Generation-only protocol](skill-evaluation/skill-eval-generation-only.md), `python -m tools.skill_eval_cloud_export` | Local evidence-writing; no execution or publication | Validates frozen inputs and retained sources; writes one bounded inert JSON bundle, never executes parser source |
+| Review the historical parser generation pilot | [Main-only historical job record](skill-evaluation/skill-eval-historical-job.md) | Historical audit | The checked-in authorization expired at 16:00 UTC on 2026-10-30. The workflow and frozen controls remain available for audit. |
+| Qualify an artifact verifier host | [Manual reviewer qualification](skill-evaluation/skill-eval-reviewer-qualification.md), `python -m tools.skill_eval_qualify` | Trusted-control execution / report-generating | Manual main-only workflow; fixed software controls, no model or external artifact input; unavailable isolation fails rather than skips |
+| Replay a cloud-generated parser pair | [Isolated cloud replay](skill-evaluation/skill-eval-cloud-replay.md), `python -m tools.skill_eval_cloud_replay` | Untrusted-artifact execution / report-generating | Manual pinned data ingress; same-host controls before bubblewrap-only replay; no models or credentials |
+| Validate one harness-improvement step | [Offline improvement](harness-improvement.md), Python `tools.skill_eval_improve.prepare` / `run_offline` | Snapshot-writing / offline experiment-executing | Supplied declarative INV/DOM edits, shared total limits, rerun and one holdout gate; trusted fixed-output clients only; no real-model or Store execution |
+| Build an offline candidate tree and completion menu | Python `harness.search_tree` / `harness.verification_plans.completion_menu`; [control contract](speculative-search.md) | Read-only / in-memory transitions | Immutable candidates, scoped caller-supplied receipts and bounded exact plans; execution, durable state, accounting, learned roles and final acceptance require separate adapters |
+| Run bounded speculative Engine search and role updates | `inferrsi search engine`; [support and configuration](speculative-search.md) | Execution / candidate writes / CPU model updates | Explicit shared RunStore, permissions, checkpoint, budgets, domain and final gate; actual device allocation is caller-owned |
+| Inspect/export speculative search | `inferrsi search status` / `search export` | Read / output artifact | Reads the existing store; never restarts search, training or final evaluation |
+| Compose Skill speculative search | Python `apps.workflows.search_benchmarks.SkillEvaluator` and checkout `tools.speculative_skill.Comparator` | Explicit provider execution through existing comparator | Frozen original baseline, split descriptors, independent grader and bounded provider; see campaign accounting limits in the support matrix |
+| Plan and report skill PR evaluations | [Skill PR integration](../skill-eval-pr.md), `python -m tools.skill_eval_pr` | Read-only planning / authorized experiment-executing / PR-publishing | Trusted mapping, exact operator approval, consumed execution identity and credential-separated publication from retained evidence; no automatic paid trials |
+| Recover goal progress and the next proposal | [Offline goal checkpoints](goal-checkpoints.md), `python -m tools.goal_checkpoint` | Read-only | Explicit scope/criteria, pinned owner decisions and existing comparison receipts; a disposable view, never execution or acceptance authority |
+| Summarize campaign gains | `tools/campaign_summary_chart.py`; `report`/`run` figure | Figure-generating | Renders recorded values into one gain figure plus a matching table; validates the specification and computes nothing new |
+
+The `collect`, `read` and `resource` commands share the reader's rules; they
+are distinct from `knowledge search`, whose package catalog filters
+(tier/repo/backend/scenario) intentionally exclude checkout and store items.
+
+## Discovery and reading
+
+### Discover MLX hardware — doctor --backend mlx
+
+- **Inputs:** a prepared Git checkout and its existing repo type, target Python,
+ optional case-insensitive --device-model chip match. Discrete --device-ids are
+ unsupported for this unified-memory discovery probe.
+- **Effect:** read-only. On macOS, the existing bounded command runner queries
+ sysctl hw.optional.arm64 machdep.cpu.brand_string. Non-macOS hosts are rejected
+ without a sysctl call. Target-Python metadata includes mlx version/null without
+ importing MLX.
+- **Output:** actual probe facts and chip identity when available; explicit
+ unavailable or device_model_mismatch reasons otherwise. doctor exits 1 for
+ unavailable/mismatched discovery. compatibility stays unverified even when
+ the chip is available or the MLX package is installed.
+- **Boundary:** no engine adapter, package installation, model execution or
+ Metal/performance qualification. The dependency/mlx source cards are separate
+ imported guidance; common skill discovery records are not counted as MLX
+ backend records.
+- **Example:** inferrsi doctor --repo . --repo-type vllm_omni --backend mlx
+
+### Discover discrete accelerators — doctor --backend rocm|ascend
+
+- **Inputs:** a prepared Git checkout and its existing repo type, target Python,
+ optional repeatable --device-ids and one case-insensitive --device-model.
+- **Effect:** read-only. The bounded command runner calls `rocminfo` or
+ `npu-smi info`; the output is parsed into device records (Agent blocks, or the
+ pipe-framed NPU table) rather than searched for loose tokens.
+- **Output:** the parsed records plus the probe facts. A requested ID and the
+ requested model must match the same record; an ID appearing only in a
+ temperature or power cell does not count. Empty or unrecognized output yields
+ no records, so discovery stays unavailable and records why. selection_verified
+ is true only for a matched record.
+- **Boundary:** discovery proves that a tool reported a device, not that the
+ backend, engine or kernel path is compatible. compatibility stays unverified.
+- **Example:** inferrsi doctor --repo . --repo-type vllm_omni --backend ascend --device-ids 0 --device-model 910B3
+
+### Search packaged records — `knowledge search` / `knowledge show`
+
+Use `find` for ordinary discovery. With no query, `knowledge search` lists
+matching package records in ID order. With a query, it uses Find ranking over
+the filtered package catalog and still returns complete catalog records. The
+`context` export shares this selector. Text query results can change in both
+membership and order. Use `--explain` for the recorded ranking and counts.
+
+- **Inputs:** optional query words and `--tier`, `--repo-type`, `--backend`, `--scenario`, `--limit`, `--json`, `--explain`; `show` takes one record ID.
+- **Scope:** the installed package catalog (authored records and registered skill views in `skill_library/`) only.
+- **Output:** tab-separated record lines (id, status, backend, title), or a JSON list with `--json`; `--explain` returns a JSON envelope with `items` and `retrieval` (entry, ranking, scores and counts). Python uses `search_knowledge(..., explain=True)` for that envelope. `show` prints one full record as JSON.
+- **Side effects:** none.
+- **Failure behavior:** no match prints nothing and exits 0 — an empty result is not an error (an empty JSON list with `--json`, or empty `items` in the `--explain` envelope); an unknown `show` ID and unsupported filter values exit 2.
+- **Example:** `inferrsi knowledge search --repo-type vllm_omni --backend ascend --json`
+
+The tier/repo/backend/scenario filters are package-only: an empty filtered
+result does not mean that no checkout or store knowledge exists. See the
+[three-tier guide](../../src/inferrsi/knowledge/data/skill_library/records/README.md) for all sources.
+
+### Prepare model-aware research — `knowledge research`
+
+- **Inputs:** model identity; repeatable `--framework`, `--task`, `--modality`, `--mechanism`; existing `--tier`, `--repo-type`, `--backend`, `--scenario` hard filters and `--limit` output cap; optional `--target-backend`, `--target-device`, positive finite `--target-memory-gib` annotations.
+- **Scope:** installed package records only. A packaged MiniMax-H3 profile supplies its source-grounded diffusion/video/audio identity and component roles. Unknown models use only caller-supplied dimensions and need source inspection; no architecture is guessed.
+- **Output:** JSON query groups and match counts, a bounded deduplicated union with `matched_queries`, unchanged full records/provenance, active filters, component roles, preparation/example resource paths and an unverified target state. Queries take turns contributing results; this ordering does not rank engine quality.
+- **Side effects:** none; no network requests, hardware probes, model download or engine execution. Target annotations do not add runtime backends.
+- **Failure behavior:** no match returns an explicit empty envelope and exits 0; invalid limits/memory or unsupported catalog filters exit 2. A zero-match dimension stays visible.
+- **Example:** `inferrsi knowledge research MiniMax-H3 --framework mlx --target-backend metal --target-device "M5 Mac Studio" --target-memory-gib 64 --limit 12`
+- **Python:** `from inferrsi.knowledge.research import research_knowledge`; `research_knowledge("MiniMax-H3", frameworks=["mlx"], modalities=["video"], limit=12)`.
+
+Each research query uses Find over the same filtered package catalog. Querying
+separate dimensions broadens discovery while preserving the active package filters.
+Keep those filters explicit when transferring mechanisms from other backends;
+target intent does not qualify their applicability. Read the canonical
+[preparation procedure](../../src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/model-aware-preparation.md)
+and the repository-owned [h3.c residency audit](../../src/inferrsi/knowledge/data/skill_library/systems/engines/h3-c/audit-h3-runtime-residency/SKILL.md)
+for native-engine reference selection, full encoder/DiT/VAE accounting,
+quantized-package compatibility and target hardware decisions. Returned resource
+paths are relative to `importlib.resources.files("inferrsi")` and ship in the wheel.
+The small model profile links that skill's full inventory and worked example;
+those resources retain their repository owner and source attribution.
+
+### Discover/read packaged or custom skills — `skills list` / `enter` / `show` / `resource` / `reference`
+
+- **Inputs:** The agent selects a primary skill by deliverable and runs `inferrsi skills enter task-accuracy`, for example. It returns the primary's complete procedure and host header before supporting evidence search. The base installation can omit the embedded search metadata from this delivery. A pinned `read --resource` exposes the complete source file, including its metadata. An unknown, unavailable or non-primary owner is an error. `list` reads skill frontmatter (and legacy sidecars in historical/custom checkouts); `show ` selects one instruction body; `resource ` and `reference ` resolve one path. The default is the installed library's registered skills; an explicit `--root` selects a custom flat tree or a categorized library with `skill-index.json`. PyYAML, a core dependency, supplies the YAML parser for frontmatter operations; the `skills` extra remains a compatibility alias.
+- **Scope:** complete packaged skills under `data/skill_library/`, or the explicitly selected custom root. The 21 English engine and research-router skills remain accessible through catalog records and library navigation, separately from the registry.
+- **Output:** metadata listing, one instruction body, or a resolved path.
+- **Side effects:** none. `resource`/`reference` do not load or execute the target.
+- **Failure behavior:** missing skill, undeclared reference or path escape is an error.
+- **Example:** `inferrsi skills show weight-loading-optimization`
+
+Reading instructions does not authorize their commands. The catalog links full
+packaged bodies; the two matrices remain authoritative.
+
+### Export legacy cited material — `context`
+
+- **Inputs:** optional query; **required** `--repo-type` and `--backend`; optional `--tier`, `--scenario`, `--limit`, `--output`.
+- **Scope:** cited catalog material from the installed package.
+- **Output:** a Markdown reference bundle at the chosen path (the resolved path and record count are reported), or to stdout without `--output` (text only).
+- **Side effects:** writes only the caller-chosen output file.
+- **Failure behavior:** no match produces an empty export (header only), not an error; unsupported filter values exit 2.
+- **Example:** `inferrsi context --repo-type vllm_omni --backend cuda --output context.md`
+
+Imported source text is data for your agent, not authorization to execute
+upstream instructions.
+
+## Normalized knowledge (Python)
+
+### Find — `find` / `inferrsi.knowledge.knowledge_find.find`
+
+One ranked list for one question, across packaged skills, imported records and
+checkout cases. Run a result's `open` command to read its complete entry and
+receive a revision. Use that revision with the same ID and source selection
+for a pinned `read` or `resource` call.
+
+Cases are ranked alongside skills, so prior rejected directions can surface
+directly. One matching term is enough to rank an entry, and `--limit` caps the
+result list. Scoring reads the corpus files directly. The reader opens bundles
+to validate material for the returned hits.
+
+Scoring is `idf x field weight x sqrt(occurrences)` summed over query terms,
+with titles, summaries, tags and case findings weighted above bodies. Bodies
+longer than the corpus median get less weight so a broad manual needs more
+specific matches to outrank a short case. Separators
+do not bind: `kv_cache`, `kv-cache` and `KV cache` all tokenise to the same two
+terms, so a query in plain words reaches the punctuated spellings this corpus
+also uses. Latin terms still match on boundaries, so `oom` does not match inside
+`headroom`. CJK is cut into overlapping bigrams, because single characters make
+idf treat grammatical particles as rare terms. Ties break towards the stronger
+recorded state rather than alphabetical identity. This is deterministic lexical
+matching, not a learned ranking, and a hit never asserts that an entry applies.
+
+Common English function and question words such as `the`, `how` and `should`
+are omitted. Conditions such as `not`, `without`, `before` and `after` still
+contribute. Backend preference uses platform names in the original query,
+including `昇腾` for Ascend. When the query names exactly one supported backend,
+results declared for a different backend receive half their lexical score.
+`--explain` reports the adjusted contribution of each matched term.
+
+Chinese query terms expand through `data/skill_library/config/query_aliases.json` before ranking.
+The packaged library is English by policy while its readers work in Chinese, and
+the corpus holds too few Chinese characters for a Chinese query to score on its
+subject. Expansion is one-way and query-side: 显存 reaches `device memory`, not
+the reverse, and an entry is only listed when that English form actually occurs
+in the corpus. A query whose terms were expanded reports them under `expanded`,
+so a wrong expansion is visible in the result rather than only in the ranking.
+
+Three limits are inherent to lexical ranking and are recorded here rather than
+worked around. A query made only of terms common to this corpus ("operator",
+"test", "graph", "speedup") has little to rank on and may bury the intended
+entry. A query that shares no words with its target does not reach it: asking
+for "moving attention state to host memory" misses an entry that says `kv`,
+`offload` and `tier` throughout, because nothing matches. Name the specific
+symptom, operator or flag where you can, and when a plausible query returns
+nothing useful, search the corpus directly rather than assuming it holds
+nothing — `find` ranks words, not meanings.
+
+The third limit is deciding whether the question needs the corpus. `find`
+returns `no_match` when no query terms match. On the labelled set, a majority
+of queries were ones an engineer should decide without searching at all, yet
+each had lexical matches. Their scores overlap the answerable range, so a
+cutoff would suppress useful results too. The caller decides whether the
+question calls for prior evidence.
+
+- **Inputs:** the query, `--limit`, `--kinds` (subset of `case,skill,record`), `--skill-root` to select the library for cases and skills, `--explain` for per-term contributions, `--json`.
+- **Scope:** installed package records and the packaged (or selected) skill library, including its cases. Packaged-skill projections are excluded from the record side so one owner is not ranked under two identities.
+- **Output.** Items identify their `id`, `authority` (`package` or `checkout`),
+ `source_location` (`installed` or `checkout`), `kind`, recorded `state`,
+ `score`, `title` and corpus-relative `path`. `source_location` identifies
+ where the material was indexed. For installed skill and case bodies, the
+ `checkout:` read reference uses `--installed-library` to resolve the source
+ from the reader's installation. A custom root uses `--skill-root`.
+ Where recorded, items carry source, summary, applicability, limitations and
+ local verification status. The limitations preview contains up to three
+ complete entries within a 400-byte UTF-8 JSON list. `limitations_withheld`
+ counts omitted entries. Open the owner for the complete list.
+ Case findings are ordered by query overlap,
+ with `findings_total` and `findings_withheld` describing the available preview.
+ Pass `--decision-cards` to add a revision-pinned L1 read and its exact card
+ size to each readable Skill, Record or displayed Case finding. Follow the
+ selected `decision_card.read_args` to read that atom. See the
+ [decision card read contract](../knowledge-operations.md#read-a-decision-card).
+ Each finding carries its outcome, reason, revisit condition and any assessed
+ scope and bounds. `bounds_source` identifies whether bounds apply to the
+ finding or the whole entry. The envelope reports `corpus_size`, `matched`,
+ `no_match`, any `expanded` terms and retrieval limitations.
+- **Reading a hit.** Plain output prints a POSIX `open` command or a labelled
+ PowerShell command on Windows. JSON exposes the rendered command as `ref`,
+ full subprocess arguments as `open_argv` and InferRSI CLI arguments as
+ `read_args`. The arguments include the source-qualified ID and any needed
+ source flag. Most hits use `read --material --omit-resources` to return the
+ entrypoint content, provenance and revision. For a skill, the procedure
+ omits the embedded machine annotation. A readable hit's
+ `next_read_content_bytes` counts the UTF-8 bytes in that command's `content`
+ on the snapshot inspected by Find. For a future unpinned read this field
+ is a size estimate. A later edit can change the content and its size.
+ Use Collect's context budget for bounded delivery. The count excludes the
+ envelope and additional resources. Remove
+ `--omit-resources` to list the bundle's resources. Hits that fail the reader's
+ material check carry `unreadable` with the reason.
+- **Without PyYAML.** PyYAML is a core dependency. When an install lacks it (for
+ example, one made without dependencies), an installed Skill with a
+ matching valid package record opens its original text through that record,
+ using `read --resource` and its exact revision. The result names the selected
+ resource in `content_resource`. A Skill in a custom root may require PyYAML.
+- **Side effects:** none. Retain the revision returned by `read` for evidence and resource followups.
+- **Example:** `inferrsi find "NPU OOM after caching per-step masks" --limit 3` returns the casebook entry recording that attempt first. A vaguer phrasing ranks the procedural skills above it, which is the first limit below rather than a defect.
+
+#### Show SearchSpace coordinates on Find hits
+
+Run this command from an InferRSI checkout with its verified SearchSpace index.
+
+```text
+inferrsi find "graph mode" --skill-root src/inferrsi/knowledge/data/skill_library --show-searchspace-coordinates
+```
+
+Find annotates the ranked local Skill hits from the verified registry with their
+coverage state and all declared resource × stage pairs. A registered Skill with
+`unknown` coverage has an empty pair list. In JSON, `searchspace_coordinates`
+is attached to the hit, and `searchspace_source` reports the matrix path and
+SHA-256 along with the Skill registry and metadata digests.
+
+Add `--searchspace-coordinate SSD Configure` to restrict the result to Skills
+with that exact pair. Each remaining hit still shows all its pairs. Find reports
+an error if the index is missing, stale or from a different checkout source.
+Run `python tools/build_skill_coverage.py --searchspace-index` in that checkout
+to regenerate the index, then retry.
+
+#### External channels are not installed with this package
+
+`find` can also query separately enabled read-only channels. A fresh install
+searches the packaged corpus. See [fresh-install output and setup](knowledge/external-channels.md#a-fresh-install-has-no-external-channel)
+for the explicit per-checkout grant and source access requirements.
+
+- **Inputs:** `--backend ` declares the task backend; **without it and
+ without an approved grant, no channel is searched** and each one reports
+ `backend_unknown`. `--no-external` skips all channels for CI and offline runs.
+ `--external-limit ` overrides the per-channel cap (`cannbot-knowledge` 100,
+ `mindie-agent` 5). `--external-timeout ` bounds discovery and search
+ together (8s default); `--platform` overrides the upstream platform in the grant.
+- **Output:** `external[]` sits beside `items`, never inside it. Each entry
+ carries `state`, `revision`, `elapsed_ms`, `score_scale` and `count`. A state
+ other than `ok` (`not_enabled`, `unreachable`, `index_stale`, `timeout`,
+ `version_mismatch`, `rejected`, `backend_unknown`) means the channel did not
+ answer — it is **not** the same as answering with no hits.
+- **Side effects:** none on this repository. A channel reads an external
+ checkout that the person approved; nothing is copied into the package, a
+ wheel or `evidence/`.
+- **Determinism:** `--no-external` reproduces the pre-channel output exactly.
+
+### Collect — `collect` / `KnowledgeReader.collect`
+
+Use Collect to take known material in caller-specified order. With
+`--context-bytes `, it assembles complete files up to a UTF-8 body budget and
+reports unavailable or oversized context. With no IDs and one question, Collect
+uses the same local Find ranking as `campaign knowledge`, `benchmarks session
+knowledge`, and `campaign capture-context`. See [selection and context](../knowledge-operations.md#ranked-discovery-and-budgeted-context)
+for provenance and accounting. To capture an installed Case exactly, follow the
+`find` result to `read`, then pass its ref and revision to
+`campaign capture-context --installed-library --id-ref REF --revision REF=REV`.
+
+#### Collect a pinned body and its L1 decision card
+
+Keep the qualified ref, revision and source options from Find or a known read.
+Repeat `--decision-card` for each selected body that needs a full L1 card. For
+a Case, append one original finding selector, such as `id:trace-loss` or
+`case.json#/findings/1`, to the ref with `=`.
+
+```sh
+inferrsi collect --installed-library --id "$REF" --revision "$REF=$REV" \
+ --context-bytes 65536 --decision-card "$REF" --json
+```
+
+Apps can call `inferrsi.apps.workflows.knowledge.knowledge_reader` with the same
+source and use `reader.collect(ids=[ref], revisions={ref: rev}, context_bytes=65536,
+decision_cards={ref: finding})`. Set `finding=None` for a Skill or Record.
+Collect delivers the usual context resources first. It then projects requested
+cards from those same bundles in ID order. The shared budget counts UTF-8
+resource content and each delivered card's compactly serialized, sorted-key JSON.
+`decision_cards` reports each request, including `over_budget` with the whole
+card size, `no_body` when Collect omitted the body, and `unavailable` for an
+invalid decision source or finding. See `omissions` and `context_omissions` for
+the body outcome. Store entries retain their existing `unsupported_context` result.
+To reopen a projected card's source or body, use `read REF --revision REV
+--resource PATH` with the same source options and the returned `source_resource`
+or `body_resource`.
+
+#### Migrate old text queries
+
+- `knowledge search QUERY` and `context QUERY` keep their package scope and
+ output format. Text queries now use Find and can match entries that contain
+ only part of the query. Omit `QUERY` for filtered inventory or use
+ `knowledge show ID` for one known record.
+- Pass one question as `collect QUERY` or `collect --relevance QUERY`. If an
+ old script combines a positional query and a separate cue, write one question
+ and express hard constraints with structured flags such as `--kind` and
+ `--backend`. Use `--kind knowledge` to search only the package catalog.
+- Remove old `--relevance-method` values from scripts and managed calls. Find
+ is the default and `find-lexical-v1` is the only accepted explicit value.
+ Check the new rank order before using it to select material in automation.
+- For exact collection and replay, use the retained IDs and revisions without
+ a positional query. With explicit IDs, `--relevance` can order optional
+ context resources while membership and caller order remain fixed. Read
+ historical captures for their original selected and delivered bytes.
+
+- **Inputs:** optional query, `--kind`, repeatable explicit `--id`, repeatable `--revision ID=REV`, `--limit`, `--max-bytes`, `--material`; `--skill-root` selects an explicit skills root, `--store` opens an existing store read-only (the store records its reserved skills root and rejects a mismatched or missing `--skill-root`).
+- **Scope:** installed package records, the selected library, and any explicitly opened store. A text query without a custom library or store can discover bundled Cases and Skills. Exact inventory selects the bundled library with `--installed-library`.
+- **Output:** with `--json`, the complete **normalized** envelope — items carrying the bundle's normalized metadata, resources and dependencies, plus `no_match`, `omissions`, `collisions`, `material_bytes` and the recorded limitations; fields that exist only in a package record's original entrypoint document are not projected into the normalized metadata and are read via `--material` or `resource`. Without `--json`, the envelope's selection is projected line-wise: one tab-separated line per item (`ref`, `revision`, `kind`, `state`, recorded `applicability`; free-text fields are control-character-escaped so one item stays one line), `collision` lines for multi-authority IDs, `omitted` lines with reason codes, an explicit `no_match` line when nothing was selected (query, filters or limits; when items were skipped the `omitted` lines above it carry the per-item causes), and — with `--material` — the entrypoint content in delimited blocks. The text mode does not print `material_bytes` or the envelope limitations; use `--json` for the complete envelope. The recorded `state` and applicability are printed as recorded and no validation status is invented. Exit 0 covers a result envelope, including no-match and omissions.
+- **Side effects:** none; both adapters and the read-only store connection are read-only.
+- **Failure behavior:** discovery-wide invalid identities fail the call. Per-item omissions are reported individually. Repository, tier and scenario filters use the package catalog. A backend filter scopes ranked discovery to the requested backend and shared material.
+- **Example:** `inferrsi collect --id package:inferrsi.ascend.skills.ascend_graph_mode --id package:inferrsi.ascend.skills.ascend_device_health --context-bytes 65536 --json`
+
+### Read exact material/resources — `read` / `resource` / `KnowledgeReader.read` / `.resource`
+
+- **Inputs:** `read` takes a qualified or unambiguous public ID and an optional `--revision` (the current revision when omitted). Use `--material` for the entrypoint or `--resource ` for a specific UTF-8 bundle resource. The `resource` command takes the ID, resource key, exact `--revision` and `--output` path.
+- **Scope:** one selected bundle from the package, checkout or store adapter.
+- **Output:** `read` returns the bundle view at the requested revision. With `--resource`, it identifies the returned text with `content_resource`. The `resource` command writes raw bytes to the requested output path. Use the same source flag when following up with either command.
+- **Side effects:** `resource` writes only the caller-chosen output file.
+- **Failure behavior:** ambiguous identity names the qualified choices; unavailable/stale revisions and missing/unsafe resources fail explicitly — no fallback to newer bytes.
+- **Example:** `inferrsi read checkout:case.qwen-ascend-rejected-directions --installed-library --material`
+
+## Store candidates (Python)
+
+Open the store with `inferrsi.apps.workflows.knowledge.open_knowledge_store`. Pass the
+authorized `store_root` and the store's reserved `skill_root`, if configured.
+The default opens an existing store read-only for history. Pass
+`writable=True` explicitly to create or update candidates.
+
+### Create / Update — `KnowledgeStore.create` / `.update`
+
+- **Inputs:** a complete candidate `Bundle`; Update additionally requires the expected current revision, a reason and an explicit evidence list.
+- **Scope:** one existing, explicitly authorized local store directory; store-owned candidate IDs only.
+- **Output:** the new revision; retained immutable history.
+- **Side effects:** writes only the store database; never package, checkout, evidence or matrix files.
+- **Failure behavior:** duplicate identity, stale expected revision, adapter-owned ID and validation failures are explicit errors.
+- **Example:** see [authorized local Create / Update](../knowledge-store.md).
+
+CLI/API availability does not itself grant write authority. Adapting read-only
+material into a store uses a distinct ID and records `derived_from` lineage; it
+never overwrites the original. Amending repository-owned knowledge follows the
+normal scoped PR path.
+
+## Experiments
+
+The public preparation, execution and assessment API remains
+`inferrsi.apps.api`. Its fixed artifact access and output publication use
+`inferrsi.apps.storage.archive`, `artifact_reader` and `result`; the directory
+creation helper is `inferrsi.apps.storage.evidence_layout.ensure_evidence_layout`.
+The CLI entry remains `inferrsi.apps.cli:main`. See the
+[output contract](apps-output.md) and [migration inventory](../apps-module-migrations.json)
+for the retired Apps imports and their canonical storage paths.
+`inferrsi.apps.handoff.bridge`, `handoff.context_provider` and
+`handoff.candidate_provider` implement execution/evidence binding, context
+delivery and generation handoff. The API still exports the one canonical
+`CandidateProvider`; `EvaluationPort` remains defined in `apps.api`.
+
+### Validate/preview a task file — `task validate`, `task preview`
+
+- **Inputs:** one YAML task file (schema v1: `optimization`, `environment`, `acceptance`); `preview` also takes the mapped `plan`/`run` flags as explicit overrides. `task schema` and `task template` print the packaged schema and template.
+- **Scope:** format and value errors by field, the effective normalized task with each value's source (`yaml`, `cli`, `default`, `missing` or `invalid`), and the fields a full plan/run still needs.
+- **Output:** text, or JSON with `--json`. Exit 0 for a valid file, even an incomplete draft; 1 for an invalid file or a rejected override; 2 for a malformed flag.
+- **Side effects:** none. Reads the task file only: no subprocess, probe, install or file write.
+- **Failure behavior:** unknown or duplicate keys, unsupported versions and type or range errors are reported with field paths; an acceptance flag that disagrees with the file is a conflict.
+- **Example:** `inferrsi task preview task.yaml --json --repetitions 7`
+
+Explicit flags override YAML values, YAML values override built-in defaults, and an
+omitted flag never replaces a YAML value. Acceptance fields come from the file. See
+[task input](task-input.md). `plan --task` and `run --task` use a complete file with
+the same merge (see [use with plan and run](task-input.md#use-with-plan-and-run)).
+
+### Inspect/prepare — `doctor`, `plan`, `--dry-run`
+
+- **Inputs:** repository/backend/device flags; `plan` takes the full experiment specification as flags, or a complete YAML task file with `--task ` plus explicit mapped overrides.
+- **Scope:** environment inspection and specification preview.
+- **Output:** environment facts, or a preview of the RunSpec. With `--task`, the preview adds a `task` block equal to `task preview --json` for the same file and flags, and a `frozen_gate` block that reports whether the task's acceptance fields agree in content with the local frozen gate record named by `acceptance.reference`. `agrees` is content agreement only; it does not authenticate the record's provenance.
+- **Side effects:** `doctor` may invoke bounded read-only probes; `plan`/`--dry-run` persist nothing.
+- **Failure behavior:** unavailable devices or invalid flags are reported explicitly. With `--task`, task field errors, conflicting acceptance flags and blockers are printed by field to stderr, exit 2, before any probe. Without `--task`, `--baseline-command` and `--candidate-command` are required.
+- **Example:** `inferrsi doctor --repo . --repo-type vllm_omni --backend cpu`
+
+`plan` previews a specification. That preview alone does not persist a frozen
+campaign and does not authorize execution. Inspection does not certify target
+compatibility.
+
+### Execute/inspect — `run`, `status`, `report`
+
+- **Inputs:** the full experiment specification as flags or as a complete `--task ` (`run`); a run ID and output directory (`status`/`report`). With `--task`, the caller/host must first establish that `acceptance.reference` names the accepted frozen gate record. InferRSI checks that the task and that local record agree in content (`agrees`); it does not authenticate the record's provenance and takes no expected digest.
+- **Scope:** caller-supplied benchmark, candidate and validation commands under the experiment contract.
+- **Output:** a run ID and evidence directory; recorded progress; an HTML report. With `--task`, the run directory also holds `task.json`, the task preview, and `frozen_gate.json`, the gate result with the record's SHA-256 for citation in the acceptance issue.
+- **Side effects:** `run` executes the supplied commands and owns child-process cleanup; `report` writes HTML into the run directory.
+- **Failure behavior:** exit codes 0 PASS, 1 FAIL, 2 INCONCLUSIVE/input errors; cancellation is recorded. With `--task`, task field errors and blockers exit 2 before any probe. A task whose acceptance fields differ from the frozen gate record (`mismatch`), or whose gate cannot be checked (`unverified`: an HTTP(S) reference, a missing file, or a record that is not a schema v1 `acceptance` section stating the gate), also exits 2 before any probe; see [frozen gate record](task-input.md#frozen-gate-record). A baseline checkout `HEAD` that differs from `acceptance.baseline_revision` exits 2 after inspection. In all three cases no command starts and nothing is written.
+
+Task-mode RunSpec validation, including local candidate-directory checks, runs before
+environment probes. The frozen baseline also binds the execution through the existing
+`RunSpec.revision` field, while the observed source identity binds the existing
+`RunSpec.snapshot_id`: Harness compares the actual initial and pre-trial baseline
+snapshots, including working-tree changes, with those pins. A later
+checkout mismatch starts no trial from that snapshot and leaves the failed diagnostic
+run as `INCONCLUSIVE` with its source/error facts retained.
+- **Example:** see [quickstart: real remote experiment](../quickstart.md#real-remote-experiment)
+
+Operation success, recorded execution state and the experiment verdict are
+distinct conclusions; a completed run does not upgrade imported knowledge or
+unvalidated candidates.
+
+### Inspect a fixed attempt — `status --record-ref`
+
+Pass a JSON `RecordRef` file and its trusted `--storage-config` JSON. An
+optional `--assessment-ref` JSON adds the archived claim outcomes and scopes
+for the same record revision. The output shows committed execution facts,
+including phase, process outcome, cleanup and recording time. A successful
+read exits 0. Invalid references, archive integrity failures and mismatched
+revisions exit 2.
+
+The execution view preserves the committed `generation_record_ref` in full.
+Reports and Dashboards show its attempt ID, fixed record revision and SHA-256,
+without displaying its artifact location. A null reference is shown as
+"Not linked"; an older saved view without the field is shown as "Unknown".
+Reading the view does not open the referenced generation or resolve a current
+record, so it can still present a link whose source is unavailable. This is a
+recorded association, not a fresh lineage authorization or an assessment.
+A missing or malformed reference field in a v1 committed record is an archive
+integrity failure; it is not converted to an unlinked record.
+
+The same read-only view is available through
+`inferrsi.apps.api.read_attempt_view`. The legacy `status --run-id` form
+reads the legacy experiment directory.
+
+Use the same reference files with `trace`, `report` or `dashboard`.
+`trace` prints the view plus recorded steps, checks and error codes. An
+unknown step time stays null. `report` and offline `dashboard` accept
+`--output ` and present the same facts and claims. With
+`dashboard --live`, the loopback page and its state endpoint serve the
+snapshot pinned at startup. The campaign Dashboard remains available through
+`--input`, including its reviewed translation overlay.
+
+## Campaign summary figure
+
+### Summarize a campaign figure — `tools/campaign_summary_chart.py`
+
+- **Inputs:** one JSON specification (chain of accumulating steps, or a set of independent trials); an output path.
+- **Scope:** recorded values only. The renderer computes gains, validates the specification and writes a figure; it measures nothing.
+- **Output:** an SVG figure, plus a Markdown table with the same values when `--markdown` is given. `report` and `run` also write `summary-chart.svg` into the run directory and inline it in the HTML report. When selected trial checks leave the current comparison incomplete, the report omits the figure (including a campaign specification) and removes any previously generated SVG; raw measurements and the campaign JSON remain available.
+- **Side effects:** writes the requested files; nothing is executed and no network or GPU is touched.
+- **Failure behavior:** exit code 2 with the offending field name when the specification is incomplete, ambiguous or inconsistent; a report without a paired measurement states why it has no figure.
+- **Example:** [campaign summary chart](../dashboard/campaign-summary-chart.md)
+
+## Optimization requests
+
+- **Measure the value of knowledge.** Start with `inferrsi benchmarks compare --help`
+ and follow `next_action`. The default comparison uses Qwen denoising and MoE
+ forward in independent on/off sessions. See the [comparison workflow](../benchmarks/benchmark-comparison.md).
+- **Optimize your project.** Use `inferrsi campaign` in the current Agent
+ conversation. Supply the workload, metric, gates, scripts and budget, then
+ record the measured bottleneck before candidate search. The
+ [shared workflow](optimization-workflow-unification.md) defines round limits,
+ recovery and dashboard generation from the Harness control record.
+- **Optimize a packaged task.** Follow the [benchmark session workflow](../benchmarks/optimization-benchmarks.md)
+ through rounds and independent final retest. By default the initiator prepares,
+ dispatches and binds one [fresh native session](native-agent-sessions.md). The
+ execution Agent owns the optimization lifecycle without redelegating. An
+ explicit current-conversation request uses the same workflow directly.
+ `benchmarks run` measures one candidate within that workflow.
diff --git a/docs/guides/skill-evaluation/README.md b/docs/guides/skill-evaluation/README.md
new file mode 100644
index 000000000..acfea003c
--- /dev/null
+++ b/docs/guides/skill-evaluation/README.md
@@ -0,0 +1,145 @@
+# Bounded skill evaluation
+
+Skill evaluation measures discovery, correct application and task outcomes for an
+exact knowledge revision. It is separate from the numeric engine-performance
+evaluator and from InferRSI's L0–L4 system-validation ladder.
+
+The first [real-client pilot report](../../../evidence/skill-eval-v1-20261021/README.md)
+includes per-trial answers, retained development failures, discovery observations
+and CPU-only replay of the frozen verifier. Its conclusions apply to that
+selected task family, skill revisions and client/model configuration.
+Its [order corrigendum](../../../evidence/skill-eval-v1-20261021/README.md#order-corrigendum--2026-10-22)
+records the historical 4/2/0 first-position imbalance. Recorded elapsed differences
+are observations with order/cache/provider-drift confounding, not causal skill
+effects; a time-effect study needs a separately authorized frozen plan and budget.
+
+The small report-audit driver reuses `KnowledgeReader` bundles, the real Codex
+CLI and `harness.local_process.execute_command`. It adapts the sibling pilot's
+fresh-session, event and independent-verifier methods; its old fixed
+no-skill/human/distilled controller is not imported. No external evaluation
+platform source is copied. Existing knowledge retains its source/license limits.
+
+Ownership follows the module split. `inferrsi.harness.skill_evaluation` adapts the
+client, executes each trial and retains its facts. `inferrsi.benchmark.skill_evaluation`
+holds check validity, the task verdict and condition statistics.
+`inferrsi.apps.workflows.skill_evaluation` composes both with the bundle export behind the
+`run_trial`, `summarize` and `export_bundle` signatures; retained trial records are
+unchanged.
+
+- **PR authors:** Follow the [author evidence handoff](../../skill-eval-pr.md#nonpaid-author-handoff).
+- **Local evaluators:** Choose a [configured comparison](skill-eval-comparison.md) or a [local engineering run](local-skill-evaluation.md).
+- **Independent reviewers:** Use the [reviewer qualification](skill-eval-reviewer-qualification.md) and [cloud replay](skill-eval-cloud-replay.md) procedures.
+- **Paid-run operators:** Follow the [budget rules](skill-eval-budget-core.md) and [full-context controls](skill-eval-full-context.md). The [#215 deployment](skill-eval-deployment-215.md) and [expired #253 authorization](skill-eval-historical-job.md) record historical runs.
+
+## Conditions and outcomes
+
+| Condition | Exposure | Purpose |
+| --- | --- | --- |
+| N | No target instructions or resources | Same-client baseline |
+| E-benchmark / E-evidence | One explicit, complete reader bundle | Attribute each skill's effect separately |
+| R | Both skills through native `.agents/skills` discovery | Observe relevant, ambiguous and irrelevant activation |
+
+Future N/E schedules rotate by matched-group index alone; repeat numbers identify
+pairs without changing the rotation. Every group contains all three conditions
+once. Each consecutive block of three groups balances positions; across the six
+`--final-only` groups each condition occupies each position twice. The ordinary
+ten-group schedule has position counts of three or four. R probes follow these
+groups. This fix leaves historical frozen schedules and outcomes unchanged.
+
+Each trial starts a fresh ephemeral client and workspace. Global/bundled skills,
+plugins, apps, memory and web are disabled for that client only. For this pilot,
+the owner explicitly authorized relaxed host isolation after native Windows
+isolation failed. Local commands have broad access: this is controlled knowledge
+exposure, not OS-enforced read confinement. Keep known knowledge copies,
+verifiers/answers and other trials outside the task workspace; list their roots
+with `--protected-root` for the access audit. Invalidate observed exposure to them.
+Unobserved/implicit exposure remains a limitation of the causal comparison.
+
+Skill bundles keep their original relative paths and declared shared resources.
+Other cross-skill navigation is not automatically made available. Skill identity,
+content revision and resource/dependency revisions come from the existing reader.
+
+Agent execution status and trial verdict are separate:
+
+| Meaning | Example | Recorded trial verdict |
+| --- | --- | --- |
+| Input report verdict | A faster optimization fails quality | The correct answer says `report_verdict=FAIL` |
+| Task correctness | The answer correctly rejects that report | `PASS`, with `evaluation_error=null` |
+| Completed wrong answer | Valid JSON has incorrect fields, or is not an object | `FAIL`, with `evaluation_error=null` |
+| Evaluation error | Timeout, missing/invalid JSON output, or unavailable/invalid grading | `INCONCLUSIVE`, with an `evaluation_error` category |
+
+The verifier returns a boolean `passed` and a nonempty map of boolean
+`assertions`; `passed` must equal their conjunction. Exit 0 accompanies a pass,
+exit 1 a completed negative judgment. Other exits, missing/malformed results and
+inconsistent result fields are evaluation errors. Invalid task latency inputs
+(including empty groups, nonfinite aggregates or a nonpositive baseline) cannot
+be graded as task success or failure. The pipeline retains execution and
+verification records and saves the trial classification for these failure paths.
+
+Grading checks structured verdict, scope, findings, numeric reduction and evidence
+keys. Free-text `reason` is checked only for nonempty text; its meaning is not
+judged. Audit rules retain their first-applicable precedence: workload mismatch,
+kernel-only scope, missing quality, failed quality, failed requests, then gain
+threshold. Extract mode only computes the descriptive reduction. The answer's
+numeric tolerance remains 0.02 percentage points.
+
+Condition summaries retain `PASS` / `FAIL` / `INCONCLUSIVE` counts and count
+`evaluation_errors`; older records without that field keep their original
+verdicts. Missing token/cost observations stay unknown, including partially
+reported token metrics. Cached input is a subset of
+input tokens, not an additional charge. Paired regressions and recoveries remain
+visible, including neutral/negative results.
+The controller's `observed_tokens` counts only known token fields and is a lower
+bound when `token_usage_complete` is false; unknown totals remain null in the
+summary. Invalid verifier payloads remain in their raw verification artifact;
+only validated boolean checks enter the trial record.
+
+## CPU checks and paid execution
+
+After the normal development setup, with checkout `src` on `PYTHONPATH`:
+
+```console
+pytest tests/skill_eval/test_skill_evaluation.py tests/skill_eval/test_skill_eval_verifier.py tests/skill_eval/test_skill_eval_pipeline.py
+python tools/skill_eval_pilot.py prepare --output --model --effort --protected-root
+```
+
+`prepare` writes a plan without model calls. Review and record its digest, budget
+and revisions in the governing Issue before execution. Keep private output
+outside the source checkout and audit accesses to the listed knowledge/history
+and answer roots. Then the separately authorized call is:
+
+```console
+python tools/skill_eval_pilot.py execute --output
+```
+
+Use `--max-new-trials 1` for the first real development trial. Reinvocation resumes
+unattempted entries without retrying completed or incomplete calls. A client
+execution failure stops scheduling until its cause is investigated. Campaign
+time and observed-token limits carry across resumptions; the token threshold
+stops new trials after recorded usage reaches it, rather than imposing a provider
+generation limit. Unavailable billing cost stays unknown.
+
+Default tests use deterministic fixtures; no CI model calls or new CI lane is
+introduced. Fixture latency arrays reuse the historical Qwen review summary.
+Counterfactual metadata is explicitly labeled as a test fixture, never as a new
+GPU result. Two development instances and four sealed instances are selected
+before calls. Do not tune skills or gates on the final held-out results.
+
+The initial development campaign exposed a task-contract ambiguity: agents could
+correctly reject a kernel-to-service claim while using FAIL where the hidden
+oracle expected INCONCLUSIVE. Preserve those original calls and verdicts as
+development diagnostics; they are not skill-harm evidence. Revised task inputs
+state verdict and output-field semantics explicitly. `prepare --final-only`
+selects four revised instances with a distinct historical baseline slice and
+three R checks; two final instances repeat twice and two once (21 calls). Freeze
+the revision and remaining `--campaign-seconds` / `--token-limit` before those
+calls. Keep original and revised contracts separate and respect the Issue's
+combined call cap; do not silently reinterpret old outputs.
+
+The controller runs the verifier outside each task workspace and never executes
+generated code. It checks structured answers, numeric results, findings and evidence keys.
+Raw client captures remain private. Publish reviewed redacted evidence with its
+own identity, per-trial outputs/checks, source revisions, missing observations,
+resource definitions and a reproducible verifier invocation. A small pilot is
+descriptive evidence for that skill/task/client/model, not automatic promotion or
+a hardware performance claim.
diff --git a/docs/skill-evaluation/local-skill-evaluation.md b/docs/guides/skill-evaluation/local-skill-evaluation.md
similarity index 99%
rename from docs/skill-evaluation/local-skill-evaluation.md
rename to docs/guides/skill-evaluation/local-skill-evaluation.md
index 9c6a8ab11..630697436 100644
--- a/docs/skill-evaluation/local-skill-evaluation.md
+++ b/docs/guides/skill-evaluation/local-skill-evaluation.md
@@ -4,7 +4,7 @@ The local evaluator checks a **code artifact** with independent behavior probes.
The first adapter is one public CPU response-parser task reconstructed
from the error-stream observation in [PR 90](https://github.com/InferMatrixLab/InferRSI/pull/90).
It is not the original server, a GPU experiment, a hidden benchmark, or acceptance
-of that PR. The [frozen task contract](../../tests/fixtures/skill_eval_engineering/contract.md)
+of that PR. The [frozen task contract](../../../tests/fixtures/skill_eval_engineering/contract.md)
records source revisions, starter hash, exact behavior and exclusions.
## What changed
diff --git a/docs/skill-evaluation/skill-eval-budget-core.md b/docs/guides/skill-evaluation/skill-eval-budget-core.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-budget-core.md
rename to docs/guides/skill-evaluation/skill-eval-budget-core.md
diff --git a/docs/skill-evaluation/skill-eval-cloud-replay.md b/docs/guides/skill-evaluation/skill-eval-cloud-replay.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-cloud-replay.md
rename to docs/guides/skill-evaluation/skill-eval-cloud-replay.md
diff --git a/docs/skill-evaluation/skill-eval-comparison.md b/docs/guides/skill-evaluation/skill-eval-comparison.md
similarity index 97%
rename from docs/skill-evaluation/skill-eval-comparison.md
rename to docs/guides/skill-evaluation/skill-eval-comparison.md
index b2e53aab6..a80aaecdc 100644
--- a/docs/skill-evaluation/skill-eval-comparison.md
+++ b/docs/guides/skill-evaluation/skill-eval-comparison.md
@@ -5,9 +5,9 @@ generates JSON and Markdown reports. It reuses the existing reader,
`CodexClient`, `run_trial`, verifier and error handling. The original
[pilot](README.md) remains available with its original interfaces.
-The [PR integration](../skill-eval-pr.md) adds automatic planning, explicit operator
+The [PR integration](../../skill-eval-pr.md) adds automatic planning, explicit operator
authorization and retained-result publication around these interfaces.
-The [offline improvement MVP](../guides/harness-improvement.md) reuses the same interfaces
+The [offline improvement MVP](../harness-improvement.md) reuses the same interfaces
for bounded INV/DOM probes, successor rerun and a one-shot held-out gate.
```mermaid
@@ -21,8 +21,8 @@ flowchart LR
## Configuration and planning
-Start with [addition.json](../../tests/fixtures/skill-comparison/addition.json) or
-[update.json](../../tests/fixtures/skill-comparison/update.json). Replace the revision and
+Start with [addition.json](../../../tests/fixtures/skill-comparison/addition.json) or
+[update.json](../../../tests/fixtures/skill-comparison/update.json). Replace the revision and
model placeholders. Run from the repository root with the development
dependencies installed (`python -m pip install -e ".[dev]"`).
@@ -181,8 +181,8 @@ real-client run.
## Reports and offline controls
-See the generated [Markdown example excerpt](../../tests/fixtures/skill-comparison/report-example.md)
-and [JSON example excerpt](../../tests/fixtures/skill-comparison/report-example.json).
+See the generated [Markdown example excerpt](../../../tests/fixtures/skill-comparison/report-example.md)
+and [JSON example excerpt](../../../tests/fixtures/skill-comparison/report-example.json).
`report` reads the frozen plan and retained results without invoking a client,
grader or trial. It verifies the frozen comparison, pilot, composed-entry,
diff --git a/docs/skill-evaluation/skill-eval-daily-admission.md b/docs/guides/skill-evaluation/skill-eval-daily-admission.md
similarity index 98%
rename from docs/skill-evaluation/skill-eval-daily-admission.md
rename to docs/guides/skill-evaluation/skill-eval-daily-admission.md
index 6d044be6c..f3266cb5c 100644
--- a/docs/skill-evaluation/skill-eval-daily-admission.md
+++ b/docs/guides/skill-evaluation/skill-eval-daily-admission.md
@@ -26,7 +26,7 @@ exactly this public, non-secret field (replace placeholders only after audit):
}
```
-The [checked-in schema-2 configuration](../../tools/skill_eval_auto_config.json)
+The [checked-in schema-2 configuration](../../../tools/skill_eval_auto_config.json)
contains a daily budget anchor and records an expiry of 2026-10-29 10:53:48 UTC.
Paid execution requires current authorization and verified PR and daily histories.
Missing daily configuration or genesis, unknown obligations, corrupt history,
diff --git a/docs/skill-evaluation/skill-eval-deployment-215.md b/docs/guides/skill-evaluation/skill-eval-deployment-215.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-deployment-215.md
rename to docs/guides/skill-evaluation/skill-eval-deployment-215.md
diff --git a/docs/skill-evaluation/skill-eval-full-context.md b/docs/guides/skill-evaluation/skill-eval-full-context.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-full-context.md
rename to docs/guides/skill-evaluation/skill-eval-full-context.md
diff --git a/docs/skill-evaluation/skill-eval-generation-only.md b/docs/guides/skill-evaluation/skill-eval-generation-only.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-generation-only.md
rename to docs/guides/skill-evaluation/skill-eval-generation-only.md
diff --git a/docs/skill-evaluation/skill-eval-historical-job.md b/docs/guides/skill-evaluation/skill-eval-historical-job.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-historical-job.md
rename to docs/guides/skill-evaluation/skill-eval-historical-job.md
diff --git a/docs/skill-evaluation/skill-eval-quarantine.md b/docs/guides/skill-evaluation/skill-eval-quarantine.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-quarantine.md
rename to docs/guides/skill-evaluation/skill-eval-quarantine.md
diff --git a/docs/skill-evaluation/skill-eval-reviewer-qualification.md b/docs/guides/skill-evaluation/skill-eval-reviewer-qualification.md
similarity index 100%
rename from docs/skill-evaluation/skill-eval-reviewer-qualification.md
rename to docs/guides/skill-evaluation/skill-eval-reviewer-qualification.md
diff --git a/docs/skill-evaluation/skill-eval-yibuapi-preflight.md b/docs/guides/skill-evaluation/skill-eval-yibuapi-preflight.md
similarity index 98%
rename from docs/skill-evaluation/skill-eval-yibuapi-preflight.md
rename to docs/guides/skill-evaluation/skill-eval-yibuapi-preflight.md
index 40692248a..a3bd12dc7 100644
--- a/docs/skill-evaluation/skill-eval-yibuapi-preflight.md
+++ b/docs/guides/skill-evaluation/skill-eval-yibuapi-preflight.md
@@ -90,7 +90,7 @@ command arguments, Git, logs or chat.
1. Use `action=plan` for a free PR plan. Inspect the frozen model, group and rates,
context and request bounds, paired cases, and total reservation.
-2. The [label controller](../skill-eval-pr.md#label-gated-cumulative-paid-execution)
+2. The [label controller](../../skill-eval-pr.md#label-gated-cumulative-paid-execution)
governs new paid PR runs. It requires current owner-reviewed configuration and
pricing, a trusted label actor, and verified PR and daily ledgers. The legacy
manual `action=execute` input is blocked.
diff --git a/docs/guides/speculative-search.md b/docs/guides/speculative-search.md
new file mode 100644
index 000000000..a7786795c
--- /dev/null
+++ b/docs/guides/speculative-search.md
@@ -0,0 +1,488 @@
+# Speculative candidate search and group learning
+
+The experimental implementation of [issue #363](https://github.com/InferMatrixLab/InferRSI/issues/363)
+composes bounded VATS, trainable CPU roles, GVO, durable work accounting and
+independent final selection. It follows the two loops in
+[SpecRSI v2 §3](https://arxiv.org/html/2610.16491v2#S3). It does not reproduce the
+paper's language-model training or establish its reported gains. Existing
+`campaign` and `benchmarks session` commands keep their serial lifecycle.
+
+## Supported profile and authority
+
+| Component | Implementation | Boundary |
+| --- | --- | --- |
+| Candidate/evidence model | `harness.search_tree`, `search_records` | Immutable artifacts, actual dependency epochs and complete-candidate selection |
+| Solver | `harness.verification_plans`, `vats.menu` | Bounded exhaustive completion plans; conservative integer millisecond caps |
+| Drafter | `apps.workflows.search_roles`, `harness.search_adapter` | Trainable softmax over supplied exact text edits; actual retained changes, not free-form LLM generation |
+| Policy | `apps.workflows.search_roles` | Independent eight-feature linear softmax, recorded behavior probabilities, deterministic deployment actions |
+| Scorer | `apps.workflows.search_roles` | Separate linear model; actual suffix MSE and optional paid continuation differences |
+| Work/state authority | `harness.work_control` | Transactions in the shared `RunStore` SQLite database |
+| Execution | Existing `trials.external` and `local_process` | Absolute deadline and process-domain cleanup; no new subprocess runner |
+| Engine | `apps.workflows.search_benchmarks.EngineEvaluator` | Existing packaged `optimization.py` as one whole check; currently the Qwen denoiser NPU task |
+| Skill | `apps.workflows.search_benchmarks.SkillEvaluator`, checkout `tools.speculative_skill.Comparator` | Explicit provider configuration, original baseline, independent grader, separate development/holdout descriptors |
+| Final | `harness.search_campaign.finalize` | One-time scope claim before access; receipt-only recovery/export; task promotion only |
+
+This is a trusted local host controller. Resource domains exclude **cooperating
+controllers sharing one RunStore**. They are not scheduler/GPU reservations,
+filesystem sandboxes, distributed leases, provider cancellation guarantees or
+cryptographic attestations. The caller supplies authorized resources and frozen
+edit/check permissions. Candidate code cannot enforce its own isolation.
+
+Execution uses one worker. The offline planner represents shared setup and
+conflicts; supplied runtime adapters package setup into each whole check. They
+do not execute arbitrary standalone shared-setup jobs. Multi-worker performance
+qualification remains outstanding.
+
+## Candidate and evidence semantics
+
+`Contract` freezes search ID, context, roles, checks, objective/direction and
+candidate/depth/attempt caps. Context includes plan, validator, workload,
+environment, original baseline and reference. Objectives must be finite;
+overflowing the difference between two finite scores is also rejected. Quality
+checks are hard requirements, never compensable by a better score.
+
+`qualify_root` obtains root evidence through claimed real checks. Unknown root
+acquisition can only recover its original receipt. `import_qualified_root`
+explicitly re-scopes root receipts under identical artifact/check/context
+conditions, retaining physical execution and reservation identities. Root check
+attempts count against each search's cap; actual acquisition is charged once to
+the campaign, separately from independent search returns.
+
+In `A → B → C`, B may be unchecked or fail quality while C is edited and checked.
+C needs every required receipt for **C's own artifact** to win. Task failure does
+not invalidate descendants. Genuine environment/source dependency invalidation
+does invalidate dependent evidence. Dependencies are predeclared; dynamic
+introduction of new authorities is unsupported.
+
+`record_receipt` archives registered late results; `evidence` admits only current,
+matching receipts. Equal bytes alone do not authorize reuse. Duplicate delivery
+is idempotent; conflicts fail. FAIL is an observation; INCONCLUSIVE leaves a
+check missing. A valid outcome cannot be repeatedly sampled until it passes.
+Permitted retries need new identities and paid reservations.
+
+`Search.invalidate` persists the epoch change and incumbent recomputation
+atomically. An invalid root blocks search; late evidence can still be archived
+and charged. `ACCEPT` prefers the root on ties, then candidate ID order. It
+selects a development result without changing the stable version.
+
+## VATS execution
+
+`Search.start` retains a qualified root and frozen role/settings/adapter hashes.
+Each decision claims and meters Solver/Scorer/Policy preparation, constructs
+bounded DRAFT/VERIFY/ACCEPT actions and records the behavior law and paid state.
+Completion bundles remain in the menu; Scorer predictions never become receipts.
+Optional refinement adds unions without removing base completions. An undersized
+menu cap fails explicitly. Collection samples Policy; deployment uses argmax.
+Drafter edits remain sampled from the supplied permitted vocabulary.
+
+Experimental records predating `initial_conditions` remain readable/exportable
+through WorkControl, but cannot resume or enter GVO training. Start fresh searches
+from qualified evidence; there is no migration that guesses a historical starting
+tree from a later tree. Receiving search/attempt IDs may differ after an explicit
+root import; actual execution identities, evidence and dependency epochs must agree.
+
+The chosen work block is persisted before execution. Each edit waits for its
+parent artifact, without waiting for parent quality. Each check binds candidate,
+contract, attempt, execution, reservation and domain. Settlement commits elapsed
+time, cleanup facts and evidence/incumbent changes in one transaction. Recovery
+continues the retained block cursor before making another Policy decision.
+An ACCEPT already retained in the trace is terminal even if the controller
+stopped before writing the completed status. Recovery finishes that decision
+without sampling or charging another preparation, including forced ACCEPT.
+
+ACCEPT and limits return only complete admissible versions. Unstarted work stops
+when its conservative cap no longer fits. Unknown launched operations block
+continuation until reconciled. Candidate, depth, step, menu and attempt limits
+bound the search independently of its time budget.
+
+The planner closes prerequisites, counts shared costs once and checks conflicts.
+`max_targets` limits completion **seeds**, not candidates incidentally completed
+by cross-candidate prerequisites. `max_jobs` bounds the whole supplied job graph.
+The exact algorithm targets small menus. `draft_ahead=False` and `bundled=False`
+are explicit ablation switches; they are not claims of comparative efficiency.
+
+## GVO and paid continuations
+
+VATS spends a search budget using a frozen Drafter, Policy and Scorer. GVO
+updates those three roles **between** collections. The Solver's feasibility
+rules, verification contract and real evaluator stay fixed across the update.
+The formal objectives are in [SpecRSI §3.4](https://arxiv.org/html/2610.16491v2#S3.SS4).
+
+1. **Collect a group.** Start at least two independent VATS searches from the
+ same root, initial evidence and history, role checkpoint, adapter and budget.
+ Each search has a separate tree and random seed. The controller checks that
+ the campaign can fund all declared search budgets before collection. Record the legal choices,
+ sampled actions, their probabilities, the paid work and its verified outcomes.
+2. **Give the Drafter and Policy whole-search credit.** Let `F` be the best
+ observed gain among candidates that satisfy every required check. For search
+ `i`, compute the return and its leave-one-out advantage:
+
+ ```text
+ R_i = F(end_i) - F(start_i) - expense_weight * spent_seconds_i
+ - elapsed_weight * wall_seconds_i
+ A_i = R_i - mean(R_j for all other searches j in this group)
+ ```
+
+ For returns of 8, 5 and 2, the advantages are +4.5, 0 and −4.5. Every
+ naturally sampled edit or plan choice in a search receives that search's
+ advantage. This gives an early edit credit when a later descendant earns a
+ verified gain. Replay the recorded action probabilities and apply the
+ PPO-style clipped probability ratio, with KL regularization against the
+ fixed initial actor. The ratio is the current probability of the sampled
+ choice divided by its recorded collection probability, under the same legal
+ menu and sampling settings. With the default single update per group this
+ ratio starts at one, so clipping is inactive on that gradient step.
+ Deployment trajectories are excluded. Both cost
+ weights default to zero. Work still counts against the hard budget.
+3. **Train the Scorer on realized continuation returns.** At each paid decision
+ boundary fit the predicted plan value to the gain still to come, less the remaining
+ measured work and time penalties. If the best verified gain is 3 at that
+ boundary and ends at 8, the unpenalized target is 5. Preparation already
+ performed stays in the whole-search cost. Missing results supply no target. When two alternative first
+ actions have both been executed from a saved state, the difference between
+ their realized returns also supervises the difference in predicted values.
+4. **Save the update and collect fresh evidence.** `train_group` verifies the
+ records, updates the three sets of weights and settles the training receipt
+ and checkpoint together. A resumed run reuses a settled update and blocks
+ a second training launch if the first outcome is unknown. Reset keeps the
+ original root for the next group.
+ Carry starts the next group from the best fully verified candidate and its
+ receipts. Final measurements are reserved for independently retesting the
+ selected candidate.
+
+The [collection and target code](../../src/inferrsi/harness/gvo.py) and the
+[CPU role update](../../src/inferrsi/apps/workflows/search_roles.py) implement these
+steps with finite edit operators, a linear Policy and a linear Scorer. The
+caller supplies the initial checkpoint and its provenance.
+
+`search_continuations.continue_from` copies a retained paid state, charges the
+copy, forces one legal first action and continues the frozen policy. The entire
+suffix is Scorer-only. `paired_targets` requires the same source state, settings,
+snapshot, adapter and continuation seed with different first actions. Both
+absolute suffix targets and observed relative differences train the Scorer.
+Caller-authored unreceipted pair targets are rejected.
+The saved source step counts toward the continuation's original step limit and
+random-stream position; omitting the prefix from its training trace does not
+grant additional decision slots.
+
+These are real updates to a constrained CPU operator model. They are not LLM
+finetuning, prompt summarization or evidence of pretrained-model improvement.
+Apps injects the role snapshot's `choose`, `predict`, `train`, `restore` and
+`document` operations. Harness retains traces and controls when they may run;
+it has no import dependency on the Apps role implementation.
+
+## Accounting, recovery and final
+
+`WorkControl` extends the existing RunStore database with campaign, domain and
+holdout tables. It is the authority for this experimental runtime, not a mirror
+of serial-session manifests. One transaction reserves work/domains and registers
+the pending tree attempt. Controllers using the same resource or holdout must
+use the **same shared store**.
+
+Launch intent is durable before dispatch; an ambiguous crash never authorizes a
+second launch. Known elapsed time and cleanup release unused reservation.
+Unknown usage/cleanup retains the entire reservation and domain. Over-cap work
+blocks further claims and dispatch of previously reserved work. The launch
+transaction rechecks the campaign before recording intent. With unknown cleanup,
+the retained hold is at least the largest known usage. Later reconciliation
+releases the domain and charges the final usage once, never below that lower
+bound. Absolute deadlines include queueing and cleanup.
+Engine protocol timeouts retain an INCONCLUSIVE adapter receipt with measured
+elapsed time. Confirmed cleanup of both task and protocol permits settlement
+and domain release; uncertain protocol cleanup keeps the reservation. A known
+overrun still blocks the campaign, even after its domain has been released.
+If cleanup settles blocked search work before its pending pointer is cleared,
+recovery archives that pointer from the durable operation without reading the
+adapter again. It charges the search's observed cost once, abandons the active
+block and records verification as control-only `INCONCLUSIVE`. The output is
+not adopted, and the campaign remains blocked against further dispatch.
+In-process bounded planning, editing and training are checked after return;
+they are not forcibly preempted like subprocesses. Preflight freezing and initial
+setup are outside this campaign meter, a remaining lifecycle-cost limitation.
+
+Receipts bind candidate/adapter identities and content hashes. They detect
+accidental mutation under a trusted host, not malicious-host forgery. Recovery
+checks retained candidate bytes and never launches new work. Lost preparation,
+training or copy receipts remain unresolved; no guessed-cost retry is available.
+External process-liveness reconciliation needs a qualified authority.
+
+When a reservation expires or its campaign is blocked before launch intent,
+recovery settles it as `not_started` and releases its domain in one transaction.
+Search recovery clears the pending operation and ends the current block. A
+registered verification attempt gets a control-only
+`INCONCLUSIVE` receipt, with no objective or evaluator PASS. No execution is
+charged. A search whose limit has expired can then return its qualified incumbent.
+If only the operation deadline expired, the remaining campaign may continue with
+fresh claims. This exception does not apply to ambiguous launch-intent crashes.
+
+Before claiming a final scope, `finalize` reads the completed deployment search
+from the campaign store. It recomputes the winner from verified development
+receipts, compares it with the recorded selection and the supplied candidate,
+and verifies the retained candidate files against the selected artifact digest.
+A root can enter final when a completed deployment selected it. Root qualification
+alone, a training collection, and a forced continuation cannot supply that selection.
+If several deployments completed, pass `deployment_search` to name the one used
+for selection. The first claim freezes the deployment, winner and acceptance
+rule at the same campaign revision, then closes search/training before final
+data access.
+
+For a new Python final, pass `acceptance=FinalAcceptance()` to require all
+checks to pass with verified cleanup. With
+`acceptance=FinalAcceptance(minimum_objective=1.2)`, the same checks apply and
+the deployment’s designated objective must also reach 1.2. The claim records
+the rule version, required checks, threshold and, for a numeric threshold, the
+objective check. The Engine CLI uses its explicit `--minimum-final-score` when
+comparing against the original baseline. For Skill, supply a **holdout-bound
+adapter** and `Comparator.holdout_scope`, derived from frozen task membership. The raw SHA-256
+separately pins each file's exact bytes. Root qualification and VATS search use
+the development evaluator. Finalization checks that its comparator matches the
+one bound to the recorded development evidence. After the final claim and before
+any provider or grader call, the comparator parses the same verified bytes for
+both splits, checks the declared membership, and rejects shared case IDs or
+identical case inputs across splits. Changing JSON formatting, case order, IDs
+or provenance gives the same set of inputs a single final allowance in the
+shared store. Exact bounded radix utility keeps quality ahead of token use.
+
+The finalizer holds a campaign-specific OS file lock in the shared RunStore
+from before the holdout claim through the final commit. A concurrent finalizer
+gets a lock error while that call is active. After an interruption, call
+`finalize` with the original candidate and scope and omit `acceptance` to
+apply the saved rule. If the owner exited before reserving a required check,
+recovery records that check as `not_started: unreserved` with zero usage.
+It reconciles registered work from its receipts. Once accounting is complete,
+any unreserved check makes the final `INCONCLUSIVE` and preserves the
+incumbent. The holdout remains consumed. For older claims that predate the
+lock, recovery can certify an unreserved check once the original campaign
+deadline has passed or the campaign has blocked further dispatch.
+
+Supplying a different rule during recovery is rejected. Earlier Python
+callers that passed an `accept_result` callback must select a declarative rule
+for new finals. A historical claim without a verifiable rule can only settle
+usage and cleanup. The same applies when its selection cannot be verified or
+its candidate files have changed. Once reconciled, the final is INCONCLUSIVE
+and the incumbent is preserved. A claim with a newer rule version stays pending
+for a runtime that understands it. Each new receipt binds the physical operation ID. An older final
+receipt without that ID needs its matching executor record from the claimed
+operation, including the output path recorded at execution. Missing proof,
+unknown usage or unknown cleanup keeps the reservation. Existing final results
+are immutable; export never reruns them. Only complete accepted final evidence,
+known cleanup and valid budget can update `stable`. Role checkpoints are never
+automatically promoted to a production/default improver. Such promotion needs
+separate independent data and acceptance authority.
+
+Enforced spend is in milliseconds. Skill reports retain provider token/currency
+facts, and the existing comparator enforces its per-comparison limits. A
+**campaign-wide provider token/currency reservation bridge is not implemented**.
+Elapsed-time caps must not be presented as that guarantee.
+
+## Entry points
+
+`inferrsi search engine --help` lists explicit Engine bounds and permissions.
+Supply a fresh `--session`, shared `--store`, unique `--campaign`, packaged task,
+initial checkpoint, edit vocabulary, authorized resource domain, time/search/
+training bounds, independent group count, rounds, final scope and final threshold.
+Task protocol flags follow `--`, for example `--pairs 1 --samples 1 --warmups 0`
+when the campaign owner chooses one measurement per arm. No gate is inferred.
+A domain name does not allocate a device.
+
+Checkpoint JSON contains numeric arrays `drafter`, `policy`, `scorer` and nonempty
+`origin`. Drafter dimensions match edits; Policy/Scorer each have eight dimensions.
+Freeze initial parameters and provenance in the campaign plan.
+`--edit TOKEN FILE BEFORE AFTER` permits one exact replacement in a candidate
+relative file; candidates cannot change the evaluator or roles.
+
+Read/export without execution:
+
+```bash
+inferrsi search status --session
+inferrsi search export --session --output
+```
+
+Python composition uses `qualify_root`, `collect_group`, `learn`, `continue_from`
+and `finalize`. Recovery requires the original frozen adapters. The CLI has no
+blind whole-campaign restart command. Skill's checkout `Comparator` takes the
+existing comparator configuration with an explicit bounded provider, original
+Git baseline, editable bundle paths and two split descriptors (`path`, `sha256`,
+`scope`, `task_count`). When preparing data, compute `task_set_sha256` with
+`tools.speculative_skill.task_set_sha256(cases)` and include it in the holdout
+descriptor before starting a campaign. The field is optional for development.
+The comparator uses the existing private Git-index materializer and shared
+process executor, and revalidates its independent retained report. Construction
+does not load holdout bytes. Providers require explicit authorization and
+credentials.
+
+Older descriptors can still serve development. Search histories written before
+comparator identity was recorded remain readable for reporting. A new Skill
+final requires a completed deployment whose development evidence identifies
+the same comparator. Upgrade all Skill controllers that write the shared store
+together, since older controllers enforce raw-byte scopes. If the store contains
+old `skill-data:` claims, bind each consumed claim to its archived input with
+`tools.speculative_skill.migrate_holdout(control, raw_sha256, archive_path)`.
+The migration verifies those original bytes and records the membership of the
+already-consumed set. Missing archives keep new Skill final claims blocked.
+
+## Relation to the paper and reference implementation
+
+This is a constrained adaptation of the two-loop method, not a reproduction of
+the reference model or experiments. The comparison below uses
+[SpecRSI v2, section 3 and Algorithms S1-S3](https://arxiv.org/html/2610.16491v2#S3)
+and the authors' [reference source](https://github.com/SpecRSI-GPR/SpecRSI/tree/ff0f0bb607e53ba76eebb9960df3d6942c33027e).
+That source revision is research provenance, not an InferRSI campaign pin.
+
+| Mechanism | This implementation | Alignment and limits |
+| --- | --- | --- |
+| Frozen search and acceptance | Immutable descendants, separate real evidence, DRAFT/VERIFY/ACCEPT, complete-root fallback | Follows the central control contract; intermediate parents need not pass |
+| Natural group learning | Independent matched searches, leave-one-out advantage, recorded actor probabilities, clipped objective and fixed-reference KL | Same objective structure; updates a small CPU operator model |
+| Value supervision | Actual paid-state suffix returns and optional paid pair differences; forced trajectories excluded from actors | Same separation of targets; continuation recovery must preserve the original remaining work limits |
+| Drafter | Softmax over a caller-supplied exact-replacement vocabulary | The reference uses generated edit tokens with a trainable LoRA adapter on a frozen language model; this vocabulary cannot propose a new edit outside its supplied operators |
+| Policy and Scorer | Separate linear weights over eight aggregate features | The reference uses separate relation/message-passing and attention branches with semantic and observed-evidence inputs; these linear features omit those inputs |
+| Solver and refinement | Exhaustive unions of completion seeds, one job per candidate/check; optional pairwise seed-union scoring | The reference supports MILP covers, singleton check closures, shared setup and iterative job-closure extensions; this restricted planner is not a general substitute |
+| Training recipe | Caller-provided initial checkpoint; direct CPU gradient updates | No supervised warm-up pipeline or language-model training adapter; the reference's warm-up, role architecture and optimizer configuration are not reproduced |
+| Resources and evaluation | One worker, millisecond reservations, whole Engine/Skill checks | No equivalent campaign-wide token/currency cap, arbitrary setup execution, parallel-worker study or matched reference benchmark runs |
+
+The architecture and training distinction can be inspected in the reference
+[role model](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/learning/hf.py),
+[relation heads](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/learning/heads.py),
+[completion solver](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/planning/completion.py),
+[menu construction](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/core/vats.py)
+and [training recipe](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/docs/REPRODUCIBILITY.md#training-the-reference-roles).
+These were inspected as source, not executed as a reproduction experiment.
+
+Two limits matter when interpreting learning results. First, at the same state,
+verification bundles with equal total cap and job count have identical features
+in `vats.features`, hence identical linear Scorer values and Policy preferences.
+Their candidate identity, observed failures and check interactions cannot affect
+that comparison. Parameter updates alone therefore do not demonstrate learning
+the paper's complementary-check value function. Second, `Settings.refine_queries`
+defaults to zero, and the Engine CLI exposes no override. Its search does not use
+the trained Scorer to refine the menu; the supplied Engine/Skill evaluators also
+expose one indivisible check per candidate. Python callers can enable the bounded
+refinement, but that does not add the missing semantic or relational inputs.
+
+Moving toward a reference reproduction requires explicit role/feature and menu
+contracts, a qualified generative/trainable adapter with warm-up, lifecycle cost
+accounting, and replicated frozen-versus-trained comparisons across tasks and
+independent training checkpoints.
+The existing recovery, evidence and holdout controls remain useful foundations;
+passing them does not establish search efficacy or reproduce paper results.
+
+## Measuring the contribution of GVO
+
+Compare three deployment arms on the same task. A fixed-order serial control
+measures a simple alternative search order. VATS with the initial checkpoint
+measures what the search can find before training. VATS with the trained
+checkpoint measures what changes after GVO. To isolate learning, compare the
+last two arms at the same deployment seed, candidate budget and evaluation
+protocol. Use the independently retested final candidate as the outcome.
+Weight changes and development scores show what happened during training and
+selection. The cost of obtaining a checkpoint includes every collection
+search, even one that returned the root without an improvement.
+
+The [Qwen diagnostic plan](../../evidence/qwen-vats-gvo-910b1-20261124/plan/plan.json) fixes one
+worker, the two [allowed edits](../../evidence/qwen-vats-gvo-910b1-20261124/plan/edits.json), the
+initial weights, limits, seeds and arm order. Both edits reuse existing
+intermediates in the denoiser. One hoists the invariant text projection out of
+the denoising loop. The other hoists shared scale and gate computations out of
+the transformer-block loop. The serial control tests the first edit and then
+the combination. VATS can also test the second edit independently, repeat an
+edit choice on another branch, or stop early. Its five primitive attempts
+include the imported root check, leaving room to draft two candidates and
+verify both. The root qualification is physically executed once and shared.
+Each arm can spend up to two new candidate checks and receives a fresh final.
+
+The [experiment driver](../../evidence/qwen-vats-gvo-910b1-20261124/plan/run.py) calls the packaged
+Engine evaluator for all three arms and uses the PR's unmodified `Search`,
+`learn` and `finalize` for VATS. The serial control evaluates the declared
+order directly through the same Engine evaluator. To repeat from the checkout
+in an environment with one allocated Ascend NPU, the frozen runtime dependencies,
+and an unused output path, run the driver from the repository root.
+
+```bash
+PYTHONPATH=src python evidence/qwen-vats-gvo-910b1-20261124/plan/run.py ./qwen-gvo-run
+```
+
+The output contains the shared RunStore, checkpoints, all task snapshots,
+timings and per-step numerical checks. Arm order rotates across three blocks
+so each arm runs first, second and last once. All three blocks
+reuse one trained checkpoint. Their random seeds vary the search on the same
+workload. The driver saves the full arm order before starting. A VATS arm
+contributes a score only when `finalize` reports an overall PASS and promotes
+the selected candidate, and the fresh task result passes with verified cleanup.
+An interrupted or rejected arm retains its incomplete status, later arms retain
+their unrun status, and the driver publishes paired ratios only for a complete
+comparison. Training variability and transfer to other tasks require additional
+independent runs.
+
+### Ascend 910B1 diagnostic results
+
+On 2026-11-24, all nine deployment runs selected the **same candidate bytes**
+and each arm verified two candidates per deployment. Frozen and trained VATS
+both drafted the two edits in the same order, then verified both candidates in
+one bundle. The table reports independent-final speedups against the original
+denoiser. The last column divides the trained score by the frozen score within
+the same deployment block.
+
+| Deployment seed | Fixed serial | Frozen VATS | VATS + GVO | Trained vs. frozen |
+| ---: | ---: | ---: | ---: | ---: |
+| 101 | 1.1496× | 1.1562× | 1.1656× | +0.81% |
+| 202 | 1.1389× | 1.1457× | 1.1546× | +0.78% |
+| 303 | 1.1542× | 1.1557× | 1.1434× | −1.07% |
+| Geometric mean | 1.1475× | 1.1525× | 1.1545× | +0.17% |
+
+The paired score difference was **+0.17%** for trained versus frozen VATS
+and **+0.61%** for trained VATS versus the fixed serial control. Repeated
+measurement of the same code produced all three values in each row.
+The two edits delivered the observed denoiser speedup. This pilot found no
+additional candidate-quality or evaluation-count benefit from GVO.
+The default zero refinement queries also leave the Scorer outside deployment
+action selection in this configuration.
+
+One shared root qualification took 38.34 s. The six independent training
+searches and one update took **297.99 s**, including nine candidate evaluations.
+All three role weight vectors changed. Mean online time, including independent
+final, was 97.35 s for serial, 96.42 s for frozen VATS and 95.30 s for trained
+VATS. Over three deployments, collection, training and trained deployment took
+**583.90 s**, compared with **289.26 s** for frozen deployment. Both totals
+exclude the common root, queue, container startup and setup. The small online
+timing difference does not establish a repeatable saving or break-even point.
+
+The verifier replayed all 37 completed five-case task evaluations (1,998
+compute calls) and the earlier device-initialization failure. An offline audit
+of the archived RunStore also confirmed that all six VATS deployments promoted
+their selected candidate and bound its final receipt to the measured files.
+The three serial controls have direct independent task finals. Overall search
+efficacy remains **INCONCLUSIVE**. The [evidence bundle](../../evidence/qwen-vats-gvo-910b1-20261124/README.md)
+links the frozen inputs, checkpoint, per-trial index, archive availability and
+raw-data verification instructions.
+
+## Validation and issue completion
+
+```bash
+python -m pytest tests/harness/test_speculative_search.py tests/harness/test_verification_plans.py \
+ tests/harness/test_work_control.py tests/apps/test_search_roles.py tests/harness/test_vats_runtime.py \
+ tests/apps/test_search_benchmarks.py tests/campaigns/test_qwen_gvo_diagnostic.py
+```
+
+Controls cover exhaustive planning, failed-parent repair, finite-score overflow,
+concurrent domain claims, unknown reservations, atomic evidence/accounting,
+invalid roots, process-backed CPU searches, numerical actor-gradient checks,
+parameter updates, fresh searches, paid continuations, recovery and final export.
+The numeric process grader and Skill report fixtures test software behavior;
+they are not real task/provider efficacy evidence.
+
+| Issue area | Delivered software | Still required for full acceptance |
+| --- | --- | --- |
+| AC-01/02 | Support/permission boundaries and immutable trees | Production role/environment qualification |
+| AC-03/05 | Durable transitions, late receipts, invalidation, bounded synchronous VATS | Production adapter fault/race evidence |
+| AC-04 | Exact planner, independent oracle and Scorer refinement | Scaling and real complementary-check evidence |
+| AC-06 | Independent groups, actor/value updates, paid continuations, checkpoints, Reset/Carry | Replicated learning across checkpoints and tasks, and role qualification |
+| AC-07 | Shared local claims, elapsed-time caps and cleanup-aware recovery | Host callback preemption, provider/device total accounting and production resource integration |
+| AC-08 | One-time final scope and task promotion gate | Real independent final evidence and separate default-improver qualification |
+| AC-09 | Packaged Engine evaluator and explicit Skill comparator bridge | Live Agent/Skill pilot and broader Engine coverage |
+| AC-10 | Retained trajectories/costs and ablation switches | Replicated learning and bundle, Reset/Carry and worker comparisons with full lifecycle costs |
+
+The maintainer accepted the single-worker local VATS/GVO runtime, its recovery
+and final-evidence controls, and the bounded Engine diagnostic as a separately
+reviewable delivery for PR #488. The software controls and the archived
+measurements are the evidence for that slice. Issue #363 remains open for the
+criteria in the last column. [Maintainer’s scope decision](https://github.com/InferMatrixLab/InferRSI/issues/363#issuecomment-7124911509).
diff --git a/docs/guides/task-input.md b/docs/guides/task-input.md
index 3e0eb5dbc..a98469097 100644
--- a/docs/guides/task-input.md
+++ b/docs/guides/task-input.md
@@ -140,7 +140,7 @@ subprocess, run no probe or task script, install nothing, and create no workspac
plan, run or evidence file. A `complete` preview only reports that every needed input
is present. It does not authorize execution. Running an experiment still requires an
explicit `run` under the existing acceptance, frozen-gate and evidence rules
-(see [operations](../operations.md#validatepreview-a-task-file--task-validate-task-preview)).
+(see [operations](operations.md#validatepreview-a-task-file--task-validate-task-preview)).
## Use with plan and run
@@ -303,7 +303,7 @@ An Agent uses the same installed CLI and the same machine-readable preview:
4. Review the effective values, their sources and the remaining blockers with the
user. Ask for the blocking fields instead of guessing them.
5. Use the reviewed task with the existing InferRSI operation the user authorizes,
- under the operation's own boundary in [operations](../operations.md). For example,
+ under the operation's own boundary in [operations](operations.md). For example,
run `inferrsi plan --task `, then `inferrsi run --task `
only after explicit authorization. Before `run`, confirm with the user or the
acceptance issue that `acceptance.reference` names the accepted frozen gate
diff --git a/docs/operations.md b/docs/operations.md
index 2b9669d56..5e1884739 100644
--- a/docs/operations.md
+++ b/docs/operations.md
@@ -1,542 +1,3 @@
# Operation guide
-Use the intent map to choose a command or Python entry point, then follow the
-linked contract for the complete procedure.
-
-Effect classes used below:
-
-- **Read-only** — no writes outside caller-chosen output files.
-- **Candidate-writing** — writes only inside one explicitly authorized local store.
-- **Report-generating** — writes an HTML report into the caller-selected run directory.
-- **Experiment-executing** — runs caller-supplied commands under the experiment contract.
-
-## Intent map
-
-| Intent | Entry | Effect class | Boundary |
-| --- | --- | --- | --- |
-| Verify whether RSI knowledge improves optimization efficiency | CLI `benchmarks compare`; [comparison workflow](benchmarks/benchmark-comparison.md) | Local experiment records / explicit native handoff / report-generating | Apps freezes two-task on/off plans, returns host actions, verifies retained finals and reports Benchmark comparisons; no hidden Agent launch |
-| Complete a task optimization in the current Agent | CLI `benchmarks session start/knowledge/round/status/final/recover` | Experiment-executing / local records | Frozen budget, actual candidates and independent task outcomes. The current Agent drives edits. Real usage is imported explicitly. Recovery collects an existing execution using its [pinned runtime](guides/optimization-workflow-unification.md#release-boundary-recovery) |
-| Optimize an ordinary project in the current Agent | CLI `campaign start/knowledge/round/status/final/recover` | Experiment-executing / local records | Harness freezes explicit caller-provided checks, manages multi-file candidates, executes and assesses retained results. This path does not depend on Benchmark or infer acceptance from the goal. See [shared workflow](guides/optimization-workflow-unification.md) |
-| Reuse one project service across multi-scenario checks | CLI `campaign start --evaluation-mode service_reuse`, then `baseline/round/profile/status/recover/final` | Experiment-executing / local records | Caller supplies protocol and service scripts. An optional profiler can run inline or on a settled round. `resume`, `refresh-references` and explicit retry retain recovery decisions. See [service reuse](guides/service-reuse-campaigns.md) |
-| Prepare and record a fresh native Agent | CLI `agents prepare/dispatch/bind/record/status` | Local records / explicit host handoff | The initiating Agent calls native host tools. Records prevent repeated dispatch; exported host observations do not establish task acceptance. See [native sessions](guides/native-agent-sessions.md) |
-| Discover packaged tasks | CLI `benchmarks list [--iterative]` / `benchmarks show`; Python `benchmark.registry.builtin_tasks` / `describe_task` | Read-only | Reads the installed registry and [task manifests](benchmarks/engineering-benchmarks.md). The optional filter selects task packages with an `optimization.py` file at their root |
-| Execute one packaged task | CLI `benchmarks run`; Python `apps.workflows.benchmark_operations.run_task` | Experiment-executing | Application launches the task entry, supplies the execution callback and preserves arguments and exit status. The task owns its device, measurement and assessment protocol |
-| Find relevant cases, skills and records | CLI `find` | Read-only | Default discovery across the registered library and package records. Follow the emitted command to read a hit and its revision |
-| Inspect the package catalog | CLI `knowledge search` / `knowledge show`; catalog API | Read-only | Filtered inventory and existing catalog scripts. Uses the installed package's tier/repo/backend/scenario filters and IDs |
-| Prepare model-aware engine research | CLI `knowledge research`; Python `research_knowledge` | Read-only | Independent model/framework/task/modality/mechanism queries over the same package catalog; source-grounded known profiles, deduplicated matches and explicit target annotations; no engine/hardware qualification |
-| Enter an inference task or discover/read skills | CLI `skills enter` / `list` / `show` / `resource` / `reference` | Read-only | `enter` loads one primary owner's complete procedure before evidence search. `list`/ `show` inspect skill metadata and instructions. `resource`/`reference` resolve paths for your file reader. |
-| Retrieve and cite external round knowledge | CLI `benchmarks session knowledge / knowledge-read`, AB/BA `campaign knowledge / knowledge-read` | Local evidence-writing | Requires an explicit `--cannbot-platform` at start and an approved project grant. Retains search and read metadata. Cite a delivered receipt with `round --knowledge-ref`. See [round retrieval](benchmarks/optimization-benchmarks.md#include-cannbot-in-the-round) |
-| Collect selected knowledge | CLI `collect`; Python `KnowledgeReader.collect` | Read-only | Batch selection and budgeted assembly by query or exact IDs, with revisions and omissions. The only accepted explicit `--relevance-method` value is `find-lexical-v1` |
-| Read exact material/resources | CLI `read` / `resource`; Python `KnowledgeReader.read` / `KnowledgeReader.resource` | Read-only | Returns the requested revision or an explicit unavailable/stale error; never substitutes newer bytes |
-| Export legacy cited material | CLI `context` | Read-only | Cited package export for manual use with a coding agent; not a conversation store and not a full Collect equivalent |
-| Create/update a store candidate | Python `KnowledgeStore.create` / `KnowledgeStore.update` | Candidate-writing | One explicitly authorized local store; expected-revision updates with reason and evidence; retained history; no promotion and no edits to package/checkout content |
-| Inspect a store candidate's history | Python `open_knowledge_store(...).history` | Read-only | Opens an existing store and reads the revision lineage for one store ID |
-| Amend repository-owned knowledge | Scoped repository PR | — | Repository review and integration authority apply; this is not a runtime store Update |
-| Validate or preview a YAML task file | CLI `task validate` / `task preview [--json]` / `task schema` / `task template`; [task input](guides/task-input.md) | Read-only | Reads one schema v1 task file and prints field errors, effective normalized values, their sources and plan/run blockers. Starts no process or probe and writes no workspace, plan, run or evidence file. A complete preview does not authorize execution |
-| Inspect/prepare experiments | CLI `doctor`; `plan` or `--dry-run` | Read-only inspection / preview | `doctor` may invoke bounded probes and does not certify target compatibility; `plan` previews a specification without persisting a campaign or authorizing execution |
-| Execute/inspect experiments | CLI `run`; `status`; `report` | Experiment-executing / read-only / report-generating | `run` executes caller-supplied commands and records evidence; `status` reads recorded progress; `report` generates HTML from recorded evidence |
-| Deliver retained results | CLI `export --input --output [--agent-job]`; Python `apps.delivery.export_bundle` / `read_bundle` | Report-generating | Publishes Markdown, offline HTML, versioned result JSON and artifact index from one snapshot without remeasurement. Optional native-job input verifies standalone Benchmark terminal token usage. Iterative CLI final returns separate delivery status. See [result delivery](guides/result-delivery.md) and [Benchmark metrics](benchmarks/benchmark-metrics.md) |
-| Inspect/verify archived evidence | `python tools/verify_evidence_archive.py`; [archive contract](guides/evidence-archiving.md) | Read-only by default; explicit network/local scratch with `--download` | Default validates metadata offline; `--archive`/`--download` authenticates and bounds archive reading; `--recomputed` compares separately generated v2 results; never executes archived code or changes verdicts |
-| Rebuild scoped legacy evidence views | `python tools/rebuild_model_evidence.py --archive --output ` | CPU-only; creates a new output directory | Authenticates original bytes and pinned projection/code; no extraction, network, archived-code execution or campaign qualification |
-| Inspect evidence inventory / generate budget input | `python tools/validate_evidence.py [--budget-assets]` | Read-only | Offline layout/hash/schema checks; optional disposable #328 metadata view derived from campaign authority; no downloads |
-| Execute one ordinary local CPU command with a fixed record | Python `inferrsi.harness.api.Harness.allocate` / `execute` / `read` | Experiment-executing / record-writing | One explicit RunStore root and one trusted local CPU target; ordinary command mode only; a record holds execution facts, so exit 0 is not a verdict; no device, model or network fallback |
-| Seal a generation request before execution | Python `inferrsi.harness.generation.prepare_generation`; [original bounds](contracts/generation-bounds.md) | Local record-writing | Seals approved context, plan and original deadline/budget metadata; allocates no attempt, starts no process and does not enable generation-lineage evaluation |
-| Verify a frozen preparation binding before registration | Python `inferrsi.harness.prepared_binding.verify` / `read` / `project` | Read-only / pure projection | Fixed ArtifactRef and read-only stream capability; no registration, entry resolution or execution; [binding contract](contracts/harness-prepared-binding.md) |
-| Verify and execute one frozen source evaluation entry | Python `inferrsi.harness.api.Harness.execute` with trusted `LocalCpuTarget(module_root=...)` | Experiment-executing / record-writing | Fixed preparation and expected code digest; actual source captured after registration; T37 refusals start no worker; [source-entry contract](contracts/harness-entry-verification.md) |
-| Evaluate one retained generated candidate | Python `inferrsi.harness.api.Harness.execute` with `generation_record_ref`; [same-Store lineage](contracts/generation-lineage.md) | Experiment-executing / record-writing | Same authorized Store, sealed successful generation and exact retained candidate; distinct attempt, original deadline/budget scope and policy; registered replay precedes fresh source reads; no worker-manifest parsing or automatic rerun |
-| Capture and seal evaluation proofs | Python `Harness(..., evidence_capture=...)`; [capture contract](contracts/harness-evidence-capture.md) | Read-only capture callback / record-writing | H authorizes attempt bytes, seals actual provenance and retains drafts before one commit; ordinary mode and replay never call the observer |
-| Assemble evidence capture by role | Python `apps.api.EvidenceCapture`; [host adapter](contracts/apps-evidence-capture.md) | Read-only byte assembly / injected pure projection | Reads only H-authorized candidate/report refs; no grading, producer sealing or record/archive writes; reentry is short-circuited by H |
-| Replay the same saved execution request | Python `inferrsi.harness.api.Harness.execute` | Existing-state query / fixed record-reading | Same attempt and canonical digest; existing state short-circuits fresh binding/execution; [replay and original limits](contracts/harness-evaluation-replay.md) |
-| Freeze a configured P1 preparation | Python `benchmark.preparation.PreparationService.prepare`; [production prepare](contracts/production-prepare.md) | Read-only resource access / pure encoding | Verifies supplied frozen worker/resource bytes and returns a preparation, protocol and role-keyed closure; Apps separately archives them before publishing a Ref |
-| Evaluate saved requests | CLI `evaluate prepare/execute/assess`; [saved-request CLI](guides/apps-evaluate-cli.md) | Local archive/output writing; execute additionally runs the configured H target | Explicit saved request, output ID, storage and trusted runtime configuration; reuses Apps ports and results without allocating attempts, selecting feedback or retrying |
-| Assess one fixed P1 record offline | Python `benchmark.assessment.assess`; [production assess](contracts/production-assess.md) | Read-only retained evidence / pure encoding | Verifies the frozen protocol, actual capture and proof bytes; returns independent claims without launching a worker or writing an archive; Apps selects the primary key and archives the result |
-| Project P1 worker reports into capture drafts | Python `benchmark.proofs` codecs / `ProofProjector.project`; [proof drafts](contracts/production-proofs.md) | Pure computation | Produces proof bytes from supplied capture facts and reports; H must authenticate, retain and seal them before commit; no worker or grader execution |
-| Configure the CPU evidence-smoke task | Python `benchmark.cpu_smoke.prepare_service`; [task contract](contracts/p1-cpu-smoke.md) | Read-only owned resource configuration | Freezes the standalone worker and same-source baseline for the existing prepare port; actual execution/retention stays in H; no performance-gain claim |
-| Seal a generation with frozen feedback authorization | Python `harness.generation.prepare_generation`; [opt-in feedback profile](contracts/generation-feedback-policy.md) | Local context / policy / generation-plan retention | Optional fixed policy and source record Refs authorize original scope/check proofs before provider calls. Absent-policy calls remain a trusted-host path; no automatic execution or policy-approval authentication |
-| Seal host-approved generation context without a policy Ref | Python `harness.generation.prepare_generation`; [feedback boundary](contracts/generation-feedback.md) | Local context / generation-plan retention | The trusted host authorizes feedback and excludes final-only results before handoff. Without the opt-in policy Ref, H seals supplied material and does not prove feedback-policy enforcement or execute a worker |
-| Visualize a recorded run or campaign | CLI `dashboard`; [dashboard](dashboard.md) | Report-generating / local read-only serving | Writes an offline HTML snapshot or serves an optional live view on loopback; does not run an agent or validate a claim |
-| Capture a knowledge context | CLI `campaign capture-context`; [offline dashboard](dashboard.md#record-the-optimization-story-campaign-trace) | Local evidence-writing | Saves assembled context and resource hashes in a new `knowledge/.json`. Supports ordinary questions and explicit IDs. The only accepted explicit `--relevance-method` value is `find-lexical-v1` |
-| Retain an executed retrieval | Python `apps.workflows.campaign.save_retrieval`; [capture contract](guides/knowledge/knowledge-retrieval-trace.md#retain-a-standalone-result) | Local evidence-writing | Saves an existing catalog/collect result under a fresh campaign capture ID; no new search or automatic publication |
-| Import one round of knowledge searches | CLI `campaign import-search`; [round import](dashboard.md#import-one-rounds-searches) | Local evidence-writing | Reads a Codex rollout window or context captures. With `--archive-review`, retains excerpts of attributable tool returns and reviewed decisions for readers of the evidence bundle. |
-| Record the optimization log | CLI `campaign log`; [offline dashboard](dashboard.md#record-the-optimization-story-campaign-trace) | Local evidence-writing | Validates and stores a new numbered campaign log version; the dashboard cross-checks it against captures and runs |
-| Assemble an optimization trace | CLI `campaign assemble-trace`; [per-candidate narrative](dashboard.md#per-candidate-narrative-schema-version-1) | Local evidence-writing | Copies an explicitly reviewed context into a new bounded campaign-root snapshot; caller owns redaction and narrative accuracy |
-| Import a MindIE read | CLI `campaign import-mindie`; [Codex workflow](guides/plugins/codex-plugin.md#mindie-knowledge) | Local evidence-writing | Retains caller-supplied query/explain bytes and hashes, exports delivered graded bodies and a trace context fragment; no activation, model call, transcript capture or automatic caller review |
-| Associate runs with a local campaign | CLI `campaign init` / `campaign record` / `campaign decide`; [offline dashboard](dashboard.md) | Local evidence-writing | Legacy manual records reference existing artifacts and never start an agent; record/decide cannot mutate a managed optimization campaign |
-| Adapt existing Flare delivery evidence | [Offline qualification adapter](benchmarks/flare-qualification.md), `python -m inferrsi.benchmark.validators.flare` | Read-only | Existing raw packets and a separate receipt; one HTTP delivery metric, no model/server/device execution |
-| Evaluate selected skill revisions | [Bounded skill-evaluation driver](skill-evaluation/README.md) | Experiment-executing | Explicitly authorized real Codex calls, independent task verdicts and private evidence; separate from numeric engine-performance scoring |
-| Compare skill additions or updates | [Configured skill comparison](skill-evaluation/skill-eval-comparison.md), `python -m tools.skill_eval_compare` | Read-only preparation / experiment-executing / report-generating | Fixed Git snapshots and one shared exam; explicit plan authorization for execution; JSON + Markdown regeneration makes no model calls |
-| Export a cloud-generated parser pair | [Generation-only protocol](skill-evaluation/skill-eval-generation-only.md), `python -m tools.skill_eval_cloud_export` | Local evidence-writing; no execution or publication | Validates frozen inputs and retained sources; writes one bounded inert JSON bundle, never executes parser source |
-| Review the historical parser generation pilot | [Main-only historical job record](skill-evaluation/skill-eval-historical-job.md) | Historical audit | The checked-in authorization expired at 16:00 UTC on 2026-10-30. The workflow and frozen controls remain available for audit. |
-| Qualify an artifact verifier host | [Manual reviewer qualification](skill-evaluation/skill-eval-reviewer-qualification.md), `python -m tools.skill_eval_qualify` | Trusted-control execution / report-generating | Manual main-only workflow; fixed software controls, no model or external artifact input; unavailable isolation fails rather than skips |
-| Replay a cloud-generated parser pair | [Isolated cloud replay](skill-evaluation/skill-eval-cloud-replay.md), `python -m tools.skill_eval_cloud_replay` | Untrusted-artifact execution / report-generating | Manual pinned data ingress; same-host controls before bubblewrap-only replay; no models or credentials |
-| Validate one harness-improvement step | [Offline improvement](guides/harness-improvement.md), Python `tools.skill_eval_improve.prepare` / `run_offline` | Snapshot-writing / offline experiment-executing | Supplied declarative INV/DOM edits, shared total limits, rerun and one holdout gate; trusted fixed-output clients only; no real-model or Store execution |
-| Build an offline candidate tree and completion menu | Python `harness.search_tree` / `harness.verification_plans.completion_menu`; [control contract](speculative-search.md) | Read-only / in-memory transitions | Immutable candidates, scoped caller-supplied receipts and bounded exact plans; execution, durable state, accounting, learned roles and final acceptance require separate adapters |
-| Run bounded speculative Engine search and role updates | `inferrsi search engine`; [support and configuration](speculative-search.md) | Execution / candidate writes / CPU model updates | Explicit shared RunStore, permissions, checkpoint, budgets, domain and final gate; actual device allocation is caller-owned |
-| Inspect/export speculative search | `inferrsi search status` / `search export` | Read / output artifact | Reads the existing store; never restarts search, training or final evaluation |
-| Compose Skill speculative search | Python `apps.workflows.search_benchmarks.SkillEvaluator` and checkout `tools.speculative_skill.Comparator` | Explicit provider execution through existing comparator | Frozen original baseline, split descriptors, independent grader and bounded provider; see campaign accounting limits in the support matrix |
-| Plan and report skill PR evaluations | [Skill PR integration](skill-eval-pr.md), `python -m tools.skill_eval_pr` | Read-only planning / authorized experiment-executing / PR-publishing | Trusted mapping, exact operator approval, consumed execution identity and credential-separated publication from retained evidence; no automatic paid trials |
-| Recover goal progress and the next proposal | [Offline goal checkpoints](guides/goal-checkpoints.md), `python -m tools.goal_checkpoint` | Read-only | Explicit scope/criteria, pinned owner decisions and existing comparison receipts; a disposable view, never execution or acceptance authority |
-| Summarize campaign gains | `tools/campaign_summary_chart.py`; `report`/`run` figure | Figure-generating | Renders recorded values into one gain figure plus a matching table; validates the specification and computes nothing new |
-
-The `collect`, `read` and `resource` commands share the reader's rules; they
-are distinct from `knowledge search`, whose package catalog filters
-(tier/repo/backend/scenario) intentionally exclude checkout and store items.
-
-## Discovery and reading
-
-### Discover MLX hardware — doctor --backend mlx
-
-- **Inputs:** a prepared Git checkout and its existing repo type, target Python,
- optional case-insensitive --device-model chip match. Discrete --device-ids are
- unsupported for this unified-memory discovery probe.
-- **Effect:** read-only. On macOS, the existing bounded command runner queries
- sysctl hw.optional.arm64 machdep.cpu.brand_string. Non-macOS hosts are rejected
- without a sysctl call. Target-Python metadata includes mlx version/null without
- importing MLX.
-- **Output:** actual probe facts and chip identity when available; explicit
- unavailable or device_model_mismatch reasons otherwise. doctor exits 1 for
- unavailable/mismatched discovery. compatibility stays unverified even when
- the chip is available or the MLX package is installed.
-- **Boundary:** no engine adapter, package installation, model execution or
- Metal/performance qualification. The dependency/mlx source cards are separate
- imported guidance; common skill discovery records are not counted as MLX
- backend records.
-- **Example:** inferrsi doctor --repo . --repo-type vllm_omni --backend mlx
-
-### Discover discrete accelerators — doctor --backend rocm|ascend
-
-- **Inputs:** a prepared Git checkout and its existing repo type, target Python,
- optional repeatable --device-ids and one case-insensitive --device-model.
-- **Effect:** read-only. The bounded command runner calls `rocminfo` or
- `npu-smi info`; the output is parsed into device records (Agent blocks, or the
- pipe-framed NPU table) rather than searched for loose tokens.
-- **Output:** the parsed records plus the probe facts. A requested ID and the
- requested model must match the same record; an ID appearing only in a
- temperature or power cell does not count. Empty or unrecognized output yields
- no records, so discovery stays unavailable and records why. selection_verified
- is true only for a matched record.
-- **Boundary:** discovery proves that a tool reported a device, not that the
- backend, engine or kernel path is compatible. compatibility stays unverified.
-- **Example:** inferrsi doctor --repo . --repo-type vllm_omni --backend ascend --device-ids 0 --device-model 910B3
-
-### Search packaged records — `knowledge search` / `knowledge show`
-
-Use `find` for ordinary discovery. With no query, `knowledge search` lists
-matching package records in ID order. With a query, it uses Find ranking over
-the filtered package catalog and still returns complete catalog records. The
-`context` export shares this selector. Text query results can change in both
-membership and order. Use `--explain` for the recorded ranking and counts.
-
-- **Inputs:** optional query words and `--tier`, `--repo-type`, `--backend`, `--scenario`, `--limit`, `--json`, `--explain`; `show` takes one record ID.
-- **Scope:** the installed package catalog (authored records and registered skill views in `skill_library/`) only.
-- **Output:** tab-separated record lines (id, status, backend, title), or a JSON list with `--json`; `--explain` returns a JSON envelope with `items` and `retrieval` (entry, ranking, scores and counts). Python uses `search_knowledge(..., explain=True)` for that envelope. `show` prints one full record as JSON.
-- **Side effects:** none.
-- **Failure behavior:** no match prints nothing and exits 0 — an empty result is not an error (an empty JSON list with `--json`, or empty `items` in the `--explain` envelope); an unknown `show` ID and unsupported filter values exit 2.
-- **Example:** `inferrsi knowledge search --repo-type vllm_omni --backend ascend --json`
-
-The tier/repo/backend/scenario filters are package-only: an empty filtered
-result does not mean that no checkout or store knowledge exists. See the
-[three-tier guide](../src/inferrsi/knowledge/data/skill_library/records/README.md) for all sources.
-
-### Prepare model-aware research — `knowledge research`
-
-- **Inputs:** model identity; repeatable `--framework`, `--task`, `--modality`, `--mechanism`; existing `--tier`, `--repo-type`, `--backend`, `--scenario` hard filters and `--limit` output cap; optional `--target-backend`, `--target-device`, positive finite `--target-memory-gib` annotations.
-- **Scope:** installed package records only. A packaged MiniMax-H3 profile supplies its source-grounded diffusion/video/audio identity and component roles. Unknown models use only caller-supplied dimensions and need source inspection; no architecture is guessed.
-- **Output:** JSON query groups and match counts, a bounded deduplicated union with `matched_queries`, unchanged full records/provenance, active filters, component roles, preparation/example resource paths and an unverified target state. Queries take turns contributing results; this ordering does not rank engine quality.
-- **Side effects:** none; no network requests, hardware probes, model download or engine execution. Target annotations do not add runtime backends.
-- **Failure behavior:** no match returns an explicit empty envelope and exits 0; invalid limits/memory or unsupported catalog filters exit 2. A zero-match dimension stays visible.
-- **Example:** `inferrsi knowledge research MiniMax-H3 --framework mlx --target-backend metal --target-device "M5 Mac Studio" --target-memory-gib 64 --limit 12`
-- **Python:** `from inferrsi.knowledge.research import research_knowledge`; `research_knowledge("MiniMax-H3", frameworks=["mlx"], modalities=["video"], limit=12)`.
-
-Each research query uses Find over the same filtered package catalog. Querying
-separate dimensions broadens discovery while preserving the active package filters.
-Keep those filters explicit when transferring mechanisms from other backends;
-target intent does not qualify their applicability. Read the canonical
-[preparation procedure](../src/inferrsi/knowledge/data/skill_library/workflows/research/inference-engine-research/references/model-aware-preparation.md)
-and the repository-owned [h3.c residency audit](../src/inferrsi/knowledge/data/skill_library/systems/engines/h3-c/audit-h3-runtime-residency/SKILL.md)
-for native-engine reference selection, full encoder/DiT/VAE accounting,
-quantized-package compatibility and target hardware decisions. Returned resource
-paths are relative to `importlib.resources.files("inferrsi")` and ship in the wheel.
-The small model profile links that skill's full inventory and worked example;
-those resources retain their repository owner and source attribution.
-
-### Discover/read packaged or custom skills — `skills list` / `enter` / `show` / `resource` / `reference`
-
-- **Inputs:** The agent selects a primary skill by deliverable and runs `inferrsi skills enter task-accuracy`, for example. It returns the primary's complete procedure and host header before supporting evidence search. The base installation can omit the embedded search metadata from this delivery. A pinned `read --resource` exposes the complete source file, including its metadata. An unknown, unavailable or non-primary owner is an error. `list` reads skill frontmatter (and legacy sidecars in historical/custom checkouts); `show ` selects one instruction body; `resource ` and `reference ` resolve one path. The default is the installed library's registered skills; an explicit `--root` selects a custom flat tree or a categorized library with `skill-index.json`. PyYAML, a core dependency, supplies the YAML parser for frontmatter operations; the `skills` extra remains a compatibility alias.
-- **Scope:** complete packaged skills under `data/skill_library/`, or the explicitly selected custom root. The 21 English engine and research-router skills remain accessible through catalog records and library navigation, separately from the registry.
-- **Output:** metadata listing, one instruction body, or a resolved path.
-- **Side effects:** none. `resource`/`reference` do not load or execute the target.
-- **Failure behavior:** missing skill, undeclared reference or path escape is an error.
-- **Example:** `inferrsi skills show weight-loading-optimization`
-
-Reading instructions does not authorize their commands. The catalog links full
-packaged bodies; the two matrices remain authoritative.
-
-### Export legacy cited material — `context`
-
-- **Inputs:** optional query; **required** `--repo-type` and `--backend`; optional `--tier`, `--scenario`, `--limit`, `--output`.
-- **Scope:** cited catalog material from the installed package.
-- **Output:** a Markdown reference bundle at the chosen path (the resolved path and record count are reported), or to stdout without `--output` (text only).
-- **Side effects:** writes only the caller-chosen output file.
-- **Failure behavior:** no match produces an empty export (header only), not an error; unsupported filter values exit 2.
-- **Example:** `inferrsi context --repo-type vllm_omni --backend cuda --output context.md`
-
-Imported source text is data for your agent, not authorization to execute
-upstream instructions.
-
-## Normalized knowledge (Python)
-
-### Find — `find` / `inferrsi.knowledge.knowledge_find.find`
-
-One ranked list for one question, across packaged skills, imported records and
-checkout cases. Run a result's `open` command to read its complete entry and
-receive a revision. Use that revision with the same ID and source selection
-for a pinned `read` or `resource` call.
-
-Cases are ranked alongside skills, so prior rejected directions can surface
-directly. One matching term is enough to rank an entry, and `--limit` caps the
-result list. Scoring reads the corpus files directly. The reader opens bundles
-to validate material for the returned hits.
-
-Scoring is `idf x field weight x sqrt(occurrences)` summed over query terms,
-with titles, summaries, tags and case findings weighted above bodies. Bodies
-longer than the corpus median get less weight so a broad manual needs more
-specific matches to outrank a short case. Separators
-do not bind: `kv_cache`, `kv-cache` and `KV cache` all tokenise to the same two
-terms, so a query in plain words reaches the punctuated spellings this corpus
-also uses. Latin terms still match on boundaries, so `oom` does not match inside
-`headroom`. CJK is cut into overlapping bigrams, because single characters make
-idf treat grammatical particles as rare terms. Ties break towards the stronger
-recorded state rather than alphabetical identity. This is deterministic lexical
-matching, not a learned ranking, and a hit never asserts that an entry applies.
-
-Common English function and question words such as `the`, `how` and `should`
-are omitted. Conditions such as `not`, `without`, `before` and `after` still
-contribute. Backend preference uses platform names in the original query,
-including `昇腾` for Ascend. When the query names exactly one supported backend,
-results declared for a different backend receive half their lexical score.
-`--explain` reports the adjusted contribution of each matched term.
-
-Chinese query terms expand through `data/skill_library/config/query_aliases.json` before ranking.
-The packaged library is English by policy while its readers work in Chinese, and
-the corpus holds too few Chinese characters for a Chinese query to score on its
-subject. Expansion is one-way and query-side: 显存 reaches `device memory`, not
-the reverse, and an entry is only listed when that English form actually occurs
-in the corpus. A query whose terms were expanded reports them under `expanded`,
-so a wrong expansion is visible in the result rather than only in the ranking.
-
-Three limits are inherent to lexical ranking and are recorded here rather than
-worked around. A query made only of terms common to this corpus ("operator",
-"test", "graph", "speedup") has little to rank on and may bury the intended
-entry. A query that shares no words with its target does not reach it: asking
-for "moving attention state to host memory" misses an entry that says `kv`,
-`offload` and `tier` throughout, because nothing matches. Name the specific
-symptom, operator or flag where you can, and when a plausible query returns
-nothing useful, search the corpus directly rather than assuming it holds
-nothing — `find` ranks words, not meanings.
-
-The third limit is deciding whether the question needs the corpus. `find`
-returns `no_match` when no query terms match. On the labelled set, a majority
-of queries were ones an engineer should decide without searching at all, yet
-each had lexical matches. Their scores overlap the answerable range, so a
-cutoff would suppress useful results too. The caller decides whether the
-question calls for prior evidence.
-
-- **Inputs:** the query, `--limit`, `--kinds` (subset of `case,skill,record`), `--skill-root` to select the library for cases and skills, `--explain` for per-term contributions, `--json`.
-- **Scope:** installed package records and the packaged (or selected) skill library, including its cases. Packaged-skill projections are excluded from the record side so one owner is not ranked under two identities.
-- **Output.** Items identify their `id`, `authority` (`package` or `checkout`),
- `source_location` (`installed` or `checkout`), `kind`, recorded `state`,
- `score`, `title` and corpus-relative `path`. `source_location` identifies
- where the material was indexed. For installed skill and case bodies, the
- `checkout:` read reference uses `--installed-library` to resolve the source
- from the reader's installation. A custom root uses `--skill-root`.
- Where recorded, items carry source, summary, applicability, limitations and
- local verification status. The limitations preview contains up to three
- complete entries within a 400-byte UTF-8 JSON list. `limitations_withheld`
- counts omitted entries. Open the owner for the complete list.
- Case findings are ordered by query overlap,
- with `findings_total` and `findings_withheld` describing the available preview.
- Pass `--decision-cards` to add a revision-pinned L1 read and its exact card
- size to each readable Skill, Record or displayed Case finding. Follow the
- selected `decision_card.read_args` to read that atom. See the
- [decision card read contract](knowledge-operations.md#read-a-decision-card).
- Each finding carries its outcome, reason, revisit condition and any assessed
- scope and bounds. `bounds_source` identifies whether bounds apply to the
- finding or the whole entry. The envelope reports `corpus_size`, `matched`,
- `no_match`, any `expanded` terms and retrieval limitations.
-- **Reading a hit.** Plain output prints a POSIX `open` command or a labelled
- PowerShell command on Windows. JSON exposes the rendered command as `ref`,
- full subprocess arguments as `open_argv` and InferRSI CLI arguments as
- `read_args`. The arguments include the source-qualified ID and any needed
- source flag. Most hits use `read --material --omit-resources` to return the
- entrypoint content, provenance and revision. For a skill, the procedure
- omits the embedded machine annotation. A readable hit's
- `next_read_content_bytes` counts the UTF-8 bytes in that command's `content`
- on the snapshot inspected by Find. For a future unpinned read this field
- is a size estimate. A later edit can change the content and its size.
- Use Collect's context budget for bounded delivery. The count excludes the
- envelope and additional resources. Remove
- `--omit-resources` to list the bundle's resources. Hits that fail the reader's
- material check carry `unreadable` with the reason.
-- **Without PyYAML.** PyYAML is a core dependency. When an install lacks it (for
- example, one made without dependencies), an installed Skill with a
- matching valid package record opens its original text through that record,
- using `read --resource` and its exact revision. The result names the selected
- resource in `content_resource`. A Skill in a custom root may require PyYAML.
-- **Side effects:** none. Retain the revision returned by `read` for evidence and resource followups.
-- **Example:** `inferrsi find "NPU OOM after caching per-step masks" --limit 3` returns the casebook entry recording that attempt first. A vaguer phrasing ranks the procedural skills above it, which is the first limit below rather than a defect.
-
-#### Show SearchSpace coordinates on Find hits
-
-Run this command from an InferRSI checkout with its verified SearchSpace index.
-
-```text
-inferrsi find "graph mode" --skill-root src/inferrsi/knowledge/data/skill_library --show-searchspace-coordinates
-```
-
-Find annotates the ranked local Skill hits from the verified registry with their
-coverage state and all declared resource × stage pairs. A registered Skill with
-`unknown` coverage has an empty pair list. In JSON, `searchspace_coordinates`
-is attached to the hit, and `searchspace_source` reports the matrix path and
-SHA-256 along with the Skill registry and metadata digests.
-
-Add `--searchspace-coordinate SSD Configure` to restrict the result to Skills
-with that exact pair. Each remaining hit still shows all its pairs. Find reports
-an error if the index is missing, stale or from a different checkout source.
-Run `python tools/build_skill_coverage.py --searchspace-index` in that checkout
-to regenerate the index, then retry.
-
-#### External channels are not installed with this package
-
-`find` can also query separately enabled read-only channels. A fresh install
-searches the packaged corpus. See [fresh-install output and setup](guides/knowledge/external-channels.md#a-fresh-install-has-no-external-channel)
-for the explicit per-checkout grant and source access requirements.
-
-- **Inputs:** `--backend ` declares the task backend; **without it and
- without an approved grant, no channel is searched** and each one reports
- `backend_unknown`. `--no-external` skips all channels for CI and offline runs.
- `--external-limit ` overrides the per-channel cap (`cannbot-knowledge` 100,
- `mindie-agent` 5). `--external-timeout ` bounds discovery and search
- together (8s default); `--platform` overrides the upstream platform in the grant.
-- **Output:** `external[]` sits beside `items`, never inside it. Each entry
- carries `state`, `revision`, `elapsed_ms`, `score_scale` and `count`. A state
- other than `ok` (`not_enabled`, `unreachable`, `index_stale`, `timeout`,
- `version_mismatch`, `rejected`, `backend_unknown`) means the channel did not
- answer — it is **not** the same as answering with no hits.
-- **Side effects:** none on this repository. A channel reads an external
- checkout that the person approved; nothing is copied into the package, a
- wheel or `evidence/`.
-- **Determinism:** `--no-external` reproduces the pre-channel output exactly.
-
-### Collect — `collect` / `KnowledgeReader.collect`
-
-Use Collect to take known material in caller-specified order. With
-`--context-bytes `, it assembles complete files up to a UTF-8 body budget and
-reports unavailable or oversized context. With no IDs and one question, Collect
-uses the same local Find ranking as `campaign knowledge`, `benchmarks session
-knowledge`, and `campaign capture-context`. See [selection and context](knowledge-operations.md#ranked-discovery-and-budgeted-context)
-for provenance and accounting. To capture an installed Case exactly, follow the
-`find` result to `read`, then pass its ref and revision to
-`campaign capture-context --installed-library --id-ref REF --revision REF=REV`.
-
-#### Collect a pinned body and its L1 decision card
-
-Keep the qualified ref, revision and source options from Find or a known read.
-Repeat `--decision-card` for each selected body that needs a full L1 card. For
-a Case, append one original finding selector, such as `id:trace-loss` or
-`case.json#/findings/1`, to the ref with `=`.
-
-```sh
-inferrsi collect --installed-library --id "$REF" --revision "$REF=$REV" \
- --context-bytes 65536 --decision-card "$REF" --json
-```
-
-Apps can call `inferrsi.apps.workflows.knowledge.knowledge_reader` with the same
-source and use `reader.collect(ids=[ref], revisions={ref: rev}, context_bytes=65536,
-decision_cards={ref: finding})`. Set `finding=None` for a Skill or Record.
-Collect delivers the usual context resources first. It then projects requested
-cards from those same bundles in ID order. The shared budget counts UTF-8
-resource content and each delivered card's compactly serialized, sorted-key JSON.
-`decision_cards` reports each request, including `over_budget` with the whole
-card size, `no_body` when Collect omitted the body, and `unavailable` for an
-invalid decision source or finding. See `omissions` and `context_omissions` for
-the body outcome. Store entries retain their existing `unsupported_context` result.
-To reopen a projected card's source or body, use `read REF --revision REV
---resource PATH` with the same source options and the returned `source_resource`
-or `body_resource`.
-
-#### Migrate old text queries
-
-- `knowledge search QUERY` and `context QUERY` keep their package scope and
- output format. Text queries now use Find and can match entries that contain
- only part of the query. Omit `QUERY` for filtered inventory or use
- `knowledge show ID` for one known record.
-- Pass one question as `collect QUERY` or `collect --relevance QUERY`. If an
- old script combines a positional query and a separate cue, write one question
- and express hard constraints with structured flags such as `--kind` and
- `--backend`. Use `--kind knowledge` to search only the package catalog.
-- Remove old `--relevance-method` values from scripts and managed calls. Find
- is the default and `find-lexical-v1` is the only accepted explicit value.
- Check the new rank order before using it to select material in automation.
-- For exact collection and replay, use the retained IDs and revisions without
- a positional query. With explicit IDs, `--relevance` can order optional
- context resources while membership and caller order remain fixed. Read
- historical captures for their original selected and delivered bytes.
-
-- **Inputs:** optional query, `--kind`, repeatable explicit `--id`, repeatable `--revision ID=REV`, `--limit`, `--max-bytes`, `--material`; `--skill-root` selects an explicit skills root, `--store` opens an existing store read-only (the store records its reserved skills root and rejects a mismatched or missing `--skill-root`).
-- **Scope:** installed package records, the selected library, and any explicitly opened store. A text query without a custom library or store can discover bundled Cases and Skills. Exact inventory selects the bundled library with `--installed-library`.
-- **Output:** with `--json`, the complete **normalized** envelope — items carrying the bundle's normalized metadata, resources and dependencies, plus `no_match`, `omissions`, `collisions`, `material_bytes` and the recorded limitations; fields that exist only in a package record's original entrypoint document are not projected into the normalized metadata and are read via `--material` or `resource`. Without `--json`, the envelope's selection is projected line-wise: one tab-separated line per item (`ref`, `revision`, `kind`, `state`, recorded `applicability`; free-text fields are control-character-escaped so one item stays one line), `collision` lines for multi-authority IDs, `omitted` lines with reason codes, an explicit `no_match` line when nothing was selected (query, filters or limits; when items were skipped the `omitted` lines above it carry the per-item causes), and — with `--material` — the entrypoint content in delimited blocks. The text mode does not print `material_bytes` or the envelope limitations; use `--json` for the complete envelope. The recorded `state` and applicability are printed as recorded and no validation status is invented. Exit 0 covers a result envelope, including no-match and omissions.
-- **Side effects:** none; both adapters and the read-only store connection are read-only.
-- **Failure behavior:** discovery-wide invalid identities fail the call. Per-item omissions are reported individually. Repository, tier and scenario filters use the package catalog. A backend filter scopes ranked discovery to the requested backend and shared material.
-- **Example:** `inferrsi collect --id package:inferrsi.ascend.skills.ascend_graph_mode --id package:inferrsi.ascend.skills.ascend_device_health --context-bytes 65536 --json`
-
-### Read exact material/resources — `read` / `resource` / `KnowledgeReader.read` / `.resource`
-
-- **Inputs:** `read` takes a qualified or unambiguous public ID and an optional `--revision` (the current revision when omitted). Use `--material` for the entrypoint or `--resource ` for a specific UTF-8 bundle resource. The `resource` command takes the ID, resource key, exact `--revision` and `--output` path.
-- **Scope:** one selected bundle from the package, checkout or store adapter.
-- **Output:** `read` returns the bundle view at the requested revision. With `--resource`, it identifies the returned text with `content_resource`. The `resource` command writes raw bytes to the requested output path. Use the same source flag when following up with either command.
-- **Side effects:** `resource` writes only the caller-chosen output file.
-- **Failure behavior:** ambiguous identity names the qualified choices; unavailable/stale revisions and missing/unsafe resources fail explicitly — no fallback to newer bytes.
-- **Example:** `inferrsi read checkout:case.qwen-ascend-rejected-directions --installed-library --material`
-
-## Store candidates (Python)
-
-Open the store with `inferrsi.apps.workflows.knowledge.open_knowledge_store`. Pass the
-authorized `store_root` and the store's reserved `skill_root`, if configured.
-The default opens an existing store read-only for history. Pass
-`writable=True` explicitly to create or update candidates.
-
-### Create / Update — `KnowledgeStore.create` / `.update`
-
-- **Inputs:** a complete candidate `Bundle`; Update additionally requires the expected current revision, a reason and an explicit evidence list.
-- **Scope:** one existing, explicitly authorized local store directory; store-owned candidate IDs only.
-- **Output:** the new revision; retained immutable history.
-- **Side effects:** writes only the store database; never package, checkout, evidence or matrix files.
-- **Failure behavior:** duplicate identity, stale expected revision, adapter-owned ID and validation failures are explicit errors.
-- **Example:** see [authorized local Create / Update](knowledge-store.md).
-
-CLI/API availability does not itself grant write authority. Adapting read-only
-material into a store uses a distinct ID and records `derived_from` lineage; it
-never overwrites the original. Amending repository-owned knowledge follows the
-normal scoped PR path.
-
-## Experiments
-
-The public preparation, execution and assessment API remains
-`inferrsi.apps.api`. Its fixed artifact access and output publication use
-`inferrsi.apps.storage.archive`, `artifact_reader` and `result`; the directory
-creation helper is `inferrsi.apps.storage.evidence_layout.ensure_evidence_layout`.
-The CLI entry remains `inferrsi.apps.cli:main`. See the
-[output contract](guides/apps-output.md) and [migration inventory](apps-module-migrations.json)
-for the retired Apps imports and their canonical storage paths.
-`inferrsi.apps.handoff.bridge`, `handoff.context_provider` and
-`handoff.candidate_provider` implement execution/evidence binding, context
-delivery and generation handoff. The API still exports the one canonical
-`CandidateProvider`; `EvaluationPort` remains defined in `apps.api`.
-
-### Validate/preview a task file — `task validate`, `task preview`
-
-- **Inputs:** one YAML task file (schema v1: `optimization`, `environment`, `acceptance`); `preview` also takes the mapped `plan`/`run` flags as explicit overrides. `task schema` and `task template` print the packaged schema and template.
-- **Scope:** format and value errors by field, the effective normalized task with each value's source (`yaml`, `cli`, `default`, `missing` or `invalid`), and the fields a full plan/run still needs.
-- **Output:** text, or JSON with `--json`. Exit 0 for a valid file, even an incomplete draft; 1 for an invalid file or a rejected override; 2 for a malformed flag.
-- **Side effects:** none. Reads the task file only: no subprocess, probe, install or file write.
-- **Failure behavior:** unknown or duplicate keys, unsupported versions and type or range errors are reported with field paths; an acceptance flag that disagrees with the file is a conflict.
-- **Example:** `inferrsi task preview task.yaml --json --repetitions 7`
-
-Explicit flags override YAML values, YAML values override built-in defaults, and an
-omitted flag never replaces a YAML value. Acceptance fields come from the file. See
-[task input](guides/task-input.md). `plan --task` and `run --task` use a complete file with
-the same merge (see [use with plan and run](guides/task-input.md#use-with-plan-and-run)).
-
-### Inspect/prepare — `doctor`, `plan`, `--dry-run`
-
-- **Inputs:** repository/backend/device flags; `plan` takes the full experiment specification as flags, or a complete YAML task file with `--task ` plus explicit mapped overrides.
-- **Scope:** environment inspection and specification preview.
-- **Output:** environment facts, or a preview of the RunSpec. With `--task`, the preview adds a `task` block equal to `task preview --json` for the same file and flags, and a `frozen_gate` block that reports whether the task's acceptance fields agree in content with the local frozen gate record named by `acceptance.reference`. `agrees` is content agreement only; it does not authenticate the record's provenance.
-- **Side effects:** `doctor` may invoke bounded read-only probes; `plan`/`--dry-run` persist nothing.
-- **Failure behavior:** unavailable devices or invalid flags are reported explicitly. With `--task`, task field errors, conflicting acceptance flags and blockers are printed by field to stderr, exit 2, before any probe. Without `--task`, `--baseline-command` and `--candidate-command` are required.
-- **Example:** `inferrsi doctor --repo . --repo-type vllm_omni --backend cpu`
-
-`plan` previews a specification. That preview alone does not persist a frozen
-campaign and does not authorize execution. Inspection does not certify target
-compatibility.
-
-### Execute/inspect — `run`, `status`, `report`
-
-- **Inputs:** the full experiment specification as flags or as a complete `--task ` (`run`); a run ID and output directory (`status`/`report`). With `--task`, the caller/host must first establish that `acceptance.reference` names the accepted frozen gate record. InferRSI checks that the task and that local record agree in content (`agrees`); it does not authenticate the record's provenance and takes no expected digest.
-- **Scope:** caller-supplied benchmark, candidate and validation commands under the experiment contract.
-- **Output:** a run ID and evidence directory; recorded progress; an HTML report. With `--task`, the run directory also holds `task.json`, the task preview, and `frozen_gate.json`, the gate result with the record's SHA-256 for citation in the acceptance issue.
-- **Side effects:** `run` executes the supplied commands and owns child-process cleanup; `report` writes HTML into the run directory.
-- **Failure behavior:** exit codes 0 PASS, 1 FAIL, 2 INCONCLUSIVE/input errors; cancellation is recorded. With `--task`, task field errors and blockers exit 2 before any probe. A task whose acceptance fields differ from the frozen gate record (`mismatch`), or whose gate cannot be checked (`unverified`: an HTTP(S) reference, a missing file, or a record that is not a schema v1 `acceptance` section stating the gate), also exits 2 before any probe; see [frozen gate record](guides/task-input.md#frozen-gate-record). A baseline checkout `HEAD` that differs from `acceptance.baseline_revision` exits 2 after inspection. In all three cases no command starts and nothing is written.
-
-Task-mode RunSpec validation, including local candidate-directory checks, runs before
-environment probes. The frozen baseline also binds the execution through the existing
-`RunSpec.revision` field, while the observed source identity binds the existing
-`RunSpec.snapshot_id`: Harness compares the actual initial and pre-trial baseline
-snapshots, including working-tree changes, with those pins. A later
-checkout mismatch starts no trial from that snapshot and leaves the failed diagnostic
-run as `INCONCLUSIVE` with its source/error facts retained.
-- **Example:** see [quickstart: real remote experiment](quickstart.md#real-remote-experiment)
-
-Operation success, recorded execution state and the experiment verdict are
-distinct conclusions; a completed run does not upgrade imported knowledge or
-unvalidated candidates.
-
-### Inspect a fixed attempt — `status --record-ref`
-
-Pass a JSON `RecordRef` file and its trusted `--storage-config` JSON. An
-optional `--assessment-ref` JSON adds the archived claim outcomes and scopes
-for the same record revision. The output shows committed execution facts,
-including phase, process outcome, cleanup and recording time. A successful
-read exits 0. Invalid references, archive integrity failures and mismatched
-revisions exit 2.
-
-The execution view preserves the committed `generation_record_ref` in full.
-Reports and Dashboards show its attempt ID, fixed record revision and SHA-256,
-without displaying its artifact location. A null reference is shown as
-"Not linked"; an older saved view without the field is shown as "Unknown".
-Reading the view does not open the referenced generation or resolve a current
-record, so it can still present a link whose source is unavailable. This is a
-recorded association, not a fresh lineage authorization or an assessment.
-A missing or malformed reference field in a v1 committed record is an archive
-integrity failure; it is not converted to an unlinked record.
-
-The same read-only view is available through
-`inferrsi.apps.api.read_attempt_view`. The legacy `status --run-id` form
-reads the legacy experiment directory.
-
-Use the same reference files with `trace`, `report` or `dashboard`.
-`trace` prints the view plus recorded steps, checks and error codes. An
-unknown step time stays null. `report` and offline `dashboard` accept
-`--output ` and present the same facts and claims. With
-`dashboard --live`, the loopback page and its state endpoint serve the
-snapshot pinned at startup. The campaign Dashboard remains available through
-`--input`, including its reviewed translation overlay.
-
-## Campaign summary figure
-
-### Summarize a campaign figure — `tools/campaign_summary_chart.py`
-
-- **Inputs:** one JSON specification (chain of accumulating steps, or a set of independent trials); an output path.
-- **Scope:** recorded values only. The renderer computes gains, validates the specification and writes a figure; it measures nothing.
-- **Output:** an SVG figure, plus a Markdown table with the same values when `--markdown` is given. `report` and `run` also write `summary-chart.svg` into the run directory and inline it in the HTML report. When selected trial checks leave the current comparison incomplete, the report omits the figure (including a campaign specification) and removes any previously generated SVG; raw measurements and the campaign JSON remain available.
-- **Side effects:** writes the requested files; nothing is executed and no network or GPU is touched.
-- **Failure behavior:** exit code 2 with the offending field name when the specification is incomplete, ambiguous or inconsistent; a report without a paired measurement states why it has no figure.
-- **Example:** [campaign summary chart](dashboard/campaign-summary-chart.md)
-
-## Optimization requests
-
-- **Measure the value of knowledge.** Start with `inferrsi benchmarks compare --help`
- and follow `next_action`. The default comparison uses Qwen denoising and MoE
- forward in independent on/off sessions. See the [comparison workflow](benchmarks/benchmark-comparison.md).
-- **Optimize your project.** Use `inferrsi campaign` in the current Agent
- conversation. Supply the workload, metric, gates, scripts and budget, then
- record the measured bottleneck before candidate search. The
- [shared workflow](guides/optimization-workflow-unification.md) defines round limits,
- recovery and dashboard generation from the Harness control record.
-- **Optimize a packaged task.** Follow the [benchmark session workflow](benchmarks/optimization-benchmarks.md)
- through rounds and independent final retest. By default the initiator prepares,
- dispatches and binds one [fresh native session](guides/native-agent-sessions.md). The
- execution Agent owns the optimization lifecycle without redelegating. An
- explicit current-conversation request uses the same workflow directly.
- `benchmarks run` measures one candidate within that workflow.
+The [operation guide](guides/operations.md) now lives with the task guides.
diff --git a/docs/quickstart.md b/docs/quickstart.md
index 87785d24b..0586a2b5d 100644
--- a/docs/quickstart.md
+++ b/docs/quickstart.md
@@ -35,7 +35,7 @@ inferrsi knowledge search --tier dependency --repo-type mlx --backend mlx --json
```
The probe reads chip and package metadata. See the
-[MLX discovery options and limits](operations.md#discover-mlx-hardware--doctor---backend-mlx).
+[MLX discovery options and limits](guides/operations.md#discover-mlx-hardware--doctor---backend-mlx).
## Discover knowledge and skills
@@ -61,7 +61,7 @@ Unmatched query terms do not exclude results that match other terms. If no
query terms match the index, `find` returns `no_match`. Read the reported state,
`scope` and bounds before acting on a hit. Use the package catalog to list
records with exact filters and `context` to export a cited package selection.
-See the [operation guide](operations.md) for command boundaries.
+See the [operation guide](guides/operations.md) for command boundaries.
```bash
inferrsi knowledge search --repo-type vllm_omni --backend ascend --json
@@ -122,7 +122,7 @@ from omitted flags. CLI defaults are not accepted campaign goals.
## The actual configuration interface
Use `inferrsi plan --help` or `inferrsi run --help` for the installed
-version's flags. The [operation guide](operations.md#intent-map) maps tasks to
+version's flags. The [operation guide](guides/operations.md#intent-map) maps tasks to
commands. Use [YAML task input](guides/task-input.md) to validate or preview a saved
configuration.
@@ -190,7 +190,7 @@ inferrsi report --run-id RUN_ID --output-dir /work/inferrsi-runs
Read `report.html`, execution logs, per-trial `source.json`, `source_checks.json`, validation logs and raw results. Retain committed source revisions or dirty source files/patches separately. Ctrl-C records cancellation and cleans owned child jobs; there is no `cancel` or `resume` subcommand in this first release.
-Use the [cited context export](operations.md#export-legacy-cited-material--context)
+Use the [cited context export](guides/operations.md#export-legacy-cited-material--context)
for manual review of source material. Qualify imported observations against
your target run before citing them as local evidence.
diff --git a/docs/realtime-venus-vllm-omni.md b/docs/realtime-venus-vllm-omni.md
index dfab13d99..0f3a782b3 100644
--- a/docs/realtime-venus-vllm-omni.md
+++ b/docs/realtime-venus-vllm-omni.md
@@ -1,218 +1,4 @@
-# Realtime-Venus: day-0 adaptation in vLLM-Omni
+# Realtime-Venus on vLLM-Omni
-This case records an Omni-checkpoint adaptation and a bounded execution-mode
-experiment. The governing [acceptance issue](https://github.com/InferMatrixLab/InferRSI/issues/593)
-owns revision pins, frozen conditions, run outcomes and the downstream PR link.
-The overall conclusion is **INCONCLUSIVE** for full model parity and general
-performance: basic generation does not validate the external delegation runtime,
-long-video memory, perceptual speech quality or sustained duplex service.
-
-## What failed before generation
-
-The [released repository](https://huggingface.co/inclusionAI/Realtime-Venus)
-contains separate Omni and Audio checkpoints. The Omni child `config.json` is a
-reference to a separately pinned root YAML, rather than a complete language
-model configuration. Treating the child as an ordinary Qwen3 config loses the
-backbone dimensions and the version used by the stage router.
-
-With Transformers 5.20.2, the released configuration code also calls the removed
-`_set_token_in_kwargs` API. Loading the released image processor hits another
-incompatibility: its legacy registration uses a string where the current
-`AutoImageProcessor.register` API expects a configuration class. These were
-observed startup failures, not hypothetical compatibility concerns.
-
-The adaptation uses a native config class that reads the sibling root YAML,
-verifies its referenced SHA-256 and identity, and constructs the nested vision,
-audio, TTS and slice configurations. Both `get_config_dict` and `from_dict`
-need coverage: `AutoConfig` can select the registered class and call `from_dict`
-without going through that class's `get_config_dict`. A direct-class unit test
-alone missed that second path during bring-up.
-
-The processor fix shares the existing MiniCPM compatibility context, ignores
-only the two known redundant string registrations and restores the registration
-method on success or failure. The tokenizer and processor still require trusted
-checkpoint code. The config adapter deliberately requires a complete local
-snapshot; it does not silently fetch a different root YAML on an offline host.
-
-## Reuse boundaries matter
-
-The Omni architecture derives from MiniCPM-o 4.5. Its stage pipeline can reuse
-the existing Thinker, Talker and Code2Wav implementations, including compiled
-execution and Talker multi-frame decoding. A separate architecture-to-pipeline
-mapping and deployment overlay are sufficient; copying the model kernels would
-create another implementation to maintain without solving the loader failures.
-
-Reuse does not imply that every inherited tuning choice preserves the released
-checkpoint's behavior. The existing MiniCPM CUDA recipe uses five Flow steps and
-FP16 Flow weights. The Venus overlay retains ten steps and FP32 Flow, disables
-the Flow TF32 override, and uses one codec replica. Those choices separate an
-execution optimization from an unvalidated sampling or precision change.
-
-Venus also introduces `…` spans. The native duplex handoff
-must remove the same rows from token IDs and hidden states, retain the text
-stream, carry masking state across units, and reset it at a turn boundary.
-The follow-up adds an explicit full-duplex deployment and completes the speech
-boundary handling. A fully muted unit flushes preceding speech using only the
-Talker's audio-begin embedding, a 26-token ceiling and no minimum. The codec
-bridge drains its pending frames and resets the vocoder without closing the
-dialogue turn. Later silent units do not synthesize again; newly spoken content
-replaces the Talker prompt and KV. The real turn terminator still closes the
-dialogue, including when its speech row was masked by an unclosed delegation.
-
-Filtering alone also missed an output-contract problem: the shared data plane
-normally waits for waveform frames before publishing text. An intentionally
-silent delegation needs its text delivered immediately. Model-owned metadata
-now carries that distinction through Talker and Code2Wav; the bridge consumes
-the queued text at the silent unit boundary and the data plane deduplicates it
-by cache epoch and chunk sequence. It cannot be lost or replayed with later
-speech. Regression tests cover the full producer-to-consumer metadata path.
-
-These changes reuse the existing session engine, model-native listen/speak
-policy, input append and interruption mechanisms. The external asynchronous
-delegation executor and long-video memory runtime remain outside this adapter.
-
-## Full-duplex follow-up lessons
-
-The turn profile and `realtime_venus_omni_duplex.yaml` both retain ten-step FP32
-Flow. Switching the serving mode is necessary but does not prove the model's
-session behavior: exercise speech and dialogue boundaries independently, then
-verify the actual public text/audio events.
-
-A subsequent configuration-only change makes `realtime_venus_omni.yaml` default
-to full duplex, including automatic deployment selection. The `_duplex.yaml`
-profile remains an equivalent alias; `_turn.yaml` explicitly selects ordinary
-HTTP serving. Resolving all inherited fields confirms that the new default
-matches the previously tested duplex configuration and the explicit turn profile
-matches the previous default. The historical measurements below keep their
-original source pins and serving modes; changing a default is not a new benchmark.
-
-The model's delegation capability also differs from serving-side tool execution:
-the official [Harness](https://github.com/inclusionAI/Realtime-Venus/tree/main/harness)
-executes `` requests and returns `` feedback. The current
-adapter preserves delegate text without speaking it, but does not integrate that
-executor or translate delegates into OpenAI `tool_calls`.
-
-The first paced audio/video probe used a short “Hello, welcome” waveform. The
-model chose to listen for all twenty units; there was no protocol error, but
-also no generated audio. That establishes input acceptance only. A separate
-text-seeded duplex probe produced a spoken introduction and returned to
-listening. Neither result alone establishes multi-turn audio conversation or
-interruption recovery.
-
-Widening the CPU check to the vocoder's isolated import test caught a new circular
-import: placing transport constants under the duplex package caused Code2Wav
-to import the plugin, which imports Code2Wav. Moving the constants to the shared
-handoff module fixed the ownership boundary without duplicating their strings.
-This illustrates why a passing in-process suite can miss an import-order defect.
-
-Follow-up functional results are retained separately from the earlier HTTP
-measurement. They are not extra repetitions of that experiment, and its latency
-ratio is not a full-duplex speedup claim.
-
-At downstream commit `59b193b992ce3d6b5c80a583bac7d82f8a43474e`, the related
-CPU regression run completed with 681 passed and six CUDA-embedding cases
-skipped. Applicable pre-commit hooks passed. A paced 30-second synthetic video
-plus eight seconds of tail input produced four completed responses and nine
-audio chunks at 24 kHz, with no protocol errors. Its first color answer was
-wrong; this is transport/lifecycle evidence, not semantic acceptance.
-
-The natural-input lifecycle probe resumed the same WebSocket session, asked
-about a red circle, cancelled the first spoken response, then asked about a
-blue circle in the same session. Transcripts were “红色。” then “蓝色。”; the
-first response terminated as cancelled and the second completed. No audio
-from the cancelled response arrived after cancellation acknowledgement, and
-session close completed without protocol errors. A separate seeded-story
-probe also recovered transport after cancellation, but resumed its initial
-story context rather than answering the new scene question; it is not evidence
-of semantic interruption recovery.
-
-An untimed Transformers 4.51.3 reference check used the released duplex class
-on the same 38 audio/video units with speech synthesis disabled and greedy
-decoding. It also produced incorrect descriptions on the complex fixture.
-The adapted service used its default sampling, so these runs do not establish
-token parity or identify the cause of either model's wrong answers. The
-[functional summary](../evidence/realtime-venus-day0/results/duplex-functional.json)
-retains the outputs and separates them from the prior managed performance round.
-
-Review subsequently found that the archived lifecycle script's gate could also
-accept a failed or pre-input audio response. The positive trace above remains
-a historical observation, but that script cannot qualify a new run. The
-[revised probe](../tools/realtime_venus_lifecycle.py) waits for matching cancel
-and input-clear acknowledgements, binds a new response to the fresh-input
-phase, and requires nonempty audio plus terminal `completed`. Its
-[replay instructions](../evidence/realtime-venus-day0/validator/README.md)
-distinguish offline regression coverage from the unperformed live-model rerun.
-
-## Validation and experiment boundaries
-
-A tokenizer warning was checked against the isolated Transformers 4.51.3
-reference. Nine fixed English, Chinese, mixed-Unicode, whitespace and special-token
-inputs produced identical token IDs under 5.20.2 after the native config
-registration. This is sample parity, not an exhaustive tokenizer proof; no regex
-rewrite was applied to the checkpoint.
-
-The task entered InferRSI through `skills enter task-day-0`, inspected the
-checkpoint's configuration and reference implementation, and first established
-real-weight generation. The isolated Transformers 4.51.3 reference produced the
-expected Paris and red-image answers. The adapted HTTP service returned text,
-image answers and speech audio. An initial text request exhausted its token
-budget in a thinking span; subsequent fixed requests explicitly disabled
-thinking and rejected truncated completions. Startup and first-request timings
-are not used as an optimization baseline.
-
-At the submitted downstream revision, automatic deployment selection also served
-a fixed Chinese question and a short red/blue video correctly. Audio round-trip
-checking exposed why structural WAV validation is insufficient: the initial
-bring-up waveform produced unrelated marker-like transcriptions in both
-vLLM-Omni and the isolated reference. A waveform generated by the final Venus
-profile transcribed as “Hello, welcome.” in both implementations, including
-both reference TTS-template settings. The initial/final generation settings also
-differed in the thinking template, so this does not isolate Flow precision or
-step count as the cause. Perceptual speech quality remains unqualified.
-
-The managed project experiment uses `campaign start`, `campaign diagnose` and
-one `campaign round`. Its common source is the already adapted model. The only
-candidate change is Thinker `enforce_eager=true` to `false`; it does not compare
-an unsupported upstream model against a working implementation. Model weights,
-Flow settings, speculation and workload stay fixed.
-
-The issue freezes a small C1 HTTP workload, warmup policy, point metric and
-exact-text comparison before execution. It also distinguishes structural WAV
-validation from speech-quality scoring. The initial trace places text generation
-in stage 0; it does not independently prove that launch overhead is the dominant
-bottleneck. Compilation/CUDA-graph benefit is therefore a tested hypothesis,
-not a diagnosis inferred from the model family.
-
-The operator requested one baseline measurement and one candidate measurement.
-No repeated sampling or independent `campaign final` retest is authorized. The
-managed round's retained observations are reported as exploratory evidence; the
-campaign is not presented as finalized. There is no confidence interval, service
-SLO, broad quality acceptance or full-duplex speedup claim.
-
-## Reproduce the contribution
-
-The contribution in
-[vLLM-Omni PR #10976](https://github.com/vllm-project/vllm-omni/pull/10976)
-merged on 2026-11-24 as
-[`123c96e4a81a597e08526d46c54dc2325fc01488`](https://github.com/vllm-project/vllm-omni/commit/123c96e4a81a597e08526d46c54dc2325fc01488).
-Use this immutable revision for the integrated contribution. The observations
-and validation limits in this case refer to the earlier issue-pinned sources;
-they do not qualify changes added between those sources and the merged revision.
-Follow its recipe to download the Omni subdirectory and root YAML together,
-then serve the local model path with the Venus deployment overlay. Preserve the
-root YAML when moving the checkpoint to an offline host.
-
-Run the configuration, native-duplex-hook and Thinker-to-Talker handoff tests
-listed in that PR. For performance work, declare a new issue-scoped workload,
-quality gate and budget; freeze its protocol before measuring. Do not copy the
-exploratory latency threshold as an acceptance default for other hardware or
-service traffic.
-
-The [compact evidence bundle](../evidence/realtime-venus-day0/README.md) retains
-the frozen measurement scripts and derived summary. The local original logs
-and managed source snapshots remain retained by the
-operator. They are not a published, independently downloadable archive; external
-replay of those exact originals is unverified. The PR and acceptance issue
-provide the public code, commands, compact outcomes and explicit limitations.
-This case does not promote a reusable knowledge-library record or a campaign
-`PASS` on the basis of unarchived smoke results.
+See the [Realtime-Venus field note](field-notes/realtime-venus-vllm-omni.md)
+for the experiment, observations, and limitations.
diff --git a/docs/reviews/issue148-flare-source-distillation.md b/docs/reviews/issue148-flare-source-distillation.md
index a0bffc347..9a30a5083 100644
--- a/docs/reviews/issue148-flare-source-distillation.md
+++ b/docs/reviews/issue148-flare-source-distillation.md
@@ -46,7 +46,7 @@ no efficacy PASS or automatic promotion is proposed.
## Evaluation plan under the existing bounded workflow
Status: **not evaluated**; empirical validation: **not_run**. This plan follows
-[bounded skill evaluation](../skill-evaluation/README.md) and
+[bounded skill evaluation](../guides/skill-evaluation/README.md) and
[Issue 88](https://github.com/InferMatrixLab/InferRSI/issues/88). It does not
authorize or schedule client calls.
diff --git a/docs/skill-eval-deployment-215.md b/docs/skill-eval-deployment-215.md
index fa81b217c..e9fef3acf 100644
--- a/docs/skill-eval-deployment-215.md
+++ b/docs/skill-eval-deployment-215.md
@@ -1,7 +1,7 @@
# Issue 215 bounded PR159/160 deployment record
-The [Issue #215 deployment record](skill-evaluation/skill-eval-deployment-215.md) preserves the original pricing, reservations, and failure evidence.
+The [Issue #215 deployment record](guides/skill-evaluation/skill-eval-deployment-215.md) preserves the original pricing, reservations, and failure evidence.
-- [Audit and price provenance](skill-evaluation/skill-eval-deployment-215.md#audit-and-price-provenance)
-- [Hard cost bound](skill-evaluation/skill-eval-deployment-215.md#hard-cost-bound)
-- [Activation prerequisites and stopping](skill-evaluation/skill-eval-deployment-215.md#activation-prerequisites-and-stopping)
+- [Audit and price provenance](guides/skill-evaluation/skill-eval-deployment-215.md#audit-and-price-provenance)
+- [Hard cost bound](guides/skill-evaluation/skill-eval-deployment-215.md#hard-cost-bound)
+- [Activation prerequisites and stopping](guides/skill-evaluation/skill-eval-deployment-215.md#activation-prerequisites-and-stopping)
diff --git a/docs/skill-eval-historical-job.md b/docs/skill-eval-historical-job.md
index 83062144f..3a54e445a 100644
--- a/docs/skill-eval-historical-job.md
+++ b/docs/skill-eval-historical-job.md
@@ -1,7 +1,7 @@
# Fixed historical generation job
-The [Issue #253 pilot record](skill-evaluation/skill-eval-historical-job.md) documents the authorization that expired on 2026-10-30.
+The [Issue #253 pilot record](guides/skill-evaluation/skill-eval-historical-job.md) documents the authorization that expired on 2026-10-30.
-- [Authority and freeze](skill-evaluation/skill-eval-historical-job.md#authority-and-freeze)
-- [Credential and execution boundary](skill-evaluation/skill-eval-historical-job.md#credential-and-execution-boundary)
-- [Operation](skill-evaluation/skill-eval-historical-job.md#operation)
+- [Authority and freeze](guides/skill-evaluation/skill-eval-historical-job.md#authority-and-freeze)
+- [Credential and execution boundary](guides/skill-evaluation/skill-eval-historical-job.md#credential-and-execution-boundary)
+- [Operation](guides/skill-evaluation/skill-eval-historical-job.md#operation)
diff --git a/docs/skill-eval-pr.md b/docs/skill-eval-pr.md
index dabc27489..f7a6c21f8 100644
--- a/docs/skill-eval-pr.md
+++ b/docs/skill-eval-pr.md
@@ -1,7 +1,7 @@
# Skill PR planning and feedback
The advisory [Skill PR workflow](../.github/workflows/skill-eval-pr.yml) connects
-skill changes to the existing [comparison command](skill-evaluation/skill-eval-comparison.md).
+skill changes to the existing [comparison command](guides/skill-evaluation/skill-eval-comparison.md).
It does not add an execution engine or a required efficacy gate. Refs #101; parent #88.
```mermaid
@@ -91,8 +91,8 @@ For successfully prepared mappings, the displayed `python -m json.tool` commands
inspect the retained tasks and schema from the downloaded `skill-eval-plan`
artifact directory; they do not grade anything or call a model. Produce the required
answer/artifact only after confirming applicability. Use the existing
-[comparison contract](skill-evaluation/skill-eval-comparison.md) or, for an explicitly selected
-engineering task, [local-author handoff](skill-evaluation/local-skill-evaluation.md). No paid
+[comparison contract](guides/skill-evaluation/skill-eval-comparison.md) or, for an explicitly selected
+engineering task, [local-author handoff](guides/skill-evaluation/local-skill-evaluation.md). No paid
execute command is a nonpaid fallback, and no task or mapping is selected on the
author's behalf when the existing mapping supplies none.
@@ -140,10 +140,10 @@ the frozen plan’s complete worst-case cost against both the lifetime USD 200 p
limit and the repository-wide USD 1,000 limit per Asia/Shanghai day. Free planning
grants no execution budget. PR text and dispatch inputs cannot grant authority.
-The bounded [issue 215 deployment record](skill-evaluation/skill-eval-deployment-215.md)
+The bounded [issue 215 deployment record](guides/skill-evaluation/skill-eval-deployment-215.md)
describes the earlier rollout for PRs 159 and 160. Current admission requires
separate owner approval, valid pricing, provider credentials and verified ledger
-history. See [daily admission](skill-evaluation/skill-eval-daily-admission.md)
+history. See [daily admission](guides/skill-evaluation/skill-eval-daily-admission.md)
for the accounting prerequisites.
The controller alone has owner-approved `contents: write` for the dedicated Git
@@ -357,7 +357,7 @@ The current configuration has these fields.
comment must **also** be explicitly reviewed. No unknown rate defaults to zero;
- `anchors`, keyed by PR number string: each entry contains `ref`,
`genesis_commit`, and `checkpoint_commit`, referencing the separately audited
- per-PR Git ledger described in [the budget contract](skill-evaluation/skill-eval-budget-core.md).
+ per-PR Git ledger described in [the budget contract](guides/skill-evaluation/skill-eval-budget-core.md).
Unknown historical spending blocks admission;
- `daily_budget` contains `currency: USD`, `amount: "1000"`,
`timezone: Asia/Shanghai`, and the audited repository-wide ledger anchor.
@@ -429,7 +429,7 @@ standalone comparison-harness behavior is unchanged.
A trusted mapping item may explicitly set `adapter: "kv-admission-diagnostic-v1"`
to use the synthetic diagnostic contract documented in
-[skill comparisons](skill-evaluation/skill-eval-comparison.md#synthetic-kv-admission-diagnostic-adapter).
+[skill comparisons](guides/skill-evaluation/skill-eval-comparison.md#synthetic-kv-admission-diagnostic-adapter).
This is not inferred from PR content. It requires an existing baseline bundle
and preserves exact PR base/head comparisons; unknown adapters or an addition
remain unsupported. Report regeneration rechecks the frozen built-in adapter,
diff --git a/docs/skill-evaluation/README.md b/docs/skill-evaluation/README.md
index 6e12f82da..bde5622ae 100644
--- a/docs/skill-evaluation/README.md
+++ b/docs/skill-evaluation/README.md
@@ -1,142 +1,3 @@
-# Bounded skill evaluation
+# SkillEval
-Skill evaluation measures discovery, correct application and task outcomes for an
-exact knowledge revision. It is separate from the numeric engine-performance
-evaluator and from InferRSI's L0–L4 system-validation ladder.
-
-The first [real-client pilot report](../../evidence/skill-eval-v1-20261021/README.md)
-includes per-trial answers, retained development failures, discovery observations
-and CPU-only replay of the frozen verifier. Its conclusions apply to that
-selected task family, skill revisions and client/model configuration.
-Its [order corrigendum](../../evidence/skill-eval-v1-20261021/README.md#order-corrigendum--2026-10-22)
-records the historical 4/2/0 first-position imbalance. Recorded elapsed differences
-are observations with order/cache/provider-drift confounding, not causal skill
-effects; a time-effect study needs a separately authorized frozen plan and budget.
-
-The small report-audit driver reuses `KnowledgeReader` bundles, the real Codex
-CLI and `harness.local_process.execute_command`. It adapts the sibling pilot's
-fresh-session, event and independent-verifier methods; its old fixed
-no-skill/human/distilled controller is not imported. No external evaluation
-platform source is copied. Existing knowledge retains its source/license limits.
-
-Ownership follows the module split. `inferrsi.harness.skill_evaluation` adapts the
-client, executes each trial and retains its facts. `inferrsi.benchmark.skill_evaluation`
-holds check validity, the task verdict and condition statistics.
-`inferrsi.apps.workflows.skill_evaluation` composes both with the bundle export behind the
-`run_trial`, `summarize` and `export_bundle` signatures; retained trial records are
-unchanged.
-
-For a new evaluation, choose a [configured comparison](skill-eval-comparison.md) or a [local engineering run](local-skill-evaluation.md). For a pull request, follow the [author evidence handoff](../skill-eval-pr.md#nonpaid-author-handoff). The [budget rules](skill-eval-budget-core.md) and [full-context controls](skill-eval-full-context.md) apply to paid runs.
-
-## Conditions and outcomes
-
-| Condition | Exposure | Purpose |
-| --- | --- | --- |
-| N | No target instructions or resources | Same-client baseline |
-| E-benchmark / E-evidence | One explicit, complete reader bundle | Attribute each skill's effect separately |
-| R | Both skills through native `.agents/skills` discovery | Observe relevant, ambiguous and irrelevant activation |
-
-Future N/E schedules rotate by matched-group index alone; repeat numbers identify
-pairs without changing the rotation. Every group contains all three conditions
-once. Each consecutive block of three groups balances positions; across the six
-`--final-only` groups each condition occupies each position twice. The ordinary
-ten-group schedule has position counts of three or four. R probes follow these
-groups. This fix leaves historical frozen schedules and outcomes unchanged.
-
-Each trial starts a fresh ephemeral client and workspace. Global/bundled skills,
-plugins, apps, memory and web are disabled for that client only. For this pilot,
-the owner explicitly authorized relaxed host isolation after native Windows
-isolation failed. Local commands have broad access: this is controlled knowledge
-exposure, not OS-enforced read confinement. Keep known knowledge copies,
-verifiers/answers and other trials outside the task workspace; list their roots
-with `--protected-root` for the access audit. Invalidate observed exposure to them.
-Unobserved/implicit exposure remains a limitation of the causal comparison.
-
-Skill bundles keep their original relative paths and declared shared resources.
-Other cross-skill navigation is not automatically made available. Skill identity,
-content revision and resource/dependency revisions come from the existing reader.
-
-Agent execution status and trial verdict are separate:
-
-| Meaning | Example | Recorded trial verdict |
-| --- | --- | --- |
-| Input report verdict | A faster optimization fails quality | The correct answer says `report_verdict=FAIL` |
-| Task correctness | The answer correctly rejects that report | `PASS`, with `evaluation_error=null` |
-| Completed wrong answer | Valid JSON has incorrect fields, or is not an object | `FAIL`, with `evaluation_error=null` |
-| Evaluation error | Timeout, missing/invalid JSON output, or unavailable/invalid grading | `INCONCLUSIVE`, with an `evaluation_error` category |
-
-The verifier returns a boolean `passed` and a nonempty map of boolean
-`assertions`; `passed` must equal their conjunction. Exit 0 accompanies a pass,
-exit 1 a completed negative judgment. Other exits, missing/malformed results and
-inconsistent result fields are evaluation errors. Invalid task latency inputs
-(including empty groups, nonfinite aggregates or a nonpositive baseline) cannot
-be graded as task success or failure. The pipeline retains execution and
-verification records and saves the trial classification for these failure paths.
-
-Grading checks structured verdict, scope, findings, numeric reduction and evidence
-keys. Free-text `reason` is checked only for nonempty text; its meaning is not
-judged. Audit rules retain their first-applicable precedence: workload mismatch,
-kernel-only scope, missing quality, failed quality, failed requests, then gain
-threshold. Extract mode only computes the descriptive reduction. The answer's
-numeric tolerance remains 0.02 percentage points.
-
-Condition summaries retain `PASS` / `FAIL` / `INCONCLUSIVE` counts and count
-`evaluation_errors`; older records without that field keep their original
-verdicts. Missing token/cost observations stay unknown, including partially
-reported token metrics. Cached input is a subset of
-input tokens, not an additional charge. Paired regressions and recoveries remain
-visible, including neutral/negative results.
-The controller's `observed_tokens` counts only known token fields and is a lower
-bound when `token_usage_complete` is false; unknown totals remain null in the
-summary. Invalid verifier payloads remain in their raw verification artifact;
-only validated boolean checks enter the trial record.
-
-## CPU checks and paid execution
-
-After the normal development setup, with checkout `src` on `PYTHONPATH`:
-
-```console
-pytest tests/skill_eval/test_skill_evaluation.py tests/skill_eval/test_skill_eval_verifier.py tests/skill_eval/test_skill_eval_pipeline.py
-python tools/skill_eval_pilot.py prepare --output --model --effort --protected-root
-```
-
-`prepare` writes a plan without model calls. Review and record its digest, budget
-and revisions in the governing Issue before execution. Keep private output
-outside the source checkout and audit accesses to the listed knowledge/history
-and answer roots. Then the separately authorized call is:
-
-```console
-python tools/skill_eval_pilot.py execute --output
-```
-
-Use `--max-new-trials 1` for the first real development trial. Reinvocation resumes
-unattempted entries without retrying completed or incomplete calls. A client
-execution failure stops scheduling until its cause is investigated. Campaign
-time and observed-token limits carry across resumptions; the token threshold
-stops new trials after recorded usage reaches it, rather than imposing a provider
-generation limit. Unavailable billing cost stays unknown.
-
-Default tests use deterministic fixtures; no CI model calls or new CI lane is
-introduced. Fixture latency arrays reuse the historical Qwen review summary.
-Counterfactual metadata is explicitly labeled as a test fixture, never as a new
-GPU result. Two development instances and four sealed instances are selected
-before calls. Do not tune skills or gates on the final held-out results.
-
-The initial development campaign exposed a task-contract ambiguity: agents could
-correctly reject a kernel-to-service claim while using FAIL where the hidden
-oracle expected INCONCLUSIVE. Preserve those original calls and verdicts as
-development diagnostics; they are not skill-harm evidence. Revised task inputs
-state verdict and output-field semantics explicitly. `prepare --final-only`
-selects four revised instances with a distinct historical baseline slice and
-three R checks; two final instances repeat twice and two once (21 calls). Freeze
-the revision and remaining `--campaign-seconds` / `--token-limit` before those
-calls. Keep original and revised contracts separate and respect the Issue's
-combined call cap; do not silently reinterpret old outputs.
-
-The controller runs the verifier outside each task workspace and never executes
-generated code. It checks structured answers, numeric results, findings and evidence keys.
-Raw client captures remain private. Publish reviewed redacted evidence with its
-own identity, per-trial outputs/checks, source revisions, missing observations,
-resource definitions and a reproducible verifier invocation. A small pilot is
-descriptive evidence for that skill/task/client/model, not automatic promotion or
-a hardware performance claim.
+The [SkillEval guide](../guides/skill-evaluation/README.md) links to the evaluation procedures.
diff --git a/docs/speculative-search.md b/docs/speculative-search.md
index 61ae3536e..fb42c84ed 100644
--- a/docs/speculative-search.md
+++ b/docs/speculative-search.md
@@ -1,488 +1,8 @@
# Speculative candidate search and group learning
-The experimental implementation of [issue #363](https://github.com/InferMatrixLab/InferRSI/issues/363)
-composes bounded VATS, trainable CPU roles, GVO, durable work accounting and
-independent final selection. It follows the two loops in
-[SpecRSI v2 §3](https://arxiv.org/html/2610.16491v2#S3). It does not reproduce the
-paper's language-model training or establish its reported gains. Existing
-`campaign` and `benchmarks session` commands keep their serial lifecycle.
-
-## Supported profile and authority
-
-| Component | Implementation | Boundary |
-| --- | --- | --- |
-| Candidate/evidence model | `harness.search_tree`, `search_records` | Immutable artifacts, actual dependency epochs and complete-candidate selection |
-| Solver | `harness.verification_plans`, `vats.menu` | Bounded exhaustive completion plans; conservative integer millisecond caps |
-| Drafter | `apps.workflows.search_roles`, `harness.search_adapter` | Trainable softmax over supplied exact text edits; actual retained changes, not free-form LLM generation |
-| Policy | `apps.workflows.search_roles` | Independent eight-feature linear softmax, recorded behavior probabilities, deterministic deployment actions |
-| Scorer | `apps.workflows.search_roles` | Separate linear model; actual suffix MSE and optional paid continuation differences |
-| Work/state authority | `harness.work_control` | Transactions in the shared `RunStore` SQLite database |
-| Execution | Existing `trials.external` and `local_process` | Absolute deadline and process-domain cleanup; no new subprocess runner |
-| Engine | `apps.workflows.search_benchmarks.EngineEvaluator` | Existing packaged `optimization.py` as one whole check; currently the Qwen denoiser NPU task |
-| Skill | `apps.workflows.search_benchmarks.SkillEvaluator`, checkout `tools.speculative_skill.Comparator` | Explicit provider configuration, original baseline, independent grader, separate development/holdout descriptors |
-| Final | `harness.search_campaign.finalize` | One-time scope claim before access; receipt-only recovery/export; task promotion only |
-
-This is a trusted local host controller. Resource domains exclude **cooperating
-controllers sharing one RunStore**. They are not scheduler/GPU reservations,
-filesystem sandboxes, distributed leases, provider cancellation guarantees or
-cryptographic attestations. The caller supplies authorized resources and frozen
-edit/check permissions. Candidate code cannot enforce its own isolation.
-
-Execution uses one worker. The offline planner represents shared setup and
-conflicts; supplied runtime adapters package setup into each whole check. They
-do not execute arbitrary standalone shared-setup jobs. Multi-worker performance
-qualification remains outstanding.
-
-## Candidate and evidence semantics
-
-`Contract` freezes search ID, context, roles, checks, objective/direction and
-candidate/depth/attempt caps. Context includes plan, validator, workload,
-environment, original baseline and reference. Objectives must be finite;
-overflowing the difference between two finite scores is also rejected. Quality
-checks are hard requirements, never compensable by a better score.
-
-`qualify_root` obtains root evidence through claimed real checks. Unknown root
-acquisition can only recover its original receipt. `import_qualified_root`
-explicitly re-scopes root receipts under identical artifact/check/context
-conditions, retaining physical execution and reservation identities. Root check
-attempts count against each search's cap; actual acquisition is charged once to
-the campaign, separately from independent search returns.
-
-In `A → B → C`, B may be unchecked or fail quality while C is edited and checked.
-C needs every required receipt for **C's own artifact** to win. Task failure does
-not invalidate descendants. Genuine environment/source dependency invalidation
-does invalidate dependent evidence. Dependencies are predeclared; dynamic
-introduction of new authorities is unsupported.
-
-`record_receipt` archives registered late results; `evidence` admits only current,
-matching receipts. Equal bytes alone do not authorize reuse. Duplicate delivery
-is idempotent; conflicts fail. FAIL is an observation; INCONCLUSIVE leaves a
-check missing. A valid outcome cannot be repeatedly sampled until it passes.
-Permitted retries need new identities and paid reservations.
-
-`Search.invalidate` persists the epoch change and incumbent recomputation
-atomically. An invalid root blocks search; late evidence can still be archived
-and charged. `ACCEPT` prefers the root on ties, then candidate ID order. It
-selects a development result without changing the stable version.
-
-## VATS execution
-
-`Search.start` retains a qualified root and frozen role/settings/adapter hashes.
-Each decision claims and meters Solver/Scorer/Policy preparation, constructs
-bounded DRAFT/VERIFY/ACCEPT actions and records the behavior law and paid state.
-Completion bundles remain in the menu; Scorer predictions never become receipts.
-Optional refinement adds unions without removing base completions. An undersized
-menu cap fails explicitly. Collection samples Policy; deployment uses argmax.
-Drafter edits remain sampled from the supplied permitted vocabulary.
-
-Experimental records predating `initial_conditions` remain readable/exportable
-through WorkControl, but cannot resume or enter GVO training. Start fresh searches
-from qualified evidence; there is no migration that guesses a historical starting
-tree from a later tree. Receiving search/attempt IDs may differ after an explicit
-root import; actual execution identities, evidence and dependency epochs must agree.
-
-The chosen work block is persisted before execution. Each edit waits for its
-parent artifact, without waiting for parent quality. Each check binds candidate,
-contract, attempt, execution, reservation and domain. Settlement commits elapsed
-time, cleanup facts and evidence/incumbent changes in one transaction. Recovery
-continues the retained block cursor before making another Policy decision.
-An ACCEPT already retained in the trace is terminal even if the controller
-stopped before writing the completed status. Recovery finishes that decision
-without sampling or charging another preparation, including forced ACCEPT.
-
-ACCEPT and limits return only complete admissible versions. Unstarted work stops
-when its conservative cap no longer fits. Unknown launched operations block
-continuation until reconciled. Candidate, depth, step, menu and attempt limits
-bound the search independently of its time budget.
-
-The planner closes prerequisites, counts shared costs once and checks conflicts.
-`max_targets` limits completion **seeds**, not candidates incidentally completed
-by cross-candidate prerequisites. `max_jobs` bounds the whole supplied job graph.
-The exact algorithm targets small menus. `draft_ahead=False` and `bundled=False`
-are explicit ablation switches; they are not claims of comparative efficiency.
-
-## GVO and paid continuations
-
-VATS spends a search budget using a frozen Drafter, Policy and Scorer. GVO
-updates those three roles **between** collections. The Solver's feasibility
-rules, verification contract and real evaluator stay fixed across the update.
-The formal objectives are in [SpecRSI §3.4](https://arxiv.org/html/2610.16491v2#S3.SS4).
-
-1. **Collect a group.** Start at least two independent VATS searches from the
- same root, initial evidence and history, role checkpoint, adapter and budget.
- Each search has a separate tree and random seed. The controller checks that
- the campaign can fund all declared search budgets before collection. Record the legal choices,
- sampled actions, their probabilities, the paid work and its verified outcomes.
-2. **Give the Drafter and Policy whole-search credit.** Let `F` be the best
- observed gain among candidates that satisfy every required check. For search
- `i`, compute the return and its leave-one-out advantage:
-
- ```text
- R_i = F(end_i) - F(start_i) - expense_weight * spent_seconds_i
- - elapsed_weight * wall_seconds_i
- A_i = R_i - mean(R_j for all other searches j in this group)
- ```
-
- For returns of 8, 5 and 2, the advantages are +4.5, 0 and −4.5. Every
- naturally sampled edit or plan choice in a search receives that search's
- advantage. This gives an early edit credit when a later descendant earns a
- verified gain. Replay the recorded action probabilities and apply the
- PPO-style clipped probability ratio, with KL regularization against the
- fixed initial actor. The ratio is the current probability of the sampled
- choice divided by its recorded collection probability, under the same legal
- menu and sampling settings. With the default single update per group this
- ratio starts at one, so clipping is inactive on that gradient step.
- Deployment trajectories are excluded. Both cost
- weights default to zero. Work still counts against the hard budget.
-3. **Train the Scorer on realized continuation returns.** At each paid decision
- boundary fit the predicted plan value to the gain still to come, less the remaining
- measured work and time penalties. If the best verified gain is 3 at that
- boundary and ends at 8, the unpenalized target is 5. Preparation already
- performed stays in the whole-search cost. Missing results supply no target. When two alternative first
- actions have both been executed from a saved state, the difference between
- their realized returns also supervises the difference in predicted values.
-4. **Save the update and collect fresh evidence.** `train_group` verifies the
- records, updates the three sets of weights and settles the training receipt
- and checkpoint together. A resumed run reuses a settled update and blocks
- a second training launch if the first outcome is unknown. Reset keeps the
- original root for the next group.
- Carry starts the next group from the best fully verified candidate and its
- receipts. Final measurements are reserved for independently retesting the
- selected candidate.
-
-The [collection and target code](../src/inferrsi/harness/gvo.py) and the
-[CPU role update](../src/inferrsi/apps/workflows/search_roles.py) implement these
-steps with finite edit operators, a linear Policy and a linear Scorer. The
-caller supplies the initial checkpoint and its provenance.
-
-`search_continuations.continue_from` copies a retained paid state, charges the
-copy, forces one legal first action and continues the frozen policy. The entire
-suffix is Scorer-only. `paired_targets` requires the same source state, settings,
-snapshot, adapter and continuation seed with different first actions. Both
-absolute suffix targets and observed relative differences train the Scorer.
-Caller-authored unreceipted pair targets are rejected.
-The saved source step counts toward the continuation's original step limit and
-random-stream position; omitting the prefix from its training trace does not
-grant additional decision slots.
-
-These are real updates to a constrained CPU operator model. They are not LLM
-finetuning, prompt summarization or evidence of pretrained-model improvement.
-Apps injects the role snapshot's `choose`, `predict`, `train`, `restore` and
-`document` operations. Harness retains traces and controls when they may run;
-it has no import dependency on the Apps role implementation.
-
-## Accounting, recovery and final
-
-`WorkControl` extends the existing RunStore database with campaign, domain and
-holdout tables. It is the authority for this experimental runtime, not a mirror
-of serial-session manifests. One transaction reserves work/domains and registers
-the pending tree attempt. Controllers using the same resource or holdout must
-use the **same shared store**.
-
-Launch intent is durable before dispatch; an ambiguous crash never authorizes a
-second launch. Known elapsed time and cleanup release unused reservation.
-Unknown usage/cleanup retains the entire reservation and domain. Over-cap work
-blocks further claims and dispatch of previously reserved work. The launch
-transaction rechecks the campaign before recording intent. With unknown cleanup,
-the retained hold is at least the largest known usage. Later reconciliation
-releases the domain and charges the final usage once, never below that lower
-bound. Absolute deadlines include queueing and cleanup.
-Engine protocol timeouts retain an INCONCLUSIVE adapter receipt with measured
-elapsed time. Confirmed cleanup of both task and protocol permits settlement
-and domain release; uncertain protocol cleanup keeps the reservation. A known
-overrun still blocks the campaign, even after its domain has been released.
-If cleanup settles blocked search work before its pending pointer is cleared,
-recovery archives that pointer from the durable operation without reading the
-adapter again. It charges the search's observed cost once, abandons the active
-block and records verification as control-only `INCONCLUSIVE`. The output is
-not adopted, and the campaign remains blocked against further dispatch.
-In-process bounded planning, editing and training are checked after return;
-they are not forcibly preempted like subprocesses. Preflight freezing and initial
-setup are outside this campaign meter, a remaining lifecycle-cost limitation.
-
-Receipts bind candidate/adapter identities and content hashes. They detect
-accidental mutation under a trusted host, not malicious-host forgery. Recovery
-checks retained candidate bytes and never launches new work. Lost preparation,
-training or copy receipts remain unresolved; no guessed-cost retry is available.
-External process-liveness reconciliation needs a qualified authority.
-
-When a reservation expires or its campaign is blocked before launch intent,
-recovery settles it as `not_started` and releases its domain in one transaction.
-Search recovery clears the pending operation and ends the current block. A
-registered verification attempt gets a control-only
-`INCONCLUSIVE` receipt, with no objective or evaluator PASS. No execution is
-charged. A search whose limit has expired can then return its qualified incumbent.
-If only the operation deadline expired, the remaining campaign may continue with
-fresh claims. This exception does not apply to ambiguous launch-intent crashes.
-
-Before claiming a final scope, `finalize` reads the completed deployment search
-from the campaign store. It recomputes the winner from verified development
-receipts, compares it with the recorded selection and the supplied candidate,
-and verifies the retained candidate files against the selected artifact digest.
-A root can enter final when a completed deployment selected it. Root qualification
-alone, a training collection, and a forced continuation cannot supply that selection.
-If several deployments completed, pass `deployment_search` to name the one used
-for selection. The first claim freezes the deployment, winner and acceptance
-rule at the same campaign revision, then closes search/training before final
-data access.
-
-For a new Python final, pass `acceptance=FinalAcceptance()` to require all
-checks to pass with verified cleanup. With
-`acceptance=FinalAcceptance(minimum_objective=1.2)`, the same checks apply and
-the deployment’s designated objective must also reach 1.2. The claim records
-the rule version, required checks, threshold and, for a numeric threshold, the
-objective check. The Engine CLI uses its explicit `--minimum-final-score` when
-comparing against the original baseline. For Skill, supply a **holdout-bound
-adapter** and `Comparator.holdout_scope`, derived from frozen task membership. The raw SHA-256
-separately pins each file's exact bytes. Root qualification and VATS search use
-the development evaluator. Finalization checks that its comparator matches the
-one bound to the recorded development evidence. After the final claim and before
-any provider or grader call, the comparator parses the same verified bytes for
-both splits, checks the declared membership, and rejects shared case IDs or
-identical case inputs across splits. Changing JSON formatting, case order, IDs
-or provenance gives the same set of inputs a single final allowance in the
-shared store. Exact bounded radix utility keeps quality ahead of token use.
-
-The finalizer holds a campaign-specific OS file lock in the shared RunStore
-from before the holdout claim through the final commit. A concurrent finalizer
-gets a lock error while that call is active. After an interruption, call
-`finalize` with the original candidate and scope and omit `acceptance` to
-apply the saved rule. If the owner exited before reserving a required check,
-recovery records that check as `not_started: unreserved` with zero usage.
-It reconciles registered work from its receipts. Once accounting is complete,
-any unreserved check makes the final `INCONCLUSIVE` and preserves the
-incumbent. The holdout remains consumed. For older claims that predate the
-lock, recovery can certify an unreserved check once the original campaign
-deadline has passed or the campaign has blocked further dispatch.
-
-Supplying a different rule during recovery is rejected. Earlier Python
-callers that passed an `accept_result` callback must select a declarative rule
-for new finals. A historical claim without a verifiable rule can only settle
-usage and cleanup. The same applies when its selection cannot be verified or
-its candidate files have changed. Once reconciled, the final is INCONCLUSIVE
-and the incumbent is preserved. A claim with a newer rule version stays pending
-for a runtime that understands it. Each new receipt binds the physical operation ID. An older final
-receipt without that ID needs its matching executor record from the claimed
-operation, including the output path recorded at execution. Missing proof,
-unknown usage or unknown cleanup keeps the reservation. Existing final results
-are immutable; export never reruns them. Only complete accepted final evidence,
-known cleanup and valid budget can update `stable`. Role checkpoints are never
-automatically promoted to a production/default improver. Such promotion needs
-separate independent data and acceptance authority.
-
-Enforced spend is in milliseconds. Skill reports retain provider token/currency
-facts, and the existing comparator enforces its per-comparison limits. A
-**campaign-wide provider token/currency reservation bridge is not implemented**.
-Elapsed-time caps must not be presented as that guarantee.
-
-## Entry points
-
-`inferrsi search engine --help` lists explicit Engine bounds and permissions.
-Supply a fresh `--session`, shared `--store`, unique `--campaign`, packaged task,
-initial checkpoint, edit vocabulary, authorized resource domain, time/search/
-training bounds, independent group count, rounds, final scope and final threshold.
-Task protocol flags follow `--`, for example `--pairs 1 --samples 1 --warmups 0`
-when the campaign owner chooses one measurement per arm. No gate is inferred.
-A domain name does not allocate a device.
-
-Checkpoint JSON contains numeric arrays `drafter`, `policy`, `scorer` and nonempty
-`origin`. Drafter dimensions match edits; Policy/Scorer each have eight dimensions.
-Freeze initial parameters and provenance in the campaign plan.
-`--edit TOKEN FILE BEFORE AFTER` permits one exact replacement in a candidate
-relative file; candidates cannot change the evaluator or roles.
-
-Read/export without execution:
-
-```bash
-inferrsi search status --session
-inferrsi search export --session --output
-```
-
-Python composition uses `qualify_root`, `collect_group`, `learn`, `continue_from`
-and `finalize`. Recovery requires the original frozen adapters. The CLI has no
-blind whole-campaign restart command. Skill's checkout `Comparator` takes the
-existing comparator configuration with an explicit bounded provider, original
-Git baseline, editable bundle paths and two split descriptors (`path`, `sha256`,
-`scope`, `task_count`). When preparing data, compute `task_set_sha256` with
-`tools.speculative_skill.task_set_sha256(cases)` and include it in the holdout
-descriptor before starting a campaign. The field is optional for development.
-The comparator uses the existing private Git-index materializer and shared
-process executor, and revalidates its independent retained report. Construction
-does not load holdout bytes. Providers require explicit authorization and
-credentials.
-
-Older descriptors can still serve development. Search histories written before
-comparator identity was recorded remain readable for reporting. A new Skill
-final requires a completed deployment whose development evidence identifies
-the same comparator. Upgrade all Skill controllers that write the shared store
-together, since older controllers enforce raw-byte scopes. If the store contains
-old `skill-data:` claims, bind each consumed claim to its archived input with
-`tools.speculative_skill.migrate_holdout(control, raw_sha256, archive_path)`.
-The migration verifies those original bytes and records the membership of the
-already-consumed set. Missing archives keep new Skill final claims blocked.
-
-## Relation to the paper and reference implementation
-
-This is a constrained adaptation of the two-loop method, not a reproduction of
-the reference model or experiments. The comparison below uses
-[SpecRSI v2, section 3 and Algorithms S1-S3](https://arxiv.org/html/2610.16491v2#S3)
-and the authors' [reference source](https://github.com/SpecRSI-GPR/SpecRSI/tree/ff0f0bb607e53ba76eebb9960df3d6942c33027e).
-That source revision is research provenance, not an InferRSI campaign pin.
-
-| Mechanism | This implementation | Alignment and limits |
-| --- | --- | --- |
-| Frozen search and acceptance | Immutable descendants, separate real evidence, DRAFT/VERIFY/ACCEPT, complete-root fallback | Follows the central control contract; intermediate parents need not pass |
-| Natural group learning | Independent matched searches, leave-one-out advantage, recorded actor probabilities, clipped objective and fixed-reference KL | Same objective structure; updates a small CPU operator model |
-| Value supervision | Actual paid-state suffix returns and optional paid pair differences; forced trajectories excluded from actors | Same separation of targets; continuation recovery must preserve the original remaining work limits |
-| Drafter | Softmax over a caller-supplied exact-replacement vocabulary | The reference uses generated edit tokens with a trainable LoRA adapter on a frozen language model; this vocabulary cannot propose a new edit outside its supplied operators |
-| Policy and Scorer | Separate linear weights over eight aggregate features | The reference uses separate relation/message-passing and attention branches with semantic and observed-evidence inputs; these linear features omit those inputs |
-| Solver and refinement | Exhaustive unions of completion seeds, one job per candidate/check; optional pairwise seed-union scoring | The reference supports MILP covers, singleton check closures, shared setup and iterative job-closure extensions; this restricted planner is not a general substitute |
-| Training recipe | Caller-provided initial checkpoint; direct CPU gradient updates | No supervised warm-up pipeline or language-model training adapter; the reference's warm-up, role architecture and optimizer configuration are not reproduced |
-| Resources and evaluation | One worker, millisecond reservations, whole Engine/Skill checks | No equivalent campaign-wide token/currency cap, arbitrary setup execution, parallel-worker study or matched reference benchmark runs |
-
-The architecture and training distinction can be inspected in the reference
-[role model](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/learning/hf.py),
-[relation heads](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/learning/heads.py),
-[completion solver](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/planning/completion.py),
-[menu construction](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/src/specrsi/core/vats.py)
-and [training recipe](https://github.com/SpecRSI-GPR/SpecRSI/blob/ff0f0bb607e53ba76eebb9960df3d6942c33027e/docs/REPRODUCIBILITY.md#training-the-reference-roles).
-These were inspected as source, not executed as a reproduction experiment.
-
-Two limits matter when interpreting learning results. First, at the same state,
-verification bundles with equal total cap and job count have identical features
-in `vats.features`, hence identical linear Scorer values and Policy preferences.
-Their candidate identity, observed failures and check interactions cannot affect
-that comparison. Parameter updates alone therefore do not demonstrate learning
-the paper's complementary-check value function. Second, `Settings.refine_queries`
-defaults to zero, and the Engine CLI exposes no override. Its search does not use
-the trained Scorer to refine the menu; the supplied Engine/Skill evaluators also
-expose one indivisible check per candidate. Python callers can enable the bounded
-refinement, but that does not add the missing semantic or relational inputs.
-
-Moving toward a reference reproduction requires explicit role/feature and menu
-contracts, a qualified generative/trainable adapter with warm-up, lifecycle cost
-accounting, and replicated frozen-versus-trained comparisons across tasks and
-independent training checkpoints.
-The existing recovery, evidence and holdout controls remain useful foundations;
-passing them does not establish search efficacy or reproduce paper results.
+The [speculative search guide](guides/speculative-search.md) describes the
+runtime boundaries, supported profiles, and execution procedures.
## Measuring the contribution of GVO
-Compare three deployment arms on the same task. A fixed-order serial control
-measures a simple alternative search order. VATS with the initial checkpoint
-measures what the search can find before training. VATS with the trained
-checkpoint measures what changes after GVO. To isolate learning, compare the
-last two arms at the same deployment seed, candidate budget and evaluation
-protocol. Use the independently retested final candidate as the outcome.
-Weight changes and development scores show what happened during training and
-selection. The cost of obtaining a checkpoint includes every collection
-search, even one that returned the root without an improvement.
-
-The [Qwen diagnostic plan](../evidence/qwen-vats-gvo-910b1-20261124/plan/plan.json) fixes one
-worker, the two [allowed edits](../evidence/qwen-vats-gvo-910b1-20261124/plan/edits.json), the
-initial weights, limits, seeds and arm order. Both edits reuse existing
-intermediates in the denoiser. One hoists the invariant text projection out of
-the denoising loop. The other hoists shared scale and gate computations out of
-the transformer-block loop. The serial control tests the first edit and then
-the combination. VATS can also test the second edit independently, repeat an
-edit choice on another branch, or stop early. Its five primitive attempts
-include the imported root check, leaving room to draft two candidates and
-verify both. The root qualification is physically executed once and shared.
-Each arm can spend up to two new candidate checks and receives a fresh final.
-
-The [experiment driver](../evidence/qwen-vats-gvo-910b1-20261124/plan/run.py) calls the packaged
-Engine evaluator for all three arms and uses the PR's unmodified `Search`,
-`learn` and `finalize` for VATS. The serial control evaluates the declared
-order directly through the same Engine evaluator. To repeat from the checkout
-in an environment with one allocated Ascend NPU, the frozen runtime dependencies,
-and an unused output path, run the driver from the repository root.
-
-```bash
-PYTHONPATH=src python evidence/qwen-vats-gvo-910b1-20261124/plan/run.py ./qwen-gvo-run
-```
-
-The output contains the shared RunStore, checkpoints, all task snapshots,
-timings and per-step numerical checks. Arm order rotates across three blocks
-so each arm runs first, second and last once. All three blocks
-reuse one trained checkpoint. Their random seeds vary the search on the same
-workload. The driver saves the full arm order before starting. A VATS arm
-contributes a score only when `finalize` reports an overall PASS and promotes
-the selected candidate, and the fresh task result passes with verified cleanup.
-An interrupted or rejected arm retains its incomplete status, later arms retain
-their unrun status, and the driver publishes paired ratios only for a complete
-comparison. Training variability and transfer to other tasks require additional
-independent runs.
-
-### Ascend 910B1 diagnostic results
-
-On 2026-11-24, all nine deployment runs selected the **same candidate bytes**
-and each arm verified two candidates per deployment. Frozen and trained VATS
-both drafted the two edits in the same order, then verified both candidates in
-one bundle. The table reports independent-final speedups against the original
-denoiser. The last column divides the trained score by the frozen score within
-the same deployment block.
-
-| Deployment seed | Fixed serial | Frozen VATS | VATS + GVO | Trained vs. frozen |
-| ---: | ---: | ---: | ---: | ---: |
-| 101 | 1.1496× | 1.1562× | 1.1656× | +0.81% |
-| 202 | 1.1389× | 1.1457× | 1.1546× | +0.78% |
-| 303 | 1.1542× | 1.1557× | 1.1434× | −1.07% |
-| Geometric mean | 1.1475× | 1.1525× | 1.1545× | +0.17% |
-
-The paired score difference was **+0.17%** for trained versus frozen VATS
-and **+0.61%** for trained VATS versus the fixed serial control. Repeated
-measurement of the same code produced all three values in each row.
-The two edits delivered the observed denoiser speedup. This pilot found no
-additional candidate-quality or evaluation-count benefit from GVO.
-The default zero refinement queries also leave the Scorer outside deployment
-action selection in this configuration.
-
-One shared root qualification took 38.34 s. The six independent training
-searches and one update took **297.99 s**, including nine candidate evaluations.
-All three role weight vectors changed. Mean online time, including independent
-final, was 97.35 s for serial, 96.42 s for frozen VATS and 95.30 s for trained
-VATS. Over three deployments, collection, training and trained deployment took
-**583.90 s**, compared with **289.26 s** for frozen deployment. Both totals
-exclude the common root, queue, container startup and setup. The small online
-timing difference does not establish a repeatable saving or break-even point.
-
-The verifier replayed all 37 completed five-case task evaluations (1,998
-compute calls) and the earlier device-initialization failure. An offline audit
-of the archived RunStore also confirmed that all six VATS deployments promoted
-their selected candidate and bound its final receipt to the measured files.
-The three serial controls have direct independent task finals. Overall search
-efficacy remains **INCONCLUSIVE**. The [evidence bundle](../evidence/qwen-vats-gvo-910b1-20261124/README.md)
-links the frozen inputs, checkpoint, per-trial index, archive availability and
-raw-data verification instructions.
-
-## Validation and issue completion
-
-```bash
-python -m pytest tests/harness/test_speculative_search.py tests/harness/test_verification_plans.py \
- tests/harness/test_work_control.py tests/apps/test_search_roles.py tests/harness/test_vats_runtime.py \
- tests/apps/test_search_benchmarks.py tests/campaigns/test_qwen_gvo_diagnostic.py
-```
-
-Controls cover exhaustive planning, failed-parent repair, finite-score overflow,
-concurrent domain claims, unknown reservations, atomic evidence/accounting,
-invalid roots, process-backed CPU searches, numerical actor-gradient checks,
-parameter updates, fresh searches, paid continuations, recovery and final export.
-The numeric process grader and Skill report fixtures test software behavior;
-they are not real task/provider efficacy evidence.
-
-| Issue area | Delivered software | Still required for full acceptance |
-| --- | --- | --- |
-| AC-01/02 | Support/permission boundaries and immutable trees | Production role/environment qualification |
-| AC-03/05 | Durable transitions, late receipts, invalidation, bounded synchronous VATS | Production adapter fault/race evidence |
-| AC-04 | Exact planner, independent oracle and Scorer refinement | Scaling and real complementary-check evidence |
-| AC-06 | Independent groups, actor/value updates, paid continuations, checkpoints, Reset/Carry | Replicated learning across checkpoints and tasks, and role qualification |
-| AC-07 | Shared local claims, elapsed-time caps and cleanup-aware recovery | Host callback preemption, provider/device total accounting and production resource integration |
-| AC-08 | One-time final scope and task promotion gate | Real independent final evidence and separate default-improver qualification |
-| AC-09 | Packaged Engine evaluator and explicit Skill comparator bridge | Live Agent/Skill pilot and broader Engine coverage |
-| AC-10 | Retained trajectories/costs and ablation switches | Replicated learning and bundle, Reset/Carry and worker comparisons with full lifecycle costs |
-
-The maintainer accepted the single-worker local VATS/GVO runtime, its recovery
-and final-evidence controls, and the bounded Engine diagnostic as a separately
-reviewable delivery for PR #488. The software controls and the archived
-measurements are the evidence for that slice. Issue #363 remains open for the
-criteria in the last column. [Maintainer’s scope decision](https://github.com/InferMatrixLab/InferRSI/issues/363#issuecomment-7124911509).
+See the [GVO measurement design](guides/speculative-search.md#measuring-the-contribution-of-gvo).
diff --git a/src/inferrsi/harness/README.md b/src/inferrsi/harness/README.md
index ea269a561..d754478c3 100644
--- a/src/inferrsi/harness/README.md
+++ b/src/inferrsi/harness/README.md
@@ -27,7 +27,7 @@ measurement and assessment rules.
[`search_campaign.py`](search_campaign.py) coordinates VATS, GVO updates,
and final evaluation. [`work_control.py`](work_control.py) persists claims,
receipts and budget accounting in the shared RunStore. See the
- [speculative search design](../../../docs/speculative-search.md) for recovery rules.
+ [speculative search design](../../../docs/guides/speculative-search.md) for recovery rules.
## Evaluate retained runs
diff --git a/src/inferrsi/harness/search_tree.py b/src/inferrsi/harness/search_tree.py
index b6f343282..9b8ae5235 100644
--- a/src/inferrsi/harness/search_tree.py
+++ b/src/inferrsi/harness/search_tree.py
@@ -2,7 +2,7 @@
Inputs are trusted controller records, not authenticated executor messages. This module
neither starts work nor grants a claim, releases a lease, spends budget or promotes a
-production version. See docs/speculative-search.md for the adapter boundary.
+production version. See docs/guides/speculative-search.md for the adapter boundary.
"""
from dataclasses import dataclass, fields, replace
diff --git a/tests/fixtures/skill-comparison/report-example.md b/tests/fixtures/skill-comparison/report-example.md
index 76c9f9993..45385523a 100644
--- a/tests/fixtures/skill-comparison/report-example.md
+++ b/tests/fixtures/skill-comparison/report-example.md
@@ -4,7 +4,7 @@ Pipeline results only; fixed-output offline clients do not establish skill effic
Generated by the fixed-output fixture with real temporary Git snapshots. These fixture revisions are test data, not campaign defaults.
-[JSON excerpt](report-example.json) · [Reproduce the full report and retained evidence](../../../docs/skill-evaluation/skill-eval-comparison.md)
+[JSON excerpt](report-example.json) · [Reproduce the full report and retained evidence](../../../docs/guides/skill-evaluation/skill-eval-comparison.md)
| Case | Repeat | Baseline | Candidate | Outcome |
| --- | --- | --- | --- | --- |
diff --git a/tests/repository/test_architecture_closed_loop.py b/tests/repository/test_architecture_closed_loop.py
index ddc916187..5ff387dd1 100644
--- a/tests/repository/test_architecture_closed_loop.py
+++ b/tests/repository/test_architecture_closed_loop.py
@@ -22,7 +22,7 @@
LOOP = Path(__file__).with_name("architecture_closed_loop.py")
PORTS = Path(__file__).with_name("architecture_real_ports.py")
-LAYOUT = Path(__file__).resolve().parents[2] / "docs" / "module-layout.md"
+LAYOUT = Path(__file__).resolve().parents[2] / "docs" / "guides" / "module-layout.md"
ROOT = Path(__file__).resolve().parents[2]
# Families the CPU/offline assembler must not couple to: the CLI, its parser, the
# Harness runner, and Apps, Knowledge or Benchmark as packages.
diff --git a/tests/repository/test_pr_references.py b/tests/repository/test_pr_references.py
index 7e3daf8ea..cca7534c1 100644
--- a/tests/repository/test_pr_references.py
+++ b/tests/repository/test_pr_references.py
@@ -87,7 +87,7 @@ def test_main_passes_silently(monkeypatch, capsys):
@pytest.mark.parametrize(("changes", "before", "after", "expected"), [
("", "", "", False),
("M\0docs/contracts/current-design.md\0", "", "", True),
- ("D\0docs/module-layout.md\0", "", "", True),
+ ("D\0docs/guides/module-layout.md\0", "", "", True),
("A\0docs/legacy-knowledge-manifest.json\0", "", "", True),
("M\0docs/architecture.md\0", "Before", "After", False),
(
diff --git a/tests/repository/test_target_module_import_gate.py b/tests/repository/test_target_module_import_gate.py
index 5a4ff05b8..0fe9ccaa5 100644
--- a/tests/repository/test_target_module_import_gate.py
+++ b/tests/repository/test_target_module_import_gate.py
@@ -547,7 +547,7 @@ def test_module_entry_rule_covers_no_other_shape_target_or_file(self) -> None:
def test_layout_doc_states_the_same_limit(self) -> None:
text = (
- Path(__file__).resolve().parents[2] / "docs" / "module-layout.md"
+ Path(__file__).resolve().parents[2] / "docs" / "guides" / "module-layout.md"
).read_text(encoding="utf-8")
self.assertIn("Isolation stays false", text)
self.assertIn("Same-core imports are allowed", text)
diff --git a/tools/check_pr_references.py b/tools/check_pr_references.py
index 389d2837a..59c94133b 100644
--- a/tools/check_pr_references.py
+++ b/tools/check_pr_references.py
@@ -19,7 +19,7 @@
CONTRACT_PATHS = (
ARCHITECTURE,
"docs/contracts/",
- "docs/module-layout.md",
+ "docs/guides/module-layout.md",
"docs/legacy-knowledge-manifest.json",
)
ANCHOR_SECTION = re.compile(