@probelabs/visor 0.1.106 → 0.1.111

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 (530) hide show
  1. package/README.md +71 -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 +624 -0
  7. package/defaults/visor.tests.yaml +685 -0
  8. package/defaults/visor.yaml +483 -0
  9. package/dist/action-cli-bridge.d.ts +11 -82
  10. package/dist/action-cli-bridge.d.ts.map +1 -1
  11. package/dist/ai-review-service.d.ts +28 -9
  12. package/dist/ai-review-service.d.ts.map +1 -1
  13. package/dist/check-execution-engine.d.ts +19 -331
  14. package/dist/check-execution-engine.d.ts.map +1 -1
  15. package/dist/cli-main.d.ts.map +1 -1
  16. package/dist/cli.d.ts +0 -1
  17. package/dist/cli.d.ts.map +1 -1
  18. package/dist/config.d.ts +16 -0
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/cron-scheduler.d.ts +3 -3
  21. package/dist/cron-scheduler.d.ts.map +1 -1
  22. package/dist/debug-visualizer/ws-server.d.ts +7 -1
  23. package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
  24. package/dist/defaults/code-refiner.yaml +114 -0
  25. package/dist/defaults/{.visor.yaml → code-review.yaml} +35 -226
  26. package/dist/defaults/override.yaml +52 -0
  27. package/dist/defaults/task-refinement.yaml +624 -0
  28. package/dist/defaults/visor.tests.yaml +685 -0
  29. package/dist/defaults/visor.yaml +483 -0
  30. package/dist/docs/DEPLOYMENT.md +118 -0
  31. package/dist/docs/GITHUB_CHECKS.md +280 -0
  32. package/dist/docs/NPM_USAGE.md +208 -0
  33. package/dist/docs/action-reference.md +19 -0
  34. package/dist/docs/advanced-ai.md +237 -0
  35. package/dist/docs/ai-configuration.md +535 -0
  36. package/dist/docs/ai-custom-tools-usage.md +261 -0
  37. package/dist/docs/ai-custom-tools.md +392 -0
  38. package/dist/docs/author-permissions.md +610 -0
  39. package/dist/docs/bot-transports-rfc.md +23 -0
  40. package/dist/docs/ci-cli-mode.md +34 -0
  41. package/dist/docs/claude-code.md +74 -0
  42. package/dist/docs/command-provider.md +559 -0
  43. package/dist/docs/commands.md +8 -0
  44. package/dist/docs/configuration.md +324 -0
  45. package/dist/docs/custom-tools.md +424 -0
  46. package/dist/docs/dashboards/README.md +23 -0
  47. package/dist/docs/dashboards/grafana-visor-diagrams.json +20 -0
  48. package/dist/docs/dashboards/grafana-visor-overview.json +33 -0
  49. package/dist/docs/debug-visualizer-progress.md +572 -0
  50. package/dist/docs/debug-visualizer-rfc.md +691 -0
  51. package/dist/docs/debug-visualizer.md +114 -0
  52. package/dist/docs/debugging.md +636 -0
  53. package/dist/docs/default-output-schema.md +28 -0
  54. package/dist/docs/dependencies.md +369 -0
  55. package/dist/docs/dev-playbook.md +9 -0
  56. package/dist/docs/engine-pause-resume-rfc.md +192 -0
  57. package/dist/docs/engine-state-machine-plan.md +333 -0
  58. package/dist/docs/event-driven-github-integration-rfc.md +743 -0
  59. package/dist/docs/event-triggers.md +292 -0
  60. package/dist/docs/execution-statistics-rfc.md +290 -0
  61. package/dist/docs/fact-validator-gap-analysis.md +178 -0
  62. package/dist/docs/fact-validator-implementation-plan.md +1235 -0
  63. package/dist/docs/fail-if.md +95 -0
  64. package/dist/docs/failure-conditions-implementation.md +271 -0
  65. package/dist/docs/failure-conditions-schema.md +173 -0
  66. package/dist/docs/failure-routing-rfc.md +193 -0
  67. package/dist/docs/failure-routing.md +507 -0
  68. package/dist/docs/foreach-dependency-propagation.md +473 -0
  69. package/dist/docs/github-ops.md +89 -0
  70. package/dist/docs/goto-forward-run-plan.md +113 -0
  71. package/dist/docs/guides/criticality-modes.md +332 -0
  72. package/dist/docs/guides/fault-management-and-contracts.md +738 -0
  73. package/dist/docs/guides/workflow-style-guide.md +224 -0
  74. package/dist/docs/http.md +299 -0
  75. package/dist/docs/human-input-provider.md +372 -0
  76. package/dist/docs/lifecycle-hooks.md +253 -0
  77. package/dist/docs/limits.md +64 -0
  78. package/dist/docs/liquid-templates.md +490 -0
  79. package/dist/docs/loop-routing-refactor.md +89 -0
  80. package/dist/docs/mcp-provider.md +557 -0
  81. package/dist/docs/mcp.md +124 -0
  82. package/dist/docs/memory.md +903 -0
  83. package/dist/docs/observability.md +12 -0
  84. package/dist/docs/output-formats.md +20 -0
  85. package/dist/docs/output-formatting.md +29 -0
  86. package/dist/docs/output-history.md +383 -0
  87. package/dist/docs/performance.md +6 -0
  88. package/dist/docs/pluggable.md +124 -0
  89. package/dist/docs/proposals/snapshot-scope-execution.md +236 -0
  90. package/dist/docs/providers/git-checkout.md +589 -0
  91. package/dist/docs/recipes.md +474 -0
  92. package/dist/docs/rfc/git-checkout-step.md +601 -0
  93. package/dist/docs/rfc/on_init-hook.md +1294 -0
  94. package/dist/docs/rfc/workspace-isolation.md +216 -0
  95. package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
  96. package/dist/docs/router-patterns.md +339 -0
  97. package/dist/docs/schema-next-pr.md +10 -0
  98. package/dist/docs/schema-templates.md +68 -0
  99. package/dist/docs/script.md +34 -0
  100. package/dist/docs/sdk.md +222 -0
  101. package/dist/docs/security.md +7 -0
  102. package/dist/docs/suppressions.md +89 -0
  103. package/dist/docs/tag-filtering.md +258 -0
  104. package/dist/docs/telemetry-setup.md +119 -0
  105. package/dist/docs/telemetry-tracing-rfc.md +275 -0
  106. package/dist/docs/test-framework-rfc.md +680 -0
  107. package/dist/docs/testing/assertions.md +85 -0
  108. package/dist/docs/testing/ci.md +44 -0
  109. package/dist/docs/testing/cli.md +41 -0
  110. package/dist/docs/testing/cookbook.md +172 -0
  111. package/dist/docs/testing/dsl-reference.md +199 -0
  112. package/dist/docs/testing/fixtures-and-mocks.md +91 -0
  113. package/dist/docs/testing/flows.md +92 -0
  114. package/dist/docs/testing/getting-started.md +93 -0
  115. package/dist/docs/testing/troubleshooting.md +55 -0
  116. package/dist/docs/timeouts.md +50 -0
  117. package/dist/docs/troubleshooting.md +7 -0
  118. package/dist/docs/visor-sdk-rfc.md +186 -0
  119. package/dist/docs/workflows.md +569 -0
  120. package/dist/engine/on-finish/orchestrator.d.ts +19 -0
  121. package/dist/engine/on-finish/orchestrator.d.ts.map +1 -0
  122. package/dist/engine/on-finish/utils.d.ts +44 -0
  123. package/dist/engine/on-finish/utils.d.ts.map +1 -0
  124. package/dist/event-bus/event-bus.d.ts +13 -0
  125. package/dist/event-bus/event-bus.d.ts.map +1 -0
  126. package/dist/event-bus/types.d.ts +71 -0
  127. package/dist/event-bus/types.d.ts.map +1 -0
  128. package/dist/examples/.claude/agents/code-reviewer.md +69 -0
  129. package/dist/examples/.mcp.json +34 -0
  130. package/dist/examples/CALCULATOR-SDK.md +364 -0
  131. package/dist/examples/README.md +384 -0
  132. package/dist/examples/ai-custom-tools-example.yaml +206 -0
  133. package/dist/examples/ai-custom-tools-simple.yaml +76 -0
  134. package/dist/examples/ai-retry-fallback-config.yaml +180 -0
  135. package/dist/examples/ai-with-bash.yaml +126 -0
  136. package/dist/examples/ai-with-mcp.yaml +82 -0
  137. package/dist/examples/basic-human-input.yaml +15 -0
  138. package/dist/examples/bedrock-config.yaml +77 -0
  139. package/dist/examples/calculator-config.yaml +133 -0
  140. package/dist/examples/calculator-json-output-guide.md +311 -0
  141. package/dist/examples/calculator-sdk-automated.ts +340 -0
  142. package/dist/examples/calculator-sdk-example.ts +275 -0
  143. package/dist/examples/calculator-sdk-json.ts +331 -0
  144. package/dist/examples/calculator-sdk-real.ts +374 -0
  145. package/dist/examples/calculator-sdk-test.ts +148 -0
  146. package/dist/examples/claude-code-config.yaml +191 -0
  147. package/dist/examples/cron-webhook-config.yaml +215 -0
  148. package/dist/examples/custom-template.liquid +57 -0
  149. package/dist/examples/custom-tools-example.yaml +281 -0
  150. package/dist/examples/enhanced-config.yaml +165 -0
  151. package/dist/examples/environments/visor.base.yaml +92 -0
  152. package/dist/examples/environments/visor.dev.yaml +33 -0
  153. package/dist/examples/environments/visor.prod.yaml +95 -0
  154. package/dist/examples/environments/visor.staging.yaml +46 -0
  155. package/dist/examples/fact-validator.yaml +361 -0
  156. package/dist/examples/fail-if-simple.yaml +90 -0
  157. package/dist/examples/failure-conditions-advanced.yaml +136 -0
  158. package/dist/examples/failure-conditions-basic.yaml +48 -0
  159. package/dist/examples/failure-conditions-github-style.yaml +119 -0
  160. package/dist/examples/failure-conditions-migration.yaml +74 -0
  161. package/dist/examples/for-loop-example.yaml +176 -0
  162. package/dist/examples/forEach-example.yaml +120 -0
  163. package/dist/examples/git-checkout-basic.yaml +32 -0
  164. package/dist/examples/git-checkout-compare.yaml +59 -0
  165. package/dist/examples/git-checkout-cross-repo.yaml +76 -0
  166. package/dist/examples/github-workflow-with-tags.yml +163 -0
  167. package/dist/examples/http-integration-config.yaml +240 -0
  168. package/dist/examples/https-server-config.yaml +209 -0
  169. package/dist/examples/human-input-example.yaml +63 -0
  170. package/dist/examples/if-conditions.yaml +173 -0
  171. package/dist/examples/jira-simple-example.yaml +56 -0
  172. package/dist/examples/jira-single-issue-workflow.yaml +166 -0
  173. package/dist/examples/jira-workflow-mcp.yaml +182 -0
  174. package/dist/examples/mcp/analyzer.py +119 -0
  175. package/dist/examples/mcp-provider-example.yaml +301 -0
  176. package/dist/examples/memory-counter.yaml +99 -0
  177. package/dist/examples/memory-error-collection.yaml +104 -0
  178. package/dist/examples/memory-exec-js.yaml +247 -0
  179. package/dist/examples/memory-namespace-isolation.yaml +184 -0
  180. package/dist/examples/memory-retry-counter.yaml +65 -0
  181. package/dist/examples/memory-state-machine.yaml +170 -0
  182. package/dist/examples/on-init-import-demo.yaml +179 -0
  183. package/dist/examples/outputs-raw-basic.yaml +26 -0
  184. package/dist/examples/project-with-tools.yaml +174 -0
  185. package/dist/examples/prompts/architecture-analysis.liquid +116 -0
  186. package/dist/examples/prompts/security-comprehensive.liquid +107 -0
  187. package/dist/examples/quick-start-tags.yaml +53 -0
  188. package/dist/examples/reusable-tools.yaml +92 -0
  189. package/dist/examples/reusable-workflows.yaml +88 -0
  190. package/dist/examples/routing-basic.yaml +35 -0
  191. package/dist/examples/routing-dynamic-js.yaml +46 -0
  192. package/dist/examples/routing-foreach.yaml +34 -0
  193. package/dist/examples/routing-goto-event.yaml +34 -0
  194. package/dist/examples/routing-on-success.yaml +25 -0
  195. package/dist/examples/run-calculator-demo.sh +71 -0
  196. package/dist/examples/sdk-basic.mjs +10 -0
  197. package/dist/examples/sdk-cjs.cjs +10 -0
  198. package/dist/examples/sdk-comprehensive.mjs +175 -0
  199. package/dist/examples/sdk-manual-config.mjs +65 -0
  200. package/dist/examples/sdk-typescript.js +81 -0
  201. package/dist/examples/sdk-typescript.ts +92 -0
  202. package/dist/examples/session-reuse-config.yaml +151 -0
  203. package/dist/examples/session-reuse-self.yaml +81 -0
  204. package/dist/examples/slack-simple-chat.yaml +775 -0
  205. package/dist/examples/templates/security-report.liquid +137 -0
  206. package/dist/examples/tools-library.yaml +281 -0
  207. package/dist/examples/transform-example.yaml +199 -0
  208. package/dist/examples/visor-with-tags.yaml +198 -0
  209. package/dist/examples/webhook-pipeline-config.yaml +218 -0
  210. package/dist/examples/workflows/calculator-workflow.yaml +163 -0
  211. package/dist/examples/workflows/code-quality.yaml +222 -0
  212. package/dist/examples/workflows/quick-pr-check.yaml +90 -0
  213. package/dist/examples/workflows/workflow-composition-example.yaml +130 -0
  214. package/dist/failure-condition-evaluator.d.ts +3 -0
  215. package/dist/failure-condition-evaluator.d.ts.map +1 -1
  216. package/dist/frontends/github-frontend.d.ts +58 -0
  217. package/dist/frontends/github-frontend.d.ts.map +1 -0
  218. package/dist/frontends/host.d.ts +47 -0
  219. package/dist/frontends/host.d.ts.map +1 -0
  220. package/dist/frontends/ndjson-sink.d.ts +12 -0
  221. package/dist/frontends/ndjson-sink.d.ts.map +1 -0
  222. package/dist/frontends/slack-frontend.d.ts +58 -0
  223. package/dist/frontends/slack-frontend.d.ts.map +1 -0
  224. package/dist/generated/config-schema.d.ts +967 -57
  225. package/dist/generated/config-schema.d.ts.map +1 -1
  226. package/dist/generated/config-schema.json +1033 -56
  227. package/dist/github-check-service.d.ts +4 -6
  228. package/dist/github-check-service.d.ts.map +1 -1
  229. package/dist/github-comments.d.ts +2 -4
  230. package/dist/github-comments.d.ts.map +1 -1
  231. package/dist/index.d.ts.map +1 -1
  232. package/dist/index.js +134327 -99004
  233. package/dist/liquid-extensions.d.ts.map +1 -1
  234. package/dist/logger.d.ts +2 -0
  235. package/dist/logger.d.ts.map +1 -1
  236. package/dist/memory-store.d.ts +6 -0
  237. package/dist/memory-store.d.ts.map +1 -1
  238. package/dist/output/assistant-json/template.liquid +0 -0
  239. package/dist/output/traces/run-2026-01-20T19-22-58-043Z.ndjson +138 -0
  240. package/dist/output/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -0
  241. package/dist/output-formatters.d.ts +1 -1
  242. package/dist/output-formatters.d.ts.map +1 -1
  243. package/dist/providers/ai-check-provider.d.ts +12 -0
  244. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  245. package/dist/providers/check-provider-registry.d.ts +6 -0
  246. package/dist/providers/check-provider-registry.d.ts.map +1 -1
  247. package/dist/providers/check-provider.interface.d.ts +43 -1
  248. package/dist/providers/check-provider.interface.d.ts.map +1 -1
  249. package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
  250. package/dist/providers/command-check-provider.d.ts +1 -1
  251. package/dist/providers/command-check-provider.d.ts.map +1 -1
  252. package/dist/providers/custom-tool-executor.d.ts +61 -0
  253. package/dist/providers/custom-tool-executor.d.ts.map +1 -0
  254. package/dist/providers/git-checkout-provider.d.ts +25 -0
  255. package/dist/providers/git-checkout-provider.d.ts.map +1 -0
  256. package/dist/providers/github-ops-provider.d.ts.map +1 -1
  257. package/dist/providers/http-client-provider.d.ts +4 -4
  258. package/dist/providers/http-client-provider.d.ts.map +1 -1
  259. package/dist/providers/human-input-check-provider.d.ts +5 -0
  260. package/dist/providers/human-input-check-provider.d.ts.map +1 -1
  261. package/dist/providers/index.d.ts +1 -0
  262. package/dist/providers/index.d.ts.map +1 -1
  263. package/dist/providers/log-check-provider.d.ts +2 -5
  264. package/dist/providers/log-check-provider.d.ts.map +1 -1
  265. package/dist/providers/mcp-check-provider.d.ts +10 -4
  266. package/dist/providers/mcp-check-provider.d.ts.map +1 -1
  267. package/dist/providers/mcp-custom-sse-server.d.ts +66 -0
  268. package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -0
  269. package/dist/providers/memory-check-provider.d.ts +2 -8
  270. package/dist/providers/memory-check-provider.d.ts.map +1 -1
  271. package/dist/providers/script-check-provider.d.ts +25 -0
  272. package/dist/providers/script-check-provider.d.ts.map +1 -0
  273. package/dist/providers/workflow-check-provider.d.ts +56 -0
  274. package/dist/providers/workflow-check-provider.d.ts.map +1 -0
  275. package/dist/reviewer.d.ts +2 -1
  276. package/dist/reviewer.d.ts.map +1 -1
  277. package/dist/sdk/check-provider-registry-534KL5HT.mjs +27 -0
  278. package/dist/sdk/chunk-23L3QRYX.mjs +16872 -0
  279. package/dist/sdk/chunk-23L3QRYX.mjs.map +1 -0
  280. package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-3OMWVM6J.mjs} +11 -1
  281. package/dist/sdk/chunk-3OMWVM6J.mjs.map +1 -0
  282. package/dist/sdk/chunk-7UK3NIIT.mjs +482 -0
  283. package/dist/sdk/chunk-7UK3NIIT.mjs.map +1 -0
  284. package/dist/sdk/chunk-AGIZJ4UZ.mjs +173 -0
  285. package/dist/sdk/chunk-AGIZJ4UZ.mjs.map +1 -0
  286. package/dist/sdk/chunk-AIVFBIS4.mjs +1371 -0
  287. package/dist/sdk/chunk-AIVFBIS4.mjs.map +1 -0
  288. package/dist/sdk/chunk-AK6BVWIT.mjs +426 -0
  289. package/dist/sdk/chunk-AK6BVWIT.mjs.map +1 -0
  290. package/dist/sdk/chunk-AUT26LHW.mjs +139 -0
  291. package/dist/sdk/chunk-AUT26LHW.mjs.map +1 -0
  292. package/dist/sdk/chunk-BOVFH3LI.mjs +232 -0
  293. package/dist/sdk/chunk-BOVFH3LI.mjs.map +1 -0
  294. package/dist/sdk/chunk-CNX7V5JK.mjs +89 -0
  295. package/dist/sdk/chunk-CNX7V5JK.mjs.map +1 -0
  296. package/dist/sdk/chunk-HTOKWMPO.mjs +157 -0
  297. package/dist/sdk/chunk-HTOKWMPO.mjs.map +1 -0
  298. package/dist/sdk/chunk-NAW3DB3I.mjs +197 -0
  299. package/dist/sdk/chunk-NAW3DB3I.mjs.map +1 -0
  300. package/dist/sdk/chunk-O5EZDNYL.mjs +274 -0
  301. package/dist/sdk/chunk-O5EZDNYL.mjs.map +1 -0
  302. package/dist/sdk/chunk-QR7MOMJH.mjs +558 -0
  303. package/dist/sdk/chunk-QR7MOMJH.mjs.map +1 -0
  304. package/dist/sdk/chunk-QY2XYPEV.mjs +3556 -0
  305. package/dist/sdk/chunk-QY2XYPEV.mjs.map +1 -0
  306. package/dist/sdk/chunk-S2RUE2RG.mjs +145 -0
  307. package/dist/sdk/chunk-S2RUE2RG.mjs.map +1 -0
  308. package/dist/sdk/chunk-SIWNBRTK.mjs +800 -0
  309. package/dist/sdk/chunk-SIWNBRTK.mjs.map +1 -0
  310. package/dist/sdk/chunk-YSN4G6CI.mjs +146 -0
  311. package/dist/sdk/chunk-YSN4G6CI.mjs.map +1 -0
  312. package/dist/sdk/chunk-ZYAUYXSW.mjs +206 -0
  313. package/dist/sdk/chunk-ZYAUYXSW.mjs.map +1 -0
  314. package/dist/sdk/command-executor-TYUV6HUS.mjs +14 -0
  315. package/dist/sdk/config-YNC2EOOT.mjs +16 -0
  316. package/dist/sdk/config-merger-PX3WIT57.mjs +10 -0
  317. package/dist/sdk/event-bus-5BEVPQ6T.mjs +35 -0
  318. package/dist/sdk/event-bus-5BEVPQ6T.mjs.map +1 -0
  319. package/dist/sdk/failure-condition-evaluator-YGTF2GHG.mjs +17 -0
  320. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +458 -0
  321. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +1 -0
  322. package/dist/sdk/github-frontend-SIAEOCON.mjs +1420 -0
  323. package/dist/sdk/github-frontend-SIAEOCON.mjs.map +1 -0
  324. package/dist/sdk/host-DXUYTNMU.mjs +52 -0
  325. package/dist/sdk/host-DXUYTNMU.mjs.map +1 -0
  326. package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-PKWCKK7E.mjs} +8 -2
  327. package/dist/sdk/memory-store-XGBB7LX7.mjs +12 -0
  328. package/dist/sdk/memory-store-XGBB7LX7.mjs.map +1 -0
  329. package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
  330. package/dist/sdk/metrics-7PP3EJUH.mjs.map +1 -0
  331. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
  332. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
  333. package/dist/sdk/prompt-state-YRJY6QAL.mjs +16 -0
  334. package/dist/sdk/prompt-state-YRJY6QAL.mjs.map +1 -0
  335. package/dist/sdk/renderer-schema-LPKN5UJS.mjs +51 -0
  336. package/dist/sdk/renderer-schema-LPKN5UJS.mjs.map +1 -0
  337. package/dist/sdk/routing-6N45MJ4F.mjs +24 -0
  338. package/dist/sdk/routing-6N45MJ4F.mjs.map +1 -0
  339. package/dist/sdk/sdk.d.mts +541 -22
  340. package/dist/sdk/sdk.d.ts +541 -22
  341. package/dist/sdk/sdk.js +27963 -16505
  342. package/dist/sdk/sdk.js.map +1 -1
  343. package/dist/sdk/sdk.mjs +1116 -2169
  344. package/dist/sdk/sdk.mjs.map +1 -1
  345. package/dist/sdk/session-registry-4E6YRQ77.mjs +10 -0
  346. package/dist/sdk/session-registry-4E6YRQ77.mjs.map +1 -0
  347. package/dist/sdk/slack-frontend-BVKW3GD5.mjs +735 -0
  348. package/dist/sdk/slack-frontend-BVKW3GD5.mjs.map +1 -0
  349. package/dist/sdk/trace-helpers-VP6QYVBX.mjs +23 -0
  350. package/dist/sdk/trace-helpers-VP6QYVBX.mjs.map +1 -0
  351. package/dist/sdk/{tracer-init-WC75N5NW.mjs → tracer-init-GSLPPLCD.mjs} +2 -2
  352. package/dist/sdk/tracer-init-GSLPPLCD.mjs.map +1 -0
  353. package/dist/sdk/workflow-registry-R6KSACFR.mjs +12 -0
  354. package/dist/sdk/workflow-registry-R6KSACFR.mjs.map +1 -0
  355. package/dist/sdk.d.ts.map +1 -1
  356. package/dist/slack/adapter.d.ts +36 -0
  357. package/dist/slack/adapter.d.ts.map +1 -0
  358. package/dist/slack/cache-prewarmer.d.ts +31 -0
  359. package/dist/slack/cache-prewarmer.d.ts.map +1 -0
  360. package/dist/slack/client.d.ts +77 -0
  361. package/dist/slack/client.d.ts.map +1 -0
  362. package/dist/slack/markdown.d.ts +45 -0
  363. package/dist/slack/markdown.d.ts.map +1 -0
  364. package/dist/slack/prompt-state.d.ts +33 -0
  365. package/dist/slack/prompt-state.d.ts.map +1 -0
  366. package/dist/slack/rate-limiter.d.ts +56 -0
  367. package/dist/slack/rate-limiter.d.ts.map +1 -0
  368. package/dist/slack/signature.d.ts +2 -0
  369. package/dist/slack/signature.d.ts.map +1 -0
  370. package/dist/slack/socket-runner.d.ts +42 -0
  371. package/dist/slack/socket-runner.d.ts.map +1 -0
  372. package/dist/slack/thread-cache.d.ts +51 -0
  373. package/dist/slack/thread-cache.d.ts.map +1 -0
  374. package/dist/snapshot-store.d.ts +59 -0
  375. package/dist/snapshot-store.d.ts.map +1 -0
  376. package/dist/state-machine/context/build-engine-context.d.ts +17 -0
  377. package/dist/state-machine/context/build-engine-context.d.ts.map +1 -0
  378. package/dist/state-machine/dispatch/dependency-gating.d.ts +12 -0
  379. package/dist/state-machine/dispatch/dependency-gating.d.ts.map +1 -0
  380. package/dist/state-machine/dispatch/execution-invoker.d.ts +14 -0
  381. package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -0
  382. package/dist/state-machine/dispatch/foreach-processor.d.ts +8 -0
  383. package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -0
  384. package/dist/state-machine/dispatch/history-snapshot.d.ts +8 -0
  385. package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -0
  386. package/dist/state-machine/dispatch/on-init-handlers.d.ts +43 -0
  387. package/dist/state-machine/dispatch/on-init-handlers.d.ts.map +1 -0
  388. package/dist/state-machine/dispatch/renderer-schema.d.ts +8 -0
  389. package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -0
  390. package/dist/state-machine/dispatch/stats-manager.d.ts +15 -0
  391. package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -0
  392. package/dist/state-machine/dispatch/template-renderer.d.ts +7 -0
  393. package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -0
  394. package/dist/state-machine/execution/summary.d.ts +8 -0
  395. package/dist/state-machine/execution/summary.d.ts.map +1 -0
  396. package/dist/state-machine/runner.d.ts +79 -0
  397. package/dist/state-machine/runner.d.ts.map +1 -0
  398. package/dist/state-machine/states/check-running.d.ts +14 -0
  399. package/dist/state-machine/states/check-running.d.ts.map +1 -0
  400. package/dist/state-machine/states/completed.d.ts +12 -0
  401. package/dist/state-machine/states/completed.d.ts.map +1 -0
  402. package/dist/state-machine/states/error.d.ts +11 -0
  403. package/dist/state-machine/states/error.d.ts.map +1 -0
  404. package/dist/state-machine/states/init.d.ts +11 -0
  405. package/dist/state-machine/states/init.d.ts.map +1 -0
  406. package/dist/state-machine/states/level-dispatch.d.ts +17 -0
  407. package/dist/state-machine/states/level-dispatch.d.ts.map +1 -0
  408. package/dist/state-machine/states/plan-ready.d.ts +12 -0
  409. package/dist/state-machine/states/plan-ready.d.ts.map +1 -0
  410. package/dist/state-machine/states/routing.d.ts +52 -0
  411. package/dist/state-machine/states/routing.d.ts.map +1 -0
  412. package/dist/state-machine/states/wave-planning.d.ts +14 -0
  413. package/dist/state-machine/states/wave-planning.d.ts.map +1 -0
  414. package/dist/state-machine/workflow-projection.d.ts +47 -0
  415. package/dist/state-machine/workflow-projection.d.ts.map +1 -0
  416. package/dist/state-machine-execution-engine.d.ts +159 -0
  417. package/dist/state-machine-execution-engine.d.ts.map +1 -0
  418. package/dist/telemetry/opentelemetry.d.ts.map +1 -1
  419. package/dist/telemetry/state-capture.d.ts +5 -0
  420. package/dist/telemetry/state-capture.d.ts.map +1 -1
  421. package/dist/test-runner/assertions.d.ts +59 -0
  422. package/dist/test-runner/assertions.d.ts.map +1 -0
  423. package/dist/test-runner/core/environment.d.ts +8 -0
  424. package/dist/test-runner/core/environment.d.ts.map +1 -0
  425. package/dist/test-runner/core/fixture.d.ts +3 -0
  426. package/dist/test-runner/core/fixture.d.ts.map +1 -0
  427. package/dist/test-runner/core/flow-stage.d.ts +32 -0
  428. package/dist/test-runner/core/flow-stage.d.ts.map +1 -0
  429. package/dist/test-runner/core/mocks.d.ts +8 -0
  430. package/dist/test-runner/core/mocks.d.ts.map +1 -0
  431. package/dist/test-runner/core/test-execution-wrapper.d.ts +18 -0
  432. package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -0
  433. package/dist/test-runner/evaluators.d.ts +45 -0
  434. package/dist/test-runner/evaluators.d.ts.map +1 -0
  435. package/dist/test-runner/fixture-loader.d.ts +30 -0
  436. package/dist/test-runner/fixture-loader.d.ts.map +1 -0
  437. package/dist/test-runner/index.d.ts +127 -0
  438. package/dist/test-runner/index.d.ts.map +1 -0
  439. package/dist/test-runner/recorders/github-recorder.d.ts +23 -0
  440. package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -0
  441. package/dist/test-runner/recorders/global-recorder.d.ts +4 -0
  442. package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -0
  443. package/dist/test-runner/recorders/slack-recorder.d.ts +17 -0
  444. package/dist/test-runner/recorders/slack-recorder.d.ts.map +1 -0
  445. package/dist/test-runner/utils/selectors.d.ts +2 -0
  446. package/dist/test-runner/utils/selectors.d.ts.map +1 -0
  447. package/dist/test-runner/validator.d.ts +8 -0
  448. package/dist/test-runner/validator.d.ts.map +1 -0
  449. package/dist/traces/run-2026-01-20T19-22-58-043Z.ndjson +138 -0
  450. package/dist/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -0
  451. package/dist/types/bot.d.ts +109 -0
  452. package/dist/types/bot.d.ts.map +1 -0
  453. package/dist/types/cli.d.ts +8 -1
  454. package/dist/types/cli.d.ts.map +1 -1
  455. package/dist/types/config.d.ts +459 -9
  456. package/dist/types/config.d.ts.map +1 -1
  457. package/dist/types/engine.d.ts +177 -0
  458. package/dist/types/engine.d.ts.map +1 -0
  459. package/dist/types/execution.d.ts +73 -0
  460. package/dist/types/execution.d.ts.map +1 -0
  461. package/dist/types/git-checkout.d.ts +76 -0
  462. package/dist/types/git-checkout.d.ts.map +1 -0
  463. package/dist/types/github.d.ts +51 -0
  464. package/dist/types/github.d.ts.map +1 -0
  465. package/dist/types/workflow.d.ts +237 -0
  466. package/dist/types/workflow.d.ts.map +1 -0
  467. package/dist/utils/command-executor.d.ts +43 -0
  468. package/dist/utils/command-executor.d.ts.map +1 -0
  469. package/dist/utils/comment-metadata.d.ts +21 -0
  470. package/dist/utils/comment-metadata.d.ts.map +1 -0
  471. package/dist/utils/config-loader.d.ts.map +1 -1
  472. package/dist/utils/config-merger.d.ts.map +1 -1
  473. package/dist/utils/env-exposure.d.ts +3 -0
  474. package/dist/utils/env-exposure.d.ts.map +1 -0
  475. package/dist/utils/file-exclusion.d.ts.map +1 -1
  476. package/dist/utils/interactive-prompt.d.ts +1 -1
  477. package/dist/utils/interactive-prompt.d.ts.map +1 -1
  478. package/dist/utils/json-text-extractor.d.ts +17 -0
  479. package/dist/utils/json-text-extractor.d.ts.map +1 -0
  480. package/dist/utils/sandbox.d.ts +10 -0
  481. package/dist/utils/sandbox.d.ts.map +1 -1
  482. package/dist/utils/script-memory-ops.d.ts +21 -0
  483. package/dist/utils/script-memory-ops.d.ts.map +1 -0
  484. package/dist/utils/template-context.d.ts +8 -0
  485. package/dist/utils/template-context.d.ts.map +1 -0
  486. package/dist/utils/tracer-init.d.ts.map +1 -1
  487. package/dist/utils/workspace-manager.d.ts +118 -0
  488. package/dist/utils/workspace-manager.d.ts.map +1 -0
  489. package/dist/utils/worktree-cleanup.d.ts +33 -0
  490. package/dist/utils/worktree-cleanup.d.ts.map +1 -0
  491. package/dist/utils/worktree-manager.d.ts +153 -0
  492. package/dist/utils/worktree-manager.d.ts.map +1 -0
  493. package/dist/webhook-server.d.ts +3 -3
  494. package/dist/webhook-server.d.ts.map +1 -1
  495. package/dist/workflow-executor.d.ts +81 -0
  496. package/dist/workflow-executor.d.ts.map +1 -0
  497. package/dist/workflow-registry.d.ts +79 -0
  498. package/dist/workflow-registry.d.ts.map +1 -0
  499. package/package.json +12 -5
  500. package/dist/output/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  501. package/dist/sdk/check-execution-engine-2YYKUUSH.mjs +0 -11
  502. package/dist/sdk/check-execution-engine-6QJXYYON.mjs +0 -11
  503. package/dist/sdk/check-execution-engine-PJZ4ZOKG.mjs +0 -11
  504. package/dist/sdk/chunk-33QVZ2D4.mjs +0 -316
  505. package/dist/sdk/chunk-33QVZ2D4.mjs.map +0 -1
  506. package/dist/sdk/chunk-B5QBV2QJ.mjs +0 -752
  507. package/dist/sdk/chunk-B5QBV2QJ.mjs.map +0 -1
  508. package/dist/sdk/chunk-BVFNRCHT.mjs +0 -14129
  509. package/dist/sdk/chunk-BVFNRCHT.mjs.map +0 -1
  510. package/dist/sdk/chunk-KWZW23FG.mjs +0 -14129
  511. package/dist/sdk/chunk-KWZW23FG.mjs.map +0 -1
  512. package/dist/sdk/chunk-O4RP4BRH.mjs +0 -14092
  513. package/dist/sdk/chunk-O4RP4BRH.mjs.map +0 -1
  514. package/dist/sdk/chunk-TUTOLSFV.mjs.map +0 -1
  515. package/dist/sdk/chunk-U5D2LY66.mjs +0 -245
  516. package/dist/sdk/chunk-U5D2LY66.mjs.map +0 -1
  517. package/dist/sdk/chunk-U7X54EMV.mjs +0 -331
  518. package/dist/sdk/chunk-U7X54EMV.mjs.map +0 -1
  519. package/dist/sdk/config-merger-TWUBWFC2.mjs +0 -8
  520. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs +0 -61
  521. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs.map +0 -1
  522. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs +0 -61
  523. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs.map +0 -1
  524. package/dist/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  525. /package/dist/sdk/{check-execution-engine-2YYKUUSH.mjs.map → check-provider-registry-534KL5HT.mjs.map} +0 -0
  526. /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → command-executor-TYUV6HUS.mjs.map} +0 -0
  527. /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → config-YNC2EOOT.mjs.map} +0 -0
  528. /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
  529. /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → failure-condition-evaluator-YGTF2GHG.mjs.map} +0 -0
  530. /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → liquid-extensions-PKWCKK7E.mjs.map} +0 -0
@@ -0,0 +1,173 @@
1
+ version: "1.0"
2
+
3
+ # Example configuration showing how to use if conditions to control check execution
4
+ # The if condition determines whether a check should run based on context
5
+
6
+ steps:
7
+ # Run only on main branch
8
+ production-check:
9
+ type: ai
10
+ schema: code-review
11
+ prompt: "Check production readiness and deployment safety"
12
+ on: [pr_opened, pr_updated]
13
+ if: 'branch == "main" || baseBranch == "main"'
14
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
15
+
16
+ # Run only when there are file changes
17
+ incremental-review:
18
+ type: ai
19
+ schema: code-review
20
+ prompt: "Review changed files for issues"
21
+ on: [pr_opened, pr_updated]
22
+ if: "filesCount > 0"
23
+ fail_if: "output.issues.some(i => i.severity === 'error')"
24
+
25
+ # Run only on feature branches
26
+ feature-validation:
27
+ type: ai
28
+ schema: code-review
29
+ prompt: "Validate feature implementation"
30
+ on: [pr_opened, pr_updated]
31
+ if: 'startsWith(branch, "feature/")'
32
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
33
+
34
+ # Run only in CI environment
35
+ ci-only-check:
36
+ type: ai
37
+ schema: security
38
+ prompt: "Comprehensive security scan"
39
+ on: [pr_opened, pr_updated]
40
+ if: 'env.CI == "true"'
41
+ fail_if: "output.issues.length > 0"
42
+
43
+ # Run when specific files are changed
44
+ auth-security-check:
45
+ type: ai
46
+ schema: security
47
+ prompt: "Security review for authentication changes"
48
+ on: [pr_opened, pr_updated]
49
+ # Run when auth-related files are modified
50
+ if: 'contains(filesChanged, "auth") || contains(filesChanged, "login") || contains(filesChanged, "session")'
51
+ fail_if: "output.issues.length > 0"
52
+
53
+ # Complex condition - run on main or when many files changed
54
+ comprehensive-review:
55
+ type: ai
56
+ schema: code-review
57
+ prompt: "Comprehensive code review"
58
+ on: [pr_opened, pr_updated]
59
+ # Run on main branch OR when more than 10 files changed
60
+ if: 'branch == "main" || filesCount > 10'
61
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
62
+
63
+ # Always run (default behavior)
64
+ standard-check:
65
+ type: ai
66
+ schema: code-review
67
+ prompt: "Standard code review"
68
+ on: [pr_opened, pr_updated]
69
+ if: "always()" # Explicitly always run
70
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
71
+
72
+ # Never run (can be enabled by removing/changing condition)
73
+ disabled-check:
74
+ type: ai
75
+ schema: code-review
76
+ prompt: "Currently disabled check"
77
+ on: [pr_opened, pr_updated]
78
+ if: "!always()" # Never run
79
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
80
+
81
+ # Dependency-based execution
82
+ security-check:
83
+ type: ai
84
+ schema: security
85
+ prompt: "Security vulnerability scan"
86
+ on: [pr_opened, pr_updated]
87
+ if: "always()"
88
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
89
+
90
+ performance-check:
91
+ type: ai
92
+ schema: code-review
93
+ prompt: "Performance analysis"
94
+ on: [pr_opened, pr_updated]
95
+ if: "always()"
96
+ fail_if: "output.issues.filter(i => i.severity === 'error').length > 2"
97
+
98
+ # Run only if security check found issues
99
+ security-remediation:
100
+ type: ai
101
+ schema: code-review
102
+ prompt: "Suggest security fixes"
103
+ on: [pr_opened, pr_updated]
104
+ depends_on: [security-check]
105
+ # Only run if security check found issues (use length() function)
106
+ if: 'outputs["security-check"] && length(outputs["security-check"].issues) > 0'
107
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
108
+
109
+ # Run only if all previous checks passed
110
+ final-validation:
111
+ type: ai
112
+ schema: code-review
113
+ prompt: "Final validation before merge"
114
+ on: [pr_opened, pr_updated]
115
+ depends_on: [security-check, performance-check]
116
+ # Only run if both dependencies passed (check for specific severities)
117
+ if: |
118
+ outputs["security-check"] &&
119
+ !hasIssue(outputs["security-check"].issues, "severity", "critical") &&
120
+ !hasIssue(outputs["security-check"].issues, "severity", "error") &&
121
+ outputs["performance-check"] &&
122
+ !hasIssue(outputs["performance-check"].issues, "severity", "critical") &&
123
+ !hasIssue(outputs["performance-check"].issues, "severity", "error")
124
+ fail_if: "output.issues.length > 0"
125
+
126
+ # Environment-specific checks
127
+ staging-check:
128
+ type: ai
129
+ schema: code-review
130
+ prompt: "Staging environment validation"
131
+ on: [pr_opened, pr_updated]
132
+ # Run only in staging environment
133
+ if: 'env.ENVIRONMENT == "staging"'
134
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
135
+
136
+ # Time-based or conditional skip
137
+ weekend-check:
138
+ type: ai
139
+ schema: code-review
140
+ prompt: "Weekend maintenance check"
141
+ on: [pr_opened, pr_updated]
142
+ # Could be used with env vars set by CI to control execution
143
+ if: 'env.RUN_WEEKEND_CHECKS == "true"'
144
+ fail_if: "output.issues.some(i => i.severity === 'critical')"
145
+
146
+ output:
147
+ pr_comment:
148
+ format: markdown
149
+ group_by: check
150
+ collapse: true
151
+
152
+ # Available variables in if conditions:
153
+ # - checkName: Name of the current check
154
+ # - branch: Current branch name
155
+ # - baseBranch: Target/base branch name
156
+ # - filesChanged: Array of changed file paths
157
+ # - filesCount: Number of changed files
158
+ # - event: Event that triggered the check (e.g., "pr_opened", "manual")
159
+ # - env: Environment variables
160
+ # - outputs: Raw ReviewSummary objects from previous checks (for dependent checks)
161
+ # Example: outputs["check-name"].issues, outputs["check-name"].suggestions
162
+ # - metadata: Additional metadata (hasChanges, branch, event, checkName)
163
+
164
+ # Available functions (GitHub Actions-style):
165
+ # - contains(haystack, needle): Check if string/array contains value
166
+ # - startsWith(str, prefix): Check if string starts with prefix
167
+ # - endsWith(str, suffix): Check if string ends with suffix
168
+ # - always(): Always returns true
169
+ # - length(array|string|object): Get length of array, string, or object keys
170
+ # - hasIssue(issues, field, value): Check if any issue has field matching value
171
+ # - countIssues(issues, field, value): Count issues with field matching value
172
+ # - hasFileMatching(issues, pattern): Check if any issue file contains pattern
173
+ # - Standard operators: ==, !=, >, <, >=, <=, &&, ||, !
@@ -0,0 +1,56 @@
1
+ # Simple Jira MCP Example
2
+ # Workflow: JQL Query → Pick One Issue → AI Analysis → Add Label
3
+
4
+ version: "1.0"
5
+
6
+ ai_provider: anthropic
7
+ ai_model: claude-3-sonnet
8
+
9
+ # Jira MCP Server
10
+ ai_mcp_servers:
11
+ jira:
12
+ command: "npx"
13
+ args: ["-y", "@aashari/mcp-server-atlassian-jira"]
14
+ env:
15
+ JIRA_BASE_URL: "${JIRA_BASE_URL}" # https://company.atlassian.net
16
+ JIRA_EMAIL: "${JIRA_EMAIL}" # user@company.com
17
+ JIRA_API_TOKEN: "${JIRA_API_TOKEN}" # your_api_token
18
+
19
+ steps:
20
+ jira_analyze_and_label:
21
+ type: ai
22
+ prompt: |
23
+ Perform this exact Jira workflow:
24
+
25
+ 1. **Query Issues**: Use JQL "project = DEV AND status = 'To Do' AND priority = High ORDER BY created DESC" to find high-priority todo items
26
+
27
+ 2. **Pick First Issue**: Select the first (most recently created) issue from the results
28
+
29
+ 3. **AI Analysis**: Analyze the selected issue for:
30
+ - Technical complexity (1-10 scale)
31
+ - Implementation risk (Low/Medium/High)
32
+ - Estimated effort in story points (1,2,3,5,8)
33
+ - Required skills/expertise
34
+
35
+ 4. **Add Label**: Based on analysis, add ONE of these labels:
36
+ - "quick-win" (complexity ≤ 3, low risk)
37
+ - "standard-task" (complexity 4-6, low-medium risk)
38
+ - "complex-work" (complexity ≥ 7 or high risk)
39
+
40
+ 5. **Report**: Output the issue key, analysis summary, and label added.
41
+
42
+ Use the Jira MCP tools to execute each step. Be concise but thorough.
43
+
44
+ on: ["manual"]
45
+ tags: ["jira", "simple"]
46
+
47
+ # Environment setup required:
48
+ # export JIRA_BASE_URL="https://your-company.atlassian.net"
49
+ # export JIRA_EMAIL="your.email@company.com"
50
+ # export JIRA_API_TOKEN="your_api_token"
51
+ # export ANTHROPIC_API_KEY="your_anthropic_key"
52
+
53
+ output:
54
+ markdown:
55
+ enabled: true
56
+ file: "./jira-analysis.md"
@@ -0,0 +1,166 @@
1
+ # Simple Jira MCP workflow example
2
+ # Demonstrates: JQL query → pick issue → AI analysis → add label
3
+
4
+ version: "1.0"
5
+
6
+ ai_provider: anthropic
7
+ ai_model: claude-3-sonnet
8
+
9
+ # Jira MCP server configuration
10
+ ai_mcp_servers:
11
+ jira:
12
+ command: "npx"
13
+ args: ["-y", "@aashari/mcp-server-atlassian-jira"]
14
+ env:
15
+ JIRA_BASE_URL: "${JIRA_BASE_URL}"
16
+ JIRA_EMAIL: "${JIRA_EMAIL}"
17
+ JIRA_API_TOKEN: "${JIRA_API_TOKEN}"
18
+
19
+ steps:
20
+ # Main workflow: JQL → Pick → Analyze → Label
21
+ jira_issue_analysis_workflow:
22
+ type: ai
23
+ prompt: |
24
+ Execute this Jira workflow using the available MCP tools:
25
+
26
+ ## Step 1: Query Issues with JQL
27
+ Search for issues using JQL: "project = DEV AND status = 'To Do' AND priority IN (High, Highest) ORDER BY created DESC"
28
+
29
+ Limit results to maximum 10 issues for analysis.
30
+
31
+ ## Step 2: Pick One Issue
32
+ From the search results:
33
+ 1. Review each issue's summary and description
34
+ 2. Select the MOST RECENTLY CREATED issue that appears to be:
35
+ - Well-defined (has clear description)
36
+ - Not blocked by dependencies
37
+ - Suitable for immediate analysis
38
+
39
+ ## Step 3: Deep Analysis
40
+ For the selected issue, perform comprehensive analysis:
41
+
42
+ ### Technical Analysis:
43
+ - **Complexity Score** (1-10): Based on technical requirements
44
+ - **Effort Estimation**: Story points (1, 2, 3, 5, 8, 13)
45
+ - **Risk Assessment**: Low/Medium/High
46
+ - **Component Impact**: Which system components affected
47
+
48
+ ### Business Analysis:
49
+ - **Business Value**: Critical/High/Medium/Low
50
+ - **User Impact**: How many users affected
51
+ - **Urgency Level**: Immediate/Soon/Later
52
+ - **Dependencies**: What blocks or depends on this
53
+
54
+ ### Implementation Analysis:
55
+ - **Approach Recommendation**: Suggested implementation strategy
56
+ - **Testing Requirements**: What tests are needed
57
+ - **Rollback Plan**: How to revert if needed
58
+ - **Documentation Needs**: What docs need updating
59
+
60
+ ## Step 4: Add Analysis Labels
61
+ Based on your analysis, add appropriate labels to the issue:
62
+
63
+ **Always add:**
64
+ - "ai-analyzed"
65
+ - Current date label: "analyzed-YYYY-MM-DD"
66
+
67
+ **Complexity labels (pick one):**
68
+ - "simple-fix" (score 1-3)
69
+ - "moderate-complexity" (score 4-6)
70
+ - "complex-implementation" (score 7-10)
71
+
72
+ **Priority labels (pick one):**
73
+ - "urgent-fix" (critical business impact)
74
+ - "high-priority" (important but not urgent)
75
+ - "normal-priority" (standard development)
76
+
77
+ **Risk labels (pick one):**
78
+ - "low-risk" (safe to implement)
79
+ - "medium-risk" (needs careful testing)
80
+ - "high-risk" (potential system impact)
81
+
82
+ **Component labels (pick relevant ones):**
83
+ - "frontend", "backend", "database", "api", "integration"
84
+
85
+ ## Step 5: Add Analysis Comment
86
+ Add a comment to the issue with:
87
+ ```
88
+ 🤖 AI Analysis Summary
89
+
90
+ **Complexity:** [score]/10 - [reasoning]
91
+ **Effort:** [story points] points
92
+ **Risk:** [level] - [explanation]
93
+ **Priority:** [level] - [justification]
94
+
95
+ **Recommended Approach:**
96
+ [implementation strategy]
97
+
98
+ **Key Considerations:**
99
+ - [consideration 1]
100
+ - [consideration 2]
101
+ - [consideration 3]
102
+
103
+ **Testing Focus:**
104
+ [testing recommendations]
105
+
106
+ ---
107
+ *Analysis performed by Visor AI on [timestamp]*
108
+ ```
109
+
110
+ ## Step 6: Report Results
111
+ Provide a summary of:
112
+ - JQL query used and results count
113
+ - Selected issue key and title
114
+ - Analysis summary
115
+ - Labels added
116
+ - Comment added
117
+ - Any errors or warnings
118
+
119
+ Use the Jira MCP tools for all interactions. Be specific about which tools you're calling and with what parameters.
120
+
121
+ on: ["manual"]
122
+ tags: ["jira", "workflow", "analysis"]
123
+
124
+ # Alternative: Analyze specific issue by key (simpler version)
125
+ analyze_jira_issue_by_key:
126
+ type: ai
127
+ prompt: |
128
+ Analyze a specific Jira issue using MCP tools:
129
+
130
+ ## Instructions:
131
+ If an issue key is provided in the context (e.g., "DEV-123"), use it.
132
+ Otherwise, use this default JQL to find an issue: "project = DEV AND status = 'To Do' ORDER BY priority DESC, created DESC"
133
+
134
+ ## Analysis Process:
135
+ 1. **Get Issue Details**: Retrieve full issue information
136
+ 2. **Evaluate Complexity**: Rate 1-10 based on description/requirements
137
+ 3. **Assess Risk**: Consider implementation challenges
138
+ 4. **Estimate Effort**: Suggest story points
139
+ 5. **Add Labels**:
140
+ - "ai-quick-analysis"
141
+ - Complexity: "simple" or "complex"
142
+ - Risk: "safe" or "risky"
143
+ 6. **Add Comment**: Brief analysis summary
144
+
145
+ ## Expected Output:
146
+ - Issue analyzed: [KEY] - [TITLE]
147
+ - Complexity: [rating]/10
148
+ - Risk: [level]
149
+ - Effort: [points] story points
150
+ - Labels added: [list]
151
+ - Analysis reasoning: [brief explanation]
152
+
153
+ on: ["manual"]
154
+ tags: ["jira", "quick-analysis"]
155
+
156
+ # Required environment variables:
157
+ # JIRA_BASE_URL=https://your-company.atlassian.net
158
+ # JIRA_EMAIL=your.email@company.com
159
+ # JIRA_API_TOKEN=your_jira_api_token
160
+ # ANTHROPIC_API_KEY=your_anthropic_key
161
+
162
+ output:
163
+ json:
164
+ enabled: true
165
+ markdown:
166
+ enabled: true
@@ -0,0 +1,182 @@
1
+ # Visor configuration for Jira workflow automation using MCP
2
+ # This example demonstrates:
3
+ # 1. Listing Jira issues using JQL
4
+ # 2. AI analysis of selected issues
5
+ # 3. Adding labels to issues based on analysis
6
+
7
+ version: "1.0"
8
+
9
+ # Global AI configuration
10
+ ai_provider: anthropic
11
+ ai_model: claude-3-sonnet
12
+
13
+ # Global MCP servers - Jira integration
14
+ ai_mcp_servers:
15
+ jira:
16
+ command: "npx"
17
+ args: ["-y", "@aashari/mcp-server-atlassian-jira"]
18
+ env:
19
+ JIRA_BASE_URL: "${JIRA_BASE_URL}" # https://your-company.atlassian.net
20
+ JIRA_EMAIL: "${JIRA_EMAIL}" # your-email@company.com
21
+ JIRA_API_TOKEN: "${JIRA_API_TOKEN}" # Your Jira API token
22
+
23
+ steps:
24
+ # Step 1: Query and analyze high-priority bugs
25
+ analyze_priority_bugs:
26
+ type: ai
27
+ prompt: |
28
+ Use the Jira MCP tools to perform the following workflow:
29
+
30
+ 1. Search for high-priority bugs using JQL: "project = DEV AND issuetype = Bug AND priority = High AND status != Closed"
31
+
32
+ 2. For each issue found:
33
+ - Get detailed information about the issue
34
+ - Analyze the issue description, summary, and comments
35
+ - Evaluate the complexity and impact based on:
36
+ * Technical complexity indicators
37
+ * Business impact keywords
38
+ * Time sensitivity markers
39
+ * Dependencies mentioned
40
+
41
+ 3. Classify each issue into categories:
42
+ - CRITICAL: Needs immediate attention (production impact, security, data loss)
43
+ - COMPLEX: Requires senior developer (architecture, performance, integration)
44
+ - ROUTINE: Standard bug fix (UI, validation, minor functionality)
45
+ - BLOCKED: Waiting for dependencies or more information
46
+
47
+ 4. For each analyzed issue, add appropriate labels:
48
+ - "ai-analyzed" (always add this)
49
+ - "critical-bug" for CRITICAL issues
50
+ - "complex-implementation" for COMPLEX issues
51
+ - "quick-fix" for ROUTINE issues
52
+ - "needs-clarification" for BLOCKED issues
53
+
54
+ 5. Provide a summary report of:
55
+ - Total issues analyzed
56
+ - Distribution by category
57
+ - Top 3 most critical issues with reasoning
58
+ - Recommended next actions
59
+
60
+ Use the available Jira MCP tools to search, retrieve, and update issues.
61
+ on: ["manual"] # Trigger manually or via cron
62
+ tags: ["jira", "analysis", "priority"]
63
+
64
+ # Step 2: Analyze specific issue by key
65
+ analyze_specific_issue:
66
+ type: ai
67
+ prompt: |
68
+ Use the Jira MCP tools to analyze a specific issue:
69
+
70
+ 1. Get the issue details for the provided issue key
71
+ 2. Perform deep analysis including:
72
+ - Root cause investigation based on description
73
+ - Impact assessment on system components
74
+ - Effort estimation (story points recommendation)
75
+ - Risk assessment for implementation
76
+ - Suggested implementation approach
77
+
78
+ 3. Based on analysis, add appropriate labels:
79
+ - Effort: "1-point", "3-points", "5-points", "8-points"
80
+ - Risk: "low-risk", "medium-risk", "high-risk"
81
+ - Component: "frontend", "backend", "database", "integration"
82
+ - Priority: "expedite", "normal", "defer"
83
+
84
+ 4. If the issue is critical or complex, also:
85
+ - Add comment with AI analysis summary
86
+ - Set appropriate priority if not already set
87
+ - Suggest assignee if possible
88
+
89
+ Provide detailed reasoning for all assessments and actions taken.
90
+ on: ["manual"]
91
+ tags: ["jira", "deep-analysis", "individual"]
92
+
93
+ # Step 3: Sprint planning assistant
94
+ sprint_planning_analysis:
95
+ type: ai
96
+ prompt: |
97
+ Use Jira MCP tools to assist with sprint planning:
98
+
99
+ 1. Query issues for upcoming sprint using JQL: "project = DEV AND sprint is EMPTY AND status = 'To Do' ORDER BY priority DESC, created ASC"
100
+
101
+ 2. For each issue, analyze:
102
+ - Story point estimation based on complexity
103
+ - Dependencies between issues
104
+ - Team capacity alignment
105
+ - Risk factors
106
+
107
+ 3. Recommend sprint composition:
108
+ - Categorize issues by complexity (Simple/Medium/Complex)
109
+ - Identify potential blockers
110
+ - Suggest issue prioritization
111
+ - Flag issues needing clarification
112
+
113
+ 4. Add planning labels:
114
+ - "sprint-ready" for well-defined issues
115
+ - "needs-refinement" for unclear requirements
116
+ - "dependency-risk" for issues with external dependencies
117
+ - "good-first-issue" for junior developer tasks
118
+
119
+ 5. Generate sprint planning report with:
120
+ - Recommended story point distribution
121
+ - Risk assessment
122
+ - Dependency mapping
123
+ - Team allocation suggestions
124
+
125
+ Use Jira MCP tools to query, analyze, and update issues accordingly.
126
+ schedule: "0 9 * * MON" # Run every Monday at 9 AM for weekly planning
127
+ on: ["schedule"]
128
+ tags: ["jira", "planning", "automation"]
129
+
130
+ # Step 4: Issue health monitoring
131
+ issue_health_monitor:
132
+ type: ai
133
+ prompt: |
134
+ Monitor issue health using Jira MCP tools:
135
+
136
+ 1. Query stale issues: "project = DEV AND status = 'In Progress' AND updated < -7d"
137
+ 2. Query blocked issues: "project = DEV AND status = Blocked"
138
+ 3. Query overdue issues: "project = DEV AND duedate < now() AND status != Done"
139
+
140
+ For each category, analyze and take action:
141
+
142
+ STALE ISSUES:
143
+ - Add "stale-issue" label
144
+ - Add comment requesting status update
145
+ - Notify stakeholders if high priority
146
+
147
+ BLOCKED ISSUES:
148
+ - Analyze blocking reasons from comments
149
+ - Add "needs-unblocking" label if actionable
150
+ - Escalate if blocked > 5 days
151
+
152
+ OVERDUE ISSUES:
153
+ - Add "overdue" label
154
+ - Assess impact and urgency
155
+ - Recommend timeline adjustment or priority change
156
+
157
+ Generate health report with:
158
+ - Issue distribution by health status
159
+ - Trending analysis (improving/degrading)
160
+ - Action items for team leads
161
+ - Automated remediation suggestions
162
+
163
+ Use Jira MCP tools for all queries and updates.
164
+ schedule: "0 10 * * MON,WED,FRI" # Run 3 times per week
165
+ on: ["schedule"]
166
+ tags: ["jira", "monitoring", "health"]
167
+
168
+ # Environment variables needed (set these in your environment):
169
+ # JIRA_BASE_URL=https://your-company.atlassian.net
170
+ # JIRA_EMAIL=your-email@company.com
171
+ # JIRA_API_TOKEN=your-jira-api-token
172
+ # ANTHROPIC_API_KEY=your-anthropic-api-key
173
+
174
+ output:
175
+ pr_comment:
176
+ enabled: false # These are Jira workflows, not PR-based
177
+ json:
178
+ enabled: true
179
+ file: "./jira-analysis-results.json"
180
+ markdown:
181
+ enabled: true
182
+ file: "./jira-analysis-report.md"
@@ -0,0 +1,119 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Example MCP Server for Code Analysis
4
+ This demonstrates how to create a custom MCP server for Visor
5
+ """
6
+
7
+ import json
8
+ import sys
9
+ import os
10
+ from typing import Dict, List, Any
11
+
12
+ class CodeAnalyzer:
13
+ """Custom code analyzer MCP server"""
14
+
15
+ def __init__(self):
16
+ self.analysis_level = os.environ.get('ANALYSIS_LEVEL', 'basic')
17
+
18
+ def analyze_complexity(self, file_path: str) -> Dict[str, Any]:
19
+ """Analyze code complexity"""
20
+ # This is a simplified example
21
+ # In reality, you would parse the code and calculate metrics
22
+ return {
23
+ "file": file_path,
24
+ "complexity": {
25
+ "cyclomatic": 5,
26
+ "cognitive": 8,
27
+ "lines_of_code": 150,
28
+ "functions": 10
29
+ },
30
+ "level": self.analysis_level
31
+ }
32
+
33
+ def find_patterns(self, file_path: str) -> List[Dict[str, Any]]:
34
+ """Find code patterns and anti-patterns"""
35
+ return [
36
+ {
37
+ "pattern": "singleton",
38
+ "location": f"{file_path}:45",
39
+ "type": "design_pattern"
40
+ },
41
+ {
42
+ "pattern": "god_object",
43
+ "location": f"{file_path}:120",
44
+ "type": "anti_pattern",
45
+ "severity": "warning"
46
+ }
47
+ ]
48
+
49
+ def suggest_refactoring(self, file_path: str) -> List[str]:
50
+ """Suggest refactoring opportunities"""
51
+ return [
52
+ "Consider extracting method at line 45-60",
53
+ "Duplicate code detected at lines 120 and 180",
54
+ "Complex conditional at line 95 could be simplified"
55
+ ]
56
+
57
+ def handle_request(request: Dict[str, Any]) -> Dict[str, Any]:
58
+ """Handle MCP protocol requests"""
59
+ analyzer = CodeAnalyzer()
60
+
61
+ method = request.get('method')
62
+ params = request.get('params', {})
63
+
64
+ if method == 'analyze_complexity':
65
+ result = analyzer.analyze_complexity(params.get('file'))
66
+ elif method == 'find_patterns':
67
+ result = analyzer.find_patterns(params.get('file'))
68
+ elif method == 'suggest_refactoring':
69
+ result = analyzer.suggest_refactoring(params.get('file'))
70
+ else:
71
+ result = {"error": f"Unknown method: {method}"}
72
+
73
+ return {
74
+ "jsonrpc": "2.0",
75
+ "id": request.get('id'),
76
+ "result": result
77
+ }
78
+
79
+ def main():
80
+ """Main entry point for MCP server"""
81
+ # Read from stdin (MCP protocol)
82
+ while True:
83
+ try:
84
+ line = sys.stdin.readline()
85
+ if not line:
86
+ break
87
+
88
+ request = json.loads(line)
89
+ response = handle_request(request)
90
+
91
+ # Write response to stdout
92
+ sys.stdout.write(json.dumps(response) + '\n')
93
+ sys.stdout.flush()
94
+
95
+ except json.JSONDecodeError as e:
96
+ error_response = {
97
+ "jsonrpc": "2.0",
98
+ "id": None,
99
+ "error": {
100
+ "code": -32700,
101
+ "message": f"Parse error: {str(e)}"
102
+ }
103
+ }
104
+ sys.stdout.write(json.dumps(error_response) + '\n')
105
+ sys.stdout.flush()
106
+ except Exception as e:
107
+ error_response = {
108
+ "jsonrpc": "2.0",
109
+ "id": None,
110
+ "error": {
111
+ "code": -32603,
112
+ "message": f"Internal error: {str(e)}"
113
+ }
114
+ }
115
+ sys.stdout.write(json.dumps(error_response) + '\n')
116
+ sys.stdout.flush()
117
+
118
+ if __name__ == "__main__":
119
+ main()