skillfit 0.9.1 → 0.10.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 (303) hide show
  1. package/README.md +41 -15
  2. package/README.zh-CN.md +41 -15
  3. package/benches/README.md +23 -0
  4. package/benches/contrib/README.md +1 -0
  5. package/benches/contrib/oss-skill-independent/README.md +60 -0
  6. package/benches/contrib/oss-skill-independent/bench.json +79 -0
  7. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/LICENSE +22 -0
  8. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/Readme.md +1015 -0
  9. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/esm.mjs +15 -0
  10. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/index.js +27 -0
  11. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/argument.js +147 -0
  12. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/command.js +1944 -0
  13. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/error.js +45 -0
  14. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/help.js +396 -0
  15. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/option.js +208 -0
  16. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/lib/suggestSimilar.js +100 -0
  17. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/package-support.json +16 -0
  18. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/package.json +63 -0
  19. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/test-clock.mjs +65 -0
  20. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/test.mjs +4 -0
  21. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/typings/index.d.ts +774 -0
  22. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/typings/index.test-d.ts +416 -0
  23. package/benches/contrib/oss-skill-independent/fixtures/commander-async-listener-order/upstream-package.json +69 -0
  24. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/LICENSE +22 -0
  25. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/Readme.md +1149 -0
  26. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/esm.mjs +16 -0
  27. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/index.js +24 -0
  28. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/argument.js +149 -0
  29. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/command.js +2662 -0
  30. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/error.js +39 -0
  31. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/help.js +713 -0
  32. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/option.js +367 -0
  33. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/lib/suggestSimilar.js +101 -0
  34. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/package-support.json +16 -0
  35. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/package.json +71 -0
  36. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/test-clock.mjs +65 -0
  37. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/test.mjs +4 -0
  38. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/typings/esm.d.mts +3 -0
  39. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/typings/index.d.ts +1045 -0
  40. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/typings/index.test-d.ts +737 -0
  41. package/benches/contrib/oss-skill-independent/fixtures/commander-output-isolation/upstream-package.json +82 -0
  42. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/index.d.ts +40 -0
  43. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/index.js +68 -0
  44. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/license +9 -0
  45. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/package.json +54 -0
  46. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/readme.md +99 -0
  47. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/test-clock.mjs +65 -0
  48. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/test.mjs +4 -0
  49. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/upstream-package.json +54 -0
  50. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/vendor/yocto-queue/index.js +67 -0
  51. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/vendor/yocto-queue/license +9 -0
  52. package/benches/contrib/oss-skill-independent/fixtures/limit-async-context/vendor/yocto-queue/package.json +46 -0
  53. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/index.d.ts +136 -0
  54. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/index.js +132 -0
  55. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/license +9 -0
  56. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/package.json +57 -0
  57. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/readme.md +181 -0
  58. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/test-clock.mjs +65 -0
  59. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/test.mjs +4 -0
  60. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/upstream-package.json +58 -0
  61. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/vendor/yocto-queue/index.js +84 -0
  62. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/vendor/yocto-queue/license +9 -0
  63. package/benches/contrib/oss-skill-independent/fixtures/limit-map-iteration-rejection/vendor/yocto-queue/package.json +48 -0
  64. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/index.d.ts +136 -0
  65. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/index.js +116 -0
  66. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/license +9 -0
  67. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/package.json +60 -0
  68. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/readme.md +170 -0
  69. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/test-clock.mjs +65 -0
  70. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/test.mjs +4 -0
  71. package/benches/contrib/oss-skill-independent/fixtures/throttle-sync-throw/upstream-package.json +60 -0
  72. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/index.d.ts +149 -0
  73. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/index.js +93 -0
  74. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/license +9 -0
  75. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/package.json +52 -0
  76. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/readme.md +192 -0
  77. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/test-clock.mjs +65 -0
  78. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/test.mjs +4 -0
  79. package/benches/contrib/oss-skill-independent/fixtures/timeout-custom-timers/upstream-package.json +52 -0
  80. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/index.d.ts +151 -0
  81. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/index.js +114 -0
  82. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/license +9 -0
  83. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/package.json +48 -0
  84. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/readme.md +158 -0
  85. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/test-clock.mjs +65 -0
  86. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/test.mjs +4 -0
  87. package/benches/contrib/oss-skill-independent/fixtures/timeout-infinity-abort/upstream-package.json +48 -0
  88. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/index.d.ts +151 -0
  89. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/index.js +122 -0
  90. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/license +9 -0
  91. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/package.json +50 -0
  92. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/readme.md +190 -0
  93. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/test-clock.mjs +65 -0
  94. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/test.mjs +4 -0
  95. package/benches/contrib/oss-skill-independent/fixtures/timeout-rejection-listener/upstream-package.json +50 -0
  96. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/LICENSE +22 -0
  97. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/Readme.md +1015 -0
  98. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/esm.mjs +15 -0
  99. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/index.js +27 -0
  100. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/argument.js +147 -0
  101. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/command.js +1948 -0
  102. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/error.js +45 -0
  103. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/help.js +396 -0
  104. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/option.js +208 -0
  105. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/lib/suggestSimilar.js +100 -0
  106. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/package-support.json +16 -0
  107. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/package.json +63 -0
  108. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/regression.test.mjs +5 -0
  109. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/test-clock.mjs +65 -0
  110. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/test.mjs +4 -0
  111. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/typings/index.d.ts +774 -0
  112. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/typings/index.test-d.ts +416 -0
  113. package/benches/contrib/oss-skill-independent/ground-truth/commander-async-listener-order/upstream-package.json +69 -0
  114. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/LICENSE +22 -0
  115. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/Readme.md +1149 -0
  116. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/esm.mjs +16 -0
  117. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/index.js +24 -0
  118. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/argument.js +149 -0
  119. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/command.js +2666 -0
  120. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/error.js +39 -0
  121. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/help.js +713 -0
  122. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/option.js +367 -0
  123. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/lib/suggestSimilar.js +101 -0
  124. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/package-support.json +16 -0
  125. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/package.json +71 -0
  126. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/regression.test.mjs +5 -0
  127. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/test-clock.mjs +65 -0
  128. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/test.mjs +4 -0
  129. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/typings/esm.d.mts +3 -0
  130. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/typings/index.d.ts +1045 -0
  131. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/typings/index.test-d.ts +737 -0
  132. package/benches/contrib/oss-skill-independent/ground-truth/commander-output-isolation/upstream-package.json +82 -0
  133. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/async-hooks-stub.js +15 -0
  134. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/index.d.ts +40 -0
  135. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/index.js +71 -0
  136. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/license +9 -0
  137. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/package.json +61 -0
  138. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/readme.md +99 -0
  139. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/regression.test.mjs +6 -0
  140. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/test-clock.mjs +65 -0
  141. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/test.mjs +4 -0
  142. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/upstream-package.json +54 -0
  143. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/vendor/yocto-queue/index.js +67 -0
  144. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/vendor/yocto-queue/license +9 -0
  145. package/benches/contrib/oss-skill-independent/ground-truth/limit-async-context/vendor/yocto-queue/package.json +46 -0
  146. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/index.d.ts +136 -0
  147. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/index.js +148 -0
  148. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/license +9 -0
  149. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/package.json +57 -0
  150. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/readme.md +181 -0
  151. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/regression.test.mjs +5 -0
  152. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/test-clock.mjs +65 -0
  153. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/test.mjs +4 -0
  154. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/upstream-package.json +58 -0
  155. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/vendor/yocto-queue/index.js +84 -0
  156. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/vendor/yocto-queue/license +9 -0
  157. package/benches/contrib/oss-skill-independent/ground-truth/limit-map-iteration-rejection/vendor/yocto-queue/package.json +48 -0
  158. package/benches/contrib/oss-skill-independent/ground-truth/oracle-commander-async-listener-order.mjs +1 -0
  159. package/benches/contrib/oss-skill-independent/ground-truth/oracle-commander-output-isolation.mjs +1 -0
  160. package/benches/contrib/oss-skill-independent/ground-truth/oracle-limit-async-context.mjs +1 -0
  161. package/benches/contrib/oss-skill-independent/ground-truth/oracle-limit-map-iteration-rejection.mjs +1 -0
  162. package/benches/contrib/oss-skill-independent/ground-truth/oracle-throttle-sync-throw.mjs +1 -0
  163. package/benches/contrib/oss-skill-independent/ground-truth/oracle-timeout-custom-timers.mjs +1 -0
  164. package/benches/contrib/oss-skill-independent/ground-truth/oracle-timeout-infinity-abort.mjs +1 -0
  165. package/benches/contrib/oss-skill-independent/ground-truth/oracle-timeout-rejection-listener.mjs +1 -0
  166. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/index.d.ts +136 -0
  167. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/index.js +121 -0
  168. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/license +9 -0
  169. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/package.json +60 -0
  170. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/readme.md +170 -0
  171. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/regression.test.mjs +6 -0
  172. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/test-clock.mjs +65 -0
  173. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/test.mjs +4 -0
  174. package/benches/contrib/oss-skill-independent/ground-truth/throttle-sync-throw/upstream-package.json +60 -0
  175. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/index.d.ts +149 -0
  176. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/index.js +95 -0
  177. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/license +9 -0
  178. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/package.json +52 -0
  179. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/readme.md +192 -0
  180. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/regression.test.mjs +5 -0
  181. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/test-clock.mjs +65 -0
  182. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/test.mjs +4 -0
  183. package/benches/contrib/oss-skill-independent/ground-truth/timeout-custom-timers/upstream-package.json +52 -0
  184. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/index.d.ts +151 -0
  185. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/index.js +114 -0
  186. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/license +9 -0
  187. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/package.json +48 -0
  188. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/readme.md +158 -0
  189. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/regression.test.mjs +5 -0
  190. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/test-clock.mjs +65 -0
  191. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/test.mjs +4 -0
  192. package/benches/contrib/oss-skill-independent/ground-truth/timeout-infinity-abort/upstream-package.json +48 -0
  193. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/index.d.ts +151 -0
  194. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/index.js +122 -0
  195. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/license +9 -0
  196. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/package.json +50 -0
  197. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/readme.md +190 -0
  198. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/regression.test.mjs +5 -0
  199. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/test-clock.mjs +65 -0
  200. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/test.mjs +4 -0
  201. package/benches/contrib/oss-skill-independent/ground-truth/timeout-rejection-listener/upstream-package.json +50 -0
  202. package/benches/contrib/oss-skill-independent/prompts/commander-async-listener-order.md +3 -0
  203. package/benches/contrib/oss-skill-independent/prompts/commander-output-isolation.md +3 -0
  204. package/benches/contrib/oss-skill-independent/prompts/limit-async-context.md +3 -0
  205. package/benches/contrib/oss-skill-independent/prompts/limit-map-iteration-rejection.md +3 -0
  206. package/benches/contrib/oss-skill-independent/prompts/throttle-sync-throw.md +3 -0
  207. package/benches/contrib/oss-skill-independent/prompts/timeout-custom-timers.md +3 -0
  208. package/benches/contrib/oss-skill-independent/prompts/timeout-infinity-abort.md +3 -0
  209. package/benches/contrib/oss-skill-independent/prompts/timeout-rejection-listener.md +3 -0
  210. package/benches/contrib/oss-skill-independent/provenance.json +1903 -0
  211. package/benches/contrib/oss-skill-independent/task-specs.json +63 -0
  212. package/benches/contrib/oss-skill-independent/test-clock.mjs +65 -0
  213. package/benches/contrib/oss-skill-independent/verifiers/cases.mjs +197 -0
  214. package/benches/contrib/oss-skill-independent/verifiers/commander-async-listener-order.mjs +1 -0
  215. package/benches/contrib/oss-skill-independent/verifiers/commander-output-isolation.mjs +1 -0
  216. package/benches/contrib/oss-skill-independent/verifiers/grade.mjs +48 -0
  217. package/benches/contrib/oss-skill-independent/verifiers/limit-async-context.mjs +1 -0
  218. package/benches/contrib/oss-skill-independent/verifiers/limit-map-iteration-rejection.mjs +1 -0
  219. package/benches/contrib/oss-skill-independent/verifiers/probe.mjs +16 -0
  220. package/benches/contrib/oss-skill-independent/verifiers/regression-evidence.mjs +105 -0
  221. package/benches/contrib/oss-skill-independent/verifiers/test-reporter.mjs +29 -0
  222. package/benches/contrib/oss-skill-independent/verifiers/throttle-sync-throw.mjs +1 -0
  223. package/benches/contrib/oss-skill-independent/verifiers/timeout-custom-timers.mjs +1 -0
  224. package/benches/contrib/oss-skill-independent/verifiers/timeout-infinity-abort.mjs +1 -0
  225. package/benches/contrib/oss-skill-independent/verifiers/timeout-rejection-listener.mjs +1 -0
  226. package/dist/cli.js +166 -53
  227. package/dist/commands/bench-check-json.test.js +221 -0
  228. package/dist/commands/bench-check-report.js +48 -0
  229. package/dist/commands/bench-command-template.js +129 -0
  230. package/dist/commands/bench-manage.js +91 -0
  231. package/dist/commands/bench-manage.test.js +87 -0
  232. package/dist/commands/bench.js +68 -38
  233. package/dist/commands/bench.test.js +101 -0
  234. package/dist/commands/eval-component.js +17 -0
  235. package/dist/commands/eval-export.js +152 -0
  236. package/dist/commands/eval-export.test.js +122 -0
  237. package/dist/commands/eval.js +14 -3
  238. package/dist/commands/eval.test.js +58 -1
  239. package/dist/harness/bench.js +21 -2
  240. package/dist/harness/eval-audit.js +42 -4
  241. package/dist/harness/eval-budget.js +51 -0
  242. package/dist/harness/eval-budget.test.js +210 -0
  243. package/dist/harness/eval-component.test.js +36 -0
  244. package/dist/harness/eval-contract.js +5 -1
  245. package/dist/harness/replay-package.js +85 -0
  246. package/dist/harness/runner.js +22 -1
  247. package/docs/bench-authoring.md +40 -0
  248. package/docs/bench-check-json.md +115 -0
  249. package/docs/case-management.md +65 -0
  250. package/docs/eval-component.md +60 -49
  251. package/docs/examples/check-receiver-mechanism-proposal.mjs +124 -0
  252. package/docs/examples/prepare-native-diff-probe.mjs +75 -0
  253. package/docs/examples/reproduce-independent-comparison-budget.mjs +73 -0
  254. package/docs/first-real-eval.md +6 -0
  255. package/docs/growth-roadmap-2026-10.md +57 -93
  256. package/docs/metrics.md +21 -0
  257. package/docs/plans/2026-10-14-evidence-and-release-sequence.md +29 -12
  258. package/docs/plans/2026-10-15-independent-comparison-budget.json +1769 -0
  259. package/docs/plans/2026-10-15-independent-comparison-inputs.json +373 -0
  260. package/docs/plans/2026-10-15-independent-comparison-proposal.md +177 -0
  261. package/docs/plans/2026-10-15-native-diff-mechanism.md +105 -0
  262. package/docs/plans/2026-10-15-receiver-mechanism-proposal.json +342 -0
  263. package/docs/plans/2026-10-15-receiver-mechanism-proposal.md +146 -0
  264. package/docs/plans/2026-10-15-receiver-mechanism-verification.json +105 -0
  265. package/docs/plans/2026-10-16-case-workflow-and-release.md +30 -0
  266. package/docs/releases/0.10.0.md +45 -0
  267. package/docs/releases/0.9.1-first-publication.json +249 -0
  268. package/docs/releases/0.9.1-verification.json +122 -0
  269. package/docs/releases/0.9.1.md +33 -1
  270. package/docs/releases/trusted-publishing.md +61 -0
  271. package/docs/replay-packages.md +88 -0
  272. package/docs/schemas/bench-check.schema.json +109 -0
  273. package/docs/schemas/eval-request.schema.json +12 -0
  274. package/docs/sharing-results.md +6 -0
  275. package/docs/skill-evaluation-evidence.md +52 -0
  276. package/evidence/2026-10-15-diagnosing-receiver-correction.md +140 -0
  277. package/evidence/2026-10-15-independent-comparison-regression-stop.md +162 -0
  278. package/evidence/2026-10-15-independent-offline-readiness.md +144 -0
  279. package/evidence/2026-10-15-native-diff-mechanism.md +196 -0
  280. package/evidence/2026-10-15-receiver-mechanism-stop.md +154 -0
  281. package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/README.md +35 -0
  282. package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/expected.json +577 -0
  283. package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/receiver-contract.test.mjs +138 -0
  284. package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/replay.mjs +127 -0
  285. package/evidence/artifacts/2026-10-15-diagnosing-receiver-correction/verification.json +105 -0
  286. package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/README.md +32 -0
  287. package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/checks.json +32 -0
  288. package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/package.tar.gz +0 -0
  289. package/evidence/artifacts/2026-10-15-independent-comparison-regression-stop/verification.json +25 -0
  290. package/evidence/artifacts/2026-10-15-independent-offline-readiness/README.md +17 -0
  291. package/evidence/artifacts/2026-10-15-independent-offline-readiness/verification.json +1548 -0
  292. package/evidence/artifacts/2026-10-15-native-diff-mechanism/README.md +48 -0
  293. package/evidence/artifacts/2026-10-15-native-diff-mechanism/package.tar.gz +0 -0
  294. package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/README.md +38 -0
  295. package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/checks.json +118 -0
  296. package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/package.tar.gz +0 -0
  297. package/evidence/artifacts/2026-10-15-receiver-mechanism-stop/verification.json +36 -0
  298. package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/LICENSE +21 -0
  299. package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/SKILL.md +51 -0
  300. package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/agents/openai.yaml +3 -0
  301. package/evidence/inputs/diagnosing-bugs-compact-v4.1-receiver/scripts/hitl-loop.template.sh +44 -0
  302. package/package.json +1 -1
  303. package/skills/skillfit/SKILL.md +17 -5
package/dist/cli.js CHANGED
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { parseArgs } from 'node:util';
3
3
  import { runBenchAdd, runBenchCheck, runBenchInit } from './commands/bench.js';
4
+ import { benchCheckError, benchCheckJson } from './commands/bench-check-report.js';
5
+ import { inspectBench, manageBench } from './commands/bench-manage.js';
6
+ import { exportEvaluation } from './commands/eval-export.js';
4
7
  import { runBundleExport } from './commands/bundle.js';
5
8
  import { runDoctor } from './commands/doctor.js';
6
9
  import { DEFAULT_EVAL_TRIALS, runEval } from './commands/eval.js';
@@ -18,15 +21,20 @@ Usage:
18
21
  skillfit report [--agent <id>] [--json] Skill usage receipts from local session history (read-only)
19
22
  skillfit report eval <manifest.json> Render an existing evaluation as Markdown (read-only)
20
23
  skillfit report eval <manifest-or-run-dir> --json [--replay] Assess saved evidence for an Agent
24
+ skillfit report eval <run-dir> --export <new-dir> Plan a portable offline replay package
21
25
  skillfit eval --request <request.json> --dry-run Return a pinned JSON plan without calls
22
26
  skillfit eval --request <request.json> --plan-sha <sha256> Run that plan and return JSON evidence
23
27
  skillfit eval <target-path> [options] A/B-test a Skill, rules, or MCP setup against a bench
24
28
  skillfit mcp check <spec.json> Handshake with a stdio or Streamable HTTP MCP server and audit its tool catalog
25
- skillfit bench init [dir] Scaffold a new bench directory
26
- skillfit bench check [dir] Validate a bench offline (verifier self-tests, hygiene)
29
+ skillfit bench init [dir] [--kind output|command] Scaffold a text-output or code-editing case
30
+ skillfit bench check [dir] [--json] Validate a bench offline (verifier self-tests, hygiene)
27
31
  skillfit bench check [dir] --calibrate Plus real baseline-difficulty runs (needs --agent)
28
32
  skillfit bench add <dir> --freeze ... Freeze a real failure into a bench task (see below)
29
33
  skillfit bench add <dir> --from-commit <sha> Mine a fix commit (parent = fixture, fix's tests = verifier)
34
+ skillfit bench list <dir> [--json] List registered cases without running verifiers
35
+ skillfit bench show <dir> <task-id> [--json] Inspect one registered case
36
+ skillfit bench edit <dir> <task-id> --set <field=value> Plan a manifest edit (apply with --yes)
37
+ skillfit bench remove <dir> <task-id> Plan to unregister a case, preserving its files
30
38
  skillfit install [options] Inspect or apply a managed configuration profile
31
39
  skillfit setup codex [options] Select verified upstream Skills and global Codex guidance
32
40
  skillfit bundle export <dir> [options] Export used Codex skills and global guidance as a portable profile
@@ -38,13 +46,16 @@ Options:
38
46
  --baseline-skill <path> With --mode installed, compare a previous Skill version against the target
39
47
  --request <path> Version 1 Skill revision request (JSON output; excludes positional eval options)
40
48
  --plan-sha <hash> Confirm the current --request dry-run plan before real calls
41
- --json Machine output for report, report eval, and request-based eval
49
+ --json Machine output for bench check/list/show/edit/remove, report, and request-based eval
42
50
  --policy <path> With report eval --json, assess against a policy (post-hoc changes cannot authorize adoption)
43
51
  --records <dir> With report eval --json, use native evidence from this run directory
44
52
  --replay With report eval --json, regrade cloned deliveries using the frozen bench
53
+ --export <dir> With report eval, plan a portable package; --yes writes a fresh destination
54
+ --input-root <label=path> With --export, recover pinned inputs from a matching copy (repeatable)
45
55
  --compete-installed With --mode trigger, copy other user-level Skills into each trial so recall is not an upper bound
46
56
  --input <mode> Paired eval or baseline calibration: snapshot (default) | workspace (CLI only)
47
57
  --bench <path> Bench directory for eval (default: bundled benches)
58
+ --task <id> With eval, select cases (repeatable, manifest order); requests use taskIds
48
59
  --trials <n> Repetitions per condition for eval (integer 1–20; default: ${DEFAULT_EVAL_TRIALS})
49
60
  --max-calls <n> Call ceiling for eval / bench check --calibrate (includes enabled judges)
50
61
  Also controls baseline calibration repetitions
@@ -65,6 +76,15 @@ Options:
65
76
  --help, -h Show help
66
77
  --version, -v Show version
67
78
 
79
+ bench init options:
80
+ --kind <kind> output (default, grades a reply) | command (grades file edits)
81
+
82
+ bench edit options:
83
+ --set <field=value> Change fixture, prompt, promptTrigger, verifier, verifierKind,
84
+ oracle, rubric or shouldTrigger (repeatable)
85
+ --unset <field> Remove promptTrigger, oracle, rubric or shouldTrigger (repeatable)
86
+ Edits/removals default to a plan; --yes backs up bench.json and applies
87
+
68
88
  bench add --freeze options:
69
89
  --task <id> Task id (required)
70
90
  --prompt <text> Task prompt, or --prompt-file <path> (required)
@@ -85,56 +105,79 @@ bench add --from-commit options:
85
105
 
86
106
  Docs: https://github.com/remote-controlled-man/skillfit
87
107
  `;
108
+ const CLI_OPTIONS = {
109
+ agent: { type: 'string' },
110
+ 'judge-agent': { type: 'string' },
111
+ mode: { type: 'string' },
112
+ 'baseline-skill': { type: 'string' },
113
+ request: { type: 'string' },
114
+ 'plan-sha': { type: 'string' },
115
+ policy: { type: 'string' },
116
+ records: { type: 'string' },
117
+ replay: { type: 'boolean', default: false },
118
+ 'compete-installed': { type: 'boolean', default: false },
119
+ input: { type: 'string' },
120
+ bench: { type: 'string' },
121
+ trials: { type: 'string' },
122
+ 'max-calls': { type: 'string' },
123
+ profile: { type: 'string' },
124
+ 'profile-path': { type: 'string' },
125
+ skill: { type: 'string', multiple: true },
126
+ all: { type: 'boolean', default: false },
127
+ starter: { type: 'boolean', default: false },
128
+ list: { type: 'boolean', default: false },
129
+ 'no-rules': { type: 'boolean', default: false },
130
+ 'min-sessions': { type: 'string' },
131
+ 'upstream-lock': { type: 'string' },
132
+ task: { type: 'string', multiple: true },
133
+ set: { type: 'string', multiple: true },
134
+ unset: { type: 'string', multiple: true },
135
+ export: { type: 'string' },
136
+ 'input-root': { type: 'string', multiple: true },
137
+ prompt: { type: 'string' },
138
+ 'prompt-file': { type: 'string' },
139
+ freeze: { type: 'boolean', default: false },
140
+ 'from-commit': { type: 'string' },
141
+ include: { type: 'string', multiple: true },
142
+ 'source-dir': { type: 'string' },
143
+ 'verifier-cmd': { type: 'string' },
144
+ expect: { type: 'string' },
145
+ oracle: { type: 'string' },
146
+ decompose: { type: 'boolean', default: false },
147
+ 'verifier-kind': { type: 'string' },
148
+ kind: { type: 'string' },
149
+ 'should-trigger': { type: 'string' },
150
+ calibrate: { type: 'boolean', default: false },
151
+ json: { type: 'boolean', default: false },
152
+ 'dry-run': { type: 'boolean', default: false },
153
+ project: { type: 'boolean', default: false },
154
+ strict: { type: 'boolean', default: false },
155
+ yes: { type: 'boolean', default: false },
156
+ help: { type: 'boolean', short: 'h', default: false },
157
+ version: { type: 'boolean', short: 'v', default: false },
158
+ };
159
+ function jsonBenchCommand() {
160
+ const supported = ['check', 'list', 'show', 'edit', 'remove'];
161
+ const args = process.argv.slice(2);
162
+ try {
163
+ const { values, positionals } = parseArgs({ args, allowPositionals: true, strict: false, options: CLI_OPTIONS });
164
+ // Loose parsing retains an invalid inline boolean value (for example
165
+ // --json=true). It still requests the JSON error envelope, not text output.
166
+ return values.json !== false && positionals[0] === 'bench' && supported.includes(positionals[1] ?? '') ? positionals[1] : null;
167
+ }
168
+ catch {
169
+ // A missing option value may prevent even loose parsing. Preserve JSON errors
170
+ // for the standard command spelling, including a leading --json flag.
171
+ const jsonFlag = (arg) => arg === '--json' || arg.startsWith('--json=');
172
+ const command = args.filter(arg => !jsonFlag(arg));
173
+ return args.some(jsonFlag) && command[0] === 'bench' && supported.includes(command[1] ?? '') ? command[1] : null;
174
+ }
175
+ }
88
176
  async function main() {
89
177
  const { values, positionals } = parseArgs({
90
178
  args: process.argv.slice(2),
91
179
  allowPositionals: true,
92
- options: {
93
- agent: { type: 'string' },
94
- 'judge-agent': { type: 'string' },
95
- mode: { type: 'string' },
96
- 'baseline-skill': { type: 'string' },
97
- request: { type: 'string' },
98
- 'plan-sha': { type: 'string' },
99
- policy: { type: 'string' },
100
- records: { type: 'string' },
101
- replay: { type: 'boolean', default: false },
102
- 'compete-installed': { type: 'boolean', default: false },
103
- input: { type: 'string' },
104
- bench: { type: 'string' },
105
- trials: { type: 'string' },
106
- 'max-calls': { type: 'string' },
107
- profile: { type: 'string' },
108
- 'profile-path': { type: 'string' },
109
- skill: { type: 'string', multiple: true },
110
- all: { type: 'boolean', default: false },
111
- starter: { type: 'boolean', default: false },
112
- list: { type: 'boolean', default: false },
113
- 'no-rules': { type: 'boolean', default: false },
114
- 'min-sessions': { type: 'string' },
115
- 'upstream-lock': { type: 'string' },
116
- task: { type: 'string' },
117
- prompt: { type: 'string' },
118
- 'prompt-file': { type: 'string' },
119
- freeze: { type: 'boolean', default: false },
120
- 'from-commit': { type: 'string' },
121
- include: { type: 'string', multiple: true },
122
- 'source-dir': { type: 'string' },
123
- 'verifier-cmd': { type: 'string' },
124
- expect: { type: 'string' },
125
- oracle: { type: 'string' },
126
- decompose: { type: 'boolean', default: false },
127
- 'verifier-kind': { type: 'string' },
128
- 'should-trigger': { type: 'string' },
129
- calibrate: { type: 'boolean', default: false },
130
- json: { type: 'boolean', default: false },
131
- 'dry-run': { type: 'boolean', default: false },
132
- project: { type: 'boolean', default: false },
133
- strict: { type: 'boolean', default: false },
134
- yes: { type: 'boolean', default: false },
135
- help: { type: 'boolean', short: 'h', default: false },
136
- version: { type: 'boolean', short: 'v', default: false },
137
- },
180
+ options: CLI_OPTIONS,
138
181
  });
139
182
  if (values.version) {
140
183
  console.log(VERSION);
@@ -148,6 +191,22 @@ async function main() {
148
191
  if (values['baseline-skill'] !== undefined && command !== 'eval') {
149
192
  throw new Error('--baseline-skill applies only to eval --mode installed.');
150
193
  }
194
+ if (values.kind !== undefined && !(command === 'bench' && positionals[1] === 'init')) {
195
+ throw new Error('--kind applies only to bench init.');
196
+ }
197
+ if (values.task !== undefined && command !== 'eval' && !(command === 'bench' && positionals[1] === 'add')) {
198
+ throw new Error('--task applies only to eval or bench add.');
199
+ }
200
+ if ((values.set || values.unset) && !(command === 'bench' && positionals[1] === 'edit'))
201
+ throw new Error('--set and --unset apply only to bench edit.');
202
+ if (values.export !== undefined && !(command === 'report' && positionals[1] === 'eval'))
203
+ throw new Error('--export applies only to report eval.');
204
+ if (values['input-root'] && values.export === undefined)
205
+ throw new Error('--input-root requires report eval --export.');
206
+ if (values.export !== undefined && (values.replay || values.records || values.policy))
207
+ throw new Error('--export cannot be combined with --replay, --records or --policy.');
208
+ if (command === 'bench' && positionals[1] === 'add' && values.task && values.task.length !== 1)
209
+ throw new Error('bench add requires exactly one --task.');
151
210
  if (values.request !== undefined && command !== 'eval')
152
211
  throw new Error('--request applies only to eval.');
153
212
  if (values['plan-sha'] !== undefined && (command !== 'eval' || values.request === undefined || values['dry-run']))
@@ -191,6 +250,13 @@ async function main() {
191
250
  process.exitCode = 2;
192
251
  return;
193
252
  }
253
+ if (values.export !== undefined) {
254
+ const result = await exportEvaluation(positionals[2], values.export, { yes: values.yes, dryRun: values['dry-run'], benchDir: values.bench, inputRoots: values['input-root'],
255
+ log: values.json ? () => { } : undefined });
256
+ if (values.json)
257
+ console.log(JSON.stringify(result, null, 2));
258
+ return;
259
+ }
194
260
  if (values.json)
195
261
  console.log(JSON.stringify(await reportEvalComponent(positionals[2], {
196
262
  policyPath: values.policy, recordsPath: values.records, replay: values.replay, benchDir: values.bench,
@@ -203,7 +269,7 @@ async function main() {
203
269
  return;
204
270
  case 'eval': {
205
271
  if (values.request !== undefined) {
206
- if (positionals.length !== 1 || ['agent', 'mode', 'baseline-skill', 'bench', 'trials', 'max-calls', 'input', 'judge-agent'].some(key => values[key] !== undefined) || values['compete-installed']) {
272
+ if (positionals.length !== 1 || ['agent', 'mode', 'baseline-skill', 'bench', 'task', 'trials', 'max-calls', 'input', 'judge-agent'].some(key => values[key] !== undefined) || values['compete-installed']) {
207
273
  throw new Error('--request cannot be combined with a target or positional eval settings; put settings in the request.');
208
274
  }
209
275
  const result = await runEvalComponent(values.request, { dryRun: values['dry-run'], expectedPlanSha256: values['plan-sha'], log: line => console.error(line) });
@@ -231,6 +297,7 @@ async function main() {
231
297
  skillPath,
232
298
  baselineSkillPath: values['baseline-skill'],
233
299
  bench: values.bench,
300
+ taskIds: values.task,
234
301
  mode,
235
302
  inputMode,
236
303
  judgeAgent: values['judge-agent'],
@@ -288,13 +355,45 @@ async function main() {
288
355
  }
289
356
  case 'bench': {
290
357
  const subcommand = positionals[1];
358
+ if (subcommand === 'list' || subcommand === 'show') {
359
+ if (subcommand === 'show' && !positionals[3])
360
+ throw new Error('Usage: skillfit bench show <dir> <task-id> [--json]');
361
+ const result = inspectBench(positionals[2] ?? '.', subcommand === 'show' ? positionals[3] : undefined);
362
+ if (values.json)
363
+ console.log(JSON.stringify(result, null, 2));
364
+ else if (subcommand === 'show')
365
+ console.log(JSON.stringify(result.tasks[0], null, 2));
366
+ else {
367
+ console.log(`Bench: ${result.name} (${result.tasks.length} tasks, sha256 ${result.sha256})`);
368
+ for (const task of result.tasks)
369
+ console.log(`${task.id}\t${task.verifierKind}\t${task.oracle ? 'oracle' : 'no oracle'}\t${task.fixture}`);
370
+ }
371
+ return;
372
+ }
373
+ if (subcommand === 'edit' || subcommand === 'remove') {
374
+ if (!positionals[2] || !positionals[3])
375
+ throw new Error(`Usage: skillfit bench ${subcommand} <dir> <task-id> [--json] [--dry-run] [--yes]`);
376
+ const result = manageBench({ dir: positionals[2], taskId: positionals[3], action: subcommand,
377
+ set: values.set, unset: values.unset, dryRun: values['dry-run'], yes: values.yes,
378
+ log: values.json ? () => { } : undefined });
379
+ if (values.json)
380
+ console.log(JSON.stringify(result, null, 2));
381
+ return;
382
+ }
291
383
  if (subcommand === 'init') {
292
- await runBenchInit({ ...common, dir: positionals[2] });
384
+ const kind = values.kind;
385
+ if (kind !== undefined && kind !== 'output' && kind !== 'command') {
386
+ throw new Error(`Unknown --kind: ${kind} (expected "output" or "command")`);
387
+ }
388
+ await runBenchInit({ ...common, dir: positionals[2], kind });
293
389
  return;
294
390
  }
295
391
  if (subcommand === 'check') {
392
+ if (values.json && values.calibrate)
393
+ throw new Error('bench check --json is offline only; --calibrate cannot be combined with --json.');
296
394
  const report = await runBenchCheck({
297
395
  dir: positionals[2],
396
+ log: values.json ? () => { } : undefined,
298
397
  calibrate: values.calibrate
299
398
  ? {
300
399
  agent: values.agent,
@@ -305,6 +404,8 @@ async function main() {
305
404
  }
306
405
  : false,
307
406
  });
407
+ if (values.json)
408
+ console.log(JSON.stringify(benchCheckJson(report), null, 2));
308
409
  if (report.failures > 0)
309
410
  process.exitCode = 1;
310
411
  return;
@@ -325,7 +426,7 @@ async function main() {
325
426
  await runBenchAdd({
326
427
  ...common,
327
428
  benchDir: positionals[2],
328
- task: values.task,
429
+ task: values.task?.[0],
329
430
  prompt: values.prompt,
330
431
  promptFile: values['prompt-file'],
331
432
  freeze: values.freeze ?? false,
@@ -341,7 +442,7 @@ async function main() {
341
442
  });
342
443
  return;
343
444
  }
344
- console.error('Usage: skillfit bench init [dir] | skillfit bench check [dir] | skillfit bench add <dir> --freeze ...');
445
+ console.error('Usage: skillfit bench init [dir] | check [dir] | add <dir> ... | list <dir> | show/edit/remove <dir> <task-id>');
345
446
  process.exitCode = 2;
346
447
  return;
347
448
  }
@@ -352,6 +453,18 @@ async function main() {
352
453
  }
353
454
  }
354
455
  main().catch((err) => {
456
+ const benchCommand = jsonBenchCommand();
457
+ if (benchCommand === 'check') {
458
+ console.log(JSON.stringify(benchCheckError(err), null, 2));
459
+ process.exitCode = 2;
460
+ return;
461
+ }
462
+ if (benchCommand) {
463
+ console.log(JSON.stringify({ schemaVersion: 1, kind: 'skillfit.bench-error', status: 'error',
464
+ error: { code: 'INVALID_BENCH_OPERATION', message: err instanceof Error ? err.message : String(err) } }, null, 2));
465
+ process.exitCode = 2;
466
+ return;
467
+ }
355
468
  if (process.argv.some(arg => arg === '--request' || arg.startsWith('--request=')) ||
356
469
  (process.argv.includes('--json') && process.argv.includes('report') && process.argv.includes('eval'))) {
357
470
  console.log(JSON.stringify(componentError(err), null, 2));
@@ -0,0 +1,221 @@
1
+ import assert from 'node:assert/strict';
2
+ import { spawnSync } from 'node:child_process';
3
+ import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
4
+ import { tmpdir } from 'node:os';
5
+ import { join } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+ import { test } from 'node:test';
8
+ import { runBenchCheck, runBenchInit } from './bench.js';
9
+ import { benchCheckJson, benchDiagnostic } from './bench-check-report.js';
10
+ import { MOCK_MARKER_FILE } from '../harness/constants.js';
11
+ const ROOT = fileURLToPath(new URL('../..', import.meta.url));
12
+ const CLI = join(ROOT, 'dist/cli.js');
13
+ const SCHEMA = JSON.parse(readFileSync(join(ROOT, 'docs/schemas/bench-check.schema.json'), 'utf8'));
14
+ async function scaffold(t, kind = 'command') {
15
+ const cwd = mkdtempSync(join(tmpdir(), 'skillfit-check-json-'));
16
+ t.after(() => rmSync(cwd, { recursive: true, force: true }));
17
+ const dir = join(cwd, 'my bench');
18
+ await runBenchInit({ dir, kind, yes: true, log: () => { } });
19
+ return { cwd, dir };
20
+ }
21
+ function cli(cwd, args, expectedExit, env = process.env) {
22
+ const result = spawnSync(process.execPath, [CLI, ...args], { cwd, encoding: 'utf8', timeout: 30_000, env });
23
+ assert.equal(result.status, expectedExit, result.stderr || result.stdout);
24
+ assert.equal(result.stderr, '', 'JSON commands must not leak human logs to stderr');
25
+ // Parsing the complete stdout also rejects prefixes, trailers, and multiple JSON documents.
26
+ const data = JSON.parse(result.stdout);
27
+ assert.deepEqual(Object.keys(data).sort(), [...SCHEMA.required].sort(), 'result keys follow the published schema');
28
+ assert.equal(data.schemaVersion, 1);
29
+ assert.equal(data.kind, 'skillfit.bench-check');
30
+ assert.equal(data.scope, 'offline-integrity');
31
+ if (data.summary) {
32
+ for (const [field, status] of [['passed', 'PASS'], ['warnings', 'WARN'], ['failures', 'FAIL'], ['info', 'INFO']]) {
33
+ assert.equal(data.summary[field], data.checks.filter((c) => c.status === status).length);
34
+ }
35
+ assert.equal(data.summary.total, data.checks.length);
36
+ for (const check of data.checks) {
37
+ const item = SCHEMA.properties.checks.items;
38
+ assert.deepEqual(Object.keys(check).sort(), [...item.required].sort());
39
+ assert.ok(item.properties.code.enum.includes(check.code), 'gate code is documented in the schema');
40
+ assert.ok(item.properties.status.enum.includes(check.status));
41
+ if (check.evidence) {
42
+ assert.deepEqual(Object.keys(check.evidence).sort(), [...item.properties.evidence.required].sort());
43
+ assert.ok(check.evidence.output.length <= item.properties.evidence.properties.output.maxLength);
44
+ }
45
+ assert.ok(check.code && check.message && check.location.path);
46
+ if (check.status === 'WARN' || check.status === 'FAIL')
47
+ assert.ok(check.remediation);
48
+ else
49
+ assert.equal(check.remediation, null);
50
+ }
51
+ }
52
+ assert.ok(!existsSync(join(cwd, 'runs')), 'offline JSON checks must not create evaluation runs');
53
+ return data;
54
+ }
55
+ test('bench check JSON preserves human gate outcomes, task identity and input fingerprints', async (t) => {
56
+ const { cwd, dir } = await scaffold(t);
57
+ const human = [];
58
+ const report = await runBenchCheck({ dir, log: line => human.push(line) });
59
+ const data = cli(cwd, ['bench', 'check', dir, '--json'], 0);
60
+ assert.equal(data.status, 'passed');
61
+ assert.equal(data.dir, dir);
62
+ assert.equal(data.error, null);
63
+ assert.equal(data.bench.taskCount, 1);
64
+ assert.match(data.bench.sha256, /^[a-f0-9]{64}$/);
65
+ assert.deepEqual(data.bench, report.bench);
66
+ assert.deepEqual(data.checks.map((c) => [c.code, c.status, c.message]), report.checks.map(c => [c.code, c.status, c.message]));
67
+ assert.equal(human.filter(line => line.startsWith('[')).length, data.summary.total);
68
+ const nop = data.checks.find((c) => c.code === 'UNTOUCHED_FIXTURE');
69
+ assert.equal(nop.taskId, 'example-task');
70
+ assert.deepEqual(nop.location, { path: 'bench.json', field: 'tasks[].verifier' });
71
+ assert.equal(nop.evidence.exitCode, 1, 'a failing untouched fixture is a passing integrity gate');
72
+ assert.equal(nop.status, 'PASS');
73
+ assert.equal(data.checks.find((c) => c.code === 'ORACLE').evidence.exitCode, 0);
74
+ });
75
+ test('warnings, output probes, mock arms and negative controls remain distinct in JSON', async (t) => {
76
+ const { cwd, dir } = await scaffold(t, 'output');
77
+ const path = join(dir, 'bench.json');
78
+ const manifest = JSON.parse(readFileSync(path, 'utf8'));
79
+ manifest.tasks[0].shouldTrigger = true;
80
+ manifest.tasks.push({ ...manifest.tasks[0], id: 'negative-task', shouldTrigger: false });
81
+ writeFileSync(path, JSON.stringify(manifest));
82
+ const data = cli(cwd, ['--json', 'bench', 'check', dir], 0);
83
+ assert.equal(data.status, 'passed');
84
+ assert.ok(data.summary.warnings > 0, 'facet-count warnings must not disappear or become failures');
85
+ for (const id of ['example-task', 'negative-task']) {
86
+ for (const code of ['MISSING_OUTPUT', 'EMPTY_OUTPUT', 'FACET_COUNT', 'ORACLE', 'MOCK_BASELINE', 'MOCK_TREATMENT', 'FIXTURE_SIZE']) {
87
+ assert.ok(data.checks.some((c) => c.code === code && c.taskId === id), `${id}: ${code}`);
88
+ }
89
+ }
90
+ const negative = data.checks.find((c) => c.code === 'NEGATIVE_CONTROLS');
91
+ assert.equal(negative.status, 'PASS');
92
+ assert.equal(negative.taskId, null);
93
+ });
94
+ test('missing, malformed and missing-reference benches produce structured validation failures', async (t) => {
95
+ const { cwd, dir } = await scaffold(t);
96
+ for (const [name, contents] of [['missing', null], ['malformed', '{'], ['missing-reference', '{"schemaVersion":1,"tasks":[{"id":"bad","fixture":"absent","prompt":"p.md","verifier":"node v.mjs"}]}']]) {
97
+ await t.test(name, () => {
98
+ if (contents === null)
99
+ rmSync(join(dir, 'bench.json'));
100
+ else
101
+ writeFileSync(join(dir, 'bench.json'), contents);
102
+ const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
103
+ assert.equal(data.status, 'failed');
104
+ assert.equal(data.bench, null);
105
+ assert.equal(data.summary.failures, 1);
106
+ assert.equal(data.checks[0].code, 'BENCH_LOAD');
107
+ assert.equal(data.checks[0].location.path, 'bench.json');
108
+ assert.match(data.checks[0].message, /bench does not load/);
109
+ });
110
+ }
111
+ });
112
+ test('JSON warnings and marker failures identify the affected bench fields and fixture paths', async (t) => {
113
+ const { cwd, dir } = await scaffold(t, 'output');
114
+ const path = join(dir, 'bench.json');
115
+ const manifest = JSON.parse(readFileSync(path, 'utf8'));
116
+ delete manifest.tasks[0].oracle;
117
+ manifest.tasks[0].shouldTrigger = true;
118
+ writeFileSync(path, JSON.stringify(manifest));
119
+ writeFileSync(join(dir, 'fixtures/example-task/large.txt'), 'x'.repeat(66 * 1024));
120
+ const warnings = cli(cwd, ['bench', 'check', dir, '--json'], 0);
121
+ const oracle = warnings.checks.find((c) => c.code === 'ORACLE');
122
+ assert.equal(oracle.status, 'WARN');
123
+ assert.equal(oracle.location.field, 'tasks[].oracle');
124
+ assert.equal(oracle.evidence, null);
125
+ const size = warnings.checks.find((c) => c.code === 'FIXTURE_SIZE');
126
+ assert.equal(size.status, 'WARN');
127
+ assert.equal(size.location.path, 'fixtures/example-task');
128
+ assert.equal(warnings.checks.find((c) => c.code === 'NEGATIVE_CONTROLS').status, 'WARN');
129
+ writeFileSync(join(dir, 'fixtures/example-task', MOCK_MARKER_FILE), '{');
130
+ const failed = cli(cwd, ['bench', 'check', dir, '--json'], 1);
131
+ const marker = failed.checks.find((c) => c.code === 'MOCK_MARKER');
132
+ assert.equal(marker.status, 'FAIL');
133
+ assert.equal(marker.taskId, 'example-task');
134
+ assert.equal(marker.location.path, `fixtures/example-task/${MOCK_MARKER_FILE}`);
135
+ });
136
+ test('JSON identifies a failed oracle process and retains its real command, exit and stderr', async (t) => {
137
+ const { cwd, dir } = await scaffold(t);
138
+ writeFileSync(join(dir, 'ground-truth/oracle-example-task.mjs'), "console.error('reference unavailable'); process.exit(7);");
139
+ const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
140
+ const gate = data.checks.find((c) => c.code === 'ORACLE');
141
+ assert.equal(gate.status, 'FAIL');
142
+ assert.equal(gate.taskId, 'example-task');
143
+ assert.equal(gate.evidence.command, 'node ground-truth/oracle-example-task.mjs');
144
+ assert.equal(gate.evidence.exitCode, 7);
145
+ assert.match(gate.evidence.output, /reference unavailable/);
146
+ });
147
+ test('JSON exposes the actual failing verifier facets after the reference repair', async (t) => {
148
+ const { cwd, dir } = await scaffold(t);
149
+ writeFileSync(join(dir, 'ground-truth/oracle-example-task.mjs'), "import {writeFileSync} from 'node:fs';import {join} from 'node:path';writeFileSync(join(process.argv[2],'index.js'),'export const add=(a,b)=>Math.abs(a+b);');");
150
+ const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
151
+ const gate = data.checks.find((c) => c.code === 'ORACLE');
152
+ assert.equal(gate.status, 'FAIL');
153
+ assert.equal(gate.evidence.command, 'node verifiers/example-task.mjs');
154
+ assert.ok(gate.evidence.checks.some((c) => c.name === 'negative-numbers' && !c.pass));
155
+ assert.ok(gate.evidence.checks.some((c) => c.name === 'positive-and-zero' && c.pass));
156
+ const verifier = join(dir, 'verifiers/example-task.mjs');
157
+ writeFileSync(verifier, readFileSync(verifier, 'utf8').replace('process.exit(passed ? 0 : 1)', 'process.exit(0)'));
158
+ const inconsistent = cli(cwd, ['bench', 'check', dir, '--json'], 1);
159
+ const lowScore = inconsistent.checks.find((c) => c.code === 'ORACLE');
160
+ assert.equal(lowScore.status, 'FAIL', 'an oracle must pass every named check even when exit code is zero');
161
+ assert.equal(lowScore.evidence.exitCode, 0);
162
+ assert.match(lowScore.message, /checks are stricter/);
163
+ });
164
+ test('an unspawnable verifier is a JSON failure with an unknown exit, never a passing NOP gate', async (t) => {
165
+ const { cwd, dir } = await scaffold(t);
166
+ const path = join(dir, 'bench.json');
167
+ const manifest = JSON.parse(readFileSync(path, 'utf8'));
168
+ manifest.tasks[0].verifier = 'skillfit-no-such-verifier';
169
+ writeFileSync(path, JSON.stringify(manifest));
170
+ const data = cli(cwd, ['bench', 'check', dir, '--json'], 1);
171
+ const gate = data.checks.find((c) => c.code === 'UNTOUCHED_FIXTURE');
172
+ assert.equal(gate.status, 'FAIL');
173
+ assert.equal(gate.evidence.exitCode, null);
174
+ assert.ok(gate.evidence.error);
175
+ assert.match(gate.message, /could not be started/);
176
+ });
177
+ test('noisy verifier output stays inside bounded JSON evidence while named facets are retained', async (t) => {
178
+ const { cwd, dir } = await scaffold(t);
179
+ const path = join(dir, 'verifiers/example-task.mjs');
180
+ writeFileSync(path, "console.log('x'.repeat(10_000));console.error('verifier diagnostic');\n" + readFileSync(path, 'utf8'));
181
+ const data = cli(cwd, ['bench', 'check', dir, '--json'], 0);
182
+ const evidence = data.checks.find((c) => c.code === 'ORACLE').evidence;
183
+ assert.equal(evidence.outputTruncated, true);
184
+ assert.ok(evidence.output.length <= 8192);
185
+ assert.equal(evidence.checks.length, 4);
186
+ assert.ok(evidence.checks.every((c) => c.pass));
187
+ });
188
+ test('argument errors and calibration combinations return JSON before any verifier or agent starts', async (t) => {
189
+ const { cwd, dir } = await scaffold(t);
190
+ const sentinel = join(cwd, 'verifier-started');
191
+ writeFileSync(join(dir, 'verifiers/example-task.mjs'), `import {writeFileSync} from 'node:fs'; writeFileSync(${JSON.stringify(sentinel)},'unexpected'); process.exit(1);`);
192
+ const cases = [
193
+ ['bench', 'check', dir, '--json', '--calibrate', '--agent', 'skillfit-no-live-agent'],
194
+ ['bench', 'check', dir, '--json', '--calibrate', '--dry-run', '--agent', 'skillfit-no-live-agent'],
195
+ ['--json', 'bench', 'check', dir, '--trials', 'nope'],
196
+ ['bench', '--json', 'check', dir, '--unknown-option'],
197
+ ['bench', 'check', dir, '--json', '--trials'],
198
+ ['bench', 'check', dir, '--json=true'],
199
+ ];
200
+ for (const args of cases) {
201
+ const data = cli(cwd, args, 2);
202
+ assert.equal(data.status, 'error');
203
+ assert.equal(data.summary, null);
204
+ assert.equal(data.error.code, 'INVALID_OR_FAILED_CHECK');
205
+ assert.ok(data.error.message);
206
+ assert.deepEqual(data.checks, []);
207
+ assert.ok(!existsSync(sentinel));
208
+ }
209
+ });
210
+ test('unexpected local execution errors cannot be mistaken for a completed JSON validation', async (t) => {
211
+ const { cwd, dir } = await scaffold(t);
212
+ const absent = join(cwd, 'missing-temp-root');
213
+ const data = cli(cwd, ['bench', 'check', dir, '--json'], 2, { ...process.env, TMPDIR: absent, TEMP: absent, TMP: absent });
214
+ assert.equal(data.status, 'error');
215
+ assert.equal(data.summary, null);
216
+ assert.ok(data.error.message);
217
+ });
218
+ test('offline JSON formatter refuses calibration records', () => {
219
+ assert.throws(() => benchCheckJson({ dir: '.', bench: null, failures: 0, warnings: 0,
220
+ checks: [benchDiagnostic('CALIBRATION', 'INFO', 'calibration record')] }), /must be offline/);
221
+ });
@@ -0,0 +1,48 @@
1
+ import { verdictFromOutput } from '../harness/verifier-summary.js';
2
+ import { MOCK_MARKER_FILE } from '../harness/constants.js';
3
+ const GATES = {
4
+ BENCH_LOAD: [null, 'Fix bench.json and its referenced files, then run bench check again.'],
5
+ UNTOUCHED_FIXTURE: ['verifier', 'Make the verifier executable and ensure the untouched fixture fails for the intended defect.'],
6
+ MISSING_OUTPUT: ['verifier', 'Make the verifier executable and reject a missing _output.md.'],
7
+ EMPTY_OUTPUT: ['verifier', 'Make the verifier executable and reject an empty _output.md.'],
8
+ FACET_COUNT: ['verifier', 'Decompose acceptance into 2–8 deterministic named checks.'],
9
+ ORACLE: ['oracle', 'Inspect the oracle and verifier output; register a reference repair that passes every check.'],
10
+ MOCK_COVERAGE: ['fixture', 'Add a valid .skillfit-mock.json marker for output tasks if mock coverage is needed.'],
11
+ MOCK_MARKER: ['fixture', 'Fix the .skillfit-mock.json file so it contains valid JSON.'],
12
+ MOCK_BASELINE: ['fixture', 'Inspect the baseline mock output and verifier.'],
13
+ MOCK_TREATMENT: ['fixture', 'Inspect the treatment mock output and verifier.'],
14
+ FIXTURE_SIZE: ['fixture', 'Shrink the fixture while preserving the real defect and acceptance checks.'],
15
+ TRIGGER_LABEL: ['shouldTrigger', 'Label trigger tasks and include appropriate negative controls.'],
16
+ NEGATIVE_CONTROLS: ['shouldTrigger', 'Add representative shouldTrigger:false tasks to reach the documented 30% target.'],
17
+ CALIBRATION: [null, 'Inspect the calibration records before considering a separately budgeted run.'],
18
+ };
19
+ export function benchDiagnostic(code, status, message, task, evidence = null) {
20
+ const [field, remediation] = GATES[code];
21
+ const marker = code.startsWith('MOCK_');
22
+ const path = task && field === 'fixture'
23
+ ? `${task.fixture}${marker ? `/${MOCK_MARKER_FILE}` : ''}` : 'bench.json';
24
+ return { code, status, message, taskId: task?.id ?? null,
25
+ location: { path, field: path === 'bench.json' && field ? `tasks[].${field}` : null },
26
+ remediation: status === 'FAIL' || status === 'WARN' ? remediation : null, evidence };
27
+ }
28
+ /** Bound process text without dropping exit status or individual verifier checks. */
29
+ export function benchCheckEvidence(result, command) {
30
+ // Verifier JSON is interpreted consistently with the existing runner.
31
+ return { command, exitCode: result.exitCode, error: result.error,
32
+ output: result.output.slice(-8192), outputTruncated: result.output.length > 8192,
33
+ checks: verdictFromOutput(result.output)?.checks ?? null };
34
+ }
35
+ export function benchCheckJson(report) {
36
+ if (report.checks.some(c => c.code === 'CALIBRATION'))
37
+ throw new Error('JSON bench checks must be offline; calibration results are not supported.');
38
+ return { schemaVersion: 1, kind: 'skillfit.bench-check', status: report.failures ? 'failed' : 'passed',
39
+ scope: 'offline-integrity', dir: report.dir, bench: report.bench, checks: report.checks,
40
+ summary: { total: report.checks.length, passed: report.checks.filter(c => c.status === 'PASS').length,
41
+ warnings: report.warnings, failures: report.failures, info: report.checks.filter(c => c.status === 'INFO').length },
42
+ error: null };
43
+ }
44
+ export function benchCheckError(error) {
45
+ return { schemaVersion: 1, kind: 'skillfit.bench-check', status: 'error', scope: 'offline-integrity',
46
+ dir: null, bench: null, checks: [], summary: null,
47
+ error: { code: 'INVALID_OR_FAILED_CHECK', message: error instanceof Error ? error.message : String(error) } };
48
+ }