oc-pilot 0.5.1 → 0.88.1

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 (481) hide show
  1. package/CHANGELOG.md +683 -0
  2. package/CONTRIBUTING.md +4 -2
  3. package/README.md +588 -20
  4. package/README.ru.md +572 -10
  5. package/dist/cli.js +185 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/cli.test.js +1211 -1
  8. package/dist/cli.test.js.map +1 -1
  9. package/dist/commands/anti-regression.js +97 -0
  10. package/dist/commands/anti-regression.js.map +1 -0
  11. package/dist/commands/arch-diff.js +80 -0
  12. package/dist/commands/arch-diff.js.map +1 -0
  13. package/dist/commands/authz.js +167 -0
  14. package/dist/commands/authz.js.map +1 -0
  15. package/dist/commands/autopsy.js +64 -0
  16. package/dist/commands/autopsy.js.map +1 -0
  17. package/dist/commands/bankruptcy.js +60 -0
  18. package/dist/commands/bankruptcy.js.map +1 -0
  19. package/dist/commands/battle.js +119 -0
  20. package/dist/commands/battle.js.map +1 -0
  21. package/dist/commands/boundaries.js +114 -0
  22. package/dist/commands/boundaries.js.map +1 -0
  23. package/dist/commands/bounty.js +56 -0
  24. package/dist/commands/bounty.js.map +1 -0
  25. package/dist/commands/brag.js +62 -0
  26. package/dist/commands/brag.js.map +1 -0
  27. package/dist/commands/cache.js +62 -0
  28. package/dist/commands/cache.js.map +1 -0
  29. package/dist/commands/cinema.js +61 -0
  30. package/dist/commands/cinema.js.map +1 -0
  31. package/dist/commands/cleanup.js +110 -0
  32. package/dist/commands/cleanup.js.map +1 -0
  33. package/dist/commands/commit.js +177 -0
  34. package/dist/commands/commit.js.map +1 -0
  35. package/dist/commands/commit.test.js +160 -0
  36. package/dist/commands/commit.test.js.map +1 -0
  37. package/dist/commands/compliance.js +121 -0
  38. package/dist/commands/compliance.js.map +1 -0
  39. package/dist/commands/contract-drift.js +97 -0
  40. package/dist/commands/contract-drift.js.map +1 -0
  41. package/dist/commands/coverage.js +137 -0
  42. package/dist/commands/coverage.js.map +1 -0
  43. package/dist/commands/day.js +116 -0
  44. package/dist/commands/day.js.map +1 -0
  45. package/dist/commands/day.test.js +45 -0
  46. package/dist/commands/day.test.js.map +1 -0
  47. package/dist/commands/deps.js +245 -0
  48. package/dist/commands/deps.js.map +1 -0
  49. package/dist/commands/docgen.js +4 -2
  50. package/dist/commands/docgen.js.map +1 -1
  51. package/dist/commands/doctor.js +146 -2
  52. package/dist/commands/doctor.js.map +1 -1
  53. package/dist/commands/doctor.test.js +69 -0
  54. package/dist/commands/doctor.test.js.map +1 -0
  55. package/dist/commands/echo.js +78 -0
  56. package/dist/commands/echo.js.map +1 -0
  57. package/dist/commands/ecosystem-verify.js +113 -0
  58. package/dist/commands/ecosystem-verify.js.map +1 -0
  59. package/dist/commands/env-sync.js +102 -0
  60. package/dist/commands/env-sync.js.map +1 -0
  61. package/dist/commands/explain.js +115 -0
  62. package/dist/commands/explain.js.map +1 -0
  63. package/dist/commands/fix.js +145 -3
  64. package/dist/commands/fix.js.map +1 -1
  65. package/dist/commands/flaky.js +111 -0
  66. package/dist/commands/flaky.js.map +1 -0
  67. package/dist/commands/fuzz.js +119 -0
  68. package/dist/commands/fuzz.js.map +1 -0
  69. package/dist/commands/hivemind.js +124 -0
  70. package/dist/commands/hivemind.js.map +1 -0
  71. package/dist/commands/impact.js +73 -0
  72. package/dist/commands/impact.js.map +1 -0
  73. package/dist/commands/init.js +73 -11
  74. package/dist/commands/init.js.map +1 -1
  75. package/dist/commands/init.test.js +138 -0
  76. package/dist/commands/init.test.js.map +1 -0
  77. package/dist/commands/install-hook.js +161 -0
  78. package/dist/commands/install-hook.js.map +1 -0
  79. package/dist/commands/install-hook.test.js +100 -0
  80. package/dist/commands/install-hook.test.js.map +1 -0
  81. package/dist/commands/invariants.js +103 -0
  82. package/dist/commands/invariants.js.map +1 -0
  83. package/dist/commands/mock-leak.js +97 -0
  84. package/dist/commands/mock-leak.js.map +1 -0
  85. package/dist/commands/mutate.js +99 -0
  86. package/dist/commands/mutate.js.map +1 -0
  87. package/dist/commands/pack.js +144 -0
  88. package/dist/commands/pack.js.map +1 -0
  89. package/dist/commands/preflight.js +137 -0
  90. package/dist/commands/preflight.js.map +1 -0
  91. package/dist/commands/query.js +57 -0
  92. package/dist/commands/query.js.map +1 -0
  93. package/dist/commands/ready.js +152 -0
  94. package/dist/commands/ready.js.map +1 -0
  95. package/dist/commands/receipt.js +289 -0
  96. package/dist/commands/receipt.js.map +1 -0
  97. package/dist/commands/replay.js +112 -0
  98. package/dist/commands/replay.js.map +1 -0
  99. package/dist/commands/replay.test.js +125 -0
  100. package/dist/commands/replay.test.js.map +1 -0
  101. package/dist/commands/restore.js +54 -0
  102. package/dist/commands/restore.js.map +1 -0
  103. package/dist/commands/review.js +263 -4
  104. package/dist/commands/review.js.map +1 -1
  105. package/dist/commands/review.test.js +160 -0
  106. package/dist/commands/review.test.js.map +1 -0
  107. package/dist/commands/reviewers.js +86 -0
  108. package/dist/commands/reviewers.js.map +1 -0
  109. package/dist/commands/roast.js +102 -0
  110. package/dist/commands/roast.js.map +1 -0
  111. package/dist/commands/sandbox.js +82 -0
  112. package/dist/commands/sandbox.js.map +1 -0
  113. package/dist/commands/sast.js +162 -0
  114. package/dist/commands/sast.js.map +1 -0
  115. package/dist/commands/scan.js +47 -12
  116. package/dist/commands/scan.js.map +1 -1
  117. package/dist/commands/slop.js +145 -0
  118. package/dist/commands/slop.js.map +1 -0
  119. package/dist/commands/slop.test.js +135 -0
  120. package/dist/commands/slop.test.js.map +1 -0
  121. package/dist/commands/stats.js +61 -0
  122. package/dist/commands/stats.js.map +1 -0
  123. package/dist/commands/test-gen.js +372 -0
  124. package/dist/commands/test-gen.js.map +1 -0
  125. package/dist/commands/test-guard.js +89 -0
  126. package/dist/commands/test-guard.js.map +1 -0
  127. package/dist/commands/test-plan.js +133 -0
  128. package/dist/commands/test-plan.js.map +1 -0
  129. package/dist/commands/zoom-symbol.js +52 -0
  130. package/dist/commands/zoom-symbol.js.map +1 -0
  131. package/dist/core/agent-rules.js +35 -0
  132. package/dist/core/agent-rules.js.map +1 -0
  133. package/dist/core/anthropic.test.js +116 -0
  134. package/dist/core/anthropic.test.js.map +1 -0
  135. package/dist/core/anti-regression.js +161 -0
  136. package/dist/core/anti-regression.js.map +1 -0
  137. package/dist/core/anti-regression.test.js +154 -0
  138. package/dist/core/anti-regression.test.js.map +1 -0
  139. package/dist/core/aql.js +220 -0
  140. package/dist/core/aql.js.map +1 -0
  141. package/dist/core/aql.test.js +64 -0
  142. package/dist/core/aql.test.js.map +1 -0
  143. package/dist/core/arch-diff.js +122 -0
  144. package/dist/core/arch-diff.js.map +1 -0
  145. package/dist/core/arch-diff.test.js +93 -0
  146. package/dist/core/arch-diff.test.js.map +1 -0
  147. package/dist/core/authz.js +292 -0
  148. package/dist/core/authz.js.map +1 -0
  149. package/dist/core/authz.test.js +115 -0
  150. package/dist/core/authz.test.js.map +1 -0
  151. package/dist/core/autopsy.js +230 -0
  152. package/dist/core/autopsy.js.map +1 -0
  153. package/dist/core/autopsy.test.js +106 -0
  154. package/dist/core/autopsy.test.js.map +1 -0
  155. package/dist/core/bankruptcy.js +232 -0
  156. package/dist/core/bankruptcy.js.map +1 -0
  157. package/dist/core/bankruptcy.test.js +91 -0
  158. package/dist/core/bankruptcy.test.js.map +1 -0
  159. package/dist/core/baseline.js +131 -0
  160. package/dist/core/baseline.js.map +1 -0
  161. package/dist/core/baseline.test.js +91 -0
  162. package/dist/core/baseline.test.js.map +1 -0
  163. package/dist/core/battle.js +213 -0
  164. package/dist/core/battle.js.map +1 -0
  165. package/dist/core/battle.test.js +116 -0
  166. package/dist/core/battle.test.js.map +1 -0
  167. package/dist/core/boundaries.js +200 -0
  168. package/dist/core/boundaries.js.map +1 -0
  169. package/dist/core/boundaries.test.js +62 -0
  170. package/dist/core/boundaries.test.js.map +1 -0
  171. package/dist/core/bounty.js +128 -0
  172. package/dist/core/bounty.js.map +1 -0
  173. package/dist/core/bounty.test.js +82 -0
  174. package/dist/core/bounty.test.js.map +1 -0
  175. package/dist/core/brag.js +174 -0
  176. package/dist/core/brag.js.map +1 -0
  177. package/dist/core/brag.test.js +43 -0
  178. package/dist/core/brag.test.js.map +1 -0
  179. package/dist/core/cache.js +189 -0
  180. package/dist/core/cache.js.map +1 -0
  181. package/dist/core/cache.test.js +159 -0
  182. package/dist/core/cache.test.js.map +1 -0
  183. package/dist/core/cinema.js +242 -0
  184. package/dist/core/cinema.js.map +1 -0
  185. package/dist/core/cinema.test.js +73 -0
  186. package/dist/core/cinema.test.js.map +1 -0
  187. package/dist/core/cleanup.js +107 -0
  188. package/dist/core/cleanup.js.map +1 -0
  189. package/dist/core/compliance.js +193 -0
  190. package/dist/core/compliance.js.map +1 -0
  191. package/dist/core/compliance.test.js +123 -0
  192. package/dist/core/compliance.test.js.map +1 -0
  193. package/dist/core/config.js +78 -0
  194. package/dist/core/config.js.map +1 -1
  195. package/dist/core/config.test.js +66 -0
  196. package/dist/core/config.test.js.map +1 -1
  197. package/dist/core/contract-drift.js +296 -0
  198. package/dist/core/contract-drift.js.map +1 -0
  199. package/dist/core/contract-drift.test.js +166 -0
  200. package/dist/core/contract-drift.test.js.map +1 -0
  201. package/dist/core/cost.test.js +103 -0
  202. package/dist/core/cost.test.js.map +1 -0
  203. package/dist/core/coverage.js +335 -0
  204. package/dist/core/coverage.js.map +1 -0
  205. package/dist/core/coverage.test.js +190 -0
  206. package/dist/core/coverage.test.js.map +1 -0
  207. package/dist/core/deps-fix.js +169 -0
  208. package/dist/core/deps-fix.js.map +1 -0
  209. package/dist/core/deps-fix.test.js +176 -0
  210. package/dist/core/deps-fix.test.js.map +1 -0
  211. package/dist/core/deps-health.js +353 -0
  212. package/dist/core/deps-health.js.map +1 -0
  213. package/dist/core/deps-health.test.js +230 -0
  214. package/dist/core/deps-health.test.js.map +1 -0
  215. package/dist/core/deps-why.js +260 -0
  216. package/dist/core/deps-why.js.map +1 -0
  217. package/dist/core/deps-why.test.js +175 -0
  218. package/dist/core/deps-why.test.js.map +1 -0
  219. package/dist/core/deps.js +179 -0
  220. package/dist/core/deps.js.map +1 -0
  221. package/dist/core/deps.test.js +88 -0
  222. package/dist/core/deps.test.js.map +1 -0
  223. package/dist/core/diff-source.js +4 -2
  224. package/dist/core/diff-source.js.map +1 -1
  225. package/dist/core/echo.js +151 -0
  226. package/dist/core/echo.js.map +1 -0
  227. package/dist/core/echo.test.js +90 -0
  228. package/dist/core/echo.test.js.map +1 -0
  229. package/dist/core/ecosystem-verify.js +331 -0
  230. package/dist/core/ecosystem-verify.js.map +1 -0
  231. package/dist/core/ecosystem-verify.test.js +158 -0
  232. package/dist/core/ecosystem-verify.test.js.map +1 -0
  233. package/dist/core/engine-preset.test.js +60 -0
  234. package/dist/core/engine-preset.test.js.map +1 -0
  235. package/dist/core/engine.js +278 -32
  236. package/dist/core/engine.js.map +1 -1
  237. package/dist/core/engine.test.js +63 -0
  238. package/dist/core/engine.test.js.map +1 -1
  239. package/dist/core/env-sync.js +122 -0
  240. package/dist/core/env-sync.js.map +1 -0
  241. package/dist/core/env-sync.test.js +99 -0
  242. package/dist/core/env-sync.test.js.map +1 -0
  243. package/dist/core/file-context.js +4 -2
  244. package/dist/core/file-context.js.map +1 -1
  245. package/dist/core/findings-baseline.js +60 -0
  246. package/dist/core/findings-baseline.js.map +1 -0
  247. package/dist/core/findings-baseline.test.js +77 -0
  248. package/dist/core/findings-baseline.test.js.map +1 -0
  249. package/dist/core/findings.js +68 -21
  250. package/dist/core/findings.js.map +1 -1
  251. package/dist/core/flaky.js +137 -0
  252. package/dist/core/flaky.js.map +1 -0
  253. package/dist/core/flaky.test.js +97 -0
  254. package/dist/core/flaky.test.js.map +1 -0
  255. package/dist/core/format.js +5 -3
  256. package/dist/core/format.js.map +1 -1
  257. package/dist/core/fuzz.js +306 -0
  258. package/dist/core/fuzz.js.map +1 -0
  259. package/dist/core/fuzz.test.js +121 -0
  260. package/dist/core/fuzz.test.js.map +1 -0
  261. package/dist/core/git.js +22 -0
  262. package/dist/core/git.js.map +1 -1
  263. package/dist/core/gitlab.js +176 -0
  264. package/dist/core/gitlab.js.map +1 -0
  265. package/dist/core/gitlab.test.js +199 -0
  266. package/dist/core/gitlab.test.js.map +1 -0
  267. package/dist/core/hivemind.js +250 -0
  268. package/dist/core/hivemind.js.map +1 -0
  269. package/dist/core/hivemind.test.js +79 -0
  270. package/dist/core/hivemind.test.js.map +1 -0
  271. package/dist/core/hologram.js +463 -0
  272. package/dist/core/hologram.js.map +1 -0
  273. package/dist/core/hologram.test.js +124 -0
  274. package/dist/core/hologram.test.js.map +1 -0
  275. package/dist/core/impact.js +240 -0
  276. package/dist/core/impact.js.map +1 -0
  277. package/dist/core/impact.test.js +105 -0
  278. package/dist/core/impact.test.js.map +1 -0
  279. package/dist/core/import-graph.js +170 -0
  280. package/dist/core/import-graph.js.map +1 -0
  281. package/dist/core/import-graph.test.js +52 -0
  282. package/dist/core/import-graph.test.js.map +1 -0
  283. package/dist/core/injection.js +55 -0
  284. package/dist/core/injection.js.map +1 -0
  285. package/dist/core/injection.test.js +45 -0
  286. package/dist/core/injection.test.js.map +1 -0
  287. package/dist/core/invariants.js +286 -0
  288. package/dist/core/invariants.js.map +1 -0
  289. package/dist/core/invariants.test.js +87 -0
  290. package/dist/core/invariants.test.js.map +1 -0
  291. package/dist/core/last-review.js +92 -0
  292. package/dist/core/last-review.js.map +1 -0
  293. package/dist/core/last-review.test.js +97 -0
  294. package/dist/core/last-review.test.js.map +1 -0
  295. package/dist/core/lockfile-support.test.js +112 -0
  296. package/dist/core/lockfile-support.test.js.map +1 -0
  297. package/dist/core/lockfile.js +284 -0
  298. package/dist/core/lockfile.js.map +1 -0
  299. package/dist/core/lockfile.test.js +203 -0
  300. package/dist/core/lockfile.test.js.map +1 -0
  301. package/dist/core/mock-leak.js +120 -0
  302. package/dist/core/mock-leak.js.map +1 -0
  303. package/dist/core/mock-leak.test.js +79 -0
  304. package/dist/core/mock-leak.test.js.map +1 -0
  305. package/dist/core/mutation.js +206 -0
  306. package/dist/core/mutation.js.map +1 -0
  307. package/dist/core/mutation.test.js +104 -0
  308. package/dist/core/mutation.test.js.map +1 -0
  309. package/dist/core/opencode.js +15 -2
  310. package/dist/core/opencode.js.map +1 -1
  311. package/dist/core/opencode.test.js +10 -1
  312. package/dist/core/opencode.test.js.map +1 -1
  313. package/dist/core/options.js +51 -3
  314. package/dist/core/options.js.map +1 -1
  315. package/dist/core/osv.js +202 -0
  316. package/dist/core/osv.js.map +1 -0
  317. package/dist/core/osv.test.js +173 -0
  318. package/dist/core/osv.test.js.map +1 -0
  319. package/dist/core/output-format.test.js +102 -0
  320. package/dist/core/output-format.test.js.map +1 -0
  321. package/dist/core/pack.js +212 -0
  322. package/dist/core/pack.js.map +1 -0
  323. package/dist/core/pack.test.js +129 -0
  324. package/dist/core/pack.test.js.map +1 -0
  325. package/dist/core/phantom.js +155 -0
  326. package/dist/core/phantom.js.map +1 -0
  327. package/dist/core/phantom.test.js +58 -0
  328. package/dist/core/phantom.test.js.map +1 -0
  329. package/dist/core/pr-comment.js +116 -0
  330. package/dist/core/pr-comment.js.map +1 -0
  331. package/dist/core/pr-comment.test.js +53 -0
  332. package/dist/core/pr-comment.test.js.map +1 -0
  333. package/dist/core/pr-review.js +160 -0
  334. package/dist/core/pr-review.js.map +1 -0
  335. package/dist/core/pr-review.test.js +62 -0
  336. package/dist/core/pr-review.test.js.map +1 -0
  337. package/dist/core/preflight-run.js +106 -0
  338. package/dist/core/preflight-run.js.map +1 -0
  339. package/dist/core/preflight.js +173 -0
  340. package/dist/core/preflight.js.map +1 -0
  341. package/dist/core/preflight.test.js +187 -0
  342. package/dist/core/preflight.test.js.map +1 -0
  343. package/dist/core/presets.js +408 -0
  344. package/dist/core/presets.js.map +1 -0
  345. package/dist/core/presets.test.js +79 -0
  346. package/dist/core/presets.test.js.map +1 -0
  347. package/dist/core/prompt.golden.test.js +74 -0
  348. package/dist/core/prompt.golden.test.js.map +1 -0
  349. package/dist/core/prompt.js +43 -4
  350. package/dist/core/prompt.js.map +1 -1
  351. package/dist/core/prompt.test.js +16 -0
  352. package/dist/core/prompt.test.js.map +1 -1
  353. package/dist/core/readiness-fix.js +111 -0
  354. package/dist/core/readiness-fix.js.map +1 -0
  355. package/dist/core/readiness-fix.test.js +99 -0
  356. package/dist/core/readiness-fix.test.js.map +1 -0
  357. package/dist/core/readiness.js +189 -0
  358. package/dist/core/readiness.js.map +1 -0
  359. package/dist/core/readiness.test.js +199 -0
  360. package/dist/core/readiness.test.js.map +1 -0
  361. package/dist/core/receipt.js +193 -0
  362. package/dist/core/receipt.js.map +1 -0
  363. package/dist/core/receipt.test.js +193 -0
  364. package/dist/core/receipt.test.js.map +1 -0
  365. package/dist/core/reviewers.js +179 -0
  366. package/dist/core/reviewers.js.map +1 -0
  367. package/dist/core/reviewers.test.js +105 -0
  368. package/dist/core/reviewers.test.js.map +1 -0
  369. package/dist/core/roast.js +27 -0
  370. package/dist/core/roast.js.map +1 -0
  371. package/dist/core/roast.test.js +19 -0
  372. package/dist/core/roast.test.js.map +1 -0
  373. package/dist/core/router.js +8 -0
  374. package/dist/core/router.js.map +1 -0
  375. package/dist/core/router.test.js +157 -0
  376. package/dist/core/router.test.js.map +1 -0
  377. package/dist/core/rules.js +2 -2
  378. package/dist/core/rules.js.map +1 -1
  379. package/dist/core/run.js +322 -20
  380. package/dist/core/run.js.map +1 -1
  381. package/dist/core/sarif.js +125 -0
  382. package/dist/core/sarif.js.map +1 -0
  383. package/dist/core/sarif.test.js +60 -0
  384. package/dist/core/sarif.test.js.map +1 -0
  385. package/dist/core/sast.js +324 -0
  386. package/dist/core/sast.js.map +1 -0
  387. package/dist/core/sast.test.js +105 -0
  388. package/dist/core/sast.test.js.map +1 -0
  389. package/dist/core/sbom.js +121 -0
  390. package/dist/core/sbom.js.map +1 -0
  391. package/dist/core/sbom.test.js +81 -0
  392. package/dist/core/sbom.test.js.map +1 -0
  393. package/dist/core/second-opinion.js +88 -0
  394. package/dist/core/second-opinion.js.map +1 -0
  395. package/dist/core/second-opinion.test.js +89 -0
  396. package/dist/core/second-opinion.test.js.map +1 -0
  397. package/dist/core/secrets.js +120 -5
  398. package/dist/core/secrets.js.map +1 -1
  399. package/dist/core/secrets.test.js +74 -1
  400. package/dist/core/secrets.test.js.map +1 -1
  401. package/dist/core/shadow.js +94 -0
  402. package/dist/core/shadow.js.map +1 -0
  403. package/dist/core/shadow.test.js +50 -0
  404. package/dist/core/shadow.test.js.map +1 -0
  405. package/dist/core/slicing.js +110 -0
  406. package/dist/core/slicing.js.map +1 -0
  407. package/dist/core/slicing.test.js +287 -0
  408. package/dist/core/slicing.test.js.map +1 -0
  409. package/dist/core/slop/churn.js +49 -0
  410. package/dist/core/slop/churn.js.map +1 -0
  411. package/dist/core/slop/collect.js +186 -0
  412. package/dist/core/slop/collect.js.map +1 -0
  413. package/dist/core/slop/dead-exports.js +101 -0
  414. package/dist/core/slop/dead-exports.js.map +1 -0
  415. package/dist/core/slop/duplicates.js +155 -0
  416. package/dist/core/slop/duplicates.js.map +1 -0
  417. package/dist/core/slop/index.js +72 -0
  418. package/dist/core/slop/index.js.map +1 -0
  419. package/dist/core/slop/model.js +2 -0
  420. package/dist/core/slop/model.js.map +1 -0
  421. package/dist/core/slop/score.js +185 -0
  422. package/dist/core/slop/score.js.map +1 -0
  423. package/dist/core/slop/slop.test.js +160 -0
  424. package/dist/core/slop/slop.test.js.map +1 -0
  425. package/dist/core/slop/source.js +129 -0
  426. package/dist/core/slop/source.js.map +1 -0
  427. package/dist/core/slop/test-debt.js +178 -0
  428. package/dist/core/slop/test-debt.js.map +1 -0
  429. package/dist/core/slop/test-debt.test.js +114 -0
  430. package/dist/core/slop/test-debt.test.js.map +1 -0
  431. package/dist/core/slop/todos.js +117 -0
  432. package/dist/core/slop/todos.js.map +1 -0
  433. package/dist/core/snapshot.js +214 -0
  434. package/dist/core/snapshot.js.map +1 -0
  435. package/dist/core/snapshot.test.js +101 -0
  436. package/dist/core/snapshot.test.js.map +1 -0
  437. package/dist/core/stats.js +119 -0
  438. package/dist/core/stats.js.map +1 -0
  439. package/dist/core/stats.test.js +86 -0
  440. package/dist/core/stats.test.js.map +1 -0
  441. package/dist/core/suppressions.js +96 -0
  442. package/dist/core/suppressions.js.map +1 -0
  443. package/dist/core/suppressions.test.js +90 -0
  444. package/dist/core/suppressions.test.js.map +1 -0
  445. package/dist/core/test-delta.js +53 -0
  446. package/dist/core/test-delta.js.map +1 -0
  447. package/dist/core/test-delta.test.js +41 -0
  448. package/dist/core/test-delta.test.js.map +1 -0
  449. package/dist/core/test-plan.js +212 -0
  450. package/dist/core/test-plan.js.map +1 -0
  451. package/dist/core/test-plan.test.js +94 -0
  452. package/dist/core/test-plan.test.js.map +1 -0
  453. package/dist/core/test-weakening.js +191 -0
  454. package/dist/core/test-weakening.js.map +1 -0
  455. package/dist/core/test-weakening.test.js +114 -0
  456. package/dist/core/test-weakening.test.js.map +1 -0
  457. package/dist/core/tree-scan.js +77 -0
  458. package/dist/core/tree-scan.js.map +1 -0
  459. package/dist/core/tree-scan.test.js +58 -0
  460. package/dist/core/tree-scan.test.js.map +1 -0
  461. package/dist/mcp-prompts.test.js +133 -0
  462. package/dist/mcp-prompts.test.js.map +1 -0
  463. package/dist/mcp.js +3303 -240
  464. package/dist/mcp.js.map +1 -1
  465. package/dist/mcp.test.js +1739 -1
  466. package/dist/mcp.test.js.map +1 -1
  467. package/dist/skills.test.js +221 -0
  468. package/dist/skills.test.js.map +1 -0
  469. package/dist/version.js +1 -1
  470. package/dist/version.js.map +1 -1
  471. package/docs/integrations.md +151 -7
  472. package/package.json +2 -1
  473. package/prompts/oc-pilot.en.md +8 -1
  474. package/prompts/oc-pilot.ru.md +8 -1
  475. package/server.json +2 -2
  476. package/skills/agent-self-review/SKILL.md +87 -0
  477. package/skills/commit-discipline/SKILL.md +86 -0
  478. package/skills/oc-pilot/SKILL.md +86 -0
  479. package/skills/secure-diff-gate/SKILL.md +101 -0
  480. package/skills/stack-review-packs/SKILL.md +76 -0
  481. package/skills/test-failure-triage/SKILL.md +88 -0
@@ -22,7 +22,7 @@ provider configured for the selected engine.
22
22
 
23
23
  ```sh
24
24
  # Works now, before the first npm release (pin the tag):
25
- npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.5.1.tar.gz
25
+ npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.5.2.tar.gz
26
26
  oc-pilot --version
27
27
  oc-pilot mcp --version
28
28
  ```
@@ -75,6 +75,12 @@ or set `engine`, `baseUrl`, and `apiKeyEnv` in `.oc-pilot.json`. Run
75
75
  The key is read from `OC_PILOT_API_KEY` or `OPENAI_API_KEY`; configure another
76
76
  variable with `--api-key-env`. Values are never printed in logs or errors.
77
77
 
78
+ With `--engine openai`, a diff larger than one prompt (300 000 characters) is
79
+ split into per-file slices; each slice gets its own API call and the responses
80
+ are merged into a single analysis (`meta.slices` shows the call count). No
81
+ files are dropped by truncation. `fix` always uses a single prompt because it
82
+ must return one patch.
83
+
78
84
  `setup` preserves existing servers and unrelated settings. Use `--http` and
79
85
  `--token` to point a client at a remote server instead of a local stdio process.
80
86
  The token itself is never written to the config: the generated entry references
@@ -102,6 +108,26 @@ All tools return:
102
108
  A policy failure is **not** an MCP tool error. The agent should read
103
109
  `structuredContent.findings` and decide what to do.
104
110
 
111
+ ## MCP resources
112
+
113
+ The server also exposes read-only context through MCP resources and resource
114
+ templates, so hosts can pull project context without invoking a model:
115
+
116
+ | Resource | Contents |
117
+ | --- | --- |
118
+ | `oc-pilot://config` | Resolved configuration and config path, JSON |
119
+ | `oc-pilot://rules` | `.oc-pilot/rules.md` with secrets redacted, or a notice |
120
+ | `oc-pilot://version` | Version and MCP protocol version, JSON |
121
+ | `oc-pilot://prompt/en`, `oc-pilot://prompt/ru` | The built-in system prompts |
122
+ | `oc-pilot://diff/{mode}` | Git diff by `staged`, `unstaged` or `head`, secrets redacted |
123
+ | `oc-pilot://scan/{mode}` | Offline secret scan findings (masked previews), JSON |
124
+ | `oc-pilot://file/{+path}` | Any project file up to 2 MB with secrets redacted |
125
+
126
+ Resources are listed with `resources/list` and `resources/templates/list` and
127
+ read with `resources/read`. File paths must stay inside the project directory;
128
+ binary files are rejected; detected secrets are always masked before the text
129
+ reaches the host model.
130
+
105
131
  ### Argument conventions
106
132
 
107
133
  - `diff` is the **unified diff text**, not a path.
@@ -177,7 +203,7 @@ mounted workspace.
177
203
  ## Agent skills
178
204
 
179
205
  `skills/oc-pilot/SKILL.md` is a portable Agent Skill. It tells an agent when to
180
- call `scan`, `review`, `test_fix`, `fix`, and `docgen`, prefers MCP tools, and
206
+ call `scan`, `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `slop`, `mutate`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `battle`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `ready`, and `receipt_verify`, prefers MCP tools, and
181
207
  documents safety rules for `fix.apply`. Install it by copying
182
208
  `skills/oc-pilot` into the client's skills directory (for Claude Code, usually
183
209
  `.claude/skills/oc-pilot`).
@@ -205,8 +231,8 @@ Or register it from the CLI:
205
231
  claude mcp add oc-pilot -- oc-pilot-mcp --cwd /absolute/path/to/project
206
232
  ```
207
233
 
208
- Claude Code will expose `review`, `test_fix`, `fix`, `docgen`, `custom`, and
209
- `scan` as MCP tools. A typical instruction:
234
+ Claude Code will expose `review`, `invariants`, `test_fix`, `fix`, `test_gen`, `docgen`, `custom`,
235
+ `scan`, `slop`, `mutate`, `fuzz`, `bankruptcy`, `query_ast`, `sandbox`, `hivemind_status`, `flaky`, `impact`, `deps`, `coverage`, `reviewers`, `test_guard`, `env_sync`, `mock_leak`, `ecosystem_verify`, `pack`, `pack_hologram`, `zoom_symbol`, `contract_drift`, `anti_regression`, `boundaries`, `test_plan`, `compliance_verify`, `brag`, `battle`, `cleanup`, `arch_diff`, `roast`, `cinema`, `bounty`, `autopsy`, `echo`, `sast`, `authz`, `preflight`, `ready`, and `receipt_verify` as MCP tools. A typical instruction:
210
236
 
211
237
  > Before proposing a fix, call the `oc-pilot` `review` tool with
212
238
  > `fail_on: "warning"` and include its critical findings in your answer.
@@ -368,7 +394,7 @@ server. Add it to `~/.dsh/profiles/web/cordis.patch.yml`:
368
394
  serverName: oc_pilot
369
395
  transport: stdio
370
396
  command: npx
371
- args: ['-y', 'oc-pilot@0.5.1', 'mcp', '--cwd', '/absolute/path/to/project']
397
+ args: ['-y', 'oc-pilot@0.5.2', 'mcp', '--cwd', '/absolute/path/to/project']
372
398
  toolCallTimeoutMs: 300000
373
399
  ```
374
400
 
@@ -432,13 +458,27 @@ In GitHub Actions, `--github` prints inline annotations instead of JSON:
432
458
  oc-pilot review --base origin/main --fail-on warning --github
433
459
  ```
434
460
 
461
+ For GitHub Code Scanning, produce a SARIF 2.1.0 report and upload it:
462
+
463
+ ```yaml
464
+ - run: oc-pilot scan --base origin/${{ github.base_ref }} --format sarif -o oc-pilot.sarif
465
+ - uses: github/codeql-action/upload-sarif@v3
466
+ with:
467
+ sarif_file: oc-pilot.sarif
468
+ ```
469
+
470
+ `--format sarif` is supported by `scan` and `review`. Rules are stable ids:
471
+ `oc-pilot/secret` (secrets, error), `oc-pilot/critical` (error),
472
+ `oc-pilot/warning` (warning; style findings are `note`). Secret previews stay
473
+ redacted in the report.
474
+
435
475
  The repository also ships a composite action, so the whole gate is:
436
476
 
437
477
  ```yaml
438
478
  - uses: actions/checkout@v4
439
479
  with:
440
480
  fetch-depth: 0
441
- - uses: MyNameIsNikki/oc-pilot@v0.5.1
481
+ - uses: MyNameIsNikki/oc-pilot@v0.88.1
442
482
  with:
443
483
  command: scan
444
484
  args: --base origin/${{ github.base_ref }} --fail-on-secrets
@@ -450,7 +490,111 @@ A tested patch loop is also available, but it writes to the checkout:
450
490
  oc-pilot fix --diff changes.diff --apply --command "npm test"
451
491
  ```
452
492
 
453
- The patch is reverted when tests fail. Do not run it on a shared working tree.
493
+ Before applying, `fix` saves a snapshot of tracked changes (binary patch) and
494
+ untracked files under `.git/oc-pilot/snapshots/`. The patch is still reverted
495
+ when tests fail. Restore a snapshot with `oc-pilot restore` (or
496
+ `oc-pilot restore --list` to pick one). Snapshots never enter commits;
497
+ `--no-snapshot` skips the safety copy.
498
+
499
+ ## Git hooks
500
+
501
+ `oc-pilot install-hook` installs native POSIX sh hooks without husky:
502
+
503
+ ```sh
504
+ oc-pilot install-hook # pre-commit: oc-pilot preflight --staged
505
+ oc-pilot install-hook --scan # lighter pre-commit: oc-pilot scan --staged
506
+ oc-pilot install-hook --pre-push # also pre-push: oc-pilot review --fail-on critical
507
+ oc-pilot install-hook --uninstall # remove managed hooks, restore backups
508
+ ```
509
+
510
+ A foreign hook file is never overwritten silently: without `--force` the
511
+ install fails, with `--force` the old file is kept as `<hook>.oc-pilot.bak`.
512
+ `OC_PILOT_SKIP=1` bypasses the hooks for a single command. `core.hooksPath`
513
+ and worktrees are respected. `oc-pilot doctor --fix` refreshes outdated
514
+ managed hooks (keeping a backup) and prunes expired cache entries; foreign
515
+ hooks are never touched.
516
+
517
+ ## pre-commit framework
518
+
519
+ The repository ships `.pre-commit-hooks.yaml`, so the standard
520
+ [pre-commit](https://pre-commit.com) framework works without local setup:
521
+
522
+ ```yaml
523
+ repos:
524
+ - repo: https://github.com/MyNameIsNikki/oc-pilot
525
+ rev: v0.88.1
526
+ hooks:
527
+ - id: oc-pilot-secrets # oc-pilot scan --staged
528
+ - id: oc-pilot-review # oc-pilot review --staged --fail-on critical --fail-on-secrets
529
+ ```
530
+
531
+ Both hooks use `language: system` and expect `oc-pilot` on the `PATH`
532
+ (`npm i -g oc-pilot`). After changing the pinned `rev`, run
533
+ `pre-commit install-hooks` once.
534
+
535
+ ## Secret ignore rules
536
+
537
+ False positives can be silenced per path or per line. `.oc-pilot/ignore`
538
+ holds one glob per line (`#` starts a comment); the inline marker
539
+ `oc-pilot:ignore-secret` silences a single source line:
540
+
541
+ ```
542
+ # .oc-pilot/ignore
543
+ fixtures/**
544
+ docs/examples/**
545
+
546
+ const TOKEN = "sk-proj-..."; // oc-pilot:ignore-secret
547
+ ```
548
+
549
+ The rules apply to every scanning point: diffs, project rules, docgen, and
550
+ full-file context. High-entropy assignments (20+ chars, Shannon entropy over
551
+ 4 bits) are reported as critical `High-entropy secret`.
552
+
553
+ ## Baseline and PR comments
554
+
555
+ Known findings can be grandfathered so `review` fails only on what is new:
556
+
557
+ ```sh
558
+ oc-pilot review --staged --update-baseline # write .oc-pilot/baseline.json, exit 0
559
+ oc-pilot review --staged --baseline --fail-on critical
560
+ ```
561
+
562
+ A fingerprint is `severity | file | normalized text` — the line number is
563
+ deliberately excluded, so a finding survives code shifts above it. Baseline
564
+ filtering applies to the exit code, text output, `--json`, SARIF, and PR
565
+ comments; hidden findings are counted in `meta.baseline` (`known`, `total`).
566
+
567
+ `review --pr` posts the review to the current pull request. Inside GitHub
568
+ Actions it posts through the review API with `GITHUB_TOKEN` — the workflow needs
569
+ `permissions: pull-requests: write` and the default `GITHUB_TOKEN` secret; no
570
+ `gh` install or extra credentials are required. Up to 25 findings become inline
571
+ comments on the diff line they point at; findings that do not map to a changed
572
+ line (or whole runs outside Actions) fall back to a single summary comment,
573
+ which locally goes through the GitHub CLI (`gh pr comment --body-file -`) and
574
+ must be installed and authenticated. `--no-pr-inline` forces the summary
575
+ comment. `--pr-status` additionally posts a commit status under the `oc-pilot`
576
+ context: `failure` while critical findings remain, `success` otherwise, so a
577
+ branch protection rule can require it (needs `statuses: write`). On failure the
578
+ command exits 1 with a hint.
579
+
580
+ ## Response cache
581
+
582
+ With `engine: openai`, identical requests are served from a local cache under
583
+ `.git/oc-pilot/cache/` — re-running review on the same diff costs zero tokens.
584
+ The key is `sha256(model + base URL + system prompt + input)`; entries live
585
+ for 24 hours by default (`cacheTtlSeconds`, env `OC_PILOT_CACHE_TTL`, `0`
586
+ disables caching). Triage, main, and slice calls all use the cache; the
587
+ opencode engine is never cached. Cache hits are reported in `meta.cache`
588
+ (`hit` | `miss`), and `--no-cache` bypasses the cache for a single run.
589
+
590
+ ```sh
591
+ oc-pilot cache # stats: entries, size, expired
592
+ oc-pilot cache --prune # drop expired entries
593
+ oc-pilot cache --clear # drop everything
594
+ ```
595
+
596
+ `oc-pilot doctor` reports cache health and `oc-pilot doctor --fix` prunes
597
+ expired entries.
454
598
 
455
599
  ## Troubleshooting
456
600
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-pilot",
3
- "version": "0.5.1",
3
+ "version": "0.88.1",
4
4
  "description": "Local AI code review, tested fixes, test-failure analysis and secret scanning for agent CLIs",
5
5
  "type": "module",
6
6
  "repository": {
@@ -43,6 +43,7 @@
43
43
  "dev": "npm run build && node dist/cli.js",
44
44
  "mcp": "node dist/mcp.js",
45
45
  "test": "npm run build && node --test \"dist/**/*.test.js\"",
46
+ "test:coverage": "npm run build && node --test --experimental-test-coverage \"dist/**/*.test.js\"",
46
47
  "check": "tsc -p tsconfig.json --noEmit",
47
48
  "prompt:export": "npm run build && node scripts/export-prompt.mjs",
48
49
  "prepublishOnly": "npm test"
@@ -40,12 +40,19 @@ Follow the recipe in the input:
40
40
  - Follow the instruction in ADDITIONAL_CONTEXT while respecting these principles and the output schema.
41
41
  - If code or signatures are missing, list exactly what to request.
42
42
 
43
+ #### 5. `commit` (commit message generation)
44
+ - Analyze GIT_DIFF and produce EXACTLY ONE Conventional Commits message; when RECENT_COMMITS is provided, match the project's style.
45
+ - Format: a line like `type(scope)?: subject` (max 72 characters, imperative mood), then a blank line and an optional body (what and why, wrapped at ~72). For breaking changes append `!` after the type and/or a `BREAKING CHANGE: description` footer.
46
+ - Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore.
47
+ - Output ONLY the raw commit message: no markdown, no code fences, no explanations or quotes.
48
+
43
49
  ---
44
50
 
45
51
  ### INPUT SCHEMA
46
52
  PROJECT_TYPE: <language/stack>
47
- RECIPE: <review | test-fix | docgen | custom>
53
+ RECIPE: <review | test-fix | docgen | custom | commit>
48
54
  ADDITIONAL_CONTEXT: <signatures, AST excerpt, test output, or empty>
55
+ SECRET_SCAN: <secret scanner report>
49
56
  GIT_DIFF:
50
57
  <diff content>
51
58
 
@@ -40,14 +40,21 @@
40
40
  - Выполни инструкцию из ADDITIONAL_CONTEXT, соблюдая принципы и формат вывода.
41
41
  - Если для ответа не хватает кода или сигнатур, перечисли, что именно нужно запросить.
42
42
 
43
+ #### 5. `commit` (Генерация commit-сообщения)
44
+ - Проанализируй GIT_DIFF и сгенерируй РОВНО ОДНО commit-сообщение в стиле Conventional Commits; если передан RECENT_COMMITS, ориентируйся на стиль проекта.
45
+ - Формат: строка вида `тип(область)?: краткое описание` (до 72 символов, повелительное наклонение), затем пустая строка и необязательное тело (что и почему, ширина ~72). Для ломающих изменений добавь `!` после типа и/или футер `BREAKING CHANGE: описание`.
46
+ - Типы: feat, fix, docs, style, refactor, perf, test, build, ci, chore.
47
+ - Выведи ТОЛЬКО готовое commit-сообщение: без markdown, без блоков кода, без пояснений и кавычек.
48
+
43
49
  ---
44
50
 
45
51
  ### ФОРМАТ ВХОДНЫХ ДАННЫХ (INPUT SCHEMA)
46
52
  Пользователь передает данные в следующем виде:
47
53
 
48
54
  PROJECT_TYPE: <язык/стек>
49
- RECIPE: <review | test-fix | docgen | custom>
55
+ RECIPE: <review | test-fix | docgen | custom | commit>
50
56
  ADDITIONAL_CONTEXT: <сигнатуры, AST-выжимка, вывод тестов или пусто>
57
+ SECRET_SCAN: <отчёт сканера секретов>
51
58
  GIT_DIFF:
52
59
  <содержимое diff>
53
60
 
package/server.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
3
3
  "name": "io.github.mynameisnikki/oc-pilot",
4
4
  "description": "Local AI code review, tested fixes, test-failure analysis and secret scanning for agent CLIs",
5
- "version": "0.5.1",
5
+ "version": "0.5.2",
6
6
  "repository": {
7
7
  "url": "https://github.com/MyNameIsNikki/oc-pilot",
8
8
  "source": "github"
@@ -12,7 +12,7 @@
12
12
  {
13
13
  "registry_type": "npm",
14
14
  "identifier": "oc-pilot",
15
- "version": "0.5.1",
15
+ "version": "0.5.2",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  }
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: agent-self-review
3
+ description: Use before committing or handing off AI-generated code. Runs a local secret scan and an independent review of the staged diff, fixes blocking findings, and re-verifies until the diff is clean or the remaining issues are explicitly documented.
4
+ ---
5
+
6
+ # Agent self-review
7
+
8
+ A coding agent should not ask a human to review code it never checked itself.
9
+ This skill turns "I think it works" into a verified claim: secrets scanned,
10
+ diff reviewed by a second model, blocking findings fixed, exit code checked.
11
+
12
+ ## Setup
13
+
14
+ ```bash
15
+ npm i -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.88.1.tar.gz
16
+ oc-pilot --version # requires 0.11+
17
+ ```
18
+
19
+ Works with no API key when OpenCode is the configured engine. For a hosted
20
+ model, export a key and pass `--engine openai --model <id>`.
21
+
22
+ ## Workflow
23
+
24
+ 1. **Scan secrets first.** This is offline and instant, so it costs nothing to
25
+ run before any model call.
26
+
27
+ ```bash
28
+ oc-pilot scan --staged --json
29
+ ```
30
+
31
+ Exit `3` means critical secrets are present. Stop and remove them; do not
32
+ "fix" them by rewriting history you have not inspected.
33
+
34
+ 2. **Review the exact diff that will be committed.**
35
+
36
+ ```bash
37
+ oc-pilot review --staged --fail-on critical --fail-on-secrets
38
+ ```
39
+
40
+ Read the `#### Замечания / Findings` section. Every bullet has a severity
41
+ and a `file:line` location. Treat `critical` as blocking. Warnings are a
42
+ judgement call; styles are optional.
43
+
44
+ 3. **Fix only what was found.** Feed the findings back into the same code you
45
+ just wrote, not into a rewrite. Prefer the smallest change that removes the
46
+ defect.
47
+
48
+ ```bash
49
+ oc-pilot fix --apply --command "npm test"
50
+ ```
51
+
52
+ `fix` proposes a unified diff, checks it with `git apply --check`, applies
53
+ it, runs tests, and reverts the patch if tests fail. A snapshot is written
54
+ before applying, so `oc-pilot restore` can roll back.
55
+
56
+ 4. **Re-verify.** A fix is not done until the gate is green again.
57
+
58
+ ```bash
59
+ oc-pilot review --staged --fail-on critical --fail-on-secrets
60
+ ```
61
+
62
+ Repeat steps 3–4 at most twice. If the same finding survives two attempts,
63
+ stop and report it to the user with the file, line, and why it is hard to
64
+ fix. Do not loop silently.
65
+
66
+ 5. **Report.** In the final message state: what was reviewed, what was fixed,
67
+ what remains, and the exit code of the last run.
68
+
69
+ ## Reading the result
70
+
71
+ | Exit | Meaning | Agent action |
72
+ | --- | --- | --- |
73
+ | `0` | No findings at or above the threshold | Proceed to commit |
74
+ | `3` | Policy gate failed (findings or secrets) | Fix, then re-run |
75
+ | `1` | Runtime error (engine, network, git) | Report, do not guess |
76
+ | `2` | Bad arguments | Fix the command |
77
+
78
+ ## Rules of engagement
79
+
80
+ - Never disable the gate to make it pass. No `--no-secret-scan`, no
81
+ `--fail-on none`, no deleting `.oc-pilot/ignore` entries.
82
+ - If a finding is a false positive, hide it deliberately with
83
+ `oc-pilot review --staged --interactive` and say so in the report.
84
+ - Do not commit generated lockfiles, vendored trees, or fixtures that the
85
+ review was told to ignore.
86
+ - If the repository has project rules in `.oc-pilot/rules.md`, do not edit
87
+ them to silence a finding.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: commit-discipline
3
+ description: Use when an agent has finished a task and needs to commit. Generates a Conventional Commit message from the staged diff, matches the repository's existing history, blocks commits that contain secrets, and commits with a single reviewed command.
4
+ ---
5
+
6
+ # Commit discipline
7
+
8
+ "I updated the code" is not a commit message, and `git add -A && git commit -m
9
+ "fix"` hides the one thing a reviewer needs: why. This skill produces a message
10
+ derived from the actual diff, in the repository's own style.
11
+
12
+ ## Setup
13
+
14
+ ```bash
15
+ npm i -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.88.1.tar.gz
16
+ ```
17
+
18
+ ## Workflow
19
+
20
+ 1. **Stage deliberately.** One logical change per commit.
21
+
22
+ ```bash
23
+ git add path/to/changed path/to/changed.test
24
+ git status --short
25
+ ```
26
+
27
+ Never `git add -A` from an agent session: it picks up scratch files, logs,
28
+ and local config.
29
+
30
+ 2. **Generate the message.**
31
+
32
+ ```bash
33
+ oc-pilot commit
34
+ ```
35
+
36
+ The command reads the staged diff and the last ten commit subjects, then
37
+ returns a single Conventional Commit message: `type(scope): imperative
38
+ subject` with an optional body. Types: `feat`, `fix`, `docs`, `style`,
39
+ `refactor`, `perf`, `test`, `build`, `ci`, `chore`.
40
+
41
+ 3. **Inspect before applying.** The message must state the behaviour change,
42
+ not the file list. Reject messages that only say "update", "improve", or
43
+ restate the diff.
44
+
45
+ 4. **Commit with the gate.**
46
+
47
+ ```bash
48
+ oc-pilot commit --apply
49
+ ```
50
+
51
+ `--apply` is allowed only with staged changes. If the staged diff contains a
52
+ critical secret, the command exits `3` and does not commit. Use
53
+ `--allow-secrets` only when you have confirmed the value is public, and say
54
+ so in the PR.
55
+
56
+ 5. **Verify.**
57
+
58
+ ```bash
59
+ git log -1 --stat
60
+ ```
61
+
62
+ Confirm the commit contains exactly the intended files.
63
+
64
+ 6. **Machine-readable output** for scripts and CI:
65
+
66
+ ```bash
67
+ oc-pilot commit --json
68
+ ```
69
+
70
+ Returns `message`, `subject`, `body`, `committed`, `diffSource`, `stats`,
71
+ `secrets`, `engine`, `model`, `durationMs`.
72
+
73
+ ## Message rules
74
+
75
+ - Subject in the imperative mood, 72 characters or fewer, no trailing period.
76
+ - Scope names the module, not the file extension.
77
+ - Body explains the reason and any migration, wrapped at 72 columns.
78
+ - One concern per commit. If the diff mixes a refactor with a behaviour
79
+ change, split it: `git add -p`, then repeat.
80
+
81
+ ## Guardrails
82
+
83
+ - Do not commit generated artifacts unless the repository tracks them.
84
+ - Do not amend or force-push on a shared branch from an agent session.
85
+ - If the message does not fit the change, the change is too large or too
86
+ vague — split it instead of inflating the subject.
@@ -16,7 +16,47 @@ If the `oc-pilot` MCP server is configured, call its tools directly:
16
16
  - `review` — bugs, security issues, idioms, and structured findings.
17
17
  - `test_fix` — root cause of a failing test plus a minimal fix.
18
18
  - `fix` — propose a unified diff; with `apply: true`, apply it and run tests, reverting on failure.
19
+ - `test_gen` — write tests for changed code; with `apply: true`, apply them and run the suite, reverting failures unless `keep_failing`.
19
20
  - `docgen` — GoDoc/RustDoc/JSDoc/docstrings.
21
+ - `slop` — offline Slop Index.
22
+ - `mutate` — mutation testing: flips operators, runs tests, lists survivors; needs `--allow-write` because it rewrites sources temporarily.
23
+ - `flaky` — repeated and shuffled test runs that flag tests passing in some runs and failing in others.
24
+ - `impact` — declarations changed by the diff and every untouched file that still references them.
25
+ - `deps` - dependency audit: phantom and missing imports, unused packages, lockfile drift, OSV vulnerabilities and licenses; `fix` and `sbom` need `--allow-write`.
26
+ - `coverage` - changed lines missing from a local lcov, Istanbul, Cobertura or Go coverage report, with an optional gate.
27
+ - `reviewers` — authors who touched the changed files plus CODEOWNERS owners; accepts `limit`, `depth` and `exclude`.
28
+ - `test_guard` — offline test-weakening guard: skipped/focused/deleted tests, removed assertions, matcher downgrades, `@ts-ignore`, empty catch.
29
+ - `env_sync` — environment variables added by the diff against `.env` and `.env.example`: missing definitions and undocumented keys.
30
+ - `mock_leak` - forgotten stubs and hardcode in production code: local paths, test tokens, always-true conditions, mock identifiers and localhost URLs.
31
+ - `ecosystem_verify` - named imports against installed packages and `.d.ts`, plus age and downloads of newly added npm packages.
32
+ - `pack` - compact task context: rules, changed-file signatures, related references and an optional test log, capped by `budget` characters; read-only.
33
+ - `pack --hologram` - layered context: LOD 0 full diff files, LOD 1 hidden bodies with EFFECTS markers and matching tests, LOD 2 export names; `zoom-symbol` returns one hidden body on demand.
34
+ - `invariants` - semantic lock file `.oc-pilot/invariants.md` checked against the diff with a cheap model; `[CRITICAL]` and `--strict` gate with exit code 3, out-of-scope rules are skipped without a model call.
35
+ - `fuzz` - safe JIT fuzzing of exports added by the diff in separate processes; side-effect files are blocked, crashes and timeouts carry the exact input.
36
+ - `bankruptcy` - deterministic tech-debt forecast from commit history: smoothed score, slope, forecast date and an SVG chart; test weakening and security dominate the weights.
37
+ - `query` - chainable AQL over a lightweight code graph: find, where, sort, limit, select and count; MCP tool `query_ast`.
38
+ - `sandbox run` - execute one JS/ESM file in node:vm with imports, require, fetch and process.exit blocked; output and exact status are reported.
39
+ - `hivemind` - encrypted TCP mesh: ed25519 identity, trusted peers, ECDH X25519 handshake and AES-256-GCM payloads; only diffs, AST and LLM requests are allowed.
40
+ - `contract_drift` - removed or newly required fields and type changes in TypeScript, Zod, Prisma, Pydantic and JSON Schema, plus untouched consumers of a removed field.
41
+ - `anti_regression` - lines the diff re-adds after a human explicitly deleted them in git history, with the deleting commit cited.
42
+ - `boundaries` - added imports checked against `.oc-pilot/architecture.json` layer rules, with file, line and rule reason.
43
+ - `test_plan` — select the test files affected by the diff from the import graph; report uncovered changed files and gate with `fail_on_uncovered`.
44
+ - `compliance_verify` — verify the signed audit manifest for HEAD: hash, commit, previous-manifest chain and Ed25519 signature.
45
+ - `brag` - self-contained HTML/SVG session report from stats, git history, last review and receipt; inline assets only, no model or network.
46
+ - `battle` - experimental coder/hacker loop: the coder patches, the hacker reviews and runs SAST, authz and test-weakening checks until no high findings remain and tests pass.
47
+ - `fix --shadow` / `battle --shadow` - run apply in a detached `.oc-pilot/shadow-tree` worktree and land the diff only after a successful run.
48
+ - `cleanup` - offline cleanup plan from dependency issues, Slop Index, environment variables and weakened tests; `apply` performs only safe dependency fixes and needs `--allow-write`.
49
+ - `arch_diff` — Mermaid diagram of added (green) and removed (red) internal imports, with an optional `fail_on_removed` gate.
50
+ - `roast` — model-backed comedy roast with linus/ramsay/corporate/default personas; every joke cites file:line and ends with one real fix.
51
+ - `cinema` — terminal timelapse of the session from commits, runs, API calls, last review and receipt; self-contained HTML player or asciinema v2 cast.
52
+ - `autopsy` — forensic post-mortem for a commit: diff stats, SAST on added lines, weakened tests, mock leaks, ranked suspects and a before/after timeline; `--fail-on-risk` exits 1 on a dangerous verdict.
53
+ - `echo` — self-contained SVG badges from local stats/git/receipt, with opt-in anonymous aggregate submit to an explicit endpoint; no network by default.
54
+ - `bounty` — ASCII WANTED poster for the worst file scored from SAST, duplicates, dead exports, aged task comments and churn; deterministic and offline.
55
+ - `sast` — deterministic static analysis: injection, path traversal, SSRF, XSS, TLS and other dangerous patterns.
56
+ - `authz` — route authorization: unauthenticated routes, IDOR lookups, admin paths without a role.
57
+ - `preflight` — one offline verdict: secrets, SAST, route authorization, dependency health, test weakening, Slop Index delta.
58
+ - `ready` — offline agent readiness score 0-100 across tests, lockfile, hooks, slop, receipt, docs, CI, config and security.
59
+ - `receipt_verify` — verify the receipt for HEAD: its hash, recorded commit and whether its tests passed.
20
60
  - `custom` — any other code question with an optional diff.
21
61
 
22
62
  Pass `diff` as unified diff **text**. Omit it to let the server use the
@@ -29,12 +69,58 @@ call should fail the build.
29
69
  oc-pilot review --fail-on warning --fail-on-secrets
30
70
  oc-pilot scan --json
31
71
  oc-pilot test-fix
72
+ oc-pilot test-gen --staged --apply
32
73
  oc-pilot fix --apply --command "npm test"
33
74
  oc-pilot docgen "src/**/*.ts"
75
+ oc-pilot mutate --staged --min-score 80
76
+ oc-pilot flaky --runs 5 --fail-on-flaky
77
+ oc-pilot impact --staged
78
+ oc-pilot deps --audit
79
+ oc-pilot coverage --staged --coverage-file coverage/lcov.info --fail-under 80
80
+ oc-pilot reviewers --base main
81
+ oc-pilot test-guard --staged --fail-on-weakening
82
+ oc-pilot env-sync --staged --fail-on-missing
83
+ oc-pilot mock-leak --staged --fail-on-leak high
84
+ oc-pilot ecosystem-verify --staged --fail-on-issue high
85
+ oc-pilot pack "fix the login redirect" --staged --budget 12000
86
+ oc-pilot pack --hologram --max-tokens 30000 --output context.md
87
+ oc-pilot zoom-symbol src/core/pack.ts buildPack
88
+ oc-pilot invariants --staged --fail-on violation
89
+ oc-pilot fuzz --duration 2s --memory-limit 128MB
90
+ oc-pilot bankruptcy --history 30d --format json
91
+ oc-pilot query "find(CallExpression).where(name, 'stripe').select(file, line)"
92
+ oc-pilot sandbox run scripts/demo.mjs --timeout 500ms
93
+ oc-pilot hivemind init
94
+ oc-pilot contract-drift --staged --fail-on-drift high
95
+ oc-pilot anti-regression --staged --fail-on-regression
96
+ oc-pilot boundaries --staged --fail-on-violation
97
+ oc-pilot test-plan --staged --fail-on-uncovered
98
+ oc-pilot compliance --verify
99
+ oc-pilot brag --since-days 30 --output brag.html
100
+ oc-pilot battle "fix the retry logic" --apply --rounds 3
101
+ oc-pilot battle "harden auth" --apply --shadow
102
+ oc-pilot fix --apply --shadow
103
+ oc-pilot cleanup --staged --fail-on-task high
104
+ oc-pilot arch-diff --staged --fail-on-removed
105
+ oc-pilot roast --staged --persona linus
106
+ oc-pilot cinema --since-days 30 --output cinema.html
107
+ oc-pilot bounty --limit 10 --since-days 90
108
+ oc-pilot autopsy HEAD~1 --depth 10
109
+ oc-pilot echo --name my-team --svg --output badges.svg
34
110
  ```
35
111
 
36
112
  Use `--lang ru` for Russian model output. The CLI UI itself may be Russian.
37
113
 
114
+ ## Related skills
115
+
116
+ Focused workflows built on the same CLI:
117
+
118
+ - `agent-self-review` — pre-commit gate loop with a verified exit code.
119
+ - `test-failure-triage` — root cause first, then a patch with a snapshot.
120
+ - `secure-diff-gate` — secrets, security rules, injection and dependency risks.
121
+ - `commit-discipline` — Conventional Commit message from the staged diff.
122
+ - `stack-review-packs` — rules packs for 23 languages and frameworks.
123
+
38
124
  ## Safety
39
125
 
40
126
  - Never paste real secrets into a prompt. `oc-pilot` redacts common secrets in