skillfit 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.16.2 — Explain Skill comparison outcomes and adoption (2026-11-27)
6
+
7
+ - Paired reports lead with observed changes, runtime errors, and the adoption decision.
8
+ - Find named regressions even when gains offset them in the averages, and open the
9
+ saved outputs, verifier logs, and receipts for both versions.
10
+ - Review invocation costs and coverage alongside the adoption conditions. For
11
+ stopped runs, the summary points to the records available for recovery.
12
+
5
13
  ## 0.16.1 — Prepare Skill revision comparisons and fix shell startup (2026-11-17)
6
14
 
7
15
  - `eval --prepare` creates a fresh comparison workspace from two complete Skill
package/README.md CHANGED
@@ -27,16 +27,16 @@ skillfit compares a baseline and a treatment on the same tasks and reports what
27
27
  `report` and `doctor` read this machine and do not call a model.
28
28
 
29
29
  ```bash
30
- npx skillfit@0.16.1 report
31
- npx skillfit@0.16.1 doctor
32
- npx skillfit@0.16.1 doctor --json
33
- npx skillfit@0.16.1 doctor --strict
30
+ npx skillfit@0.16.2 report
31
+ npx skillfit@0.16.2 doctor
32
+ npx skillfit@0.16.2 doctor --json
33
+ npx skillfit@0.16.2 doctor --strict
34
34
  ```
35
35
 
36
36
  The JSON output is a `skillfit.doctor-report` [version-1 document](docs/schemas/doctor-report.schema.json) with Agent detection, Rules/Skills/MCP checks and matching summary counts. Findings remain advisory and exit 0 by default; `--strict` explicitly exits 1 when a FAIL exists, while an unknown Agent exits 2. Every doctor mode stays read-only: no model call, MCP connection or configuration write is performed.
37
37
 
38
38
  ```console
39
- $ npx skillfit@0.16.1 report --agent codex
39
+ $ npx skillfit@0.16.2 report --agent codex
40
40
 
41
41
  codex — 280 session(s), 280 transcript(s)
42
42
  skill FIRES SESSIONS LAST SEEN
@@ -70,9 +70,9 @@ Captured 2026-11-04 from one Codex history. Five installed skills have no observ
70
70
  No agent CLI, no login, no model calls. These read the benches shipped inside the package and take a few seconds:
71
71
 
72
72
  ```bash
73
- npx skillfit@0.16.1 bench check code-review
74
- npx skillfit@0.16.1 bench self-test code-review --suite existing-mock-arms --runs-root ./runs --run-group controls-001 --yes
75
- npx skillfit@0.16.1 report eval ./runs/controls-001/existing-mock-arms
73
+ npx skillfit@0.16.2 bench check code-review
74
+ npx skillfit@0.16.2 bench self-test code-review --suite existing-mock-arms --runs-root ./runs --run-group controls-001 --yes
75
+ npx skillfit@0.16.2 report eval ./runs/controls-001/existing-mock-arms
76
76
  ```
77
77
 
78
78
  <p align="center">
@@ -92,8 +92,8 @@ Paired eval defaults to **5 trials per condition**: 8 tasks require 80 agent exe
92
92
  ## Install
93
93
 
94
94
  ```bash
95
- npx skillfit@0.16.1 --help
96
- npx skillfit@0.16.1 doctor
95
+ npx skillfit@0.16.2 --help
96
+ npx skillfit@0.16.2 doctor
97
97
  ```
98
98
 
99
99
  Requires Node.js 22+. Both commands above are offline and make no model calls: `--help` lists the nine commands, and `doctor` is a read-only health report that detects which supported agents you have, inspects their rules files, and flags invalid or conflicting Skills. [Choose your build](docs/README.md#choose-your-build) owns the package/source boundary, availability checks and older release documentation.
@@ -132,10 +132,10 @@ The instructions the agent should follow.
132
132
  Then scaffold a case and preview an evaluation:
133
133
 
134
134
  ```bash
135
- npx skillfit@0.16.1 bench init my-bench --kind command --dry-run
136
- npx skillfit@0.16.1 bench init my-bench --kind command --yes
137
- npx skillfit@0.16.1 bench check ./my-bench --json
138
- npx skillfit@0.16.1 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
135
+ npx skillfit@0.16.2 bench init my-bench --kind command --dry-run
136
+ npx skillfit@0.16.2 bench init my-bench --kind command --yes
137
+ npx skillfit@0.16.2 bench check ./my-bench --json
138
+ npx skillfit@0.16.2 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
139
139
  ```
140
140
 
141
141
  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/guides/first-real-eval.md).
@@ -181,7 +181,7 @@ checkout once:
181
181
  ```bash
182
182
  git clone https://github.com/remote-controlled-man/skillfit.git
183
183
  cd skillfit
184
- git switch --detach 17772db9b2f112a1e25d0284a76cf38860f7790b
184
+ git switch --detach 5511a67639b87a255031676e6e3703f649f25f7d
185
185
  npm ci
186
186
  npm run build
187
187
  node dist/cli.js --help
@@ -192,7 +192,7 @@ node dist/cli.js eval skills/skillfit --bench code-review --agent codex --dry-ru
192
192
  node dist/cli.js install --agent codex --dry-run
193
193
  ```
194
194
 
195
- The detached commit contains revision preparation and the startup fix before this release bump. Building it prints 0.16.0.
195
+ The detached commit contains the comparison report improvements before the release bump. Building it prints 0.16.1.
196
196
  For development on your own checkout, follow
197
197
  [CONTRIBUTING.md](https://github.com/remote-controlled-man/skillfit/blob/main/CONTRIBUTING.md).
198
198
 
package/README.zh-CN.md CHANGED
@@ -27,16 +27,16 @@ skillfit 在同一批任务上比较基线组与实验组,并报告变化及
27
27
  `report` 和 `doctor` 只读这台机器,不调用模型。
28
28
 
29
29
  ```bash
30
- npx skillfit@0.16.1 report
31
- npx skillfit@0.16.1 doctor
32
- npx skillfit@0.16.1 doctor --json
33
- npx skillfit@0.16.1 doctor --strict
30
+ npx skillfit@0.16.2 report
31
+ npx skillfit@0.16.2 doctor
32
+ npx skillfit@0.16.2 doctor --json
33
+ npx skillfit@0.16.2 doctor --strict
34
34
  ```
35
35
 
36
36
  JSON 输出是 `skillfit.doctor-report` [v1 文档](docs/schemas/doctor-report.schema.json),包含 Agent 检测、Rules/Skills/MCP 检查及一致的汇总计数。默认情况下发现异常仍是建议信息并退出 0;`--strict` 在存在 FAIL 时显式退出 1,未知 Agent 仍退出 2。所有 doctor 模式都保持只读:不调用模型、不连接 MCP,也不修改配置。
37
37
 
38
38
  ```console
39
- $ npx skillfit@0.16.1 report --agent codex
39
+ $ npx skillfit@0.16.2 report --agent codex
40
40
 
41
41
  codex — 280 session(s), 280 transcript(s)
42
42
  skill FIRES SESSIONS LAST SEEN
@@ -70,9 +70,9 @@ Overall: 17 installed skill(s), 12 observed firing, 5 with no observed fire in r
70
70
  不需要 agent CLI、不需要登录、不调用模型。以下命令读取包内自带的 bench,几秒即可跑完:
71
71
 
72
72
  ```bash
73
- npx skillfit@0.16.1 bench check code-review
74
- npx skillfit@0.16.1 bench self-test code-review --suite existing-mock-arms --runs-root ./runs --run-group controls-001 --yes
75
- npx skillfit@0.16.1 report eval ./runs/controls-001/existing-mock-arms
73
+ npx skillfit@0.16.2 bench check code-review
74
+ npx skillfit@0.16.2 bench self-test code-review --suite existing-mock-arms --runs-root ./runs --run-group controls-001 --yes
75
+ npx skillfit@0.16.2 report eval ./runs/controls-001/existing-mock-arms
76
76
  ```
77
77
 
78
78
  <p align="center">
@@ -92,8 +92,8 @@ npx skillfit@0.16.1 report eval ./runs/controls-001/existing-mock-arms
92
92
  ## 安装
93
93
 
94
94
  ```bash
95
- npx skillfit@0.16.1 --help
96
- npx skillfit@0.16.1 doctor
95
+ npx skillfit@0.16.2 --help
96
+ npx skillfit@0.16.2 doctor
97
97
  ```
98
98
 
99
99
  需要 Node.js 22+。以上两条命令均离线执行,不调用模型:`--help` 列出九个命令;`doctor` 是只读健康报告,检测你装了哪些受支持的 agent、检查它们的规则文件,并标出无效或冲突的 Skill。[选择构建](docs/README.md#choose-your-build)是包/源码边界、可用性确认与旧版发布文档的唯一入口。
@@ -132,10 +132,10 @@ The instructions the agent should follow.
132
132
  然后脚手架一个 case 并预览评测:
133
133
 
134
134
  ```bash
135
- npx skillfit@0.16.1 bench init my-bench --kind command --dry-run
136
- npx skillfit@0.16.1 bench init my-bench --kind command --yes
137
- npx skillfit@0.16.1 bench check ./my-bench --json
138
- npx skillfit@0.16.1 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
135
+ npx skillfit@0.16.2 bench init my-bench --kind command --dry-run
136
+ npx skillfit@0.16.2 bench init my-bench --kind command --yes
137
+ npx skillfit@0.16.2 bench check ./my-bench --json
138
+ npx skillfit@0.16.2 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
139
139
  ```
140
140
 
141
141
  测收益前先把教学用 fixture、prompt、verifier 和 oracle 换成真实任务。预览声明两次调用,实际不调用。检查 `plan.evaluation.agentPreflight.status`;离线登录状态仍未知。case 与运行记录分开放。继续阅读[第一次真实评测](docs/guides/first-real-eval.md)。
@@ -178,7 +178,7 @@ F1 : 0.20 (no CI: a harmonic mean of two proportions has no clo
178
178
  ```bash
179
179
  git clone https://github.com/remote-controlled-man/skillfit.git
180
180
  cd skillfit
181
- git switch --detach 17772db9b2f112a1e25d0284a76cf38860f7790b
181
+ git switch --detach 5511a67639b87a255031676e6e3703f649f25f7d
182
182
  npm ci
183
183
  npm run build
184
184
  node dist/cli.js --help
@@ -189,7 +189,7 @@ node dist/cli.js eval skills/skillfit --bench code-review --agent codex --dry-ru
189
189
  node dist/cli.js install --agent codex --dry-run
190
190
  ```
191
191
 
192
- 该 detached commit 包含版本比较准备入口和启动修复,位于本次版本号更新之前。构建后打印 0.16.0。要在自己的检出上开发,请按 [CONTRIBUTING.md](https://github.com/remote-controlled-man/skillfit/blob/main/CONTRIBUTING.md) 操作。
192
+ 这个固定提交包含版本比较报告改进,构建后显示本次发布前的版本号 0.16.1。要在自己的检出上开发,请按 [CONTRIBUTING.md](https://github.com/remote-controlled-man/skillfit/blob/main/CONTRIBUTING.md) 操作。
193
193
 
194
194
  校验离线执行;`doctor` 只读,两种预览都只展示计划。适配器覆盖 **Claude Code**、**OpenAI Codex CLI** 与 **Kimi Code**;[当前源码能力表](docs/guides/experiment-workflow.md#executor-capabilities)列出模式、trigger reader、token/cache 限制与验证层级。matrix 声明命令;离线替身不能证明已安装 CLI 的兼容性或登录状态。
195
195
 
@@ -1,11 +1,12 @@
1
1
  import { measurementScopeText } from "../evaluation/measurement/scope.js";
2
2
  import { renderModelIdentityLines } from "../agents/observation/model-identity.js";
3
- import { readFileSync, statSync } from "node:fs";
3
+ import { existsSync, readFileSync, statSync } from "node:fs";
4
+ import { join } from "node:path";
4
5
  import { readEvaluationReport } from "./evaluation-report.js";
5
6
  import { agentEnvironmentReportLines } from "../agents/preflight-contract.js";
6
7
  import { renderSingleArmReport } from "./eval-single-arm-report.js";
7
8
  import { CONCLUSIVE_TASKS, CONCLUSIVE_TRIALS, formatP, formatPp1, } from "../evaluation/measurement/report.js";
8
- import { renderCostLines } from "../evaluation/measurement/costs.js";
9
+ import { completeCost, renderCostLines, } from "../evaluation/measurement/costs.js";
9
10
  import { renderInvocationCostLines } from "../evaluation/measurement/invocation-costs.js";
10
11
  import { parseEvalReport, } from "../evaluation/records/manifest.js";
11
12
  export { parseEvalReport } from "../evaluation/records/manifest.js";
@@ -96,12 +97,209 @@ function decisionNotes(report) {
96
97
  }
97
98
  return notes;
98
99
  }
99
- export function renderEvalMarkdown(report) {
100
+ function observedTaskChanges(result) {
101
+ // A failed audit can retain partial pairs; only a verified audit supports trial attribution.
102
+ const pairs = result.evidence.verified ? (result.evidence.pairs ?? []) : [];
103
+ return result.quality.tasks.map((task) => {
104
+ const taskPairs = pairs.filter((pair) => pair.taskId === task.id && pair.graded);
105
+ const checks = (change) => [
106
+ ...new Set([
107
+ ...(change === "regressed" ? task.regressedFacets : task.improvedFacets).map((f) => f.name),
108
+ ...taskPairs.flatMap((pair) => pair.changedChecks.filter((c) => c.change === change).map((c) => c.name)),
109
+ ]),
110
+ ];
111
+ const regressedChecks = checks("regressed"), improvedChecks = checks("improved");
112
+ const regressed = (task.regressedPairs ?? 0) > 0 ||
113
+ task.deltaPassRate < 0 ||
114
+ (task.scoreDelta ?? 0) < 0 ||
115
+ regressedChecks.length > 0 ||
116
+ taskPairs.some((pair) => (pair.scoreDelta ?? 0) < 0);
117
+ const improved = (task.improvedPairs ?? 0) > 0 ||
118
+ task.deltaPassRate > 0 ||
119
+ (task.scoreDelta ?? 0) > 0 ||
120
+ improvedChecks.length > 0 ||
121
+ taskPairs.some((pair) => (pair.scoreDelta ?? 0) > 0);
122
+ const errors = task.baseline.errors + task.treatment.errors;
123
+ const attributed = task.regressedPairs !== null && task.improvedPairs !== null;
124
+ return { task, regressed, improved, errors, regressedChecks, improvedChecks, attributed };
125
+ });
126
+ }
127
+ function comparisonEvidence(result) {
128
+ if (!result.evidence.verified)
129
+ return [
130
+ "Per-trial evidence is unavailable: native evidence is unverified. No trial paths are inferred from aggregate counts.",
131
+ "",
132
+ ];
133
+ const pairs = result.evidence.pairs ?? [];
134
+ const priority = (pair) => pair.graded &&
135
+ ((pair.baseline.passed && !pair.treatment.passed) ||
136
+ (pair.scoreDelta ?? 0) < 0 ||
137
+ pair.changedChecks.some((c) => c.change === "regressed"))
138
+ ? 0
139
+ : !pair.graded
140
+ ? 1
141
+ : 2;
142
+ const lines = [
143
+ "## Run evidence",
144
+ "",
145
+ "Evidence references are relative to [run], the native run directory (inside a portable package: run/).",
146
+ "",
147
+ ];
148
+ for (const pair of [...pairs].sort((a, b) => priority(a) - priority(b))) {
149
+ const outcome = (arm) => !arm.executorInvoked
150
+ ? "not invoked (ungraded)"
151
+ : arm.error !== null
152
+ ? "error (ungraded)"
153
+ : arm.passed
154
+ ? "passed"
155
+ : "failed";
156
+ const checks = pair.changedChecks.map((c) => `${escapeMarkdown(c.name)}: ${c.change}`);
157
+ lines.push(`- **${escapeMarkdown(pair.taskId)} / trial ${pair.trial}**: ${outcome(pair.baseline)} → ${outcome(pair.treatment)}${checks.length ? `; ${checks.join("; ")}` : ""}.`);
158
+ for (const arm of ["baseline", "treatment"]) {
159
+ const prefix = `${pair.taskId}/${arm}/trial-${pair.trial}`;
160
+ const references = [
161
+ ["receipt", "_result.json"],
162
+ ["output", "_output.md"],
163
+ ["verifier", "_verifier.txt"],
164
+ ["error", "_executor-error.txt"],
165
+ ].flatMap(([label, file]) => {
166
+ const relativePath = `${prefix}/${file}`;
167
+ return existsSync(join(result.evidence.runDir, relativePath))
168
+ ? [`[${label}](${relativePath})`]
169
+ : [];
170
+ });
171
+ lines.push(` - ${arm}: ${references.join(" · ")}`);
172
+ }
173
+ }
174
+ return [...lines, ""];
175
+ }
176
+ function comparisonCosts(result) {
177
+ const costs = result.costs.populations;
178
+ if (!costs)
179
+ return [
180
+ "### Invocation costs",
181
+ "",
182
+ "All-invocation accounting is unrecorded; no complete token or elapsed comparison is inferred.",
183
+ "",
184
+ ];
185
+ const populations = costs.attempts;
186
+ const total = (population, metric) => {
187
+ const measure = population.metrics[metric];
188
+ if (population.runs === 0 || measure.coverage.final + measure.coverage.partial === 0)
189
+ return "unrecorded";
190
+ const value = metric === "durationSeconds" ? measure.knownTotal.toFixed(3) : String(measure.knownTotal);
191
+ return `${completeCost(population, metric) ? "" : ">= "}${value}`;
192
+ };
193
+ const coverage = (population, metric) => {
194
+ const value = population.metrics[metric].coverage;
195
+ return `${value.final}/${value.partial}/${value.unknown}`;
196
+ };
197
+ const lines = [
198
+ "### Invocation costs",
199
+ "",
200
+ "All agent invocations, including errors and excluded partners. Coverage is final/partial/unknown; >= marks a lower bound.",
201
+ `- Invoked B/T: ${populations.baseline.runs}/${populations.treatment.runs}; Not invoked B/T: ${costs.notInvoked.baseline}/${costs.notInvoked.treatment}.`,
202
+ "",
203
+ "| Measure | Baseline | Treatment | Observed total change | Coverage B/T |",
204
+ "|---|---:|---:|---:|---|",
205
+ ];
206
+ const metrics = [
207
+ ["input", "Input tokens"],
208
+ ["cachedInput", "Cached input tokens"],
209
+ ["uncachedInput", "Uncached input tokens"],
210
+ ["output", "Output tokens"],
211
+ ["durationSeconds", "Elapsed seconds"],
212
+ ];
213
+ for (const [metric, label] of metrics) {
214
+ const change = result.costs.changes?.attempts?.[metric]?.totalChangeFraction ?? null;
215
+ const delta = change === null ? "n/a" : `${change > 0 ? "+" : ""}${(change * 100).toFixed(1)}%`;
216
+ lines.push(`| ${label} | ${total(populations.baseline, metric)} | ${total(populations.treatment, metric)} | ${delta} | ${coverage(populations.baseline, metric)} / ${coverage(populations.treatment, metric)} |`);
217
+ }
218
+ lines.push("", "Descriptive totals only, not billing or a statistically established efficiency gain. Per-success measures and separate judge usage remain in Cost accounting below.", "");
219
+ return lines;
220
+ }
221
+ function suggestedNextSteps(result, hasRegressions) {
222
+ const actions = [];
223
+ const reasons = new Set(result.acceptance.reasons.map((reason) => reason.code));
224
+ if (reasons.has("EXECUTION_ERRORS"))
225
+ actions.push("inspect the execution/verifier errors and retained receipts; repair the environment or inputs before declaring a fresh run. Keep stopped records intact.");
226
+ else if (result.status === "stopped" || result.status === "incomplete")
227
+ actions.push("inspect the retained session, ledger and stop reason before planning a fresh run. Keep this run intact; do not append replacement samples.");
228
+ if (hasRegressions)
229
+ actions.push("inspect the regressed tasks and checks before accepting this change.");
230
+ if (reasons.has("COST_LIMIT_EXCEEDED"))
231
+ actions.push("review all-invocation spending per successful task against the declared cost limits.");
232
+ if (!result.evidence.verified)
233
+ actions.push("inspect the audit findings; unverified records cannot authorize adoption.");
234
+ if ("quality" in result &&
235
+ (reasons.has("INSUFFICIENT_SCALE") || reasons.has("VALIDATION_NOT_DECLARED")))
236
+ actions.push(`plan a separate independent validation with at least ${result.acceptance.policy.minTasks} tasks × ${result.acceptance.policy.minTrialsPerTask} graded pairs per task, frozen before execution. Authorize its spending separately; do not add trials until significance.`);
237
+ if (result.acceptance.eligibleForUpgrade)
238
+ actions.push("review the candidate within the declared validation scope before any manual adoption.");
239
+ return actions.length
240
+ ? actions
241
+ : ["review the adoption conditions below before deciding whether to use this change."];
242
+ }
243
+ function comparisonSummary(result) {
244
+ const tasks = "quality" in result ? observedTaskChanges(result) : [];
245
+ const regressions = tasks.filter((item) => item.regressed);
246
+ const list = (items) => items.length ? items.map(({ task }) => escapeMarkdown(task.id)).join(", ") : "none recorded";
247
+ const lines = [
248
+ "## Comparison summary",
249
+ "",
250
+ `- State: ${result.status}`,
251
+ `- Evidence: ${result.evidence.verified ? "verified" : "unverified"}`,
252
+ `- Acceptance: ${result.acceptance.decision}; eligible for upgrade: ${result.acceptance.eligibleForUpgrade ? "yes" : "no"}; automatic upgrade: no`,
253
+ ];
254
+ if (!("quality" in result)) {
255
+ const records = [
256
+ ["session", "_session.json"],
257
+ ["ledger", "_calls.jsonl"],
258
+ ["plan", "_plan.json"],
259
+ ];
260
+ const references = records.flatMap(([label, file]) => existsSync(join(result.evidence.runDir, file)) ? [`[${label}](${file})`] : []);
261
+ lines.push("- Graded comparison: unavailable; no completed paired result is retained.", `- Next: ${suggestedNextSteps(result, false)[0]}`, `- Retained records (unverified): ${references.join(" · ") || "none available"}. References are relative to [run], the native run directory.`, "");
262
+ return lines;
263
+ }
264
+ const hasRegressions = regressions.length > 0 || result.quality.regressedPairs > 0;
265
+ const observed = (change) => {
266
+ const items = tasks.filter((item) => (change === "regressed" ? item.regressed : item.improved));
267
+ const pairs = change === "regressed" ? result.quality.regressedPairs : result.quality.improvedPairs;
268
+ if (items.length === 0 && pairs > 0)
269
+ return `task-level attribution unrecorded (${pairs} ${change} pass/fail pairs)`;
270
+ return `${list(items)}${pairs > 0 && tasks.some((item) => !item.attributed) ? "; paired attribution incomplete" : ""}`;
271
+ };
272
+ lines.push(`- Observed regressions: ${observed("regressed")}`, `- Observed improvements: ${observed("improved")}`, `- No observed change: ${list(tasks.filter((item) => item.attributed && !item.regressed && !item.improved && item.task.baseline.trials > 0))}`, ...(tasks.some((item) => !item.attributed)
273
+ ? [`- Pair attribution unrecorded: ${list(tasks.filter((item) => !item.attributed))}`]
274
+ : []), `- Next: ${suggestedNextSteps(result, hasRegressions)[0]}`);
275
+ if ("quality" in result) {
276
+ const quality = result.quality;
277
+ const pairs = quality.tasks.reduce((count, task) => count + task.baseline.trials, 0);
278
+ const errors = quality.tasks.reduce((counts, task) => [counts[0] + task.baseline.errors, counts[1] + task.treatment.errors], [0, 0]);
279
+ lines.push(`- Execution/verifier errors B/T: ${errors[0]}/${errors[1]}; excluded from the quality comparison.`, `- Graded pass/fail pairs: ${quality.improvedPairs} improved, ${quality.regressedPairs} regressed, ${pairs - quality.improvedPairs - quality.regressedPairs} unchanged; error pairs excluded.`, `- Statistical quality verdict: ${quality.statisticalVerdict}. Observed changes alone do not establish a Skill effect or equivalence.`, "", "| Task | Observed change | Pass B/T | Errors B/T | Checks to inspect |", "|---|---|---|---|---|");
280
+ const priority = (item) => item.regressed ? 0 : item.errors ? 1 : item.improved ? 2 : 3;
281
+ for (const item of [...tasks].sort((a, b) => priority(a) - priority(b))) {
282
+ const { task } = item;
283
+ const changes = [item.regressed ? "regressed" : "", item.improved ? "improved" : ""]
284
+ .filter(Boolean)
285
+ .join("; ");
286
+ const checks = [
287
+ ...item.regressedChecks.map((name) => `${escapeMarkdown(name)}: regressed`),
288
+ ...item.improvedChecks.map((name) => `${escapeMarkdown(name)}: improved`),
289
+ ];
290
+ lines.push(`| ${escapeMarkdown(task.id)} | ${changes || (task.baseline.trials ? (item.attributed ? "no observed change" : "pair attribution unrecorded") : "ungraded")}${item.errors ? "; execution/verifier errors" : ""} | ${task.baseline.passes}/${task.baseline.trials} / ${task.treatment.passes}/${task.treatment.trials} | ${task.baseline.errors}/${task.treatment.errors} | ${checks.join("; ") || "none recorded"} |`);
291
+ }
292
+ lines.push("", ...comparisonCosts(result), ...comparisonEvidence(result));
293
+ }
294
+ lines.push("## Suggested next steps", "", ...suggestedNextSteps(result, hasRegressions).map((step) => `- ${step}`), "", "## Adoption conditions", "", ...result.acceptance.reasons.map((reason) => `- \`${reason.code}\`: ${escapeMarkdown(reason.message.replaceAll(result.evidence.runDir, "[run]"))}`), "");
295
+ return lines;
296
+ }
297
+ export function renderEvalMarkdown(report, introduction = []) {
100
298
  const lines = [`# skillfit evaluation: ${escapeMarkdown(report.target.name)}`, ""];
101
- lines.push(measurementScopeText(report.measurementScope), "");
102
299
  if (report.executor.kind === "mock") {
103
300
  lines.push("> **Synthetic harness run.** These numbers do not measure an agent or Skill effect.", "");
104
301
  }
302
+ lines.push(...introduction, measurementScopeText(report.measurementScope), "");
105
303
  lines.push(`- Run: ${escapeMarkdown(report.runGroup)} (${escapeMarkdown(report.createdAt)})`, `- Target: ${escapeMarkdown(report.target.kind)}; SHA-256 \`${report.target.sha256}\``, ...(report.baselineTarget
106
304
  ? [
107
305
  `- Baseline Skill: ${escapeMarkdown(report.baselineTarget.name)} (previous version); SHA-256 \`${report.baselineTarget.sha256}\``,
@@ -196,10 +394,10 @@ export async function runEvalReport(inputPath, log = console.log, options = {})
196
394
  lines.push(renderEvalMarkdown({
197
395
  ...parseEvalReport(JSON.parse(readFileSync(path, "utf8"))),
198
396
  modelIdentities: result.modelIdentities,
199
- }));
397
+ }, comparisonSummary(result)));
200
398
  }
201
399
  else {
202
- lines.push(`# skillfit evaluation: ${result.status} run`, "", `- State: ${result.status}`, "- No completed paired comparison is available. Retained spending is not a quality verdict.");
400
+ lines.push(`# skillfit evaluation: ${result.status} run`, "", ...comparisonSummary(result), `- State: ${result.status}`, "- No completed paired comparison is available. Retained spending is not a quality verdict.");
203
401
  if (result.session?.stopReason)
204
402
  lines.push(`- Stop reason: ${safe(String(result.session.stopReason))}`);
205
403
  if ("startedAgentDispatches" in result.costs)
package/docs/README.md CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  ## Choose your build
4
4
 
5
- These pages describe the **0.16.1 package and current source**; source guides use
5
+ These pages describe the **0.16.2 package and current source**; source guides use
6
6
  Node >=22, `npm run build` and `node dist/cli.js`. The pinned
7
- `npx skillfit@0.16.1` commands name the version these pages describe; the registry
7
+ `npx skillfit@0.16.2` commands name the version these pages describe; the registry
8
8
  is the source of truth for what is currently published. Superseded releases keep
9
9
  their own documentation: see the
10
10
  [0.13.1 documentation](https://github.com/remote-controlled-man/skillfit/tree/4eaefde80f7e8a6b1e01939d3bd8a8b6418b75d6/docs)
11
11
  and its [publication record](https://github.com/remote-controlled-man/skillfit/blob/3a3ff415ccef1a3a45d1e2d2cc00d903ab7db850/docs/releases/0.13.1.md).
12
12
  Standalone driver links and unshipped source references use the
13
- [reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/17772db9b2f112a1e25d0284a76cf38860f7790b),
14
- which contains revision preparation and the startup fix before this release bump. Building that commit prints 0.16.0.
13
+ [reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/5511a67639b87a255031676e6e3703f649f25f7d),
14
+ which contains the comparison report improvements. Building that commit prints 0.16.1.
15
15
 
16
16
  ## Find your task
17
17
 
@@ -8,6 +8,39 @@ environment to invent historical usage, identity or claims. Saved format
8
8
  versions stay owned by the
9
9
  [architecture page](../maintainers/architecture.md#format-identity-and-replay-compatibility).
10
10
 
11
+ ## Human comparison summary
12
+
13
+ Starting in 0.16.2, paired human reports start with the saved run state, native audit
14
+ status and existing adoption decision, followed by observed changes. Regressed
15
+ tasks appear before error-only, improved and unchanged tasks. Pass/fail changes,
16
+ named-check changes and score changes remain observations; unchanged outcomes do
17
+ not establish equivalence, and execution/verifier errors are excluded from graded
18
+ pairs rather than counted as quality regressions. An individual audited check
19
+ regression stays visible even when task averages cancel it out.
20
+ Legacy pooled changes without per-task paired outcomes show that task attribution
21
+ is unrecorded instead of reporting no observed regression or improvement.
22
+
23
+ The compact cost table covers all primary Agent invocations, including errors
24
+ and excluded partners, with final/partial/unknown coverage. Partial totals carry
25
+ `>=` and incomplete coverage suppresses percentage changes; missing usage stays
26
+ unrecorded. Per-success costs and separate judge accounting remain in the detailed
27
+ sections. These descriptive numbers are not a bill or a proven efficiency gain.
28
+
29
+ Verified native pairs include references to existing receipts, outputs, verifier
30
+ logs and error files. References resolve relative to the native run directory,
31
+ shown as `[run]`; a portable package keeps that directory under `run/`. Local
32
+ absolute run paths are omitted. An unverified or historical aggregate report
33
+ does not infer trial paths or claim that per-trial evidence was verified. Keep
34
+ derived reports outside sealed runs so their artifact inventories remain intact.
35
+
36
+ Suggested next steps distinguish error recovery, regression inspection, declared
37
+ cost limits, audit findings and a separately planned independent validation.
38
+ Stopped or incomplete runs without a final manifest show recovery steps and
39
+ retained costs without inventing quality counts. Existing session, ledger and
40
+ plan references in that recovery summary are explicitly unverified. Reading a
41
+ report neither resumes a run nor authorizes more calls or automatic adoption. Statistical verdicts,
42
+ adoption policies, saved bytes and the paired JSON contract are unchanged.
43
+
11
44
  ## Frozen measurement scope
12
45
 
13
46
  Unpublished source records can include optional `measurementScope` v1 in paired,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillfit",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "A/B testing for agent configuration: paired evaluation of Skills, rules and MCP setups, with deterministic verifiers and replayable evidence.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -55,7 +55,7 @@
55
55
  ],
56
56
  "license": "MIT",
57
57
  "devDependencies": {
58
- "@biomejs/biome": "2.6.4",
58
+ "@biomejs/biome": "2.6.8",
59
59
  "@types/node": "^22.0.0",
60
60
  "typescript": "^5.6.0"
61
61
  }
@@ -10,7 +10,7 @@ truth for all numbers; your job is to pick the right command, run it, and interp
10
10
 
11
11
  ## Prerequisites
12
12
 
13
- Check availability with `npx skillfit@0.16.1 --version`, or `node dist/cli.js --version` inside a clone.
13
+ Check availability with `npx skillfit@0.16.2 --version`, or `node dist/cli.js --version` inside a clone.
14
14
  If neither works, tell the user to install from https://github.com/remote-controlled-man/skillfit and stop.
15
15
  For source-only commands below, set `skillfit_source` to the absolute path of a
16
16
  built checkout, then run from the project/study workspace that owns the outputs.
@@ -24,13 +24,13 @@ and earlier lack them. Registry availability is
24
24
  separate from source preparation, so inspect the installed version and fall back
25
25
  to the reviewed implementing source snapshot when a 0.15.0 package is
26
26
  unavailable. Read the
27
- [capability table](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md#executor-capabilities)
27
+ [capability table](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/guides/experiment-workflow.md#executor-capabilities)
28
28
  before promising a mode, strict budget or model provenance, and check the
29
29
  installed version before relying on a flag a later release added.
30
30
 
31
31
  Source links in this standalone driver use the
32
- [reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/17772db9b2f112a1e25d0284a76cf38860f7790b). They do not follow main.
33
- That snapshot contains revision preparation and the startup fix before this release bump, so its built CLI reports source package version 0.16.0.
32
+ [reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/5511a67639b87a255031676e6e3703f649f25f7d). They do not follow main.
33
+ That snapshot contains the comparison report improvements and builds as 0.16.1. The npm package includes them starting in 0.16.2.
34
34
  For a superseded release such as 0.13.1, use its
35
35
  [original documentation](https://github.com/remote-controlled-man/skillfit/tree/4eaefde80f7e8a6b1e01939d3bd8a8b6418b75d6/docs);
36
36
  do not substitute that older package for an example requiring 0.15.0 features.
@@ -42,21 +42,21 @@ do not substitute that older package for an example requiring 0.15.0 features.
42
42
  | "我的 skill 有没有被用到 / are my skills used at all" | `skillfit report` — read-only, free, instant; start here |
43
43
  | "这个配置健不健康" | `skillfit doctor` — read-only; current source supports versioned `--json` output and explicit `--strict` exit 1 on FAIL |
44
44
  | "这个 skill 值不值得装 / does this skill help" | Preview `skillfit eval <skill-path> --mode installed --bench <bench> --agent <id> --trials 3 --dry-run`, then run within authorized spending |
45
- | "新版 Skill 是否值得采用 / evaluate a candidate for a Skill evolution workflow" | With npm 0.9.0 or a current checkout, use `eval --request <request.json> --dry-run`; read the [component contract](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/reference/eval-component.md) for inputs and acceptance policy |
45
+ | "新版 Skill 是否值得采用 / evaluate a candidate for a Skill evolution workflow" | With npm 0.9.0 or a current checkout, use `eval --request <request.json> --dry-run`; read the [component contract](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/reference/eval-component.md) for inputs and acceptance policy |
46
46
  | "agent 自己想不想得起用它 / does it trigger" | same + `--mode trigger`. Add `--compete-installed` to copy other user Skills; otherwise recall is an upper bound. Codex counts a `SKILL.md` read |
47
47
  | "这个 MCP 能不能连上 / is this MCP catalog valid" | Preview `skillfit mcp check <probe.json> --dry-run`, then check explicitly; current source also selects real JSON config with `--agent <id> --server <name> [--project]`. Never calls tools; may start/connect the server. Native Codex TOML selection is unsupported |
48
48
  | "添加 / 修改 / 移除一个 MCP 配置" | Preview current-source `skillfit mcp apply --agent <id> --server <name> (--from <probe.json> | --remove) [--project] --dry-run`, then use `--yes`; JSON only, native Codex TOML refuses. No server/model call |
49
49
  | "卸载一个托管 Skill / 移除托管规则" | Preview current-source `skillfit uninstall --agent <id> --skill <name> [--project] --dry-run`, then use `--yes`; `--rules` removes only the managed block. Local drift refuses; no usage-based automatic removal |
50
50
  | "迁移个人 rules / Skills / MCP" | Preview current-source `skillfit bundle export <new-dir> --agent <codex|kimi-code> [--skill <name> ...] [--allow-symlink-root <dir> ...] [--mcp <name> ...] --dry-run`, then export with `--yes`; run the generated `setup.mjs --dry-run` before `--yes`. Same-Agent migration only; MCP accepts only structurally credential-free JSON declarations, never native Codex TOML. Skill links require explicit containing roots and stay inside the selected Skill; default refuses. No server/model call |
51
- | "这个 MCP / AGENTS.md 真的有帮助吗" | Preview `skillfit eval <experiment-dir> --bench <bench> --agent <id> --trials 3 --dry-run`; follow the [configuration experiment guide](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md#rules-and-mcp-overlays) |
52
- | "建一个 bench" | `skillfit bench init [dir]` then `skillfit bench check [dir]`; default schema 1 stays unrecorded; source supports explicit `--schema-version 2` with [claims](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/benches/README.md#claims-and-measurement-scope) |
53
- | "花钱前确认流水线能测到预期对照" | 0.15.0 / reviewed source: preview `node "$skillfit_source/dist/cli.js" bench self-test "$skillfit_source/benches/_self-test/example" --runs-root ./runs --run-group controls-001 --json --dry-run` from the owning workspace, then confirm with `--plan-sha <plan.sha256>`; read [self-test](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/bench-authoring.md#test-known-controls) for controls, limits and fresh output rules |
51
+ | "这个 MCP / AGENTS.md 真的有帮助吗" | Preview `skillfit eval <experiment-dir> --bench <bench> --agent <id> --trials 3 --dry-run`; follow the [configuration experiment guide](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/guides/experiment-workflow.md#rules-and-mcp-overlays) |
52
+ | "建一个 bench" | `skillfit bench init [dir]` then `skillfit bench check [dir]`; default schema 1 stays unrecorded; source supports explicit `--schema-version 2` with [claims](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/benches/README.md#claims-and-measurement-scope) |
53
+ | "花钱前确认流水线能测到预期对照" | 0.15.0 / reviewed source: preview `node "$skillfit_source/dist/cli.js" bench self-test "$skillfit_source/benches/_self-test/example" --runs-root ./runs --run-group controls-001 --json --dry-run` from the owning workspace, then confirm with `--plan-sha <plan.sha256>`; read [self-test](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/guides/bench-authoring.md#test-known-controls) for controls, limits and fresh output rules |
54
54
  | "做代码修改 case" | `bench init <dir> --kind command --dry-run`, then apply within the authorized scope; replace the teaching case with the real fixture, prompt, verifier and oracle |
55
55
  | "给 Agent 看 case 校验失败原因" | `bench check <dir> --json` — offline gate IDs, evidence and remediation; this is the integrity result, not calibration |
56
56
  | "先测 case 难度" | Version 0.11.0: `bench check <dir> --calibrate --agent <id> --task <id> --trials 1 --max-calls 1 --run-group <fresh-name> --json --dry-run`; calibrate only within authorized spending |
57
57
  | "查看或管理 case" | `bench list <dir> --json`, `bench show <dir> <id> --json`; preview `bench edit <dir> <id> --set field=value --json` or `bench remove <dir> <id> --json` |
58
58
  | "只测几个 case" | Repeat `eval --task <id>` or set request `taskIds`; source also supports task selection for calibration/trigger; preview the selected budget and keep validation independent |
59
- | "把结果交给另一台机器复现" | Preview `report eval <run-dir> --export <new-dir> --json`, then apply within the authorized scope; read the [portable package contract](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/reference/evaluation-reports.md) for matching inputs, stopped costs and sharing review |
59
+ | "把结果交给另一台机器复现" | Preview `report eval <run-dir> --export <new-dir> --json`, then apply within the authorized scope; read the [portable package contract](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/reference/evaluation-reports.md) for matching inputs, stopped costs and sharing review |
60
60
  | "把这次翻车存成任务" | `skillfit bench add <bench> --freeze --task <id> --prompt "..." --verifier-cmd "<cmd>"` |
61
61
  | "帮我起草 verifier" | same but `--decompose --agent <id>` — an agent drafts verifier + oracle; admitted only if the NOP + oracle gates pass |
62
62
 
@@ -74,7 +74,7 @@ commands and eval; local paths win. Editing still needs an owned local directory
74
74
  Git-root benches are supported since 0.12.0, with metadata excluded consistently.
75
75
  Keep `--runs-root` outside the bench/Skill/runtime and Git metadata; bad layouts
76
76
  are rejected at preview, including aliases. See the
77
- [first-run guide](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/first-real-eval.md).
77
+ [first-run guide](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/guides/first-real-eval.md).
78
78
 
79
79
  For a first revision comparison, npm 0.16.1 and newer provide `--prepare`; check `eval --help`.
80
80
  When available, preview `eval <new-skill> --baseline-skill <old-skill> --prepare
@@ -95,7 +95,7 @@ Since 0.12.0, `--freeze` selects tracked ordinary files inside Git; outside Git,
95
95
  explicit `--include <file-or-dir>` selections are required. Narrow large fixtures
96
96
  before importing. For `--decompose`, preview and authorize its single call within
97
97
  existing spending permission. Failed/interrupted drafts retain costs and inputs;
98
- never retry implicitly. See [drafting records](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/bench-authoring.md).
98
+ never retry implicitly. See [drafting records](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/guides/bench-authoring.md).
99
99
 
100
100
  Current-source schema 2 requires explicit `--claim` values for add/freeze/from-commit;
101
101
  claims edits use a JSON array and never upgrade schema 1 implicitly. Preview and
@@ -127,7 +127,7 @@ Dry previews execute no verifier/oracle/agent. Inspect the environment's nested
127
127
  `status`: a generated `planned` result can still be blocked by a missing CLI.
128
128
  Login always remains offline unknown. Live calibration/eval block hard case or
129
129
  environment failures; warnings and unknown evidence are not interchangeable.
130
- See [shared planning](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md).
130
+ See [shared planning](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/guides/experiment-workflow.md).
131
131
 
132
132
  Calibration has one no-Skill baseline arm and defaults to two trials; trigger
133
133
  has one installed arm, defaults to five and skips unlabeled selected tasks.
@@ -234,7 +234,7 @@ historical adoption requirement; a declaration mismatch is an integrity error.
234
234
  source checkout; source-development validation uses OS temporary directories.
235
235
  Exclude outputs from that project's Git history; the CLI does not edit its ignore rules.
236
236
  Keep derived analysis/scratch outside sealed batches; never edit/prune indexed
237
- receipts. Follow the [workflow](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md#retain-and-clean-up)
237
+ receipts. Follow the [workflow](https://github.com/remote-controlled-man/skillfit/blob/5511a67639b87a255031676e6e3703f649f25f7d/docs/guides/experiment-workflow.md#retain-and-clean-up)
238
238
  for explicit manual retention/cleanup. This CLI has no automatic GC or generic
239
239
  custom process-metric collector.
240
240
  - `bench init` / `bench add` show a plan before writing; `bench edit/remove` default