@probelabs/visor 0.1.106 → 0.1.107

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 (450) hide show
  1. package/README.md +65 -2
  2. package/action.yml +1 -1
  3. package/defaults/code-refiner.yaml +114 -0
  4. package/defaults/{.visor.yaml → code-review.yaml} +35 -226
  5. package/defaults/override.yaml +52 -0
  6. package/defaults/task-refinement.yaml +620 -0
  7. package/defaults/visor.tests.yaml +674 -0
  8. package/defaults/visor.yaml +482 -0
  9. package/dist/663.index.js +2 -3
  10. package/dist/80.index.js +2 -3
  11. package/dist/action-cli-bridge.d.ts +11 -82
  12. package/dist/action-cli-bridge.d.ts.map +1 -1
  13. package/dist/ai-review-service.d.ts +15 -0
  14. package/dist/ai-review-service.d.ts.map +1 -1
  15. package/dist/check-execution-engine.d.ts +19 -331
  16. package/dist/check-execution-engine.d.ts.map +1 -1
  17. package/dist/cli-main.d.ts.map +1 -1
  18. package/dist/cli.d.ts +0 -1
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/config.d.ts +16 -0
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/cron-scheduler.d.ts +3 -3
  23. package/dist/cron-scheduler.d.ts.map +1 -1
  24. package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
  25. package/dist/defaults/code-refiner.yaml +114 -0
  26. package/dist/defaults/{.visor.yaml → code-review.yaml} +35 -226
  27. package/dist/defaults/override.yaml +52 -0
  28. package/dist/defaults/task-refinement.yaml +620 -0
  29. package/dist/defaults/visor.tests.yaml +674 -0
  30. package/dist/defaults/visor.yaml +482 -0
  31. package/dist/docs/DEPLOYMENT.md +118 -0
  32. package/dist/docs/GITHUB_CHECKS.md +280 -0
  33. package/dist/docs/NPM_USAGE.md +208 -0
  34. package/dist/docs/action-reference.md +19 -0
  35. package/dist/docs/advanced-ai.md +178 -0
  36. package/dist/docs/ai-configuration.md +468 -0
  37. package/dist/docs/author-permissions.md +610 -0
  38. package/dist/docs/ci-cli-mode.md +34 -0
  39. package/dist/docs/claude-code.md +74 -0
  40. package/dist/docs/command-provider.md +559 -0
  41. package/dist/docs/commands.md +8 -0
  42. package/dist/docs/configuration.md +303 -0
  43. package/dist/docs/custom-tools.md +424 -0
  44. package/dist/docs/dashboards/README.md +23 -0
  45. package/dist/docs/dashboards/grafana-visor-diagrams.json +20 -0
  46. package/dist/docs/dashboards/grafana-visor-overview.json +33 -0
  47. package/dist/docs/debug-visualizer-progress.md +572 -0
  48. package/dist/docs/debug-visualizer-rfc.md +691 -0
  49. package/dist/docs/debug-visualizer.md +114 -0
  50. package/dist/docs/debugging.md +636 -0
  51. package/dist/docs/default-output-schema.md +28 -0
  52. package/dist/docs/dependencies.md +369 -0
  53. package/dist/docs/dev-playbook.md +9 -0
  54. package/dist/docs/engine-state-machine-plan.md +333 -0
  55. package/dist/docs/event-driven-github-integration-rfc.md +743 -0
  56. package/dist/docs/event-triggers.md +292 -0
  57. package/dist/docs/execution-statistics-rfc.md +290 -0
  58. package/dist/docs/fact-validator-gap-analysis.md +178 -0
  59. package/dist/docs/fact-validator-implementation-plan.md +1235 -0
  60. package/dist/docs/fail-if.md +95 -0
  61. package/dist/docs/failure-conditions-implementation.md +271 -0
  62. package/dist/docs/failure-conditions-schema.md +173 -0
  63. package/dist/docs/failure-routing-rfc.md +193 -0
  64. package/dist/docs/failure-routing.md +507 -0
  65. package/dist/docs/foreach-dependency-propagation.md +473 -0
  66. package/dist/docs/github-ops.md +89 -0
  67. package/dist/docs/goto-forward-run-plan.md +113 -0
  68. package/dist/docs/guides/criticality-modes.md +332 -0
  69. package/dist/docs/guides/fault-management-and-contracts.md +738 -0
  70. package/dist/docs/guides/workflow-style-guide.md +224 -0
  71. package/dist/docs/http.md +299 -0
  72. package/dist/docs/human-input-provider.md +372 -0
  73. package/dist/docs/limits.md +64 -0
  74. package/dist/docs/liquid-templates.md +347 -0
  75. package/dist/docs/loop-routing-refactor.md +89 -0
  76. package/dist/docs/mcp-provider.md +557 -0
  77. package/dist/docs/mcp.md +124 -0
  78. package/dist/docs/memory.md +903 -0
  79. package/dist/docs/observability.md +12 -0
  80. package/dist/docs/output-formats.md +20 -0
  81. package/dist/docs/output-formatting.md +29 -0
  82. package/dist/docs/output-history.md +383 -0
  83. package/dist/docs/performance.md +6 -0
  84. package/dist/docs/pluggable.md +124 -0
  85. package/dist/docs/proposals/snapshot-scope-execution.md +236 -0
  86. package/dist/docs/recipes.md +21 -0
  87. package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
  88. package/dist/docs/schema-next-pr.md +10 -0
  89. package/dist/docs/schema-templates.md +68 -0
  90. package/dist/docs/script.md +34 -0
  91. package/dist/docs/sdk.md +222 -0
  92. package/dist/docs/security.md +7 -0
  93. package/dist/docs/suppressions.md +89 -0
  94. package/dist/docs/tag-filtering.md +258 -0
  95. package/dist/docs/telemetry-setup.md +119 -0
  96. package/dist/docs/telemetry-tracing-rfc.md +275 -0
  97. package/dist/docs/test-framework-rfc.md +680 -0
  98. package/dist/docs/testing/assertions.md +85 -0
  99. package/dist/docs/testing/ci.md +44 -0
  100. package/dist/docs/testing/cli.md +41 -0
  101. package/dist/docs/testing/cookbook.md +172 -0
  102. package/dist/docs/testing/dsl-reference.md +199 -0
  103. package/dist/docs/testing/fixtures-and-mocks.md +91 -0
  104. package/dist/docs/testing/flows.md +92 -0
  105. package/dist/docs/testing/getting-started.md +93 -0
  106. package/dist/docs/testing/troubleshooting.md +55 -0
  107. package/dist/docs/timeouts.md +50 -0
  108. package/dist/docs/troubleshooting.md +7 -0
  109. package/dist/docs/visor-sdk-rfc.md +186 -0
  110. package/dist/docs/workflows.md +569 -0
  111. package/dist/engine/on-finish/orchestrator.d.ts +19 -0
  112. package/dist/engine/on-finish/orchestrator.d.ts.map +1 -0
  113. package/dist/engine/on-finish/utils.d.ts +44 -0
  114. package/dist/engine/on-finish/utils.d.ts.map +1 -0
  115. package/dist/event-bus/event-bus.d.ts +13 -0
  116. package/dist/event-bus/event-bus.d.ts.map +1 -0
  117. package/dist/event-bus/types.d.ts +57 -0
  118. package/dist/event-bus/types.d.ts.map +1 -0
  119. package/dist/examples/.claude/agents/code-reviewer.md +69 -0
  120. package/dist/examples/.mcp.json +34 -0
  121. package/dist/examples/CALCULATOR-SDK.md +364 -0
  122. package/dist/examples/README.md +384 -0
  123. package/dist/examples/ai-retry-fallback-config.yaml +180 -0
  124. package/dist/examples/ai-with-bash.yaml +126 -0
  125. package/dist/examples/ai-with-mcp.yaml +82 -0
  126. package/dist/examples/basic-human-input.yaml +15 -0
  127. package/dist/examples/bedrock-config.yaml +77 -0
  128. package/dist/examples/calculator-config.yaml +133 -0
  129. package/dist/examples/calculator-json-output-guide.md +311 -0
  130. package/dist/examples/calculator-sdk-automated.ts +340 -0
  131. package/dist/examples/calculator-sdk-example.ts +275 -0
  132. package/dist/examples/calculator-sdk-json.ts +331 -0
  133. package/dist/examples/calculator-sdk-real.ts +374 -0
  134. package/dist/examples/calculator-sdk-test.ts +148 -0
  135. package/dist/examples/claude-code-config.yaml +191 -0
  136. package/dist/examples/cron-webhook-config.yaml +215 -0
  137. package/dist/examples/custom-template.liquid +57 -0
  138. package/dist/examples/custom-tools-example.yaml +281 -0
  139. package/dist/examples/enhanced-config.yaml +165 -0
  140. package/dist/examples/environments/visor.base.yaml +92 -0
  141. package/dist/examples/environments/visor.dev.yaml +33 -0
  142. package/dist/examples/environments/visor.prod.yaml +95 -0
  143. package/dist/examples/environments/visor.staging.yaml +46 -0
  144. package/dist/examples/fact-validator.yaml +361 -0
  145. package/dist/examples/fail-if-simple.yaml +90 -0
  146. package/dist/examples/failure-conditions-advanced.yaml +136 -0
  147. package/dist/examples/failure-conditions-basic.yaml +48 -0
  148. package/dist/examples/failure-conditions-github-style.yaml +119 -0
  149. package/dist/examples/failure-conditions-migration.yaml +74 -0
  150. package/dist/examples/for-loop-example.yaml +176 -0
  151. package/dist/examples/forEach-example.yaml +120 -0
  152. package/dist/examples/github-workflow-with-tags.yml +163 -0
  153. package/dist/examples/http-integration-config.yaml +240 -0
  154. package/dist/examples/https-server-config.yaml +209 -0
  155. package/dist/examples/human-input-example.yaml +63 -0
  156. package/dist/examples/if-conditions.yaml +173 -0
  157. package/dist/examples/jira-simple-example.yaml +56 -0
  158. package/dist/examples/jira-single-issue-workflow.yaml +166 -0
  159. package/dist/examples/jira-workflow-mcp.yaml +182 -0
  160. package/dist/examples/mcp/analyzer.py +119 -0
  161. package/dist/examples/mcp-provider-example.yaml +301 -0
  162. package/dist/examples/memory-counter.yaml +99 -0
  163. package/dist/examples/memory-error-collection.yaml +104 -0
  164. package/dist/examples/memory-exec-js.yaml +247 -0
  165. package/dist/examples/memory-namespace-isolation.yaml +184 -0
  166. package/dist/examples/memory-retry-counter.yaml +65 -0
  167. package/dist/examples/memory-state-machine.yaml +170 -0
  168. package/dist/examples/outputs-raw-basic.yaml +26 -0
  169. package/dist/examples/project-with-tools.yaml +174 -0
  170. package/dist/examples/prompts/architecture-analysis.liquid +116 -0
  171. package/dist/examples/prompts/security-comprehensive.liquid +107 -0
  172. package/dist/examples/quick-start-tags.yaml +53 -0
  173. package/dist/examples/routing-basic.yaml +35 -0
  174. package/dist/examples/routing-dynamic-js.yaml +46 -0
  175. package/dist/examples/routing-foreach.yaml +34 -0
  176. package/dist/examples/routing-goto-event.yaml +34 -0
  177. package/dist/examples/routing-on-success.yaml +25 -0
  178. package/dist/examples/run-calculator-demo.sh +71 -0
  179. package/dist/examples/sdk-basic.mjs +10 -0
  180. package/dist/examples/sdk-cjs.cjs +10 -0
  181. package/dist/examples/sdk-comprehensive.mjs +175 -0
  182. package/dist/examples/sdk-manual-config.mjs +65 -0
  183. package/dist/examples/sdk-typescript.js +81 -0
  184. package/dist/examples/sdk-typescript.ts +92 -0
  185. package/dist/examples/session-reuse-config.yaml +151 -0
  186. package/dist/examples/templates/security-report.liquid +137 -0
  187. package/dist/examples/tools-library.yaml +281 -0
  188. package/dist/examples/transform-example.yaml +199 -0
  189. package/dist/examples/visor-with-tags.yaml +198 -0
  190. package/dist/examples/webhook-pipeline-config.yaml +218 -0
  191. package/dist/examples/workflows/calculator-workflow.yaml +163 -0
  192. package/dist/examples/workflows/code-quality.yaml +222 -0
  193. package/dist/examples/workflows/quick-pr-check.yaml +90 -0
  194. package/dist/examples/workflows/workflow-composition-example.yaml +130 -0
  195. package/dist/failure-condition-evaluator.d.ts +1 -0
  196. package/dist/failure-condition-evaluator.d.ts.map +1 -1
  197. package/dist/frontends/github-frontend.d.ts +38 -0
  198. package/dist/frontends/github-frontend.d.ts.map +1 -0
  199. package/dist/frontends/host.d.ts +43 -0
  200. package/dist/frontends/host.d.ts.map +1 -0
  201. package/dist/frontends/ndjson-sink.d.ts +12 -0
  202. package/dist/frontends/ndjson-sink.d.ts.map +1 -0
  203. package/dist/generated/config-schema.d.ts +564 -22
  204. package/dist/generated/config-schema.d.ts.map +1 -1
  205. package/dist/generated/config-schema.json +612 -24
  206. package/dist/github-check-service.d.ts +4 -6
  207. package/dist/github-check-service.d.ts.map +1 -1
  208. package/dist/github-comments.d.ts +0 -4
  209. package/dist/github-comments.d.ts.map +1 -1
  210. package/dist/index.d.ts.map +1 -1
  211. package/dist/index.js +70335 -62514
  212. package/dist/liquid-extensions.d.ts.map +1 -1
  213. package/dist/logger.d.ts +1 -0
  214. package/dist/logger.d.ts.map +1 -1
  215. package/dist/memory-store.d.ts +6 -0
  216. package/dist/memory-store.d.ts.map +1 -1
  217. package/dist/output/assistant-json/template.liquid +0 -0
  218. package/dist/output/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
  219. package/dist/output/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
  220. package/dist/output-formatters.d.ts +1 -1
  221. package/dist/output-formatters.d.ts.map +1 -1
  222. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  223. package/dist/providers/check-provider-registry.d.ts +6 -0
  224. package/dist/providers/check-provider-registry.d.ts.map +1 -1
  225. package/dist/providers/check-provider.interface.d.ts +34 -1
  226. package/dist/providers/check-provider.interface.d.ts.map +1 -1
  227. package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
  228. package/dist/providers/command-check-provider.d.ts +1 -1
  229. package/dist/providers/command-check-provider.d.ts.map +1 -1
  230. package/dist/providers/custom-tool-executor.d.ts +61 -0
  231. package/dist/providers/custom-tool-executor.d.ts.map +1 -0
  232. package/dist/providers/github-ops-provider.d.ts.map +1 -1
  233. package/dist/providers/http-client-provider.d.ts +1 -4
  234. package/dist/providers/http-client-provider.d.ts.map +1 -1
  235. package/dist/providers/human-input-check-provider.d.ts +3 -0
  236. package/dist/providers/human-input-check-provider.d.ts.map +1 -1
  237. package/dist/providers/index.d.ts +1 -0
  238. package/dist/providers/index.d.ts.map +1 -1
  239. package/dist/providers/log-check-provider.d.ts +2 -5
  240. package/dist/providers/log-check-provider.d.ts.map +1 -1
  241. package/dist/providers/mcp-check-provider.d.ts +9 -3
  242. package/dist/providers/mcp-check-provider.d.ts.map +1 -1
  243. package/dist/providers/memory-check-provider.d.ts +2 -8
  244. package/dist/providers/memory-check-provider.d.ts.map +1 -1
  245. package/dist/providers/script-check-provider.d.ts +25 -0
  246. package/dist/providers/script-check-provider.d.ts.map +1 -0
  247. package/dist/providers/workflow-check-provider.d.ts +56 -0
  248. package/dist/providers/workflow-check-provider.d.ts.map +1 -0
  249. package/dist/reviewer.d.ts +2 -1
  250. package/dist/reviewer.d.ts.map +1 -1
  251. package/dist/sdk/chunk-37ZSCMFC.mjs +482 -0
  252. package/dist/sdk/chunk-37ZSCMFC.mjs.map +1 -0
  253. package/dist/sdk/chunk-6Y4YTKCF.mjs +197 -0
  254. package/dist/sdk/chunk-6Y4YTKCF.mjs.map +1 -0
  255. package/dist/sdk/chunk-CNX7V5JK.mjs +89 -0
  256. package/dist/sdk/chunk-CNX7V5JK.mjs.map +1 -0
  257. package/dist/sdk/chunk-IEO6CFLG.mjs +1215 -0
  258. package/dist/sdk/chunk-IEO6CFLG.mjs.map +1 -0
  259. package/dist/sdk/chunk-JEHPDJIF.mjs +223 -0
  260. package/dist/sdk/chunk-JEHPDJIF.mjs.map +1 -0
  261. package/dist/sdk/chunk-O5EZDNYL.mjs +274 -0
  262. package/dist/sdk/chunk-O5EZDNYL.mjs.map +1 -0
  263. package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-OOZITMRU.mjs} +1 -1
  264. package/dist/sdk/chunk-OOZITMRU.mjs.map +1 -0
  265. package/dist/sdk/chunk-OWUVOILT.mjs +557 -0
  266. package/dist/sdk/chunk-OWUVOILT.mjs.map +1 -0
  267. package/dist/sdk/chunk-OZJ263FM.mjs +986 -0
  268. package/dist/sdk/chunk-OZJ263FM.mjs.map +1 -0
  269. package/dist/sdk/chunk-PTL3K3PN.mjs +3128 -0
  270. package/dist/sdk/chunk-PTL3K3PN.mjs.map +1 -0
  271. package/dist/sdk/chunk-S2RUE2RG.mjs +145 -0
  272. package/dist/sdk/chunk-S2RUE2RG.mjs.map +1 -0
  273. package/dist/sdk/chunk-VMPLF6FT.mjs +127 -0
  274. package/dist/sdk/chunk-VMPLF6FT.mjs.map +1 -0
  275. package/dist/sdk/chunk-YSN4G6CI.mjs +146 -0
  276. package/dist/sdk/chunk-YSN4G6CI.mjs.map +1 -0
  277. package/dist/sdk/chunk-ZYAUYXSW.mjs +206 -0
  278. package/dist/sdk/chunk-ZYAUYXSW.mjs.map +1 -0
  279. package/dist/sdk/config-M4ZNO6NU.mjs +14 -0
  280. package/dist/sdk/config-merger-PX3WIT57.mjs +10 -0
  281. package/dist/sdk/event-bus-5BEVPQ6T.mjs +35 -0
  282. package/dist/sdk/event-bus-5BEVPQ6T.mjs.map +1 -0
  283. package/dist/sdk/failure-condition-evaluator-NBO5YRXW.mjs +16 -0
  284. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +458 -0
  285. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +1 -0
  286. package/dist/sdk/github-frontend-4AWRJT7D.mjs +1242 -0
  287. package/dist/sdk/github-frontend-4AWRJT7D.mjs.map +1 -0
  288. package/dist/sdk/host-7GBC3S7L.mjs +49 -0
  289. package/dist/sdk/host-7GBC3S7L.mjs.map +1 -0
  290. package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-C7EG3YKH.mjs} +7 -2
  291. package/dist/sdk/memory-store-GJACZC2A.mjs +11 -0
  292. package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
  293. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
  294. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
  295. package/dist/sdk/renderer-schema-6RF26VUS.mjs +50 -0
  296. package/dist/sdk/renderer-schema-6RF26VUS.mjs.map +1 -0
  297. package/dist/sdk/routing-RP56JTV2.mjs +23 -0
  298. package/dist/sdk/routing-RP56JTV2.mjs.map +1 -0
  299. package/dist/sdk/sdk.d.mts +326 -21
  300. package/dist/sdk/sdk.d.ts +326 -21
  301. package/dist/sdk/sdk.js +21403 -16366
  302. package/dist/sdk/sdk.js.map +1 -1
  303. package/dist/sdk/sdk.mjs +13510 -2096
  304. package/dist/sdk/sdk.mjs.map +1 -1
  305. package/dist/sdk/session-registry-N5FFYFTM.mjs +10 -0
  306. package/dist/sdk/session-registry-N5FFYFTM.mjs.map +1 -0
  307. package/dist/sdk/trace-helpers-VP6QYVBX.mjs +23 -0
  308. package/dist/sdk/trace-helpers-VP6QYVBX.mjs.map +1 -0
  309. package/dist/sdk/{tracer-init-WC75N5NW.mjs → tracer-init-WP4X46IF.mjs} +2 -2
  310. package/dist/sdk/tracer-init-WP4X46IF.mjs.map +1 -0
  311. package/dist/sdk/workflow-registry-2YIIXQCK.mjs +11 -0
  312. package/dist/sdk/workflow-registry-2YIIXQCK.mjs.map +1 -0
  313. package/dist/sdk.d.ts.map +1 -1
  314. package/dist/snapshot-store.d.ts +59 -0
  315. package/dist/snapshot-store.d.ts.map +1 -0
  316. package/dist/state-machine/context/build-engine-context.d.ts +9 -0
  317. package/dist/state-machine/context/build-engine-context.d.ts.map +1 -0
  318. package/dist/state-machine/dispatch/dependency-gating.d.ts +12 -0
  319. package/dist/state-machine/dispatch/dependency-gating.d.ts.map +1 -0
  320. package/dist/state-machine/dispatch/execution-invoker.d.ts +14 -0
  321. package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -0
  322. package/dist/state-machine/dispatch/foreach-processor.d.ts +8 -0
  323. package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -0
  324. package/dist/state-machine/dispatch/history-snapshot.d.ts +8 -0
  325. package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -0
  326. package/dist/state-machine/dispatch/renderer-schema.d.ts +8 -0
  327. package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -0
  328. package/dist/state-machine/dispatch/stats-manager.d.ts +15 -0
  329. package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -0
  330. package/dist/state-machine/dispatch/template-renderer.d.ts +7 -0
  331. package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -0
  332. package/dist/state-machine/execution/summary.d.ts +8 -0
  333. package/dist/state-machine/execution/summary.d.ts.map +1 -0
  334. package/dist/state-machine/runner.d.ts +73 -0
  335. package/dist/state-machine/runner.d.ts.map +1 -0
  336. package/dist/state-machine/states/check-running.d.ts +14 -0
  337. package/dist/state-machine/states/check-running.d.ts.map +1 -0
  338. package/dist/state-machine/states/completed.d.ts +12 -0
  339. package/dist/state-machine/states/completed.d.ts.map +1 -0
  340. package/dist/state-machine/states/error.d.ts +11 -0
  341. package/dist/state-machine/states/error.d.ts.map +1 -0
  342. package/dist/state-machine/states/init.d.ts +11 -0
  343. package/dist/state-machine/states/init.d.ts.map +1 -0
  344. package/dist/state-machine/states/level-dispatch.d.ts +17 -0
  345. package/dist/state-machine/states/level-dispatch.d.ts.map +1 -0
  346. package/dist/state-machine/states/plan-ready.d.ts +12 -0
  347. package/dist/state-machine/states/plan-ready.d.ts.map +1 -0
  348. package/dist/state-machine/states/routing.d.ts +52 -0
  349. package/dist/state-machine/states/routing.d.ts.map +1 -0
  350. package/dist/state-machine/states/wave-planning.d.ts +14 -0
  351. package/dist/state-machine/states/wave-planning.d.ts.map +1 -0
  352. package/dist/state-machine/workflow-projection.d.ts +47 -0
  353. package/dist/state-machine/workflow-projection.d.ts.map +1 -0
  354. package/dist/state-machine-execution-engine.d.ts +147 -0
  355. package/dist/state-machine-execution-engine.d.ts.map +1 -0
  356. package/dist/telemetry/opentelemetry.d.ts.map +1 -1
  357. package/dist/test-runner/assertions.d.ts +59 -0
  358. package/dist/test-runner/assertions.d.ts.map +1 -0
  359. package/dist/test-runner/core/environment.d.ts +8 -0
  360. package/dist/test-runner/core/environment.d.ts.map +1 -0
  361. package/dist/test-runner/core/fixture.d.ts +3 -0
  362. package/dist/test-runner/core/fixture.d.ts.map +1 -0
  363. package/dist/test-runner/core/flow-stage.d.ts +32 -0
  364. package/dist/test-runner/core/flow-stage.d.ts.map +1 -0
  365. package/dist/test-runner/core/mocks.d.ts +8 -0
  366. package/dist/test-runner/core/mocks.d.ts.map +1 -0
  367. package/dist/test-runner/core/test-execution-wrapper.d.ts +18 -0
  368. package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -0
  369. package/dist/test-runner/evaluators.d.ts +12 -0
  370. package/dist/test-runner/evaluators.d.ts.map +1 -0
  371. package/dist/test-runner/fixture-loader.d.ts +30 -0
  372. package/dist/test-runner/fixture-loader.d.ts.map +1 -0
  373. package/dist/test-runner/index.d.ts +120 -0
  374. package/dist/test-runner/index.d.ts.map +1 -0
  375. package/dist/test-runner/recorders/github-recorder.d.ts +23 -0
  376. package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -0
  377. package/dist/test-runner/recorders/global-recorder.d.ts +4 -0
  378. package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -0
  379. package/dist/test-runner/utils/selectors.d.ts +2 -0
  380. package/dist/test-runner/utils/selectors.d.ts.map +1 -0
  381. package/dist/test-runner/validator.d.ts +8 -0
  382. package/dist/test-runner/validator.d.ts.map +1 -0
  383. package/dist/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
  384. package/dist/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
  385. package/dist/types/cli.d.ts +4 -1
  386. package/dist/types/cli.d.ts.map +1 -1
  387. package/dist/types/config.d.ts +278 -5
  388. package/dist/types/config.d.ts.map +1 -1
  389. package/dist/types/engine.d.ts +172 -0
  390. package/dist/types/engine.d.ts.map +1 -0
  391. package/dist/types/execution.d.ts +73 -0
  392. package/dist/types/execution.d.ts.map +1 -0
  393. package/dist/types/github.d.ts +51 -0
  394. package/dist/types/github.d.ts.map +1 -0
  395. package/dist/types/workflow.d.ts +237 -0
  396. package/dist/types/workflow.d.ts.map +1 -0
  397. package/dist/utils/command-executor.d.ts +43 -0
  398. package/dist/utils/command-executor.d.ts.map +1 -0
  399. package/dist/utils/comment-metadata.d.ts +21 -0
  400. package/dist/utils/comment-metadata.d.ts.map +1 -0
  401. package/dist/utils/config-loader.d.ts.map +1 -1
  402. package/dist/utils/config-merger.d.ts.map +1 -1
  403. package/dist/utils/env-exposure.d.ts +3 -0
  404. package/dist/utils/env-exposure.d.ts.map +1 -0
  405. package/dist/utils/file-exclusion.d.ts.map +1 -1
  406. package/dist/utils/interactive-prompt.d.ts +1 -1
  407. package/dist/utils/interactive-prompt.d.ts.map +1 -1
  408. package/dist/utils/sandbox.d.ts.map +1 -1
  409. package/dist/utils/script-memory-ops.d.ts +21 -0
  410. package/dist/utils/script-memory-ops.d.ts.map +1 -0
  411. package/dist/utils/template-context.d.ts +7 -0
  412. package/dist/utils/template-context.d.ts.map +1 -0
  413. package/dist/webhook-server.d.ts +3 -3
  414. package/dist/webhook-server.d.ts.map +1 -1
  415. package/dist/workflow-executor.d.ts +81 -0
  416. package/dist/workflow-executor.d.ts.map +1 -0
  417. package/dist/workflow-registry.d.ts +79 -0
  418. package/dist/workflow-registry.d.ts.map +1 -0
  419. package/package.json +10 -5
  420. package/dist/output/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  421. package/dist/sdk/check-execution-engine-2YYKUUSH.mjs +0 -11
  422. package/dist/sdk/check-execution-engine-6QJXYYON.mjs +0 -11
  423. package/dist/sdk/check-execution-engine-PJZ4ZOKG.mjs +0 -11
  424. package/dist/sdk/chunk-33QVZ2D4.mjs +0 -316
  425. package/dist/sdk/chunk-33QVZ2D4.mjs.map +0 -1
  426. package/dist/sdk/chunk-B5QBV2QJ.mjs +0 -752
  427. package/dist/sdk/chunk-B5QBV2QJ.mjs.map +0 -1
  428. package/dist/sdk/chunk-BVFNRCHT.mjs +0 -14129
  429. package/dist/sdk/chunk-BVFNRCHT.mjs.map +0 -1
  430. package/dist/sdk/chunk-KWZW23FG.mjs +0 -14129
  431. package/dist/sdk/chunk-KWZW23FG.mjs.map +0 -1
  432. package/dist/sdk/chunk-O4RP4BRH.mjs +0 -14092
  433. package/dist/sdk/chunk-O4RP4BRH.mjs.map +0 -1
  434. package/dist/sdk/chunk-TUTOLSFV.mjs.map +0 -1
  435. package/dist/sdk/chunk-U5D2LY66.mjs +0 -245
  436. package/dist/sdk/chunk-U5D2LY66.mjs.map +0 -1
  437. package/dist/sdk/chunk-U7X54EMV.mjs +0 -331
  438. package/dist/sdk/chunk-U7X54EMV.mjs.map +0 -1
  439. package/dist/sdk/config-merger-TWUBWFC2.mjs +0 -8
  440. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs +0 -61
  441. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs.map +0 -1
  442. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs +0 -61
  443. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs.map +0 -1
  444. package/dist/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  445. /package/dist/sdk/{check-execution-engine-2YYKUUSH.mjs.map → config-M4ZNO6NU.mjs.map} +0 -0
  446. /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
  447. /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → failure-condition-evaluator-NBO5YRXW.mjs.map} +0 -0
  448. /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → liquid-extensions-C7EG3YKH.mjs.map} +0 -0
  449. /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → memory-store-GJACZC2A.mjs.map} +0 -0
  450. /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → metrics-7PP3EJUH.mjs.map} +0 -0
package/README.md CHANGED
@@ -65,6 +65,7 @@ steps: # or 'checks' (legacy, both work identically)
65
65
  ```
66
66
 
67
67
  Tip: Pin releases for stability, e.g. `uses: probelabs/visor@v1`.
68
+ For latest changes, use `uses: probelabs/visor@nightly`. The `@main` ref is maintained for compatibility but may change frequently and is not recommended for production.
68
69
 
69
70
  ## Requirements
70
71
 
@@ -120,11 +121,29 @@ See full options and examples: [docs/NPM_USAGE.md](docs/NPM_USAGE.md)
120
121
  Additional guides:
121
122
 
122
123
  - fail conditions: [docs/fail-if.md](docs/fail-if.md)
123
- - forEach behavior and dependent propagation: [docs/foreach-dependency-propagation.md](docs/foreach-dependency-propagation.md)
124
+ - forEach behavior and dependent propagation (including outputs_raw and history precedence): [docs/foreach-dependency-propagation.md](docs/foreach-dependency-propagation.md)
125
+ - Failure routing and `on_finish` (with outputs_raw in routing JS): [docs/failure-routing.md](docs/failure-routing.md)
124
126
  - timeouts and provider units: [docs/timeouts.md](docs/timeouts.md)
127
+ - execution limits (run caps for safety): [docs/limits.md](docs/limits.md)
125
128
  - output formatting limits and truncation controls: [docs/output-formatting.md](docs/output-formatting.md)
126
129
  - live execution visualizer and control API: [docs/debug-visualizer.md](docs/debug-visualizer.md)
127
130
 
131
+ ## 🧪 Integration Tests
132
+
133
+ Write and run integration tests for your Visor config in YAML. No network, built‑in GitHub fixtures, strict by default, and great CLI output.
134
+
135
+ - Getting started: [docs/testing/getting-started.md](docs/testing/getting-started.md)
136
+ - DSL reference: [docs/testing/dsl-reference.md](docs/testing/dsl-reference.md)
137
+ - Flows: [docs/testing/flows.md](docs/testing/flows.md)
138
+ - Fixtures & mocks: [docs/testing/fixtures-and-mocks.md](docs/testing/fixtures-and-mocks.md)
139
+ - Assertions: [docs/testing/assertions.md](docs/testing/assertions.md)
140
+ - Cookbook: [docs/testing/cookbook.md](docs/testing/cookbook.md)
141
+ - CLI & reporters: [docs/testing/cli.md](docs/testing/cli.md)
142
+ - CI integration: [docs/testing/ci.md](docs/testing/ci.md)
143
+ - Troubleshooting: [docs/testing/troubleshooting.md](docs/testing/troubleshooting.md)
144
+
145
+ Note: examples use descriptive step names (e.g., `extract-facts`, `validate-fact`) to illustrate patterns. These are not built‑ins; the test runner works with whatever steps you define in `.visor.yaml`.
146
+
128
147
  ## 🧩 Core Concepts (1 minute)
129
148
 
130
149
  - Check – unit of work (`security`, `performance`).
@@ -399,6 +418,36 @@ steps:
399
418
 
400
419
  Learn more: [docs/dependencies.md](docs/dependencies.md). See also: [forEach dependency propagation](docs/foreach-dependency-propagation.md)
401
420
 
421
+ Quick example (outputs_raw):
422
+
423
+ ```yaml
424
+ version: "2.0"
425
+ checks:
426
+ list:
427
+ type: command
428
+ exec: echo '["a","b","c"]'
429
+ forEach: true
430
+
431
+ summarize:
432
+ type: script
433
+ depends_on: [list]
434
+ content: |
435
+ const arr = outputs_raw['list'] || [];
436
+ return { total: arr.length };
437
+
438
+ branch-by-size:
439
+ type: script
440
+ depends_on: [list]
441
+ content: 'return true'
442
+ on_success:
443
+ goto_js: |
444
+ return (outputs_raw['list'] || []).length >= 3 ? 'after' : null;
445
+
446
+ after:
447
+ type: log
448
+ message: bulk mode reached
449
+ ```
450
+
402
451
  ## 🔄 Failure Routing (Auto-fix Loops)
403
452
 
404
453
  Automatically remediate failures and re‑run steps using config‑driven routing:
@@ -623,9 +672,10 @@ Learn more: [docs/http.md](docs/http.md)
623
672
 
624
673
  ## 🔧 Pluggable Architecture
625
674
 
626
- Mix providers (`ai`, `mcp`, `http`, `http_client`, `log`, `command`, `github`, `claude-code`) or add your own.
675
+ Mix providers (`ai`, `mcp`, `http`, `http_client`, `log`, `command`, `script`, `github`, `claude-code`) or add your own.
627
676
 
628
677
  - **Command Provider**: Execute shell commands with templating and security - [docs/command-provider.md](docs/command-provider.md)
678
+ - **Script Provider**: Run JavaScript in a secure sandbox - [docs/script.md](docs/script.md)
629
679
  - **MCP Provider**: Call MCP tools directly via stdio, SSE, or HTTP transports - [docs/mcp-provider.md](docs/mcp-provider.md)
630
680
  - **MCP Tools for AI**: Enhance AI providers with MCP context - [docs/mcp.md](docs/mcp.md)
631
681
  - **Custom Providers**: Build your own providers - [docs/pluggable.md](docs/pluggable.md)
@@ -663,6 +713,9 @@ Learn more: [CONTRIBUTING.md](CONTRIBUTING.md)
663
713
  - Failure conditions schema: [docs/failure-conditions-schema.md](docs/failure-conditions-schema.md)
664
714
  - Failure conditions implementation notes: [docs/failure-conditions-implementation.md](docs/failure-conditions-implementation.md)
665
715
  - Recipes and practical examples: [docs/recipes.md](docs/recipes.md)
716
+ - ForEach outputs and precedence (outputs vs outputs_raw vs history): [docs/foreach-dependency-propagation.md](docs/foreach-dependency-propagation.md)
717
+ - Failure routing and on_finish aggregation (with outputs_raw in routing): [docs/failure-routing.md](docs/failure-routing.md)
718
+ - Example config using outputs_raw: examples/outputs-raw-basic.yaml
666
719
 
667
720
  ## 📄 License
668
721
 
@@ -692,3 +745,13 @@ steps:
692
745
  ```
693
746
 
694
747
  See docs: docs/github-ops.md
748
+ ## Integration Tests
749
+
750
+ Visor ships a YAML‑native integration test runner so you can describe user flows, mocks, and assertions alongside your config.
751
+
752
+ - Start here: docs/testing/getting-started.md
753
+ - CLI details: docs/testing/cli.md
754
+ - Fixtures and mocks: docs/testing/fixtures-and-mocks.md
755
+ - Assertions reference: docs/testing/assertions.md
756
+
757
+ Example suite: defaults/.visor.tests.yaml
package/action.yml CHANGED
@@ -33,7 +33,7 @@ inputs:
33
33
  default: 'true'
34
34
 
35
35
  checks:
36
- description: 'Comma-separated list of checks to run (security,performance,style,architecture,all)'
36
+ description: 'Comma-separated list of checks to run (security,performance,architecture,quality,all)'
37
37
  required: false
38
38
  default: 'all'
39
39
 
@@ -0,0 +1,114 @@
1
+ version: "1.0"
2
+
3
+ # Example: Code Refiner
4
+ #
5
+ # Re-uses the existing defaults/code-review.yaml as a nested workflow step (via
6
+ # `config:`), then iteratively applies fixes using claude-code until no
7
+ # critical/error issues remain. Uses declarative transitions with pure JS.
8
+
9
+ steps:
10
+ # 1) Run code-review as a nested workflow step
11
+ run-review:
12
+ type: workflow
13
+ # Re-use existing config directly (resolved from workingDirectory)
14
+ config: defaults/code-review.yaml
15
+ criticality: policy
16
+ on: [pr_opened, pr_updated]
17
+ # If the review discovered blocking issues, mark this check failed so
18
+ # routing goes to the fix step via on_fail. Base this strictly on the
19
+ # nested workflow's output object (no implicit globals).
20
+ fail_if: "(output?.hasErrors === true) || ((output?.issues?.length ?? 0) > 0)"
21
+ # Guarantee that the workflow output contract is present for downstream logic
22
+ guarantee: "typeof output.hasErrors === 'boolean' && Array.isArray(output.issues)"
23
+ on_fail:
24
+ goto: fix-with-claude
25
+ on_success:
26
+ goto: post-verified
27
+
28
+ # 2) Attempt automated fixes with Claude Code
29
+ fix-with-claude:
30
+ type: claude-code
31
+ criticality: internal
32
+ if: "outputs['run-review']?.hasErrors === true"
33
+ # Minimal post-exec contract for internal steps
34
+ guarantee: typeof output.content === 'string' && output.content.length > 0
35
+ prompt: |
36
+ You are an expert code refiner.
37
+ Apply targeted, minimal changes to resolve blocking issues from the latest review.
38
+
39
+ Review results (JSON):
40
+ {{ outputs['run-review'] | json }}
41
+
42
+ Please prioritize fixing issues with severity "critical" or "error" first.
43
+
44
+ Rules:
45
+ - Keep diffs minimal; avoid broad refactors.
46
+ - Preserve behavior and tests unless the issue requires updating them.
47
+ - Prefer local fixes near the reported lines.
48
+ - Add/adjust tests when necessary.
49
+
50
+ When finished, summarize the changes you made.
51
+
52
+ # After fixes, re-run the review; routing loop budget protects from infinity
53
+ on_success:
54
+ goto: run-review
55
+
56
+ # 3) Final confirmation step once no blocking issues remain
57
+ post-verified:
58
+ type: log
59
+ group: summary
60
+ if: "outputs['run-review']?.hasErrors === false"
61
+ message: |
62
+ ✅ Code Refiner complete. No critical/error issues remain in the latest review.
63
+
64
+ tests:
65
+ defaults:
66
+ strict: true
67
+ ai_provider: mock
68
+ fail_on_unexpected_calls: true
69
+ fixtures: []
70
+
71
+ cases:
72
+ - name: code-refiner-clean-pass
73
+ description: |
74
+ Nested workflow (code-review) runs as a step via `config:` and produces no blocking issues.
75
+ The refiner should skip the fix step and proceed directly to post-verified.
76
+ event: pr_opened
77
+ fixture: gh.pr_open.minimal
78
+ mocks:
79
+ # Black-box mock for the workflow step output
80
+ run-review:
81
+ hasErrors: false
82
+ issues: []
83
+ expect:
84
+ calls:
85
+ - step: run-review
86
+ exactly: 1
87
+ - step: post-verified
88
+ exactly: 1
89
+ no_calls:
90
+ - step: fix-with-claude
91
+
92
+ - name: code-refiner-fix-loop
93
+ description: |
94
+ First review finds blocking issues → fix-with-claude runs → second review is clean → post-verified.
95
+ event: pr_opened
96
+ fixture: gh.pr_open.minimal
97
+ mocks:
98
+ # First run: hasErrors -> triggers fix; Second run: clean -> post-verified
99
+ run-review[]:
100
+ - hasErrors: true
101
+ issues:
102
+ - { severity: error, ruleId: "security/test", message: "Mock issue", file: "a.ts", line: 1 }
103
+ - hasErrors: false
104
+ issues: []
105
+ # Mock Claude Code to satisfy guarantee
106
+ fix-with-claude: { content: "Applied targeted fixes" }
107
+ expect:
108
+ calls:
109
+ - step: run-review
110
+ exactly: 2
111
+ - step: fix-with-claude
112
+ exactly: 1
113
+ - step: post-verified
114
+ exactly: 1
@@ -1,69 +1,37 @@
1
1
  version: "1.0"
2
2
 
3
- # Default Visor configuration - provides comprehensive code analysis out-of-the-box
4
- # Uses mock provider for CI compatibility when no AI API keys are configured
5
- # Users can override this by creating their own .visor.yaml in their project root
6
-
7
- # Global AI provider settings - users should configure their preferred provider
8
- # For CI testing, use --provider mock CLI flag instead
3
+ # Extracted code review steps for reuse and composition
4
+ outputs:
5
+ - name: issues
6
+ description: Aggregated issues from review steps
7
+ value_js: |
8
+ const values = Object.values(outputs || {});
9
+ const all = [];
10
+ for (const v of values) {
11
+ const arr = (v && Array.isArray(v.issues)) ? v.issues : [];
12
+ if (arr.length) all.push(...arr);
13
+ }
14
+ return all;
9
15
 
10
- # Run up to 4 steps in parallel for faster execution
11
- max_parallelism: 4
16
+ - name: hasErrors
17
+ description: True if any critical or error issues exist
18
+ value_js: |
19
+ for (const v of Object.values(outputs || {})) {
20
+ const arr = (v && Array.isArray(v.issues)) ? v.issues : [];
21
+ if (arr.some(i => i && (i.severity === 'critical' || i.severity === 'error'))) return true;
22
+ }
23
+ return false;
12
24
 
13
- # Global fail condition - fail if critical or error severity issues are found
14
- fail_if: "output.issues && output.issues.some(i => i.severity === 'critical' || i.severity === 'error')"
15
25
 
16
- # Workflow steps (formerly 'checks' - both keys are supported for backward compatibility)
17
26
  steps:
18
- # AI-powered release notes generation - manual execution only for release workflows
19
- release-notes:
20
- type: ai
21
- group: release
22
- schema: plain
23
- prompt: |
24
- Generate professional release notes for version {{ env.TAG_NAME }} of this project.
25
-
26
- Analyze the git commits since the last release:
27
- ```
28
- {{ env.GIT_LOG }}
29
- ```
30
-
31
- And the file changes summary:
32
- ```
33
- {{ env.GIT_DIFF_STAT }}
34
- ```
35
-
36
- Create release notes with these sections:
37
-
38
- ## 🚀 What's New in {{ env.TAG_NAME }}
39
-
40
- ### ✨ New Features
41
- List any new features added (look for feat: commits)
42
-
43
- ### 🐛 Bug Fixes
44
- List any bugs fixed (look for fix: commits)
45
-
46
- ### 📈 Improvements
47
- List any improvements or refactoring (look for refactor:, perf:, chore:, build: commits)
48
-
49
- ### 🔥 Breaking Changes
50
- List any breaking changes if present (look for BREAKING CHANGE or ! in commits)
51
-
52
- ### 📊 Statistics
53
- - Number of commits since last release
54
- - Number of contributors involved
55
- - Number of files changed
56
-
57
- Keep descriptions concise and user-friendly. Focus on what changed from a user perspective, not implementation details.
58
- Use present tense and action-oriented language. Group similar changes together.
59
- on: [manual]
60
-
61
27
  # PR overview with intelligent analysis - runs first to establish context
62
28
  overview:
63
29
  type: ai
64
30
  group: overview
65
- schema: overview
31
+ on: [pr_opened, pr_updated]
66
32
  prompt: |
33
+ PR Title: {{ pr.title }}
34
+
67
35
  You are generating PR overview, to help owners of the repository to understand what this PR is above, and help reviewer to point to the right parts of the code. First you should provide detailed but concise description, mentioning all the changes.
68
36
 
69
37
  ## Files Changed Analysis
@@ -90,13 +58,14 @@ steps:
90
58
  - Do not change or re-suggest labels on PR update events; the repository applies labels only on `pr_opened`.
91
59
 
92
60
  Be concise, specific, and actionable. Avoid praise or celebration.
93
- on: [pr_opened, pr_updated]
61
+ schema: overview
94
62
 
95
63
  # Security analysis - Critical for all projects
96
64
  security:
97
65
  type: ai
98
66
  group: review
99
- schema: code-review
67
+ on: [pr_opened, pr_updated]
68
+ depends_on: [overview]
100
69
  prompt: |
101
70
  Based on our overview discussion, please perform a comprehensive security analysis of the code changes.
102
71
 
@@ -136,14 +105,14 @@ steps:
136
105
  - **error**: Security issues that must be fixed before production (XSS, path traversal, weak crypto, missing auth checks)
137
106
  - **warning**: Security concerns that should be addressed (verbose errors, missing rate limiting, insecure defaults)
138
107
  - **info**: Security best practices and hardening suggestions (defense in depth, additional validation)
139
- depends_on: [overview]
140
- on: [pr_opened, pr_updated]
108
+ schema: code-review
141
109
 
142
110
  # Architecture analysis - Ensures sound design and avoids over-engineering
143
111
  architecture:
144
112
  type: ai
145
113
  group: review
146
- schema: code-review
114
+ on: [pr_opened, pr_updated]
115
+ depends_on: [overview]
147
116
  prompt: |
148
117
  Building on our overview analysis, evaluate the architectural decisions and design patterns.
149
118
 
@@ -188,14 +157,14 @@ steps:
188
157
  - **error**: Significant architectural problems (over-engineering, unnecessary special cases, violation of core patterns, missed reuse opportunities)
189
158
  - **warning**: Architectural concerns that should be addressed (minor over-abstraction, could be simplified, inconsistent patterns)
190
159
  - **info**: Architectural suggestions and alternative approaches (simpler patterns available, potential for future reuse)
191
- depends_on: [overview]
192
- on: [pr_opened, pr_updated]
160
+ schema: code-review
193
161
 
194
162
  # Performance analysis - Important for all applications
195
163
  performance:
196
164
  type: ai
197
165
  group: review
198
- schema: code-review
166
+ on: [pr_opened, pr_updated]
167
+ depends_on: [overview]
199
168
  prompt: |
200
169
  Building on our overview analysis, now review the code changes for performance issues.
201
170
 
@@ -233,14 +202,14 @@ steps:
233
202
  - **error**: Significant performance problems affecting user experience (O(n²) in critical path, N+1 queries, blocking I/O)
234
203
  - **warning**: Performance concerns that should be optimized (inefficient algorithms, missing indexes, unnecessary operations)
235
204
  - **info**: Performance best practices and optimization opportunities (caching suggestions, async improvements)
236
- depends_on: [overview]
237
- on: [pr_opened, pr_updated]
205
+ schema: code-review
238
206
 
239
207
  # Code quality and maintainability
240
208
  quality:
241
209
  type: ai
242
210
  group: review
243
- schema: code-review
211
+ on: [pr_opened, pr_updated]
212
+ depends_on: [overview]
244
213
  prompt: |
245
214
  Building on our overview discussion, evaluate the code quality and maintainability.
246
215
 
@@ -303,164 +272,4 @@ steps:
303
272
  - **error**: Quality problems that significantly impact maintainability (no error handling, high complexity, severe coupling, tests with magic numbers)
304
273
  - **warning**: Quality concerns that should be addressed (missing tests, code duplication, poor naming, unclear test expectations)
305
274
  - **info**: Best practices and improvement suggestions (refactoring opportunities, documentation improvements, test clarity)
306
- depends_on: [overview]
307
- on: [pr_opened, pr_updated]
308
-
309
- # Code style and formatting analysis
310
- style:
311
- type: ai
312
- group: review
313
275
  schema: code-review
314
- prompt: |
315
- Building on our overview discussion, analyze the code style and formatting consistency.
316
-
317
- Review the code changes shown in the `<full_diff>` or `<commit_diff>` sections, considering the files listed in `<files_summary>`.
318
-
319
- ## Style Assessment Areas
320
- **Code Formatting & Consistency:**
321
- - Indentation and spacing consistency
322
- - Naming conventions adherence
323
- - Code organization and structure
324
- - Comment style and documentation
325
-
326
- **Language-Specific Style Guidelines:**
327
- - Adherence to language style guides (PEP 8, ESLint, etc.)
328
- - Import/require statement organization
329
- - Variable and function naming patterns
330
- - Code readability and clarity
331
-
332
- **Team Standards:**
333
- - Consistency with existing codebase patterns
334
- - Formatting tool configuration compliance
335
- - Documentation standards adherence
336
- - Code comment quality and completeness
337
-
338
- Focus on style improvements that enhance code readability and maintainability based on the overview analysis.
339
-
340
- ## Severity Guidelines
341
- Use the following severity levels appropriately:
342
- - **critical**: Never use for style issues (style issues are never critical)
343
- - **error**: Major style violations that significantly harm readability (completely inconsistent formatting, misleading names)
344
- - **warning**: Style inconsistencies that should be fixed (mixed conventions, unclear naming, formatting issues)
345
- - **info**: Style suggestions and minor improvements (spacing, comment formatting, optional conventions)
346
- depends_on: [overview]
347
- on: [pr_opened, pr_updated]
348
-
349
- # Apply labels based on overview tags — runs only on PR open (GitHub environments only)
350
- apply-overview-labels:
351
- type: github
352
- tags: [github]
353
- depends_on: [overview]
354
- on: [pr_opened]
355
- op: labels.add
356
- values:
357
- - "{{ outputs.overview.tags.label | default: '' | safe_label }}"
358
- - "{{ outputs.overview.tags['review-effort'] | default: '' | prepend: 'review/effort:' | safe_label }}"
359
- value_js: |
360
- return values.filter(v => typeof v === 'string' && v.trim().length > 0);
361
-
362
- # Issue Assistant (issues only) — triage-quality prompt from main branch, structured output
363
- issue-assistant:
364
- type: ai
365
- group: dynamic # New issue triage posts a standalone comment
366
- schema: issue-assistant
367
- prompt: |
368
- You are an intelligent GitHub issue assistant for the {{ event.repository.fullName }} repository. Your role is to provide professional, knowledgeable assistance when a NEW issue is opened.
369
-
370
- Return ONE JSON object (no prose outside JSON) that validates the `issue-assistant` schema with:
371
- - `text`: write a clear, well-structured markdown reply that welcomes the reporter, shows understanding, and provides next steps. Use sections and bullets where helpful.
372
- - `intent`: must be "issue_triage" for this flow.
373
- - `labels` (optional): array of labels that would help organization for this new issue.
374
-
375
- Use this triage rubric (adopted from our main prompt):
376
- 1) Categorize the issue - choose from: bug, chore, documentation, enhancement, feature, question, wontfix, invalid, duplicate
377
- 2) Assess priority (low/medium/high/urgent)
378
- 3) Estimate complexity (trivial/simple/moderate/complex)
379
- 4) Recommend labels from the categories above
380
- 5) Identify potential areas affected or relevant documentation
381
- 6) Provide an initial response with clarifying questions if needed
382
-
383
- Response style:
384
- - Professional and welcoming
385
- - Start by acknowledging what you understand from the issue report
386
- - Clearly state what you're confident about based on the information provided
387
- - Identify what is unclear or missing, and explicitly ask follow-up questions to help with debugging
388
- - When information is incomplete, ask specific questions that would help diagnose the issue
389
- - Provide actionable guidance and clear next steps
390
- - Use natural markdown formatting; include code snippets where useful
391
- - Be honest about what you know and what you don't know
392
- - NEVER make promises about timelines, release dates, or team commitments
393
- - NEVER say things like "we'll pick this up", "will be included in upcoming release", or "we will post updates"
394
- - Focus on technical analysis and helpful information rather than commitments
395
- on: [issue_opened]
396
-
397
- # Comment Assistant (comments only) — intent detection and reply
398
- comment-assistant:
399
- type: ai
400
- group: dynamic
401
- schema: issue-assistant
402
- command: "visor"
403
- prompt: |
404
- You are the GitHub comment assistant for {{ event.repository.fullName }}. Respond to user comments on issues or PR discussion threads.
405
-
406
- Return ONE JSON object (no prose outside JSON) that validates the `issue-assistant` schema with:
407
- - `text`: a concise, helpful markdown reply to the latest comment.
408
- - `intent`: choose one: "comment_reply" (normal reply) or "comment_retrigger" (pick this ONLY when the user explicitly asks to re-run checks OR explicitly asks to disable some checks).
409
- - `labels`: omit for comments (do not include).
410
-
411
- Rules:
412
- - Never suggest rerun/disable unless asked explicitly.
413
- - If asked to disable any check(s), set `intent` = "comment_retrigger" and in `text` acknowledge the request and say the checks will be re-run; DO NOT propose slash/directive comments.
414
- - Stay technical, direct, and specific; add code snippets or links when helpful.
415
- - When answering questions, acknowledge what you can answer confidently based on the context provided
416
- - If you need more information to provide a complete answer, ask specific follow-up questions
417
- - Be honest when you don't know something or can't find the answer in the available context
418
- - If the question requires information not available in the PR/issue context, clearly state what's missing
419
- - Provide partial answers when possible, and indicate what additional information would help give a complete response
420
- on: [issue_comment]
421
- on_success:
422
- goto_js: |
423
- const intent = (typeof output === 'object' && output) ? output.intent : undefined;
424
- const isComment = (event && event.name) ? (event.name == 'issue_comment') : true;
425
- const allowed = typeof hasMinPermission === 'function' ? hasMinPermission('MEMBER') : true;
426
- return (isComment && allowed && intent === 'comment_retrigger') ? 'overview' : null
427
- goto_event: pr_updated
428
-
429
- # Apply labels to new issues based on assistant output (GitHub-only)
430
- apply-issue-labels:
431
- type: github
432
- tags: [github]
433
- depends_on: [issue-assistant]
434
- on: [issue_opened]
435
- op: labels.add
436
- value_js: |
437
- try {
438
- const issueAssistant = outputs['issue-assistant'];
439
- const labels = Array.isArray(issueAssistant?.labels) ? issueAssistant.labels : [];
440
- // Sanitize labels: keep [A-Za-z0-9:/], collapse repeated '/'
441
- return labels
442
- .map(v => (v == null ? '' : String(v)))
443
- .map(s => s.replace(/[^A-Za-z0-9:\/]/g, '').replace(/\/{2,}/g, '/'))
444
- .filter(s => s.length > 0);
445
- } catch (error) {
446
- log('Error processing issue labels:', error);
447
- return [];
448
- }
449
-
450
- # External origin labelling for PRs and Issues
451
- external-label:
452
- type: github
453
- tags: [github]
454
- on: [pr_opened, issue_opened]
455
- if: "!isMember() && !isContributor()"
456
- op: labels.add
457
- values:
458
- - "external"
459
-
460
- # Retrigger noop removed — comment-assistant schedules overview directly
461
-
462
- output:
463
- pr_comment:
464
- format: markdown
465
- group_by: check
466
- collapse: true
@@ -0,0 +1,52 @@
1
+ version: "1.0"
2
+
3
+ # Bring in the full default Visor workflow (which itself includes code-review.yaml)
4
+ include:
5
+ - ./visor.yaml
6
+
7
+ # Override exactly one of the imported code-review steps using appendPrompt
8
+ steps:
9
+ security:
10
+ appendPrompt: |
11
+ Additionally, search for any hard-coded credentials (API keys, tokens,
12
+ passwords) or secrets in diffs and configuration files. If found, mark
13
+ them as critical and recommend using a secret manager or environment
14
+ variables instead.
15
+ # Add a new lightweight code-review step to demonstrate extending the suite
16
+ readability:
17
+ type: ai
18
+ group: review
19
+ on: [pr_opened, pr_updated]
20
+ depends_on: [overview]
21
+ prompt: |
22
+ Perform a lightweight readability review of the proposed changes.
23
+ Focus on:
24
+ - Clear, intention-revealing naming
25
+ - Helpful comments (avoid redundant ones)
26
+ - Function length and cohesion
27
+ - Early returns to reduce nesting
28
+ - Eliminate dead code and commented-out blocks
29
+ schema: code-review
30
+
31
+ tests:
32
+ defaults:
33
+ strict: false
34
+ ai_provider: mock
35
+ cases:
36
+ - name: override-appendPrompt-security
37
+ event: pr_opened
38
+ fixture: gh.pr_open.minimal
39
+ mocks:
40
+ overview:
41
+ text: "Overview body"
42
+ tags: { label: feature, review-effort: 2 }
43
+ security: { issues: [] }
44
+ expect:
45
+ calls:
46
+ - step: security
47
+ exactly: 1
48
+ prompts:
49
+ - step: security
50
+ contains:
51
+ - "hard-coded credentials"
52
+ - "secret manager"