Skip to content

Commit fde2b54

Browse files
thymikeeclaude
andcommitted
docs(help): show a concrete find ... exists example
Address review: find <locator> exists hid that the locator is text, label, value, role or id followed by the query. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent de5c32c commit fde2b54

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎skills/agent-device/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ agent-device open <app> --foreground
1313

1414
That starts the session and returns the initial interactive snapshot with `@refs`.
1515

16-
Loop: act with `press|click|fill|longpress <target> ... --settle`, `scroll <direction> --settle`, or `back --settle`; continue from the printed diff, verify the named expectation with a read-only command (`wait text "..."`, `is`, or `get`; bare `find` clicks, so check with `find <locator> exists`), then run `agent-device close`, or `agent-device close --shutdown` if your session booted a local simulator or emulator, unless the user asks to keep it running.
16+
Loop: act with `press|click|fill|longpress <target> ... --settle`, `scroll <direction> --settle`, or `back --settle`; continue from the printed diff, verify the named expectation with a read-only command (`wait text "..."`, `is`, or `get`; bare `find` clicks, so check with `find text "..." exists`), then run `agent-device close`, or `agent-device close --shutdown` if your session booted a local simulator or emulator, unless the user asks to keep it running.
1717

1818
Reaching an off-screen target is one command, not a scroll-and-check loop: `scroll down --until <selector>` scrolls until that element is on screen, and `scroll bottom` runs to the end of the content. Repeated bare `scroll down` calls are the slow way to find something.
1919

‎src/commands/schema/cli-help-first-screen.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const FIRST_SCREEN_RULES: Record<string, readonly string[]> = {
1616
'Do not probe first with devices, apps, appstate, snapshot, or screenshot',
1717
'Unknown app id: devices, then apps, then open <discovered-id>. Never invent ids',
1818
'is, or get. A bare screenshot is not verification',
19-
'find acts: it clicks by default. To check only, use find <locator> exists',
19+
'find acts: it clicks by default. To check only, use find text "..." exists',
2020
'End with: agent-device close',
2121
],
2222
commands: [
@@ -28,7 +28,7 @@ const FIRST_SCREEN_RULES: Record<string, readonly string[]> = {
2828
'Stop and report ambiguity',
2929
'1. Open the requested app; use --relaunch only when the script needs fresh state',
3030
'5. If --settle prints not settled, follow its hint',
31-
'6. Verify named expectations with wait text/selector/absent, get, is, find <locator> exists, or the settled diff. Bare find clicks. A bare screenshot/snapshot is not verification',
31+
'6. Verify named expectations with wait text/selector/absent, get, is, find text "..." exists, or the settled diff. Bare find clicks. A bare screenshot/snapshot is not verification',
3232
],
3333
maestro: [
3434
'Run Maestro compatibility flows with replay <flow.yaml> --maestro',

‎src/commands/schema/cli-help-overview.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Loop:
2727
Run snapshot -i only when the diff lacks the next target or did not settle.
2828
Verify a named expectation with the diff, wait text "...", wait <selector>, wait absent <selector>,
2929
is, or get. A bare screenshot is not verification.
30-
find acts: it clicks by default. To check only, use find <locator> exists.
30+
find acts: it clicks by default. To check only, use find text "..." exists.
3131
End with: agent-device close
3232
3333
Targets:

‎src/commands/schema/cli-help-workflows.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Loop:
2828
3. Run press/fill/click/longpress <ref-or-selector> --settle for each mutating step.
2929
4. Treat a settled:true diff as the next observation. Do not add wait stable or another snapshot when the diff already shows the next target or expected result.
3030
5. If --settle prints not settled, follow its hint before the next ref-based action.
31-
6. Verify named expectations with wait text/selector/absent, get, is, find <locator> exists, or the settled diff. Bare find clicks. A bare screenshot/snapshot is not verification for a named expectation.
31+
6. Verify named expectations with wait text/selector/absent, get, is, find text "..." exists, or the settled diff. Bare find clicks. A bare screenshot/snapshot is not verification for a named expectation.
3232
7. Close the session when the script ends. If your session booted a local simulator or emulator, use close --shutdown, unless the user asks to keep it running.
3333
3434
Command shapes:
@@ -283,7 +283,7 @@ Loop:
283283
1. Build or prepare the changed surface with the repo command that owns it.
284284
2. Open the target app/device state explicitly.
285285
3. Use snapshot -i and press/fill/click/longpress --settle for UI-driving steps.
286-
4. Use the settled diff as evidence when it shows the changed behavior; otherwise verify with wait/get/is, find <locator> exists, screenshot, logs, network, perf, or trace based on the claim.
286+
4. Use the settled diff as evidence when it shows the changed behavior; otherwise verify with wait/get/is, find text "..." exists, screenshot, logs, network, perf, or trace based on the claim.
287287
5. Record timings, token/output size, screenshots/videos, logs, or perf artifacts only when they answer the validation question.
288288
6. Close sessions and release leases before finishing. If your session booted a local simulator or emulator, use close --shutdown, unless the user asks to keep it running.
289289

0 commit comments

Comments
 (0)