Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

πŸ“ docs(acceptance): the debug proxy is not a verification surface (#20237)

Arvin Xu9628d5d93653
diff --git a/.agents/acceptance/PROCESS.md b/.agents/acceptance/PROCESS.md
index 5190fcf5b69..03c609f5cc9 100644
--- a/.agents/acceptance/PROCESS.md
+++ b/.agents/acceptance/PROCESS.md
@@ -175,6 +175,12 @@ Launch commands per surface are in `PROJECT.md` Β§4; the operating manual for ea
is in the skill's `surfaces/`. Escalate, don't duplicate: verify a backend change
with the CLI first, and add a UI pass only when the change reaches the UI.
+Every check runs in an environment that runs the delivered branch. A
+production-hosted surface (e.g. the `_dangerous_local_dev_proxy`) serves local
+frontend code over someone else's backend and data β€” it is a development
+convenience, not a surface, and never replaces the local full-stack server or
+Electron.
+
**Separate the driver from the evidence surface.** Producing the state under test
and capturing the evidence are independent choices. Drive with the cheapest
deterministic path the repo offers (a CLI command, an endpoint call, a seed
@@ -275,6 +281,10 @@ What is specific to this repository:
test profile.** Follow [Publish auth preflight](#publish-auth-preflight) below
for both looking up existing rounds and publishing. Do not unconditionally
remove API keys or assume a stored login exists.
+- **The publish target is not the verification surface.** `app.lobehub.com` is
+ where the acceptance is stored, not where the product was verified. Reaching
+ production to publish must never decide which environment ran the delivery; name
+ the actual verification environment (local full-stack / Electron) in the report.
- **Choose the subject by business continuity**, not by what is easiest to create:
an explicit instruction first; else the current conversation's `topic:<id>` (the
diff --git a/.agents/acceptance/PROJECT.md b/.agents/acceptance/PROJECT.md
index ce25d643fe9..8d5b9938629 100644
--- a/.agents/acceptance/PROJECT.md
+++ b/.agents/acceptance/PROJECT.md
@@ -244,10 +244,16 @@ stale standalone install: a recently added workspace package fails to resolve
- SPA proxying note: Web smoke needs the full-stack `dev` so Next proxies the
SPA HTML from Vite; `dev-next` alone will not serve the SPA.
-- Local frontend against production backend: `bun run dev:spa` prints a
- `_dangerous_local_dev_proxy` URL that loads your local Vite SPA inside the
- online environment (HMR against real server config) β€” for verifying frontend
- behavior against production data only, NOT for testing backend branch changes.
+- **Verify against a branch-running environment, not the production proxy:**
+ `bun run dev:spa` prints a `_dangerous_local_dev_proxy` URL that loads your
+ local Vite SPA inside the online environment (HMR against real server config).
+ That is a development convenience: it serves your local frontend over
+ production's backend, origin, and data. Its output is **never acceptance
+ evidence**, and it does not prove the delivered branch. Verify Web changes in
+ the local full-stack dev server (`$SERVER_URL`, default `http://localhost:3010`),
+ or a frontend-only change in Electron (`PROCESS.md` Step 3). If a criterion
+ cannot be exercised in an environment that runs the delivered branch, record
+ that check `blocked` and report the gap β€” do not substitute the proxy for it.
### Electron
diff --git a/.agents/skills/acceptance/SKILL.md b/.agents/skills/acceptance/SKILL.md
index 85329b0ca7d..462cbe2b53d 100644
--- a/.agents/skills/acceptance/SKILL.md
+++ b/.agents/skills/acceptance/SKILL.md
@@ -2,7 +2,7 @@
name: acceptance
license: Apache-2.0
metadata:
- version: "0.5.2"
+ version: "0.5.3"
description: >
End-to-end verification and self-evidence for a delivery in any repository,
with or without a preconfigured verify plan. Discover an existing plan when
@@ -322,7 +322,7 @@ passing tests support that evidence; they do not replace it.
| New/changed API **plus** the UI consuming it | **Web**, full-stack (agent-browser + network capture) | [surfaces/web.md](surfaces/web.md#web-full-stack) |
| Desktop-only behavior (native windows, IPC, packaged shell) | **Electron** (agent-browser `--cdp`) | [surfaces/electron.md](surfaces/electron.md) |
| Native macOS app / OS chrome agent-browser can't reach | **Native** (osascript + screencapture, local macOS) | [surfaces/native.md](surfaces/native.md) |
-| Native iOS behavior, gestures, device-size layout | **iOS Simulator** (AXe/native CLI + `simctl`) | [surfaces/ios-simulator.md](surfaces/ios-simulator.md) |
+| Native iOS behavior, gestures, device-size layout | **iOS Simulator** (sim-use/AXe + `simctl`) | [surfaces/ios-simulator.md](surfaces/ios-simulator.md) |
- **Use CLI alone only when the required outcome has no UI surface.** If a visible
outcome cannot be exercised, report that acceptance as incomplete instead of
@@ -367,6 +367,15 @@ process. Keep required evidence complete; shorten its presentation, not the work
## Final handoff (mandatory)
+**Cloud browser links use `https://lobehub.com`.** For all acceptance, round,
+cleanup, and upgrade URLs in this skill (including instructions below that say
+"verbatim"), normalize LobeHub Cloud origins to `https://lobehub.com`, preserving
+the path, query, and fragment. Cloud hosts are `lobehub.com` and its subdomains.
+Keep self-hosted and development origins unchanged. This changes display links,
+not the CLI's configured API server.
+Keep the Skill installation resource at
+`https://app.lobehub.com/acceptance/skill.md`.
+
Close every browser session this run opened
(`agent-browser --session <name> close`, [web teardown](surfaces/web.md#web-teardown))
before handing off; a session left open keeps a full browser running
@@ -388,12 +397,8 @@ or a `storage_block:` error. Do not stop at "upload failed" or "noted in the PR"
an atomic submission that failed before saving a result.
- Give **both recovery options**, in the user's language, using available
`recovery.cleanupUrl` and `recovery.upgradeUrl` verbatim and following
- `recovery.message`, with one compatibility exception: if a personal cleanup
- link points to `https://lobehub.com/acceptance` (with or without a trailing
- slash), change its origin to `https://app.lobehub.com`, preserving its path,
- query, and fragment. The apex `/acceptance` route is the product introduction,
- not the acceptance manager. Never delete user data automatically. Deletion is
- permanent.
+ `recovery.message`, applying the Cloud browser-link rule above. Never delete
+ user data automatically. Deletion is permanent.
- Personal scope: **clean up unneeded acceptances** or **upgrade the personal
plan**. Acceptance cleanup requires selecting "permanently delete all rounds,
reports, and evidence files"; deleting only a record or evidence association
@@ -413,9 +418,8 @@ or a `storage_block:` error. Do not stop at "upload failed" or "noted in the PR"
workspace, and use `/:workspaceSlug/resource` and
`/:workspaceSlug/settings/plans`; there is no `/:workspaceSlug/acceptance`
route. If lookup fails, give scope-specific guidance without guessed links.
- Strip URL username/password when constructing display links. For LobeHub Cloud
- (CLI server `https://app.lobehub.com` or `https://lobehub.com`), personal cleanup
- uses `https://app.lobehub.com/acceptance`; personal plan upgrades use
+ Strip URL username/password when constructing display links. For LobeHub Cloud,
+ personal cleanup uses `https://lobehub.com/acceptance`; personal plan upgrades use
`https://lobehub.com/settings/plans`. Workspace resource and plan paths use
`https://lobehub.com`. Keep self-hosted users on their configured server.
- Preserve local reports, artifacts, and the returned retry instructions. Stop
@@ -481,6 +485,7 @@ For both acceptance-checker handoffs and review output, read
| Evidence media, provenance, submission, safety | [evidence.md](references/evidence.md) |
| Interaction cost overlay | [interaction-cost.md](references/interaction-cost.md) |
| Web/Electron Chromium CLI commands | [agent-browser.md](references/agent-browser.md) |
+| iOS Simulator driver CLI commands | [sim-use.md](references/sim-use.md) (preferred), [axe.md](references/axe.md) (fallback) |
| Bundled CDP screenshot and macOS capture preflight | [screenshot-helpers.md](references/screenshot-helpers.md) |
| Authenticated Web session | [auth-web.md](references/auth-web.md) |
| Native macOS / OS-owned step | [computer-use.md](references/computer-use.md) |
diff --git a/.agents/skills/acceptance/references/axe.md b/.agents/skills/acceptance/references/axe.md
new file mode 100644
index 00000000000..46a58ed30dc
--- /dev/null
+++ b/.agents/skills/acceptance/references/axe.md
@@ -0,0 +1,116 @@
+# AXe CLI reference
+
+Driver reference for [AXe](https://github.com/cameroncooke/AXe), the fallback
+iOS Simulator driver when sim-use is absent or cannot express a step. AXe talks
+to Simulator Accessibility and HID directly and covers what sim-use lacks:
+`batch` for a fixed flow in one HID session, `drag --steps` for explicit
+move-event density, and `slider` for deterministic slider values. Surface-level
+proof, build, evidence, and status rules stay in [the iOS Simulator surface](../surfaces/ios-simulator.md).
+
+## Contents
+
+- [Probe and install](#probe-and-install)
+- [Select the device](#select-the-device)
+- [Inspect before acting](#inspect-before-acting)
+- [Tap and run multi-step flows](#tap-and-run-multi-step-flows)
+- [Long press, swipe, and drag](#long-press-swipe-and-drag)
+- [Capture](#capture)
+
+## Probe and install
+
+```bash
+command -v axe && axe --version
+axe help <subcommand>
+```
+
+Capabilities differ by version; read `axe help <subcommand>` before relying on a
+flag. Install only when dependency installation is explicitly in scope:
+
+```bash
+brew install cameroncooke/axe/axe
+```
+
+## Select the device
+
+Pass `--udid "$UDID"` on every command; AXe does not infer the target device.
+
+```bash
+axe list-simulators
+```
+
+## Inspect before acting
+
+```bash
+axe describe-ui --udid "$UDID" > ./proof/before-ui.txt
+axe describe-ui --point 220,710 --udid "$UDID"
+```
+
+Prefer `--id` (accessibility identifier), then `--label` plus `--element-type`.
+Use coordinates only when the UI exposes no unambiguous selector. If selector
+resolution reports multiple matches or an invalid/zero-size frame, inspect the
+intended control with `--point` and use its device coordinates; do not force the
+ambiguous selector.
+
+## Tap and run multi-step flows
+
+```bash
+# Selector tap with polling and a settle delay.
+axe tap --id photo-info-button --wait-timeout 5 --post-delay 0.5 --udid "$UDID"
+
+# Disambiguated label tap.
+axe tap --label 'Exposure & Metering' --element-type Button --udid "$UDID"
+
+# Coordinate fallback using physical touch down/up.
+axe tap -x 220 -y 710 --tap-style physical --udid "$UDID"
+```
+
+Most AXe HID commands are fire-and-forget: successful dispatch does not prove the
+app processed the event. Always re-read UI or capture the post-state.
+
+Prefer `axe batch` for a fixed multi-step flow so one HID session executes all
+steps. Use selector polling for transitions and refresh the AX cache when screens
+change:
+
+```bash
+axe batch --udid "$UDID" --wait-timeout 5 --ax-cache perStep \
+ --step "tap --id first-photo" \
+ --step "sleep 0.5" \
+ --step "tap --id photo-info-button"
+```
+
+Use discrete commands instead when the next selector/coordinate depends on
+runtime inspection of the previous state.
+
+## Long press, swipe, and drag
+
+```bash
+# Long press: explicit touch down, hold, and touch up.
+axe touch -x 220 -y 710 --down --up --delay 0.6 --udid "$UDID"
+
+# Horizontal page swipe with controlled duration.
+axe swipe --start-x 330 --start-y 430 --end-x 70 --end-y 430 \
+ --duration 0.6 --post-delay 0.5 --udid "$UDID"
+
+# Low-level drag with explicit move-event density.
+axe drag --start-x 200 --start-y 350 --end-x 200 --end-y 760 \
+ --duration 0.8 --steps 80 --post-delay 0.5 --udid "$UDID"
+
+# Device-relative common pattern; provide the actual screen dimensions.
+axe gesture scroll-left --screen-width 402 --screen-height 874 \
+ --duration 0.6 --udid "$UDID"
+```
+
+Derive coordinates from `describe-ui` and the selected device, not from a
+screenshot displayed at an unknown host scale.
+
+## Capture
+
+```bash
+axe screenshot --udid "$UDID" --output ./proof/after.png
+axe describe-ui --udid "$UDID" > ./proof/after-ui.txt
+```
+
+`axe record-video --fps <1-30> --quality <1-100>` exists, but terminal wrappers
+can intercept SIGINT before AXe writes MP4 metadata. Use it only after a short
+probe file passes `ffprobe`; otherwise keep AXe for input/Accessibility and
+record with `simctl` per [recording-ios-simulator.md](./recording-ios-simulator.md).
diff --git a/.agents/skills/acceptance/references/plan-format.md b/.agents/skills/acceptance/references/plan-format.md
index 94d7cb93002..23dc058d158 100644
--- a/.agents/skills/acceptance/references/plan-format.md
+++ b/.agents/skills/acceptance/references/plan-format.md
@@ -111,7 +111,8 @@ result ID, subject ID, or the most recent round from another acceptance.
Keep the same CLI server, account, and workspace as the verification. This example
reads the resolved server from `lh doctor --offline --json` (`endpoints.resolution`
-check, `evidence.serverUrl`), preserving self-hosted hosts and ports. Doctor may exit
+check, `evidence.serverUrl`). Cloud browser links use `https://lobehub.com`;
+self-hosted and development origins retain their hosts and ports. Doctor may exit
nonzero for unrelated diagnostics while still returning this field; only a valid
endpoint result is used. No repair, network doctor probe, or remote write is requested.
The example requires Node.js and the existing CLI commands, not a new CLI release:
@@ -127,7 +128,9 @@ const endpoint = JSON.parse(doctor.stdout).checks?.find((check) => check.id ===
if (!['ok', 'warn'].includes(endpoint?.status) || !endpoint.evidence?.serverUrl) {
throw new Error('Handoff blocked: the CLI did not resolve its server URL.');
}
-const origin = new URL(endpoint.evidence.serverUrl).origin;
+const server = new URL(endpoint.evidence.serverUrl);
+const isCloud = server.hostname === 'lobehub.com' || server.hostname.endsWith('.lobehub.com');
+const origin = isCloud ? 'https://lobehub.com' : server.origin;
const query = (...args) => JSON.parse(execFileSync('lh', [...args, '--json'], { encoding: 'utf8' }));
const state = query('verify', 'plan', 'state', operationId);
const runId = state?.verifyRunId;
diff --git a/.agents/skills/acceptance/references/recording-ios-simulator.md b/.agents/skills/acceptance/references/recording-ios-simulator.md
index 7595625333b..0cef5ca724b 100644
--- a/.agents/skills/acceptance/references/recording-ios-simulator.md
+++ b/.agents/skills/acceptance/references/recording-ios-simulator.md
@@ -1,8 +1,9 @@
# iOS Simulator framebuffer recording
Use this reference only for an iOS Simulator criterion that requires temporal
-evidence. Record device pixels directly with `simctl`; this excludes Simulator
-window chrome and is stronger evidence than a host-screen crop. Use an explicit
+evidence. Record device pixels directly with `simctl`; this excludes the host
+app's window chrome (Simulator, or DeviceHub on Xcode 27+) and is stronger
+evidence than a host-screen crop. Use an explicit
UDID when more than one device is booted.
## Record and finalize
@@ -13,8 +14,8 @@ UDID when more than one device is booted.
xcrun simctl io "$UDID" recordVideo --codec=h264 ./proof/ios-flow.mp4 \
2> ./proof/ios-recording.log
-# Drive the scenario with AXe or the repository's existing native CLI/UI tests in
-# parallel. Stop the recorder with SIGINT (Ctrl-C), then wait for finalization.
+# Drive the scenario with the selected driver (sim-use, AXe, or the repository's
+# native CLI/UI tests) in parallel. Stop the recorder with SIGINT (Ctrl-C), then wait for finalization.
```
Do not use SIGKILL: `simctl` must flush in-flight frames and finalize the movie.
@@ -22,10 +23,9 @@ An interrupted recorder command may return a non-zero shell status after a
successful SIGINT finalization; judge the artifact with `ffprobe`, not that status
alone.
-AXe also exposes `record-video --fps <1-30> --quality <1-100>`, but terminal
-wrappers can intercept SIGINT before AXe writes MP4 metadata. Use it only after a
-short probe file passes `ffprobe`; otherwise retain AXe for input/Accessibility
-and use `simctl` for recording.
+sim-use and AXe also ship `record-video`, but terminal wrappers can swallow
+SIGINT before the MP4 is finalized. Trust a driver recorder only after a short
+probe file passes `ffprobe`; see [sim-use.md](./sim-use.md) or [axe.md](./axe.md).
## Verify the movie
diff --git a/.agents/skills/acceptance/references/sim-use.md b/.agents/skills/acceptance/references/sim-use.md
new file mode 100644
index 00000000000..beec312b0bd
--- /dev/null
+++ b/.agents/skills/acceptance/references/sim-use.md
@@ -0,0 +1,134 @@
+# sim-use CLI reference
+
+Driver reference for [sim-use](https://github.com/lycorp-jp/sim-use), the
+preferred iOS Simulator driver. It is built for agents: `describe-ui` prints a
+compact outline whose `@N` aliases later commands target directly, and `--json`
+failures carry a `hint` listing candidate labels so the agent can re-target
+without another round-trip. Surface-level proof, build, evidence, and status
+rules stay in [the iOS Simulator surface](../surfaces/ios-simulator.md).
+
+## Contents
+
+- [Probe and install](#probe-and-install)
+- [Select the device](#select-the-device)
+- [Inspect before acting](#inspect-before-acting)
+- [Tap and run multi-step flows](#tap-and-run-multi-step-flows)
+- [Long press, swipe, and drag](#long-press-swipe-and-drag)
+- [Capture and app state](#capture-and-app-state)
+
+## Probe and install
+
+```bash
+command -v sim-use && sim-use --version
+sim-use help <subcommand>
+```
+
+Capabilities differ by version; read `sim-use help <subcommand>` before relying
+on a flag. Install only when dependency installation is explicitly in scope:
+
+```bash
+brew install lycorp-jp/tap/sim-use
+```
+
+## Select the device
+
+Without `--device`, sim-use silently picks one booted simulator even when several
+are booted. Resolve the UDID once and pin it for every call:
+
+```bash
+sim-use devices --platform ios --json > ./proof/simulator-devices.json
+export SIM_USE_DEVICE="$UDID"
+```
+
+## Inspect before acting
+
+`describe-ui` lists every visible element with an `@N` alias, list cells as `#N`
+(`#N@M` for the M-th list), and frames in UI points:
+
+```bash
+sim-use describe-ui > ./proof/before-ui.txt
+sim-use describe-ui --point 220,710
+```
+
+Target in this order: `@N` / `#N` alias from the latest outline, `#<identifier>`
+or `--id`, then `--label` plus `--element-type` (or `--label-contains` /
+`--label-regex` for dynamic labels). Use coordinates only when the UI exposes no
+unambiguous target. Aliases read the cached outline at
+`~/.sim-use/<udid>/last-outline.json`, so re-run `describe-ui` after every
+navigation, scroll, or modal change; a stale alias taps whatever now sits at the
+old position. On a multi-match, narrow with `--element-type` or `--frame`; do not
+force the ambiguous selector.
+
+## Tap and run multi-step flows
+
+```bash
+# Alias tap from the latest outline.
+sim-use tap @6 --post-delay 0.5
+
+# Selector tap with polling; survives UI shifts since the last outline.
+sim-use tap --id photo-info-button --wait-timeout 5 --post-delay 0.5
+
+# Disambiguated label tap.
+sim-use tap --label 'Exposure & Metering' --element-type Button
+
+# UISwitch and similar controls ignore zero-duration HID taps.
+sim-use tap --id wifi-toggle --duration 0.05
+
+# Coordinate fallback.
+sim-use tap --point 220,710
+```
+
+HID commands are fire-and-forget: successful dispatch does not prove the app
+processed the event. Always re-read the outline or capture the post-state.
+
+sim-use has no batch command. Run a multi-step flow as discrete commands, using
+`--wait-timeout` selectors across transitions and a fresh `describe-ui` whenever
+the next target depends on the new screen. For long flows,
+`sim-use daemon start` in a persistent session amortizes per-call startup cost.
+
+## Long press, swipe, and drag
+
+Coordinates copied from `describe-ui` are UI-space points; pass
+`--coordinate-space ui` so they stay correct when the device is rotated:
+
+```bash
+# Long press (default hold 0.8s).
+sim-use long-press @12
+sim-use long-press --point 220,710 --duration 1.2
+
+# Explicit touch down, hold, and touch up.
+sim-use touch -x 220 -y 710 --down --up --delay 0.6 --coordinate-space ui
+
+# Horizontal page swipe with controlled duration.
+sim-use swipe --from 330,430 --to 70,430 --duration 0.6 --post-delay 0.5 \
+ --coordinate-space ui
+
+# Slow drag with denser move events (smaller --delta = more HID steps).
+sim-use swipe --from 200,350 --to 200,760 --duration 0.8 --delta 4 \
+ --post-delay 0.5 --coordinate-space ui
+
+# Presets; single-finger presets auto-detect screen size and rotation.
+sim-use gesture scroll-left --duration 0.6
+sim-use gesture pinch-out --scale 2.5 --radius 100
+```
+
+Derive coordinates from `describe-ui`, not from a screenshot: screenshots are
+device pixels (for example 1206Γ—2622) while the outline is points (402Γ—874).
+
+## Capture and app state
+
+```bash
+sim-use screenshot --output ./proof/after.png
+sim-use describe-ui > ./proof/after-ui.txt
+
+# Baseline crash detection right after the intentional launch...
+sim-use app-state --bundle-id "$BUNDLE_ID" --reset
+# ...then prove the app is still running after each material action.
+sim-use app-state --bundle-id "$BUNDLE_ID" --json > ./proof/after-app-state.json
+```
+
+`sim-use record-video --output <file.mp4>` (`--fps 1-60`, `--quality 1-100`)
+stops on SIGINT. Terminal wrappers can swallow that signal before the MP4 is
+finalized, so trust it only after a short probe file passes `ffprobe`; otherwise
+record with `simctl` per
+[recording-ios-simulator.md](./recording-ios-simulator.md).
diff --git a/.agents/skills/acceptance/surfaces/ios-simulator.md b/.agents/skills/acceptance/surfaces/ios-simulator.md
index 584b7a62a50..ded48b2d898 100644
--- a/.agents/skills/acceptance/surfaces/ios-simulator.md
+++ b/.agents/skills/acceptance/surfaces/ios-simulator.md
@@ -11,6 +11,7 @@ controller or private plugin is not a prerequisite.
## Contents
- [Proof contract](#proof-contract)
+- [Resolve the host app by Xcode version](#resolve-the-host-app-by-xcode-version)
- [Probe and choose a CLI driver](#probe-and-choose-a-cli-driver)
- [Establish the tested build](#establish-the-tested-build)
- [Inspect and interact](#inspect-before-acting)
@@ -33,12 +34,30 @@ Record the repository, branch, commit, dirty state, build command, Xcode version
Simulator model/runtime/UDID, bundle identifier, and tested time. A screenshot
from an old install is not evidence for the current source.
+## Resolve the host app by Xcode version
+
+Xcode 27 and later replace `Simulator.app` with **DeviceHub**
+(`Xcode.app/Contents/Applications/DeviceHub.app`, bundle id
+`com.apple.dt.Devices`). `xcrun simctl` and the simulated devices themselves are
+unchanged; only the host GUI app differs. Read the major version before opening,
+activating, or locating the host window:
+
+```bash
+XCODE_MAJOR=$(xcodebuild -version | awk 'NR==1 { split($2, v, "."); print v[1] }')
+if [ "$XCODE_MAJOR" -ge 27 ]; then HOST_APP=DeviceHub; else HOST_APP=Simulator; fi
+open -a "$HOST_APP"
+```
+
+Never hard-code `open -a Simulator` or `tell application "Simulator"`: on Xcode 27+
+it fails, and a failed launch is a harness error, not a product failure.
+
## Probe and choose a CLI driver
-Prefer a CLI that talks to Simulator Accessibility and HID directly. Probe the
-host rather than assuming one tool is installed:
+Prefer the most agent-friendly CLI that talks to Simulator Accessibility and HID
+directly. Probe the host rather than assuming one tool is installed:
```bash
+command -v sim-use
command -v axe
command -v idb
command -v idb_companion
@@ -48,48 +67,32 @@ command -v ffprobe
xcrun simctl help io
```
-| Tool | Responsibility in this workflow |
-| ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
-| AXe | Accessibility inspection; selector/coordinate tap; touch, swipe, drag, and preset gesture injection; screenshots |
-| `simctl` | Device discovery and lifecycle; app install/launch; logs; authoritative framebuffer screenshots and recording |
-| `ffprobe` | Prove the recorded movie is readable and report its observed duration, dimensions, rate, and frame count |
-| `ffmpeg` | Losslessly enumerate decoded frames, sample review frames, and generate contact sheets |
-| `idb` + `idb_companion` | Optional alternative driver only when both halves are installed and working |
-| `cliclick` | Last-resort host-window click for smoke testing; not proof of native touch semantics |
-
-Driver priority:
-
-1. **AXe** β€” preferred general-purpose agent driver. It resolves accessibility
- selectors, injects taps/touch/swipe/drag, describes UI, and captures
- screenshots. Treat its video recorder as a probe-only fallback to `simctl`.
-2. **The repository's existing XCUITest or documented CLI driver** β€” use when AXe
- is absent or the project already owns stronger domain assertions.
-3. **`idb` + `idb_companion` together** β€” use only when both client and companion
- are available. `idb_companion` alone is not an interaction CLI.
-4. **`cliclick`** β€” host-window fallback for a simple click only. It depends on
- Simulator window geometry and does not independently prove native HID semantics.
+Pick the first available driver, then read **only** its reference for commands:
-If no available driver can express the planned gesture, mark the case `blocked`.
-Do not switch to a private agent plugin or silently downgrade a long press to a
-tap. If AXe must be installed, use its official distribution only after the task
-scope allows installation; otherwise report the missing prerequisite.
+| Priority | Driver | Use when | Commands |
+| -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------- |
+| 1 | sim-use | Default. Outline with `@N` aliases, `hint` on failed targets, built-in long press and crash check | [sim-use.md](../references/sim-use.md) |
+| 2 | AXe | sim-use is absent, or the step needs `batch`, `drag --steps`, or `slider` | [axe.md](../references/axe.md) |
+| 3 | Repository XCUITest or documented CLI | Neither is installed, or the project already owns stronger domain assertions | The repository's own docs |
+| 4 | `idb` + `idb_companion` | Both halves are installed and working; `idb_companion` alone is not an interaction CLI | `idb --help` |
+| 5 | `cliclick` | Smoke-test click only; depends on `$HOST_APP` window geometry and does not prove HID semantics | `cliclick -h` |
-```bash
-# Only when AXe is absent and dependency installation is explicitly in scope.
-brew install cameroncooke/axe/axe
-```
+`simctl` owns device lifecycle, install/launch, logs, and framebuffer capture for
+every driver. `ffprobe` and `ffmpeg` verify and slice recordings.
-The examples below target AXe. Run `axe --version`, `axe --help`, and
-`axe help <subcommand>` first because capabilities may differ by installed
-version.
+If no available driver can express the planned gesture, mark the case `blocked`.
+Do not switch to a private agent plugin or silently downgrade a long press to a
+tap. Install a missing driver from its official distribution only when the task
+scope allows installation; otherwise report the missing prerequisite. Record the
+driver name and version in the text evidence.
## Establish the tested build
-Resolve one explicit device and keep using its UDID. Avoid `booted` after device
-selection when several Simulators may be running.
+Resolve one explicit device and keep using its UDID for both the driver and
+`simctl`. Avoid `booted` after device selection when several Simulators may be
+running; the driver reference shows how to pin the device.
```bash
-axe list-simulators
xcrun simctl list devices booted --json > ./proof/simulator-devices.json
xcodebuild -version > ./proof/xcode-version.txt
@@ -104,87 +107,32 @@ Save the build product path and modification time in the text evidence.
## Inspect before acting
-Read the current Accessibility hierarchy before choosing selectors or coordinates:
-
-```bash
-axe describe-ui --udid "$UDID" > ./proof/before-ui.txt
-axe describe-ui --point 220,710 --udid "$UDID"
-```
-
-Prefer `--id` (accessibility identifier), then `--label` plus `--element-type`.
-Use coordinates only when the UI exposes no unambiguous selector. Stable
-identifiers make the same flow reusable across device sizes and reduce accidental
-actions on the wrong control. If selector resolution reports multiple matches or
-an invalid/zero-size frame, inspect the intended control with `--point` and use
-its device coordinates; do not force the ambiguous selector.
-
-## Tap and run multi-step flows
-
-```bash
-# Selector tap with polling and a settle delay.
-axe tap --id photo-info-button --wait-timeout 5 --post-delay 0.5 --udid "$UDID"
-
-# Disambiguated label tap.
-axe tap --label 'Exposure & Metering' --element-type Button --udid "$UDID"
-
-# Coordinate fallback using physical touch down/up.
-axe tap -x 220 -y 710 --tap-style physical --udid "$UDID"
-```
-
-Most AXe HID commands are fire-and-forget: successful dispatch does not prove the
-app processed the event. Always re-read UI or capture the post-state.
-
-Prefer `axe batch` for a fixed multi-step flow so one HID session executes all
-steps. Use selector polling for transitions and refresh the AX cache when screens
-change:
+Read the current Accessibility hierarchy with the driver's `describe-ui` before
+choosing a target, and again after every navigation, scroll, or modal change.
+Prefer an accessibility identifier, then a label narrowed by element type; use
+coordinates only when the UI exposes no unambiguous selector. Stable identifiers
+make the same flow reusable across device sizes and reduce accidental actions on
+the wrong control. On a multi-match or zero-size frame, inspect the intended
+control by point instead of forcing the ambiguous selector.
-```bash
-axe batch --udid "$UDID" --wait-timeout 5 --ax-cache perStep \
- --step "tap --id first-photo" \
- --step "sleep 0.5" \
- --step "tap --id photo-info-button"
-```
-
-Use discrete commands instead when the next selector/coordinate depends on
-runtime inspection of the previous state.
+Derive coordinates from `describe-ui`, not from a screenshot: screenshots are
+device pixels while the hierarchy is in points.
-## Deliver long press, swipe, and drag precisely
-
-AXe exposes the touch primitives that host-mouse automation often lacks:
-
-```bash
-# Long press: explicit touch down, hold, and touch up.
-axe touch -x 220 -y 710 --down --up --delay 0.6 --udid "$UDID"
-
-# Horizontal page swipe with controlled duration.
-axe swipe --start-x 330 --start-y 430 --end-x 70 --end-y 430 \
- --duration 0.6 --post-delay 0.5 --udid "$UDID"
-
-# Low-level drag with explicit move-event density.
-axe drag --start-x 200 --start-y 350 --end-x 200 --end-y 760 \
- --duration 0.8 --steps 80 --post-delay 0.5 --udid "$UDID"
-
-# Device-relative common pattern; provide the actual screen dimensions.
-axe gesture scroll-left --screen-width 402 --screen-height 874 \
- --duration 0.6 --udid "$UDID"
-```
-
-Derive coordinates from `describe-ui` and the selected device, not from a
-screenshot displayed at an unknown host scale. A dispatched gesture is only the
-input half of the proof; verify the expected page identity, count, disclosure,
-or visual state afterward.
+HID commands are fire-and-forget: successful dispatch does not prove the app
+processed the event. A dispatched tap or gesture is only the input half of the
+proof; verify the expected page identity, count, disclosure, or visual state
+afterward.
## Capture device evidence
-Capture clean device pixels with AXe or `simctl`, not a cropped host-window
-screenshot:
+Capture clean device pixels with the driver's screenshot command or `simctl`, not
+a cropped host-window screenshot:
```bash
-axe screenshot --udid "$UDID" --output ./proof/after.png
-xcrun simctl io "$UDID" screenshot --type=png ./proof/after-simctl.png
+xcrun simctl io "$UDID" screenshot --type=png ./proof/after.png
```
-For transitions and multi-step behavior, record the Simulator framebuffer and
+For transitions and multi-step behavior, record the device framebuffer and
derive every-frame or sampled contact sheets using
[../references/recording-ios-simulator.md](../references/recording-ios-simulator.md).
Keep the original MP4; a contact sheet is an index for review, not a replacement
@@ -192,11 +140,8 @@ for temporal evidence. Treat requested recording FPS as a target only: Simulator
movies may be variable-frame-rate, so verify actual duration, rate, and frame count
with `ffprobe`.
-After each material action, preserve a fresh UI hierarchy as text evidence:
-
-```bash
-axe describe-ui --udid "$UDID" > ./proof/after-ui.txt
-```
+After each material action, preserve a fresh `describe-ui` hierarchy (and, with
+sim-use, `app-state`) as text evidence.
For diagnostics, capture a scoped log after the interaction:
@@ -216,7 +161,7 @@ logs are harmless.
- **Animation/transition:** inspect the raw MP4 plus extracted start/event/end
frames. Extract every encoded frame when timing, flicker, or a one-frame flash
is the claim; otherwise use a declared sampling rate and retain the video.
-- **Gesture:** pair the exact AXe command with the postcondition. A final
+- **Gesture:** pair the exact driver command with the postcondition. A final
screenshot alone cannot prove which gesture caused it.
- **Accessibility:** compare the visual state with `describe-ui` before/after.
A visually correct control that cannot be identified or activated remains an
@@ -232,7 +177,7 @@ logs are harmless.
| `fail` | The required input was delivered and the product violated the expected behavior |
| `blocked` | The build/environment/driver could not execute or observe the required condition |
-For a blocked case, attach the recording or screenshot, UI hierarchy before/after,
+For a blocked case, attach the recording or screenshot, UI outline before/after,
the attempted command, stderr/exit status, and the missing driver capability. A
fallback close button, ordinary tap, or static frame may be useful smoke evidence
but cannot satisfy a different planned gesture.
@@ -243,5 +188,6 @@ disclose the exact side effect in the report.
Publish the artifacts with the plan-driven submit flow or place them under the
structured report's `assets/` directory and ingest the whole round. Tag direct
-AXe/`simctl` captures as `--by cli`, deterministic UI-test/media-transform output
-as `--by program`, and preserve the device identity in every artifact description.
+driver/`simctl` captures as `--by cli`, deterministic UI-test/media-transform
+output as `--by program`, and preserve the device identity in every artifact
+description.
diff --git a/.agents/skills/acceptance/surfaces/web.md b/.agents/skills/acceptance/surfaces/web.md
index 057a2b7a6a8..5b47b360848 100644
--- a/.agents/skills/acceptance/surfaces/web.md
+++ b/.agents/skills/acceptance/surfaces/web.md
@@ -52,9 +52,15 @@ Upload the screenshot (`--type screenshot`) and the network proof (the HAR as
## Local frontend against a remote backend
-If you can only run the frontend locally but the backend is remote, drive the
-frontend URL the same way β€” just remember the backend is not your branch, so it
-proves frontend behavior, not backend changes.
+Reach for this only when the change under test is frontend-only **and** no
+self-contained local environment can run it. Drive the frontend URL the same way,
+but treat it as a fallback, not a default: the backend is not your branch and may
+be production, so it proves frontend behavior against someone else's backend and
+data β€” not backend changes, and not the delivered branch end to end.
+
+Keep the local dev server the project's adapter provides as the default surface.
+When a remote-backed surface is unavoidable, say so in the report so the reviewer
+knows which layers the evidence actually covers.
## Time-based behavior & OS-level steps
diff --git a/.gemini/skills b/.gemini/skills
new file mode 120000
index 00000000000..2b7a412b8fa
--- /dev/null
+++ b/.gemini/skills
@@ -0,0 +1 @@
+../.agents/skills
\ No newline at end of file
diff --git a/AGENTS.md b/AGENTS.md
index 426aab27e4a..a577d54a08b 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -56,6 +56,8 @@ Debug Proxy: https://app.lobehub.com/_dangerous_local_dev_proxy?debug-host=http%
Open this URL to develop locally against the production backend (app.lobehub.com). The proxy page loads your local Vite dev server's SPA into the online environment, enabling HMR with real server config.
+This proxy is a **development convenience, not a verification surface**: it runs your local frontend against production's backend, origin, and data. Acceptance must exercise the delivered branch in an environment that runs it β€” for which surface to use, see `.agents/acceptance/PROJECT.md` Β§4.
+
### Git Workflow
- **Branch strategy**: `canary` is the development branch (cloud production); `main` is the release branch (periodically cherry-picks from canary)
diff --git a/README.md b/README.md
index 14f7e50da3f..6db7bf53921 100644
--- a/README.md
+++ b/README.md
@@ -381,7 +381,8 @@ $ bun run dev:spa # SPA frontend only (port 9876)
> **Debug Proxy**: After running `dev:spa`, the terminal prints a proxy URL like
> `https://app.lobehub.com/_dangerous_local_dev_proxy?debug-host=http%3A%2F%2Flocalhost%3A9876`.
-> Open it to develop locally against the production backend with HMR.
+> Open it to develop locally against the production backend with HMR β€” a
+> development convenience, not a place to verify a change.
If you would like to learn more details, please feel free to look at our [πŸ“˜ Development Guide][docs-dev-guide].