npx skills add ...
npx skills add software-mansion/argent --skill argent-qa-flows
Create repeatable QA regression E2E tests as Argent flows from test cases, tickets, or acceptance criteria. Use when the user asks to generate or preserve an automated regression scenario, with deterministic setup, stable targets, executable structural or visual evidence, and two consecutive full passes. For one-off UI checks or replayable paths without acceptance criteria, use argent-test-ui-flow or argent-create-flow. Supports iOS, Android, Chromium, and Vega (Fire TV), where recorded tv-remote steps replace touch directives. Apple TV and Android TV are unsupported; use argent-tv-interact there and report the limitation.
npx skills add software-mansion/argent --skill argent-qa-flows
Load argent-create-flow as the authoring engine. Follow its required references for recorder syntax, selectors, polish, platform exceptions, and repair. This skill adds the QA contract and completion gate.
Vega supports every item below: launch: { vega: ... }, await:/assert: selectors, snapshot:, and idle all run there. Only the touch directives are missing, because Vega is remote-driven. Navigate with recorded tool: tv-remote steps and type with tool: keyboard, which leaves item 5 with nothing to govern. A D-pad path is relative to where focus already is, so gate every move with item 4's identity check rather than assuming the cursor landed. Read argent-tv-interact for focus reading and remote navigation.
Apple TV and Android TV are out of scope. The runner does not reject touch directives there, so they fail at the gesture layer instead of with authoring guidance. Use argent-tv-interact and report the limitation.
Physical iPhones run QA flows, with three hardware limits: replay never auto-binds a phone, so pass its udid as device (CLI --device) and keep it connected; pinch/rotate steps fail there like the live tools, so drive the app's own zoom UI instead; the flow tree is the describe tree (same ids and roles), so a selector authored on a simulator can miss there. Read argent-ios-device-interact for the app-scoped contract before recording.
A QA flow is complete only when:
echo: or script: is launch:. In-flow setup proves a deterministic data baseline. Repeated runs do not accumulate artifacts or require manual cleanup.await:, assert:, or reviewed snapshot:. Echoes and screenshots are not verdicts. A negative check needs the same stable selector established as visible earlier.idle readiness.Before touching the app, write a compact table. Restate it in the final report. Include:
Use structural checks for semantic state, snapshots for pixels, and both for mixed requirements. One behavioral scenario becomes one qa-<area>-<behavior> flow.
Do not invent a material value or weaken ambiguity. Choose the strongest UI-verifiable reading and report it. Ask when the choice changes test meaning.
Make repeated runs deterministic:
assert: or a destination await: that fully proves the baseline.A flow has two fixture mechanisms:
run: replays a separately recorded reset or seed flow.script: runs requested local setup or cleanup. Record it with flow-add-script where it belongs in the walkthrough.Ask before cleanup that creates or deletes meaningful user data outside the request.
Ticket: select Dark in Settings. Verify Dark is selected, Light is absent, and the screen renders in dark mode.
| Contract row | Action | Evidence | State effect |
|---|---|---|---|
| Signed-in Home | Launch | await: { visible: { id: home-screen } }, then await: { idle: true } | Existing account |
| Open Settings | Tap settings-tab | await: { visible: { id: settings-screen } }, then await: { idle: true } | None |
| Prove Light selected | Inspect Settings | assert: { visible: { id: theme-light-selected } } | Fails if already Dark |
| Prove Dark selected | Tap theme-dark-option | await: { visible: { id: theme-dark-selected } } | Theme becomes Dark |
| Prove Light absent | Inspect settled screen | assert: { hidden: { id: theme-light-selected } } | None |
| Verify dark rendering | Inspect settled screen | snapshot: settings-dark | None |
| Restore baseline | Tap theme-light-option | await: { visible: { id: theme-light-selected } } | Next run starts clean |
The initial Light check establishes the selector used by the later hidden check. The final restore makes pass 2 independent.
Follow argent-create-flow's start order and live-authoring cycle. Record each structural contract check when its state appears.
A snapshot has no recorder form. Inspect its stable state during the walkthrough, then add the planned snapshot during polish. If direct recovery changes state, re-record the affected behavior. A recovered walkthrough is not proof.
visible, then the action, then hidden. Do not add an unestablished hidden check only to strengthen a positive baseline. In a collection, viewport absence is not global absence. Use fixed seeded position, count, empty state, or other collection-wide evidence.within with a stable container. Use text.in to prove rendered membership inside that container.cropOn for one component.Never put acceptance evidence inside when:. Use when: only for optional setup that reconverges to the required path.
Complete the create-flow polish and blocking audit. Then:
| Action | Destination | Identity | Readiness |
|---|---|---|---|
Tap settings-tab | Settings | settings-screen visible | idle |
The two are repaired differently. A missing identity check must be recorded live on the restored screen. A missing idle check is added in YAML, because await: { idle: true } has no recorder form and is one of argent-create-flow's three permitted polish insertions. Re-record any missing action or other structural check.
After the last edit and audit, set the streak to zero:
flow-execute locally or argent flow run <name> --platform <platform> for CI. Switching runners resets the streak.stop-all-simulator-servers to devices: [<device>]. Never omit the scope — a bare call is the machine-wide sweep, and step 7 restarts this proof often enough to reap every other agent's devices repeatedly. Use the MCP call for flow-execute, or argent run stop-all-simulator-servers --devices <device> from the standalone runner's install. The reset must not change app or account data. For Chromium, let the runner boot the declared app and omit device. Vega owns no recyclable Argent services, so the teardown is a no-op there and both passes are warm.ok: true and every acceptance check executed. A false when: can skip optional setup only. An errored step does not advance the streak, and the count mixes two kinds — read each reason. One that could not run (an unreadable tree under idle, an unresolvable run: target) is environment: fix it and rerun. A failed launch: also scores errored, and it is a verdict about the app — an app that no longer installs or starts is the regression this test exists to catch, so report it instead of rerunning.flow-finish-recording. Follow Live waits and checks. For runner warnings, await: { idle: true } raises six different warnings, so read which one it is first. Two say the screen was moving. One says the wait ran out mid-hold and needs a larger timeout:. One says the tree stayed empty. One — settled on the UI tree alone — says the hierarchy did hold still and only the screenshot pairs were missing, so inspect the capture path rather than the app's rendering. One says the step ended with no evidence either way. Inspect the screen, disclose the cause, and verify that surrounding acceptance checks use stable elements rather than stillness. A selector-less gesture — a coordinate tap/long-press/swipe, or a pinch/rotate with no on: — warns in a different shape: a tree-source outage left it unsettled, so it dispatched blind and the green says only that the gesture was sent. Restore the tree source, usually by relaunching the app so the instrumentation loads, and rerun. Accepting that warning needs an app that serves no tree, which cannot satisfy this contract anyway.argent-create-flow, audit again, and restart with fresh services.Finish only when the streak reaches two. If the intended runner is unavailable, report proof as blocked. If product behavior fails, keep the strong check and report the regression. Never weaken it to obtain green output.
Record the runner and fresh-service setup used.
Report: