@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
@@ -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 (the Stop hook checks the transcript for each one). 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 SessionStart 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
- - If something is missing, the hook blocks you and gives you instructions
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 `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__browser-devtools__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__browser-devtools__bdt_content_start-recording`, and `submit-verdict` rejects with `"recording is still active"` unless you call `mcp__browser-devtools__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__browser-devtools__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__browser-devtools__bdt_content_take-screenshot` — capture the final visual state
67
+ 4. **Accessibility**: `mcp__browser-devtools__bdt_a11y_take-aria-snapshot` — verify page structure
68
+ 5. **Console**: `mcp__browser-devtools__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 code edit (Write/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 code edit (Write/Edit) automatically clears your session's verdict.
103
+ - After 3 failed verification attempts, you may complete but must report unresolved issues.
104
+
105
+ ## Subagent teams
106
+ - Subagents focus on implementation only — do NOT verify.
107
+ - The main orchestrator agent verifies ALL changes after subagents complete.
108
+ - Each session's verification is isolated via session-specific verdict files.
@@ -1,19 +1,21 @@
1
1
  ---
2
2
  name: ironbee-verify
3
- description: "Trigger browser verification of code changes. Args: (default), full, visual, functional"
3
+ description: "Trigger verification of code changes (browser cycle for frontend, runtime-specific cycle for backend when enabled). Args: (default), full, visual, functional"
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # IronBee Verify
8
8
 
9
- Verify the current code changes in the browser.
9
+ Verify the current code changes through real tools — browser interaction for frontend, runtime-specific debugger for any enabled backend cycle.
10
10
 
11
11
  ## Usage
12
- - `/ironbee-verify` — **default** — focus on what changed, visual + functional checks on affected areas
12
+ - `/ironbee-verify` — **default** — focus on what changed, visual + functional checks on affected areas (browser-cycle modes; any enabled backend-runtime cycle runs alongside automatically — see runtime section below)
13
13
  - `/ironbee-verify full` — **full scope** — entire application, all checklists, edge cases, responsive, accessibility deep dive
14
14
  - `/ironbee-verify visual` — **visual only** — contrast, layout, spacing, fonts, images, theming
15
15
  - `/ironbee-verify functional` — **functional only** — clicks, forms, navigation, data flow, error handling
16
16
 
17
+ 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.
18
+
17
19
  If no argument is given, use **default** mode.
18
20
 
19
21
  ---
@@ -23,9 +25,9 @@ If no argument is given, use **default** mode.
23
25
  1. **Start verification**: Run `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` via terminal
24
26
  2. **Build and start** the application if not already running
25
27
  3. **For EVERY page you visit**, repeat this cycle:
26
- a. **Navigate** using browser-devtools MCP tools
27
- b. **Take a FULL PAGE screenshot** with `fullPage: true`
28
- c. **Take an ARIA snapshot** to capture the page structure
28
+ a. **Navigate** using `MCP:bdt_navigation_go-to`
29
+ b. **Take a FULL PAGE screenshot** using `MCP:bdt_content_take-screenshot` with `fullPage: true`
30
+ c. **Take an ARIA snapshot** using `MCP:bdt_a11y_take-aria-snapshot`
29
31
  d. **STOP and visually analyze the screenshot** — switch your focus entirely to finding visual problems. Look at this screenshot as if your ONLY job is to find visual defects:
30
32
  **WARNING: ARIA reports DOM content, not what the user actually sees.** Do NOT assume the page looks correct just because ARIA shows the right content. Only the screenshot tells you what the user actually sees.
31
33
  - Text readability — is it readable against its background? Look for text that blends in or poor contrast
@@ -39,13 +41,14 @@ If no argument is given, use **default** mode.
39
41
  e. **Read the ARIA snapshot** — verify headings, labels, landmarks, and structure
40
42
  f. If anything looks wrong → note it as an issue
41
43
  4. **Functionally test** — run the checklist for your mode (see below). After each significant interaction, take another screenshot and repeat the visual analysis.
42
- 5. **Check console** for errors
44
+ 5. **Check console** for errors using `MCP:bdt_o11y_get-console-messages`
43
45
  6. **Stop** the dev server when verification is complete
44
- 7. **Submit your verdict** via terminal:
46
+ 7. **If recording was started, stop it now** — `MCP:bdt_content_stop-recording`. submit-verdict rejects with `"recording is still active"` when this step is skipped. (Recording is a server-side opt-in via `recording.enable` — when on, the gate forces `MCP:bdt_content_start-recording` BEFORE the steps above and demands the matching stop here.)
47
+ 8. **Submit your verdict** via terminal:
45
48
  - Pass: `echo '{"session_id":"...","status":"pass","pages_tested":[...],"checks":[...],"console_errors":0,"network_failures":0}' | ironbee hook submit-verdict`
46
49
  - Fail: `echo '{"session_id":"...","status":"fail","pages_tested":[...],"checks":[...],"console_errors":N,"network_failures":N,"issues":["describe what failed"]}' | ironbee hook submit-verdict`
47
- 8. **If failed** → collect ALL issues first (finish testing all affected pages), submit one fail verdict with all issues, then fix everything, rebuild, and re-verify. Do not fix one issue at a time — batch fixes to avoid repeated build/restart cycles.
48
- 9. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed
50
+ 9. **If failed** → collect ALL issues first (finish testing all affected pages), submit one fail verdict with all issues, then fix everything, rebuild, and re-verify. Do not fix one issue at a time — batch fixes to avoid repeated build/restart cycles.
51
+ 10. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed
49
52
 
50
53
  ---
51
54
 
@@ -131,3 +134,8 @@ Your `checks` array must list **specific observations**, not generic statements:
131
134
  - ALWAYS submit a verdict after every verification attempt — both pass AND fail
132
135
  - Do NOT edit code before submitting a fail verdict
133
136
  - **Noticing a bug and submitting pass is the #1 violation** — if you see it, fail it
137
+
138
+ ---
139
+
140
+ <!--IRONBEE:RUNTIME:node-->
141
+ <!--/IRONBEE:RUNTIME:node-->
@@ -0,0 +1,33 @@
1
+ <!-- Node backend verification is ENABLED for this project. -->
2
+
3
+ ## Backend Node Mode (when `backend.node.verifyPatterns` matches an edited file)
4
+
5
+ > **Precondition: the backend must actually be Node.js.** If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., this section does NOT apply — `MCP:ndt_*` tools won't connect to non-Node processes. Just do browser verification.
6
+
7
+ If the project has node backend verification enabled (`ironbee enable-backend node` once at setup, by an operator who confirmed the backend is Node.js) and your edits touch matching paths (e.g. `server/**`, `pages/api/**`), the stop hook also enforces a Node cycle. The same `verification-start` covers both cycles; the same verdict file carries fields for both.
8
+
9
+ ### Steps (additive to the browser flow above)
10
+ 1. **Identify the running Node process** — note its PID, container name (`docker compose ps`), or inspector port.
11
+ 2. **Connect**: `MCP:ndt_debug_connect` with one of `pid` / `processName` / `containerId` / `containerName` / `inspectorPort` / `wsUrl`. Inspector is auto-activated via SIGUSR1 if needed.
12
+ 3. **Pick an evidence path** for each changed code path:
13
+ - **Probe path** (proves the code path executed): `MCP:ndt_debug_put-tracepoint` (or `put-logpoint` / `put-exceptionpoint`) at the changed code, exercise the path (e.g. trigger the API call from the browser), then `MCP:ndt_debug_get-probe-snapshots`. At least one probe must come back with `triggered: true`.
14
+ - **Log path** (proves no errors): exercise the path, then `MCP:ndt_debug_get-logs` with the error level filter. `backend_node_log_errors` must be empty for `status: pass`.
15
+ 4. **Disconnect** (optional): `MCP:ndt_debug_disconnect`.
16
+ 5. **Submit verdict** including `backend_node_*` fields. If browser cycle is also active, include browser fields in the SAME verdict — do not submit two verdicts.
17
+
18
+ ### Verdict (node-cycle fields)
19
+ ```json
20
+ {
21
+ "session_id": "...",
22
+ "status": "pass",
23
+ "checks": ["POST /api/orders returned 201", "tracepoint at handler.ts:42 fired once"],
24
+ "backend_node_processes_connected": ["pid:12345 (next-server)"],
25
+ "backend_node_probes_set": [
26
+ { "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
27
+ ],
28
+ "backend_node_probe_snapshots_collected": 1,
29
+ "backend_node_log_errors": []
30
+ }
31
+ ```
32
+
33
+ For a multi-cycle pass, both browser and node criteria must hold — claiming `pass` without one cycle's evidence will be overridden to fail by the gate.
@@ -0,0 +1,29 @@
1
+ <!-- Node backend verification is ENABLED for this project. The stop hook
2
+ enforces a node cycle in addition to the browser cycle whenever an
3
+ edited file matches `backend.node.verifyPatterns`. -->
4
+
5
+ ## Node cycle
6
+
7
+ Backend file changes IF the file matches `backend.node.verifyPatterns` ALSO require verification through the **node-devtools** MCP server (prefix `MCP:ndt_*`). Node-cycle verification means attaching to the running Node process via the V8 inspector, setting a probe (tracepoint / logpoint / exceptionpoint) at the changed code, exercising the path so the probe fires, and reading snapshots — OR inspecting runtime error logs.
8
+
9
+ Both cycles can be active simultaneously (e.g. you edit both a React component and an API handler in the same task). One `verification-start` covers all active cycles; one verdict file carries fields for all active cycles; one retry counter applies globally.
10
+
11
+ ### ⚠️ `node-devtools` is ONLY for Node.js backends
12
+
13
+ `node-devtools` is a V8 inspector wrapper. It does NOT work for Java, Python, Go, Rust, Ruby, .NET, PHP, or any other runtime. If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., the backend is NOT Node.js and you must NOT call `MCP:ndt_*` tools — they will fail to connect to non-Node processes.
14
+
15
+ **Misconfiguration recovery.** If you reach this state, the operator enabled the node cycle for a non-Node project by mistake. The stop hook will keep blocking with `incomplete_tools` for the node cycle until you call `MCP:ndt_debug_connect` (which will fail) or until `maxRetries` is exhausted. Don't attempt the connection. Instead, stop and clearly report to the user: the project's backend is not Node.js, and they must run `ironbee disable-backend node` to unblock the gate. Continue with browser-cycle verification only in the meantime.
16
+
17
+ ### Node-cycle additions to the main flow
18
+
19
+ These attach to the **Required steps** above — they don't replace any step. Numbering follows the main flow:
20
+
21
+ - **Within step 3 (run flow):** also run the node flow: connect (`MCP:ndt_debug_connect`) → set probe (`MCP:ndt_debug_put-tracepoint` / `put-logpoint` / `put-exceptionpoint`) AND exercise + read snapshots (`MCP:ndt_debug_get-probe-snapshots`), OR exercise + read logs (`MCP:ndt_debug_get-logs`). When both browser and node cycles are active, run BOTH within the same verification cycle.
22
+ - **Within step 6 (submit verdict):** include `backend_node_*` fields (`backend_node_processes_connected` non-empty, plus `backend_node_probes_set` and/or `backend_node_log_errors`). One verdict carries fields for every active cycle.
23
+
24
+ ### Additional BANNED for node cycle
25
+
26
+ - Calling `MCP:ndt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
27
+ - **Calling `MCP:ndt_*` tools when the project's backend is NOT Node.js** (Java / Python / Go / Rust / .NET / Ruby / PHP / Elixir / etc.). Use the browser cycle only for non-Node backends.
28
+ - Claiming `status: pass` for a node cycle when no probe triggered AND `backend_node_log_errors` was never collected.
29
+ - Submitting a node-only verdict that omits `backend_node_processes_connected` — every node-cycle verdict requires this field non-empty.
@@ -0,0 +1,77 @@
1
+ <!-- Node backend verification is ENABLED for this project. The stop hook
2
+ enforces a node cycle in addition to the browser cycle whenever an
3
+ edited file matches `backend.node.verifyPatterns`. -->
4
+
5
+ ## ⚠️ CRITICAL: when NOT to use node-devtools
6
+
7
+ **`node-devtools` is ONLY for Node.js backends.** It is a V8 inspector wrapper (`node --inspect` attach via PID / inspector port / Docker container). It does **NOT** work with any other runtime. Do **NOT** call `MCP:ndt_*` tools for projects whose backend is:
8
+ - Java (Spring, Quarkus, Micronaut, …) — use the JVM debugger, not supported by IronBee yet
9
+ - Python (FastAPI, Django, Flask, …) — not supported yet
10
+ - Go, Rust, Ruby, .NET, PHP, Elixir, Kotlin/JVM, Swift — not supported yet
11
+
12
+ **How to tell whether the backend is Node.js:**
13
+ - `package.json` is the main project manifest, with `"type": "module"` or `"engines": { "node": ... }`, or scripts that run `node`/`tsx`/`ts-node`.
14
+ - The dev server command is `npm run dev`, `next dev`, `nest start`, `nodemon`, etc.
15
+
16
+ If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `Gemfile`, `composer.json`, `*.csproj` — the backend is NOT Node.js. Do NOT call any `MCP:ndt_*` tools.
17
+
18
+ **Misconfiguration recovery.** If you read this section it means the operator enabled the node cycle for this project. If the backend isn't actually Node.js, this was a mistake — the stop hook will keep blocking the gate (with `incomplete_tools` for the node cycle) until you call `MCP:ndt_debug_connect` (which will fail) or `maxRetries` is exhausted. Don't attempt the connection. Stop and tell the user clearly: the project's backend is not Node.js; ask them to run `ironbee disable-backend node` to unblock the gate. Continue with browser-cycle verification only in the meantime.
19
+
20
+ ## Node flow
21
+
22
+ 1. **Identify the running Node process** — note its PID, container name (`docker compose ps`), or inspector port.
23
+ 2. **Connect**: `MCP:ndt_debug_connect` with one of `pid` / `processName` / `containerId` / `containerName` / `inspectorPort` / `wsUrl`. SIGUSR1 is auto-sent if the inspector isn't on; for Docker, it goes through `docker exec`.
24
+ 3. **Pick an evidence path** per changed code path:
25
+ - **Probe path** (proves the code path executed):
26
+ - Set a probe at the changed location: `MCP:ndt_debug_put-tracepoint` (checkpoint), `MCP:ndt_debug_put-logpoint` (logged expression), or `MCP:ndt_debug_put-exceptionpoint` (caught/uncaught exception).
27
+ - **Exercise the path** (e.g. send a request from the browser, run a CLI command, post to a queue) — without this the probe never fires.
28
+ - Read collected snapshots: `MCP:ndt_debug_get-probe-snapshots`. At least one probe must come back with `triggered: true`.
29
+ - **Log path** (proves no errors during execution):
30
+ - Exercise the path.
31
+ - Read errors: `MCP:ndt_debug_get-logs` with the error-level filter. `backend_node_log_errors` must be empty for `status: pass`.
32
+ 4. **Disconnect** (optional): `MCP:ndt_debug_disconnect`.
33
+
34
+ ### Node verdict fields
35
+ ```json
36
+ {
37
+ "session_id": "<sid>",
38
+ "status": "pass",
39
+ "checks": ["POST /api/orders returned 201", "tracepoint at handler.ts:42 fired once"],
40
+ "backend_node_processes_connected": ["pid:12345 (next-server)"],
41
+ "backend_node_probes_set": [
42
+ { "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
43
+ ],
44
+ "backend_node_probe_snapshots_collected": 1,
45
+ "backend_node_log_errors": []
46
+ }
47
+ ```
48
+
49
+ For `status: "pass"` (node cycle):
50
+ - If probes were set, at least one must have `triggered: true` (proves the code path executed).
51
+ - If only logs were used, `backend_node_log_errors.length === 0` (no errors observed).
52
+ - If both forms were used, both conditions must hold.
53
+
54
+ ## Multi-cycle (browser + node simultaneously)
55
+
56
+ Common case: in the same task you edit a `.tsx` component (browser-cycle) and a `server/api/*.ts` handler (node-cycle). Both cycles activate. **Single** `verification-start`, **single** `verdict.json`, **single** retry counter cover both.
57
+
58
+ Submit ONE verdict carrying fields for every active cycle:
59
+
60
+ ```json
61
+ {
62
+ "session_id": "<sid>",
63
+ "status": "pass",
64
+ "pages_tested": ["http://localhost:3000/checkout"],
65
+ "checks": ["checkout submits", "POST /api/orders returned 201", "no console errors"],
66
+ "console_errors": 0,
67
+ "network_failures": 0,
68
+ "backend_node_processes_connected": ["pid:12345 (next-server)"],
69
+ "backend_node_probes_set": [
70
+ { "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
71
+ ],
72
+ "backend_node_probe_snapshots_collected": 1,
73
+ "backend_node_log_errors": []
74
+ }
75
+ ```
76
+
77
+ For a multi-cycle `pass`, BOTH cycles' pass criteria must hold. Claiming `pass` without one cycle's evidence will be overridden to `fail` by the gate.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Cursor — activity-end hook adapter (monitoring-only mode).
3
+ *
4
+ * stop hook for sessions where verification is disabled. Closes the active
5
+ * activity and triggers a background queue flush so accumulated `send_event`
6
+ * jobs ship to the collector before the next turn starts.
7
+ *
8
+ * Replaces `verify-gate` on stop when `verification.enable: false`. The two
9
+ * are mutually exclusive at install time — only one stop handler is registered
10
+ * per session. Unlike verify-gate, this hook never emits a followup_message
11
+ * (no enforcement) — it returns an empty JSON object.
12
+ */
13
+ export declare function run(projectDir: string): Promise<void>;
14
+ //# sourceMappingURL=activity-end.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-end.d.ts","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/activity-end.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B3D"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ /**
3
+ * Cursor — activity-end hook adapter (monitoring-only mode).
4
+ *
5
+ * stop hook for sessions where verification is disabled. Closes the active
6
+ * activity and triggers a background queue flush so accumulated `send_event`
7
+ * jobs ship to the collector before the next turn starts.
8
+ *
9
+ * Replaces `verify-gate` on stop when `verification.enable: false`. The two
10
+ * are mutually exclusive at install time — only one stop handler is registered
11
+ * per session. Unlike verify-gate, this hook never emits a followup_message
12
+ * (no enforcement) — it returns an empty JSON object.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.run = run;
16
+ const activity_end_1 = require("../../../hooks/core/activity-end");
17
+ const logger_1 = require("../../../lib/logger");
18
+ const output_1 = require("../../../lib/output");
19
+ const stdin_1 = require("../../../lib/stdin");
20
+ const hook_trigger_1 = require("../../../analytics/hook-trigger");
21
+ async function run(projectDir) {
22
+ let input;
23
+ try {
24
+ input = JSON.parse((0, stdin_1.readStdin)());
25
+ }
26
+ catch (e) {
27
+ logger_1.logger.debug(`failed to parse stdin: ${e}`);
28
+ (0, output_1.writeAndExit)(JSON.stringify({}), 0);
29
+ return;
30
+ }
31
+ const sessionId = input.conversation_id ?? "default";
32
+ const sessionDir = `${projectDir}/.ironbee/sessions/${sessionId}`;
33
+ const actionsFile = `${sessionDir}/actions.jsonl`;
34
+ (0, logger_1.setLogFile)(`${sessionDir}/session.log`);
35
+ await (0, activity_end_1.runActivityEnd)({ sessionDir, actionsFile, projectDir, sessionId });
36
+ // Analytics trigger — fail-safe; Cursor transcript path TBD (§9).
37
+ (0, hook_trigger_1.runAnalyticsTrigger)({
38
+ projectDir,
39
+ sessionId,
40
+ triggerType: "Stop",
41
+ transcriptSource: "cursor",
42
+ });
43
+ (0, output_1.writeAndExit)(JSON.stringify({}), 0);
44
+ }
45
+ //# sourceMappingURL=activity-end.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-end.js","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/activity-end.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAYH,kBA0BC;AApCD,mEAAkE;AAClE,gDAAyD;AACzD,gDAAmD;AACnD,8CAA+C;AAC/C,kEAAsE;AAM/D,KAAK,UAAU,GAAG,CAAC,UAAkB;IACxC,IAAI,KAA0B,CAAC;IAC/B,IAAI,CAAC;QACD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAS,GAAE,CAAwB,CAAC;IAC3D,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC5C,IAAA,qBAAY,EAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,OAAO;IACX,CAAC;IAED,MAAM,SAAS,GAAW,KAAK,CAAC,eAAe,IAAI,SAAS,CAAC;IAC7D,MAAM,UAAU,GAAW,GAAG,UAAU,sBAAsB,SAAS,EAAE,CAAC;IAC1E,MAAM,WAAW,GAAW,GAAG,UAAU,gBAAgB,CAAC;IAC1D,IAAA,mBAAU,EAAC,GAAG,UAAU,cAAc,CAAC,CAAC;IAExC,MAAM,IAAA,6BAAc,EAAC,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;IAEzE,kEAAkE;IAClE,IAAA,kCAAmB,EAAC;QAChB,UAAU;QACV,SAAS;QACT,WAAW,EAAE,MAAM;QACnB,gBAAgB,EAAE,QAAQ;KAC7B,CAAC,CAAC;IAEH,IAAA,qBAAY,EAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACxC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Cursor — require-verdict hook adapter
3
3
  *
4
4
  * preToolUse hook for Write|StrReplace|Delete — blocks file edits
5
- * if the agent used browser-devtools tools but hasn't submitted a verdict
5
+ * if the agent used any devtools tools (browser-devtools or node-devtools) but hasn't submitted a verdict
6
6
  * yet. Forces the agent to submit a fail verdict before fixing code.
7
7
  *
8
8
  * Side effect: when `tool_name === "Write"`, stashes whether the target
@@ -3,7 +3,7 @@
3
3
  * Cursor — require-verdict hook adapter
4
4
  *
5
5
  * preToolUse hook for Write|StrReplace|Delete — blocks file edits
6
- * if the agent used browser-devtools tools but hasn't submitted a verdict
6
+ * if the agent used any devtools tools (browser-devtools or node-devtools) but hasn't submitted a verdict
7
7
  * yet. Forces the agent to submit a fail verdict before fixing code.
8
8
  *
9
9
  * Side effect: when `tool_name === "Write"`, stashes whether the target
@@ -41,10 +41,10 @@ async function run(projectDir) {
41
41
  if ((0, actions_1.hasToolCallsSinceLastVerdict)(actionsFile)) {
42
42
  const output = {
43
43
  permission: "deny",
44
- agent_message: `BLOCKED: You used browser-devtools tools but did not submit a verdict. You MUST submit a verdict (pass or fail) before editing code.
44
+ agent_message: `BLOCKED: You used verification tools (browser-devtools or node-devtools) but did not submit a verdict. You MUST submit a verdict (pass or fail) before editing code.
45
45
 
46
- Submit your verdict first:
47
- echo '{"session_id":"${sessionId}","status":"fail","pages_tested":[...],"checks":[...],"console_errors":0,"network_failures":0,"issues":["describe what failed"]}' | ironbee hook submit-verdict
46
+ Submit your verdict first (include cycle-appropriate fields — browser fields for bdt_*, backend_node_* fields for ndt_*):
47
+ echo '{"session_id":"${sessionId}","status":"fail","checks":[...],"issues":["describe what failed"], ...}' | ironbee hook submit-verdict
48
48
 
49
49
  Then you can edit code to fix the issues.`,
50
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"require-verification.d.ts","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/require-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA2BH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwG3D"}
1
+ {"version":3,"file":"require-verification.d.ts","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/require-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAkCH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8H3D"}
@@ -14,14 +14,20 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.run = run;
17
+ const crypto_1 = require("crypto");
17
18
  const session_state_1 = require("../../../hooks/core/session-state");
18
19
  const actions_1 = require("../../../hooks/core/actions");
19
20
  const activity_1 = require("../../../hooks/core/activity");
20
21
  const config_1 = require("../../../lib/config");
21
22
  const logger_1 = require("../../../lib/logger");
22
23
  const stdin_1 = require("../../../lib/stdin");
23
- /** MCP server key that this hook is routed to via the `MCP:bdt_.*` matcher. */
24
- const MCP_SERVER_NAME = "browser-devtools";
24
+ /** Prefix → MCP server lookup. Cursor's `MCP:<bare-tool>` wire has no server
25
+ * segment, so we identify by tool prefix (matcher widened to `MCP:(bdt|ndt)_.*`). */
26
+ const SERVER_BY_PREFIX = {
27
+ "MCP:bdt_": "browser-devtools",
28
+ "MCP:ndt_": "node-devtools",
29
+ };
30
+ const FALLBACK_MCP_SERVER_NAME = "browser-devtools";
25
31
  async function run(projectDir) {
26
32
  let input;
27
33
  try {
@@ -42,29 +48,38 @@ async function run(projectDir) {
42
48
  if (!verificationId) {
43
49
  const output = {
44
50
  permission: "deny",
45
- agent_message: `BLOCKED: You must start a verification cycle before using browser-devtools tools.
51
+ agent_message: `BLOCKED: You must start a verification cycle before using devtools tools (browser-devtools or node-devtools).
46
52
 
47
53
  Start verification first:
48
54
  echo '{"session_id":"${sessionId}"}' | ironbee hook verification-start
49
55
 
50
- Then use browser tools to verify your changes.`,
56
+ Then use the verification tools for the active cycle(s) — MCP:bdt_* for browser, MCP:ndt_* for node.`,
51
57
  };
52
58
  process.stdout.write(JSON.stringify(output));
53
59
  process.exit(2);
54
60
  return;
55
61
  }
56
- // enforce recording if required (allow recording start tool through)
62
+ // Recording enforcement is browser-only (§12). Node-devtools tools
63
+ // (MCP:ndt_*) bypass this check entirely.
57
64
  const toolName = input.tool_name ?? "";
65
+ const isBrowserDevToolsCall = toolName.startsWith("MCP:bdt_");
58
66
  const isRecordingStartTool = toolName.endsWith("bdt_content_start-recording");
59
- if ((0, session_state_1.isRecordingRequired)(sessionDir) && !(0, session_state_1.isRecordingActive)(sessionDir) && !isRecordingStartTool) {
67
+ if (isBrowserDevToolsCall &&
68
+ (0, session_state_1.isRecordingRequired)(sessionDir) &&
69
+ !(0, session_state_1.isRecordingActive)(sessionDir) &&
70
+ !isRecordingStartTool) {
60
71
  const output = {
61
72
  permission: "deny",
62
73
  agent_message: `BLOCKED: Recording is required but not started.
63
74
 
64
- Start recording first:
65
- Use bdt_content_start-recording to begin recording.
75
+ 1. Start recording NOW:
76
+ Use MCP:bdt_content_start-recording
66
77
 
67
- Then use other browser tools to verify your changes.`,
78
+ 2. Run the verification (navigate, screenshot, aria, console, etc.)
79
+
80
+ 3. **Stop recording BEFORE submitting verdict:**
81
+ Use MCP:bdt_content_stop-recording
82
+ submit-verdict will reject with "recording is still active" if you skip this.`,
68
83
  };
69
84
  process.stdout.write(JSON.stringify(output));
70
85
  process.exit(2);
@@ -91,17 +106,28 @@ Then use other browser tools to verify your changes.`,
91
106
  verificationId,
92
107
  traceId,
93
108
  traceState,
109
+ // Stable wire id for the tool_call event. The MCP server reads this
110
+ // and uses it as the `id` of the event it POSTs to the collector.
111
+ // `ironbee import` reads the same field from the transcript and
112
+ // reuses it as the event id, so live and offline-derived events
113
+ // collapse on `(session_id, id)` collector dedup.
114
+ toolCallId: (0, crypto_1.randomUUID)(),
94
115
  };
95
116
  if (input.tool_use_id) {
96
117
  metadata.toolUseId = input.tool_use_id;
97
118
  }
98
- // Cursor's postToolUse stdin doesn't expose the MCP server and its
99
- // tool_name format (`MCP:bdt_*`) has no server segment. But the
100
- // matcher restricts this hook to `MCP:bdt_.*` — i.e. we KNOW it's the
101
- // browser-devtools MCP server by virtue of routing. Hardcode the name
102
- // so MCP-emitted telemetry carries the same `mcp_server` dimension as
103
- // on the Claude adapter.
104
- metadata.mcpServer = MCP_SERVER_NAME;
119
+ // Cursor's preToolUse stdin doesn't expose the MCP server and its
120
+ // tool_name format (`MCP:<bare-tool>`) has no server segment. The
121
+ // matcher restricts this hook to `MCP:(bdt|ndt)_.*` — we identify the
122
+ // server by prefix lookup. Future runtimes extend SERVER_BY_PREFIX.
123
+ metadata.mcpServer = (() => {
124
+ for (const prefix of Object.keys(SERVER_BY_PREFIX)) {
125
+ if (toolName.startsWith(prefix)) {
126
+ return SERVER_BY_PREFIX[prefix];
127
+ }
128
+ }
129
+ return FALLBACK_MCP_SERVER_NAME;
130
+ })();
105
131
  const userEmail = (0, session_state_1.getUserEmail)(sessionDir);
106
132
  if (userEmail) {
107
133
  metadata.userEmail = userEmail;