<!-- Android mobile verification is ENABLED for this project. The Stop hook
     enforces an android cycle whenever an edited file matches
     `android.verifyPatterns`. -->

## Android cycle

Android file changes IF the file matches `android.verifyPatterns` ALSO require verification through the **android-devtools** MCP server (prefix `adt_`). Android-cycle verification means connecting to a running device or emulator, driving the app UI to exercise the changed code and taking a screenshot — OR reading Logcat to confirm the changed code path executed without crashes.

Both cycles can be active simultaneously (e.g. you edit both a React component and a Kotlin activity in the same task). One `verification-start` covers all active cycles; one platform-agnostic verdict covers them all; one retry counter applies globally.

### ⚠️ `android-devtools` is ONLY for Android apps

`android-devtools` works with Android devices and emulators via ADB. It does NOT work for web-only, iOS-only, or desktop projects. If the project has no `android/` directory or `AndroidManifest.xml`, do NOT call `adt_*` tools.

**Misconfiguration recovery.** If you reach this state, the operator enabled the android cycle by mistake. The Stop hook will keep blocking with `incomplete_tools` for the android cycle. Don't attempt the connection. Instead, stop and clearly report to the user: the project does not target Android; ask them to run `ironbee android disable` to unblock the gate.

### Android-cycle additions to the main flow

These attach to the **Required steps** above — they don't replace any step. Numbering follows the main flow:

- **Within step 3 (run flow):** also run the android flow: connect (`adt_device_connect`) → launch app (`adt_device_launch-app`) → pick ONE evidence path:
  - **Device-evidence**: drive UI (`adt_interaction_tap` / `adt_interaction_input-text` / `adt_interaction_swipe`) + screenshot (`adt_content_take-screenshot`) + UI snapshot (`adt_a11y_take-ui-snapshot`)
  - **Log-evidence**: read Logcat (`adt_o11y_log-read` or `adt_o11y_log-follow`) confirming expected output and no crashes
  - **Network-evidence**: capture outgoing HTTP traffic (`adt_o11y_get-http-requests` — forward-looking: start capture, drive the app, read again) confirming the expected request(s)/status. Auxiliary setup only (NOT evidence): `adt_o11y_new-trace-id` (pin correlation), `adt_stub_*` (mock/intercept).
- If `recording.enable` is on, the gate forces `adt_content_start-recording` BEFORE the android steps above and rejects the verdict if you don't call `adt_content_stop-recording` AFTER them. Always pair start/stop around the steps above.
- **Within step 6 (submit verdict):** submit one platform-agnostic verdict with `status` + `checks` (+ `issues`/`fixes` as needed). Android-cycle pass criteria: device connected AND (UI-interaction + screenshot + UI snapshot taken) OR (Logcat read with no crashes) OR (outgoing HTTP traffic captured and confirmed).

### Additional BANNED for android cycle

- Calling `adt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
- **Calling `adt_*` tools when the project does NOT target Android.** Use the browser cycle only for web-only projects.
- Claiming `status: pass` for an android cycle when no evidence path was exercised.
- **Submitting a verdict while an android recording is still active** — always call `adt_content_stop-recording` BEFORE `ironbee hook submit-verdict`. The recording start/stop pair brackets the verification flow.
