arthai-marketplace

/qa

Run QA checks.

Synopsis

/qa [commit|full|staging|prod|e2e-gen|visual|ios] [--commit-strict] [--workflow|--classic] [--invoked-by <caller>]

Flags:

When to use it

For mode-selection strategy and the four-layer test philosophy, see the QA Guide. This page covers invocation and what each run does.

Quickstart

/qa

What you’ll see: a mode line confirming commit mode, then 2-4 QA agents running targeted checks on your changed files (5-8 generated scenarios, ~1-3 min), ending with a structured QA report and a suggested next step (/review-pr then /pr).

Examples

/qa              # commit mode — targeted checks on the last commit's diff (~1-3 min)
/qa full         # comprehensive multi-surface QA, all agents in parallel (~10-20 min)
/qa staging      # health + smoke + E2E against deployed staging
/qa prod         # READ-ONLY health + smoke against production — no mutations
/qa e2e-gen      # generate + run exploratory Playwright tests for changed components (~3-8 min)
/qa visual       # screenshot routes at desktop/tablet/mobile and evaluate (~5-15 min)
/qa ios          # iOS Simulator visual QA — macOS with Xcode + built .app only (~5-10 min)
/qa --commit-strict   # commit mode without the automatic qa-domain escalation pass
/qa full --workflow   # run the full-mode surface fan-out as a dynamic Workflow (classic is the default)

If you run /qa with no argument and nothing has changed since the last commit, it shows a one-line picker instead of running — user-confirmation checkpoint (Enter for a full audit, ? for all modes, c to cancel).

What it does

Commit and full modes follow the same skeleton:

  1. Reads project configCLAUDE.md test commands, QA knowledge base (past bug patterns, incidents), and .claude/qa-config.json if present.
  2. Analyzes the diffHEAD~1 in commit mode, main...HEAD in full mode. Commit mode also runs an advisory /revert-check and annotates the report if anything looks like an accidental revert.
  3. Maps changes to existing tests — finds which changed files have tests, which are stale, and which have none (flagged as coverage gaps).
  4. Spawns QA agents in parallel — selected by where your changes live (see table below). Full mode runs the same core lint/test/schema/architectural-review agents (backend-qa, frontend-qa, contract-qa, code-review, pbt-qa) on the full-codebase diff, plus a dedicated surface roster: visual, E2E, iOS (when detected), domain, and adversarial-challenger agents.
  5. Generates fresh test scenarios — thinks like a real user about what your change could break, plus property-based tests for pure functions (100 iterations in commit mode, 1000 in full).
  6. Audits coverage — flags new code without tests, stale tests, dead tests.
  7. Produces the QA report — pass/fail per check, failures, warnings, coverage, and next steps. Full mode writes the report to a file and exits non-zero on failure.
  8. Verifies completeness — a completion-verifier agent cross-checks the run (skipped for staging/prod and tiny diffs). If it flags a domain-logic gap in commit mode, a qa-domain agent is auto-spawned for one extra validation pass (suppress with --commit-strict).
  9. Offers test promotion — when a generated scenario caught a real bug, it asks whether to promote the scenario into a permanent regression test via qa-test-promoter (user-confirmation checkpoint; capped at 3 per run, never auto-promoted in CI/autopilot).
  10. Prints a post-run checklist, then suggests the next step — a one-line checklist (verifier verdict + knowledge-base writes + promotions) appears before the verdict so nothing was silently skipped; then on pass in guided mode it asks whether to run /review-pr now or skip to /pr (user-confirmation checkpoint — suppressed when /pr, /implement, or /fix invoked QA with --invoked-by, since the caller asks its own next-step question); on fail it asks whether to fix and re-run.

Staging/prod modes skip the diff analysis and instead resolve deployed URLs from CLAUDE.md, hit health endpoints, and run smoke (and E2E for staging) checks. Prod is strictly read-only.

Agents spawned

Selection depends on mode and which files changed. Commit-mode/core agents run in both commit and full mode; the surface agents are full-mode only (except when invoked directly via /qa visual, /qa e2e-gen, or /qa ios).

Commit-mode / core agents (run in commit mode, and again in full mode over the full-codebase diff):

Agent Model tier Role
backend-qa / frontend-qa haiku Lint, type check, tests, build on changed layers
contract-qa haiku Schema diff / migration validation
domain-qa, code-review, pbt-qa sonnet Business-logic checks, architectural review, property-based tests
qa-test-promoter haiku Converts an approved bug-catching scenario into a permanent regression test (only when you say yes)
completion-verifier sonnet Final completeness cross-check

Full-mode surface agents (the F3 roster — additive on top of the core agents above):

Agent Model tier Role
qa-visual sonnet Visual regression across desktop/tablet/mobile viewports
qa-e2e sonnet Exploratory end-to-end flow testing (Playwright)
qa-ios sonnet iOS Simulator visual QA (macOS + Xcode + built .app only)
qa-domain sonnet Domain/business-logic validation across the full surface
qa-challenger sonnet Adversarial attacks against the changes

Note: e2e-gen (/qa e2e-gen) is a separate opt-in mode that generates new exploratory Playwright tests — it is not part of full mode. qa-e2e is the full-mode surface agent that runs E2E tests. The similar names refer to different things.

Model tiers shown above are defaults from model-policy.yml and may differ if your project customizes model assignments via a model-policy.override.yml.

In full mode the surface agents (qa-visual, qa-e2e, qa-ios, qa-domain, qa-challenger) can spawn either classically or as a dynamic Workflow (--workflow); results, verdict math, and the report are identical in both paths.

Output & artifacts

Troubleshooting

Problem Fix
diff is empty picker appears Nothing changed since the last commit — pick full audit, another mode, or cancel
/qa: empty diff — specify mode (CI/autopilot) Non-interactive runs need an explicit mode argument
Dev server not running (visual / e2e-gen) Start the dev server with the command from CLAUDE.md, then re-run
Playwright not configured (e2e-gen) The project has no playwright.config.* — e2e-gen can’t generate tests without it
computer-use MCP not connected (visual) Connect the computer-use MCP and retry; full mode marks the surface SKIPPED instead
iOS surface reports SKIPPED iOS QA requires macOS with Xcode and a built .app bundle