skillfit 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +68 -104
  2. package/README.zh-CN.md +68 -101
  3. package/benches/README.md +6 -2
  4. package/dist/cli.js +28 -16
  5. package/dist/commands/bench-calibration.js +5 -1
  6. package/dist/commands/bench-check-report.js +1 -34
  7. package/dist/commands/bench-draft.js +167 -0
  8. package/dist/commands/bench-draft.test.js +168 -0
  9. package/dist/commands/bench-manage.js +5 -4
  10. package/dist/commands/bench-source.js +101 -0
  11. package/dist/commands/bench-source.test.js +84 -0
  12. package/dist/commands/bench.js +157 -328
  13. package/dist/commands/eval-api-failure.test.js +46 -0
  14. package/dist/commands/eval-layout.test.js +126 -0
  15. package/dist/commands/eval-preflight-error.js +9 -0
  16. package/dist/commands/eval-preflight.js +4 -11
  17. package/dist/commands/eval-report.js +6 -459
  18. package/dist/commands/eval.js +7 -32
  19. package/dist/commands/install.js +14 -98
  20. package/dist/harness/agent-preflight.js +18 -2
  21. package/dist/harness/bench-check.js +277 -0
  22. package/dist/harness/bench-diagnostics.js +34 -0
  23. package/dist/harness/bench-location.js +29 -0
  24. package/dist/harness/bench-location.test.js +33 -0
  25. package/dist/harness/bench.js +8 -3
  26. package/dist/harness/eval-acceptance.js +1 -1
  27. package/dist/harness/eval-audit.js +2 -2
  28. package/dist/harness/eval-manifest.js +456 -0
  29. package/dist/harness/evaluation-layout.js +30 -0
  30. package/dist/harness/executors/api.js +20 -7
  31. package/dist/harness/executors/cli.js +15 -25
  32. package/dist/harness/experiment-session.js +5 -15
  33. package/dist/harness/hash.js +3 -1
  34. package/dist/harness/runner.js +5 -4
  35. package/dist/harness/single-arm-audit.js +1 -1
  36. package/dist/harness/trigger.js +1 -1
  37. package/dist/harness/verifier-timeout.js +8 -0
  38. package/dist/harness/verifier-timeout.test.js +76 -0
  39. package/dist/install/constants.js +1 -0
  40. package/dist/install/transaction.js +112 -0
  41. package/docs/README.md +65 -0
  42. package/docs/architecture.md +86 -0
  43. package/docs/archive-delivery.md +83 -0
  44. package/docs/archive-inventory.md +91 -0
  45. package/docs/bench-authoring.md +23 -3
  46. package/docs/bench-drafting.md +75 -0
  47. package/docs/case-management.md +12 -1
  48. package/docs/eval-agent-preflight.md +15 -2
  49. package/docs/eval-costs.md +28 -2
  50. package/docs/eval-planning.md +14 -0
  51. package/docs/evaluation-input-snapshots.md +20 -4
  52. package/docs/evaluation-reports.md +1 -1
  53. package/docs/first-real-eval.md +28 -3
  54. package/docs/growth-roadmap-2026-10.md +23 -18
  55. package/docs/package-contents.md +73 -0
  56. package/docs/plans/2026-10-17-workflow-foundations.md +37 -2
  57. package/docs/plans/2026-10-20-archive-replay-verification.json +125 -0
  58. package/docs/plans/2026-10-20-archive-source-verification.json +256 -0
  59. package/docs/plans/2026-10-20-delivery-verification.json +146 -0
  60. package/docs/plans/2026-10-20-docs-architecture-cleanup.md +233 -0
  61. package/docs/plans/2026-10-20-install-transactions-and-archive-delivery.md +233 -0
  62. package/docs/plans/2026-10-21-npm-0.13.0-release.md +41 -0
  63. package/docs/releases/0.11.0-ci-registry-install.json +130 -0
  64. package/docs/releases/0.11.0-feature-smoke.json +1576 -0
  65. package/docs/releases/0.11.0-local-attempt-1.json +24 -0
  66. package/docs/releases/0.11.0-local-attempt-1.log +19 -0
  67. package/docs/releases/0.11.0-local-registry-install.json +25 -0
  68. package/docs/releases/0.11.0-registry-metadata.json +33 -0
  69. package/docs/releases/0.11.0-signatures.txt +12 -0
  70. package/docs/releases/0.11.0-verification.json +95 -0
  71. package/docs/releases/0.11.0.md +54 -11
  72. package/docs/releases/0.12.0-attestation-check.json +22 -0
  73. package/docs/releases/0.12.0-attestations.json +155 -0
  74. package/docs/releases/0.12.0-ci-registry-install.json +90 -0
  75. package/docs/releases/0.12.0-feature-smoke.json +34 -0
  76. package/docs/releases/0.12.0-feature-smoke.mjs +73 -0
  77. package/docs/releases/0.12.0-foundations-smoke.json +1576 -0
  78. package/docs/releases/0.12.0-local-registry-install.json +75 -0
  79. package/docs/releases/0.12.0-preparation-attempt-1.json +22 -0
  80. package/docs/releases/0.12.0-registry-metadata.json +96 -0
  81. package/docs/releases/0.12.0-signatures.txt +6 -0
  82. package/docs/releases/0.12.0-verification.json +99 -0
  83. package/docs/releases/0.12.0.md +82 -0
  84. package/docs/releases/0.13.0-feature-smoke.mjs +114 -0
  85. package/docs/releases/0.13.0-preparation.json +102 -0
  86. package/docs/releases/0.13.0.md +61 -0
  87. package/docs/releases/archive-delivery-smoke.mjs +37 -0
  88. package/docs/reproducible-offline-example.md +1 -1
  89. package/docs/schemas/agent-preflight.schema.json +1 -1
  90. package/docs/verifier-contract.md +9 -0
  91. package/evidence/README.md +24 -1
  92. package/evidence/archive-catalog.v1.json +8044 -0
  93. package/evidence/fetch-archives.mjs +211 -0
  94. package/package.json +9 -2
  95. package/skills/skillfit/SKILL.md +25 -5
  96. package/dist/cli.test.js +0 -193
  97. package/dist/commands/bench-calibration.test.js +0 -237
  98. package/dist/commands/bench-check-json.test.js +0 -242
  99. package/dist/commands/bench-manage.test.js +0 -87
  100. package/dist/commands/bench.test.js +0 -1162
  101. package/dist/commands/bundle.test.js +0 -142
  102. package/dist/commands/calibration-cli.test.js +0 -145
  103. package/dist/commands/doctor.test.js +0 -280
  104. package/dist/commands/eval-agent-preflight.test.js +0 -245
  105. package/dist/commands/eval-export-modes.test.js +0 -350
  106. package/dist/commands/eval-export.test.js +0 -279
  107. package/dist/commands/eval-interruption.test.js +0 -238
  108. package/dist/commands/eval-preflight.test.js +0 -382
  109. package/dist/commands/eval-report.test.js +0 -367
  110. package/dist/commands/eval.test.js +0 -503
  111. package/dist/commands/evaluation-report.test.js +0 -243
  112. package/dist/commands/install.test.js +0 -555
  113. package/dist/commands/replay-cancellation.test.js +0 -105
  114. package/dist/commands/report.test.js +0 -110
  115. package/dist/commands/setup.test.js +0 -150
  116. package/dist/commands/upstream.test.js +0 -139
  117. package/dist/commands/workflow-entrypoints.test.js +0 -137
  118. package/dist/docs.test.js +0 -154
  119. package/dist/frontmatter.test.js +0 -49
  120. package/dist/harness/bench.test.js +0 -109
  121. package/dist/harness/bundle.test.js +0 -71
  122. package/dist/harness/codex-usage.test.js +0 -87
  123. package/dist/harness/costs.test.js +0 -92
  124. package/dist/harness/eval-budget.test.js +0 -237
  125. package/dist/harness/eval-component.test.js +0 -770
  126. package/dist/harness/eval-efficiency.test.js +0 -56
  127. package/dist/harness/execution-timing.test.js +0 -61
  128. package/dist/harness/executors/api.test.js +0 -136
  129. package/dist/harness/executors/cli.test.js +0 -510
  130. package/dist/harness/executors/mock.test.js +0 -43
  131. package/dist/harness/experiment-session.test.js +0 -317
  132. package/dist/harness/installed-skill.test.js +0 -162
  133. package/dist/harness/interruption.test.js +0 -31
  134. package/dist/harness/judge-accounting.test.js +0 -216
  135. package/dist/harness/judge.test.js +0 -181
  136. package/dist/harness/kimi-usage.test.js +0 -62
  137. package/dist/harness/native-diff.test.js +0 -53
  138. package/dist/harness/oss-lru-cache.test.js +0 -79
  139. package/dist/harness/oss-normalize-url.test.js +0 -64
  140. package/dist/harness/oss-regression-witness.test.js +0 -89
  141. package/dist/harness/oss-skill-followup.test.js +0 -59
  142. package/dist/harness/prompt.test.js +0 -48
  143. package/dist/harness/receipts.test.js +0 -148
  144. package/dist/harness/report.test.js +0 -297
  145. package/dist/harness/runner.test.js +0 -635
  146. package/dist/harness/skill-revision.test.js +0 -148
  147. package/dist/harness/stats.test.js +0 -124
  148. package/dist/harness/target.test.js +0 -60
  149. package/dist/harness/trigger.test.js +0 -261
  150. package/dist/harness/verifier-summary.test.js +0 -99
  151. package/dist/harness/verifier.test.js +0 -128
  152. package/dist/harness/waza-behavior.test.js +0 -139
  153. package/dist/mcp/probe.test.js +0 -139
  154. package/evidence/artifacts/2026-10-12-diagnosing-revision/calibration-records.tar.gz +0 -0
  155. package/evidence/artifacts/2026-10-12-diagnosing-revision/interrupted-records.tar.gz +0 -0
  156. package/evidence/artifacts/2026-10-12-diagnosing-revision/validation-records.tar.gz +0 -0
  157. package/evidence/artifacts/2026-10-12-diagnosing-v2/regression-records.tar.gz +0 -0
  158. package/evidence/artifacts/2026-10-12-diagnosing-v2/transfer-records.tar.gz +0 -0
  159. package/evidence/artifacts/2026-10-12-normalize-url-v2-available/readiness-records.tar.gz +0 -0
  160. package/evidence/artifacts/2026-10-12-normalize-url-v2-comparison/records.tar.gz +0 -0
  161. package/evidence/artifacts/2026-10-12-normalize-url-v2-recovery/records.tar.gz +0 -0
  162. package/evidence/artifacts/2026-10-12-normalize-url-v2-validated/records.tar.gz +0 -0
  163. package/evidence/artifacts/2026-10-13-debugging-completed-development/package.tar.gz +0 -0
  164. package/evidence/artifacts/2026-10-13-debugging-controls-and-sleep-stop/package.tar.gz +0 -0
  165. package/evidence/artifacts/2026-10-13-debugging-development-stops/package.tar.gz +0 -0
  166. package/evidence/artifacts/2026-10-14-debugging-followup-routing-stop/package.tar.gz +0 -0
  167. package/evidence/artifacts/2026-10-14-debugging-independent-validation/package.tar.gz +0 -0
  168. package/evidence/artifacts/2026-10-14-debugging-reading-pilot-and-cost-review/package.tar.gz +0 -0
  169. package/evidence/artifacts/2026-10-14-debugging-spending-stop/package.tar.gz +0 -0
  170. package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/package.tar.gz +0 -0
  171. package/evidence/artifacts/2026-10-15-native-diff-mechanism/package.tar.gz +0 -0
  172. package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/package.tar.gz +0 -0
package/README.md CHANGED
@@ -17,7 +17,7 @@ then install only what survives the experiment.
17
17
 
18
18
  [English](README.md) · [简体中文](README.zh-CN.md)
19
19
 
20
- [Quick start](#quick-start) · [Bench guide](benches/README.md) · [Metrics protocol](docs/metrics.md) · [Evidence](evidence/)
20
+ [Documentation](docs/README.md) · [Quick start](#first-run-with-npm) · [Bench guide](benches/README.md) · [Metrics protocol](docs/metrics.md) · [Evidence](evidence/)
21
21
 
22
22
  </div>
23
23
 
@@ -31,9 +31,9 @@ then install only what survives the experiment.
31
31
 
32
32
  The agent-config ecosystem has solved **distribution** (`npx skills add`, plugin marketplaces, MCP registries) but not **selection**. The evidence says unverified configuration can hurt:
33
33
 
34
- - Curated skills improve pass rates by **+16.6pp** on average — but agent-self-generated skills score **−1.3pp**, and focused skills beat large bundles ([SkillsBench, arXiv:2602.12670](https://arxiv.org/abs/2602.12670))
35
- - LLM-generated context files scored **−3%** while raising inference cost by 20%+ ([ETH Zurich, arXiv:2602.11988](https://arxiv.org/abs/2602.11988))
36
- - 36% of scanned public skills contain prompt injection ([Snyk ToxicSkills, 2026-02](https://snyk.io/blog/toxicskills-malicious-ai-agent-skills-clawhub/))
34
+ - Curated Skills raised average pass rates by **+16.6pp** across 87 tasks and 18 model–harness configurations; gains varied by configuration ([SkillsBench v4](https://arxiv.org/abs/2602.12670v4)).
35
+ - LLM-generated context files showed no statistically significant success-rate improvement, while increasing average inference cost by **20% on SWE-bench and 23% on CTXbench** ([Evaluating AGENTS.md v3](https://arxiv.org/abs/2602.11988v3)).
36
+ - **36.82% of 3,984 scanned public Skills** had at least one security issue in Snyk’s February 5, 2026 study ([ToxicSkills findings](https://snyk.io/blog/toxicskills-malicious-ai-agent-skills-clawhub/)).
37
37
 
38
38
  skillfit is the missing measurement layer: paired A/B experiments with deterministic verifiers, statistical verdicts, and trigger-rate measurement — packaged as a CLI anyone can run.
39
39
 
@@ -65,13 +65,28 @@ The skill fired once in nine in-domain tasks — and the tasks pass 3/3 without
65
65
  ## Install
66
66
 
67
67
  ```bash
68
- npx skillfit@0.11.0 --help
69
- npx skillfit@0.11.0 doctor
68
+ npx skillfit@0.13.0 --help
69
+ npx skillfit@0.13.0 doctor
70
70
  ```
71
71
 
72
- `npx skillfit` installs the published release and needs Node.js 22 or newer. The quick start below uses a source checkout so you can run the benches that ship in this repository. After `npm run build`, `node dist/cli.js` is that checkout's CLI. `skillfit` is the command installed from npm.
72
+ Requires Node.js 22+. npm may download the package; the case checks and previews below make no model calls.
73
73
 
74
- ## Quick start
74
+ ## First run with npm
75
+
76
+ In your project directory, replace `./my-skill` with a directory containing your `SKILL.md`:
77
+
78
+ ```bash
79
+ npx skillfit@0.13.0 bench init my-bench --kind command --dry-run
80
+ npx skillfit@0.13.0 bench init my-bench --kind command --yes
81
+ npx skillfit@0.13.0 bench check ./my-bench --json
82
+ npx skillfit@0.13.0 eval ./my-skill --bench ./my-bench --mode installed --agent codex --trials 1 --max-calls 2 --runs-root ./runs --run-group first-eval --json --dry-run
83
+ ```
84
+
85
+ Replace the teaching fixture, prompt, verifier and oracle before measuring benefit. The preview declares two calls and makes none. Inspect `plan.evaluation.agentPreflight.status`; login remains unknown offline. Keep cases and runs in separate directories. Continue with [your first real evaluation](docs/first-real-eval.md).
86
+
87
+ ### Run from source
88
+
89
+ Build a local checkout:
75
90
 
76
91
  ```bash
77
92
  git clone https://github.com/remote-controlled-man/skillfit.git
@@ -86,23 +101,13 @@ node dist/cli.js eval skills/skillfit --bench code-review --agent codex --dry-ru
86
101
  node dist/cli.js install --agent codex --dry-run
87
102
  ```
88
103
 
89
- The bench checks are offline integrity checks, not agent-quality scores. `doctor` is read-only; the eval and install commands above only print plans. `codex` is an example agent ID; replace it with yours. A real eval needs your own Skill and bench plus a local agent CLI or API credentials. The setup commands below work in Bash and PowerShell; selecting upstream Skills needs network access, and only `--yes` installs them.
90
-
91
- `eval` now defaults to **5 trials per condition**. With 8 tasks, a paired experiment makes 80 agent executions. Five trials are a starting point; representative tasks and a healthy baseline matter as much as repetition. Inspect the dry-run count and follow [your first real evaluation](docs/first-real-eval.md) before making an efficacy claim.
92
-
93
- For eval and baseline calibration, `--trials` must be an integer from 1 to 20. Fractional, malformed, or out-of-range values are rejected before any run or bench check starts.
104
+ The checks are offline; `doctor` is read-only and both previews only print plans. Supported agents: **Claude Code**, **OpenAI Codex CLI**, **Kimi Code** ([capability matrix](src/matrix/agents.json)).
94
105
 
95
- Use `--max-calls <n>` for eval or baseline calibration to reject plans above a call ceiling (including enabled judges). New runs retain a frozen plan, call ledger, session state and artifact hashes; input/config drift or executor failures stop further calls. Partial runs cannot support an installation recommendation. Follow the [bounded experiment workflow](docs/experiment-workflow.md), including its environment limits.
96
-
97
- Included in 0.10.1: Ctrl+C stops live evaluation processes and subsequent calls, retains available output/usage and seals a stopped run before exit 130. SIGTERM uses exit 143. Partial or unknown usage stays incomplete; interrupted prefixes cannot authorize an upgrade or retry themselves. See [interruption and retained records](docs/evaluation-interruption.md).
98
-
99
- Also included in 0.10.1: live `eval` checks selected cases offline before any agent/judge call. Hard failures block execution; warnings and unknown evidence are reported separately and retained with the run. Previews declare these checks pending and execute no verifier/oracle. This adds local checking time and zero model calls. See [case preflight](docs/eval-case-preflight.md).
100
-
101
- Supported agents: **Claude Code**, **OpenAI Codex CLI**, **Kimi Code** ([capability matrix](src/matrix/agents.json) — machine-readable, dated, doc-linked). Trigger-mode capture is currently verified for Kimi Code and Codex CLI.
106
+ Paired eval defaults to **5 trials per condition**: 8 tasks require 80 agent executions before optional judges. Preview the count and set `--max-calls` before spending. See [bounded experiments](docs/experiment-workflow.md).
102
107
 
103
108
  ## Build your own cases
104
109
 
105
- Available in 0.10.0: start a code-editing case with a broken fixture, protected tests, independent behavioral checks and a reference repair. The first command previews the files; the second creates a fresh directory; checking and eval preview make no model calls.
110
+ Scaffold a code-editing teaching case, then replace its inputs with your real task:
106
111
 
107
112
  ```bash
108
113
  node dist/cli.js bench init my-bench --kind command --dry-run
@@ -112,15 +117,9 @@ node dist/cli.js bench check my-bench --json
112
117
  node dist/cli.js eval skills/skillfit --bench my-bench --agent codex --input workspace --trials 1 --max-calls 2 --dry-run
113
118
  ```
114
119
 
115
- This is a synthetic teaching case, not a Skill benchmark. Replace the fixture, prompt, verifier and oracle with your actual task before measuring benefit. The preview shows two planned calls and starts none. Omit `--kind` (or use `--kind output`) for the existing reply-grading starter. Capture an observed failure with `bench add --freeze`, or import a maintainer fix with `--from-commit`; follow the [authoring guide](docs/bench-authoring.md).
116
-
117
- Agent callers can use `bench check --json` for versioned gate identifiers, task IDs, locations, failure reasons, remediation suggestions and bounded verifier evidence. stdout is JSON only; exit codes distinguish passed checks, failed checks and errors. Without `--calibrate`, this remains an offline integrity check; warnings still need review. Version 0.11.0 also supports a separate `--calibrate --json --dry-run` plan, with explicit hash confirmation before JSON execution. See the [JSON contract](docs/bench-check-json.md).
120
+ Use `bench add --freeze` to capture a failure or `--from-commit` to import a fix. Read the [case authoring guide](docs/bench-authoring.md), [JSON check contract](docs/bench-check-json.md), [verifier contract](docs/verifier-contract.md) and [drafting records](docs/bench-drafting.md).
118
121
 
119
- Version 0.11.0 supports quoted verifier/oracle arguments, including script paths with spaces. Recognized grader load/runtime errors and explicit infrastructure-error messages block offline gates or become ungraded evaluation errors, preserving agent costs. Normal task failures and assertions remain graded failures. See [verifier commands and error reporting](docs/verifier-contract.md).
120
-
121
- The same source checks the Agent environment in eval and baseline-calibration previews and before dispatch: CLI file availability, matrix capability matching and global same-name Skill conflicts. Known failures block before case probes or model calls; login remains explicitly unknown offline. Checks are sealed with the run and read without probing the current machine during report/replay. See [Agent environment preflight](docs/eval-agent-preflight.md).
122
-
123
- List and inspect cases, then preview an edit or removal. `--yes` applies a validated manifest change with a backup; removal preserves the case files. Select a smaller paired eval, trigger run or baseline calibration using repeated `--task`, or `taskIds` in a paired JSON request. IDs and order are frozen, budgets count only selected cases, and small samples remain indicative. See [case management](docs/case-management.md).
122
+ List and inspect cases, or preview an edit. `--yes` applies a validated change with a backup; removal keeps case files. Select a smaller run with repeated `--task`:
124
123
 
125
124
  ```bash
126
125
  node dist/cli.js bench list my-bench --json
@@ -129,51 +128,32 @@ node dist/cli.js bench edit my-bench example-task --set shouldTrigger=true --jso
129
128
  node dist/cli.js eval skills/skillfit --bench my-bench --agent codex --task example-task --input workspace --trials 1 --max-calls 2 --dry-run
130
129
  ```
131
130
 
132
- ## Evaluate a real OSS task
131
+ See [case management](docs/case-management.md). Live evaluation checks [case integrity](docs/eval-case-preflight.md) and the [Agent environment](docs/eval-agent-preflight.md) before calls; a successful preview alone does not establish readiness.
133
132
 
134
- Use `--input workspace` for paired CLI runs that inspect and edit files on disk,
135
- without an inline repository snapshot. Keep the same input mode for baseline
136
- calibration. `snapshot` remains the default; workspace input is unavailable for
137
- API executors and is separate from `--mode trigger`.
133
+ ### Evaluate a real OSS task
134
+
135
+ Use `--input workspace` for CLI runs that inspect and edit files on disk. API executors require the default snapshot mode. Keep calibration and paired input modes consistent:
138
136
 
139
137
  ```bash
140
138
  node dist/cli.js eval <skill-dir> --bench <bench-dir> --agent codex --input workspace --trials 5 --dry-run
141
139
  node dist/cli.js bench check <bench-dir> --calibrate --agent codex --input workspace --trials 3 --dry-run
142
140
  ```
143
141
 
144
- When importing a fix, `bench add --from-commit <sha> --prompt-file issue.md` keeps
145
- the issue request instead of revealing the fix message. Reports show per-check
146
- results, usage coverage and installation evidence gaps. A single task informs
147
- that task; it does not prove general benefit. Follow the [real OSS workflow](docs/oss-task-evaluation.md)
148
- or replay the [pinned mcp-use example](benches/contrib/oss-mcp-use-utf8/README.md).
142
+ Import the issue request with `--prompt-file` so the fix message does not reveal the answer. Follow the [real OSS workflow](docs/oss-task-evaluation.md) or inspect the [pinned mcp-use example](benches/contrib/oss-mcp-use-utf8/README.md).
149
143
 
150
- ## Compare Skill revisions
144
+ ### Compare Skill revisions
151
145
 
152
- Use `--baseline-skill` with `--mode installed` to compare a previous complete Skill against a revised version. Both must have the same `SKILL.md` frontmatter name and different content fingerprints. Baseline receives the previous version; treatment receives the target version, with identical natural task prompts and independent outcome verifiers. Plans, manifests and trial receipts pin both versions, including scripts and binary resources. A change to either source stops further calls. The comparison measures revision effects; installation benefit still needs a separate no-Skill baseline. See [the revision workflow](docs/skill-revisions.md).
146
+ Compare two complete versions with the same frontmatter name and different fingerprints. Both arms receive identical natural prompts; revision effects are distinct from installation benefit:
153
147
 
154
148
  ```bash
155
149
  node dist/cli.js eval ./skill-new --baseline-skill ./skill-old --mode installed --bench ./my-bench --agent codex --trials 5 --dry-run
156
150
  ```
157
151
 
158
- ## Agent evaluation component
159
-
160
- New installed evaluations provide the same native untracked-file diff helper in both arms. Use `node _skillfit/native-diff.cjs <file>` to display a patch without output filtering. The plan and evidence pin the helper version and content; a modified helper stops further calls. This corrects the common evaluation environment, not the Skill. Old runs keep their original environment, and delivery does not prove the agent used the helper.
152
+ See [revision comparisons](docs/skill-revisions.md) and [installed Skill delivery](docs/installed-skill-evaluation.md).
161
153
 
162
- Use a version 1 JSON request to call the existing Skill revision engine from an Agent. A read-only preview pins inputs and the policy; execution requires its plan hash. JSON results retain improvements, regressions, all-invocation costs and evidence coverage. A separate policy returns `accept`, `reject` or `inconclusive`; insufficient evidence cannot authorize adoption, and the component never upgrades a Skill. This interface is included in [0.9.0](docs/releases/0.9.0.md), available from npm or a source checkout. See [the input/output and policy contract](docs/eval-component.md).
154
+ ### Agent evaluation component
163
155
 
164
- For new cost comparisons, set `pairOrder: "balanced"` in the request to alternate which version runs first. The plan freezes the order and offline assessment verifies the invocation ledger; paired statistical formulas remain unchanged.
165
-
166
- The default policy requires a demonstrated quality gain. An explicit version-2 `efficiency` policy can accept stable uncached-input savings with no observed correctness regression; a quality tie keeps its `inconclusive` verdict. Both objectives require independent validation, complete evidence and spending coverage. See the [predeclared cost example](docs/examples/eval-request.diagnosing-v2-efficiency.json).
167
-
168
- Requests can also pin `executorTimeoutSeconds` (default 600) for both versions. A changed deadline requires a new plan and batch; previous timeouts and their available spending remain in the evidence.
169
-
170
- Available in 0.10.0: optional `spendingBudget` sets five absolute batch stop lines. Reaching a line or losing complete final usage stops subsequent calls and retains spending; an in-flight call may overshoot. See the [guard contract](docs/eval-component.md#input-and-execution).
171
-
172
- Version 0.11.0 unifies ordinary paired/trigger eval planning and paired Agent request plans. Ordinary eval also accepts `--json`, `--spending-budget <file>`, `--executor-timeout-seconds`, `--runs-root` and `--run-group`, plus `--pair-order` for paired runs; JSON execution requires the preview hash. Requests can set `baselineSkill: null` for no Skill installed by the harness in baseline, matching ordinary installed eval without `--baseline-skill`. This measures installation benefit but cannot authorize revision adoption. See [shared settings and confirmation](docs/eval-planning.md).
173
-
174
- The same source gives baseline calibration and trigger runs JSON previews, frozen task selection, call/spending limits and per-call deadlines. Preview runs no verifier, oracle or agent; hard case/environment failures block live execution. JSON execution needs an explicit fresh group and the exact preview hash (`plan.planSha256` for calibration, `plan.sha256` for eval). Calibration measures baseline difficulty; trigger measures discovery. Neither establishes paired Skill benefit or authorizes adoption.
175
-
176
- Failed Codex JSON calls can retain identity-bound partial usage from local numeric counters. Private transcript bodies stay out of exports, and partial usage never satisfies the final-cost or adoption gates.
156
+ Agent callers can preview a version-1 JSON request, then execute its pinned plan:
177
157
 
178
158
  ```bash
179
159
  node dist/cli.js eval --request ./request.json --dry-run
@@ -181,9 +161,13 @@ node dist/cli.js eval --request ./request.json --plan-sha <plan.sha256>
181
161
  node dist/cli.js report eval ./runs/revision-validation-001 --json --replay
182
162
  ```
183
163
 
184
- ## Test rules and MCP setups
164
+ The [component contract](docs/eval-component.md) defines quality and efficiency policies; `accept`, `reject` and `inconclusive` remain separate from the statistical verdict. Adoption requires complete, independent validation; nothing upgrades automatically.
165
+
166
+ [Shared planning](docs/eval-planning.md) covers ordinary/request plans, `--json`, task selection, balanced pair order, five-field spending stops, deadlines and plan-hash confirmation. Calibration measures baseline difficulty; trigger mode measures discovery. Neither proves paired benefit. Installed evaluations provide the same pinned native diff helper to both arms.
167
+
168
+ ### Test rules and MCP setups
185
169
 
186
- Put a `skillfit-experiment.json` next to baseline and treatment project overlays. A rules experiment can add `AGENTS.md`; an MCP experiment can add `.codex/config.toml`, `.mcp.json`, or the path defined for another supported agent. skillfit copies the same task fixture into both arms, snapshots it for an identical prompt, then applies each overlay so the local agent discovers configuration through its normal loader.
170
+ Create baseline and treatment project overlays next to `skillfit-experiment.json`:
187
171
 
188
172
  ```text
189
173
  context7-experiment/
@@ -197,29 +181,19 @@ node dist/cli.js eval ./context7-experiment --bench ./my-context7-bench --agent
197
181
  node dist/cli.js eval ./context7-experiment --bench ./my-context7-bench --agent codex --trials 5
198
182
  ```
199
183
 
200
- Start with `skillfit mcp check` to verify a stdio server or a Streamable HTTP endpoint and its tool catalog. It requests `tools/list` and audits names, descriptions, input schemas, and annotations without calling a tool. Then run the paired experiment to measure whether the model selects the server correctly and whether task outcomes improve. See [Rules and MCP experiments](docs/config-experiments.md).
201
-
202
- For Codex MCP trials, skillfit passes a per-run trust override so the disposable project config loads without changing your Codex user config.
184
+ Start with `skillfit mcp check` for server discovery and catalog auditing; it calls no tool. Then measure outcomes with the [rules and MCP workflow](docs/config-experiments.md). For Codex MCP trials, a per-run trust override loads the disposable project config without changing user config.
203
185
 
204
186
  ## Share an evaluation
205
187
 
206
- Try the synthetic example below, then replace its path with the `Manifest:` path printed by your own paired `eval` run. The report includes provenance, uncertainty, errors, and warnings; it does not rerun the agent. See [sharing results](docs/sharing-results.md).
188
+ Try a saved synthetic report, then use the manifest or directory printed by your own run:
207
189
 
208
190
  ```bash
209
191
  node dist/cli.js report eval docs/examples/eval-manifest.synthetic.json
210
192
  ```
211
193
 
212
- In 0.10.1, Markdown and JSON accept the same manifest, native run directory or portable package, including stopped/incomplete batches. Both assess saved evidence and explain acceptance separately from a quality verdict. `--replay`, `--records` and `--policy` work in either format; successful rendering does not authorize an upgrade. See [report inputs and states](docs/evaluation-reports.md).
213
-
214
- Version 0.11.0 also reads calibration directories/`_calibration.json` and trigger manifests in either format. Completed calibration stays completed and shows baseline difficulty; trigger reports show recall, false-trigger rate, precision, F1 and detection coverage. New sealed single-arm runs support native audit, offline delivery replay and portable export; standalone historical summaries stay unverified. These separate reports cannot authorize adoption or use paired acceptance-policy options. See [report types](docs/evaluation-reports.md#calibration-and-trigger-reports-source-after-npm-0101).
215
-
216
- New reports separate cached and uncached input, output, and elapsed time, with spending per successful task that includes failed runs. They show surviving pairs alongside all agent invocations, and mark partial or missing timeout usage instead of treating it as zero. Chat-completions API responses retain explicit cached-input counts, including zero; missing or invalid counts stay unknown. Older manifests identify these fields as unrecorded. See [cost accounting](docs/eval-costs.md).
217
-
218
- Version 0.11.0 records `invocationCosts` for primary Agent, judge and total spending, preserving failed/partial/unknown usage. Optional judge spending shares the batch stop lines; an explicitly enabled API judge with missing credentials fails instead of silently turning off. Historical missing judge receipts stay unknown. See [cost accounting](docs/eval-costs.md).
194
+ Markdown and JSON read paired, calibration and trigger records, including incomplete runs. Rendering a report does not authorize adoption. See [sharing](docs/sharing-results.md), [report states](docs/evaluation-reports.md) and [cost coverage](docs/eval-costs.md).
219
195
 
220
- That source can export a supported sealed native paired, calibration or trigger run, including new paired runs with judge receipts, as a portable directory with original receipts, matching inputs, pinned compiled CLI, checksums and a replay entry point. Export previews by default; missing inputs, required receipt/runtime support or an existing destination stop it. The whole package can move to another machine. Replay calls no model, preserves stopped/unknown costs and authorizes no upgrade. Review project data before sharing; see [portable replay packages](docs/replay-packages.md).
221
-
222
- Version 0.10.1 seals input copies before dispatch: later edits/deletions of the original Skill, bench or request no longer prevent export/replay. The plan records snapshot integrity, local copy time and storage; a damaged declared snapshot is rejected. Historical runs still need matching recovered inputs. See [sealed evaluation inputs](docs/evaluation-input-snapshots.md).
196
+ Export a sealed run to a fresh portable directory. Preview first; `--yes` writes:
223
197
 
224
198
  ```bash
225
199
  node dist/cli.js report eval ./runs/my-run --export ./exports/my-run --json
@@ -228,11 +202,13 @@ node ./exports/my-run/reproduce.mjs --verify-only
228
202
  node ./exports/my-run/reproduce.mjs
229
203
  ```
230
204
 
231
- The [Skill evidence index](docs/skill-evaluation-evidence.md) retains every cohort, failure and cost limit. The study now totals 195 executor calls with seven historical final usages still unknown; no tested revision qualifies for adoption. The latest [receiver mechanism probe](evidence/2026-10-15-receiver-mechanism-stop.md) stops after one failed candidate call, without running its control. Every published failure remains available for offline replay. These task-specific results do not establish general Skill benefit.
205
+ [Portable replay](docs/replay-packages.md) verifies saved observations and runs trusted local verifiers, with zero model calls. [Sealed inputs](docs/evaluation-input-snapshots.md) preserve the original case and target. [Interruption](docs/evaluation-interruption.md) retains available spending; unknown usage stays unknown.
206
+
207
+ Version 0.13.0 adds an explicit [restore tool](docs/archive-delivery.md): fetch pinned bytes once, then replay historical study archives offline. Git originals and frozen reports stay available; normal installation and CLI commands do not fetch archives.
232
208
 
233
209
  ## Selectable Codex setup
234
210
 
235
- From a fresh clone, inspect the source catalog of 67 installable Skills with `--list`, then use repeated `--skill` flags to select only those relevant to your tasks. The seven retired local Skills are listed with reasons. `--starter` preserves the original 13-Skill selection, which has not been evaluated as a set; `--all` selects all 67 and is not a recommended default. The catalog checks sources and installation, not efficacy: only eight entries have limited historical paired tests, and none has proven benefit for the current pinned Skill versions and Codex model. The setup command fetches selected third-party Skills from pinned author commits, verifies SHA-256 hashes, and plans a managed global `AGENTS.md` block. The two locally authored Skills live in this repository. See the [selectable setup guide and evidence summary](docs/selectable-codex.md).
211
+ Inspect 67 installable sources, then choose Skills relevant to your tasks. `--starter` selects 13 unvalidated-as-a-set Skills; `--all` selects all 67. Source hashes verify installation integrity, not efficacy. Selection needs network access; only `--yes` installs:
236
212
 
237
213
  ```bash
238
214
  node dist/cli.js setup codex --list
@@ -240,9 +216,11 @@ node dist/cli.js setup codex --skill vibe-coding --skill diagnosing-bugs
240
216
  node dist/cli.js setup codex --skill vibe-coding --skill diagnosing-bugs --yes
241
217
  ```
242
218
 
243
- ## Portable Codex setup
219
+ See the [selectable setup guide](docs/selectable-codex.md) for source provenance, retired entries and evidence limits.
244
220
 
245
- Export the user-level Skills seen in at least two Codex sessions and your active global guidance. Transfer the resulting directory to a new machine, then install it there. See [the portable setup guide](docs/portable-codex.md) for scope and options.
221
+ ### Portable Codex setup
222
+
223
+ Export user-level Skills observed in at least two Codex sessions and your active global guidance:
246
224
 
247
225
  ```bash
248
226
  node dist/cli.js bundle export ./personal-codex --dry-run
@@ -252,24 +230,24 @@ node ./personal-codex/setup.mjs --dry-run
252
230
  node ./personal-codex/setup.mjs --yes
253
231
  ```
254
232
 
255
- To export the full 65-Skill upstream source catalog, add `--upstream-lock ./profiles/codex-upstream-sources.json`. Setup then downloads those Skills from pinned author commits and verifies each file; locally authored Skills stay in the bundle. For a smaller new environment, use the selectable setup above. See the [source audit](docs/codex-upstream-audit.md).
233
+ For options, including the full 65-Skill upstream catalog via `--upstream-lock`, see [portable setup](docs/portable-codex.md) and the [source audit](docs/codex-upstream-audit.md).
256
234
 
257
235
  ## The eight commands
258
236
 
259
237
  | Command | What it does | Writes? |
260
238
  |---|---|---|
261
239
  | `doctor` | Detects installed agents, checks rules bloat, skill validity/conflicts, MCP declaration presence and JSON syntax where supported, and silent-failure traps (e.g. AGENTS.md that Claude Code never reads) | Never |
262
- | `report` | Skill usage receipts from retained local session history: fires per skill, candidates with no observed fire, and raw catalog size before agent-side limits. Absence is a prioritization signal, not proof of uselessness. It also renders an existing evaluation manifest as Markdown with `report eval`. | Never |
240
+ | `report` | Skill usage receipts from retained local session history: fires per skill, candidates with no observed fire, and raw catalog size before agent-side limits. Absence is a prioritization signal, not proof of uselessness. It also renders an existing evaluation manifest as Markdown with `report eval`. | `--export --yes` writes a fresh replay directory; otherwise read-only |
263
241
  | `eval <target>` | Paired baseline/treatment runs for a Skill, rules overlay, or MCP overlay; deterministic verifier + optional blind LLM judge, token-cost delta, McNemar exact test, paired bootstrap CI, and graded facet-score CIs. `--mode trigger` installs a Skill and measures trigger recall / false-trigger rate from the agent transcript | `runs/` locally |
264
242
  | `mcp check <spec>` | Handshakes with a stdio MCP server or a Streamable HTTP endpoint, requests `tools/list`, and audits tool names, descriptions, input schemas, and annotations. Never calls a tool | Never |
265
- | `bench` | `init` scaffolds a bench directory with a working example task; `check` validates a bench offline (verifier self-tests, oracle/NOP gates, mock-arm probes, fixture hygiene, trigger-label coverage); `add --freeze` turns a failure you just watched into a permanent bench task, and `--decompose` has an agent draft the verifier + oracle, admitted only if both gates pass | `init`/`add` after confirmation; `check` never |
243
+ | `bench` | `init` scaffolds a bench directory with a working example task; `check` validates a bench offline (verifier self-tests, oracle/NOP gates, mock-arm probes, fixture hygiene, trigger-label coverage); `add --freeze` turns a failure you just watched into a permanent bench task, and `--decompose` confirms before one agent call to draft the verifier + oracle, admitted only if both gates pass | `init`/`add`/`edit`/`remove` write after confirmation; `check --calibrate` calls an agent and writes runs; plain `check` runs local verifiers |
266
244
  | `install` | Managed-block rules (`<!-- SKILLFIT_START/END -->`, idempotent), skill copy with conflict protection, content-hash lockfile, post-install verification. Writes are staged first; if a write or verification fails, the installer rolls back changed target files, including the lockfile. Abrupt termination can still leave a partial install; re-run to reconcile. Your original is kept at `<file>.skillfit-bak` and the first backup wins, so later updates cannot overwrite it. `--dry-run` reports conflicts and exits 0; add `--strict` to make them fail (CI gates) | Only after confirmation |
267
245
  | `setup codex` | Lists or installs a chosen set of pinned, verified upstream Skills and repository-owned Skills with global routing guidance; defaults to a dry run | Only with `--yes` |
268
246
  | `bundle` | `export` creates a portable Codex profile from used local Skills and active global guidance | Only after confirmation |
269
247
 
270
- ## Bring your own bench
248
+ ### Bring your own bench
271
249
 
272
- Evals are only as good as their tasks. A bench is just a directory — `bench.json` + fixtures + a deterministic verifier. Scaffold one with `node dist/cli.js bench init`, freeze a real failure you just watched your agent botch with `node dist/cli.js bench add <bench> --freeze`, validate offline with `node dist/cli.js bench check`, and model it on your own production scenarios: [benches/README.md](benches/README.md). If you have never written one, start with [docs/bench-authoring.md](docs/bench-authoring.md) — it walks the seven steps end to end on a single real task, and covers the ways a bench produces confident wrong numbers.
250
+ A bench is `bench.json`, fixtures and deterministic verifiers. Use the [seven-step authoring guide](docs/bench-authoring.md) and [format reference](benches/README.md); bundled cases teach the format rather than establish model quality.
273
251
 
274
252
  ## Our own data
275
253
 
@@ -284,7 +262,7 @@ We ran skillfit's harness on 8 popular workflow skills (24 baseline/treatment pa
284
262
  | `security-and-hardening` | 0.00pp | +27.4% | No measurable gain, highest cost |
285
263
  | 3 more | 0.00pp | +14.7~17.0% | No measurable gain |
286
264
 
287
- Read the dated reports in [evidence/](evidence/). Some historical raw manifests remain local to their original runs; the evidence index identifies those limits. Reproduce a result on your own pinned Skill, agent, and bench with `skillfit eval`.
265
+ See the [evidence index](evidence/README.md) and [current debugging study](docs/skill-evaluation-evidence.md) for dated scope and available records.
288
266
 
289
267
  ## Design principles
290
268
 
@@ -293,34 +271,20 @@ Read the dated reports in [evidence/](evidence/). Some historical raw manifests
293
271
  - **Dry-run first.** Preview configuration changes before applying them; replacements keep backups and are verified. New bench/run/bundle artifacts preserve existing outputs through collision checks.
294
272
  - **Honest numbers.** New efficacy submissions need a pinned, shareable manifest; some older reports lack downloadable raw manifests. Verdict semantics are frozen in [docs/metrics.md](docs/metrics.md): significance comes from an exact McNemar test over discordant pairs, deltas carry paired-bootstrap CIs, and runs below 8 tasks × 5 trials are labeled *indicative* even if their within-bench verdict is statistically significant.
295
273
 
296
- ## Disclaimer
274
+ ### Disclaimer
297
275
 
298
276
  Not affiliated with Anthropic, OpenAI, Moonshot AI, or any agent vendor. Evaluation results depend on model version, harness, and tasks — treat them as dated evidence, not eternal truth.
299
277
 
300
278
  ## Roadmap
301
279
 
302
- [October 2026 delivery plan](docs/growth-roadmap-2026-10.md)
303
-
304
- - [x] doctor / eval / install core loop
305
- - [x] Paired A/B harness with blind judging
306
- - [x] Statistical verdicts (McNemar exact + paired bootstrap CI, manifest v4)
307
- - [x] Trigger rates for one Skill alone (`--mode trigger` on Kimi Code and Codex CLI: recall, false-trigger rate, Wilson CIs). Recall is an upper bound until that Skill competes with a real installed set. Codex detection is a `SKILL.md` read, not a Skill-invocation event.
308
- - [x] Bench scaffolding (`bench init` + `bench check`), failure freezing (`--freeze`), git-history mining (`--from-commit`), difficulty calibration (`--calibrate`). `bench check` is an offline integrity check, not an agent-quality score.
309
- - [x] Rules and MCP workspace A/B experiments with identical prompts
310
- - [x] Read-only stdio MCP handshake and tool-catalog audit
311
- - [ ] Claude Code trigger capture, machine-verified (blocked: needs working auth)
312
- - [x] Optional `triggerClass` (`explicit`, `implicit`, `contextual`) on positive tasks. Unlabeled tasks stay in the pooled recall.
313
- - [x] `--compete-installed` copies other user-level Skills into a trigger trial. System Skills and plugins outside the matrix directories are not copied. `installed` reports a long-body read separately from the task result; that read is not trigger recall.
314
- - [ ] An installation recommendation. The July 2026 eight-skill study found no robust task-quality gain. The 67-Skill catalog and the 13-Skill starter set are not evaluated as sets.
315
- - [x] npm publication (`skillfit@0.10.1`), with [verified CLI/OIDC publication and registry installation](docs/releases/0.10.1-verification.json). `npx skillfit` installs that release. Clone, `npm ci`, and `npm run build` remain valid.
316
- - [x] Community bench and evidence submissions. Benches go in `benches/contrib`; evidence uses the Evidence submission issue template. CI runs the offline gates and does not call an agent.
317
- - [ ] Cursor / Gemini CLI / OpenCode adapters
318
- - [x] Streamable HTTP MCP preflight (`mcp check` transport `http`). It does not call a tool.
280
+ See the [October delivery roadmap](docs/growth-roadmap-2026-10.md), [changelog](CHANGELOG.md) and [0.13.0 release record](docs/releases/0.13.0.md).
281
+
282
+ Later work includes verified Claude Code trigger capture and additional agent adapters. The [evidence index](evidence/README.md) and [debugging study status](docs/skill-evaluation-evidence.md) retain the limits of current results. The 67-Skill catalog and 13-Skill starter set are not evaluated as sets.
319
283
 
320
284
  ## Contributing
321
285
 
322
- See [CONTRIBUTING.md](CONTRIBUTING.md). The highest-value contribution is a bench built from your real workflow. Evidence submissions use the Evidence submission issue template: a pinned bench, a `bench check` summary, the exact command, and a reviewed manifest. Unverifiable percentages are not accepted. Release notes live in [CHANGELOG.md](CHANGELOG.md); security reports go to [SECURITY.md](SECURITY.md).
286
+ Follow [CONTRIBUTING.md](CONTRIBUTING.md). Useful contributions include real-workflow cases, reproducible evidence and matrix corrections. [Security reports](SECURITY.md) have a separate channel.
323
287
 
324
- ## License
288
+ ### License
325
289
 
326
290
  [MIT](LICENSE)