skillfit 0.10.1 → 0.11.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 (87) hide show
  1. package/README.md +18 -6
  2. package/README.zh-CN.md +18 -6
  3. package/benches/README.md +2 -2
  4. package/dist/cli.js +132 -28
  5. package/dist/cli.test.js +94 -0
  6. package/dist/commands/bench-calibration.js +197 -0
  7. package/dist/commands/bench-calibration.test.js +237 -0
  8. package/dist/commands/bench-check-json.test.js +24 -3
  9. package/dist/commands/bench.js +63 -143
  10. package/dist/commands/calibration-cli.test.js +145 -0
  11. package/dist/commands/eval-agent-preflight.test.js +245 -0
  12. package/dist/commands/eval-cli.js +31 -0
  13. package/dist/commands/eval-component.js +52 -28
  14. package/dist/commands/eval-export-modes.test.js +350 -0
  15. package/dist/commands/eval-export.js +12 -4
  16. package/dist/commands/eval-plan.js +37 -0
  17. package/dist/commands/eval-preflight.test.js +144 -1
  18. package/dist/commands/eval-report.js +18 -3
  19. package/dist/commands/eval-single-arm-replay.js +21 -0
  20. package/dist/commands/eval-single-arm-report.js +223 -0
  21. package/dist/commands/eval.js +106 -56
  22. package/dist/commands/evaluation-report.js +5 -0
  23. package/dist/commands/evaluation-report.test.js +243 -0
  24. package/dist/commands/replay-cancellation.test.js +105 -0
  25. package/dist/commands/workflow-entrypoints.test.js +137 -0
  26. package/dist/harness/agent-preflight.js +180 -0
  27. package/dist/harness/bench.js +2 -1
  28. package/dist/harness/command.js +49 -0
  29. package/dist/harness/eval-audit.js +161 -16
  30. package/dist/harness/eval-budget.js +46 -2
  31. package/dist/harness/eval-budget.test.js +26 -1
  32. package/dist/harness/eval-component.test.js +163 -0
  33. package/dist/harness/eval-contract.js +11 -5
  34. package/dist/harness/executors/api.js +4 -3
  35. package/dist/harness/executors/api.test.js +18 -0
  36. package/dist/harness/experiment-session.js +18 -10
  37. package/dist/harness/experiment-session.test.js +8 -0
  38. package/dist/harness/invocation-costs.js +72 -0
  39. package/dist/harness/judge-accounting.test.js +216 -0
  40. package/dist/harness/judge-audit.js +56 -0
  41. package/dist/harness/judge.js +86 -21
  42. package/dist/harness/replay-package.js +71 -5
  43. package/dist/harness/runner.js +40 -30
  44. package/dist/harness/runner.test.js +23 -0
  45. package/dist/harness/single-arm-audit.js +436 -0
  46. package/dist/harness/trigger.js +21 -3
  47. package/dist/harness/trigger.test.js +12 -0
  48. package/dist/harness/verifier-error.js +65 -0
  49. package/dist/harness/verifier.test.js +128 -0
  50. package/docs/bench-authoring.md +34 -9
  51. package/docs/bench-check-json.md +28 -5
  52. package/docs/eval-agent-preflight.md +101 -0
  53. package/docs/eval-case-preflight.md +5 -0
  54. package/docs/eval-component.md +38 -10
  55. package/docs/eval-costs.md +44 -0
  56. package/docs/eval-planning.md +153 -0
  57. package/docs/evaluation-input-snapshots.md +2 -1
  58. package/docs/evaluation-interruption.md +22 -10
  59. package/docs/evaluation-reports.md +97 -3
  60. package/docs/experiment-workflow.md +7 -0
  61. package/docs/first-real-eval.md +50 -3
  62. package/docs/growth-roadmap-2026-10.md +41 -9
  63. package/docs/metrics.md +40 -3
  64. package/docs/plans/2026-10-17-workflow-foundations.md +64 -0
  65. package/docs/releases/0.10.1-ci-registry-install.json +70 -0
  66. package/docs/releases/0.10.1-feature-smoke.json +28 -0
  67. package/docs/releases/0.10.1-local-registry-install.json +60 -0
  68. package/docs/releases/0.10.1-registry-metadata.json +33 -0
  69. package/docs/releases/0.10.1-signatures.txt +7 -0
  70. package/docs/releases/0.10.1-verification.json +90 -0
  71. package/docs/releases/0.10.1.md +37 -4
  72. package/docs/releases/0.11.0-feature-smoke.mjs +224 -0
  73. package/docs/releases/0.11.0.md +47 -0
  74. package/docs/replay-packages.md +38 -6
  75. package/docs/schemas/agent-preflight.schema.json +31 -0
  76. package/docs/schemas/calibration-plan.schema.json +22 -0
  77. package/docs/schemas/calibration-result.schema.json +17 -0
  78. package/docs/schemas/eval-request.schema.json +1 -1
  79. package/docs/schemas/eval-result.schema.json +3 -1
  80. package/docs/schemas/invocation-costs.schema.json +31 -0
  81. package/docs/schemas/judge-call.schema.json +22 -0
  82. package/docs/schemas/single-arm-report.schema.json +20 -0
  83. package/docs/schemas/verifier-error.schema.json +11 -0
  84. package/docs/sharing-results.md +3 -0
  85. package/docs/verifier-contract.md +99 -0
  86. package/package.json +1 -1
  87. package/skills/skillfit/SKILL.md +41 -8
@@ -0,0 +1,47 @@
1
+ # skillfit 0.11.0
2
+
3
+ This version completes the basic case → plan → run/stop → report → portable
4
+ replay workflow. Registry publication and isolated-install verification are
5
+ pending; this source record alone does not establish package availability.
6
+
7
+ ## Included behavior
8
+
9
+ - Hard case/environment failures stop calibration before any Agent invocation.
10
+ Warnings and offline unknowns remain explicit.
11
+ - Paired, trigger and calibration runs expose bounded machine-readable previews,
12
+ reviewed confirmation, task selection, deadlines and spending stop lines.
13
+ - Standalone checks and offline native/portable replay clean up verifier/oracle
14
+ process trees on SIGINT/SIGTERM. Original saved runs remain unchanged.
15
+ - Independent judge receipts preserve successful, failed and interrupted usage;
16
+ reports separate primary/judge/combined costs. Shared budgets count all roles.
17
+ - Native and portable single-arm evidence is audited without claiming paired
18
+ efficacy. Historical missing costs/runtime support stay unknown or explicitly
19
+ unsupported; no old receipts are rewritten.
20
+
21
+ The release also includes the shared planning, quoted-command/verifier-error,
22
+ single-arm report and offline Agent preflight work merged after npm 0.10.1.
23
+ See the [changelog](../../CHANGELOG.md), [planning guide](../eval-planning.md),
24
+ [cost contract](../eval-costs.md) and [portable package contract](../replay-packages.md).
25
+
26
+ ## Verification and boundaries
27
+
28
+ - `npm test`: 794 offline tests passed, with no failures or skipped tests.
29
+ - Bundled code-review/debugging and contributed bench checks passed offline.
30
+ - README code blocks match in both languages; local documentation/schema links
31
+ and the bundled driver Skill were checked.
32
+ - The [offline installed-feature recipe](0.11.0-feature-smoke.mjs) passed on the
33
+ extracted local archive, with seven feature groups, five moved replay packages,
34
+ eight synthetic invocations and zero network/model/Agent CLI calls. This does
35
+ not yet verify a registry installation.
36
+ - Three-platform remote CI, exact release archive, registry integrity/provenance
37
+ and an isolated installed-feature check remain delivery gates.
38
+
39
+ All implementation validation uses injected executors, fake HTTP and local
40
+ fixtures. Real model/Agent evaluation calls added: **0**. The statistical and
41
+ adoption policy is unchanged; evidence cannot automatically install or upgrade a
42
+ Skill. Offline environment checks cannot establish working authentication or
43
+ installed-version CLI flag compatibility.
44
+
45
+ Follow the existing [manual trusted-publishing procedure](trusted-publishing.md).
46
+ Publish once after its preview passes. An accepted upload followed by a registry
47
+ scan timeout is preserved and checked read-only, never uploaded again.
@@ -1,6 +1,8 @@
1
1
  # Portable offline evaluation packages
2
2
 
3
- skillfit 0.10.0 exports paired native runs without a judge to a fresh directory.
3
+ skillfit 0.10.0 introduced paired native exports without a judge. Source after
4
+ npm 0.10.1 also exports native calibration, trigger and paired runs with a judge
5
+ to a fresh directory.
4
6
  The package contains unchanged receipts, original pinned inputs, the compiled
5
7
  implementation used by the experiment and a dependency-free replay entry point.
6
8
  Export and replay make zero model calls. Replay executes trusted local verifiers.
@@ -28,6 +30,12 @@ the package does not install system dependencies. `--verify-only` checks invento
28
30
  hashes and source-plan binding without executing verifiers. Default replay uses
29
31
  the copied compiled CLI, grades temporary delivery copies and returns JSON. The
30
32
  last command above uses the currently installed CLI and the packaged bench.
33
+ `reproduce.mjs` forwards Ctrl+C/SIGINT and SIGTERM to the pinned CLI, waits for
34
+ its local verifier processes to stop, then exits 130 or 143. Saved evidence is
35
+ read-only during both successful and interrupted replay. The launcher uses the
36
+ original implementation's cancellation context, including for older paired report
37
+ dispatchers; runtimes predating that cancellation module cannot be exported by
38
+ this source version.
31
39
 
32
40
  The source must have sealed native evidence. A completed manifest must pass the
33
41
  native evidence audit. Missing, changed or linked native artifacts reject export.
@@ -51,7 +59,8 @@ overrides do not bypass validation of a new run's declared input archive.
51
59
 
52
60
  ## Contents and machine contract
53
61
 
54
- - `run/`: original native receipts, indices, plan, session and optional manifest.
62
+ - `run/`: original native receipts, indices, plan, session and optional manifest
63
+ or `_calibration.json`; judge runs also retain both review-call receipts.
55
64
  - `inputs/bench`, `inputs/target`, optional `inputs/baseline-skill` and
56
65
  `inputs/request.json`: matching frozen inputs.
57
66
  - `runtime/dist/`: unchanged compiled implementation. Minimal ESM package metadata
@@ -61,6 +70,9 @@ overrides do not bypass validation of a new run's declared input archive.
61
70
  The descriptor uses `schemaVersion: 1`, `kind: "skillfit.replay-package"`,
62
71
  `sourcePlanSha256`, `nativeStatus`, `hasManifest` and a relative-path-to-SHA-256
63
72
  `files` map. It inventories every payload file except itself and Git internals.
73
+ New exports add `evaluationType: "paired" | "calibration" | "trigger"`, checked
74
+ against the frozen native plan. Older v1 descriptors without that field remain
75
+ readable.
64
76
  Extra, changed, missing and unsafe paths fail verification. Checksums establish
65
77
  consistency with this index, not publisher identity; retain a trusted external
66
78
  copy of the descriptor or its hash for provenance.
@@ -85,10 +97,30 @@ spending and remain stopped/incomplete and ineligible. An offline replay reprodu
85
97
  saved outcomes and accounting; it creates no new observations, independent holdout
86
98
  or upgrade authorization. Statistical and acceptance policies are unchanged.
87
99
 
88
- Trigger runs and runs with a judge are currently excluded: their separate
89
- accounting is not covered by this paired native contract. Legacy/redacted public
90
- archives retain their dated replay recipes and cannot be relabeled as complete
91
- native exports.
100
+ Calibration and trigger exports verify the single-arm plan, session, ledger,
101
+ receipts, task summaries and available usage. Replay regrades saved deliveries in
102
+ temporary directories with the pinned local verifier. Trigger observations remain
103
+ the recorded `triggered` values: replay starts no Agent and does not attempt new
104
+ discovery detection. The report uses `evidence.scope: "single-arm-native"`;
105
+ `verified` establishes consistency of retained observations, never a paired
106
+ improvement or adoption decision. Standalone historical summaries without a
107
+ sealed native run cannot be replayed or promoted into native exports.
108
+ An older single-arm run whose pinned implementation predates replay support
109
+ cannot produce an executable replay package; export explains that limitation
110
+ instead of replacing the original implementation with newer code.
111
+
112
+ Paired judge exports require separately sealed review-call receipts and full
113
+ invocation accounting. Replay audits retained judge outputs, scores and costs;
114
+ it does not call the judge again. Primary Agent costs and additional judge costs
115
+ remain separate, with a combined invocation population. Historical judge runs
116
+ without those receipts retain unknown judge/combined costs in reports and cannot
117
+ claim a complete portable export.
118
+
119
+ Missing invocation receipts in stopped single-arm runs remain unknown usage;
120
+ available final and partial counters are retained as recorded. Replay cannot
121
+ turn partial usage into a complete total or invent unfinished task metrics.
122
+ Legacy/redacted public archives retain their dated replay recipes and cannot be
123
+ relabeled as complete native exports.
92
124
 
93
125
  Export only writes locally. It includes project files, prompts, outputs and paths;
94
126
  review those contents before sharing. Global configuration/Skill trees are not
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Skillfit offline Agent environment preflight version 1",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "kind", "scope", "status", "matrix", "checks", "summary", "cost"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 1 }, "kind": { "const": "skillfit.agent-preflight" },
8
+ "scope": { "const": "offline-agent-environment" }, "status": { "enum": ["ready", "blocked"] },
9
+ "matrix": { "type": "object", "required": ["schemaVersion", "verifiedAt"], "properties": {
10
+ "schemaVersion": { "type": "integer", "minimum": 1 }, "verifiedAt": { "type": "string" }
11
+ } },
12
+ "checks": { "type": "array", "minItems": 1, "items": {
13
+ "type": "object", "required": ["code", "role", "agent", "status", "message", "remediation", "paths"],
14
+ "properties": {
15
+ "code": { "enum": ["CLI_AVAILABLE", "MATRIX_CAPABILITY", "EXECUTOR_INJECTED", "AUTHENTICATION", "GLOBAL_SKILL_CONFLICT", "GLOBAL_SKILL_SCAN", "ENVIRONMENT_CHANGED"] },
16
+ "role": { "enum": ["agent", "judge"] }, "agent": { "type": ["string", "null"] },
17
+ "status": { "enum": ["PASS", "FAIL", "UNKNOWN", "INFO"] }, "message": { "type": "string" },
18
+ "remediation": { "type": ["string", "null"] }, "paths": { "type": "array", "items": { "type": "string" } }
19
+ },
20
+ "allOf": [{ "if": { "properties": { "code": { "const": "AUTHENTICATION" } } },
21
+ "then": { "properties": { "status": { "const": "UNKNOWN" }, "paths": { "maxItems": 0 } } } }]
22
+ } },
23
+ "summary": { "type": "object", "required": ["failures", "passed", "unknown", "info"], "properties": {
24
+ "failures": { "type": "integer", "minimum": 0 }, "passed": { "type": "integer", "minimum": 0 },
25
+ "unknown": { "type": "integer", "minimum": 0 }, "info": { "type": "integer", "minimum": 0 }
26
+ } },
27
+ "cost": { "type": "object", "required": ["modelCalls", "cliInvocations"], "properties": {
28
+ "modelCalls": { "const": 0 }, "cliInvocations": { "const": 0 }
29
+ } }
30
+ }
31
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Skillfit offline calibration plan version 1",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "kind", "planSha256", "implementationSha256", "bench", "agent", "executor", "inputMode", "trials", "plannedCalls", "maxCalls", "executorTimeoutSeconds", "runGroup", "runsRoot", "outputDir", "guardFiles", "agentPreflight", "casePreflight"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 1 }, "kind": { "const": "skillfit.calibration-plan" },
8
+ "planSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
9
+ "implementationSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
10
+ "bench": { "type": "object", "required": ["dir", "name", "sha256", "taskIds"] },
11
+ "agent": { "type": ["string", "null"] }, "executor": { "type": ["object", "null"] },
12
+ "inputMode": { "enum": ["snapshot", "workspace"] },
13
+ "trials": { "type": "integer", "minimum": 1, "maximum": 20 },
14
+ "plannedCalls": { "type": "integer", "minimum": 1 }, "maxCalls": { "type": "integer", "minimum": 1 },
15
+ "executorTimeoutSeconds": { "type": "integer", "minimum": 1, "maximum": 3600 },
16
+ "spendingBudget": { "type": "object", "required": ["input", "cachedInput", "uncachedInput", "output", "durationSeconds"] },
17
+ "runGroup": { "type": "string", "minLength": 1 }, "runsRoot": { "type": "string", "minLength": 1 }, "outputDir": { "type": "string", "minLength": 1 },
18
+ "guardFiles": { "type": "array" }, "agentPreflight": { "$ref": "agent-preflight.schema.json" },
19
+ "casePreflight": { "type": "object", "required": ["schemaVersion", "scope", "required", "status"],
20
+ "properties": { "schemaVersion": { "const": 1 }, "scope": { "const": "offline-case-integrity" }, "required": { "const": true }, "status": { "const": "pending" } } }
21
+ }
22
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Skillfit calibration command response version 1",
4
+ "anyOf": [
5
+ {
6
+ "type": "object", "required": ["schemaVersion", "kind", "status", "plan", "acceptance"],
7
+ "properties": {
8
+ "schemaVersion": { "const": 1 }, "kind": { "const": "skillfit.calibration-result" }, "status": { "const": "planned" },
9
+ "plan": { "$ref": "calibration-plan.schema.json" },
10
+ "acceptance": { "type": "object", "required": ["decision", "eligibleForUpgrade", "automaticUpgrade"],
11
+ "properties": { "decision": { "const": "inconclusive" }, "eligibleForUpgrade": { "const": false }, "automaticUpgrade": { "const": false } } }
12
+ }
13
+ },
14
+ { "$ref": "single-arm-report.schema.json" },
15
+ { "allOf": [{ "$ref": "eval-result.schema.json" }, { "properties": { "kind": { "const": "skillfit.eval-error" } } }] }
16
+ ]
17
+ }
@@ -6,7 +6,7 @@
6
6
  "required": ["schemaVersion", "baselineSkill", "candidateSkill", "bench", "agent", "purpose", "trials", "maxCalls", "runsRoot", "runGroup"],
7
7
  "properties": {
8
8
  "schemaVersion": { "const": 1 },
9
- "baselineSkill": { "$ref": "#/$defs/path" },
9
+ "baselineSkill": { "anyOf": [{ "$ref": "#/$defs/path" }, { "type": "null" }], "description": "Previous complete Skill directory, or explicit null for no Skill installed by the harness in baseline." },
10
10
  "candidateSkill": { "$ref": "#/$defs/path" },
11
11
  "bench": { "$ref": "#/$defs/path" },
12
12
  "agent": { "enum": ["codex", "claude-code", "kimi-code"] },
@@ -7,9 +7,10 @@
7
7
  "schemaVersion": { "const": 1 },
8
8
  "kind": { "enum": ["skillfit.eval-result", "skillfit.eval-error"] },
9
9
  "status": { "enum": ["planned", "completed", "stopped", "incomplete", "reported", "error"] },
10
- "plan": { "type": "object", "required": ["sha256", "request", "evaluation"] },
10
+ "plan": { "type": "object", "required": ["sha256", "evaluation"] },
11
11
  "manifest": { "type": ["object", "null"] },
12
12
  "casePreflight": { "anyOf": [{ "$ref": "eval-preflight.schema.json" }, { "type": "null" }] },
13
+ "agentPreflight": { "anyOf": [{ "$ref": "agent-preflight.schema.json" }, { "type": "null" }] },
13
14
  "inputSnapshot": {
14
15
  "type": ["object", "null"],
15
16
  "required": ["schemaVersion", "indexPath", "sha256", "cost"],
@@ -36,6 +37,7 @@
36
37
  }
37
38
  }
38
39
  },
40
+ "invocationCosts": { "anyOf": [{ "$ref": "invocation-costs.schema.json" }, { "type": "null" }] },
39
41
  "evidence": { "type": "object", "required": ["verified"] },
40
42
  "acceptance": {
41
43
  "type": "object", "required": ["decision", "eligibleForUpgrade", "automaticUpgrade"],
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Skillfit complete executor invocation costs version 1",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "agent", "judge", "total", "judgeUsage"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 1 },
8
+ "agent": { "$ref": "#/$defs/population" },
9
+ "judge": { "anyOf": [{ "$ref": "#/$defs/population" }, { "type": "null" }] },
10
+ "total": { "anyOf": [{ "$ref": "#/$defs/population" }, { "type": "null" }] },
11
+ "judgeUsage": { "enum": ["recorded", "unknown", "not-requested"] }
12
+ },
13
+ "$defs": {
14
+ "measure": {
15
+ "type": "object", "required": ["knownTotal", "coverage"],
16
+ "properties": {
17
+ "knownTotal": { "type": "number", "minimum": 0 },
18
+ "coverage": { "type": "object", "required": ["final", "partial", "unknown"],
19
+ "properties": { "final": { "type": "integer", "minimum": 0 }, "partial": { "type": "integer", "minimum": 0 }, "unknown": { "type": "integer", "minimum": 0 } } }
20
+ }
21
+ },
22
+ "population": {
23
+ "type": "object", "required": ["runs", "passes", "metrics"],
24
+ "properties": {
25
+ "runs": { "type": "integer", "minimum": 0 }, "passes": { "type": "integer", "minimum": 0 },
26
+ "metrics": { "type": "object", "required": ["input", "cachedInput", "uncachedInput", "output", "durationSeconds"],
27
+ "properties": { "input": { "$ref": "#/$defs/measure" }, "cachedInput": { "$ref": "#/$defs/measure" }, "uncachedInput": { "$ref": "#/$defs/measure" }, "output": { "$ref": "#/$defs/measure" }, "durationSeconds": { "$ref": "#/$defs/measure" } } }
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Skillfit independent judge call receipt version 1",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "kind", "taskId", "trial", "callIndex", "seed", "firstCondition", "prompt", "promptSha256", "output", "rawOutput", "executor", "startedAt", "finishedAt", "timing", "scores", "error", "executorInvoked", "tokens", "usageStatus", "durationSeconds", "passed"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 1 }, "kind": { "const": "skillfit.judge-call" },
8
+ "taskId": { "type": "string" }, "trial": { "type": "integer", "minimum": 1, "maximum": 20 },
9
+ "callIndex": { "enum": [1, 2] }, "firstCondition": { "enum": ["baseline", "treatment"] },
10
+ "seed": { "type": "string" }, "executor": { "type": "object", "required": ["kind", "model"] },
11
+ "startedAt": { "type": "string", "format": "date-time" }, "finishedAt": { "type": "string", "format": "date-time" },
12
+ "timing": { "type": "object", "required": ["clock", "wallDurationSeconds", "execution"],
13
+ "properties": { "clock": { "const": "performance.now" }, "wallDurationSeconds": { "type": "number" }, "execution": { "type": ["object", "null"] } } },
14
+ "scores": { "type": ["object", "null"], "required": ["baseline", "treatment"],
15
+ "properties": { "baseline": { "type": "integer", "minimum": 0, "maximum": 3 }, "treatment": { "type": "integer", "minimum": 0, "maximum": 3 } } },
16
+ "prompt": { "type": "string" }, "promptSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
17
+ "output": { "type": "string" }, "rawOutput": { "type": ["string", "null"] },
18
+ "error": { "type": ["string", "null"] }, "executorInvoked": { "type": "boolean" },
19
+ "tokens": { "type": ["object", "null"] }, "usageStatus": { "enum": ["final", "partial", "unknown"] },
20
+ "durationSeconds": { "type": "number", "minimum": 0 }, "passed": { "type": "boolean" }
21
+ }
22
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Skillfit calibration and trigger report version 1",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "kind", "evaluationType", "status", "runGroup", "summary", "evidence", "acceptance", "usage"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 1 }, "kind": { "enum": ["skillfit.calibration-report", "skillfit.trigger-report"] },
8
+ "evaluationType": { "enum": ["calibration", "trigger"] },
9
+ "status": { "enum": ["completed", "stopped", "incomplete", "reported"] },
10
+ "runGroup": { "type": "string" }, "summary": { "type": ["object", "null"] },
11
+ "session": { "type": ["object", "null"] }, "usage": { "type": ["object", "null"] },
12
+ "evidence": { "type": "object", "required": ["verified", "scope", "reasons"] },
13
+ "agentPreflight": { "anyOf": [{ "$ref": "agent-preflight.schema.json" }, { "type": "null" }] },
14
+ "acceptance": { "type": "object", "required": ["decision", "eligibleForUpgrade", "automaticUpgrade"],
15
+ "properties": { "decision": { "const": "inconclusive" }, "eligibleForUpgrade": { "const": false }, "automaticUpgrade": { "const": false } } }
16
+ },
17
+ "allOf": [
18
+ { "if": { "properties": { "evaluationType": { "const": "calibration" } } }, "then": { "properties": { "kind": { "const": "skillfit.calibration-report" } } }, "else": { "properties": { "kind": { "const": "skillfit.trigger-report" } } } }
19
+ ]
20
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Skillfit verifier infrastructure error version 1",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "kind", "message"],
6
+ "properties": {
7
+ "schemaVersion": { "const": 1 },
8
+ "kind": { "const": "skillfit.verifier-error" },
9
+ "message": { "type": "string", "minLength": 1, "pattern": "\\S" }
10
+ }
11
+ }
@@ -5,6 +5,9 @@ For a complete portable directory of a paired native run without a judge, use
5
5
  The [portable package guide](replay-packages.md) covers checksums, matching source
6
6
  recovery, offline replay, stopped costs and review of private project contents.
7
7
  The Markdown report below is a shorter summary, without the full replay inputs.
8
+ Version 0.11.0 also reads calibration and trigger summaries with separate
9
+ states/metrics and JSON kinds; see [report types](evaluation-reports.md#calibration-and-trigger-reports-source-after-npm-0101).
10
+ They are descriptive single-arm reports and do not enable paired portable exports.
8
11
 
9
12
  Try a clearly synthetic schema-v4 example first:
10
13
 
@@ -0,0 +1,99 @@
1
+ # Verifier commands and infrastructure errors
2
+
3
+ Version 0.11.0 fixes quoted command arguments and separates recognized
4
+ grader infrastructure errors from normal task failures. Build the current
5
+ checkout to use these changes. The bench format remains schema version 1.
6
+
7
+ ## Commands with spaces
8
+
9
+ `verifier` and `oracle` use the same shell-free argument parser in bench loading,
10
+ offline probes, evaluation, calibration, trigger trials and replay. For example:
11
+
12
+ ```json
13
+ {
14
+ "verifier": "node \"verifiers/check answer.mjs\" \"two words\"",
15
+ "oracle": "node 'ground-truth/repair answer.mjs'"
16
+ }
17
+ ```
18
+
19
+ Single/double quotes group arguments and are removed before spawning. Empty
20
+ quoted arguments are preserved. Outside quotes, a backslash can escape whitespace
21
+ or a quote; inside double quotes it can escape a double quote. Other backslashes,
22
+ including Windows drive/UNC separators, are preserved. Single quotes preserve all
23
+ backslashes literally; use them for a Windows directory ending in a backslash.
24
+ Adjacent quoted/unquoted fragments form one argument. Unclosed quotes, NULs and
25
+ empty executables fail before spawning. Quoted relative file paths retain the
26
+ same bench-boundary checks; quoting cannot permit `../` traversal.
27
+
28
+ The first argument is an executable name or a relative path inside the bench;
29
+ file-bearing tokens retain the existing relative-path validation. The harness appends the absolute
30
+ trial directory as one final argument and sets the bench root as working directory.
31
+ It performs no shell expansion: `$VAR`, command substitutions, pipes and control
32
+ operators are literal arguments. Use the existing generated `--verifier-cmd`
33
+ wrapper when shell behavior is deliberately needed; read trusted bench code
34
+ before executing it. This parser does not make untrusted verifiers safe.
35
+
36
+ ## A failure is a grade; an infrastructure error is not
37
+
38
+ For a functioning verifier, exit 0 means pass and a nonzero exit means task
39
+ failure. JSON `passed`/named checks remain informational/graded signals; they do
40
+ not override that exit-code authority. Legacy exit-only graders and assertion/
41
+ test-suite failures retain this behavior.
42
+
43
+ The shared runner additionally recognizes these infrastructure errors:
44
+
45
+ | Diagnostic | Meaning |
46
+ | --- | --- |
47
+ | `VERIFIER_COMMAND_ERROR` | Command tokenization failed before execution |
48
+ | `VERIFIER_RUNTIME_ERROR` | Direct Node uncaught load/syntax/runtime exception attributable to bench code |
49
+ | `VERIFIER_REPORTED_ERROR` | The verifier explicitly reported an infrastructure failure |
50
+ | `VERIFIER_PROTOCOL_ERROR` | An explicit infrastructure-error message was malformed |
51
+ | Existing process errors | Cannot spawn, missing exit code, timeout, interruption or output overflow |
52
+
53
+ Automatic Node classification is conservative: it needs an uncaught Node
54
+ diagnostic and a bench-owned source/import/stack location. A candidate workspace
55
+ load/syntax/runtime failure remains a task failure. Assertion failures and a
56
+ wrapper's final normal JSON grade of a child failure are also preserved. A
57
+ summary printed before an uncaught grader exception cannot hide that exception.
58
+ Available process exit codes and raw output are retained even for errors.
59
+
60
+ An arbitrary nonzero exit cannot reliably identify whether any custom runtime
61
+ failed to grade or graded an incorrect solution. For other runtimes, caught
62
+ exceptions or ambiguous diagnostics, report infrastructure errors explicitly:
63
+
64
+ ```json
65
+ {"schemaVersion":1,"kind":"skillfit.verifier-error","message":"Required grader tool could not be started."}
66
+ ```
67
+
68
+ Print this as its own JSON line. `message` must contain non-whitespace text; see
69
+ the [schema](schemas/verifier-error.schema.json). This declaration makes the
70
+ result an error regardless of its exit code or other summaries. Existing normal
71
+ summaries such as `{"passed":false,"error":"missing _output.md"}` keep their
72
+ legacy meaning. Catch candidate failures and emit a normal verdict; reserve the
73
+ explicit error message for failures of the grader/environment itself. Generated
74
+ shell-command wrappers now report their own spawn/signal/missing-status errors
75
+ through this channel; they still forward ordinary command exit codes.
76
+
77
+ ## Effect on checks, costs and replay
78
+
79
+ An infrastructure error fails the relevant offline gate, including original,
80
+ missing/empty-output, mock and oracle probes. It cannot satisfy a NOP gate just
81
+ by exiting nonzero. Live case preflight blocks calls even without an oracle;
82
+ absence of an oracle remains a separate unknown, not an automatic failure.
83
+ `bench check --json` retains `evidence.error`, raw output and the real numeric
84
+ `exitCode` when available, plus the existing gate code and remediation.
85
+
86
+ After an invoked evaluation, grader errors set the trial's `error`, leave its
87
+ grade/checks unavailable and exclude its entire pair from quality statistics.
88
+ Trigger errors likewise stay out of trigger rates. Agent tokens, final/partial/
89
+ unknown coverage, output and elapsed spending remain in invocation receipts and
90
+ all-invocation accounting. Existing spending guards stop further budgeted calls
91
+ on such an error. Normal graded failures still count toward rates and costs.
92
+ The paired statistics, acceptance thresholds and adoption restrictions do not
93
+ change.
94
+
95
+ Current offline replay rejects a verifier infrastructure error even if its exit
96
+ code matches a saved task failure. It does not rewrite original receipts or
97
+ backfill historical grades. Portable packages retain their pinned compiled
98
+ implementation and its original interpretation; record which implementation
99
+ was used when comparing a current audit with an older package.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillfit",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Evidence-driven configuration for AI coding agents: measure which skills, rules and MCP servers actually help — then install only those.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,8 +10,11 @@ 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.10.0 --version`, or `node dist/cli.js --version` inside a clone.
13
+ Check availability with `npx skillfit@0.11.0 --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
+ The complete planning, calibration, judge-cost and replay workflow below requires
16
+ 0.11.0 or newer. Use a built checkout while that version awaits registry availability;
17
+ the immutable npm 0.10.1 package does not contain these additions.
15
18
 
16
19
  ## Which command for which question
17
20
 
@@ -19,31 +22,49 @@ If neither works, tell the user to install from https://github.com/remote-contro
19
22
  |---|---|
20
23
  | "我的 skill 有没有被用到 / are my skills used at all" | `skillfit report` — read-only, free, instant; start here |
21
24
  | "这个配置健不健康" | `skillfit doctor` — read-only |
22
- | "这个 skill 值不值得装 / does this skill help" | `skillfit eval <skill-path> --bench <bench> --agent <id> --trials 3` |
25
+ | "这个 skill 值不值得装 / does this skill help" | Preview `skillfit eval <skill-path> --bench <bench> --agent <id> --trials 3 --dry-run`, then run within authorized spending |
23
26
  | "新版 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/main/docs/eval-component.md) for inputs and acceptance policy |
24
27
  | "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 |
25
28
  | "这个 MCP 能不能连上 / is this MCP catalog valid" | `skillfit mcp check <probe.json>` — read-only discovery; calls no tools |
26
- | "这个 MCP / AGENTS.md 真的有帮助吗" | `skillfit eval <experiment-dir> --bench <bench> --agent <id> --trials 3`; follow the [configuration experiment guide](https://github.com/remote-controlled-man/skillfit/blob/main/docs/config-experiments.md) |
29
+ | "这个 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/main/docs/config-experiments.md) |
27
30
  | "建一个 bench" | `skillfit bench init [dir]` then `skillfit bench check [dir]` |
28
31
  | "做代码修改 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 |
29
- | "给 Agent 看 case 校验失败原因" | `bench check <dir> --json` — offline gate IDs, evidence and remediation; rejects calibration |
32
+ | "给 Agent 看 case 校验失败原因" | `bench check <dir> --json` — offline gate IDs, evidence and remediation; this is the integrity result, not calibration |
33
+ | "先测 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 |
30
34
  | "查看或管理 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` |
31
- | "只测几个 case" | Repeat `eval --task <id>` or set request `taskIds`; preview the selected budget and keep validation independent |
35
+ | "只测几个 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 |
32
36
  | "把结果交给另一台机器复现" | 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/main/docs/replay-packages.md) for matching inputs, stopped costs and sharing review |
33
37
  | "把这次翻车存成任务" | `skillfit bench add <bench> --freeze --task <id> --prompt "..." --verifier-cmd "<cmd>"` |
34
38
  | "帮我起草 verifier" | same but `--decompose --agent <id>` — an agent drafts verifier + oracle; admitted only if the NOP + oracle gates pass |
35
39
 
36
40
  Executor choice: `--agent kimi-code` or `--agent codex` drives the local CLI (no API key needed).
37
- Without `--agent`, eval needs `SKILLFIT_API_KEY`/`OPENAI_API_KEY`. Trigger mode currently verified for
41
+ It uses that CLI's authentication; offline preflight cannot confirm login.
42
+ Without `--agent`, paired eval needs `SKILLFIT_API_KEY`/`OPENAI_API_KEY`. Trigger mode currently verified for
38
43
  kimi-code and codex only.
39
44
 
40
45
  ## Spend discipline
41
46
 
42
- Real eval runs cost tokens and time. Before any non-dry-run eval:
47
+ Real eval and calibration runs cost tokens and time. Before any non-dry-run run:
43
48
 
44
49
  1. Run with `--dry-run` and show planned calls (selected tasks × trials × conditions, plus enabled judges).
45
50
  2. State the call ceiling and known cost limits. Continue within existing spending authorization; ask only when the proposed run exceeds it or spending has not been authorized.
46
51
 
52
+ Version 0.11.0 supports JSON preview/confirmation, fixed task selection,
53
+ five-field spending limits and executor timeouts for ordinary eval, trigger and
54
+ calibration. JSON execution needs the same explicit fresh `--run-group` and
55
+ exact preview hash: `plan.sha256` for eval, `plan.planSha256` for calibration.
56
+ Dry previews execute no verifier/oracle/agent. Inspect the environment's nested
57
+ `status`: a generated `planned` result can still be blocked by a missing CLI.
58
+ Login always remains offline unknown. Live calibration/eval block hard case or
59
+ environment failures; warnings and unknown evidence are not interchangeable.
60
+ See [shared planning](https://github.com/remote-controlled-man/skillfit/blob/main/docs/eval-planning.md).
61
+
62
+ Calibration has one no-Skill baseline arm and defaults to two trials; trigger
63
+ has one installed arm, defaults to five and skips unlabeled selected tasks.
64
+ Retain positive and negative labels for trigger measurement. Trigger already
65
+ uses on-disk files; omit `--input`, paired order and judge options. A small
66
+ development mechanism check cannot become independent validation by renaming it.
67
+
47
68
  ## Interpretation discipline (do not skip)
48
69
 
49
70
  For request-based eval, review the JSON plan and its call ceiling, then execute with
@@ -65,6 +86,12 @@ Missing usage or an incomplete batch cannot authorize adoption under either obje
65
86
  Optional request `spendingBudget` (0.10.0+) sets five whole-batch stop lines;
66
87
  reaching a line or losing complete final usage stops subsequent calls. An in-flight
67
88
  call can overshoot; do not treat it as a provider hard cap or retry permission.
89
+ In version 0.11.0, those stops include optional ordinary-eval judge calls.
90
+ Read separate Agent/judge/total `invocationCosts` and coverage; older missing
91
+ judge receipts remain unknown. An explicitly enabled API judge without
92
+ credentials fails instead of silently disabling judging. Ctrl+C/SIGTERM stop
93
+ managed work and retain records; do not retry, replace or expand stopped calls
94
+ without a fresh authorized plan.
68
95
 
69
96
  - Read the verdict line, the discordant-pair counts, and the CI — not just the delta. `inconclusive` means
70
97
  the run cannot tell, not that the skill is useless.
@@ -73,7 +100,13 @@ call can overshoot; do not treat it as a provider hard cap or retry permission.
73
100
  0pp delta as a finding.
74
101
  - Trigger mode: report recall and false-trigger rate separately, with their CIs. A skill that never fires
75
102
  has zero realized value regardless of content quality.
76
- - Always cite the manifest path (`runs/<group>/manifest.json`) so the user can audit.
103
+ - Cite the actual native run and summary path: paired/trigger `manifest.json`,
104
+ calibration `_calibration.json`, or retained session/receipts for a stopped run.
105
+ - Source supports native audit, offline delivery replay and portable export for
106
+ supported sealed calibration/trigger and new judge runs. Historical standalone
107
+ summaries stay unverified; missing receipts/runtime support cannot be fabricated.
108
+ Replay preserves observations and cannot authorize single-arm adoption or prove
109
+ independent validation. Paired `--policy`/`--records` do not apply to single-arm reports.
77
110
  - Full metric definitions: `docs/metrics.md` in the skillfit repo.
78
111
 
79
112
  ## Safety