@ironbee-ai/cli 0.8.3 → 0.9.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 (118) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +42 -17
  3. package/dist/analytics/projection.d.ts.map +1 -1
  4. package/dist/analytics/projection.js +28 -14
  5. package/dist/analytics/projection.js.map +1 -1
  6. package/dist/clients/claude/commands/ironbee-verify.md +19 -106
  7. package/dist/clients/claude/hooks/require-verdict.d.ts +3 -3
  8. package/dist/clients/claude/hooks/require-verdict.js +5 -5
  9. package/dist/clients/claude/hooks/require-verification.d.ts +6 -5
  10. package/dist/clients/claude/hooks/require-verification.d.ts.map +1 -1
  11. package/dist/clients/claude/hooks/require-verification.js +20 -17
  12. package/dist/clients/claude/hooks/require-verification.js.map +1 -1
  13. package/dist/clients/claude/hooks/track-action-monitor.d.ts.map +1 -1
  14. package/dist/clients/claude/hooks/track-action-monitor.js +4 -1
  15. package/dist/clients/claude/hooks/track-action-monitor.js.map +1 -1
  16. package/dist/clients/claude/hooks/track-action.d.ts +11 -8
  17. package/dist/clients/claude/hooks/track-action.d.ts.map +1 -1
  18. package/dist/clients/claude/hooks/track-action.js +14 -9
  19. package/dist/clients/claude/hooks/track-action.js.map +1 -1
  20. package/dist/clients/claude/index.d.ts.map +1 -1
  21. package/dist/clients/claude/index.js +79 -18
  22. package/dist/clients/claude/index.js.map +1 -1
  23. package/dist/clients/claude/platforms/command-verify.backend.md +74 -0
  24. package/dist/clients/claude/platforms/command-verify.browser.md +108 -0
  25. package/dist/clients/claude/platforms/command-verify.node.md +67 -0
  26. package/dist/clients/claude/platforms/rule.backend.md +23 -0
  27. package/dist/clients/claude/platforms/rule.browser.md +17 -0
  28. package/dist/clients/claude/{fragments → platforms}/rule.node.md +3 -3
  29. package/dist/clients/claude/platforms/skill.backend.md +65 -0
  30. package/dist/clients/claude/platforms/skill.browser.md +31 -0
  31. package/dist/clients/claude/{fragments → platforms}/skill.node.md +2 -2
  32. package/dist/clients/claude/rules/ironbee-verification.md +14 -13
  33. package/dist/clients/claude/skills/ironbee-verification.md +19 -49
  34. package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +21 -108
  35. package/dist/clients/cursor/hooks/require-verdict.d.ts +1 -1
  36. package/dist/clients/cursor/hooks/require-verdict.js +3 -3
  37. package/dist/clients/cursor/hooks/require-verification.d.ts.map +1 -1
  38. package/dist/clients/cursor/hooks/require-verification.js +9 -5
  39. package/dist/clients/cursor/hooks/require-verification.js.map +1 -1
  40. package/dist/clients/cursor/hooks/track-action-monitor.d.ts.map +1 -1
  41. package/dist/clients/cursor/hooks/track-action-monitor.js +4 -1
  42. package/dist/clients/cursor/hooks/track-action-monitor.js.map +1 -1
  43. package/dist/clients/cursor/hooks/track-action.d.ts +14 -12
  44. package/dist/clients/cursor/hooks/track-action.d.ts.map +1 -1
  45. package/dist/clients/cursor/hooks/track-action.js +25 -16
  46. package/dist/clients/cursor/hooks/track-action.js.map +1 -1
  47. package/dist/clients/cursor/index.d.ts.map +1 -1
  48. package/dist/clients/cursor/index.js +45 -11
  49. package/dist/clients/cursor/index.js.map +1 -1
  50. package/dist/clients/cursor/platforms/command-verify.backend.md +74 -0
  51. package/dist/clients/cursor/platforms/command-verify.browser.md +108 -0
  52. package/dist/clients/cursor/platforms/command-verify.node.md +67 -0
  53. package/dist/clients/cursor/platforms/rule.backend.md +23 -0
  54. package/dist/clients/cursor/platforms/rule.browser.md +17 -0
  55. package/dist/clients/cursor/{fragments → platforms}/rule.node.md +3 -3
  56. package/dist/clients/cursor/platforms/skill.backend.md +65 -0
  57. package/dist/clients/cursor/platforms/skill.browser.md +31 -0
  58. package/dist/clients/cursor/{fragments → platforms}/skill.node.md +2 -2
  59. package/dist/clients/cursor/rules/ironbee-verification.mdc +14 -13
  60. package/dist/clients/cursor/skills/ironbee-verification.md +19 -49
  61. package/dist/commands/backend.d.ts +17 -0
  62. package/dist/commands/backend.d.ts.map +1 -0
  63. package/dist/commands/backend.js +58 -0
  64. package/dist/commands/backend.js.map +1 -0
  65. package/dist/commands/browser.d.ts +19 -0
  66. package/dist/commands/browser.d.ts.map +1 -0
  67. package/dist/commands/browser.js +60 -0
  68. package/dist/commands/browser.js.map +1 -0
  69. package/dist/commands/config.d.ts +5 -5
  70. package/dist/commands/config.d.ts.map +1 -1
  71. package/dist/commands/config.js +13 -11
  72. package/dist/commands/config.js.map +1 -1
  73. package/dist/commands/cycle-toggle.d.ts +89 -0
  74. package/dist/commands/cycle-toggle.d.ts.map +1 -0
  75. package/dist/commands/cycle-toggle.js +264 -0
  76. package/dist/commands/cycle-toggle.js.map +1 -0
  77. package/dist/commands/node.d.ts +16 -0
  78. package/dist/commands/node.d.ts.map +1 -0
  79. package/dist/commands/node.js +57 -0
  80. package/dist/commands/node.js.map +1 -0
  81. package/dist/hooks/core/actions.d.ts +11 -2
  82. package/dist/hooks/core/actions.d.ts.map +1 -1
  83. package/dist/hooks/core/actions.js.map +1 -1
  84. package/dist/hooks/core/verify-gate.d.ts.map +1 -1
  85. package/dist/hooks/core/verify-gate.js +44 -14
  86. package/dist/hooks/core/verify-gate.js.map +1 -1
  87. package/dist/import/claude/transcript-walk.d.ts.map +1 -1
  88. package/dist/import/claude/transcript-walk.js +10 -2
  89. package/dist/import/claude/transcript-walk.js.map +1 -1
  90. package/dist/index.js +9 -6
  91. package/dist/index.js.map +1 -1
  92. package/dist/lib/config.d.ts +142 -41
  93. package/dist/lib/config.d.ts.map +1 -1
  94. package/dist/lib/config.js +251 -82
  95. package/dist/lib/config.js.map +1 -1
  96. package/dist/lib/platform-section.d.ts +126 -0
  97. package/dist/lib/platform-section.d.ts.map +1 -0
  98. package/dist/lib/platform-section.js +279 -0
  99. package/dist/lib/platform-section.js.map +1 -0
  100. package/package.json +1 -1
  101. package/dist/clients/claude/fragments/command-verify.node.md +0 -33
  102. package/dist/clients/cursor/fragments/command-verify.node.md +0 -33
  103. package/dist/commands/backend-toggle.d.ts +0 -56
  104. package/dist/commands/backend-toggle.d.ts.map +0 -1
  105. package/dist/commands/backend-toggle.js +0 -199
  106. package/dist/commands/backend-toggle.js.map +0 -1
  107. package/dist/commands/disable-backend.d.ts +0 -14
  108. package/dist/commands/disable-backend.d.ts.map +0 -1
  109. package/dist/commands/disable-backend.js +0 -38
  110. package/dist/commands/disable-backend.js.map +0 -1
  111. package/dist/commands/enable-backend.d.ts +0 -15
  112. package/dist/commands/enable-backend.d.ts.map +0 -1
  113. package/dist/commands/enable-backend.js +0 -39
  114. package/dist/commands/enable-backend.js.map +0 -1
  115. package/dist/lib/runtime-section.d.ts +0 -118
  116. package/dist/lib/runtime-section.d.ts.map +0 -1
  117. package/dist/lib/runtime-section.js +0 -256
  118. package/dist/lib/runtime-section.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ <!-- Backend protocol verification is ENABLED for this project. The Stop hook
2
+ enforces a backend cycle in addition to the browser cycle whenever an
3
+ edited file matches `backend.verifyPatterns`. -->
4
+
5
+ ## Backend cycle (runtime-agnostic protocol verification)
6
+
7
+ When the file matches `backend.verifyPatterns`, the Stop hook ALSO requires verification through the **backend-devtools** MCP server (prefix `bedt_`). Backend-cycle verification means making a real protocol call (HTTP / gRPC / GraphQL / WebSocket) against the running service and inspecting the response — language- and framework-independent.
8
+
9
+ The backend cycle and the node cycle are **independent**. Node attaches to a Node.js V8 inspector with non-blocking probes (`ndt_*`); backend drives wire protocols from outside (`bedt_*`). They can be active in the same task; both must be satisfied for `status: pass`.
10
+
11
+ ### Backend-cycle additions to the main flow
12
+
13
+ These attach to the **Required steps** above — they don't replace any step. Numbering follows the main flow:
14
+
15
+ - **Within step 3 (run flow):** also run the backend flow: identify the affected endpoint(s) → call the matching protocol tool (`bedt_request_http` / `bedt_request_grpc` / `bedt_request_graphql` / `bedt_request_websocket-open` / `bedt_request_replay`) → inspect status / body / `traceId` → chain follow-up calls when verifying side effects. **A 4xx / 5xx response is a normal result, not an error** — only transport failures populate the `error` field.
16
+ - **Within step 6 (submit verdict):** include `backend_endpoints_called` (the only required backend field), and optionally `backend_response_statuses` and `backend_traces_collected`. One verdict carries fields for every active cycle.
17
+
18
+ ### Additional BANNED for backend cycle
19
+
20
+ - Calling `bedt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
21
+ - Treating a 4xx / 5xx response as a transport failure when the test was specifically asking for that error condition (e.g. "POST should reject malformed body with 400"). Decide PASS/FAIL based on the test's intent, not the status code's HTTP-class default.
22
+ - Submitting a backend-only verdict that omits `backend_endpoints_called` — any non-empty list of endpoints driven during verification is required.
23
+ - Inferring backend behavior by reading code without making a real protocol call. The cycle is satisfied only by actually exercising the wire protocol.
@@ -0,0 +1,17 @@
1
+ <!-- Browser cycle verification is ENABLED for this project. The stop hook
2
+ enforces a browser cycle whenever an edited file matches
3
+ `browser.verifyPatterns`. -->
4
+
5
+ **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.
6
+
7
+ ## Browser flow steps
8
+
9
+ Run the **Browser cycle** flow when an edited file activates it: 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.
10
+
11
+ - 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 the steps above.
12
+ - Pass verdict carries `pages_tested`, `checks`, `console_errors`, `network_failures`. `status: pass` requires `console_errors === 0` AND `network_failures === 0`.
13
+
14
+ ## Browser-cycle BANNED
15
+
16
+ - Calling `MCP:bdt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
17
+ - **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.
@@ -1,10 +1,10 @@
1
1
  <!-- Node backend verification is ENABLED for this project. The stop hook
2
2
  enforces a node cycle in addition to the browser cycle whenever an
3
- edited file matches `backend.node.verifyPatterns`. -->
3
+ edited file matches `node.verifyPatterns`. -->
4
4
 
5
5
  ## Node cycle
6
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.
7
+ Backend file changes IF the file matches `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
8
 
9
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
10
 
@@ -12,7 +12,7 @@ Both cycles can be active simultaneously (e.g. you edit both a React component a
12
12
 
13
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
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.
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 node disable` to unblock the gate. Continue with browser-cycle verification only in the meantime.
16
16
 
17
17
  ### Node-cycle additions to the main flow
18
18
 
@@ -0,0 +1,65 @@
1
+ <!-- Backend protocol verification is ENABLED for this project. The Stop hook
2
+ enforces a backend cycle in addition to the browser cycle whenever an
3
+ edited file matches `backend.verifyPatterns`. The cycle is runtime- and
4
+ language-agnostic — it binds to wire protocols, not frameworks. -->
5
+
6
+ ## Backend cycle — runtime- and language-agnostic
7
+
8
+ The **backend protocol cycle** verifies backend changes by driving real protocol calls (HTTP / gRPC / GraphQL / WebSocket) against the running service and reading the responses. It works for ANY backend runtime: Node, Java, Python, Go, Rust, Ruby, .NET, PHP, Elixir, Kotlin, Scala — the agent never attaches to a process; it just calls endpoints.
9
+
10
+ **This is different from the node cycle.** Node-cycle (`ndt_*`) attaches to a V8 inspector and sets non-blocking probes inside a running Node.js process — it's Node-only. Backend-cycle (`bedt_*`) makes outside-in protocol calls against any service. They can be active at the same time when both are enabled.
11
+
12
+ ## Backend flow
13
+
14
+ 1. **Confirm a backend service is running** (the user's dev server, Docker compose, k8s port-forward, …). The agent itself does not start the service — ask the user if uncertain.
15
+ 2. **Identify the affected endpoint(s)** for your code change. Look at routes / handlers / controllers in the changed files. Map them to wire-level addresses (URL, gRPC service+method, GraphQL operation name, WebSocket path).
16
+ 3. **Make a real protocol call** with one of:
17
+ - **HTTP/1.1 + HTTP/2**: `MCP:bedt_request_http` — full method/headers/body/query/follow-redirects support; ALPN auto-negotiates H2 on TLS, falls back to H1.1.
18
+ - **gRPC**: `MCP:bedt_request_grpc` — unary + 3 streaming modes; pass `.proto` text or descriptor.
19
+ - **GraphQL**: `MCP:bedt_request_graphql` — query/mutation, variables, persisted query support.
20
+ - **WebSocket** (stateful — open/send/receive/close cycle):
21
+ - `MCP:bedt_request_websocket-open` — establish session.
22
+ - `MCP:bedt_request_websocket-send` / `bedt_request_websocket-receive` — exchange frames.
23
+ - `MCP:bedt_request_websocket-close` — clean teardown (and `bedt_request_websocket-list` for running sessions).
24
+ - **Replay**: `MCP:bedt_request_replay` — re-issue a captured curl command or HAR entry.
25
+ 4. **Inspect the response** — `status` (HTTP / gRPC code), body, headers, returned `traceId` (always W3C `traceparent`).
26
+ **`4xx/5xx and gRPC non-OK are normal results, not errors.** A test for "404 Not Found" SHOULD return 404. Only transport-level failures (DNS, TLS, timeout, abort) populate the response's `error` field. Decide PASS/FAIL based on what your task actually requires.
27
+ 5. **Chain follow-up calls** if you need to verify side effects (e.g. POST then GET to confirm the new resource is readable). Use `bedt_request_set-default-headers` to pin auth tokens once per host, `bedt_request_set-cookies` for session cookies — both stay scoped to that target across calls.
28
+ 6. **Submit verdict** including `backend_*` fields. If browser and/or node cycles are also active, include their fields in the SAME verdict — do not submit two verdicts.
29
+
30
+ ### Backend verdict fields
31
+ ```json
32
+ {
33
+ "session_id": "<sid>",
34
+ "status": "pass",
35
+ "checks": ["POST /api/orders returned 201 with order id", "GET /api/orders/:id reflects new order"],
36
+ "backend_endpoints_called": [
37
+ "POST http://localhost:3000/api/orders",
38
+ "GET http://localhost:3000/api/orders/42"
39
+ ],
40
+ "backend_response_statuses": [201, 200],
41
+ "backend_traces_collected": ["00-1234abcd-...01"]
42
+ }
43
+ ```
44
+
45
+ `backend_endpoints_called` is the only required field for the cycle (any non-empty array proves the agent engaged the protocol layer). `backend_response_statuses` and `backend_traces_collected` are optional but strongly recommended — same order as `backend_endpoints_called`. Status interpretation is YOUR call: there is no automatic pass-criteria override on this cycle. If the agent claims `status: pass` and the evidence is structurally valid, the gate honors it.
46
+
47
+ ## Multi-cycle (browser + backend, or browser + node + backend)
48
+
49
+ Common case: a feature edit touches a `.tsx` page (browser-cycle) and a `routes/orders.ts` (node-cycle if Node.js, plus backend-cycle for protocol verification when `backend` is enabled). All active cycles must be satisfied for `status: pass`. **Single** `verification-start`, **single** verdict, **single** retry counter cover all of them.
50
+
51
+ ```json
52
+ {
53
+ "session_id": "<sid>",
54
+ "status": "pass",
55
+ "pages_tested": ["http://localhost:3000/checkout"],
56
+ "checks": ["checkout submits", "POST /api/orders returned 201", "no console errors"],
57
+ "console_errors": 0,
58
+ "network_failures": 0,
59
+ "backend_endpoints_called": ["POST http://localhost:3000/api/orders"],
60
+ "backend_response_statuses": [201],
61
+ "backend_traces_collected": ["00-1234abcd-...01"]
62
+ }
63
+ ```
64
+
65
+ For a multi-cycle pass, EVERY active cycle's pass criteria must hold. Claiming `pass` without a cycle's evidence will be overridden to `fail`.
@@ -0,0 +1,31 @@
1
+ <!-- Browser cycle verification is ENABLED for this project. The stop hook
2
+ enforces a browser cycle whenever an edited file matches
3
+ `browser.verifyPatterns` (default: most code extensions). -->
4
+
5
+ ## Browser flow
6
+
7
+ > **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.** The same is enforced as step 6 of the Universal flow.
8
+
9
+ 1. **Navigate**: `MCP:bdt_navigation_go-to` — go to the affected page(s)
10
+ 2. **Interact**: actually exercise what changed — click buttons, fill forms, submit data, trigger workflows. Don't just look at the page.
11
+ 3. **Screenshot**: `MCP:bdt_content_take-screenshot` — capture the final visual state
12
+ 4. **Accessibility**: `MCP:bdt_a11y_take-aria-snapshot` — verify page structure
13
+ 5. **Console**: `MCP:bdt_o11y_get-console-messages` — check for errors
14
+
15
+ All four tools are MANDATORY (the stop hook checks each). Functional interaction is expected for every verification.
16
+
17
+ ### Browser verdict fields
18
+ ```json
19
+ {
20
+ "session_id": "<sid>",
21
+ "status": "pass",
22
+ "pages_tested": ["http://localhost:3000/page"],
23
+ "checks": ["form submits successfully", "new item appears in list", "no console errors"],
24
+ "console_errors": 0,
25
+ "network_failures": 0
26
+ }
27
+ ```
28
+
29
+ For `status: "pass"` (browser cycle): `console_errors === 0` AND `network_failures === 0`.
30
+
31
+ On fail, include `issues`. On pass after a previous fail, include `fixes`.
@@ -1,6 +1,6 @@
1
1
  <!-- Node backend verification is ENABLED for this project. The stop hook
2
2
  enforces a node cycle in addition to the browser cycle whenever an
3
- edited file matches `backend.node.verifyPatterns`. -->
3
+ edited file matches `node.verifyPatterns`. -->
4
4
 
5
5
  ## ⚠️ CRITICAL: when NOT to use node-devtools
6
6
 
@@ -15,7 +15,7 @@
15
15
 
16
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
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.
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 node disable` to unblock the gate. Continue with browser-cycle verification only in the meantime.
19
19
 
20
20
  ## Node flow
21
21
 
@@ -1,15 +1,13 @@
1
1
  ---
2
- description: "MANDATORY verification after code changes — IronBee enforcement (browser + runtime cycles)"
2
+ description: "MANDATORY verification after code changes — IronBee enforcement (per-cycle verification gate)"
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
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 runs in **cycles** decided by file pattern match — you don't choose, the gate detects:
8
+ Verification runs in **cycles** decided by file-pattern match — you don't choose, the gate detects. Multiple cycles can run in parallel within a single stop hook; each one has its own activation patterns, tools, and verdict fields.
9
9
 
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.
11
-
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.
10
+ **See the platform sections near the bottom of this file** for which cycles are active for this project, the tools they expose, and the per-cycle verdict fields you must include.
13
11
 
14
12
  ## Application lifecycle
15
13
 
@@ -24,11 +22,9 @@ Skip start if already running. Fix build errors before proceeding. **Don't guess
24
22
 
25
23
  1. Build and start the application if not already running.
26
24
  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.
25
+ 3. **Run the per-cycle flow for every active cycle** see the platform sections near the bottom of this file. Multiple cycles can be active in the same stop run; every one of them must be exercised within this single verification cycle.
30
26
  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.
27
+ 5. **Honor any cycle-specific teardown** noted in the platform sections BEFORE submit-verdict.
32
28
  6. **IMMEDIATELY submit your verdict** — do NOT edit any code before submitting: `echo '<verdict-json>' | ironbee hook submit-verdict`.
33
29
  - Pass verdict carries fields for every active cycle. Fail verdict adds `issues`. Pass after fail adds `fixes`.
34
30
  - Status `pass` is overridden to fail by the gate when evidence doesn't back it.
@@ -46,8 +42,13 @@ Every file edit automatically clears your verdict, requiring re-verification.
46
42
  - Submitting a verdict without actually performing verification through real tools.
47
43
  - Submitting a verdict based on assumptions, code reading, or prior knowledge.
48
44
  - 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.
45
+ - Calling devtools tools for any cycle without first opening a verification cycle (`ironbee hook verification-start`).
46
+
47
+ <!--IRONBEE:PLATFORM:browser-->
48
+ <!--/IRONBEE:PLATFORM:browser-->
49
+
50
+ <!--IRONBEE:PLATFORM:node-->
51
+ <!--/IRONBEE:PLATFORM:node-->
51
52
 
52
- <!--IRONBEE:RUNTIME:node-->
53
- <!--/IRONBEE:RUNTIME:node-->
53
+ <!--IRONBEE:PLATFORM:backend-->
54
+ <!--/IRONBEE:PLATFORM:backend-->
@@ -3,31 +3,30 @@ name: ironbee-verification
3
3
  description: >
4
4
  MANDATORY verification after code changes. Activates when implementing features, fixing
5
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.
6
+ changes application behavior. Verification runs in cycles activated by file-pattern
7
+ match which cycles are wired up for this project is shown in the platform sections
8
+ near the bottom of this file. After every code edit you MUST verify the affected
9
+ cycle(s) through real tools and submit a single verdict (pass or fail) before
10
+ reporting task completion. If verification fails, submit the fail verdict first,
11
+ then fix.
12
12
  ---
13
13
 
14
14
  # IronBee Verification
15
15
 
16
16
  ## Rule
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.
17
+ No task is complete until changes are verified — through **real tools**, 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.
18
18
 
19
19
  ## Cycles
20
20
 
21
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
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.
23
+ You don't choose which cycle runs the file pattern decides. A single edited file can match multiple cycles' patterns and activate them all. Cycles always run in parallel within a single stop run. Each cycle has its own tools, flow steps, and verdict fields.
25
24
 
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.
25
+ **See the platform sections near the bottom of this file** for which cycles are active for this project, the tools they expose, and the per-cycle verdict fields you must include.
27
26
 
28
27
  ## Application lifecycle (your responsibility)
29
28
 
30
- For both cycles you manage the running application:
29
+ For every active cycle you manage the running application:
31
30
  - **Build** if needed (`npm run build`, `docker compose build`, …)
32
31
  - **Start** before navigating/connecting (`npm run dev`, `docker compose up -d`, …)
33
32
  - **Stop** when verification is complete
@@ -39,15 +38,15 @@ If already running, skip start. If the build fails, fix it before proceeding.
39
38
  ## Universal flow
40
39
 
41
40
  1. Implement your changes (write/edit code).
42
- 2. **Start verification** (one cycle covers every active mode — browser plus any enabled backend-runtime cycles):
41
+ 2. **Start verification** (one cycle covers every active mode — every active cycle's flow runs within the same verification cycle):
43
42
  ```
44
43
  echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start
45
44
  ```
46
45
  Devtools tools are blocked without this.
47
46
  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.
47
+ 4. **Run the per-cycle flows for every active cycle.** See the platform sections near the bottom of this file — each enabled cycle's section has its own flow steps, mandatory tools, and verdict fields. All active cycles must be exercised within this one verification cycle.
49
48
  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.
49
+ 6. **Honor any cycle-specific teardown** noted in the platform sections (e.g. recording stop) BEFORE submitting your verdict.
51
50
  7. **Submit your verdict immediately** — do NOT edit any code first:
52
51
  ```
53
52
  echo '<verdict-json>' | ironbee hook submit-verdict
@@ -57,43 +56,14 @@ If already running, skip start. If the build fails, fix it before proceeding.
57
56
  - **The stop hook overrides `status: pass` to fail when evidence doesn't back it.**
58
57
  8. If failed → fix → rebuild → go back to step 2 → repeat until pass.
59
58
 
60
- ## Browser flow (when browser cycle is active)
59
+ <!--IRONBEE:PLATFORM:browser-->
60
+ <!--/IRONBEE:PLATFORM:browser-->
61
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.
62
+ <!--IRONBEE:PLATFORM:node-->
63
+ <!--/IRONBEE:PLATFORM:node-->
63
64
 
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
73
- ```json
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
- }
82
- ```
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.
65
+ <!--IRONBEE:PLATFORM:backend-->
66
+ <!--/IRONBEE:PLATFORM:backend-->
97
67
 
98
68
  ## Important
99
69
  - **Always submit a verdict after every verification attempt** — both pass AND fail. Fail verdicts are tracked for analytics.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `ironbee backend <subcommand>` — manage the runtime-agnostic backend
3
+ * protocol cycle (HTTP / gRPC / GraphQL / WebSocket via the
4
+ * `backend-devtools` MCP, `bedt_*` tools).
5
+ *
6
+ * Subcommands today:
7
+ * - `enable` — opt in (writes a minimal `{ "backend": {} }` block;
8
+ * multi-language code defaults flow in at runtime).
9
+ * - `disable` — opt out (drops the block clean when no customizations
10
+ * + no lower-layer override; otherwise hard-kills via
11
+ * `verifyPatterns: []`).
12
+ */
13
+ import { Command } from "commander";
14
+ export declare const backendEnableCommand: Command;
15
+ export declare const backendDisableCommand: Command;
16
+ export declare const backendCommand: Command;
17
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/commands/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,eAAO,MAAM,oBAAoB,EAAE,OAW7B,CAAC;AAEP,eAAO,MAAM,qBAAqB,EAAE,OAW9B,CAAC;AAEP,eAAO,MAAM,cAAc,EAAE,OAGS,CAAC"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /**
3
+ * `ironbee backend <subcommand>` — manage the runtime-agnostic backend
4
+ * protocol cycle (HTTP / gRPC / GraphQL / WebSocket via the
5
+ * `backend-devtools` MCP, `bedt_*` tools).
6
+ *
7
+ * Subcommands today:
8
+ * - `enable` — opt in (writes a minimal `{ "backend": {} }` block;
9
+ * multi-language code defaults flow in at runtime).
10
+ * - `disable` — opt out (drops the block clean when no customizations
11
+ * + no lower-layer override; otherwise hard-kills via
12
+ * `verifyPatterns: []`).
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.backendCommand = exports.backendDisableCommand = exports.backendEnableCommand = void 0;
16
+ const commander_1 = require("commander");
17
+ const registry_1 = require("../clients/registry");
18
+ const config_1 = require("../lib/config");
19
+ const output_1 = require("../lib/output");
20
+ const cycle_toggle_1 = require("./cycle-toggle");
21
+ function attachToggleOptions(cmd) {
22
+ return cmd
23
+ .option("-p, --project-dir <dir>", "Project directory (default: cwd).")
24
+ .option("-g, --global", "Write to the global config (~/.ironbee/config.json) instead of the project.")
25
+ .option("--local", "Write to the gitignored project-local override (<project>/.ironbee/config.local.json). Mutually exclusive with --global.")
26
+ .option("--client <name>", `Only update guidance md files for this client (${(0, registry_1.clientNames)()}), or "all". Default: every registered client (per-file existsSync gate skips uninstalled ones).`);
27
+ }
28
+ exports.backendEnableCommand = attachToggleOptions(new commander_1.Command("enable"))
29
+ .description("Enable the runtime-agnostic backend protocol cycle. Writes a minimal `{ \"backend\": {} }` block — multi-language code defaults (TS/JS/Py/Go/Java/Ruby/.NET/Rust/Kotlin/Scala paths) flow in at runtime.")
30
+ .action((opts) => {
31
+ try {
32
+ const projectDir = opts.projectDir ?? process.cwd();
33
+ const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
34
+ (0, cycle_toggle_1.applyEnableCycle)("backend", projectDir, target, opts.client);
35
+ }
36
+ catch (e) {
37
+ console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
38
+ process.exit(1);
39
+ }
40
+ });
41
+ exports.backendDisableCommand = attachToggleOptions(new commander_1.Command("disable"))
42
+ .description("Disable the backend protocol cycle. Drops the entire `backend` block when no customizations + no lower-layer override exist; otherwise writes `backend.verifyPatterns: []` (hard kill, preserves customizations).")
43
+ .action((opts) => {
44
+ try {
45
+ const projectDir = opts.projectDir ?? process.cwd();
46
+ const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
47
+ (0, cycle_toggle_1.applyDisableCycle)("backend", projectDir, target, opts.client);
48
+ }
49
+ catch (e) {
50
+ console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
51
+ process.exit(1);
52
+ }
53
+ });
54
+ exports.backendCommand = new commander_1.Command("backend")
55
+ .description("Manage the runtime-agnostic backend protocol cycle (HTTP / gRPC / GraphQL / WebSocket via the `backend-devtools` MCP, `bedt_*` tools).")
56
+ .addCommand(exports.backendEnableCommand)
57
+ .addCommand(exports.backendDisableCommand);
58
+ //# sourceMappingURL=backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/commands/backend.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,yCAAoC;AACpC,kDAAkD;AAClD,0CAA2E;AAC3E,0CAAmC;AACnC,iDAAqE;AASrE,SAAS,mBAAmB,CAAC,GAAY;IACrC,OAAO,GAAG;SACL,MAAM,CAAC,yBAAyB,EAAE,mCAAmC,CAAC;SACtE,MAAM,CAAC,cAAc,EAAE,6EAA6E,CAAC;SACrG,MAAM,CAAC,SAAS,EAAE,0HAA0H,CAAC;SAC7I,MAAM,CAAC,iBAAiB,EAAE,kDAAkD,IAAA,sBAAW,GAAE,kGAAkG,CAAC,CAAC;AACtM,CAAC;AAEY,QAAA,oBAAoB,GAAY,mBAAmB,CAAC,IAAI,mBAAO,CAAC,QAAQ,CAAC,CAAC;KAClF,WAAW,CAAC,0MAA0M,CAAC;KACvN,MAAM,CAAC,CAAC,IAAmB,EAAQ,EAAE;IAClC,IAAI,CAAC;QACD,MAAM,UAAU,GAAW,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAiB,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;QAChE,IAAA,+BAAgB,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEM,QAAA,qBAAqB,GAAY,mBAAmB,CAAC,IAAI,mBAAO,CAAC,SAAS,CAAC,CAAC;KACpF,WAAW,CAAC,mNAAmN,CAAC;KAChO,MAAM,CAAC,CAAC,IAAmB,EAAQ,EAAE;IAClC,IAAI,CAAC;QACD,MAAM,UAAU,GAAW,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAiB,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;QAChE,IAAA,gCAAiB,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEM,QAAA,cAAc,GAAY,IAAI,mBAAO,CAAC,SAAS,CAAC;KACxD,WAAW,CAAC,wIAAwI,CAAC;KACrJ,UAAU,CAAC,4BAAoB,CAAC;KAChC,UAAU,CAAC,6BAAqB,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `ironbee browser <subcommand>` — manage the browser verification cycle.
3
+ *
4
+ * Subcommands today:
5
+ * - `enable` — turn the browser cycle on (default-on; use this to re-enable
6
+ * after `disable`, or to strip a prior `verifyPatterns: []`
7
+ * override).
8
+ * - `disable` — turn the browser cycle off (writes `verifyPatterns: []` as
9
+ * a hard kill; preserves customizations).
10
+ *
11
+ * The hierarchical `browser <verb>` shape leaves room for future per-platform
12
+ * commands beyond enable/disable (e.g. `browser status`, `browser inspect`,
13
+ * `browser test`) without name-spacing them at the top level.
14
+ */
15
+ import { Command } from "commander";
16
+ export declare const browserEnableCommand: Command;
17
+ export declare const browserDisableCommand: Command;
18
+ export declare const browserCommand: Command;
19
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,eAAO,MAAM,oBAAoB,EAAE,OAW7B,CAAC;AAEP,eAAO,MAAM,qBAAqB,EAAE,OAW9B,CAAC;AAEP,eAAO,MAAM,cAAc,EAAE,OAGS,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /**
3
+ * `ironbee browser <subcommand>` — manage the browser verification cycle.
4
+ *
5
+ * Subcommands today:
6
+ * - `enable` — turn the browser cycle on (default-on; use this to re-enable
7
+ * after `disable`, or to strip a prior `verifyPatterns: []`
8
+ * override).
9
+ * - `disable` — turn the browser cycle off (writes `verifyPatterns: []` as
10
+ * a hard kill; preserves customizations).
11
+ *
12
+ * The hierarchical `browser <verb>` shape leaves room for future per-platform
13
+ * commands beyond enable/disable (e.g. `browser status`, `browser inspect`,
14
+ * `browser test`) without name-spacing them at the top level.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.browserCommand = exports.browserDisableCommand = exports.browserEnableCommand = void 0;
18
+ const commander_1 = require("commander");
19
+ const registry_1 = require("../clients/registry");
20
+ const config_1 = require("../lib/config");
21
+ const output_1 = require("../lib/output");
22
+ const cycle_toggle_1 = require("./cycle-toggle");
23
+ function attachToggleOptions(cmd) {
24
+ return cmd
25
+ .option("-p, --project-dir <dir>", "Project directory (default: cwd).")
26
+ .option("-g, --global", "Write to the global config (~/.ironbee/config.json) instead of the project.")
27
+ .option("--local", "Write to the gitignored project-local override (<project>/.ironbee/config.local.json). Mutually exclusive with --global.")
28
+ .option("--client <name>", `Only update guidance md files for this client (${(0, registry_1.clientNames)()}), or "all". Default: every registered client (per-file existsSync gate skips uninstalled ones).`);
29
+ }
30
+ exports.browserEnableCommand = attachToggleOptions(new commander_1.Command("enable"))
31
+ .description("Enable the browser cycle. Browser is default-on; this command writes a minimal `{ \"browser\": {} }` block (no pattern materialization; code defaults flow in at runtime) OR strips a prior `verifyPatterns: []` disable-override.")
32
+ .action((opts) => {
33
+ try {
34
+ const projectDir = opts.projectDir ?? process.cwd();
35
+ const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
36
+ (0, cycle_toggle_1.applyEnableCycle)("browser", projectDir, target, opts.client);
37
+ }
38
+ catch (e) {
39
+ console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
40
+ process.exit(1);
41
+ }
42
+ });
43
+ exports.browserDisableCommand = attachToggleOptions(new commander_1.Command("disable"))
44
+ .description("Disable the browser cycle (writes `browser.verifyPatterns: []` to override the default 40+ extension fallback; preserves customizations of `alwaysRequired` / `evidencePaths` / `additionalVerifyPatterns`).")
45
+ .action((opts) => {
46
+ try {
47
+ const projectDir = opts.projectDir ?? process.cwd();
48
+ const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
49
+ (0, cycle_toggle_1.applyDisableCycle)("browser", projectDir, target, opts.client);
50
+ }
51
+ catch (e) {
52
+ console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
53
+ process.exit(1);
54
+ }
55
+ });
56
+ exports.browserCommand = new commander_1.Command("browser")
57
+ .description("Manage the browser verification cycle (DOM / console / a11y / screenshots via the `browser-devtools` MCP, `bdt_*` tools).")
58
+ .addCommand(exports.browserEnableCommand)
59
+ .addCommand(exports.browserDisableCommand);
60
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;G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AAI,CAAC;QACD,MAAM,UAAU,GAAW,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAiB,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;QAChE,IAAA,gCAAiB,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEM,QAAA,cAAc,GAAY,IAAI,mBAAO,CAAC,SAAS,CAAC;KACxD,WAAW,CAAC,2HAA2H,CAAC;KACxI,UAAU,CAAC,4BAAoB,CAAC;KAChC,UAAU,CAAC,6BAAqB,CAAC,CAAC"}
@@ -43,11 +43,11 @@
43
43
  * misinterpreted (e.g. a string that happens to look like a number).
44
44
  *
45
45
  * Artifact-affecting top-level keys (the `ARTIFACT_AFFECTING_TOP_KEYS`
46
- * registry below) are: `verification`, `collector`, `browser`, `backend`,
47
- * `browserDevTools`, `nodeDevTools`. Changing anything else (e.g.
48
- * `maxRetries`, `import.concurrency`, `recording`, `jobQueue`, `analytics`)
49
- * is a pure config flip — runtime hooks read it on next session, no
50
- * artifact regeneration needed.
46
+ * registry below) are: `verification`, `collector`, `browser`, `node`,
47
+ * `backend`, `browserDevTools`, `nodeDevTools`, `backendDevTools`. Changing
48
+ * anything else (e.g. `maxRetries`, `import.concurrency`, `recording`,
49
+ * `jobQueue`, `analytics`) is a pure config flip — runtime hooks read it on
50
+ * next session, no artifact regeneration needed.
51
51
  */
52
52
  import { Command } from "commander";
53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AqF;IACrF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC1E;AAED,MAAM,WAAW,OAAO;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mFAAmF;IACnF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAevD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAI3C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAG9F;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,OACoI,CAAC"}
@@ -44,11 +44,11 @@
44
44
  * misinterpreted (e.g. a string that happens to look like a number).
45
45
  *
46
46
  * Artifact-affecting top-level keys (the `ARTIFACT_AFFECTING_TOP_KEYS`
47
- * registry below) are: `verification`, `collector`, `browser`, `backend`,
48
- * `browserDevTools`, `nodeDevTools`. Changing anything else (e.g.
49
- * `maxRetries`, `import.concurrency`, `recording`, `jobQueue`, `analytics`)
50
- * is a pure config flip — runtime hooks read it on next session, no
51
- * artifact regeneration needed.
47
+ * registry below) are: `verification`, `collector`, `browser`, `node`,
48
+ * `backend`, `browserDevTools`, `nodeDevTools`, `backendDevTools`. Changing
49
+ * anything else (e.g. `maxRetries`, `import.concurrency`, `recording`,
50
+ * `jobQueue`, `analytics`) is a pure config flip — runtime hooks read it on
51
+ * next session, no artifact regeneration needed.
52
52
  */
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.configCommand = void 0;
@@ -77,12 +77,12 @@ const projects_registry_1 = require("../lib/projects-registry");
77
77
  * skill/rule presence, MCP entries, and permission scope.
78
78
  * - `collector` → MCP env auto-OTEL injection depends on collector
79
79
  * presence + url + apiKey; flipping these mutates `.mcp.json`'s env.
80
- * - `browser` / `backend` → patterns flow into runtime gating, but
81
- * fragments / runtime markers in skill/rule/command md are also
82
- * toggled by enable-backend so changing patterns is a good time to
83
- * re-render (sync runtime sections to current state).
84
- * - `browserDevTools` / `nodeDevTools` → MCP env override; mutates
85
- * `.mcp.json`.
80
+ * - `browser` / `node` / `backend` → patterns flow into runtime gating,
81
+ * but fragments / platform markers in skill/rule/command md are also
82
+ * toggled by `<cycle> enable` / `<cycle> disable` so changing patterns
83
+ * is a good time to re-render (sync runtime sections to current state).
84
+ * - `browserDevTools` / `nodeDevTools` / `backendDevTools` → MCP env
85
+ * override; mutates `.mcp.json`.
86
86
  *
87
87
  * Other top-level keys (`maxRetries`, `import.concurrency`, `recording`,
88
88
  * `jobQueue`, `analytics`, `ignoredVerifyPatterns`) only affect runtime
@@ -92,9 +92,11 @@ const ARTIFACT_AFFECTING_TOP_KEYS = new Set([
92
92
  "verification",
93
93
  "collector",
94
94
  "browser",
95
+ "node",
95
96
  "backend",
96
97
  "browserDevTools",
97
98
  "nodeDevTools",
99
+ "backendDevTools",
98
100
  ]);
99
101
  function projectConfigPath(projectDir) {
100
102
  return (0, path_1.join)((0, path_1.resolve)(projectDir), ".ironbee", "config.json");