skillfit 0.0.0-stage → 0.8.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.
- package/LICENSE +21 -0
- package/README.md +226 -2
- package/README.zh-CN.md +224 -0
- package/benches/README.md +172 -0
- package/benches/code-review/bench.json +57 -0
- package/benches/code-review/fixtures/explain-x1/.skillfit-mock.json +10 -0
- package/benches/code-review/fixtures/explain-x1/SPEC.md +16 -0
- package/benches/code-review/fixtures/explain-x1/src/compact.js +18 -0
- package/benches/code-review/fixtures/explain-x1/tests/compact.test.js +18 -0
- package/benches/code-review/fixtures/review-r1/.skillfit-mock.json +10 -0
- package/benches/code-review/fixtures/review-r1/CHANGES.diff +42 -0
- package/benches/code-review/fixtures/review-r1/SPEC.md +16 -0
- package/benches/code-review/fixtures/review-r1/src/errors.js +7 -0
- package/benches/code-review/fixtures/review-r1/src/money.js +3 -0
- package/benches/code-review/fixtures/review-r1/src/order.js +13 -0
- package/benches/code-review/fixtures/review-r1/tests/order.test.js +17 -0
- package/benches/code-review/fixtures/review-r2/.skillfit-mock.json +10 -0
- package/benches/code-review/fixtures/review-r2/CHANGES.diff +81 -0
- package/benches/code-review/fixtures/review-r2/SPEC.md +25 -0
- package/benches/code-review/fixtures/review-r2/src/errors.js +7 -0
- package/benches/code-review/fixtures/review-r2/src/invoice.js +9 -0
- package/benches/code-review/fixtures/review-r2/src/money.js +3 -0
- package/benches/code-review/fixtures/review-r2/tests/invoice.test.js +13 -0
- package/benches/code-review/fixtures/review-r3/.skillfit-mock.json +10 -0
- package/benches/code-review/fixtures/review-r3/CHANGES.diff +76 -0
- package/benches/code-review/fixtures/review-r3/SPEC.md +24 -0
- package/benches/code-review/fixtures/review-r3/src/errors.js +7 -0
- package/benches/code-review/fixtures/review-r3/src/money.js +3 -0
- package/benches/code-review/fixtures/review-r3/src/pricing.js +20 -0
- package/benches/code-review/fixtures/review-r3/tests/pricing.test.js +15 -0
- package/benches/code-review/fixtures/summarize-s1/.skillfit-mock.json +16 -0
- package/benches/code-review/fixtures/summarize-s1/CHANGES.diff +27 -0
- package/benches/code-review/fixtures/summarize-s1/SPEC.md +15 -0
- package/benches/code-review/fixtures/summarize-s1/src/discount.js +20 -0
- package/benches/code-review/fixtures/summarize-s1/src/errors.js +7 -0
- package/benches/code-review/fixtures/summarize-s1/src/money.js +7 -0
- package/benches/code-review/ground-truth/oracle-r1.mjs +21 -0
- package/benches/code-review/ground-truth/oracle-r2.mjs +21 -0
- package/benches/code-review/ground-truth/oracle-r3.mjs +20 -0
- package/benches/code-review/ground-truth/oracle-summarize-s1.mjs +21 -0
- package/benches/code-review/ground-truth/oracle-x1.mjs +18 -0
- package/benches/code-review/ground-truth/r1.md +22 -0
- package/benches/code-review/ground-truth/r2.md +21 -0
- package/benches/code-review/ground-truth/r3.md +18 -0
- package/benches/code-review/ground-truth/summarize-s1.md +26 -0
- package/benches/code-review/ground-truth/x1.md +7 -0
- package/benches/code-review/prompts/explain-x1.md +5 -0
- package/benches/code-review/prompts/explain-x1.trigger.md +5 -0
- package/benches/code-review/prompts/review-r1.md +7 -0
- package/benches/code-review/prompts/review-r1.trigger.md +7 -0
- package/benches/code-review/prompts/review-r2.md +7 -0
- package/benches/code-review/prompts/review-r2.trigger.md +7 -0
- package/benches/code-review/prompts/review-r3.md +7 -0
- package/benches/code-review/prompts/review-r3.trigger.md +7 -0
- package/benches/code-review/prompts/summarize-s1.md +9 -0
- package/benches/code-review/prompts/summarize-s1.trigger.md +9 -0
- package/benches/code-review/verifiers/explain-x1.mjs +30 -0
- package/benches/code-review/verifiers/review-r2.mjs +66 -0
- package/benches/code-review/verifiers/review-r3.mjs +60 -0
- package/benches/code-review/verifiers/seeded-bugs.mjs +74 -0
- package/benches/code-review/verifiers/summarize-s1.mjs +80 -0
- package/benches/contrib/README.md +42 -0
- package/benches/contrib/oss-lru-cache/README.md +24 -0
- package/benches/contrib/oss-lru-cache/bench.json +37 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/LICENSE +15 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/README.md +3 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/index.js +1044 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/package.json +11 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/runtime.mjs +22 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/test.mjs +11 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/LICENSE.md +55 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/README.md +3 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/package.json +11 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/runtime.mjs +22 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-browser.ts +11 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-cjs.cts +11 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-esm.mts +29 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-node.ts +7 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel.ts +6 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/index.ts +3148 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/perf.ts +17 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/test.mjs +11 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-size/LICENSE +15 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-size/README.md +3 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-size/index.js +1028 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-size/package.json +11 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-size/runtime.mjs +22 -0
- package/benches/contrib/oss-lru-cache/fixtures/fetch-size/test.mjs +11 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-abort/LICENSE +15 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-abort/index.js +1053 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-abort.md +11 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/LICENSE.md +55 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-browser.ts +11 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-cjs.cts +11 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-esm.mts +29 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-node.ts +7 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel.ts +6 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/index.ts +3174 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/perf.ts +17 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle.md +11 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-size/LICENSE +15 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-size/index.js +1028 -0
- package/benches/contrib/oss-lru-cache/ground-truth/fetch-size.md +11 -0
- package/benches/contrib/oss-lru-cache/ground-truth/oracle-fetch-abort.mjs +8 -0
- package/benches/contrib/oss-lru-cache/ground-truth/oracle-fetch-lifecycle.mjs +7 -0
- package/benches/contrib/oss-lru-cache/ground-truth/oracle-fetch-size.mjs +7 -0
- package/benches/contrib/oss-lru-cache/ground-truth/oracle.mjs +9 -0
- package/benches/contrib/oss-lru-cache/prompts/fetch-abort.md +5 -0
- package/benches/contrib/oss-lru-cache/prompts/fetch-lifecycle.md +5 -0
- package/benches/contrib/oss-lru-cache/prompts/fetch-size.md +5 -0
- package/benches/contrib/oss-lru-cache/provenance.json +62 -0
- package/benches/contrib/oss-lru-cache/runtime.mjs +22 -0
- package/benches/contrib/oss-lru-cache/verifiers/cases.mjs +74 -0
- package/benches/contrib/oss-lru-cache/verifiers/fetch-abort.mjs +3 -0
- package/benches/contrib/oss-lru-cache/verifiers/fetch-lifecycle.mjs +3 -0
- package/benches/contrib/oss-lru-cache/verifiers/fetch-size.mjs +3 -0
- package/benches/contrib/oss-lru-cache/verifiers/probe.mjs +14 -0
- package/benches/contrib/oss-lru-cache/verifiers/shared.mjs +130 -0
- package/benches/contrib/oss-lru-cache/verifiers/test-reporter.mjs +29 -0
- package/benches/contrib/oss-mcp-use-utf8/LICENSE.upstream +21 -0
- package/benches/contrib/oss-mcp-use-utf8/README.md +56 -0
- package/benches/contrib/oss-mcp-use-utf8/bench.json +16 -0
- package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/LICENSE +21 -0
- package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/package.json +3 -0
- package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/src/ext-apps-bridge.js +3 -0
- package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/src/resolve-view-resource.ts +96 -0
- package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/test/basic.test.mjs +13 -0
- package/benches/contrib/oss-mcp-use-utf8/ground-truth/README.md +5 -0
- package/benches/contrib/oss-mcp-use-utf8/ground-truth/oracle-view-utf8.mjs +11 -0
- package/benches/contrib/oss-mcp-use-utf8/ground-truth/solutions/view-utf8/src/resolve-view-resource.ts +96 -0
- package/benches/contrib/oss-mcp-use-utf8/ground-truth/solutions/view-utf8/test/utf8.regression.test.mjs +14 -0
- package/benches/contrib/oss-mcp-use-utf8/prompts/view-utf8.md +8 -0
- package/benches/contrib/oss-mcp-use-utf8/verifiers/view-utf8.mjs +120 -0
- package/benches/contrib/waza-behavior/LICENSE.upstream +21 -0
- package/benches/contrib/waza-behavior/README.md +31 -0
- package/benches/contrib/waza-behavior/bench.json +10 -0
- package/benches/contrib/waza-behavior/fixtures/explicit-hold/README.md +1 -0
- package/benches/contrib/waza-behavior/fixtures/explicit-hold/notes.txt +1 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-current/README.md +1 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-current/docs/guide.md +2 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-current/notes.txt +1 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-current/scripts/check-links.mjs +16 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-current/validation-receipt.json +10 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-stale/README.md +1 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-stale/docs/guide.md +3 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-stale/notes.txt +1 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-stale/scripts/check-links.mjs +16 -0
- package/benches/contrib/waza-behavior/fixtures/receipt-stale/validation-receipt.json +10 -0
- package/benches/contrib/waza-behavior/ground-truth/oracle.mjs +24 -0
- package/benches/contrib/waza-behavior/prompts/explicit-hold.md +1 -0
- package/benches/contrib/waza-behavior/prompts/receipt-current.md +1 -0
- package/benches/contrib/waza-behavior/prompts/receipt-stale.md +1 -0
- package/benches/contrib/waza-behavior/verifiers/behavior.mjs +59 -0
- package/benches/debugging/bench.json +93 -0
- package/benches/debugging/fixtures/async-queue/src/task-queue.mjs +50 -0
- package/benches/debugging/fixtures/async-queue/test/basic.test.mjs +18 -0
- package/benches/debugging/fixtures/chunked-decoder/src/frame-decoder.mjs +39 -0
- package/benches/debugging/fixtures/chunked-decoder/test/basic.test.mjs +17 -0
- package/benches/debugging/fixtures/debug-redaction/src/debug-redaction.mjs +33 -0
- package/benches/debugging/fixtures/debug-redaction/test/basic.test.mjs +26 -0
- package/benches/debugging/fixtures/document-queue/.skillfit-mock.json +16 -0
- package/benches/debugging/fixtures/document-queue/src/task-queue.mjs +52 -0
- package/benches/debugging/fixtures/document-queue/test/basic.test.mjs +23 -0
- package/benches/debugging/fixtures/explain-cache/.skillfit-mock.json +16 -0
- package/benches/debugging/fixtures/explain-cache/src/ttl-cache.mjs +31 -0
- package/benches/debugging/fixtures/explain-cache/test/basic.test.mjs +28 -0
- package/benches/debugging/fixtures/feat-slug/test/slug.test.mjs +15 -0
- package/benches/debugging/fixtures/range-parser/src/range-parser.mjs +9 -0
- package/benches/debugging/fixtures/range-parser/test/basic.test.mjs +8 -0
- package/benches/debugging/fixtures/ttl-cache/src/ttl-cache.mjs +30 -0
- package/benches/debugging/fixtures/ttl-cache/test/basic.test.mjs +11 -0
- package/benches/debugging/ground-truth/async-queue.md +81 -0
- package/benches/debugging/ground-truth/chunked-decoder.md +91 -0
- package/benches/debugging/ground-truth/debug-redaction.md +113 -0
- package/benches/debugging/ground-truth/document-queue.md +24 -0
- package/benches/debugging/ground-truth/explain-cache.md +22 -0
- package/benches/debugging/ground-truth/feat-slug.md +45 -0
- package/benches/debugging/ground-truth/oracle-async-queue.mjs +14 -0
- package/benches/debugging/ground-truth/oracle-chunked-decoder.mjs +14 -0
- package/benches/debugging/ground-truth/oracle-debug-redaction.mjs +30 -0
- package/benches/debugging/ground-truth/oracle-document-queue.mjs +27 -0
- package/benches/debugging/ground-truth/oracle-explain-cache.mjs +28 -0
- package/benches/debugging/ground-truth/oracle-feat-slug.mjs +13 -0
- package/benches/debugging/ground-truth/oracle-range-parser.mjs +14 -0
- package/benches/debugging/ground-truth/oracle-ttl-cache.mjs +14 -0
- package/benches/debugging/ground-truth/range-parser.md +121 -0
- package/benches/debugging/ground-truth/solutions/async-queue/src/task-queue.mjs +52 -0
- package/benches/debugging/ground-truth/solutions/chunked-decoder/src/frame-decoder.mjs +50 -0
- package/benches/debugging/ground-truth/solutions/debug-redaction/src/debug-redaction.mjs +27 -0
- package/benches/debugging/ground-truth/solutions/debug-redaction/test/debug-leak.regression.test.mjs +27 -0
- package/benches/debugging/ground-truth/solutions/feat-slug/src/slug.mjs +6 -0
- package/benches/debugging/ground-truth/solutions/range-parser/src/range-parser.mjs +34 -0
- package/benches/debugging/ground-truth/solutions/range-parser/test/basic.test.mjs +26 -0
- package/benches/debugging/ground-truth/solutions/ttl-cache/src/ttl-cache.mjs +31 -0
- package/benches/debugging/ground-truth/ttl-cache.md +69 -0
- package/benches/debugging/prompts/async-queue.md +13 -0
- package/benches/debugging/prompts/async-queue.trigger.md +13 -0
- package/benches/debugging/prompts/chunked-decoder.md +13 -0
- package/benches/debugging/prompts/chunked-decoder.trigger.md +13 -0
- package/benches/debugging/prompts/debug-redaction.md +23 -0
- package/benches/debugging/prompts/debug-redaction.trigger.md +23 -0
- package/benches/debugging/prompts/document-queue.md +10 -0
- package/benches/debugging/prompts/document-queue.trigger.md +10 -0
- package/benches/debugging/prompts/explain-cache.md +10 -0
- package/benches/debugging/prompts/explain-cache.trigger.md +10 -0
- package/benches/debugging/prompts/feat-slug.md +3 -0
- package/benches/debugging/prompts/feat-slug.trigger.md +5 -0
- package/benches/debugging/prompts/range-parser.md +15 -0
- package/benches/debugging/prompts/range-parser.trigger.md +15 -0
- package/benches/debugging/prompts/ttl-cache.md +18 -0
- package/benches/debugging/prompts/ttl-cache.trigger.md +18 -0
- package/benches/debugging/verifiers/async-queue.mjs +221 -0
- package/benches/debugging/verifiers/chunked-decoder.mjs +208 -0
- package/benches/debugging/verifiers/debug-redaction.mjs +283 -0
- package/benches/debugging/verifiers/document-queue.mjs +52 -0
- package/benches/debugging/verifiers/explain-cache.mjs +62 -0
- package/benches/debugging/verifiers/feat-slug.mjs +127 -0
- package/benches/debugging/verifiers/range-parser.mjs +146 -0
- package/benches/debugging/verifiers/ttl-cache.mjs +111 -0
- package/dist/agents.js +26 -0
- package/dist/cli.js +310 -0
- package/dist/cli.test.js +76 -0
- package/dist/commands/bench.js +1035 -0
- package/dist/commands/bench.test.js +1061 -0
- package/dist/commands/bundle.js +334 -0
- package/dist/commands/bundle.test.js +142 -0
- package/dist/commands/confirm.js +39 -0
- package/dist/commands/doctor.js +399 -0
- package/dist/commands/doctor.test.js +280 -0
- package/dist/commands/eval-report.js +485 -0
- package/dist/commands/eval-report.test.js +306 -0
- package/dist/commands/eval.js +391 -0
- package/dist/commands/eval.test.js +446 -0
- package/dist/commands/install.js +653 -0
- package/dist/commands/install.test.js +555 -0
- package/dist/commands/mcp.js +20 -0
- package/dist/commands/report.js +78 -0
- package/dist/commands/report.test.js +110 -0
- package/dist/commands/setup.js +95 -0
- package/dist/commands/setup.test.js +150 -0
- package/dist/commands/upstream.js +210 -0
- package/dist/commands/upstream.test.js +139 -0
- package/dist/docs.test.js +154 -0
- package/dist/frontmatter.js +53 -0
- package/dist/frontmatter.test.js +49 -0
- package/dist/harness/bench.js +134 -0
- package/dist/harness/bench.test.js +109 -0
- package/dist/harness/bundle.js +46 -0
- package/dist/harness/bundle.test.js +71 -0
- package/dist/harness/constants.js +2 -0
- package/dist/harness/executors/api.js +68 -0
- package/dist/harness/executors/api.test.js +75 -0
- package/dist/harness/executors/cli.js +348 -0
- package/dist/harness/executors/cli.test.js +402 -0
- package/dist/harness/executors/mock.js +34 -0
- package/dist/harness/executors/mock.test.js +43 -0
- package/dist/harness/experiment-session.js +345 -0
- package/dist/harness/experiment-session.test.js +223 -0
- package/dist/harness/hash.js +29 -0
- package/dist/harness/installed-skill.js +78 -0
- package/dist/harness/installed-skill.test.js +162 -0
- package/dist/harness/judge.js +108 -0
- package/dist/harness/judge.test.js +181 -0
- package/dist/harness/kill-tree.js +43 -0
- package/dist/harness/kimi-usage.js +94 -0
- package/dist/harness/kimi-usage.test.js +62 -0
- package/dist/harness/oss-lru-cache.test.js +79 -0
- package/dist/harness/oss-regression-witness.test.js +89 -0
- package/dist/harness/prompt.js +57 -0
- package/dist/harness/prompt.test.js +48 -0
- package/dist/harness/receipts.js +297 -0
- package/dist/harness/receipts.test.js +148 -0
- package/dist/harness/report.js +225 -0
- package/dist/harness/report.test.js +297 -0
- package/dist/harness/runner.js +629 -0
- package/dist/harness/runner.test.js +555 -0
- package/dist/harness/stats.js +93 -0
- package/dist/harness/stats.test.js +124 -0
- package/dist/harness/target.js +90 -0
- package/dist/harness/target.test.js +60 -0
- package/dist/harness/trigger.js +368 -0
- package/dist/harness/trigger.test.js +249 -0
- package/dist/harness/types.js +1 -0
- package/dist/harness/verifier-summary.js +59 -0
- package/dist/harness/verifier-summary.test.js +99 -0
- package/dist/harness/waza-behavior.test.js +139 -0
- package/dist/invocation.js +21 -0
- package/dist/matrix/agents.json +200 -0
- package/dist/matrix/agents.schema.json +152 -0
- package/dist/mcp/probe.js +317 -0
- package/dist/mcp/probe.test.js +87 -0
- package/dist/version.js +4 -0
- package/docs/assets/skillfit-flow.en.svg +47 -0
- package/docs/assets/skillfit-flow.zh-CN.svg +47 -0
- package/docs/assets/skillfit-mark.svg +9 -0
- package/docs/audit-2026-09-24-triage.md +231 -0
- package/docs/audit-2026-09-24.md +876 -0
- package/docs/bench-authoring.md +407 -0
- package/docs/codex-upstream-audit.md +41 -0
- package/docs/config-experiments.md +119 -0
- package/docs/examples/bench-check.yml +32 -0
- package/docs/examples/eval-manifest.synthetic.json +61 -0
- package/docs/experiment-workflow.md +15 -0
- package/docs/first-real-eval.md +90 -0
- package/docs/growth-roadmap-2026-10.md +100 -0
- package/docs/installed-skill-evaluation.md +77 -0
- package/docs/metrics.md +318 -0
- package/docs/oss-task-evaluation.md +139 -0
- package/docs/plans/2026-10-01-oss-task-evaluation.md +73 -0
- package/docs/plans/2026-10-09-experiment-workflow.md +18 -0
- package/docs/plans/2026-10-09-grader-calibration-audit.md +13 -0
- package/docs/plans/2026-10-09-waza-resource-evaluation.md +46 -0
- package/docs/portable-codex.md +31 -0
- package/docs/reproducible-offline-example.md +29 -0
- package/docs/selectable-codex.md +41 -0
- package/docs/sharing-results.md +53 -0
- package/evidence/2026-07-skill-baseline.md +34 -0
- package/evidence/2026-09-22-codex-trigger-capture.md +36 -0
- package/evidence/2026-09-bench-calibration.md +46 -0
- package/evidence/2026-09-debugging-bench-exploratory.md +55 -0
- package/evidence/2026-09-debugging-hardening.md +42 -0
- package/evidence/2026-09-ocr-vs-code-review.md +31 -0
- package/evidence/2026-09-trigger-snapshot-correction.md +48 -0
- package/evidence/2026-10-01-codex-diagnosing-bugs-pilot.md +58 -0
- package/evidence/2026-10-01-oss-case-selection.md +42 -0
- package/evidence/2026-10-01-oss-workspace-smoke.md +110 -0
- package/evidence/README.md +47 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/README.md +27 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/artifact-index.json +118 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/output.md +5 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/prompt.txt +14 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/result.json +65 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/verifier.txt +2 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/LICENSE +21 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/package.json +3 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/src/ext-apps-bridge.js +3 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/src/resolve-view-resource.ts +100 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/test/basic.test.mjs +13 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/test/resolve-view-resource.test.mjs +102 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/manifest.json +206 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/original-console.txt +44 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/report.md +67 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/output.md +5 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/prompt.txt +163 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/result.json +65 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/verifier.txt +2 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/LICENSE +21 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/package.json +3 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/src/ext-apps-bridge.js +3 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/src/resolve-view-resource.ts +100 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/test/basic.test.mjs +13 -0
- package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/test/resolve-view-resource.test.mjs +136 -0
- package/evidence/inputs/README.md +15 -0
- package/evidence/inputs/diagnosing-bugs/LICENSE +21 -0
- package/evidence/inputs/diagnosing-bugs/SKILL.md +138 -0
- package/evidence/inputs/diagnosing-bugs/agents/openai.yaml +3 -0
- package/evidence/inputs/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/evidence/plans/2026-10-01-oss-workspace-smoke.json +29 -0
- package/package.json +47 -4
- package/profiles/codex-curated/catalog.json +28 -0
- package/profiles/codex-curated/profile.json +282 -0
- package/profiles/codex-curated/rules/global.md +12 -0
- package/profiles/codex-curated/skills/autonomous-iteration/SKILL.md +75 -0
- package/profiles/codex-curated/skills/autonomous-iteration/agents/openai.yaml +4 -0
- package/profiles/codex-curated/skills/vibe-coding/SKILL.md +45 -0
- package/profiles/codex-curated/skills/vibe-coding/agents/openai.yaml +4 -0
- package/profiles/codex-upstream-sources.json +2980 -0
- package/profiles/recommended/profile.json +12 -0
- package/profiles/recommended/rules/core-workflow.md +41 -0
- package/profiles/recommended/skills/commit-message/SKILL.md +18 -0
- package/skills/skillfit/SKILL.md +60 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { test } from 'node:test';
|
|
6
|
+
import { parseEvalReport, renderEvalMarkdown, runEvalReport } from './eval-report.js';
|
|
7
|
+
function manifest() {
|
|
8
|
+
const conditions = {
|
|
9
|
+
baseline: { passes: 0, trials: 2, errors: 0 },
|
|
10
|
+
treatment: { passes: 2, trials: 2, errors: 0 },
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
13
|
+
schemaVersion: 4,
|
|
14
|
+
runGroup: 'eval-20261001-123000',
|
|
15
|
+
createdAt: '2026-10-01T12:30:00.000Z',
|
|
16
|
+
target: { kind: 'skill', name: 'test | Skill', bundleSha256: 'a'.repeat(64) },
|
|
17
|
+
bench: { name: 'one-task', contentSha256: 'b'.repeat(64), taskCount: 1 },
|
|
18
|
+
executor: { kind: 'mock', model: 'mock' },
|
|
19
|
+
trials: 2,
|
|
20
|
+
tasks: [{ id: 'task-1', conditions, deltaPassRate: 1, verdict: 'inconclusive' }],
|
|
21
|
+
overall: {
|
|
22
|
+
conditions,
|
|
23
|
+
deltaPassRate: 1,
|
|
24
|
+
verdict: 'inconclusive',
|
|
25
|
+
verdictReason: 'only 2 discordant pairs',
|
|
26
|
+
stats: {
|
|
27
|
+
discordant: { improved: 2, regressed: 0 },
|
|
28
|
+
mcnemarP: 0.5,
|
|
29
|
+
deltaCi: { lo: 0.2, hi: 1, resamples: 1000 },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
warnings: ['Only two pairs: indicative.', 'Avoid <private> details.'],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function sixPairManifest() {
|
|
36
|
+
const value = manifest();
|
|
37
|
+
const conditions = {
|
|
38
|
+
baseline: { passes: 3, trials: 6, errors: 0 },
|
|
39
|
+
treatment: { passes: 6, trials: 6, errors: 0 },
|
|
40
|
+
};
|
|
41
|
+
value['trials'] = 6;
|
|
42
|
+
const task = value['tasks'][0];
|
|
43
|
+
Object.assign(task, { conditions, deltaPassRate: 0.5 });
|
|
44
|
+
const overall = value['overall'];
|
|
45
|
+
Object.assign(overall, { conditions, deltaPassRate: 0.5, verdictReason: 'only 3 discordant pairs' });
|
|
46
|
+
Object.assign(overall['stats'], {
|
|
47
|
+
discordant: { improved: 3, regressed: 0 },
|
|
48
|
+
mcnemarP: 0.25,
|
|
49
|
+
});
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
test('report eval renders a v4 manifest without executing an agent or writing a file', () => {
|
|
53
|
+
const dir = mkdtempSync(join(tmpdir(), 'skillfit-eval-report-'));
|
|
54
|
+
try {
|
|
55
|
+
const path = join(dir, 'manifest.json');
|
|
56
|
+
const original = `${JSON.stringify(manifest(), null, 2)}\n`;
|
|
57
|
+
writeFileSync(path, original);
|
|
58
|
+
const output = [];
|
|
59
|
+
runEvalReport(path, (line) => output.push(line));
|
|
60
|
+
assert.equal(readFileSync(path, 'utf8'), original);
|
|
61
|
+
assert.equal(output.length, 1);
|
|
62
|
+
const markdown = output[0] ?? '';
|
|
63
|
+
assert.match(markdown, /# skillfit evaluation: test \\\| Skill/);
|
|
64
|
+
assert.match(markdown, /Synthetic harness run/);
|
|
65
|
+
assert.match(markdown, /\| task-1 \| 0\/2 \(0%\) \| 2\/2 \(100%\) \| 0\/0 \| \+100\.0pp \| inconclusive \|/);
|
|
66
|
+
assert.match(markdown, /McNemar exact p=0\.5000/);
|
|
67
|
+
assert.match(markdown, /\[\+20\.0pp, \+100\.0pp\]/);
|
|
68
|
+
assert.match(markdown, /below the conclusive bar \(8 tasks × 5 trials\)/);
|
|
69
|
+
assert.match(markdown, /<private>/);
|
|
70
|
+
assert.ok(!markdown.includes(dir), 'the portable report must not include the local manifest directory');
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
rmSync(dir, { recursive: true, force: true });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
test('report eval refuses old and incomplete manifests instead of guessing metrics', () => {
|
|
77
|
+
assert.throws(() => parseEvalReport({ ...manifest(), schemaVersion: 3 }), /Only evaluation manifest schemaVersion 4/);
|
|
78
|
+
const missing = manifest();
|
|
79
|
+
delete missing['overall'];
|
|
80
|
+
assert.throws(() => parseEvalReport(missing), /overall must be an object/);
|
|
81
|
+
const wrongCount = manifest();
|
|
82
|
+
wrongCount['bench'] = { name: 'one-task', contentSha256: 'b'.repeat(64), taskCount: 2 };
|
|
83
|
+
assert.throws(() => parseEvalReport(wrongCount), /taskCount must match/);
|
|
84
|
+
const wrongVerdict = manifest();
|
|
85
|
+
wrongVerdict['overall']['verdict'] = 'effective';
|
|
86
|
+
assert.throws(() => parseEvalReport(wrongVerdict), /disagrees with the metrics protocol/);
|
|
87
|
+
const impossiblePairs = manifest();
|
|
88
|
+
const impossibleStats = impossiblePairs['overall']['stats'];
|
|
89
|
+
impossibleStats['discordant'] = { improved: 3, regressed: 0 };
|
|
90
|
+
assert.throws(() => parseEvalReport(impossiblePairs), /exceeds the number of paired trials/);
|
|
91
|
+
});
|
|
92
|
+
test('report eval rejects discordant counts that contradict the marginal pass difference', () => {
|
|
93
|
+
const value = sixPairManifest();
|
|
94
|
+
const overall = value['overall'];
|
|
95
|
+
overall['verdict'] = 'effective';
|
|
96
|
+
overall['verdictReason'] = '6 improvements, no regressions';
|
|
97
|
+
Object.assign(overall['stats'], {
|
|
98
|
+
discordant: { improved: 6, regressed: 0 },
|
|
99
|
+
mcnemarP: 0.03125,
|
|
100
|
+
});
|
|
101
|
+
const original = JSON.stringify(value);
|
|
102
|
+
assert.throws(() => parseEvalReport(value), /discordant\.improved - regressed disagrees with treatment\.passes - baseline\.passes/);
|
|
103
|
+
assert.equal(JSON.stringify(value), original, 'contradictory counts must not be silently corrected');
|
|
104
|
+
});
|
|
105
|
+
for (const { passes, sharedOutcome } of [
|
|
106
|
+
{ passes: 1, sharedOutcome: 'success' },
|
|
107
|
+
{ passes: 5, sharedOutcome: 'failure' },
|
|
108
|
+
]) {
|
|
109
|
+
test(`report eval rejects negative shared ${sharedOutcome} counts despite a matching pass difference`, () => {
|
|
110
|
+
const value = sixPairManifest();
|
|
111
|
+
const task = value['tasks'][0];
|
|
112
|
+
const overall = value['overall'];
|
|
113
|
+
const conditions = task['conditions'];
|
|
114
|
+
conditions['baseline']['passes'] = passes;
|
|
115
|
+
conditions['treatment']['passes'] = passes;
|
|
116
|
+
task['deltaPassRate'] = 0;
|
|
117
|
+
overall['deltaPassRate'] = 0;
|
|
118
|
+
Object.assign(overall['stats'], {
|
|
119
|
+
discordant: { improved: 2, regressed: 2 },
|
|
120
|
+
mcnemarP: 1,
|
|
121
|
+
});
|
|
122
|
+
assert.throws(() => parseEvalReport(value), new RegExp(`discordant implies a negative shared ${sharedOutcome} count`));
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
test('report eval accepts the valid six-pair counterpart as inconclusive without changing its data', () => {
|
|
126
|
+
const value = sixPairManifest();
|
|
127
|
+
const original = JSON.stringify(value);
|
|
128
|
+
const report = parseEvalReport(value);
|
|
129
|
+
assert.equal(report.overall.improved, 3);
|
|
130
|
+
assert.equal(report.overall.regressed, 0);
|
|
131
|
+
assert.equal(report.overall.mcnemarP, 0.25);
|
|
132
|
+
assert.equal(report.overall.verdict, 'inconclusive');
|
|
133
|
+
assert.match(renderEvalMarkdown(report), /McNemar exact p=0\.2500/);
|
|
134
|
+
assert.equal(JSON.stringify(value), original);
|
|
135
|
+
});
|
|
136
|
+
test('report eval renders missing CI and zero graded trials explicitly', () => {
|
|
137
|
+
const value = manifest();
|
|
138
|
+
const overall = value['overall'];
|
|
139
|
+
const stats = overall['stats'];
|
|
140
|
+
stats['deltaCi'] = null;
|
|
141
|
+
stats['discordant'] = { improved: 0, regressed: 0 };
|
|
142
|
+
stats['mcnemarP'] = 1;
|
|
143
|
+
const conditions = {
|
|
144
|
+
baseline: { passes: 0, trials: 0, errors: 2 },
|
|
145
|
+
treatment: { passes: 0, trials: 0, errors: 2 },
|
|
146
|
+
};
|
|
147
|
+
overall['conditions'] = conditions;
|
|
148
|
+
overall['deltaPassRate'] = 0;
|
|
149
|
+
value['tasks'][0]['conditions'] = conditions;
|
|
150
|
+
value['tasks'][0]['deltaPassRate'] = 0;
|
|
151
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
152
|
+
assert.match(markdown, /0\/0 \(n\/a\)/);
|
|
153
|
+
assert.match(markdown, /Δpass 95% CI: n\/a \(no graded pairs\)/);
|
|
154
|
+
});
|
|
155
|
+
test('report eval escapes Markdown links supplied by manifest fields', () => {
|
|
156
|
+
const value = manifest();
|
|
157
|
+
value['target']['name'] = '[click](https://example.com)';
|
|
158
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
159
|
+
assert.match(markdown, /# skillfit evaluation: \\\[click\\\]\(https:\/\/example\.com\)/);
|
|
160
|
+
assert.ok(!markdown.includes('# skillfit evaluation: [click]('));
|
|
161
|
+
});
|
|
162
|
+
test('real reports show facets, bounded decisions and partial token coverage', () => {
|
|
163
|
+
const value = manifest();
|
|
164
|
+
value['executor'] = { kind: 'cli', model: 'cli-configured' };
|
|
165
|
+
value['inputMode'] = 'workspace';
|
|
166
|
+
const task = value['tasks'][0];
|
|
167
|
+
const conditions = task['conditions'];
|
|
168
|
+
Object.assign(conditions['baseline'], { meanScore: 0.5, tokens: { input: 40, output: 2 }, tokenCoverage: { input: 1, output: 1 } });
|
|
169
|
+
Object.assign(conditions['treatment'], { meanScore: 1, tokens: { input: 80, output: 4 }, tokenCoverage: { input: 2, output: 2 } });
|
|
170
|
+
task['scoreDelta'] = 0.5;
|
|
171
|
+
value['overall']['scoreDelta'] = 0.5;
|
|
172
|
+
task['facets'] = [{ name: 'Unicode | regression', baselinePassRate: 0.5, treatmentPassRate: 1, baselineTrials: 2, treatmentTrials: 2 }];
|
|
173
|
+
const stats = value['overall']['stats'];
|
|
174
|
+
stats['scoreDeltaCi'] = { lo: 0.1, hi: 0.9, resamples: 1000 };
|
|
175
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
176
|
+
assert.match(markdown, /Input: workspace/);
|
|
177
|
+
assert.match(markdown, /\| task-1 \| 50\.0% \| 100\.0% \| \+50\.0pp \|/);
|
|
178
|
+
assert.match(markdown, /Unicode \\\| regression \| 50\.0% \(n=2\) \| 100\.0% \(n=2\)/);
|
|
179
|
+
assert.match(markdown, /Δscore 95% paired-bootstrap CI/);
|
|
180
|
+
assert.match(markdown, /Inconclusive means insufficient evidence/);
|
|
181
|
+
assert.match(markdown, /Activation is unmeasured/);
|
|
182
|
+
assert.match(markdown, /Token coverage is partial or unrecorded/);
|
|
183
|
+
assert.match(markdown, /40 \(1\/2 runs\)/);
|
|
184
|
+
assert.ok(!markdown.includes('Mean recorded tokens'));
|
|
185
|
+
});
|
|
186
|
+
test('report warns when only the graded-score interval collapses', () => {
|
|
187
|
+
const value = manifest();
|
|
188
|
+
const task = value['tasks'][0];
|
|
189
|
+
const conditions = task['conditions'];
|
|
190
|
+
conditions['baseline']['meanScore'] = 0.5;
|
|
191
|
+
conditions['treatment']['meanScore'] = 1;
|
|
192
|
+
task['scoreDelta'] = 0.5;
|
|
193
|
+
const overall = value['overall'];
|
|
194
|
+
overall['scoreDelta'] = 0.5;
|
|
195
|
+
overall['stats']['scoreDeltaCi'] = { point: 0.5, lo: 0.5, hi: 0.5, resamples: 1000 };
|
|
196
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
197
|
+
assert.match(markdown, /Δpass 95% paired-bootstrap CI.*\[\+20\.0pp, \+100\.0pp\]/);
|
|
198
|
+
assert.match(markdown, /Δscore 95% paired-bootstrap CI.*\[\+50\.0pp, \+50\.0pp\]/);
|
|
199
|
+
assert.match(markdown, /interval collapsed.*does not establish zero uncertainty/);
|
|
200
|
+
});
|
|
201
|
+
test('report rejects invalid score, facet denominators, coverage and unpaired counts', () => {
|
|
202
|
+
for (const mutate of [
|
|
203
|
+
(task) => { task['facets'] = [{ name: 'a', baselinePassRate: 1, treatmentPassRate: 1, baselineTrials: 3, treatmentTrials: 2 }]; },
|
|
204
|
+
(task) => { task['facets'] = [{ name: 'a', baselinePassRate: 0.5, treatmentPassRate: 1, baselineTrials: 1, treatmentTrials: 2 }]; },
|
|
205
|
+
(task) => { (task['conditions']['baseline'])['meanScore'] = 2; },
|
|
206
|
+
(task) => { (task['conditions']['baseline'])['tokenCoverage'] = { input: 3, output: 0 }; },
|
|
207
|
+
(task) => { (task['conditions']['baseline'])['trials'] = 1; },
|
|
208
|
+
]) {
|
|
209
|
+
const value = manifest();
|
|
210
|
+
mutate(value['tasks'][0]);
|
|
211
|
+
assert.throws(() => parseEvalReport(value), /denominator|finite number|coverage cannot|tokenCoverage cannot|equal numbers/);
|
|
212
|
+
}
|
|
213
|
+
const value = manifest();
|
|
214
|
+
value['inputMode'] = 'invented';
|
|
215
|
+
assert.throws(() => parseEvalReport(value), /inputMode must/);
|
|
216
|
+
});
|
|
217
|
+
test('legacy real manifests expose missing provenance and token coverage', () => {
|
|
218
|
+
const value = manifest();
|
|
219
|
+
value['executor'] = { kind: 'cli', model: 'cli-configured' };
|
|
220
|
+
const conditions = value['overall']['conditions'];
|
|
221
|
+
for (const c of Object.values(conditions))
|
|
222
|
+
c['tokens'] = { input: 40, output: 2 };
|
|
223
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
224
|
+
assert.match(markdown, /legacy manifest; not recorded/);
|
|
225
|
+
assert.match(markdown, /coverage unrecorded/);
|
|
226
|
+
assert.match(markdown, /Token coverage is partial or unrecorded/);
|
|
227
|
+
});
|
|
228
|
+
test('report cross-checks usage coverage/totals and rejects contradictory usage', () => {
|
|
229
|
+
for (const mutation of ['coverage-total', 'token-total', 'missing-task', 'null-tokens', 'zero-coverage']) {
|
|
230
|
+
const value = JSON.parse(JSON.stringify(manifest()));
|
|
231
|
+
const task = value['tasks'][0];
|
|
232
|
+
const taskConditions = task['conditions'];
|
|
233
|
+
const overallConditions = value['overall']['conditions'];
|
|
234
|
+
for (const conditions of [taskConditions, overallConditions]) {
|
|
235
|
+
for (const c of Object.values(conditions))
|
|
236
|
+
Object.assign(c, {
|
|
237
|
+
tokens: { input: 10, output: 2 }, tokenCoverage: { input: 1, output: 1 },
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
const aggregate = overallConditions['baseline'];
|
|
241
|
+
if (mutation === 'coverage-total')
|
|
242
|
+
aggregate['tokenCoverage'] = { input: 2, output: 2 };
|
|
243
|
+
if (mutation === 'token-total')
|
|
244
|
+
aggregate['tokens'] = { input: 10000, output: 1000 };
|
|
245
|
+
if (mutation === 'missing-task')
|
|
246
|
+
delete taskConditions['baseline']['tokenCoverage'];
|
|
247
|
+
if (mutation === 'null-tokens')
|
|
248
|
+
aggregate['tokens'] = null;
|
|
249
|
+
if (mutation === 'zero-coverage')
|
|
250
|
+
aggregate['tokenCoverage'] = { input: 0, output: 0 };
|
|
251
|
+
assert.throws(() => parseEvalReport(value), /disagrees with task totals|requires recorded coverage|contradicts/);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
test('report refuses a score interval without paired score observations', () => {
|
|
255
|
+
const value = manifest();
|
|
256
|
+
const overall = value['overall'];
|
|
257
|
+
overall['stats']['scoreDeltaCi'] = { lo: 0.5, hi: 1, resamples: 1000 };
|
|
258
|
+
assert.throws(() => parseEvalReport(value), /scoreDeltaCi requires paired graded score observations/);
|
|
259
|
+
});
|
|
260
|
+
test('report uses completed scale after exclusions and warns about collapsed intervals', () => {
|
|
261
|
+
const value = manifest();
|
|
262
|
+
value['executor'] = { kind: 'cli', model: 'offline' };
|
|
263
|
+
value['trials'] = 5;
|
|
264
|
+
value['bench']['taskCount'] = 8;
|
|
265
|
+
const conditions = { baseline: { passes: 0, trials: 4, errors: 1 }, treatment: { passes: 4, trials: 4, errors: 0 } };
|
|
266
|
+
value['tasks'] = Array.from({ length: 8 }, (_, i) => ({ id: `task-${i}`, conditions, deltaPassRate: 1, verdict: 'inconclusive' }));
|
|
267
|
+
Object.assign(value['overall'], {
|
|
268
|
+
conditions: { baseline: { passes: 0, trials: 32, errors: 8 }, treatment: { passes: 32, trials: 32, errors: 0 } },
|
|
269
|
+
verdict: 'effective', stats: { discordant: { improved: 32, regressed: 0 }, mcnemarP: 2 * 0.5 ** 32,
|
|
270
|
+
deltaCi: { lo: 1, hi: 1, resamples: 1000 } },
|
|
271
|
+
});
|
|
272
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
273
|
+
assert.match(markdown, /Completed scale: 0 task\(s\) have at least 5 graded pairs/);
|
|
274
|
+
assert.match(markdown, /interval collapsed.*does not establish zero uncertainty/);
|
|
275
|
+
assert.match(markdown, /No installation recommendation: this run is below 8 tasks/);
|
|
276
|
+
});
|
|
277
|
+
test('managed reports refuse contradictory call coverage and withhold decisions for partial runs', () => {
|
|
278
|
+
const value = manifest();
|
|
279
|
+
value['executor'] = { kind: 'cli', model: 'offline' };
|
|
280
|
+
value['experiment'] = { schemaVersion: 1, status: 'stopped', plannedCalls: 4, maxCalls: 4,
|
|
281
|
+
callsStarted: 1, callsFinished: 1, stopReason: 'frozen input changed', planSha256: 'c'.repeat(64) };
|
|
282
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
283
|
+
assert.match(markdown, /Session: stopped; 1\/4/);
|
|
284
|
+
assert.match(markdown, /No installation decision: the frozen experiment/);
|
|
285
|
+
assert.match(markdown, /Retain this run without adding replacement samples/);
|
|
286
|
+
const session = value['experiment'];
|
|
287
|
+
for (const change of [{ status: 'completed', stopReason: null }, { callsStarted: 5 }, { callsFinished: 2 },
|
|
288
|
+
{ maxCalls: 3 }, { status: 'incomplete', stopReason: null, callsStarted: 4, callsFinished: 4 }]) {
|
|
289
|
+
assert.throws(() => parseEvalReport({ ...value, experiment: { ...session, ...change } }), /contradict/);
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
test('installed report validates and distinguishes read observations from task quality', () => {
|
|
293
|
+
const value = manifest();
|
|
294
|
+
value['inputMode'] = 'workspace';
|
|
295
|
+
value['skillDelivery'] = { mode: 'installed', installDir: '.agents/skills' };
|
|
296
|
+
value['target']['files'] = ['SKILL.md'];
|
|
297
|
+
const conditions = value['overall']['conditions'];
|
|
298
|
+
conditions['baseline']['skillReads'] = { observed: 0, unobserved: 0, unknown: 2 };
|
|
299
|
+
conditions['treatment']['skillReads'] = { observed: 1, unobserved: 1, unknown: 0 };
|
|
300
|
+
const markdown = renderEvalMarkdown(parseEvalReport(value));
|
|
301
|
+
assert.match(markdown, /Native Skill-read observations/);
|
|
302
|
+
assert.match(markdown, /no body read was detected/);
|
|
303
|
+
assert.match(markdown, /not trigger precision or recall/);
|
|
304
|
+
conditions['treatment']['skillReads'] = { observed: 2, unobserved: 1, unknown: 0 };
|
|
305
|
+
assert.throws(() => parseEvalReport(value), /must total the surviving graded trials/);
|
|
306
|
+
});
|