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.
Files changed (371) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +226 -2
  3. package/README.zh-CN.md +224 -0
  4. package/benches/README.md +172 -0
  5. package/benches/code-review/bench.json +57 -0
  6. package/benches/code-review/fixtures/explain-x1/.skillfit-mock.json +10 -0
  7. package/benches/code-review/fixtures/explain-x1/SPEC.md +16 -0
  8. package/benches/code-review/fixtures/explain-x1/src/compact.js +18 -0
  9. package/benches/code-review/fixtures/explain-x1/tests/compact.test.js +18 -0
  10. package/benches/code-review/fixtures/review-r1/.skillfit-mock.json +10 -0
  11. package/benches/code-review/fixtures/review-r1/CHANGES.diff +42 -0
  12. package/benches/code-review/fixtures/review-r1/SPEC.md +16 -0
  13. package/benches/code-review/fixtures/review-r1/src/errors.js +7 -0
  14. package/benches/code-review/fixtures/review-r1/src/money.js +3 -0
  15. package/benches/code-review/fixtures/review-r1/src/order.js +13 -0
  16. package/benches/code-review/fixtures/review-r1/tests/order.test.js +17 -0
  17. package/benches/code-review/fixtures/review-r2/.skillfit-mock.json +10 -0
  18. package/benches/code-review/fixtures/review-r2/CHANGES.diff +81 -0
  19. package/benches/code-review/fixtures/review-r2/SPEC.md +25 -0
  20. package/benches/code-review/fixtures/review-r2/src/errors.js +7 -0
  21. package/benches/code-review/fixtures/review-r2/src/invoice.js +9 -0
  22. package/benches/code-review/fixtures/review-r2/src/money.js +3 -0
  23. package/benches/code-review/fixtures/review-r2/tests/invoice.test.js +13 -0
  24. package/benches/code-review/fixtures/review-r3/.skillfit-mock.json +10 -0
  25. package/benches/code-review/fixtures/review-r3/CHANGES.diff +76 -0
  26. package/benches/code-review/fixtures/review-r3/SPEC.md +24 -0
  27. package/benches/code-review/fixtures/review-r3/src/errors.js +7 -0
  28. package/benches/code-review/fixtures/review-r3/src/money.js +3 -0
  29. package/benches/code-review/fixtures/review-r3/src/pricing.js +20 -0
  30. package/benches/code-review/fixtures/review-r3/tests/pricing.test.js +15 -0
  31. package/benches/code-review/fixtures/summarize-s1/.skillfit-mock.json +16 -0
  32. package/benches/code-review/fixtures/summarize-s1/CHANGES.diff +27 -0
  33. package/benches/code-review/fixtures/summarize-s1/SPEC.md +15 -0
  34. package/benches/code-review/fixtures/summarize-s1/src/discount.js +20 -0
  35. package/benches/code-review/fixtures/summarize-s1/src/errors.js +7 -0
  36. package/benches/code-review/fixtures/summarize-s1/src/money.js +7 -0
  37. package/benches/code-review/ground-truth/oracle-r1.mjs +21 -0
  38. package/benches/code-review/ground-truth/oracle-r2.mjs +21 -0
  39. package/benches/code-review/ground-truth/oracle-r3.mjs +20 -0
  40. package/benches/code-review/ground-truth/oracle-summarize-s1.mjs +21 -0
  41. package/benches/code-review/ground-truth/oracle-x1.mjs +18 -0
  42. package/benches/code-review/ground-truth/r1.md +22 -0
  43. package/benches/code-review/ground-truth/r2.md +21 -0
  44. package/benches/code-review/ground-truth/r3.md +18 -0
  45. package/benches/code-review/ground-truth/summarize-s1.md +26 -0
  46. package/benches/code-review/ground-truth/x1.md +7 -0
  47. package/benches/code-review/prompts/explain-x1.md +5 -0
  48. package/benches/code-review/prompts/explain-x1.trigger.md +5 -0
  49. package/benches/code-review/prompts/review-r1.md +7 -0
  50. package/benches/code-review/prompts/review-r1.trigger.md +7 -0
  51. package/benches/code-review/prompts/review-r2.md +7 -0
  52. package/benches/code-review/prompts/review-r2.trigger.md +7 -0
  53. package/benches/code-review/prompts/review-r3.md +7 -0
  54. package/benches/code-review/prompts/review-r3.trigger.md +7 -0
  55. package/benches/code-review/prompts/summarize-s1.md +9 -0
  56. package/benches/code-review/prompts/summarize-s1.trigger.md +9 -0
  57. package/benches/code-review/verifiers/explain-x1.mjs +30 -0
  58. package/benches/code-review/verifiers/review-r2.mjs +66 -0
  59. package/benches/code-review/verifiers/review-r3.mjs +60 -0
  60. package/benches/code-review/verifiers/seeded-bugs.mjs +74 -0
  61. package/benches/code-review/verifiers/summarize-s1.mjs +80 -0
  62. package/benches/contrib/README.md +42 -0
  63. package/benches/contrib/oss-lru-cache/README.md +24 -0
  64. package/benches/contrib/oss-lru-cache/bench.json +37 -0
  65. package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/LICENSE +15 -0
  66. package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/README.md +3 -0
  67. package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/index.js +1044 -0
  68. package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/package.json +11 -0
  69. package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/runtime.mjs +22 -0
  70. package/benches/contrib/oss-lru-cache/fixtures/fetch-abort/test.mjs +11 -0
  71. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/LICENSE.md +55 -0
  72. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/README.md +3 -0
  73. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/package.json +11 -0
  74. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/runtime.mjs +22 -0
  75. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-browser.ts +11 -0
  76. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-cjs.cts +11 -0
  77. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-esm.mts +29 -0
  78. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel-node.ts +7 -0
  79. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/diagnostics-channel.ts +6 -0
  80. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/index.ts +3148 -0
  81. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/src/perf.ts +17 -0
  82. package/benches/contrib/oss-lru-cache/fixtures/fetch-lifecycle/test.mjs +11 -0
  83. package/benches/contrib/oss-lru-cache/fixtures/fetch-size/LICENSE +15 -0
  84. package/benches/contrib/oss-lru-cache/fixtures/fetch-size/README.md +3 -0
  85. package/benches/contrib/oss-lru-cache/fixtures/fetch-size/index.js +1028 -0
  86. package/benches/contrib/oss-lru-cache/fixtures/fetch-size/package.json +11 -0
  87. package/benches/contrib/oss-lru-cache/fixtures/fetch-size/runtime.mjs +22 -0
  88. package/benches/contrib/oss-lru-cache/fixtures/fetch-size/test.mjs +11 -0
  89. package/benches/contrib/oss-lru-cache/ground-truth/fetch-abort/LICENSE +15 -0
  90. package/benches/contrib/oss-lru-cache/ground-truth/fetch-abort/index.js +1053 -0
  91. package/benches/contrib/oss-lru-cache/ground-truth/fetch-abort.md +11 -0
  92. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/LICENSE.md +55 -0
  93. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-browser.ts +11 -0
  94. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-cjs.cts +11 -0
  95. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-esm.mts +29 -0
  96. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel-node.ts +7 -0
  97. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/diagnostics-channel.ts +6 -0
  98. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/index.ts +3174 -0
  99. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle/src/perf.ts +17 -0
  100. package/benches/contrib/oss-lru-cache/ground-truth/fetch-lifecycle.md +11 -0
  101. package/benches/contrib/oss-lru-cache/ground-truth/fetch-size/LICENSE +15 -0
  102. package/benches/contrib/oss-lru-cache/ground-truth/fetch-size/index.js +1028 -0
  103. package/benches/contrib/oss-lru-cache/ground-truth/fetch-size.md +11 -0
  104. package/benches/contrib/oss-lru-cache/ground-truth/oracle-fetch-abort.mjs +8 -0
  105. package/benches/contrib/oss-lru-cache/ground-truth/oracle-fetch-lifecycle.mjs +7 -0
  106. package/benches/contrib/oss-lru-cache/ground-truth/oracle-fetch-size.mjs +7 -0
  107. package/benches/contrib/oss-lru-cache/ground-truth/oracle.mjs +9 -0
  108. package/benches/contrib/oss-lru-cache/prompts/fetch-abort.md +5 -0
  109. package/benches/contrib/oss-lru-cache/prompts/fetch-lifecycle.md +5 -0
  110. package/benches/contrib/oss-lru-cache/prompts/fetch-size.md +5 -0
  111. package/benches/contrib/oss-lru-cache/provenance.json +62 -0
  112. package/benches/contrib/oss-lru-cache/runtime.mjs +22 -0
  113. package/benches/contrib/oss-lru-cache/verifiers/cases.mjs +74 -0
  114. package/benches/contrib/oss-lru-cache/verifiers/fetch-abort.mjs +3 -0
  115. package/benches/contrib/oss-lru-cache/verifiers/fetch-lifecycle.mjs +3 -0
  116. package/benches/contrib/oss-lru-cache/verifiers/fetch-size.mjs +3 -0
  117. package/benches/contrib/oss-lru-cache/verifiers/probe.mjs +14 -0
  118. package/benches/contrib/oss-lru-cache/verifiers/shared.mjs +130 -0
  119. package/benches/contrib/oss-lru-cache/verifiers/test-reporter.mjs +29 -0
  120. package/benches/contrib/oss-mcp-use-utf8/LICENSE.upstream +21 -0
  121. package/benches/contrib/oss-mcp-use-utf8/README.md +56 -0
  122. package/benches/contrib/oss-mcp-use-utf8/bench.json +16 -0
  123. package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/LICENSE +21 -0
  124. package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/package.json +3 -0
  125. package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/src/ext-apps-bridge.js +3 -0
  126. package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/src/resolve-view-resource.ts +96 -0
  127. package/benches/contrib/oss-mcp-use-utf8/fixtures/view-utf8/test/basic.test.mjs +13 -0
  128. package/benches/contrib/oss-mcp-use-utf8/ground-truth/README.md +5 -0
  129. package/benches/contrib/oss-mcp-use-utf8/ground-truth/oracle-view-utf8.mjs +11 -0
  130. package/benches/contrib/oss-mcp-use-utf8/ground-truth/solutions/view-utf8/src/resolve-view-resource.ts +96 -0
  131. package/benches/contrib/oss-mcp-use-utf8/ground-truth/solutions/view-utf8/test/utf8.regression.test.mjs +14 -0
  132. package/benches/contrib/oss-mcp-use-utf8/prompts/view-utf8.md +8 -0
  133. package/benches/contrib/oss-mcp-use-utf8/verifiers/view-utf8.mjs +120 -0
  134. package/benches/contrib/waza-behavior/LICENSE.upstream +21 -0
  135. package/benches/contrib/waza-behavior/README.md +31 -0
  136. package/benches/contrib/waza-behavior/bench.json +10 -0
  137. package/benches/contrib/waza-behavior/fixtures/explicit-hold/README.md +1 -0
  138. package/benches/contrib/waza-behavior/fixtures/explicit-hold/notes.txt +1 -0
  139. package/benches/contrib/waza-behavior/fixtures/receipt-current/README.md +1 -0
  140. package/benches/contrib/waza-behavior/fixtures/receipt-current/docs/guide.md +2 -0
  141. package/benches/contrib/waza-behavior/fixtures/receipt-current/notes.txt +1 -0
  142. package/benches/contrib/waza-behavior/fixtures/receipt-current/scripts/check-links.mjs +16 -0
  143. package/benches/contrib/waza-behavior/fixtures/receipt-current/validation-receipt.json +10 -0
  144. package/benches/contrib/waza-behavior/fixtures/receipt-stale/README.md +1 -0
  145. package/benches/contrib/waza-behavior/fixtures/receipt-stale/docs/guide.md +3 -0
  146. package/benches/contrib/waza-behavior/fixtures/receipt-stale/notes.txt +1 -0
  147. package/benches/contrib/waza-behavior/fixtures/receipt-stale/scripts/check-links.mjs +16 -0
  148. package/benches/contrib/waza-behavior/fixtures/receipt-stale/validation-receipt.json +10 -0
  149. package/benches/contrib/waza-behavior/ground-truth/oracle.mjs +24 -0
  150. package/benches/contrib/waza-behavior/prompts/explicit-hold.md +1 -0
  151. package/benches/contrib/waza-behavior/prompts/receipt-current.md +1 -0
  152. package/benches/contrib/waza-behavior/prompts/receipt-stale.md +1 -0
  153. package/benches/contrib/waza-behavior/verifiers/behavior.mjs +59 -0
  154. package/benches/debugging/bench.json +93 -0
  155. package/benches/debugging/fixtures/async-queue/src/task-queue.mjs +50 -0
  156. package/benches/debugging/fixtures/async-queue/test/basic.test.mjs +18 -0
  157. package/benches/debugging/fixtures/chunked-decoder/src/frame-decoder.mjs +39 -0
  158. package/benches/debugging/fixtures/chunked-decoder/test/basic.test.mjs +17 -0
  159. package/benches/debugging/fixtures/debug-redaction/src/debug-redaction.mjs +33 -0
  160. package/benches/debugging/fixtures/debug-redaction/test/basic.test.mjs +26 -0
  161. package/benches/debugging/fixtures/document-queue/.skillfit-mock.json +16 -0
  162. package/benches/debugging/fixtures/document-queue/src/task-queue.mjs +52 -0
  163. package/benches/debugging/fixtures/document-queue/test/basic.test.mjs +23 -0
  164. package/benches/debugging/fixtures/explain-cache/.skillfit-mock.json +16 -0
  165. package/benches/debugging/fixtures/explain-cache/src/ttl-cache.mjs +31 -0
  166. package/benches/debugging/fixtures/explain-cache/test/basic.test.mjs +28 -0
  167. package/benches/debugging/fixtures/feat-slug/test/slug.test.mjs +15 -0
  168. package/benches/debugging/fixtures/range-parser/src/range-parser.mjs +9 -0
  169. package/benches/debugging/fixtures/range-parser/test/basic.test.mjs +8 -0
  170. package/benches/debugging/fixtures/ttl-cache/src/ttl-cache.mjs +30 -0
  171. package/benches/debugging/fixtures/ttl-cache/test/basic.test.mjs +11 -0
  172. package/benches/debugging/ground-truth/async-queue.md +81 -0
  173. package/benches/debugging/ground-truth/chunked-decoder.md +91 -0
  174. package/benches/debugging/ground-truth/debug-redaction.md +113 -0
  175. package/benches/debugging/ground-truth/document-queue.md +24 -0
  176. package/benches/debugging/ground-truth/explain-cache.md +22 -0
  177. package/benches/debugging/ground-truth/feat-slug.md +45 -0
  178. package/benches/debugging/ground-truth/oracle-async-queue.mjs +14 -0
  179. package/benches/debugging/ground-truth/oracle-chunked-decoder.mjs +14 -0
  180. package/benches/debugging/ground-truth/oracle-debug-redaction.mjs +30 -0
  181. package/benches/debugging/ground-truth/oracle-document-queue.mjs +27 -0
  182. package/benches/debugging/ground-truth/oracle-explain-cache.mjs +28 -0
  183. package/benches/debugging/ground-truth/oracle-feat-slug.mjs +13 -0
  184. package/benches/debugging/ground-truth/oracle-range-parser.mjs +14 -0
  185. package/benches/debugging/ground-truth/oracle-ttl-cache.mjs +14 -0
  186. package/benches/debugging/ground-truth/range-parser.md +121 -0
  187. package/benches/debugging/ground-truth/solutions/async-queue/src/task-queue.mjs +52 -0
  188. package/benches/debugging/ground-truth/solutions/chunked-decoder/src/frame-decoder.mjs +50 -0
  189. package/benches/debugging/ground-truth/solutions/debug-redaction/src/debug-redaction.mjs +27 -0
  190. package/benches/debugging/ground-truth/solutions/debug-redaction/test/debug-leak.regression.test.mjs +27 -0
  191. package/benches/debugging/ground-truth/solutions/feat-slug/src/slug.mjs +6 -0
  192. package/benches/debugging/ground-truth/solutions/range-parser/src/range-parser.mjs +34 -0
  193. package/benches/debugging/ground-truth/solutions/range-parser/test/basic.test.mjs +26 -0
  194. package/benches/debugging/ground-truth/solutions/ttl-cache/src/ttl-cache.mjs +31 -0
  195. package/benches/debugging/ground-truth/ttl-cache.md +69 -0
  196. package/benches/debugging/prompts/async-queue.md +13 -0
  197. package/benches/debugging/prompts/async-queue.trigger.md +13 -0
  198. package/benches/debugging/prompts/chunked-decoder.md +13 -0
  199. package/benches/debugging/prompts/chunked-decoder.trigger.md +13 -0
  200. package/benches/debugging/prompts/debug-redaction.md +23 -0
  201. package/benches/debugging/prompts/debug-redaction.trigger.md +23 -0
  202. package/benches/debugging/prompts/document-queue.md +10 -0
  203. package/benches/debugging/prompts/document-queue.trigger.md +10 -0
  204. package/benches/debugging/prompts/explain-cache.md +10 -0
  205. package/benches/debugging/prompts/explain-cache.trigger.md +10 -0
  206. package/benches/debugging/prompts/feat-slug.md +3 -0
  207. package/benches/debugging/prompts/feat-slug.trigger.md +5 -0
  208. package/benches/debugging/prompts/range-parser.md +15 -0
  209. package/benches/debugging/prompts/range-parser.trigger.md +15 -0
  210. package/benches/debugging/prompts/ttl-cache.md +18 -0
  211. package/benches/debugging/prompts/ttl-cache.trigger.md +18 -0
  212. package/benches/debugging/verifiers/async-queue.mjs +221 -0
  213. package/benches/debugging/verifiers/chunked-decoder.mjs +208 -0
  214. package/benches/debugging/verifiers/debug-redaction.mjs +283 -0
  215. package/benches/debugging/verifiers/document-queue.mjs +52 -0
  216. package/benches/debugging/verifiers/explain-cache.mjs +62 -0
  217. package/benches/debugging/verifiers/feat-slug.mjs +127 -0
  218. package/benches/debugging/verifiers/range-parser.mjs +146 -0
  219. package/benches/debugging/verifiers/ttl-cache.mjs +111 -0
  220. package/dist/agents.js +26 -0
  221. package/dist/cli.js +310 -0
  222. package/dist/cli.test.js +76 -0
  223. package/dist/commands/bench.js +1035 -0
  224. package/dist/commands/bench.test.js +1061 -0
  225. package/dist/commands/bundle.js +334 -0
  226. package/dist/commands/bundle.test.js +142 -0
  227. package/dist/commands/confirm.js +39 -0
  228. package/dist/commands/doctor.js +399 -0
  229. package/dist/commands/doctor.test.js +280 -0
  230. package/dist/commands/eval-report.js +485 -0
  231. package/dist/commands/eval-report.test.js +306 -0
  232. package/dist/commands/eval.js +391 -0
  233. package/dist/commands/eval.test.js +446 -0
  234. package/dist/commands/install.js +653 -0
  235. package/dist/commands/install.test.js +555 -0
  236. package/dist/commands/mcp.js +20 -0
  237. package/dist/commands/report.js +78 -0
  238. package/dist/commands/report.test.js +110 -0
  239. package/dist/commands/setup.js +95 -0
  240. package/dist/commands/setup.test.js +150 -0
  241. package/dist/commands/upstream.js +210 -0
  242. package/dist/commands/upstream.test.js +139 -0
  243. package/dist/docs.test.js +154 -0
  244. package/dist/frontmatter.js +53 -0
  245. package/dist/frontmatter.test.js +49 -0
  246. package/dist/harness/bench.js +134 -0
  247. package/dist/harness/bench.test.js +109 -0
  248. package/dist/harness/bundle.js +46 -0
  249. package/dist/harness/bundle.test.js +71 -0
  250. package/dist/harness/constants.js +2 -0
  251. package/dist/harness/executors/api.js +68 -0
  252. package/dist/harness/executors/api.test.js +75 -0
  253. package/dist/harness/executors/cli.js +348 -0
  254. package/dist/harness/executors/cli.test.js +402 -0
  255. package/dist/harness/executors/mock.js +34 -0
  256. package/dist/harness/executors/mock.test.js +43 -0
  257. package/dist/harness/experiment-session.js +345 -0
  258. package/dist/harness/experiment-session.test.js +223 -0
  259. package/dist/harness/hash.js +29 -0
  260. package/dist/harness/installed-skill.js +78 -0
  261. package/dist/harness/installed-skill.test.js +162 -0
  262. package/dist/harness/judge.js +108 -0
  263. package/dist/harness/judge.test.js +181 -0
  264. package/dist/harness/kill-tree.js +43 -0
  265. package/dist/harness/kimi-usage.js +94 -0
  266. package/dist/harness/kimi-usage.test.js +62 -0
  267. package/dist/harness/oss-lru-cache.test.js +79 -0
  268. package/dist/harness/oss-regression-witness.test.js +89 -0
  269. package/dist/harness/prompt.js +57 -0
  270. package/dist/harness/prompt.test.js +48 -0
  271. package/dist/harness/receipts.js +297 -0
  272. package/dist/harness/receipts.test.js +148 -0
  273. package/dist/harness/report.js +225 -0
  274. package/dist/harness/report.test.js +297 -0
  275. package/dist/harness/runner.js +629 -0
  276. package/dist/harness/runner.test.js +555 -0
  277. package/dist/harness/stats.js +93 -0
  278. package/dist/harness/stats.test.js +124 -0
  279. package/dist/harness/target.js +90 -0
  280. package/dist/harness/target.test.js +60 -0
  281. package/dist/harness/trigger.js +368 -0
  282. package/dist/harness/trigger.test.js +249 -0
  283. package/dist/harness/types.js +1 -0
  284. package/dist/harness/verifier-summary.js +59 -0
  285. package/dist/harness/verifier-summary.test.js +99 -0
  286. package/dist/harness/waza-behavior.test.js +139 -0
  287. package/dist/invocation.js +21 -0
  288. package/dist/matrix/agents.json +200 -0
  289. package/dist/matrix/agents.schema.json +152 -0
  290. package/dist/mcp/probe.js +317 -0
  291. package/dist/mcp/probe.test.js +87 -0
  292. package/dist/version.js +4 -0
  293. package/docs/assets/skillfit-flow.en.svg +47 -0
  294. package/docs/assets/skillfit-flow.zh-CN.svg +47 -0
  295. package/docs/assets/skillfit-mark.svg +9 -0
  296. package/docs/audit-2026-09-24-triage.md +231 -0
  297. package/docs/audit-2026-09-24.md +876 -0
  298. package/docs/bench-authoring.md +407 -0
  299. package/docs/codex-upstream-audit.md +41 -0
  300. package/docs/config-experiments.md +119 -0
  301. package/docs/examples/bench-check.yml +32 -0
  302. package/docs/examples/eval-manifest.synthetic.json +61 -0
  303. package/docs/experiment-workflow.md +15 -0
  304. package/docs/first-real-eval.md +90 -0
  305. package/docs/growth-roadmap-2026-10.md +100 -0
  306. package/docs/installed-skill-evaluation.md +77 -0
  307. package/docs/metrics.md +318 -0
  308. package/docs/oss-task-evaluation.md +139 -0
  309. package/docs/plans/2026-10-01-oss-task-evaluation.md +73 -0
  310. package/docs/plans/2026-10-09-experiment-workflow.md +18 -0
  311. package/docs/plans/2026-10-09-grader-calibration-audit.md +13 -0
  312. package/docs/plans/2026-10-09-waza-resource-evaluation.md +46 -0
  313. package/docs/portable-codex.md +31 -0
  314. package/docs/reproducible-offline-example.md +29 -0
  315. package/docs/selectable-codex.md +41 -0
  316. package/docs/sharing-results.md +53 -0
  317. package/evidence/2026-07-skill-baseline.md +34 -0
  318. package/evidence/2026-09-22-codex-trigger-capture.md +36 -0
  319. package/evidence/2026-09-bench-calibration.md +46 -0
  320. package/evidence/2026-09-debugging-bench-exploratory.md +55 -0
  321. package/evidence/2026-09-debugging-hardening.md +42 -0
  322. package/evidence/2026-09-ocr-vs-code-review.md +31 -0
  323. package/evidence/2026-09-trigger-snapshot-correction.md +48 -0
  324. package/evidence/2026-10-01-codex-diagnosing-bugs-pilot.md +58 -0
  325. package/evidence/2026-10-01-oss-case-selection.md +42 -0
  326. package/evidence/2026-10-01-oss-workspace-smoke.md +110 -0
  327. package/evidence/README.md +47 -0
  328. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/README.md +27 -0
  329. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/artifact-index.json +118 -0
  330. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/output.md +5 -0
  331. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/prompt.txt +14 -0
  332. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/result.json +65 -0
  333. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/verifier.txt +2 -0
  334. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/LICENSE +21 -0
  335. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/package.json +3 -0
  336. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/src/ext-apps-bridge.js +3 -0
  337. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/src/resolve-view-resource.ts +100 -0
  338. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/test/basic.test.mjs +13 -0
  339. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/baseline/workspace/test/resolve-view-resource.test.mjs +102 -0
  340. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/manifest.json +206 -0
  341. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/original-console.txt +44 -0
  342. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/report.md +67 -0
  343. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/output.md +5 -0
  344. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/prompt.txt +163 -0
  345. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/result.json +65 -0
  346. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/verifier.txt +2 -0
  347. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/LICENSE +21 -0
  348. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/package.json +3 -0
  349. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/src/ext-apps-bridge.js +3 -0
  350. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/src/resolve-view-resource.ts +100 -0
  351. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/test/basic.test.mjs +13 -0
  352. package/evidence/artifacts/2026-10-01-oss-workspace-smoke/treatment/workspace/test/resolve-view-resource.test.mjs +136 -0
  353. package/evidence/inputs/README.md +15 -0
  354. package/evidence/inputs/diagnosing-bugs/LICENSE +21 -0
  355. package/evidence/inputs/diagnosing-bugs/SKILL.md +138 -0
  356. package/evidence/inputs/diagnosing-bugs/agents/openai.yaml +3 -0
  357. package/evidence/inputs/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
  358. package/evidence/plans/2026-10-01-oss-workspace-smoke.json +29 -0
  359. package/package.json +47 -4
  360. package/profiles/codex-curated/catalog.json +28 -0
  361. package/profiles/codex-curated/profile.json +282 -0
  362. package/profiles/codex-curated/rules/global.md +12 -0
  363. package/profiles/codex-curated/skills/autonomous-iteration/SKILL.md +75 -0
  364. package/profiles/codex-curated/skills/autonomous-iteration/agents/openai.yaml +4 -0
  365. package/profiles/codex-curated/skills/vibe-coding/SKILL.md +45 -0
  366. package/profiles/codex-curated/skills/vibe-coding/agents/openai.yaml +4 -0
  367. package/profiles/codex-upstream-sources.json +2980 -0
  368. package/profiles/recommended/profile.json +12 -0
  369. package/profiles/recommended/rules/core-workflow.md +41 -0
  370. package/profiles/recommended/skills/commit-message/SKILL.md +18 -0
  371. package/skills/skillfit/SKILL.md +60 -0
@@ -0,0 +1,76 @@
1
+ diff --git a/src/pricing.js b/src/pricing.js
2
+ --- a/src/pricing.js
3
+ +++ b/src/pricing.js
4
+ @@ -1,20 +1,36 @@
5
+ import { roundCents } from './money.js';
6
+ import { AppError } from './errors.js';
7
+
8
+ +const BULK_QTY = 10;
9
+ +const BULK_RATE = 0.05;
10
+ +
11
+ +// Resolves the unit price for a line: promotional price when present, otherwise list price.
12
+ +export function effectiveUnitPrice(line) {
13
+ + let unit = line.price;
14
+ + if (line.promoPrice != null) {
15
+ + unit = Math.min(line.promoPrice, line.price);
16
+ + }
17
+ + if (line.qty >= BULK_QTY) {
18
+ + unit = unit * (1 - BULK_RATE);
19
+ + }
20
+ + return unit;
21
+ +}
22
+ +
23
+ export function lineAmount(line) {
24
+ if (line.qty < 0) {
25
+ throw new AppError('INVALID_QUANTITY', 'negative quantity');
26
+ }
27
+ - return line.price * line.qty;
28
+ + return effectiveUnitPrice(line) * line.qty;
29
+ }
30
+
31
+ export function orderTotal(lines) {
32
+ - if (lines.length === 0) {
33
+ - throw new AppError('EMPTY_ORDER', 'cannot price an empty order');
34
+ - }
35
+ let total = 0;
36
+ for (const line of lines) {
37
+ total += lineAmount(line);
38
+ }
39
+ return roundCents(total);
40
+ }
41
+ +
42
+ +export function formatOrder(lines) {
43
+ + return orderTotal(lines).toFixed(2);
44
+ +}
45
+ diff --git a/tests/pricing.test.js b/tests/pricing.test.js
46
+ --- a/tests/pricing.test.js
47
+ +++ b/tests/pricing.test.js
48
+ @@ -1,15 +1,23 @@
49
+ import { test } from 'node:test';
50
+ import assert from 'node:assert/strict';
51
+ -import { lineAmount, orderTotal } from '../src/pricing.js';
52
+ +import { effectiveUnitPrice, formatOrder, lineAmount, orderTotal } from '../src/pricing.js';
53
+
54
+ test('lineAmount multiplies price by quantity', () => {
55
+ assert.equal(lineAmount({ price: 10, qty: 3 }), 30);
56
+ });
57
+
58
+ -test('orderTotal rejects an empty order', () => {
59
+ - assert.throws(() => orderTotal([]), /EMPTY_ORDER/);
60
+ -});
61
+ -
62
+ test('orderTotal sums line amounts', () => {
63
+ assert.equal(orderTotal([{ price: 10, qty: 1 }, { price: 5, qty: 2 }]), 20);
64
+ });
65
+ +
66
+ +test('effectiveUnitPrice prefers the lower promotional price', () => {
67
+ + assert.equal(effectiveUnitPrice({ price: 10, promoPrice: 8, qty: 1 }), 8);
68
+ +});
69
+ +
70
+ +test('effectiveUnitPrice applies the bulk discount at quantity 10', () => {
71
+ + assert.equal(effectiveUnitPrice({ price: 10, qty: 10 }), 9.5);
72
+ +});
73
+ +
74
+ +test('formatOrder formats the total', () => {
75
+ + assert.equal(formatOrder([{ price: 10, qty: 1 }]), '10.00');
76
+ +});
@@ -0,0 +1,24 @@
1
+ # Pricing service specification
2
+
3
+ ## §1 Error surface
4
+ Every error thrown by an exported function must be an `AppError` (`src/errors.js`) whose `code` appears in the stable-code table below. Codes are part of the public API; introducing or renaming a code requires a spec amendment.
5
+
6
+ | Code | Meaning |
7
+ | --- | --- |
8
+ | `INVALID_QUANTITY` | A line quantity is negative or non-numeric. |
9
+ | `EMPTY_ORDER` | Totals were requested for an order with no lines. |
10
+
11
+ ## §2 Money math
12
+ A public money amount passes through `roundCents` (`src/money.js`) exactly once, at the point the final amount is produced. Intermediate factors — unit prices, discount rates, quantities — are combined at full precision and rounded only when the final amount is computed.
13
+
14
+ ## §3 Promotions
15
+ A line with a `promoPrice` is priced at `min(promoPrice, price)`: the promotional price *replaces* the list price and is never itself discounted. Lines without a promotional price receive a 5% bulk discount at quantity >= 10.
16
+
17
+ ## §4 Empty orders
18
+ `orderTotal` rejects an empty order with an `AppError` whose code is `EMPTY_ORDER`.
19
+
20
+ ## §5 Tests
21
+ Every exported function must ship with unit tests under `tests/`.
22
+
23
+ ## §6 Scope
24
+ Only defects introduced by the pull request under review count. Pre-existing code outside the diff is out of scope.
@@ -0,0 +1,7 @@
1
+ export class AppError extends Error {
2
+ constructor(code, message) {
3
+ super(message);
4
+ this.name = 'AppError';
5
+ this.code = code;
6
+ }
7
+ }
@@ -0,0 +1,3 @@
1
+ export function roundCents(value) {
2
+ return Math.round(value * 100) / 100;
3
+ }
@@ -0,0 +1,20 @@
1
+ import { roundCents } from './money.js';
2
+ import { AppError } from './errors.js';
3
+
4
+ export function lineAmount(line) {
5
+ if (line.qty < 0) {
6
+ throw new AppError('INVALID_QUANTITY', 'negative quantity');
7
+ }
8
+ return line.price * line.qty;
9
+ }
10
+
11
+ export function orderTotal(lines) {
12
+ if (lines.length === 0) {
13
+ throw new AppError('EMPTY_ORDER', 'cannot price an empty order');
14
+ }
15
+ let total = 0;
16
+ for (const line of lines) {
17
+ total += lineAmount(line);
18
+ }
19
+ return roundCents(total);
20
+ }
@@ -0,0 +1,15 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { lineAmount, orderTotal } from '../src/pricing.js';
4
+
5
+ test('lineAmount multiplies price by quantity', () => {
6
+ assert.equal(lineAmount({ price: 10, qty: 3 }), 30);
7
+ });
8
+
9
+ test('orderTotal rejects an empty order', () => {
10
+ assert.throws(() => orderTotal([]), /EMPTY_ORDER/);
11
+ });
12
+
13
+ test('orderTotal sums line amounts', () => {
14
+ assert.equal(orderTotal([{ price: 10, qty: 1 }, { price: 5, qty: 2 }]), 20);
15
+ });
@@ -0,0 +1,16 @@
1
+ {
2
+ "baseline": {
3
+ "output": "- Orders of 10 items or more now get the 5% bulk discount; the threshold used to be 13.\n- Invalid quantities now fail with a stable INVALID_QUANTITY error code instead of a bare message.\n- Line prices are rounded once at the end, so totals no longer drift on multi-item orders.\n",
4
+ "tokens": {
5
+ "input": 1100,
6
+ "output": 90
7
+ }
8
+ },
9
+ "treatment": {
10
+ "output": "- Orders of 10 items or more now get the 5% bulk discount.\n- Reviewing the diff, src/discount.js:14 violates SPEC §3: roundCents is applied to the unit price before multiplying by qty, which is intermediate rounding and should be moved to lineTotal.\n- INVALID_QUANTITY is now a stable code.\n",
11
+ "tokens": {
12
+ "input": 1900,
13
+ "output": 140
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,27 @@
1
+ diff --git a/src/discount.js b/src/discount.js
2
+ --- a/src/discount.js
3
+ +++ b/src/discount.js
4
+ @@
5
+ -export function unitPrice(item) {
6
+ - if (item.qty < 1) {
7
+ - throw new Error('bad quantity: ' + item.qty);
8
+ - }
9
+ - const base = item.price;
10
+ - if (item.qty > 12) {
11
+ - return base * 0.95;
12
+ - }
13
+ - return base;
14
+ -}
15
+ +export const BULK_QTY = 10;
16
+ +export const BULK_RATE = 0.05;
17
+ +
18
+ +export function unitPrice(item) {
19
+ + if (!Number.isInteger(item.qty) || item.qty < 1) {
20
+ + throw new AppError('INVALID_QUANTITY', 'quantity must be a positive integer');
21
+ + }
22
+ + const base = item.price;
23
+ + if (item.qty >= BULK_QTY) {
24
+ + return roundCents(base * (1 - BULK_RATE));
25
+ + }
26
+ + return base;
27
+ +}
@@ -0,0 +1,15 @@
1
+ # Pricing library specification
2
+
3
+ ## 1. Discount eligibility
4
+
5
+ A line item qualifies for the bulk discount when its quantity is **10 or more**. The discount is 5% off
6
+ the unit price.
7
+
8
+ ## 2. Error reporting
9
+
10
+ Every caller-facing error is an `AppError` carrying a stable `code`. Invalid quantities use the code
11
+ `INVALID_QUANTITY`.
12
+
13
+ ## 3. Rounding
14
+
15
+ Money is rounded once, at the end of a calculation, never on intermediate values.
@@ -0,0 +1,20 @@
1
+ import { AppError } from './errors.js';
2
+ import { roundCents } from './money.js';
3
+
4
+ export const BULK_QTY = 10;
5
+ export const BULK_RATE = 0.05;
6
+
7
+ export function unitPrice(item) {
8
+ if (!Number.isInteger(item.qty) || item.qty < 1) {
9
+ throw new AppError('INVALID_QUANTITY', 'quantity must be a positive integer');
10
+ }
11
+ const base = item.price;
12
+ if (item.qty >= BULK_QTY) {
13
+ return roundCents(base * (1 - BULK_RATE));
14
+ }
15
+ return base;
16
+ }
17
+
18
+ export function lineTotal(item) {
19
+ return roundCents(unitPrice(item) * item.qty);
20
+ }
@@ -0,0 +1,7 @@
1
+ export class AppError extends Error {
2
+ constructor(code, message) {
3
+ super(message);
4
+ this.name = 'AppError';
5
+ this.code = code;
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ export function roundCents(value) {
2
+ return Math.round(value * 100) / 100;
3
+ }
4
+
5
+ export function formatCents(value) {
6
+ return (value / 100).toFixed(2);
7
+ }
@@ -0,0 +1,21 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+
4
+ const runDir = process.argv[2];
5
+ if (!runDir) {
6
+ console.error('usage: node oracle-r1.mjs <run-dir>');
7
+ process.exit(2);
8
+ }
9
+
10
+ fs.writeFileSync(
11
+ path.join(runDir, '_output.md'),
12
+ [
13
+ '# Review findings',
14
+ '',
15
+ '- src/order.js:25 throws a bare `Error` for invalid quantity; SPEC §1/§5 require an `AppError` with code `INVALID_QUANTITY`.',
16
+ '- src/order.js:30 `item.qty > 10` is an off-by-one boundary error; SPEC §4 grants the 5% discount at quantity >= 10.',
17
+ '- `applyBulkDiscount` is a new exported function but the diff adds no test coverage — SPEC §2 violation.',
18
+ '',
19
+ ].join('\n'),
20
+ 'utf8',
21
+ );
@@ -0,0 +1,21 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+
4
+ const runDir = process.argv[2];
5
+ if (!runDir) {
6
+ console.error('usage: node oracle-r2.mjs <run-dir>');
7
+ process.exit(2);
8
+ }
9
+
10
+ fs.writeFileSync(
11
+ path.join(runDir, '_output.md'),
12
+ [
13
+ '# Review findings',
14
+ '',
15
+ '- src/invoice.js:20 raises `QTY_NEGATIVE`, which is not in the SPEC §1 stable-code table.',
16
+ '- src/invoice.js:22 rounds the unit price before multiplying by quantity — intermediate rounding against SPEC §3.',
17
+ '- src/invoice.js:33 assigns `line.qty = …`, mutating its input against the SPEC §2 purity rule.',
18
+ '',
19
+ ].join('\n'),
20
+ 'utf8',
21
+ );
@@ -0,0 +1,20 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+
4
+ const runDir = process.argv[2];
5
+ if (!runDir) {
6
+ console.error('usage: node oracle-r3.mjs <run-dir>');
7
+ process.exit(2);
8
+ }
9
+
10
+ fs.writeFileSync(
11
+ path.join(runDir, '_output.md'),
12
+ [
13
+ '# Review findings',
14
+ '',
15
+ '- src/pricing.js drops the `EMPTY_ORDER` guard and deletes its covering test — the empty order case is unhandled (SPEC §4).',
16
+ '- src/pricing.js:14 applies the bulk discount on top of the promotional price; SPEC §3 says promotional prices are never themselves discounted.',
17
+ '',
18
+ ].join('\n'),
19
+ 'utf8',
20
+ );
@@ -0,0 +1,21 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+
4
+ const runDir = process.argv[2];
5
+ if (!runDir) {
6
+ console.error('usage: node oracle-summarize-s1.mjs <run-dir>');
7
+ process.exit(2);
8
+ }
9
+
10
+ fs.writeFileSync(
11
+ path.join(runDir, '_output.md'),
12
+ [
13
+ '## 1.4.0',
14
+ '',
15
+ '- Bulk pricing now starts at 10 items instead of 13, so smaller orders qualify for the 5% discount.',
16
+ '- Bad quantities fail with a stable INVALID_QUANTITY code you can branch on, instead of a free-text message.',
17
+ '- Prices are rounded once per line rather than partway through, which removes the penny drift on large orders.',
18
+ '',
19
+ ].join('\n'),
20
+ 'utf8',
21
+ );
@@ -0,0 +1,18 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+
4
+ const runDir = process.argv[2];
5
+ if (!runDir) {
6
+ console.error('usage: node oracle-x1.mjs <run-dir>');
7
+ process.exit(2);
8
+ }
9
+
10
+ fs.writeFileSync(
11
+ path.join(runDir, '_output.md'),
12
+ [
13
+ '`compact` removes (omits/strips) empty values from an object and returns the cleaned copy.',
14
+ 'Its behavior is pinned by the suite in `tests/compact.test.js`, which documents the edge cases.',
15
+ '',
16
+ ].join('\n'),
17
+ 'utf8',
18
+ );
@@ -0,0 +1,22 @@
1
+ # r1 ground truth
2
+
3
+ Fixture layout: `src/` holds the pre-PR code and `CHANGES.diff` is the pull request under review. Line numbers refer to post-PR files.
4
+
5
+ ## Seeded defects (3)
6
+
7
+ 1. **Bare `Error` violates SPEC §1/§5 (high)**: post-PR `src/order.js` line 25 (diff line `+ throw new Error('invalid quantity: ' + item.qty);`) throws a bare `Error` with no `code`. SPEC §1 requires every caller-facing error to be an `AppError` with a stable code, and §5 mandates `INVALID_QUANTITY` for invalid quantities.
8
+ 2. **Boundary condition error (high)**: post-PR `src/order.js` line 30 `} else if (item.qty > 10) {` should be `>= 10`. SPEC §4 grants the 5% discount at quantity **>= 10**; as written, a line with `qty = 10` gets no discount.
9
+ 3. **New function ships without tests (medium)**: `applyBulkDiscount` is a new exported function with new branches, yet the diff does not touch `tests/` — a SPEC §2 violation.
10
+
11
+ ## Style decoys (must NOT be reported)
12
+
13
+ Post-PR lines 22–23 use a C-style `for (let i = 0; ...)` loop although the surrounding code iterates with `for (const item of items)`. It is functionally correct; flagging it counts as a false positive (style, not a defect).
14
+
15
+ ## Scoring anchors
16
+
17
+ - Recall: each of the 3 seeded defects scores 2 points (reported with a correct location: 2; reported but vaguely located: 1).
18
+ - False positives: reporting the style decoy costs −1; reporting post-PR `money.js` `percentOff` (which correctly reuses `roundCents`) costs −1.
19
+
20
+ The bundled verifier (`verifiers/seeded-bugs.mjs`) collapses this rubric to four deterministic checks: one per seeded defect, each hit by a `file:line` or an unambiguous keyword reference on a line naming the file, plus `no-false-positives`, which fails when any decoy is reported. Exit code 0 requires all four, so the −1 penalty above is enforced rather than merely described.
21
+
22
+ `missing-tests` requires an actual claim about absent coverage — a negation or obligation word near "test"/"coverage" — not merely the word "test" appearing on a line that names `applyBulkDiscount`.
@@ -0,0 +1,21 @@
1
+ # Ground truth — review-r2
2
+
3
+ The PR adds `applyLineTax` and `normalizeQuantities` (both `src/invoice.js`), `formatCents` (`src/money.js`), and happy-path tests for the two new functions.
4
+
5
+ ## Seeded defects
6
+
7
+ 1. **unregistered-error-code** — high — `src/invoice.js:20`
8
+ A negative quantity is rejected with `AppError` code `QTY_NEGATIVE`, which appears nowhere in the §1 stable-code table; the table already defines `INVALID_QUANTITY` for exactly this case. Codes are public API, so inventing one requires a spec amendment.
9
+
10
+ 2. **intermediate-rounding** — high — `src/invoice.js:22`
11
+ `roundCents(line.unitPrice * (1 + taxRate))` rounds the per-line unit price, an intermediate factor that `subtotal` later multiplies by quantity and rounds again. §3 requires intermediates at full precision, rounded exactly once when the final amount is computed.
12
+
13
+ 3. **input-mutation** — medium — `src/invoice.js:33`
14
+ `line.qty = 1` mutates the caller's line objects in place; §2 requires exported functions to return new objects instead of mutating arguments.
15
+
16
+ ## Decoys (not defects)
17
+
18
+ - `src/invoice.js:25` — `taxed.sort(...)` mutates `taxed`, but `taxed` is a new array created inside the function, so §2 is not violated.
19
+ - `src/money.js:5-7` — `formatCents` rounds exactly once, ships a test, and returns a formatted string; compliant with §3 and §5.
20
+ - Tests: both new `invoice.js` functions ship tests in `tests/invoice.test.js`, so §5 is satisfied (it only requires tests to exist, not branch coverage).
21
+ - `src/invoice.js:14-16` — the `taxRate` validation uses the registered `INVALID_RATE` code and satisfies §4.
@@ -0,0 +1,18 @@
1
+ # Ground truth — review-r3
2
+
3
+ The PR extracts an `effectiveUnitPrice` helper, adds promotional pricing and a bulk discount to `src/pricing.js`, adds `formatOrder`, and updates the tests.
4
+
5
+ ## Seeded defects
6
+
7
+ 1. **dropped-empty-guard** — high — `src/pricing.js:25` (`orderTotal`)
8
+ The pre-PR `orderTotal` threw `AppError('EMPTY_ORDER')` for an empty order (§4); the PR's rewrite drops the guard, so `orderTotal([])` now silently returns `0`. The PR also deletes the covering test (`tests/pricing.test.js`), which is why the regression escapes CI.
9
+
10
+ 2. **promo-bulk-stack** — high — `src/pricing.js:13-14` (`effectiveUnitPrice`)
11
+ A line with a `promoPrice` and quantity >= 10 gets the bulk discount applied *on top of* the promotional price (`unit = Math.min(promoPrice, price)` then `unit * (1 - BULK_RATE)`). §3 states the promotional price *replaces* the list price and is never itself discounted — only lines without a `promoPrice` are bulk-eligible. Note the PR's own tests never exercise the promo + bulk-quantity interaction, which is how this escaped.
12
+
13
+ ## Decoys (not defects)
14
+
15
+ - `src/pricing.js:34-36` — `formatOrder` rounds once (via `orderTotal`) before formatting and ships a test; compliant with §2 and §5. Returning a string is its purpose.
16
+ - `src/pricing.js:11` — `Math.min(line.promoPrice, line.price)` is exactly what §3 prescribes for the promo-vs-list choice; the defect is the subsequent bulk discount, not the `min`.
17
+ - Constants extraction (`BULK_QTY`, `BULK_RATE`) and the `effectiveUnitPrice` helper split are behavior-neutral refactors.
18
+ - Every exported function has at least one test, so §5 is satisfied (the spec does not require branch coverage — but see defect 2 for why that matters).
@@ -0,0 +1,26 @@
1
+ # summarize-s1 ground truth
2
+
3
+ **Task class: negative trigger control (`shouldTrigger: false`).** This is the code-review bench's second
4
+ negative control. It reuses the bench's own fixture shape — `SPEC.md`, `src/`, and a `CHANGES.diff`
5
+ that genuinely contains a rounding question — because a negative control that looks nothing like the
6
+ positive tasks measures nothing. A review skill firing here is a false trigger.
7
+
8
+ It is also a behavioural discriminator, not just a label. The task asks for a changelog entry, so an
9
+ agent that starts reviewing produces the wrong artefact and fails the `not-a-review` check. That models
10
+ the derailment cost `docs/metrics.md` L3 calls `δ_derail`: a false trigger is not merely a wasted
11
+ invocation, it changes what the session produces. The mock's treatment arm deliberately slips into
12
+ review framing so an offline run shows the penalty.
13
+
14
+ ## What a correct answer looks like
15
+
16
+ Three bullets, user-facing, describing the merged diff:
17
+
18
+ 1. the bulk-discount threshold moved from 13 to 10 items (5% off);
19
+ 2. invalid quantities now raise a stable `INVALID_QUANTITY` code instead of a bare `Error`;
20
+ 3. rounding happens once per line rather than on the intermediate unit price.
21
+
22
+ ## What the grader checks
23
+
24
+ Three checks: exactly three bullet lines; at least two of the three user-visible changes named; and no
25
+ review framing (no `SPEC §` citation, no "violates", "bug", "defect", or "should be"). Exit code 1
26
+ unless all three pass.
@@ -0,0 +1,7 @@
1
+ # Ground truth — explain-x1
2
+
3
+ `compactObject(obj)` (`src/compact.js`) returns a new object with every `null`, `undefined`, or empty-string value removed; `countDropped(obj)` reports how many keys that removes. Falsy-but-meaningful values (`0`, `false`) are kept, and the input is never mutated. `tests/compact.test.js` covers the removal rule, falsy retention, and input purity.
4
+
5
+ ## Negative trigger control
6
+
7
+ This task is the bench's negative trigger control (`shouldTrigger: false` in `bench.json`). It is an explanation task, not a review task: there is no `CHANGES.diff` and there are no seeded defects. A code-review skill that fires on this task counts as a false trigger in L1 trigger-quality measurement.
@@ -0,0 +1,5 @@
1
+ # Task: explain a small repository
2
+
3
+ The repository snapshot below is a tiny utility library with its specification (`SPEC.md`) and tests.
4
+
5
+ Read this small repository and explain what it does and which edge cases its tests cover. Two to four sentences, plain English.
@@ -0,0 +1,5 @@
1
+ # Task: explain a small repository
2
+
3
+ The repository in your current working directory is a tiny utility library with its specification (`SPEC.md`) and tests.
4
+
5
+ Read this small repository and explain what it does and which edge cases its tests cover. Two to four sentences, plain English.
@@ -0,0 +1,7 @@
1
+ # Task: review a pull request
2
+
3
+ The repository snapshot below is the pre-PR state. The pull request under review is `CHANGES.diff` (unified diff). Line numbers in your findings must refer to the **post-PR** files.
4
+
5
+ Review the PR against `SPEC.md` and report only concrete defects: no praise, no style preferences, no speculative concerns.
6
+
7
+ Write your findings as a Markdown list. Each finding must state its severity (`high`, `medium`, or `low`), the exact `file:line` it applies to, and a one-sentence explanation of why it violates the specification.
@@ -0,0 +1,7 @@
1
+ # Task: review a pull request
2
+
3
+ The repository in your current working directory is the pre-PR state. The pull request under review is `CHANGES.diff` (unified diff, at the repository root). Line numbers in your findings must refer to the **post-PR** files.
4
+
5
+ Review the PR against `SPEC.md` and report only concrete defects: no praise, no style preferences, no speculative concerns.
6
+
7
+ Write your findings as a Markdown list. Each finding must state its severity (`high`, `medium`, or `low`), the exact `file:line` it applies to, and a one-sentence explanation of why it violates the specification.
@@ -0,0 +1,7 @@
1
+ # Task: review a pull request
2
+
3
+ The repository snapshot below is the pre-PR state. The pull request under review is `CHANGES.diff` (unified diff). Line numbers in your findings must refer to the **post-PR** files.
4
+
5
+ Review the PR against `SPEC.md` and report only concrete defects: no praise, no style preferences, no speculative concerns.
6
+
7
+ Write your findings as a Markdown list. Each finding must state its severity (`high`, `medium`, or `low`), the exact `file:line` it applies to, and a one-sentence explanation of why it violates the specification.
@@ -0,0 +1,7 @@
1
+ # Task: review a pull request
2
+
3
+ The repository in your current working directory is the pre-PR state. The pull request under review is `CHANGES.diff` (unified diff, at the repository root). Line numbers in your findings must refer to the **post-PR** files.
4
+
5
+ Review the PR against `SPEC.md` and report only concrete defects: no praise, no style preferences, no speculative concerns.
6
+
7
+ Write your findings as a Markdown list. Each finding must state its severity (`high`, `medium`, or `low`), the exact `file:line` it applies to, and a one-sentence explanation of why it violates the specification.
@@ -0,0 +1,7 @@
1
+ # Task: review a pull request
2
+
3
+ The repository snapshot below is the pre-PR state. The pull request under review is `CHANGES.diff` (unified diff). Line numbers in your findings must refer to the **post-PR** files.
4
+
5
+ Review the PR against `SPEC.md` and report only concrete defects: no praise, no style preferences, no speculative concerns.
6
+
7
+ Write your findings as a Markdown list. Each finding must state its severity (`high`, `medium`, or `low`), the exact `file:line` it applies to, and a one-sentence explanation of why it violates the specification.
@@ -0,0 +1,7 @@
1
+ # Task: review a pull request
2
+
3
+ The repository in your current working directory is the pre-PR state. The pull request under review is `CHANGES.diff` (unified diff, at the repository root). Line numbers in your findings must refer to the **post-PR** files.
4
+
5
+ Review the PR against `SPEC.md` and report only concrete defects: no praise, no style preferences, no speculative concerns.
6
+
7
+ Write your findings as a Markdown list. Each finding must state its severity (`high`, `medium`, or `low`), the exact `file:line` it applies to, and a one-sentence explanation of why it violates the specification.
@@ -0,0 +1,9 @@
1
+ # Task: write the changelog entry for this PR
2
+
3
+ The repository snapshot below is a small pricing library. `CHANGES.diff` is the pull request that just
4
+ merged, and `SPEC.md` is the specification it implements.
5
+
6
+ Write the changelog entry for this release: exactly three bullets, aimed at someone who *uses* this
7
+ library rather than someone who maintains it. Describe what changed for them.
8
+
9
+ This is a writing task. Do not review the diff and do not report defects.
@@ -0,0 +1,9 @@
1
+ # Task: write the changelog entry for this PR
2
+
3
+ The repository in your current working directory is a small pricing library. `CHANGES.diff` is the pull
4
+ request that just merged, and `SPEC.md` is the specification it implements.
5
+
6
+ Write the changelog entry for this release: exactly three bullets, aimed at someone who *uses* this
7
+ library rather than someone who maintains it. Describe what changed for them.
8
+
9
+ This is a writing task. Do not review the diff and do not report defects.
@@ -0,0 +1,30 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+
4
+ const runDir = process.argv[2];
5
+ if (!runDir) {
6
+ console.error('usage: node explain-x1.mjs <run-dir>');
7
+ process.exit(2);
8
+ }
9
+
10
+ const rubric = [
11
+ { id: 'states-purpose', evidence: /compact|remove|omit|strip/i },
12
+ { id: 'mentions-tests', evidence: /\btest/i },
13
+ ];
14
+
15
+ const outputPath = path.join(runDir, '_output.md');
16
+ let output;
17
+ try {
18
+ output = fs.readFileSync(outputPath, 'utf8');
19
+ } catch {
20
+ const checks = rubric.map((item) => ({ name: item.id, pass: false }));
21
+ console.log(JSON.stringify({ passed: false, hits: [], missed: ['*'], checks, error: `missing ${outputPath}` }));
22
+ process.exit(1);
23
+ }
24
+
25
+ const hits = rubric.filter((item) => item.evidence.test(output)).map((item) => item.id);
26
+ const missed = rubric.filter((item) => !hits.includes(item.id)).map((item) => item.id);
27
+ const checks = rubric.map((item) => ({ name: item.id, pass: hits.includes(item.id) }));
28
+ const passed = missed.length === 0;
29
+ console.log(JSON.stringify({ passed, hits, missed, checks }));
30
+ process.exit(passed ? 0 : 1);