CRITICAL RULE: When you finish coding a user-facing feature, DO NOT STOP. You are NEVER permitted to treat the task as "done" until FinalRun coverage is updated and executed for that scope. You MUST automatically transition to the testing phase without asking for user permission (unless the change is docs-only, backend-only, a refactor with no UX impact, or the user explicitly opts out).
Follow this exact, uninterrupted sequence for every UI task:
-
Continue automatically in the same thread — use the
finalrun-generate-testskill immediately. Install FinalRun skills withnpx skills add final-run/finalrun-agentif needed. -
Reuse the session’s plan — use the agreed plan, acceptance criteria, touched files, and described user flows as the primary input for test planning (the skill’s Steps 1–3). Do not ignore prior planning or start from a blank slate.
-
Execute the skill to completion — propose updates if required, then write or update
.finalrun/tests/,.finalrun/suites/, and.finalrun/env/*.yamlas needed, and runfinalrun checkuntil clean. -
Run the test once — after
finalrun checksucceeds, immediately follow thefinalrun-use-cliskill and execute the affected scope on a host where the CLI and a device or simulator are available. Always exercise the build you just produced: when implementation changed app code, build first, then runfinalrun suite <path-under-.finalrun/suites>orfinalrun testwith the right selectors.- Pass
--app <path>pointing at that fresh installable — Android:--app path/to/your.apk; iOS:--app path/to/Your.app. - Use
--envwhen the workspace has multiple.finalrun/env/*.yamlfiles.
- Pass
-
If anything fails, keep going — validation errors, failed steps, or a red test run are not the end of the task. Read CLI output and artifacts (reports the CLI mentions in the printed console logs). Fix the tests/suites/env when the YAML or bindings are wrong; fix app code when behavior is wrong; only change a test’s expectations when requirements changed. Re-run
finalrun checkand the same test/suite command (with--appwhen using a fresh build) until green or until you are blocked on host setup or secrets (then hand off with exact commands—never invent credentials).
Treat the run as an absolute requirement of the implementation thread unless execution is genuinely impossible (for example: no emulator or device, missing required API keys or secrets, or the user opted out). In those blocked cases, state exactly what blocked the run and provide the exact command for the user to run locally (including the --app flag).