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,87 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { mkdtempSync, 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 { loadMcpProbeSpec, probeMcpStdio, renderMcpProbe } from './probe.js';
|
|
7
|
+
function fixture(t, tools, keepAlive = false, options = {}) {
|
|
8
|
+
const dir = mkdtempSync(join(tmpdir(), 'skillfit-mcp-'));
|
|
9
|
+
t.after(() => rmSync(dir, { recursive: true, force: true }));
|
|
10
|
+
writeFileSync(join(dir, 'server.mjs'), `import readline from 'node:readline';
|
|
11
|
+
const rl = readline.createInterface({ input: process.stdin });
|
|
12
|
+
if (${keepAlive}) setInterval(() => {}, 1000);
|
|
13
|
+
const pages = ${JSON.stringify(options.pages ?? [tools])};
|
|
14
|
+
const rawResponse = ${JSON.stringify(options.rawResponse ?? null)};
|
|
15
|
+
const repeatCursor = ${options.repeatCursor ?? false};
|
|
16
|
+
rl.on('line', line => {
|
|
17
|
+
const msg = JSON.parse(line);
|
|
18
|
+
if (msg.id === 1) console.log(JSON.stringify(rawResponse ?? {jsonrpc:'2.0',id:1,result:{protocolVersion:'2025-11-25',capabilities:{tools:{}},serverInfo:{name:'fixture',version:'1.0.0'}}}));
|
|
19
|
+
if (msg.id === 2) {
|
|
20
|
+
const page = msg.params?.cursor ? Number(msg.params.cursor) : 0;
|
|
21
|
+
console.log(JSON.stringify({jsonrpc:'2.0',id:2,result:{tools:pages[page],...(repeatCursor || page + 1 < pages.length ? {nextCursor:repeatCursor ? '0' : String(page + 1)} : {})}}));
|
|
22
|
+
}
|
|
23
|
+
});\n`);
|
|
24
|
+
const specPath = join(dir, 'probe.json');
|
|
25
|
+
writeFileSync(specPath, JSON.stringify({
|
|
26
|
+
schemaVersion: 1,
|
|
27
|
+
name: 'fixture-server',
|
|
28
|
+
transport: 'stdio',
|
|
29
|
+
command: process.execPath,
|
|
30
|
+
args: [join(dir, 'server.mjs')],
|
|
31
|
+
cwd: process.cwd(),
|
|
32
|
+
timeoutMs: 5000,
|
|
33
|
+
}));
|
|
34
|
+
return specPath;
|
|
35
|
+
}
|
|
36
|
+
test('probeMcpStdio negotiates, lists tools, and audits model-facing metadata', async (t) => {
|
|
37
|
+
const spec = loadMcpProbeSpec(fixture(t, [{
|
|
38
|
+
name: 'search',
|
|
39
|
+
description: 'Search fixture records',
|
|
40
|
+
inputSchema: { type: 'object', properties: { query: { type: 'string' } } },
|
|
41
|
+
annotations: { readOnlyHint: true },
|
|
42
|
+
}]));
|
|
43
|
+
const result = await probeMcpStdio(spec);
|
|
44
|
+
assert.equal(result.protocolVersion, '2025-11-25');
|
|
45
|
+
assert.deepEqual(result.capabilities, ['tools']);
|
|
46
|
+
assert.deepEqual(result.tools, [{ name: 'search', description: true, inputSchema: true, annotations: true }]);
|
|
47
|
+
assert.deepEqual(result.warnings, []);
|
|
48
|
+
assert.match(renderMcpProbe(result), /No tools were called/);
|
|
49
|
+
});
|
|
50
|
+
test('probeMcpStdio warns about missing descriptions and annotations', async (t) => {
|
|
51
|
+
const result = await probeMcpStdio(loadMcpProbeSpec(fixture(t, [{ name: 'lookup', inputSchema: { type: 'object' } }])));
|
|
52
|
+
assert.equal(result.warnings.length, 2);
|
|
53
|
+
assert.match(result.warnings.join('\n'), /routing will be unreliable/);
|
|
54
|
+
assert.match(result.warnings.join('\n'), /read\/write risk hints/);
|
|
55
|
+
});
|
|
56
|
+
test('probeMcpStdio rejects invalid tool schemas', async (t) => {
|
|
57
|
+
await assert.rejects(probeMcpStdio(loadMcpProbeSpec(fixture(t, [{ name: 'broken' }]))), /missing an object inputSchema/);
|
|
58
|
+
});
|
|
59
|
+
test('probeMcpStdio terminates a server that keeps running after tools/list', { timeout: 3000 }, async (t) => {
|
|
60
|
+
const result = await probeMcpStdio(loadMcpProbeSpec(fixture(t, [], true)));
|
|
61
|
+
assert.equal(result.tools.length, 0);
|
|
62
|
+
});
|
|
63
|
+
test('probeMcpStdio rejects a non-object JSON message without crashing the process', async (t) => {
|
|
64
|
+
await assert.rejects(probeMcpStdio(loadMcpProbeSpec(fixture(t, [], false, { rawResponse: [] }))), /MCP message must be an object/);
|
|
65
|
+
});
|
|
66
|
+
test('probeMcpStdio collects every tools/list page', async (t) => {
|
|
67
|
+
const first = { name: 'first', inputSchema: { type: 'object' } };
|
|
68
|
+
const second = { name: 'second', inputSchema: { type: 'object' } };
|
|
69
|
+
const result = await probeMcpStdio(loadMcpProbeSpec(fixture(t, [], false, { pages: [[first], [second]] })));
|
|
70
|
+
assert.deepEqual(result.tools.map((tool) => tool.name), ['first', 'second']);
|
|
71
|
+
assert.match(renderMcpProbe(result), /2 tool\(s\)/);
|
|
72
|
+
});
|
|
73
|
+
test('probeMcpStdio rejects repeated pagination cursors', async (t) => {
|
|
74
|
+
await assert.rejects(probeMcpStdio(loadMcpProbeSpec(fixture(t, [], false, { repeatCursor: true }))), /pagination did not terminate/);
|
|
75
|
+
});
|
|
76
|
+
test('probeMcpStdio refuses an unsupported negotiated protocol version', async (t) => {
|
|
77
|
+
const response = { jsonrpc: '2.0', id: 1, result: {
|
|
78
|
+
protocolVersion: '2024-11-05', capabilities: { tools: {} }, serverInfo: { name: 'old', version: '1' },
|
|
79
|
+
} };
|
|
80
|
+
await assert.rejects(probeMcpStdio(loadMcpProbeSpec(fixture(t, [], false, { rawResponse: response }))), /unsupported protocol version/);
|
|
81
|
+
});
|
|
82
|
+
test('probeMcpStdio refuses a server without declared tools capability', async (t) => {
|
|
83
|
+
const response = { jsonrpc: '2.0', id: 1, result: {
|
|
84
|
+
protocolVersion: '2025-11-25', capabilities: {}, serverInfo: { name: 'no-tools', version: '1' },
|
|
85
|
+
} };
|
|
86
|
+
await assert.rejects(probeMcpStdio(loadMcpProbeSpec(fixture(t, [], false, { rawResponse: response }))), /did not declare tools capability/);
|
|
87
|
+
});
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="460" viewBox="0 0 1200 460" role="img" aria-labelledby="title desc" lang="en">
|
|
2
|
+
<title id="title">A paired configuration experiment</title>
|
|
3
|
+
<desc id="desc">The same task enters baseline and treatment runs. skillfit compares task outcome, token use, and uncertainty before an installation decision.</desc>
|
|
4
|
+
<rect width="1200" height="460" rx="24" fill="#0c1729"/>
|
|
5
|
+
<rect x="48" y="38" width="54" height="54" rx="13" fill="#172842"/>
|
|
6
|
+
<path d="M69 52h-5a4 4 0 0 0-4 4v18a4 4 0 0 0 4 4h5m12-26h5a4 4 0 0 1 4 4v18a4 4 0 0 1-4 4h-5" fill="none" stroke="#69d9ce" stroke-width="4" stroke-linecap="round"/>
|
|
7
|
+
<path d="M75 58 82 65 75 72 68 65Z" fill="#f5f8ff"/>
|
|
8
|
+
<text x="122" y="63" fill="#f5f8ff" font-family="Segoe UI,Arial,sans-serif" font-size="30" font-weight="700">Decide with a paired test.</text>
|
|
9
|
+
<text x="122" y="90" fill="#b7c7d9" font-family="Segoe UI,Arial,sans-serif" font-size="18">One task, two configurations, an auditable result.</text>
|
|
10
|
+
|
|
11
|
+
<g font-family="Segoe UI,Arial,sans-serif">
|
|
12
|
+
<rect x="48" y="148" width="270" height="246" rx="16" fill="#14253d" stroke="#35506a" stroke-width="2"/>
|
|
13
|
+
<rect x="70" y="174" width="45" height="51" rx="5" fill="none" stroke="#8eabc2" stroke-width="3"/>
|
|
14
|
+
<path d="M80 188h25m-25 10h25m-25 10h16" stroke="#8eabc2" stroke-width="3" stroke-linecap="round"/>
|
|
15
|
+
<text x="70" y="263" fill="#f5f8ff" font-size="25" font-weight="700">Same task</text>
|
|
16
|
+
<text x="70" y="303" fill="#cad7e5" font-size="18">Prompt + fixture</text>
|
|
17
|
+
<text x="70" y="331" fill="#cad7e5" font-size="18">held constant in both runs</text>
|
|
18
|
+
|
|
19
|
+
<path d="M318 270h57m0 0v-68m0 68v68m0-136h43m-43 136h43" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
20
|
+
<path d="m410 195 9 7-9 7m0 122 9 7-9 7" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
21
|
+
|
|
22
|
+
<rect x="430" y="148" width="300" height="108" rx="15" fill="#14253d" stroke="#55d6c8" stroke-width="2"/>
|
|
23
|
+
<circle cx="460" cy="180" r="7" fill="#55d6c8"/>
|
|
24
|
+
<text x="479" y="187" fill="#f5f8ff" font-size="23" font-weight="700">Baseline</text>
|
|
25
|
+
<text x="459" y="226" fill="#cad7e5" font-size="18">Current configuration</text>
|
|
26
|
+
|
|
27
|
+
<rect x="430" y="286" width="300" height="108" rx="15" fill="#14253d" stroke="#91a7ff" stroke-width="2"/>
|
|
28
|
+
<circle cx="460" cy="318" r="7" fill="#91a7ff"/>
|
|
29
|
+
<text x="479" y="325" fill="#f5f8ff" font-size="23" font-weight="700">Treatment</text>
|
|
30
|
+
<text x="459" y="364" fill="#cad7e5" font-size="18">One changed setting</text>
|
|
31
|
+
|
|
32
|
+
<path d="M730 202h44m-44 138h44m0-138v138m0-69h37" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
33
|
+
<path d="m803 264 9 7-9 7" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
34
|
+
|
|
35
|
+
<rect x="824" y="148" width="328" height="246" rx="16" fill="#14253d" stroke="#526b90" stroke-width="2"/>
|
|
36
|
+
<text x="850" y="190" fill="#f5f8ff" font-size="25" font-weight="700">Compare results</text>
|
|
37
|
+
<path d="M850 208h276" stroke="#35506a" stroke-width="2"/>
|
|
38
|
+
<circle cx="859" cy="242" r="5" fill="#55d6c8"/>
|
|
39
|
+
<text x="876" y="249" fill="#cad7e5" font-size="18">Task outcome</text>
|
|
40
|
+
<circle cx="859" cy="278" r="5" fill="#55d6c8"/>
|
|
41
|
+
<text x="876" y="285" fill="#cad7e5" font-size="18">Token use</text>
|
|
42
|
+
<circle cx="859" cy="314" r="5" fill="#55d6c8"/>
|
|
43
|
+
<text x="876" y="321" fill="#cad7e5" font-size="18">Confidence interval</text>
|
|
44
|
+
<rect x="850" y="344" width="276" height="32" rx="8" fill="#55d6c8"/>
|
|
45
|
+
<text x="988" y="366" text-anchor="middle" fill="#0c1729" font-size="16" font-weight="700">Install with evidence</text>
|
|
46
|
+
</g>
|
|
47
|
+
</svg>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="460" viewBox="0 0 1200 460" role="img" aria-labelledby="title desc" lang="zh-CN">
|
|
2
|
+
<title id="title">配置的配对实验</title>
|
|
3
|
+
<desc id="desc">同一个任务分别在基线组和实验组运行。skillfit 比较任务结果、Token 消耗和不确定性,再决定是否安装。</desc>
|
|
4
|
+
<rect width="1200" height="460" rx="24" fill="#0c1729"/>
|
|
5
|
+
<rect x="48" y="38" width="54" height="54" rx="13" fill="#172842"/>
|
|
6
|
+
<path d="M69 52h-5a4 4 0 0 0-4 4v18a4 4 0 0 0 4 4h5m12-26h5a4 4 0 0 1 4 4v18a4 4 0 0 1-4 4h-5" fill="none" stroke="#69d9ce" stroke-width="4" stroke-linecap="round"/>
|
|
7
|
+
<path d="M75 58 82 65 75 72 68 65Z" fill="#f5f8ff"/>
|
|
8
|
+
<text x="122" y="63" fill="#f5f8ff" font-family="Noto Sans CJK SC,Microsoft YaHei,PingFang SC,sans-serif" font-size="30" font-weight="700">用配对实验决定配置</text>
|
|
9
|
+
<text x="122" y="90" fill="#b7c7d9" font-family="Noto Sans CJK SC,Microsoft YaHei,PingFang SC,sans-serif" font-size="18">同一任务,两种配置,结果可复核。</text>
|
|
10
|
+
|
|
11
|
+
<g font-family="Noto Sans CJK SC,Microsoft YaHei,PingFang SC,sans-serif">
|
|
12
|
+
<rect x="48" y="148" width="270" height="246" rx="16" fill="#14253d" stroke="#35506a" stroke-width="2"/>
|
|
13
|
+
<rect x="70" y="174" width="45" height="51" rx="5" fill="none" stroke="#8eabc2" stroke-width="3"/>
|
|
14
|
+
<path d="M80 188h25m-25 10h25m-25 10h16" stroke="#8eabc2" stroke-width="3" stroke-linecap="round"/>
|
|
15
|
+
<text x="70" y="263" fill="#f5f8ff" font-size="25" font-weight="700">同一任务</text>
|
|
16
|
+
<text x="70" y="303" fill="#cad7e5" font-size="18">提示词+项目样本</text>
|
|
17
|
+
<text x="70" y="331" fill="#cad7e5" font-size="18">两组输入保持一致</text>
|
|
18
|
+
|
|
19
|
+
<path d="M318 270h57m0 0v-68m0 68v68m0-136h43m-43 136h43" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
20
|
+
<path d="m410 195 9 7-9 7m0 122 9 7-9 7" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
21
|
+
|
|
22
|
+
<rect x="430" y="148" width="300" height="108" rx="15" fill="#14253d" stroke="#55d6c8" stroke-width="2"/>
|
|
23
|
+
<circle cx="460" cy="180" r="7" fill="#55d6c8"/>
|
|
24
|
+
<text x="479" y="187" fill="#f5f8ff" font-size="23" font-weight="700">基线组</text>
|
|
25
|
+
<text x="459" y="226" fill="#cad7e5" font-size="18">当前配置</text>
|
|
26
|
+
|
|
27
|
+
<rect x="430" y="286" width="300" height="108" rx="15" fill="#14253d" stroke="#91a7ff" stroke-width="2"/>
|
|
28
|
+
<circle cx="460" cy="318" r="7" fill="#91a7ff"/>
|
|
29
|
+
<text x="479" y="325" fill="#f5f8ff" font-size="23" font-weight="700">实验组</text>
|
|
30
|
+
<text x="459" y="364" fill="#cad7e5" font-size="18">只调整一项配置</text>
|
|
31
|
+
|
|
32
|
+
<path d="M730 202h44m-44 138h44m0-138v138m0-69h37" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
33
|
+
<path d="m803 264 9 7-9 7" fill="none" stroke="#8eabc2" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
34
|
+
|
|
35
|
+
<rect x="824" y="148" width="328" height="246" rx="16" fill="#14253d" stroke="#526b90" stroke-width="2"/>
|
|
36
|
+
<text x="850" y="190" fill="#f5f8ff" font-size="25" font-weight="700">比较结果</text>
|
|
37
|
+
<path d="M850 208h276" stroke="#35506a" stroke-width="2"/>
|
|
38
|
+
<circle cx="859" cy="242" r="5" fill="#55d6c8"/>
|
|
39
|
+
<text x="876" y="249" fill="#cad7e5" font-size="18">任务结果</text>
|
|
40
|
+
<circle cx="859" cy="278" r="5" fill="#55d6c8"/>
|
|
41
|
+
<text x="876" y="285" fill="#cad7e5" font-size="18">Token 消耗</text>
|
|
42
|
+
<circle cx="859" cy="314" r="5" fill="#55d6c8"/>
|
|
43
|
+
<text x="876" y="321" fill="#cad7e5" font-size="18">置信区间</text>
|
|
44
|
+
<rect x="850" y="344" width="276" height="32" rx="8" fill="#55d6c8"/>
|
|
45
|
+
<text x="988" y="366" text-anchor="middle" fill="#0c1729" font-size="16" font-weight="700">按证据决定是否安装</text>
|
|
46
|
+
</g>
|
|
47
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">skillfit</title>
|
|
3
|
+
<desc id="desc">Two matching experiment brackets surrounding a measured result.</desc>
|
|
4
|
+
<rect x="2" y="2" width="124" height="124" rx="28" fill="#0c1729"/>
|
|
5
|
+
<path d="M45 31H36a9 9 0 0 0-9 9v48a9 9 0 0 0 9 9h9" fill="none" stroke="#55d6c8" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M83 31h9a9 9 0 0 1 9 9v48a9 9 0 0 1-9 9h-9" fill="none" stroke="#91a7ff" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
<path d="M64 46 82 64 64 82 46 64Z" fill="#f5f8ff"/>
|
|
8
|
+
<circle cx="64" cy="64" r="5" fill="#0c1729"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Audit triage + work order — 2026-09-24
|
|
2
|
+
|
|
3
|
+
Companion to `docs/audit-2026-09-24.md`. That document is the findings list; this one is the
|
|
4
|
+
execution contract: what has been independently re-verified, what to build, in what order, and the
|
|
5
|
+
bar each change must clear. Where the two disagree, **this document wins**.
|
|
6
|
+
|
|
7
|
+
Executing session: read the audit first, then this. Do not edit the audit's findings sections —
|
|
8
|
+
record outcomes in a new `## Disposition` section appended at its end (one line per finding:
|
|
9
|
+
`FIXED <commit>`, `KILLED <reason>`, or `DEFERRED <reason>`).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Verification status (second reviewer, on `e1ced97`)
|
|
14
|
+
|
|
15
|
+
Every claim below marked **confirmed** was re-checked line-by-line or by live reproduction
|
|
16
|
+
(`npm test` → 222/222 green; `bench check benches/debugging` → all green with 0 warnings despite
|
|
17
|
+
zero oracles, exactly as the audit claims).
|
|
18
|
+
|
|
19
|
+
**Confirmed, safe to fix as specified:** A1, A2, A3, A4 (counts: feat-slug 1, async-queue 6,
|
|
20
|
+
ttl-cache 8, chunked-decoder 10, range-parser 12, debug-redaction 12), A5 (verbatim), A6 (verbatim),
|
|
21
|
+
A7 (verbatim), A8 (verbatim), A9 (verbatim), A10, A11, A12, B1, B2, B3, C1, C2.
|
|
22
|
+
|
|
23
|
+
**Promoted from [reported] to confirmed** (I verified these myself):
|
|
24
|
+
|
|
25
|
+
- **B5** — `src/harness/trigger.ts:53-59`: `precision`/`f1` are bare `number | null`; only recall and
|
|
26
|
+
false-trigger rate carry Wilson intervals. Fix: precision is also a proportion
|
|
27
|
+
(fired_positives / all fired) — `wilson95` applies with n = total fired. F1 is a harmonic mean of
|
|
28
|
+
two proportions and has no closed-form binomial interval: report F1 bare and say so in
|
|
29
|
+
`docs/metrics.md`, or drop F1. Do not fake a CI for it.
|
|
30
|
+
- **B6** — `src/harness/trigger.ts:103-105` copies only the skill under test into
|
|
31
|
+
`runDir/<skillInstallDir>/`, while `docs/metrics.md:68-70` claims the sandbox "contains the user's
|
|
32
|
+
real set." Confirmed divergence. **Fix = weaken the doc claim now** (use the `(Status: spec)`
|
|
33
|
+
convention from `metrics.md:48`); implementing real-set lexical competition involves fingerprinting
|
|
34
|
+
and privacy questions — file it as a future enhancement, do not build it in this pass.
|
|
35
|
+
- **B7** — `src/harness/judge.ts:25-41` interpolates both answers verbatim into the judge prompt, and
|
|
36
|
+
`parseChecklist` (`judge.ts:47`) takes the **first** regex match, so an answer embedding a checklist
|
|
37
|
+
JSON flips the verdict. Confirmed. Fix: fence answers with explicit delimiters plus an instruction
|
|
38
|
+
to ignore embedded JSON, and parse the **last** JSON-looking line of the judge reply (same contract
|
|
39
|
+
style as verifiers), not the first regex match anywhere.
|
|
40
|
+
- **B8 — confirmed in substance, but the audit's citation is wrong.** The `workspace: true` flag is
|
|
41
|
+
set at `src/harness/runner.ts:143` (`{ workspace: task.verifierKind === 'command' }`), not
|
|
42
|
+
`eval.ts:68-74` (that range contains nothing relevant). The substance stands: `ApiExecutor.run`
|
|
43
|
+
ignores the workdir (`executors/api.ts:50`), so an API-key eval on a command-kind bench produces an
|
|
44
|
+
impossible instruction and both arms score 0. Fix: at plan time, if `executor.describe().kind ===
|
|
45
|
+
'api'` and any task is `verifierKind: 'command'`, throw with a clear message (API executors support
|
|
46
|
+
output-kind benches only).
|
|
47
|
+
|
|
48
|
+
**Corrected while verifying:**
|
|
49
|
+
|
|
50
|
+
- **B9 — mostly subsumed, severity overstated.** `pairedBootstrapCI` (`stats.ts:50-79`) resamples
|
|
51
|
+
*tasks* (cluster bootstrap) and `pooledDelta` averages each arm separately, so unequal arm lengths
|
|
52
|
+
do not corrupt the resample weights as the audit speculates. The real residue is only that score
|
|
53
|
+
arrays are null-filtered per arm independently (`runner.ts:480-485`). **Disposition: no separate
|
|
54
|
+
fix** — the B1 fix below filters scores with the same per-trial pair filter, which removes the
|
|
55
|
+
asymmetry en passant. Note this in the audit's Disposition section.
|
|
56
|
+
|
|
57
|
+
**Still unconfirmed leads — reproduce before touching code:** B4, C3–C13, plus the two "smaller
|
|
58
|
+
notes" (persisted `--verifier-cmd` re-execution; `shell: false` verifier spawn vs `.cmd` on
|
|
59
|
+
Windows). §5 gives reproduction steps. If a lead does not reproduce, write `KILLED <reason>` in the
|
|
60
|
+
audit Disposition and move on. Do not fix what you have not reproduced.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 2. Amendments to the audit's fix specs
|
|
65
|
+
|
|
66
|
+
These are binding. They come from re-reading the cited code, not preference.
|
|
67
|
+
|
|
68
|
+
1. **B1 is Wave 1, not Wave 3.** It silently manufactures discordant pairs at exactly the 3–5-trial
|
|
69
|
+
scale the tool targets. The audit itself flags Wave-3-first as defensible; with B1's diff being
|
|
70
|
+
the same size as A1's, there is no reason to wait.
|
|
71
|
+
2. **B1 fix must pair by trial number before filtering.** Build `Map<trial, {baseline, treatment}>`,
|
|
72
|
+
drop any pair where either side has `error !== null`, then compute stats/McNemar from the
|
|
73
|
+
survivors. Independent per-arm filtering (the audit's literal wording) would recreate the B9
|
|
74
|
+
misalignment inside McNemar. Apply the same surviving-pairs filter to the score arrays
|
|
75
|
+
(`runner.ts:480-485`). Carry `errors: number` on `ConditionStats`, surface a per-arm warning when
|
|
76
|
+
> 0, and record it in the manifest. Mirror `trigger.ts:196-199`'s existing behavior.
|
|
77
|
+
3. **B2: interleave, but do not promise a seed.** Change the loops to
|
|
78
|
+
`for trial { for condition }` — cheap and real. But kimi/codex headless CLIs expose no seed or
|
|
79
|
+
temperature knob, so `docs/metrics.md:27`'s "same seed" is a claim the surface cannot honor.
|
|
80
|
+
Record `sampling: null` (or the actual values if a future surface offers them) in the manifest's
|
|
81
|
+
executor block, and reword `metrics.md:27` to state what is actually controlled: same fixture,
|
|
82
|
+
same prompt, interleaved order, seed recorded (null where unsupported). This is an explicit
|
|
83
|
+
doc-weakening row — say so in the commit message.
|
|
84
|
+
4. **B3 fix:** run the judge with cwd = a fresh `mkdtempSync` directory containing only
|
|
85
|
+
`answerA.md` / `answerB.md`; keep the existing seed derivation (`runGroup:task:trial`)
|
|
86
|
+
unchanged; write `judge-trial-N.json` into the task directory *after* the call, never use the
|
|
87
|
+
task directory as cwd. Acceptance test: the judge executor's observed cwd must contain no
|
|
88
|
+
`_result.json`.
|
|
89
|
+
5. **A1 gate level is WARN, not FAIL.** `bench add --freeze` legitimately produces oracle-less tasks
|
|
90
|
+
mid-authoring; a hard fail would block the intended workflow. The warning must name the
|
|
91
|
+
consequence: "no oracle — task winnability is unverified."
|
|
92
|
+
6. **A7/A8/A9 change scoring or difficulty of a published bench.** Each lands with: a CHANGELOG
|
|
93
|
+
entry under Unreleased stating the bench changed materially, and a fresh `--calibrate` run
|
|
94
|
+
afterwards before any new evidence claims are made against that bench. Old evidence entries stay
|
|
95
|
+
untouched (append-only); they describe the old bench version.
|
|
96
|
+
7. **A10 minimal move only.** Once A2 lands the six oracles, make `bench check` run each oracle
|
|
97
|
+
against the mock arm for command-kind tasks (the winnability direction, offline). Do not build
|
|
98
|
+
the file-patch mock extension unless that proves insufficient.
|
|
99
|
+
8. **C2 semantics are an explicit decision:** `install --dry-run` reports conflicts in the plan
|
|
100
|
+
output and exits 0; add `--strict` for the CI case that wants non-zero. Document both in
|
|
101
|
+
`--help` and README. (New flag → README.md plus all four translations.)
|
|
102
|
+
9. **Waves 1 and 2 land in the same wave, as separate commits.** The moment the WARN gates exist,
|
|
103
|
+
`bench check` on the bundled benches warns until the examples are fixed — main must not sit in a
|
|
104
|
+
state where our own teaching material trips its own gate without the fix commits right behind.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 3. Work order
|
|
109
|
+
|
|
110
|
+
### Wave 0 — confirm or kill (do first, it's mostly reading)
|
|
111
|
+
|
|
112
|
+
Work through §5's reproductions for B4 and C3–C13. Write one Disposition line per item in the
|
|
113
|
+
audit doc. Budget: this is triage, not fixing. Fixes for survivors join Wave 3.
|
|
114
|
+
|
|
115
|
+
### Wave 1 — gates + verified measurement bugs
|
|
116
|
+
|
|
117
|
+
One commit per finding, message references the audit ID. Tests first or in the same commit.
|
|
118
|
+
|
|
119
|
+
| ID | Where | Fix (per §2 amendments) | Acceptance |
|
|
120
|
+
|---|---|---|---|
|
|
121
|
+
| A1 | `src/commands/bench.ts:337` | WARN when `task.oracle` absent | test: oracle-less bench warns; oracle bench doesn't |
|
|
122
|
+
| A4 | bench check, verifier JSON `checks` array | WARN when count outside 2–8 | tests at 1 and 12; pass at 2 and 8 |
|
|
123
|
+
| A3 | `bench.ts:405-460`, `trigger.ts:279` | FAIL loudly when 0 tasks eligible for calibration ("calibration ran 0 tasks: difficulty unmeasured"); decouple calibration from `runTriggerExperiment` — drive the inject path with the existing empty `calibration-none` skill | test: unlabelled bench → FAIL line, never `PASS 0/0` |
|
|
124
|
+
| A12 | `bench.ts:385-390` | WARN when negative controls < 30% (not only at 0) | test with 20% fixture bench |
|
|
125
|
+
| B1 | `runner.ts:155-182, 243-258, 324-330, 460-479` | pair-by-trial, drop errored pairs, `errors` count + warning (amendment 2) | test: executor throws on baseline trial 2 → that trial excluded from both arms, error counted, verdict not moved by the hole |
|
|
126
|
+
| B2 | `runner.ts:460-469` + `metrics.md:27` + manifest executor block | interleave loops; record `sampling: null`; reword doc (amendment 3) | test: run order interleaves conditions per trial |
|
|
127
|
+
| B3 | `runner.ts:296-320` | judge cwd = fresh temp dir with only the two answers (amendment 4) | test: judge cwd contains no `_result.json` |
|
|
128
|
+
| B5 | `trigger.ts:53-59` + `metrics.md:56` | Wilson CI for precision; F1 bare with a doc note | test: precision CI present, sane bounds |
|
|
129
|
+
| B7 | `judge.ts:25-47` | delimited answer fencing; parse last JSON line, not first match | test: answer embedding a checklist JSON does not flip the verdict |
|
|
130
|
+
| B8 | `runner.ts:143`, `commands/eval.ts` plan path | throw when api executor meets command-kind bench | test: clear error, no run started |
|
|
131
|
+
|
|
132
|
+
### Wave 2 — examples match the paradigm
|
|
133
|
+
|
|
134
|
+
| ID | Fix | Notes |
|
|
135
|
+
|---|---|---|
|
|
136
|
+
| A2 | Write 6 `oracle-<id>.mjs` from the corrected implementations already fenced in `benches/debugging/ground-truth/*.md`; register in `bench.json`. `benches/code-review/ground-truth/oracle-r1.mjs` shows the shape. | After this, `bench check benches/debugging` shows oracle PASS lines |
|
|
137
|
+
| A5 | `feat-slug.mjs`: port the canonical-test comparison from `ttl-cache.mjs`; add 2–4 edge checks (unicode, consecutive separators, empty input); use `process.execPath` instead of PATH `node` | closes the rewrite-the-test cheat |
|
|
138
|
+
| A6 | `range-parser.mjs`: canonical comparison or behavior-based regression assertions; total checks ≤ 8 | the 10 behavior checks are sound; replace the 2 hollow ones |
|
|
139
|
+
| A7 | `seeded-bugs.mjs` + r2/r3 variants: add `no-false-positives` check failing on `decoyHits.length > 0`; tighten `missing-tests` to require a coverage assertion, not the bare word "test" | amendment 6: CHANGELOG + re-calibrate |
|
|
140
|
+
| A8 | `debug-redaction.mjs:256-260`: drop the notes-regex check (the restore-original check at `:245-254` already grades the real outcome); rebalance sections to land in 2–8 | |
|
|
141
|
+
| A9 | De-spec `prompts/ttl-cache.md` and `prompts/range-parser.md` (symptom + failing repro, no defect enumeration); keep exactly one deliberately spec-style task, labelled as such | amendment 6: difficulty changed — re-calibrate |
|
|
142
|
+
| A12 | Add two negative controls (one per bench) to clear your own new 30% gate | |
|
|
143
|
+
|
|
144
|
+
### Wave 3 — robustness (confirmed items only)
|
|
145
|
+
|
|
146
|
+
1. **C1 first** — it is the only finding that can leave a user permanently stuck with a false error
|
|
147
|
+
message. Stage all writes to a temp location, rename in one pass, back up the lockfile too, and
|
|
148
|
+
make recovery able to adopt an unrecorded-but-hash-matching write instead of hard-conflicting.
|
|
149
|
+
2. **C2** — per amendment 8 (`--strict`).
|
|
150
|
+
3. Survivors of Wave 0, one commit each, smallest fix that closes the hole.
|
|
151
|
+
|
|
152
|
+
### Wave 4 — the authoring guide (the audit's §6 "missing artifact")
|
|
153
|
+
|
|
154
|
+
Write `docs/bench-authoring.md`: the seven steps walked end to end on one real task (freeze →
|
|
155
|
+
shrink → grader → mine alternative → trigger variant → labels/decoys/mock → rehearse), with each
|
|
156
|
+
step's non-optional rationale. Link it from `README.md` (plus translations), `benches/README.md`,
|
|
157
|
+
`benches/contrib/README.md`, and `docs/metrics.md`. **Write it after Waves 1–2 land** — the guide
|
|
158
|
+
must describe gates that actually exist. This document is the deliverable the audit calls "the
|
|
159
|
+
product"; treat it that way.
|
|
160
|
+
|
|
161
|
+
Also fold A11 into this wave: `benches/contrib/README.md` keeps its PR checklist but links the
|
|
162
|
+
guide as the required reading before rule 1.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 4. Acceptance bar (applies to every item)
|
|
167
|
+
|
|
168
|
+
- `npm test` green before every commit — read the **full** summary block (`# pass` / `# fail`),
|
|
169
|
+
never a grep-filtered tail. A previous session pushed red while believing green because of
|
|
170
|
+
filtered output.
|
|
171
|
+
- Tests are `node:test`, offline, `MockExecutor` / injected fs roots. Never call a real model API or
|
|
172
|
+
agent CLI from tests.
|
|
173
|
+
- Zero runtime dependencies. ESM relative imports carry `.js`. Agent-specific behavior comes from
|
|
174
|
+
`src/matrix/agents.json`; matrix edits need a `verifiedAt` bump + docs link.
|
|
175
|
+
- Docs updated in the **same commit** as the behavior change. Every row of the audit's §5
|
|
176
|
+
divergence table ends either fixed-in-code or explicitly marked `(Status: spec)` per the
|
|
177
|
+
`metrics.md:48` convention — no row stays ambiguous.
|
|
178
|
+
- CHANGELOG entry per wave under Unreleased.
|
|
179
|
+
- CLI output English. New/changed user-facing flags → `README.md` + zh-CN/ja/ko/es mirrors.
|
|
180
|
+
- `evidence/` is append-only. `runs/` is gitignored local output.
|
|
181
|
+
- Never touch `workspace4skills/` (private lab). Never `git clean -fdx`.
|
|
182
|
+
- Out of scope for this pass: npm publish (needs the owner's 2FA), Claude Code support (no account;
|
|
183
|
+
off the roadmap), real-set competition in trigger mode (B6 enhancement), the file-patch mock
|
|
184
|
+
extension (A10 full version).
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 5. Reproductions for the remaining leads
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# B4 — resolution line absent + rounding destroys CI width
|
|
192
|
+
node dist/cli.js eval <any-skill> --bench benches/code-review --executor mock --trials 2 \
|
|
193
|
+
--run-group b4-repro # then read runs/b4-repro/manifest + printed report:
|
|
194
|
+
# is there a "resolves effects ≳ ±Xpp" line? are CI bounds integer-rounded?
|
|
195
|
+
|
|
196
|
+
# C3 — EPIPE on stdin (cli.ts:162-165): point an executor at a bogus agent flag in a scratch copy
|
|
197
|
+
# of agents.json (never edit the real one for this) and watch for uncaught EPIPE vs rejection.
|
|
198
|
+
|
|
199
|
+
# C4 — kill only signals the shell (cli.ts:121-124): start a long mock-sleep trial, let the
|
|
200
|
+
# timeout fire, then `ps` / Task Manager for surviving child processes.
|
|
201
|
+
|
|
202
|
+
# C5 — rl.question hangs on non-TTY (install.ts:535-543, bench.ts:136-144):
|
|
203
|
+
echo "" | node dist/cli.js install recommended --agent kimi-code # without --yes, from CI-like stdin
|
|
204
|
+
|
|
205
|
+
# C6 — doctor exits 0 on bad agent id:
|
|
206
|
+
node dist/cli.js doctor --agent bogus; echo "exit=$?" # expect non-zero, audit says 0
|
|
207
|
+
|
|
208
|
+
# C7 — turn.completed overwritten not accumulated (cli.ts:256-266): needs a multi-turn stream
|
|
209
|
+
# fixture; write one under test fixtures and assert accumulation.
|
|
210
|
+
|
|
211
|
+
# C8 — two parseFrontmatter implementations diverge (install.ts:211-220 vs doctor.ts:128-155):
|
|
212
|
+
# feed a SKILL.md with BOM and a `description: >-` folded scalar to both paths.
|
|
213
|
+
|
|
214
|
+
# C9/C10 — git mining parsing (bench.ts:946-953, 973-989): mine a commit with a non-ASCII path
|
|
215
|
+
# and one with a rename (R100); watch gitShow failures and totalBytes NaN.
|
|
216
|
+
|
|
217
|
+
# C11 — report "Overall" mixes populations (report.ts:70-73): craft a receipt set where one skill
|
|
218
|
+
# is installed for 2+ agents; check fired/never arithmetic against installed.size.
|
|
219
|
+
|
|
220
|
+
# C12 — hardcoded 'kimi-code' in harness (cli.ts:154): confirmed by reading; fix = matrix
|
|
221
|
+
# capability flag + agents.json entry (verifiedAt bump).
|
|
222
|
+
|
|
223
|
+
# C13 — quoteShellArg passes whitespace-free strings unquoted (cli.ts:25-30): confirmed by
|
|
224
|
+
# reading; assess exploitability (today only agents.json feeds it), then fix by quoting
|
|
225
|
+
# everything or documenting the trust boundary in SECURITY.md.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Windows note for the executing session: the Bash tool here is Git Bash. Heredocs eat backslashes —
|
|
229
|
+
write any script containing regex or Windows paths with the Write tool, never inline. Nested
|
|
230
|
+
`node --test` inherits `NODE_TEST_CONTEXT` and silently runs zero tests — the existing verifiers
|
|
231
|
+
scrub it; keep that pattern in anything new.
|