@ironbee-ai/cli 0.6.2 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +167 -39
  3. package/dist/analysis/code-changes.js.map +1 -1
  4. package/dist/analysis/cross-session.js.map +1 -1
  5. package/dist/analysis/fix-effectiveness.js.map +1 -1
  6. package/dist/analysis/time-analysis.js.map +1 -1
  7. package/dist/analysis/verdict-details.js.map +1 -1
  8. package/dist/analysis/verification-quality.js.map +1 -1
  9. package/dist/analytics/classifier.d.ts +99 -0
  10. package/dist/analytics/classifier.d.ts.map +1 -0
  11. package/dist/analytics/classifier.js +380 -0
  12. package/dist/analytics/classifier.js.map +1 -0
  13. package/dist/analytics/emit.d.ts +67 -0
  14. package/dist/analytics/emit.d.ts.map +1 -0
  15. package/dist/analytics/emit.js +901 -0
  16. package/dist/analytics/emit.js.map +1 -0
  17. package/dist/analytics/errors.d.ts +33 -0
  18. package/dist/analytics/errors.d.ts.map +1 -0
  19. package/dist/analytics/errors.js +93 -0
  20. package/dist/analytics/errors.js.map +1 -0
  21. package/dist/analytics/hook-trigger.d.ts +39 -0
  22. package/dist/analytics/hook-trigger.d.ts.map +1 -0
  23. package/dist/analytics/hook-trigger.js +127 -0
  24. package/dist/analytics/hook-trigger.js.map +1 -0
  25. package/dist/analytics/log.d.ts +44 -0
  26. package/dist/analytics/log.d.ts.map +1 -0
  27. package/dist/analytics/log.js +158 -0
  28. package/dist/analytics/log.js.map +1 -0
  29. package/dist/analytics/merge.d.ts +40 -0
  30. package/dist/analytics/merge.d.ts.map +1 -0
  31. package/dist/analytics/merge.js +527 -0
  32. package/dist/analytics/merge.js.map +1 -0
  33. package/dist/analytics/pricing.d.ts +149 -0
  34. package/dist/analytics/pricing.d.ts.map +1 -0
  35. package/dist/analytics/pricing.js +179 -0
  36. package/dist/analytics/pricing.js.map +1 -0
  37. package/dist/analytics/projection.d.ts +356 -0
  38. package/dist/analytics/projection.d.ts.map +1 -0
  39. package/dist/analytics/projection.js +2281 -0
  40. package/dist/analytics/projection.js.map +1 -0
  41. package/dist/analytics/spawn.d.ts +28 -0
  42. package/dist/analytics/spawn.d.ts.map +1 -0
  43. package/dist/analytics/spawn.js +57 -0
  44. package/dist/analytics/spawn.js.map +1 -0
  45. package/dist/analytics/state.d.ts +58 -0
  46. package/dist/analytics/state.d.ts.map +1 -0
  47. package/dist/analytics/state.js +329 -0
  48. package/dist/analytics/state.js.map +1 -0
  49. package/dist/analytics/transcript.d.ts +150 -0
  50. package/dist/analytics/transcript.d.ts.map +1 -0
  51. package/dist/analytics/transcript.js +276 -0
  52. package/dist/analytics/transcript.js.map +1 -0
  53. package/dist/analytics/types.d.ts +875 -0
  54. package/dist/analytics/types.d.ts.map +1 -0
  55. package/dist/analytics/types.js +31 -0
  56. package/dist/analytics/types.js.map +1 -0
  57. package/dist/clients/base.d.ts +21 -2
  58. package/dist/clients/base.d.ts.map +1 -1
  59. package/dist/clients/claude/commands/ironbee-verify.md +15 -7
  60. package/dist/clients/claude/fragments/command-verify.node.md +33 -0
  61. package/dist/clients/claude/fragments/rule.node.md +29 -0
  62. package/dist/clients/claude/fragments/skill.node.md +77 -0
  63. package/dist/clients/claude/hooks/activity-end.d.ts +13 -0
  64. package/dist/clients/claude/hooks/activity-end.d.ts.map +1 -0
  65. package/dist/clients/claude/hooks/activity-end.js +42 -0
  66. package/dist/clients/claude/hooks/activity-end.js.map +1 -0
  67. package/dist/clients/claude/hooks/require-verdict.d.ts +3 -2
  68. package/dist/clients/claude/hooks/require-verdict.d.ts.map +1 -1
  69. package/dist/clients/claude/hooks/require-verdict.js +6 -5
  70. package/dist/clients/claude/hooks/require-verdict.js.map +1 -1
  71. package/dist/clients/claude/hooks/require-verification.d.ts +7 -4
  72. package/dist/clients/claude/hooks/require-verification.d.ts.map +1 -1
  73. package/dist/clients/claude/hooks/require-verification.js +44 -22
  74. package/dist/clients/claude/hooks/require-verification.js.map +1 -1
  75. package/dist/clients/claude/hooks/session-end.d.ts.map +1 -1
  76. package/dist/clients/claude/hooks/session-end.js +17 -2
  77. package/dist/clients/claude/hooks/session-end.js.map +1 -1
  78. package/dist/clients/claude/hooks/session-start.d.ts.map +1 -1
  79. package/dist/clients/claude/hooks/session-start.js +2 -1
  80. package/dist/clients/claude/hooks/session-start.js.map +1 -1
  81. package/dist/clients/claude/hooks/track-action-monitor.d.ts +27 -0
  82. package/dist/clients/claude/hooks/track-action-monitor.d.ts.map +1 -0
  83. package/dist/clients/claude/hooks/track-action-monitor.js +126 -0
  84. package/dist/clients/claude/hooks/track-action-monitor.js.map +1 -0
  85. package/dist/clients/claude/hooks/track-action.d.ts.map +1 -1
  86. package/dist/clients/claude/hooks/track-action.js +29 -20
  87. package/dist/clients/claude/hooks/track-action.js.map +1 -1
  88. package/dist/clients/claude/hooks/verify-gate.d.ts.map +1 -1
  89. package/dist/clients/claude/hooks/verify-gate.js +18 -1
  90. package/dist/clients/claude/hooks/verify-gate.js.map +1 -1
  91. package/dist/clients/claude/index.d.ts +4 -1
  92. package/dist/clients/claude/index.d.ts.map +1 -1
  93. package/dist/clients/claude/index.js +171 -94
  94. package/dist/clients/claude/index.js.map +1 -1
  95. package/dist/clients/claude/rules/ironbee-verification.md +41 -33
  96. package/dist/clients/claude/skills/ironbee-verification.md +93 -76
  97. package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +18 -10
  98. package/dist/clients/cursor/fragments/command-verify.node.md +33 -0
  99. package/dist/clients/cursor/fragments/rule.node.md +29 -0
  100. package/dist/clients/cursor/fragments/skill.node.md +77 -0
  101. package/dist/clients/cursor/hooks/activity-end.d.ts +14 -0
  102. package/dist/clients/cursor/hooks/activity-end.d.ts.map +1 -0
  103. package/dist/clients/cursor/hooks/activity-end.js +45 -0
  104. package/dist/clients/cursor/hooks/activity-end.js.map +1 -0
  105. package/dist/clients/cursor/hooks/require-verdict.d.ts +1 -1
  106. package/dist/clients/cursor/hooks/require-verdict.js +4 -4
  107. package/dist/clients/cursor/hooks/require-verification.d.ts.map +1 -1
  108. package/dist/clients/cursor/hooks/require-verification.js +42 -16
  109. package/dist/clients/cursor/hooks/require-verification.js.map +1 -1
  110. package/dist/clients/cursor/hooks/session-end.d.ts.map +1 -1
  111. package/dist/clients/cursor/hooks/session-end.js +18 -2
  112. package/dist/clients/cursor/hooks/session-end.js.map +1 -1
  113. package/dist/clients/cursor/hooks/session-start.d.ts.map +1 -1
  114. package/dist/clients/cursor/hooks/session-start.js +2 -1
  115. package/dist/clients/cursor/hooks/session-start.js.map +1 -1
  116. package/dist/clients/cursor/hooks/track-action-monitor.d.ts +27 -0
  117. package/dist/clients/cursor/hooks/track-action-monitor.d.ts.map +1 -0
  118. package/dist/clients/cursor/hooks/track-action-monitor.js +133 -0
  119. package/dist/clients/cursor/hooks/track-action-monitor.js.map +1 -0
  120. package/dist/clients/cursor/hooks/track-action.d.ts.map +1 -1
  121. package/dist/clients/cursor/hooks/track-action.js +51 -23
  122. package/dist/clients/cursor/hooks/track-action.js.map +1 -1
  123. package/dist/clients/cursor/hooks/verify-gate.d.ts.map +1 -1
  124. package/dist/clients/cursor/hooks/verify-gate.js +14 -1
  125. package/dist/clients/cursor/hooks/verify-gate.js.map +1 -1
  126. package/dist/clients/cursor/index.d.ts +4 -1
  127. package/dist/clients/cursor/index.d.ts.map +1 -1
  128. package/dist/clients/cursor/index.js +117 -71
  129. package/dist/clients/cursor/index.js.map +1 -1
  130. package/dist/clients/cursor/rules/ironbee-verification.mdc +37 -29
  131. package/dist/clients/cursor/skills/ironbee-verification.md +93 -76
  132. package/dist/clients/registry.d.ts +14 -0
  133. package/dist/clients/registry.d.ts.map +1 -1
  134. package/dist/clients/registry.js +34 -0
  135. package/dist/clients/registry.js.map +1 -1
  136. package/dist/commands/analyze.d.ts.map +1 -1
  137. package/dist/commands/analyze.js +40 -0
  138. package/dist/commands/analyze.js.map +1 -1
  139. package/dist/commands/backend-toggle.d.ts +45 -0
  140. package/dist/commands/backend-toggle.d.ts.map +1 -0
  141. package/dist/commands/backend-toggle.js +192 -0
  142. package/dist/commands/backend-toggle.js.map +1 -0
  143. package/dist/commands/disable-backend.d.ts +14 -0
  144. package/dist/commands/disable-backend.d.ts.map +1 -0
  145. package/dist/commands/disable-backend.js +34 -0
  146. package/dist/commands/disable-backend.js.map +1 -0
  147. package/dist/commands/disable-verification.d.ts +16 -0
  148. package/dist/commands/disable-verification.d.ts.map +1 -0
  149. package/dist/commands/disable-verification.js +36 -0
  150. package/dist/commands/disable-verification.js.map +1 -0
  151. package/dist/commands/enable-backend.d.ts +15 -0
  152. package/dist/commands/enable-backend.d.ts.map +1 -0
  153. package/dist/commands/enable-backend.js +35 -0
  154. package/dist/commands/enable-backend.js.map +1 -0
  155. package/dist/commands/enable-verification.d.ts +14 -0
  156. package/dist/commands/enable-verification.d.ts.map +1 -0
  157. package/dist/commands/enable-verification.js +34 -0
  158. package/dist/commands/enable-verification.js.map +1 -0
  159. package/dist/commands/hook.d.ts.map +1 -1
  160. package/dist/commands/hook.js +60 -0
  161. package/dist/commands/hook.js.map +1 -1
  162. package/dist/commands/import.d.ts +39 -0
  163. package/dist/commands/import.d.ts.map +1 -0
  164. package/dist/commands/import.js +369 -0
  165. package/dist/commands/import.js.map +1 -0
  166. package/dist/commands/install.d.ts.map +1 -1
  167. package/dist/commands/install.js +15 -20
  168. package/dist/commands/install.js.map +1 -1
  169. package/dist/commands/process-analytics.d.ts +18 -0
  170. package/dist/commands/process-analytics.d.ts.map +1 -0
  171. package/dist/commands/process-analytics.js +57 -0
  172. package/dist/commands/process-analytics.js.map +1 -0
  173. package/dist/commands/queue.d.ts +2 -3
  174. package/dist/commands/queue.d.ts.map +1 -1
  175. package/dist/commands/queue.js +2 -3
  176. package/dist/commands/queue.js.map +1 -1
  177. package/dist/commands/status.d.ts.map +1 -1
  178. package/dist/commands/status.js +29 -1
  179. package/dist/commands/status.js.map +1 -1
  180. package/dist/commands/verification-toggle.d.ts +47 -0
  181. package/dist/commands/verification-toggle.d.ts.map +1 -0
  182. package/dist/commands/verification-toggle.js +122 -0
  183. package/dist/commands/verification-toggle.js.map +1 -0
  184. package/dist/commands/verify.d.ts.map +1 -1
  185. package/dist/commands/verify.js +28 -0
  186. package/dist/commands/verify.js.map +1 -1
  187. package/dist/hooks/core/actions.d.ts +72 -70
  188. package/dist/hooks/core/actions.d.ts.map +1 -1
  189. package/dist/hooks/core/actions.js +191 -28
  190. package/dist/hooks/core/actions.js.map +1 -1
  191. package/dist/hooks/core/activity-end.d.ts +20 -0
  192. package/dist/hooks/core/activity-end.d.ts.map +1 -0
  193. package/dist/hooks/core/activity-end.js +23 -0
  194. package/dist/hooks/core/activity-end.js.map +1 -0
  195. package/dist/hooks/core/required-tools.d.ts +30 -0
  196. package/dist/hooks/core/required-tools.d.ts.map +1 -0
  197. package/dist/hooks/core/required-tools.js +70 -0
  198. package/dist/hooks/core/required-tools.js.map +1 -0
  199. package/dist/hooks/core/session-state.d.ts +12 -3
  200. package/dist/hooks/core/session-state.d.ts.map +1 -1
  201. package/dist/hooks/core/session-state.js +59 -0
  202. package/dist/hooks/core/session-state.js.map +1 -1
  203. package/dist/hooks/core/submit-verdict.d.ts.map +1 -1
  204. package/dist/hooks/core/submit-verdict.js +16 -12
  205. package/dist/hooks/core/submit-verdict.js.map +1 -1
  206. package/dist/hooks/core/verify-gate.d.ts +17 -3
  207. package/dist/hooks/core/verify-gate.d.ts.map +1 -1
  208. package/dist/hooks/core/verify-gate.js +312 -116
  209. package/dist/hooks/core/verify-gate.js.map +1 -1
  210. package/dist/import/claude/analytics-runner.d.ts +42 -0
  211. package/dist/import/claude/analytics-runner.d.ts.map +1 -0
  212. package/dist/import/claude/analytics-runner.js +213 -0
  213. package/dist/import/claude/analytics-runner.js.map +1 -0
  214. package/dist/import/claude/discovery.d.ts +22 -0
  215. package/dist/import/claude/discovery.d.ts.map +1 -0
  216. package/dist/import/claude/discovery.js +197 -0
  217. package/dist/import/claude/discovery.js.map +1 -0
  218. package/dist/import/claude/encoding.d.ts +50 -0
  219. package/dist/import/claude/encoding.d.ts.map +1 -0
  220. package/dist/import/claude/encoding.js +110 -0
  221. package/dist/import/claude/encoding.js.map +1 -0
  222. package/dist/import/claude/events/file-change.d.ts +28 -0
  223. package/dist/import/claude/events/file-change.d.ts.map +1 -0
  224. package/dist/import/claude/events/file-change.js +112 -0
  225. package/dist/import/claude/events/file-change.js.map +1 -0
  226. package/dist/import/claude/events/tool-call.d.ts +61 -0
  227. package/dist/import/claude/events/tool-call.d.ts.map +1 -0
  228. package/dist/import/claude/events/tool-call.js +119 -0
  229. package/dist/import/claude/events/tool-call.js.map +1 -0
  230. package/dist/import/claude/runner.d.ts +31 -0
  231. package/dist/import/claude/runner.d.ts.map +1 -0
  232. package/dist/import/claude/runner.js +280 -0
  233. package/dist/import/claude/runner.js.map +1 -0
  234. package/dist/import/claude/summary.d.ts +23 -0
  235. package/dist/import/claude/summary.d.ts.map +1 -0
  236. package/dist/import/claude/summary.js +186 -0
  237. package/dist/import/claude/summary.js.map +1 -0
  238. package/dist/import/claude/transcript-walk.d.ts +52 -0
  239. package/dist/import/claude/transcript-walk.d.ts.map +1 -0
  240. package/dist/import/claude/transcript-walk.js +187 -0
  241. package/dist/import/claude/transcript-walk.js.map +1 -0
  242. package/dist/import/concurrent-pool.d.ts +45 -0
  243. package/dist/import/concurrent-pool.d.ts.map +1 -0
  244. package/dist/import/concurrent-pool.js +95 -0
  245. package/dist/import/concurrent-pool.js.map +1 -0
  246. package/dist/import/emitter.d.ts +29 -0
  247. package/dist/import/emitter.d.ts.map +1 -0
  248. package/dist/import/emitter.js +66 -0
  249. package/dist/import/emitter.js.map +1 -0
  250. package/dist/import/events/activity.d.ts +23 -0
  251. package/dist/import/events/activity.d.ts.map +1 -0
  252. package/dist/import/events/activity.js +45 -0
  253. package/dist/import/events/activity.js.map +1 -0
  254. package/dist/import/events/session.d.ts +24 -0
  255. package/dist/import/events/session.d.ts.map +1 -0
  256. package/dist/import/events/session.js +47 -0
  257. package/dist/import/events/session.js.map +1 -0
  258. package/dist/import/filter.d.ts +47 -0
  259. package/dist/import/filter.d.ts.map +1 -0
  260. package/dist/import/filter.js +90 -0
  261. package/dist/import/filter.js.map +1 -0
  262. package/dist/import/ids.d.ts +56 -0
  263. package/dist/import/ids.d.ts.map +1 -0
  264. package/dist/import/ids.js +87 -0
  265. package/dist/import/ids.js.map +1 -0
  266. package/dist/import/index.d.ts +29 -0
  267. package/dist/import/index.d.ts.map +1 -0
  268. package/dist/import/index.js +52 -0
  269. package/dist/import/index.js.map +1 -0
  270. package/dist/import/marker.d.ts +20 -0
  271. package/dist/import/marker.d.ts.map +1 -0
  272. package/dist/import/marker.js +71 -0
  273. package/dist/import/marker.js.map +1 -0
  274. package/dist/import/pipeline.d.ts +41 -0
  275. package/dist/import/pipeline.d.ts.map +1 -0
  276. package/dist/import/pipeline.js +47 -0
  277. package/dist/import/pipeline.js.map +1 -0
  278. package/dist/import/progress.d.ts +20 -0
  279. package/dist/import/progress.d.ts.map +1 -0
  280. package/dist/import/progress.js +69 -0
  281. package/dist/import/progress.js.map +1 -0
  282. package/dist/import/skip.d.ts +13 -0
  283. package/dist/import/skip.d.ts.map +1 -0
  284. package/dist/import/skip.js +24 -0
  285. package/dist/import/skip.js.map +1 -0
  286. package/dist/import/types.d.ts +125 -0
  287. package/dist/import/types.d.ts.map +1 -0
  288. package/dist/import/types.js +28 -0
  289. package/dist/import/types.js.map +1 -0
  290. package/dist/index.js +21 -2
  291. package/dist/index.js.map +1 -1
  292. package/dist/lib/collector.d.ts +29 -3
  293. package/dist/lib/collector.d.ts.map +1 -1
  294. package/dist/lib/collector.js +118 -8
  295. package/dist/lib/collector.js.map +1 -1
  296. package/dist/lib/config.d.ts +240 -83
  297. package/dist/lib/config.d.ts.map +1 -1
  298. package/dist/lib/config.js +482 -89
  299. package/dist/lib/config.js.map +1 -1
  300. package/dist/lib/event.d.ts +72 -0
  301. package/dist/lib/event.d.ts.map +1 -0
  302. package/dist/lib/event.js +42 -0
  303. package/dist/lib/event.js.map +1 -0
  304. package/dist/lib/gitignore.d.ts +21 -0
  305. package/dist/lib/gitignore.d.ts.map +1 -0
  306. package/dist/lib/gitignore.js +54 -0
  307. package/dist/lib/gitignore.js.map +1 -0
  308. package/dist/lib/runtime-section.d.ts +118 -0
  309. package/dist/lib/runtime-section.d.ts.map +1 -0
  310. package/dist/lib/runtime-section.js +256 -0
  311. package/dist/lib/runtime-section.js.map +1 -0
  312. package/dist/lib/telemetry.d.ts +1 -1
  313. package/dist/lib/telemetry.d.ts.map +1 -1
  314. package/dist/lib/telemetry.js +4 -1
  315. package/dist/lib/telemetry.js.map +1 -1
  316. package/dist/queue/dead-letter.d.ts +5 -1
  317. package/dist/queue/dead-letter.d.ts.map +1 -1
  318. package/dist/queue/dead-letter.js +5 -1
  319. package/dist/queue/dead-letter.js.map +1 -1
  320. package/dist/queue/drain.d.ts +3 -2
  321. package/dist/queue/drain.d.ts.map +1 -1
  322. package/dist/queue/drain.js +3 -2
  323. package/dist/queue/drain.js.map +1 -1
  324. package/dist/queue/flush.d.ts +28 -12
  325. package/dist/queue/flush.d.ts.map +1 -1
  326. package/dist/queue/flush.js +43 -18
  327. package/dist/queue/flush.js.map +1 -1
  328. package/dist/queue/handlers/send-event.d.ts.map +1 -1
  329. package/dist/queue/handlers/send-event.js.map +1 -1
  330. package/dist/queue/index.d.ts +1 -2
  331. package/dist/queue/index.d.ts.map +1 -1
  332. package/dist/queue/index.js +2 -2
  333. package/dist/queue/index.js.map +1 -1
  334. package/dist/queue/paths.d.ts +4 -2
  335. package/dist/queue/paths.d.ts.map +1 -1
  336. package/dist/queue/paths.js +4 -2
  337. package/dist/queue/paths.js.map +1 -1
  338. package/dist/queue/process-file.d.ts +5 -1
  339. package/dist/queue/process-file.d.ts.map +1 -1
  340. package/dist/queue/process-file.js +5 -1
  341. package/dist/queue/process-file.js.map +1 -1
  342. package/dist/queue/snapshot.d.ts +4 -1
  343. package/dist/queue/snapshot.d.ts.map +1 -1
  344. package/dist/queue/snapshot.js +4 -1
  345. package/dist/queue/snapshot.js.map +1 -1
  346. package/dist/queue/spawn.d.ts +1 -3
  347. package/dist/queue/spawn.d.ts.map +1 -1
  348. package/dist/queue/spawn.js +1 -3
  349. package/dist/queue/spawn.js.map +1 -1
  350. package/dist/queue/submit.d.ts +6 -1
  351. package/dist/queue/submit.d.ts.map +1 -1
  352. package/dist/queue/submit.js +6 -1
  353. package/dist/queue/submit.js.map +1 -1
  354. package/dist/queue/types.d.ts +5 -1
  355. package/dist/queue/types.d.ts.map +1 -1
  356. package/dist/queue/types.js +5 -1
  357. package/dist/queue/types.js.map +1 -1
  358. package/dist/queue/worker-log.d.ts +3 -1
  359. package/dist/queue/worker-log.d.ts.map +1 -1
  360. package/dist/queue/worker-log.js +3 -1
  361. package/dist/queue/worker-log.js.map +1 -1
  362. package/package.json +1 -1
@@ -8,14 +8,22 @@ const output_1 = require("../../lib/output");
8
8
  const verify_gate_1 = require("./hooks/verify-gate");
9
9
  const clear_verdict_1 = require("./hooks/clear-verdict");
10
10
  const track_action_1 = require("./hooks/track-action");
11
+ const track_action_monitor_1 = require("./hooks/track-action-monitor");
11
12
  const session_start_1 = require("./hooks/session-start");
12
13
  const require_verdict_1 = require("./hooks/require-verdict");
13
14
  const require_verification_1 = require("./hooks/require-verification");
14
15
  const activity_start_1 = require("./hooks/activity-start");
16
+ const activity_end_1 = require("./hooks/activity-end");
15
17
  const session_end_1 = require("./hooks/session-end");
16
18
  const config_1 = require("../../lib/config");
19
+ const runtime_section_1 = require("../../lib/runtime-section");
17
20
  const MCP_SERVER_NAME = "browser-devtools";
21
+ const NODE_MCP_SERVER_NAME = "node-devtools";
18
22
  const IRONBEE_HOOK_MARKER = "ironbee";
23
+ /** Resolve fragments dir for a given client at runtime. */
24
+ function fragmentsDirFor(client) {
25
+ return (0, path_1.join)(__dirname, "..", client, "fragments");
26
+ }
19
27
  // Color for [cursor] label — gray
20
28
  function cursorColor(text) {
21
29
  return output_1.pc.dim(text);
@@ -30,8 +38,12 @@ class CursorClient {
30
38
  resolveProjectDir() {
31
39
  return process.env.CURSOR_PROJECT_DIR ?? process.env.IRONBEE_PROJECT_DIR ?? process.cwd();
32
40
  }
33
- install(projectDir) {
34
- // Clean up old artifacts first (safe for re-install / upgrade)
41
+ install(projectDir, config) {
42
+ const cfg = config ?? (0, config_1.loadConfig)(projectDir);
43
+ const verificationEnabled = (0, config_1.getVerificationEnabled)(cfg);
44
+ // Clean up old artifacts first (safe for re-install / upgrade and
45
+ // necessary when toggling between enabled/disabled mode so stale
46
+ // skill/rule/verify-command/MCP entries from the prior mode are removed).
35
47
  this.cleanupArtifacts(projectDir);
36
48
  const cursorDir = (0, path_1.join)(projectDir, ".cursor");
37
49
  const rulesDir = (0, path_1.join)(cursorDir, "rules");
@@ -39,35 +51,50 @@ class CursorClient {
39
51
  (0, fs_1.mkdirSync)(rulesDir, { recursive: true });
40
52
  (0, fs_1.mkdirSync)(skillsDir, { recursive: true });
41
53
  const hooksPath = (0, path_1.join)(cursorDir, "hooks.json");
42
- this.mergeHooksConfig(hooksPath);
43
- const skillPath = (0, path_1.join)(skillsDir, "ironbee-verification.md");
44
- const skillContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, "skills", "ironbee-verification.md"), "utf-8");
45
- (0, fs_1.writeFileSync)(skillPath, skillContent);
46
- const rulePath = (0, path_1.join)(rulesDir, "ironbee-verification.mdc");
47
- const ruleContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, "rules", "ironbee-verification.mdc"), "utf-8");
48
- (0, fs_1.writeFileSync)(rulePath, ruleContent);
54
+ this.mergeHooksConfig(hooksPath, verificationEnabled);
55
+ // /ironbee-analyze is installed in both modes (graceful degradation
56
+ // for monitoring-only sessions handles the limited-data case).
49
57
  const analyzeSkillDir = (0, path_1.join)(skillsDir, "ironbee-analyze");
50
58
  (0, fs_1.mkdirSync)(analyzeSkillDir, { recursive: true });
51
59
  const analyzeSkillPath = (0, path_1.join)(analyzeSkillDir, "SKILL.md");
52
60
  const analyzeContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, "commands", "ironbee-analyze", "SKILL.md"), "utf-8");
53
61
  (0, fs_1.writeFileSync)(analyzeSkillPath, analyzeContent);
54
- const verifySkillDir = (0, path_1.join)(skillsDir, "ironbee-verify");
55
- (0, fs_1.mkdirSync)(verifySkillDir, { recursive: true });
56
- const verifySkillPath = (0, path_1.join)(verifySkillDir, "SKILL.md");
57
- const verifyContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, "commands", "ironbee-verify", "SKILL.md"), "utf-8");
58
- (0, fs_1.writeFileSync)(verifySkillPath, verifyContent);
59
- const mcpPath = (0, path_1.join)(cursorDir, "mcp.json");
60
- this.writeMcpConfig(mcpPath, projectDir);
61
- console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} hooks ${output_1.pc.dim("")} ${output_1.pc.dim(hooksPath)}`);
62
- console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} skill ${output_1.pc.dim("→")} ${output_1.pc.dim(skillPath)}`);
63
- console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} rule ${output_1.pc.dim("→")} ${output_1.pc.dim(rulePath)}`);
64
- console.log(` ${output_1.pc.dim("")} ${cursorColor("[cursor]")} command ${output_1.pc.dim("→")} ${output_1.pc.dim(analyzeSkillPath)}`);
65
- console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} mcp ${output_1.pc.dim("→")} ${output_1.pc.dim(mcpPath)}`);
66
- console.log();
67
- console.log(` ${output_1.pc.yellow("⚠")} ${output_1.pc.yellow("Cursor requires manual steps:")}`);
68
- console.log(` ${output_1.pc.yellow("1.")} Restart Cursor to load the new hooks and MCP config`);
69
- console.log(` ${output_1.pc.yellow("2.")} Go to ${output_1.pc.bold("Settings Tools & MCP")} and verify ${output_1.pc.bold("browser-devtools")} is enabled`);
70
- console.log(` ${output_1.pc.yellow("3.")} If the server shows as enabled but tools are unavailable, toggle it off and on`);
62
+ if (verificationEnabled) {
63
+ const skillPath = (0, path_1.join)(skillsDir, "ironbee-verification.md");
64
+ const skillContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, "skills", "ironbee-verification.md"), "utf-8");
65
+ (0, fs_1.writeFileSync)(skillPath, skillContent);
66
+ const rulePath = (0, path_1.join)(rulesDir, "ironbee-verification.mdc");
67
+ const ruleContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, "rules", "ironbee-verification.mdc"), "utf-8");
68
+ (0, fs_1.writeFileSync)(rulePath, ruleContent);
69
+ const verifySkillDir = (0, path_1.join)(skillsDir, "ironbee-verify");
70
+ (0, fs_1.mkdirSync)(verifySkillDir, { recursive: true });
71
+ const verifySkillPath = (0, path_1.join)(verifySkillDir, "SKILL.md");
72
+ const verifyContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, "commands", "ironbee-verify", "SKILL.md"), "utf-8");
73
+ (0, fs_1.writeFileSync)(verifySkillPath, verifyContent);
74
+ const mcpPath = (0, path_1.join)(cursorDir, "mcp.json");
75
+ this.writeMcpConfig(mcpPath, projectDir);
76
+ // Sync runtime marker blocks in skill/rule/command md files to the
77
+ // current config state. Idempotent runs the same logic that
78
+ // `enable-backend` / `disable-backend` use, so installs match.
79
+ (0, runtime_section_1.syncRuntimeSectionsToConfig)(projectDir, fragmentsDirFor);
80
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} hooks ${output_1.pc.dim("→")} ${output_1.pc.dim(hooksPath)}`);
81
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} skill ${output_1.pc.dim("→")} ${output_1.pc.dim(skillPath)}`);
82
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} rule ${output_1.pc.dim("→")} ${output_1.pc.dim(rulePath)}`);
83
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} command ${output_1.pc.dim("→")} ${output_1.pc.dim(analyzeSkillPath)}`);
84
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} mcp ${output_1.pc.dim("→")} ${output_1.pc.dim(mcpPath)}`);
85
+ console.log();
86
+ console.log(` ${output_1.pc.yellow("⚠")} ${output_1.pc.yellow("Cursor requires manual steps:")}`);
87
+ console.log(` ${output_1.pc.yellow("1.")} Restart Cursor to load the new hooks and MCP config`);
88
+ console.log(` ${output_1.pc.yellow("2.")} Go to ${output_1.pc.bold("Settings → Tools & MCP")} and verify ${output_1.pc.bold("browser-devtools")} is enabled`);
89
+ console.log(` ${output_1.pc.yellow("3.")} If the server shows as enabled but tools are unavailable, toggle it off and on`);
90
+ }
91
+ else {
92
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} ${output_1.pc.yellow("monitoring-only mode")} (verification.enable: false)`);
93
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} hooks ${output_1.pc.dim("→")} ${output_1.pc.dim(hooksPath)}`);
94
+ console.log(` ${output_1.pc.dim("→")} ${cursorColor("[cursor]")} command ${output_1.pc.dim("→")} ${output_1.pc.dim(analyzeSkillPath)}`);
95
+ console.log();
96
+ console.log(` ${output_1.pc.yellow("⚠")} Restart Cursor to load the new hook config`);
97
+ }
71
98
  }
72
99
  uninstall(projectDir) {
73
100
  this.cleanupArtifacts(projectDir);
@@ -114,13 +141,19 @@ class CursorClient {
114
141
  async runActivityStart(projectDir) {
115
142
  await (0, activity_start_1.run)(projectDir);
116
143
  }
144
+ async runActivityEnd(projectDir) {
145
+ await (0, activity_end_1.run)(projectDir);
146
+ }
147
+ async runTrackActionMonitor(projectDir) {
148
+ await (0, track_action_monitor_1.run)(projectDir);
149
+ }
117
150
  async runSessionEnd(projectDir) {
118
151
  await (0, session_end_1.run)(projectDir);
119
152
  }
120
153
  isIronBeeHook(entry) {
121
154
  return entry.command.includes(IRONBEE_HOOK_MARKER);
122
155
  }
123
- mergeHooksConfig(hooksPath) {
156
+ mergeHooksConfig(hooksPath, verificationEnabled) {
124
157
  let config = { version: 1, hooks: {} };
125
158
  if ((0, fs_1.existsSync)(hooksPath)) {
126
159
  try {
@@ -134,10 +167,9 @@ class CursorClient {
134
167
  config = { version: 1, hooks: {} };
135
168
  }
136
169
  }
137
- // remove existing ironbee entries first (for re-install). Drop the
138
- // event-type key entirely when the filtered list is empty so retired
139
- // matchers (e.g. afterFileEdit moved into postToolUse) don't leave
140
- // orphan `[]` keys in hooks.json.
170
+ // remove existing ironbee entries first (for re-install AND mode
171
+ // toggles the previous mode's enforcement hooks must be cleared).
172
+ // Drop the event-type key entirely when the filtered list is empty.
141
173
  for (const eventType of Object.keys(config.hooks)) {
142
174
  const filtered = config.hooks[eventType].filter((entry) => !this.isIronBeeHook(entry));
143
175
  if (filtered.length === 0) {
@@ -147,74 +179,79 @@ class CursorClient {
147
179
  config.hooks[eventType] = filtered;
148
180
  }
149
181
  }
150
- // ── sessionStart — record session, output instructions ──
182
+ // ── sessionStart (always) — record session, output instructions ──
151
183
  if (!config.hooks.sessionStart) {
152
184
  config.hooks.sessionStart = [];
153
185
  }
154
186
  config.hooks.sessionStart.push({
155
187
  command: `ironbee hook session-start --client cursor`,
156
188
  });
157
- // ── beforeSubmitPrompt — start activity tracking on each agent turn ──
189
+ // ── beforeSubmitPrompt (always) — start activity on each agent turn ──
158
190
  if (!config.hooks.beforeSubmitPrompt) {
159
191
  config.hooks.beforeSubmitPrompt = [];
160
192
  }
161
193
  config.hooks.beforeSubmitPrompt.push({
162
194
  command: `ironbee hook activity-start --client cursor`,
163
195
  });
164
- // ── preToolUse — block browser tools if no active verification ──
165
- if (!config.hooks.preToolUse) {
166
- config.hooks.preToolUse = [];
196
+ if (verificationEnabled) {
197
+ // ── preToolUse (enforcement) — block devtools without active verification ──
198
+ if (!config.hooks.preToolUse) {
199
+ config.hooks.preToolUse = [];
200
+ }
201
+ config.hooks.preToolUse.push({
202
+ command: `ironbee hook require-verification --client cursor`,
203
+ matcher: "MCP:(bdt|ndt)_.*",
204
+ failClosed: true,
205
+ });
206
+ // ── preToolUse (enforcement) — block edits without verdict ──
207
+ // StrReplace and Delete are included so the verdict invariant
208
+ // applies to all edit-tools, not only full-file Write.
209
+ config.hooks.preToolUse.push({
210
+ command: `ironbee hook require-verdict --client cursor`,
211
+ matcher: "Write|StrReplace|Delete",
212
+ failClosed: true,
213
+ });
214
+ // ── postToolUse (enforcement) — file_change events + verdict clear ──
215
+ if (!config.hooks.postToolUse) {
216
+ config.hooks.postToolUse = [];
217
+ }
218
+ config.hooks.postToolUse.push({
219
+ command: `ironbee hook clear-verdict --client cursor`,
220
+ matcher: "Write|StrReplace|Delete",
221
+ });
167
222
  }
168
- config.hooks.preToolUse.push({
169
- command: `ironbee hook require-verification --client cursor`,
170
- matcher: "MCP:bdt_.*",
171
- failClosed: true,
172
- });
173
- // ── preToolUse — block edits if browser tools used without verdict ──
174
- // StrReplace and Delete are included so the verdict invariant
175
- // applies to all edit-tools, not only full-file Write. The hook
176
- // also stashes existsSync for Write so the postToolUse adapter
177
- // can distinguish create vs update.
178
- config.hooks.preToolUse.push({
179
- command: `ironbee hook require-verdict --client cursor`,
180
- matcher: "Write|StrReplace|Delete",
181
- failClosed: true,
182
- });
183
- // ── postToolUse — track every tool_call, queue-submit to collector ──
184
- // matcher omitted on track-action so every tool fires it; internal
185
- // branching keeps browser-devtools verify-gate state in actions.jsonl.
186
- // Cursor's hook execution order across multiple postToolUse entries is
187
- // not contractually guaranteed — verify-gate's `last marker, scan
188
- // after` semantics are order-independent so the two events landing in
189
- // any order produces correct results.
223
+ // ── postToolUse (always) — track every tool_call, queue-submit ──
224
+ // Mode-specific variant: full track-action when enabled, lean
225
+ // track-action-monitor when disabled.
190
226
  if (!config.hooks.postToolUse) {
191
227
  config.hooks.postToolUse = [];
192
228
  }
229
+ const trackActionCommand = verificationEnabled
230
+ ? `ironbee hook track-action --client cursor`
231
+ : `ironbee hook track-action-monitor --client cursor`;
193
232
  config.hooks.postToolUse.push({
194
- command: `ironbee hook clear-verdict --client cursor`,
195
- matcher: "Write|StrReplace|Delete",
233
+ command: trackActionCommand,
196
234
  });
197
- config.hooks.postToolUse.push({
198
- command: `ironbee hook track-action --client cursor`,
199
- });
200
- // ── postToolUseFailure — same adapter, reads `error_message` from stdin ──
201
- // Cursor does not support a matcher on this event; hook fires for all
202
- // tools. Covers thrown exceptions, timeouts, permission denial, and
203
- // user cancellation (is_interrupt).
235
+ // ── postToolUseFailure (always) — same adapter on the failure path ──
204
236
  if (!config.hooks.postToolUseFailure) {
205
237
  config.hooks.postToolUseFailure = [];
206
238
  }
207
239
  config.hooks.postToolUseFailure.push({
208
- command: `ironbee hook track-action --client cursor`,
240
+ command: trackActionCommand,
209
241
  });
210
- // ── stop — verify-gate, forces re-verification via followup_message ──
242
+ // ── stop (always) mode-specific variant ──
243
+ // Enabled: verify-gate (multi-cycle gate + endActivity + queue flush).
244
+ // Disabled: activity-end (endActivity + queue flush only).
211
245
  if (!config.hooks.stop) {
212
246
  config.hooks.stop = [];
213
247
  }
248
+ const stopCommand = verificationEnabled
249
+ ? `ironbee hook verify-gate --client cursor`
250
+ : `ironbee hook activity-end --client cursor`;
214
251
  config.hooks.stop.push({
215
- command: `ironbee hook verify-gate --client cursor`,
252
+ command: stopCommand,
216
253
  });
217
- // ── sessionEnd — record session end ──
254
+ // ── sessionEnd (always) — record session end + sync queue flush ──
218
255
  if (!config.hooks.sessionEnd) {
219
256
  config.hooks.sessionEnd = [];
220
257
  }
@@ -254,8 +291,16 @@ class CursorClient {
254
291
  }
255
292
  try {
256
293
  const config = JSON.parse((0, fs_1.readFileSync)(mcpPath, "utf-8"));
294
+ let changed = false;
257
295
  if (config.mcpServers && config.mcpServers[MCP_SERVER_NAME]) {
258
296
  delete config.mcpServers[MCP_SERVER_NAME];
297
+ changed = true;
298
+ }
299
+ if (config.mcpServers && config.mcpServers[NODE_MCP_SERVER_NAME]) {
300
+ delete config.mcpServers[NODE_MCP_SERVER_NAME];
301
+ changed = true;
302
+ }
303
+ if (changed) {
259
304
  (0, fs_1.writeFileSync)(mcpPath, JSON.stringify(config, null, 2));
260
305
  }
261
306
  }
@@ -284,6 +329,7 @@ class CursorClient {
284
329
  }
285
330
  const mcpEntry = (0, config_1.getMcpServerEntry)(projectDir);
286
331
  config.mcpServers[MCP_SERVER_NAME] = mcpEntry;
332
+ config.mcpServers[NODE_MCP_SERVER_NAME] = (0, config_1.getNodeDevToolsMcpEntry)(projectDir);
287
333
  (0, fs_1.writeFileSync)(mcpPath, JSON.stringify(config, null, 2));
288
334
  }
289
335
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/cursor/index.ts"],"names":[],"mappings":";;;AAAA,2BAAoF;AACpF,+BAA4B;AAE5B,6CAA0C;AAC1C,6CAA8C;AAC9C,qDAA+D;AAC/D,yDAAmE;AACnE,uDAAiE;AACjE,yDAAmE;AACnE,6DAAuE;AACvE,uEAAiF;AACjF,2DAAqE;AACrE,qDAA+D;AAC/D,6CAA+E;AAE/E,MAAM,eAAe,GAAW,kBAAkB,CAAC;AACnD,MAAM,mBAAmB,GAAW,SAAS,CAAC;AA0B9C,kCAAkC;AAClC,SAAS,WAAW,CAAC,IAAY;IAC7B,OAAO,WAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED,MAAa,YAAY;IAAzB;QACoB,SAAI,GAAW,QAAQ,CAAC;IAsT5C,CAAC;IApTU,MAAM,CAAC,UAAkB;QAC5B,OAAO,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IACnD,CAAC;IAEM,iBAAiB;QACpB,OAAO,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAC9F,CAAC;IAEM,OAAO,CAAC,UAAkB;QAC7B,+DAA+D;QAC/D,IAAI,CAAC,gBAAgB,CAAC,UA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jWD,oCAiWC"}
@@ -1,36 +1,39 @@
1
1
  ---
2
- description: "MANDATORY browser verification after code changes — IronBee enforcement"
2
+ description: "MANDATORY verification after code changes — IronBee enforcement (browser + runtime cycles)"
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
- You MUST verify all code changes in the browser before completing any task. After every verification attempt, you MUST submit a verdict (pass or fail) via `ironbee hook submit-verdict` before doing anything else. If verification fails, submit the fail verdict first, then fix.
6
+ You MUST verify all code changes through real tools before completing any task. After every verification attempt, you MUST submit a verdict (pass or fail) via `ironbee hook submit-verdict` before doing anything else. If verification fails, submit the fail verdict first, then fix.
7
7
 
8
- Verification is NOT just visual — you must functionally test the changes by interacting with the application through the browser-devtools MCP server. Click buttons, fill forms, trigger the flows you changed, and confirm things actually work end-to-end.
8
+ Verification runs in **cycles** decided by file pattern match you don't choose, the gate detects:
9
9
 
10
- You are responsible for the full application lifecycle during verification:
11
- - **Build** the application if needed (e.g. `npm run build`, `npm run dev`, `docker compose build`)
12
- - **Start** the dev server before navigating to any page (e.g. `npm run dev`, `docker compose up -d`)
13
- - **Stop** the dev server after verification is complete (e.g. `Ctrl+C`, `docker compose down`)
14
- If the application is already running, skip the start step. If the build fails, fix it before proceeding.
15
- **Do NOT guess ports.** After starting, check the actual port (e.g. `docker compose ps`, process output, config files) before navigating.
10
+ - **Browser cycle** frontend file changes (default: most code extensions). Tools come from the **browser-devtools** MCP server (prefix `MCP:bdt_*`). Verification means navigating to the affected page and FUNCTIONALLY exercising the change in the browser — clicking, typing, submitting — not just looking at it.
16
11
 
17
- Required verification steps:
18
- 1. Build and start the application if not already running
19
- 2. **Start verification**: `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` — REQUIRED before browser tools
20
- 3. Navigate to affected page(s) with `mcp__browser-devtools__bdt_navigation_go-to`
21
- 4. **Functionally test** the changes — click, type, submit, navigate, interact with the UI to exercise the code paths you modified
22
- 5. Take a screenshot with `mcp__browser-devtools__bdt_content_take-screenshot` to capture the final state
23
- 6. Check accessibility with `mcp__browser-devtools__bdt_a11y_take-aria-snapshot`
24
- 7. Check console for errors with `mcp__browser-devtools__bdt_o11y_get-console-messages`
25
- 8. Stop the dev server when done
26
- 9. **IMMEDIATELY submit your verdict** — do NOT edit any code before submitting: `echo '<verdict-json>' | ironbee hook submit-verdict`
27
- - Pass → submit pass verdict
28
- - Fail → submit fail verdict with issues, THEN fix the code and re-verify
29
- - Submitting a verdict automatically ends the verification cycle
12
+ A backend-runtime cycle (e.g. `node` after `ironbee enable-backend node`) may also be active for this project — **see the runtime section near the bottom of this file** for whether it applies and which tools to call.
30
13
 
31
- Steps 2, 4, 5, and 6 are checked by the stop hook. Step 3 is expected — do not just take a screenshot and call it done.
14
+ ## Application lifecycle
32
15
 
33
- The session-start hook outputs your session ID at the beginning of your session. After EVERY verification attempt, you MUST submit a verdict before doing anything else — even if it failed. Do not skip to fixing code. The submit-verdict command validates and records the verdict.
16
+ You manage the running application during verification:
17
+ - **Build** if needed (e.g. `npm run build`, `docker compose build`).
18
+ - **Start** before navigating/connecting (e.g. `npm run dev`, `docker compose up -d`).
19
+ - **Stop** the dev server after verification is complete.
20
+
21
+ Skip start if already running. Fix build errors before proceeding. **Don't guess ports** — check actual via `docker compose ps`, process output, or config.
22
+
23
+ ## Required steps
24
+
25
+ 1. Build and start the application if not already running.
26
+ 2. **Start verification**: `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` — required before any devtools tool call.
27
+ 3. Run the **Browser cycle** flow: navigate (`MCP:bdt_navigation_go-to`) → functionally test → screenshot (`MCP:bdt_content_take-screenshot`) → accessibility (`MCP:bdt_a11y_take-aria-snapshot`) → console (`MCP:bdt_o11y_get-console-messages`). All four are MANDATORY.
28
+ - If `recording.enable` is on, the gate forces `MCP:bdt_content_start-recording` BEFORE the steps above and rejects the verdict if you don't call `MCP:bdt_content_stop-recording` AFTER them. Always pair start/stop around steps above.
29
+ - **See the runtime section near the bottom of this file** — if a backend-runtime cycle is active for this project, run its flow within the same verification cycle as well.
30
+ 4. Stop the dev server when done.
31
+ 5. **If recording was started, stop it NOW** — `MCP:bdt_content_stop-recording` BEFORE submit-verdict. submit-verdict rejects with "recording is still active" if you skip this.
32
+ 6. **IMMEDIATELY submit your verdict** — do NOT edit any code before submitting: `echo '<verdict-json>' | ironbee hook submit-verdict`.
33
+ - Pass verdict carries fields for every active cycle. Fail verdict adds `issues`. Pass after fail adds `fixes`.
34
+ - Status `pass` is overridden to fail by the gate when evidence doesn't back it.
35
+
36
+ The stop hook checks tool usage AND verdict validity for every active cycle. After EVERY verification attempt, you MUST submit a verdict before doing anything else — even if it failed. Do not skip to fixing code.
34
37
 
35
38
  If verification fails: submit fail verdict → fix the code → re-verify → submit again.
36
39
 
@@ -38,8 +41,13 @@ Every file edit automatically clears your verdict, requiring re-verification.
38
41
 
39
42
  ## BANNED
40
43
 
41
- - Writing verdict.json directly — always use `ironbee hook submit-verdict`
42
- - Skipping the fail verdict — always submit fail before fixing, so issues are tracked
43
- - Submitting a verdict without actually performing browser verification
44
- - Submitting a verdict based on assumptions, code reading, or prior knowledge
45
- - Copying example verdicts from hook messages without doing real verification first
44
+ - Writing `verdict.json` directly — always use `ironbee hook submit-verdict`.
45
+ - Skipping the fail verdict — always submit fail before fixing, so issues are tracked.
46
+ - Submitting a verdict without actually performing verification through real tools.
47
+ - Submitting a verdict based on assumptions, code reading, or prior knowledge.
48
+ - Copying example verdicts from hook messages without doing real verification first.
49
+ - Calling `MCP:bdt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
50
+ - **Submitting a verdict while a browser recording is still active** — always call `MCP:bdt_content_stop-recording` BEFORE `ironbee hook submit-verdict`. The recording start/stop pair brackets the verification flow.
51
+
52
+ <!--IRONBEE:RUNTIME:node-->
53
+ <!--/IRONBEE:RUNTIME:node-->
@@ -1,91 +1,108 @@
1
1
  ---
2
2
  name: ironbee-verification
3
3
  description: >
4
- MANDATORY browser verification after code changes. Activates when: implementing features,
5
- fixing bugs, modifying UI components, changing API endpoints, updating styles, refactoring code,
6
- or completing ANY task that changes application behavior. After writing or editing code files,
7
- you MUST verify changes through the browser-devtools MCP server and submit a verdict (pass or fail)
8
- before reporting task completion. If verification fails, submit the fail verdict before fixing.
4
+ MANDATORY verification after code changes. Activates when implementing features, fixing
5
+ bugs, modifying UI components, API endpoints, styles, refactoring, or any task that
6
+ changes application behavior. Frontend changes require browser verification via the
7
+ browser-devtools MCP server. Backend changes ALSO require runtime-specific verification
8
+ via the matching MCP server when the operator has enabled that runtime (see
9
+ `ironbee enable-backend <runtime>`). After every code edit you MUST verify the affected
10
+ cycle(s) through real tools and submit a single verdict (pass or fail) before reporting
11
+ task completion. If verification fails, submit the fail verdict first, then fix.
9
12
  ---
10
13
 
11
- # IronBee Browser Verification
14
+ # IronBee Verification
12
15
 
13
16
  ## Rule
14
- No task is complete until changes are verified in the browser visually AND functionally. After verification, you MUST submit a verdict (pass or fail) before doing anything else. If verification fails, submit the fail verdict first, then fix.
15
-
16
- ## MCP Server
17
- Verification is performed using the **browser-devtools** MCP server (`browser-devtools-mcp` package).
18
- All browser interactions must go through this server's tools.
19
-
20
- ## Application Lifecycle
21
- You are responsible for managing the application during verification:
22
- - **Build** the application if needed (e.g. `npm run build`, `npm run dev`, `docker compose build`, or whatever the project uses)
23
- - **Start** the dev server before navigating to any page (e.g. `npm run dev`, `docker compose up`, `docker compose up -d`)
24
- - **Stop** the dev server after verification is complete (e.g. `Ctrl+C`, `docker compose down`)
25
-
26
- If the application is already running, skip the start step. If the build fails, fix the build error before proceeding with verification.
27
-
28
- **Do NOT guess ports.** After starting the application, check the actual port (e.g. `docker compose ps`, process output, or config files) before navigating. Never assume a default port.
29
-
30
- ## Flow
31
- 1. Implement your changes (write/edit code)
32
- 2. **Build and start** the application if not already running
33
- 3. **Start verification**: `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start`
34
- - This is REQUIRED before using any browser-devtools tools. Browser tools are blocked without it.
35
- 4. **Functionally test** your changes through the browser:
36
- - **Navigate**: `mcp__browser-devtools__bdt_navigation_go-to` — go to the affected page(s)
37
- - **Interact**: Use the browser agent to **actually test** what you changed — click buttons, fill forms, submit data, trigger workflows, navigate between pages. Do not just look at the page.
38
- - **Screenshot**: `mcp__browser-devtools__bdt_content_take-screenshot` — capture the final visual state
39
- - **Accessibility**: `mcp__browser-devtools__bdt_a11y_take-aria-snapshot` — verify page structure
40
- - **Console**: `mcp__browser-devtools__bdt_o11y_get-console-messages` — check for errors
41
- Navigate, Screenshot, Accessibility, and Console tools are MANDATORY. Functional interaction is expected for every verification.
42
- 5. **Stop** the dev server when verification is complete
43
- 6. **IMMEDIATELY submit your verdict** — do NOT edit any code before submitting: `echo '<verdict-json>' | ironbee hook submit-verdict`
44
- - If everything works → submit pass verdict
45
- - If something is broken → submit fail verdict with issues describing what failed
46
- - **Never skip this step.** Every verification attempt must be recorded, pass or fail.
47
- - Submitting a verdict automatically ends the verification cycle.
48
- 7. If you submitted a fail verdict → fix the code → rebuild → go back to step 2 → submit again → repeat until pass
17
+ No task is complete until changes are verified through **real tools** (browser interaction or, when enabled, a backend-runtime debugger), not by reading code or inferring behavior. After verification, you MUST submit a verdict (pass or fail) before doing anything else. If verification fails, submit the fail verdict first, then fix.
49
18
 
50
- ## What good verification looks like
51
- - Changed a form handler? → Start the app, fill the form, submit it, verify the response
52
- - Added a button? → Click it, confirm the expected action happens
53
- - Fixed a routing bug? → Navigate through the affected routes
54
- - Updated an API call? → Trigger the action that calls the API, verify the result in the UI
55
- - Changed styling? → Take a screenshot AND interact to ensure layout didn't break functionality
56
-
57
- ## How it works
58
- - At session start, the session-start hook outputs your session ID
59
- - After verification, submit your verdict: `echo '<verdict-json>' | ironbee hook submit-verdict`
60
- - The submit-verdict command validates your verdict and records it
61
- - When you stop, the stop hook checks that browser tools were used AND a valid verdict exists
62
- - Every code edit automatically clears your verdict, requiring re-verification
63
-
64
- ## Agent Teams
65
- - Subagents focus on implementation only — do NOT verify
66
- - The main orchestrator agent verifies ALL changes after subagents complete
67
- - Each session's verification is isolated via session-specific verdict files
68
-
69
- ## Verdict format
70
-
71
- On pass:
72
- ```json
73
- {"session_id":"<your-session-id>","status":"pass","pages_tested":["http://localhost:3000/page"],"checks":["feature works"],"console_errors":0,"network_failures":0}
74
- ```
19
+ ## Cycles
75
20
 
76
- On fail (issues is required):
77
- ```json
78
- {"session_id":"<your-session-id>","status":"fail","pages_tested":["http://localhost:3000/page"],"checks":["feature broken"],"console_errors":1,"network_failures":0,"issues":["button click handler not firing"]}
79
- ```
21
+ IronBee runs verification in **cycles**. A single stop hook can drive multiple cycles in parallel — every active cycle must pass for your task to complete.
22
+
23
+ - **Browser cycle** — always available. Triggered when a changed file matches `browser.verifyPatterns` (default: most code extensions — `.ts`, `.tsx`, `.css`, `.html`, `.py`, `.go`, `.java`, etc.). Tools come from the **browser-devtools** MCP server (prefix `MCP:bdt_*`). Verification means navigating to the affected page and FUNCTIONALLY exercising the change in the browser.
24
+ - **Backend-runtime cycle(s)** — opt-in per project via `ironbee enable-backend <runtime>` (e.g. `node`). Triggered when a changed file matches `backend.<runtime>.verifyPatterns`. Tools come from a runtime-specific MCP server. **See the runtime section near the bottom of this file** for whether a backend cycle is active for this project and which tools to call.
25
+
26
+ You don't choose which cycle runs — the file pattern decides. A single file can match multiple cycles' patterns and activate them all. Cycles always run in parallel within a single stop run.
27
+
28
+ ## Application lifecycle (your responsibility)
29
+
30
+ For both cycles you manage the running application:
31
+ - **Build** if needed (`npm run build`, `docker compose build`, …)
32
+ - **Start** before navigating/connecting (`npm run dev`, `docker compose up -d`, …)
33
+ - **Stop** when verification is complete
34
+
35
+ If already running, skip start. If the build fails, fix it before proceeding.
36
+
37
+ **Don't guess ports.** After starting, check the actual port via `docker compose ps`, process output, or config files.
38
+
39
+ ## Universal flow
80
40
 
81
- On pass after a previous fail (fixes is required):
41
+ 1. Implement your changes (write/edit code).
42
+ 2. **Start verification** (one cycle covers every active mode — browser plus any enabled backend-runtime cycles):
43
+ ```
44
+ echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start
45
+ ```
46
+ Devtools tools are blocked without this.
47
+ 3. Build and start the application if not already running.
48
+ 4. Run the **Browser flow** below. **See the runtime section near the bottom of this file** — if a backend-runtime cycle is active for this project, run its flow within the same verification cycle as well.
49
+ 5. Stop the dev server when verification is complete.
50
+ 6. **If recording was started, stop it now** — `MCP:bdt_content_stop-recording`. submit-verdict rejects when recording is still active.
51
+ 7. **Submit your verdict immediately** — do NOT edit any code first:
52
+ ```
53
+ echo '<verdict-json>' | ironbee hook submit-verdict
54
+ ```
55
+ - Pass → submit pass verdict (with fields for every active cycle)
56
+ - Fail → submit fail verdict with `issues`
57
+ - **The stop hook overrides `status: pass` to fail when evidence doesn't back it.**
58
+ 8. If failed → fix → rebuild → go back to step 2 → repeat until pass.
59
+
60
+ ## Browser flow (when browser cycle is active)
61
+
62
+ > **Recording (only when `recording.enable` is on in config):** the gate blocks every other browser tool until you first call `MCP:bdt_content_start-recording`, and `submit-verdict` rejects with `"recording is still active"` unless you call `MCP:bdt_content_stop-recording` after the steps below. **Treat start/stop as bookends around steps 1-5.** This is also enforced as step 6 of the Universal flow above.
63
+
64
+ 1. **Navigate**: `MCP:bdt_navigation_go-to` — go to the affected page(s)
65
+ 2. **Interact**: actually exercise what changed — click buttons, fill forms, submit data, trigger workflows. Don't just look at the page.
66
+ 3. **Screenshot**: `MCP:bdt_content_take-screenshot` — capture the final visual state
67
+ 4. **Accessibility**: `MCP:bdt_a11y_take-aria-snapshot` — verify page structure
68
+ 5. **Console**: `MCP:bdt_o11y_get-console-messages` — check for errors
69
+
70
+ All four tools are MANDATORY (the stop hook checks each). Functional interaction is expected for every verification.
71
+
72
+ ### Browser verdict fields
82
73
  ```json
83
- {"session_id":"<your-session-id>","status":"pass","pages_tested":["http://localhost:3000/page"],"checks":["feature works"],"console_errors":0,"network_failures":0,"fixes":["reattached click handler to submit button"]}
74
+ {
75
+ "session_id": "<sid>",
76
+ "status": "pass",
77
+ "pages_tested": ["http://localhost:3000/page"],
78
+ "checks": ["form submits successfully", "new item appears in list", "no console errors"],
79
+ "console_errors": 0,
80
+ "network_failures": 0
81
+ }
84
82
  ```
85
83
 
84
+ For `status: "pass"` (browser cycle): `console_errors === 0` AND `network_failures === 0`.
85
+
86
+ On fail, include `issues`. On pass after a previous fail, include `fixes`.
87
+
88
+ <!--IRONBEE:RUNTIME:node-->
89
+ <!--/IRONBEE:RUNTIME:node-->
90
+
91
+ ## What good verification looks like
92
+
93
+ - Changed a form handler? → Start the app, fill the form, submit it, verify the response (browser flow).
94
+ - Added an API endpoint in a backend file (when a runtime cycle is enabled)? → Run that runtime's flow per the runtime section: attach to the running process, set a probe at the handler, exercise the path from the browser, confirm the probe triggered (or inspect runtime logs).
95
+ - Fixed a bug that surfaced as both a UI glitch AND a server error? → Multi-cycle: visual confirmation in the browser AND probe/log proof on the server.
96
+ - Changed styling only? → Browser flow with extra attention on screenshot review.
97
+
86
98
  ## Important
87
99
  - **Always submit a verdict after every verification attempt** — both pass AND fail. Fail verdicts are tracked for analytics.
88
- - The stop hook checks BOTH that browser-devtools MCP tools were used AND a valid verdict exists
89
- - Submit verdicts via `ironbee hook submit-verdict`, do NOT write verdict.json directly
90
- - Every file edit automatically clears your session's verdict
91
- - After 3 failed verification attempts, you may complete but must report issues
100
+ - The stop hook checks tool usage AND verdict validity for every active cycle. Pass criteria are enforced separately per cycle, then AND-combined.
101
+ - Submit verdicts via `ironbee hook submit-verdict`, never write `verdict.json` directly.
102
+ - Every file edit automatically clears your session's verdict.
103
+ - After 3 failed verification attempts, you may complete but must report unresolved issues.
104
+
105
+ ## Sub-agent teams
106
+ - Sub-agents (spawned via the `Task` tool) focus on implementation only — do NOT verify.
107
+ - The main orchestrator agent verifies ALL changes after sub-agents complete.
108
+ - Each session's verification is isolated via session-specific verdict files.