skillfit 0.10.1 → 0.12.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 (118) hide show
  1. package/README.md +43 -8
  2. package/README.zh-CN.md +43 -8
  3. package/benches/README.md +6 -2
  4. package/dist/cli.js +153 -37
  5. package/dist/cli.test.js +94 -0
  6. package/dist/commands/bench-calibration.js +201 -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-draft.js +167 -0
  10. package/dist/commands/bench-draft.test.js +168 -0
  11. package/dist/commands/bench-manage.js +5 -4
  12. package/dist/commands/bench-source.js +101 -0
  13. package/dist/commands/bench-source.test.js +84 -0
  14. package/dist/commands/bench.js +227 -245
  15. package/dist/commands/bench.test.js +7 -3
  16. package/dist/commands/calibration-cli.test.js +145 -0
  17. package/dist/commands/eval-agent-preflight.test.js +269 -0
  18. package/dist/commands/eval-api-failure.test.js +46 -0
  19. package/dist/commands/eval-cli-usage.test.js +75 -0
  20. package/dist/commands/eval-cli.js +31 -0
  21. package/dist/commands/eval-component.js +52 -28
  22. package/dist/commands/eval-export-modes.test.js +350 -0
  23. package/dist/commands/eval-export.js +12 -4
  24. package/dist/commands/eval-interruption.test.js +26 -1
  25. package/dist/commands/eval-layout.test.js +126 -0
  26. package/dist/commands/eval-plan.js +37 -0
  27. package/dist/commands/eval-preflight.test.js +144 -1
  28. package/dist/commands/eval-report.js +18 -3
  29. package/dist/commands/eval-single-arm-replay.js +21 -0
  30. package/dist/commands/eval-single-arm-report.js +223 -0
  31. package/dist/commands/eval.js +113 -88
  32. package/dist/commands/evaluation-report.js +5 -0
  33. package/dist/commands/evaluation-report.test.js +243 -0
  34. package/dist/commands/npm-first-run.test.js +74 -0
  35. package/dist/commands/replay-cancellation.test.js +105 -0
  36. package/dist/commands/workflow-entrypoints.test.js +137 -0
  37. package/dist/harness/agent-preflight.js +196 -0
  38. package/dist/harness/bench-location.js +29 -0
  39. package/dist/harness/bench-location.test.js +33 -0
  40. package/dist/harness/bench.js +10 -4
  41. package/dist/harness/command.js +49 -0
  42. package/dist/harness/eval-audit.js +162 -17
  43. package/dist/harness/eval-budget.js +46 -2
  44. package/dist/harness/eval-budget.test.js +26 -1
  45. package/dist/harness/eval-component.test.js +163 -0
  46. package/dist/harness/eval-contract.js +11 -5
  47. package/dist/harness/evaluation-layout.js +30 -0
  48. package/dist/harness/executors/api.js +24 -10
  49. package/dist/harness/executors/api.test.js +57 -0
  50. package/dist/harness/executors/cli.js +15 -25
  51. package/dist/harness/executors/cli.test.js +33 -2
  52. package/dist/harness/experiment-session.js +23 -25
  53. package/dist/harness/experiment-session.test.js +8 -0
  54. package/dist/harness/hash.js +3 -1
  55. package/dist/harness/invocation-costs.js +72 -0
  56. package/dist/harness/judge-accounting.test.js +216 -0
  57. package/dist/harness/judge-audit.js +56 -0
  58. package/dist/harness/judge.js +86 -21
  59. package/dist/harness/replay-package.js +71 -5
  60. package/dist/harness/runner.js +44 -33
  61. package/dist/harness/runner.test.js +23 -0
  62. package/dist/harness/single-arm-audit.js +436 -0
  63. package/dist/harness/trigger.js +22 -4
  64. package/dist/harness/trigger.test.js +12 -0
  65. package/dist/harness/verifier-error.js +65 -0
  66. package/dist/harness/verifier-timeout.js +8 -0
  67. package/dist/harness/verifier-timeout.test.js +76 -0
  68. package/dist/harness/verifier.test.js +128 -0
  69. package/docs/bench-authoring.md +57 -12
  70. package/docs/bench-check-json.md +28 -5
  71. package/docs/bench-drafting.md +75 -0
  72. package/docs/case-management.md +12 -1
  73. package/docs/eval-agent-preflight.md +114 -0
  74. package/docs/eval-case-preflight.md +5 -0
  75. package/docs/eval-component.md +38 -10
  76. package/docs/eval-costs.md +70 -0
  77. package/docs/eval-planning.md +167 -0
  78. package/docs/evaluation-input-snapshots.md +22 -5
  79. package/docs/evaluation-interruption.md +22 -10
  80. package/docs/evaluation-reports.md +97 -3
  81. package/docs/experiment-workflow.md +7 -0
  82. package/docs/first-real-eval.md +75 -3
  83. package/docs/growth-roadmap-2026-10.md +51 -10
  84. package/docs/metrics.md +40 -3
  85. package/docs/plans/2026-10-17-workflow-foundations.md +99 -0
  86. package/docs/releases/0.10.1-ci-registry-install.json +70 -0
  87. package/docs/releases/0.10.1-feature-smoke.json +28 -0
  88. package/docs/releases/0.10.1-local-registry-install.json +60 -0
  89. package/docs/releases/0.10.1-registry-metadata.json +33 -0
  90. package/docs/releases/0.10.1-signatures.txt +7 -0
  91. package/docs/releases/0.10.1-verification.json +90 -0
  92. package/docs/releases/0.10.1.md +37 -4
  93. package/docs/releases/0.11.0-ci-registry-install.json +130 -0
  94. package/docs/releases/0.11.0-feature-smoke.json +1576 -0
  95. package/docs/releases/0.11.0-feature-smoke.mjs +224 -0
  96. package/docs/releases/0.11.0-local-attempt-1.json +24 -0
  97. package/docs/releases/0.11.0-local-attempt-1.log +19 -0
  98. package/docs/releases/0.11.0-local-registry-install.json +25 -0
  99. package/docs/releases/0.11.0-registry-metadata.json +33 -0
  100. package/docs/releases/0.11.0-signatures.txt +12 -0
  101. package/docs/releases/0.11.0-verification.json +95 -0
  102. package/docs/releases/0.11.0.md +90 -0
  103. package/docs/releases/0.12.0-feature-smoke.mjs +73 -0
  104. package/docs/releases/0.12.0.md +68 -0
  105. package/docs/replay-packages.md +38 -6
  106. package/docs/schemas/agent-preflight.schema.json +31 -0
  107. package/docs/schemas/calibration-plan.schema.json +22 -0
  108. package/docs/schemas/calibration-result.schema.json +17 -0
  109. package/docs/schemas/eval-request.schema.json +1 -1
  110. package/docs/schemas/eval-result.schema.json +3 -1
  111. package/docs/schemas/invocation-costs.schema.json +31 -0
  112. package/docs/schemas/judge-call.schema.json +22 -0
  113. package/docs/schemas/single-arm-report.schema.json +20 -0
  114. package/docs/schemas/verifier-error.schema.json +11 -0
  115. package/docs/sharing-results.md +3 -0
  116. package/docs/verifier-contract.md +108 -0
  117. package/package.json +1 -1
  118. package/skills/skillfit/SKILL.md +61 -8
@@ -0,0 +1,68 @@
1
+ # skillfit 0.12.0
2
+
3
+ This release combines the new-user workflow fixes in
4
+ [PR #39](https://github.com/remote-controlled-man/skillfit/pull/39) and the case-authoring
5
+ fixes in [PR #40](https://github.com/remote-controlled-man/skillfit/pull/40).
6
+ Publication uses the existing [manual OIDC procedure](trusted-publishing.md).
7
+ This preparation record does not itself establish npm availability; verified publication
8
+ receipts will be recorded below after the accepted archive is available.
9
+
10
+ ## Preparation validation
11
+
12
+ - `npm test`: 835 offline tests passed, with no failures, cancellations or skips.
13
+ - Contributed bench checks, changed documentation links, matching English/Chinese
14
+ README code blocks and driver Skill validation passed.
15
+ - The local extracted archive passed the pinned seven-group foundations recipe,
16
+ five moved portable replays, 29 packaged regressions and separate installed CLI
17
+ stream success/failure probes. All executors and HTTP responses were synthetic;
18
+ real model/API/Agent CLI invocations added: **0**.
19
+ - An initial local installed-only recipe selected a source-architecture assertion
20
+ that requires intentionally unshipped TypeScript. That assertion remains in the
21
+ full source suite; the corrected installed recipe verifies the actual stream
22
+ runtime directly. The failed local archive/logs remain separate from the new
23
+ successful attempt; no publication was attempted by either local check.
24
+
25
+ ## Included behavior
26
+
27
+ - Git-root benches have matching content fingerprints and input snapshots. Invalid
28
+ output locations, including directory aliases, fail during preview and setup.
29
+ - Ordinary CLI eval and judge calls retain structured token/cache usage separately
30
+ from trigger detection. Known unsupported strict budgets block before calls.
31
+ - API answer-format/HTTP failures retain reported counters and public response
32
+ evidence. Missing usage remains unknown; no historical costs are backfilled.
33
+ - Read-only bench commands, eval and calibration share bundled/local resolution.
34
+ npm-first instructions and the driver Skill describe the installed workflow.
35
+ - Frozen cases never fall back from an empty/broken Git index. Non-Git imports
36
+ require explicit `--include`; selected links and destination-bench files fail.
37
+ Imports are bounded at 200 files / 1 MiB; narrow larger fixtures before importing.
38
+ - `--decompose` confirms before its single call and supports budgets, deadlines and
39
+ fresh record groups. Inputs, public outputs, costs and failed/interrupted gates
40
+ remain available. Concurrent bench edits are preserved; there is no automatic retry.
41
+ - Optional `verifierTimeoutSeconds` (integer 1–3600, default 120) applies to each
42
+ verifier/oracle process in checks, eval, calibration, trigger mode and replay.
43
+
44
+ ## Compatibility and limits
45
+
46
+ Non-Git `--freeze` now requires explicit `--include` selections. This intentional
47
+ restriction prevents silently capturing arbitrary local files. Tracked secrets or
48
+ files deliberately included outside Git still need review before sharing.
49
+ Existing cases retain their 120-second check limit unless configured otherwise.
50
+
51
+ Spending limits are observed stop lines; a single in-flight call may overshoot.
52
+ Missing provider usage cannot be reconstructed. Offline preflight does not prove
53
+ login or installed CLI flag compatibility. Statistical and adoption policy is
54
+ unchanged. This release adds no real Skill efficacy observations, model calls,
55
+ runtime dependencies or automatic upgrade permission.
56
+
57
+ ## Reproduce installed checks
58
+
59
+ ```bash
60
+ node docs/releases/0.12.0-feature-smoke.mjs /absolute/path/to/node_modules/skillfit /tmp/skillfit-0.12.0-feature-smoke
61
+ ```
62
+
63
+ The recipe pins and derives the unchanged 0.11.0 foundations recipe for 0.12.0,
64
+ then runs the packaged offline regressions for the new fixes. It uses injected
65
+ executors, fake HTTP and synthetic fixture programs; it never evaluates a real
66
+ model or Agent CLI. Use a fresh output directory and preserve failed attempts.
67
+ The immutable npm archive contains this preparation record; repository records
68
+ can later append registry verification for that same accepted archive.
@@ -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", "USAGE_CAPABILITY"] },
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,108 @@
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
+ Version 0.12.0 supports optional task field `verifierTimeoutSeconds` (integer 1–3600,
39
+ default 120). It bounds each verifier/oracle command in checks, preflight, evaluation, calibration,
40
+ trigger mode and offline regrading, using the frozen bench's value during replay. Set it with
41
+ `bench add --verifier-timeout-seconds <n>` or
42
+ `bench edit <dir> <id> --set verifierTimeoutSeconds=<n> --yes`; use
43
+ `--unset verifierTimeoutSeconds` to restore the default. This does not change the model's
44
+ `--executor-timeout-seconds`. A timed-out grader remains an infrastructure error with retained
45
+ agent usage, not a failed model answer. Old benches keep their previous limit.
46
+
47
+ For a functioning verifier, exit 0 means pass and a nonzero exit means task
48
+ failure. JSON `passed`/named checks remain informational/graded signals; they do
49
+ not override that exit-code authority. Legacy exit-only graders and assertion/
50
+ test-suite failures retain this behavior.
51
+
52
+ The shared runner additionally recognizes these infrastructure errors:
53
+
54
+ | Diagnostic | Meaning |
55
+ | --- | --- |
56
+ | `VERIFIER_COMMAND_ERROR` | Command tokenization failed before execution |
57
+ | `VERIFIER_RUNTIME_ERROR` | Direct Node uncaught load/syntax/runtime exception attributable to bench code |
58
+ | `VERIFIER_REPORTED_ERROR` | The verifier explicitly reported an infrastructure failure |
59
+ | `VERIFIER_PROTOCOL_ERROR` | An explicit infrastructure-error message was malformed |
60
+ | Existing process errors | Cannot spawn, missing exit code, timeout, interruption or output overflow |
61
+
62
+ Automatic Node classification is conservative: it needs an uncaught Node
63
+ diagnostic and a bench-owned source/import/stack location. A candidate workspace
64
+ load/syntax/runtime failure remains a task failure. Assertion failures and a
65
+ wrapper's final normal JSON grade of a child failure are also preserved. A
66
+ summary printed before an uncaught grader exception cannot hide that exception.
67
+ Available process exit codes and raw output are retained even for errors.
68
+
69
+ An arbitrary nonzero exit cannot reliably identify whether any custom runtime
70
+ failed to grade or graded an incorrect solution. For other runtimes, caught
71
+ exceptions or ambiguous diagnostics, report infrastructure errors explicitly:
72
+
73
+ ```json
74
+ {"schemaVersion":1,"kind":"skillfit.verifier-error","message":"Required grader tool could not be started."}
75
+ ```
76
+
77
+ Print this as its own JSON line. `message` must contain non-whitespace text; see
78
+ the [schema](schemas/verifier-error.schema.json). This declaration makes the
79
+ result an error regardless of its exit code or other summaries. Existing normal
80
+ summaries such as `{"passed":false,"error":"missing _output.md"}` keep their
81
+ legacy meaning. Catch candidate failures and emit a normal verdict; reserve the
82
+ explicit error message for failures of the grader/environment itself. Generated
83
+ shell-command wrappers now report their own spawn/signal/missing-status errors
84
+ through this channel; they still forward ordinary command exit codes.
85
+
86
+ ## Effect on checks, costs and replay
87
+
88
+ An infrastructure error fails the relevant offline gate, including original,
89
+ missing/empty-output, mock and oracle probes. It cannot satisfy a NOP gate just
90
+ by exiting nonzero. Live case preflight blocks calls even without an oracle;
91
+ absence of an oracle remains a separate unknown, not an automatic failure.
92
+ `bench check --json` retains `evidence.error`, raw output and the real numeric
93
+ `exitCode` when available, plus the existing gate code and remediation.
94
+
95
+ After an invoked evaluation, grader errors set the trial's `error`, leave its
96
+ grade/checks unavailable and exclude its entire pair from quality statistics.
97
+ Trigger errors likewise stay out of trigger rates. Agent tokens, final/partial/
98
+ unknown coverage, output and elapsed spending remain in invocation receipts and
99
+ all-invocation accounting. Existing spending guards stop further budgeted calls
100
+ on such an error. Normal graded failures still count toward rates and costs.
101
+ The paired statistics, acceptance thresholds and adoption restrictions do not
102
+ change.
103
+
104
+ Current offline replay rejects a verifier infrastructure error even if its exit
105
+ code matches a saved task failure. It does not rewrite original receipts or
106
+ backfill historical grades. Portable packages retain their pinned compiled
107
+ implementation and its original interpretation; record which implementation
108
+ 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.12.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.12.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
+ Use 0.12.0 or newer for the complete workflow below, including Git-bench/layout,
16
+ ordinary CLI costs, API-failure evidence, bundled names and recorded case drafting.
17
+ Earlier versions lack some of these fixes; inspect the installed version before using new flags.
15
18
 
16
19
  ## Which command for which question
17
20
 
@@ -19,31 +22,63 @@ 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> --mode installed --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
 
45
+ Installed mode delivers the complete Skill; default inject mode measures injected
46
+ text. Version 0.12.0 shares bundled-name resolution for read-only bench
47
+ commands and eval; local paths win. Editing still needs an owned local directory.
48
+ Git-root benches are supported in 0.12.0, with metadata excluded consistently.
49
+ Keep `--runs-root` outside the bench/Skill/runtime and Git metadata; bad layouts
50
+ are rejected at preview, including aliases. See the
51
+ [first-run guide](https://github.com/remote-controlled-man/skillfit/blob/main/docs/first-real-eval.md).
52
+
53
+ In 0.12.0, `--freeze` selects tracked ordinary files inside Git; outside Git,
54
+ explicit `--include <file-or-dir>` selections are required. Narrow large fixtures
55
+ before importing. For `--decompose`, preview and authorize its single call within
56
+ existing spending permission. Failed/interrupted drafts retain costs and inputs;
57
+ never retry implicitly. See [drafting records](https://github.com/remote-controlled-man/skillfit/blob/main/docs/bench-drafting.md).
58
+
40
59
  ## Spend discipline
41
60
 
42
- Real eval runs cost tokens and time. Before any non-dry-run eval:
61
+ Real eval and calibration runs cost tokens and time. Before any non-dry-run run:
43
62
 
44
63
  1. Run with `--dry-run` and show planned calls (selected tasks × trials × conditions, plus enabled judges).
45
64
  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
65
 
66
+ Version 0.11.0 supports JSON preview/confirmation, fixed task selection,
67
+ five-field spending limits and executor timeouts for ordinary eval, trigger and
68
+ calibration. JSON execution needs the same explicit fresh `--run-group` and
69
+ exact preview hash: `plan.sha256` for eval, `plan.planSha256` for calibration.
70
+ Dry previews execute no verifier/oracle/agent. Inspect the environment's nested
71
+ `status`: a generated `planned` result can still be blocked by a missing CLI.
72
+ Login always remains offline unknown. Live calibration/eval block hard case or
73
+ environment failures; warnings and unknown evidence are not interchangeable.
74
+ See [shared planning](https://github.com/remote-controlled-man/skillfit/blob/main/docs/eval-planning.md).
75
+
76
+ Calibration has one no-Skill baseline arm and defaults to two trials; trigger
77
+ has one installed arm, defaults to five and skips unlabeled selected tasks.
78
+ Retain positive and negative labels for trigger measurement. Trigger already
79
+ uses on-disk files; omit `--input`, paired order and judge options. A small
80
+ development mechanism check cannot become independent validation by renaming it.
81
+
47
82
  ## Interpretation discipline (do not skip)
48
83
 
49
84
  For request-based eval, review the JSON plan and its call ceiling, then execute with
@@ -65,6 +100,18 @@ Missing usage or an incomplete batch cannot authorize adoption under either obje
65
100
  Optional request `spendingBudget` (0.10.0+) sets five whole-batch stop lines;
66
101
  reaching a line or losing complete final usage stops subsequent calls. An in-flight
67
102
  call can overshoot; do not treat it as a provider hard cap or retry permission.
103
+ In version 0.11.0, those stops include optional ordinary-eval judge calls.
104
+ Read separate Agent/judge/total `invocationCosts` and coverage; older missing
105
+ judge receipts remain unknown. An explicitly enabled API judge without
106
+ credentials fails instead of silently disabling judging. Ctrl+C/SIGTERM stop
107
+ managed work and retain records; do not retry, replace or expand stopped calls
108
+ without a fresh authorized plan.
109
+
110
+ In version 0.12.0, ordinary CLI usage parsing is independent of trigger
111
+ detection. Inspect `USAGE_CAPABILITY`: known missing adapter counters block a
112
+ strict budget before calls; API/injected coverage remains unknown. API response
113
+ format/HTTP failures retain reported counters and raw evidence while stopping
114
+ the batch. Missing fields remain unknown, not zero or permission to retry.
68
115
 
69
116
  - Read the verdict line, the discordant-pair counts, and the CI — not just the delta. `inconclusive` means
70
117
  the run cannot tell, not that the skill is useless.
@@ -73,7 +120,13 @@ call can overshoot; do not treat it as a provider hard cap or retry permission.
73
120
  0pp delta as a finding.
74
121
  - Trigger mode: report recall and false-trigger rate separately, with their CIs. A skill that never fires
75
122
  has zero realized value regardless of content quality.
76
- - Always cite the manifest path (`runs/<group>/manifest.json`) so the user can audit.
123
+ - Cite the actual native run and summary path: paired/trigger `manifest.json`,
124
+ calibration `_calibration.json`, or retained session/receipts for a stopped run.
125
+ - Source supports native audit, offline delivery replay and portable export for
126
+ supported sealed calibration/trigger and new judge runs. Historical standalone
127
+ summaries stay unverified; missing receipts/runtime support cannot be fabricated.
128
+ Replay preserves observations and cannot authorize single-arm adoption or prove
129
+ independent validation. Paired `--policy`/`--records` do not apply to single-arm reports.
77
130
  - Full metric definitions: `docs/metrics.md` in the skillfit repo.
78
131
 
79
132
  ## Safety