/qa
The active-QA skill. Runs the repo's test suite, parses failures, applies targeted fixes for common patterns (snapshot drift, lint nits, type errors, missing imports), re-runs, and reports a clean pass or a structured stuck-state. Distinct from /qa-only, which never edits.
When to use
- You just finished implementation and want a clean test pass before
/review or /ship
- CI is red and you want to reproduce + fix locally before pushing
- After a refactor where snapshots and fixtures need to catch up
When NOT to use
- Tests have never passed on this branch — first establish a green baseline manually
- Failures are clearly product-logic bugs — use
/investigate instead (hypothesis-driven, no auto-fix)
- Production deploy gate — use
/qa-only (read-only, no edits)
Inputs
- Optional
--scope <path> — run only tests matching the path (default: full suite)
- Optional
--no-fix — report failures, do not attempt fixes (same shape as /qa-only)
- Optional
--max-iterations <N> — stop after N fix+rerun cycles (default: 3)
Workflow
- Detect test runner — read
package.json / pyproject.toml / Cargo.toml / equivalent. Pick the canonical script (npm test, pytest, cargo test). If multiple: ask via AskUserQuestion.
- Baseline run — execute, capture stdout/stderr + exit code. If clean: report + exit.
- Failure classification — group failures into buckets:
- Snapshot drift (stable diff, no logic change) → auto-fix candidate
- Lint / format nit → auto-fix candidate
- Type error from new code → auto-fix candidate (add missing import, fix obvious typo)
- Assertion failure (real product behavior) → DO NOT auto-fix, escalate
- Flaky / timeout → retry once, then escalate
- Auto-fix cycle — for each auto-fix candidate, apply the targeted Edit. Group fixes into one commit-able batch. NEVER touch product code without explicit operator confirmation.
- Re-run — repeat steps 2-4 up to
--max-iterations.
- Final state — either CLEAN PASS or STUCK with structured report.
Report format
QA Status: <branch>
Runner: npm test
Iterations: 2/3
Initial failures: 7
Auto-fixed: 5
- 3× snapshot drift (src/components/case/__snapshots__/)
- 1× lint (src/lib/dlxClient.ts: unused import)
- 1× missing import (src/hooks/useCaseBrain.ts: useEffect)
Remaining: 2
## Stuck — escalating
[FAIL] tests/billing.test.ts:42 — expected 100, got 200
Likely cause: real product logic — refund doubles amount
Recommendation: /investigate
[FAIL] tests/e2e/auth.spec.ts:18 — timeout waiting for #login-btn
Likely cause: flaky — but failed twice in a row, suspect real
Recommendation: read playwright trace at .playwright/trace.zip
Compliance integration
- Sanity-scan on every Edit before applying (no secrets/customer-data in fix payload).
- If auto-fix would touch a frozen-zone path (per project CLAUDE.md): block + escalate.
- Audit-log every auto-fix mechanically (Layer 2 traceability):
source "${LINTEL_SOURCE_ROOT:-$(git rev-parse --show-toplevel)}/bin/_audit.sh"; audit_log qa-fixes auto_fix file=<path> fix_kind=<lint|snapshot|import|assertion> → .claude/runtime/audit/qa-fixes.jsonl.
Failure modes
- No test runner detected: report + ask operator to declare via
package.json scripts or ~/.lintel/qa.yaml.
- Runner crashes (not test failure, runner itself): report + exit. Do not retry blindly.
- Max iterations hit with failures remaining: STUCK state — surface full failure list + recommendations. Operator chooses next move.
- Auto-fix introduces a NEW failure: revert the fix, mark that failure non-auto-fixable, continue with remaining.
Examples
Clean pass:
> /qa
✓ All tests pass (npm test, 1 iteration, 142 tests / 0 failures)
Ready for /review.
Auto-fix success:
> /qa
Iteration 1: 7 failures
Iteration 2: 0 failures (auto-fixed 7)
✓ Clean after 2 iterations. Fixes batched.
Stuck on real bug:
> /qa
Iteration 3: 2 failures remaining (non-auto-fixable)
✗ STUCK — see report. Recommendation: /investigate
See also
/qa-only — read-only variant for ship-gate verification
/investigate — when QA finds a real product-logic bug
/review — runs after QA clean for diff-scoped review
/ship — reads QA status as a pre-flight gate
1---2name: qa3description: Use when you need to know whether the code works and to get the test suite green — runs the full suite, parses failures, fixes common ones, and re-runs until clean or genuinely stuck. Reach for it after making changes or when tests are failing and you want them resolved.4---56# /qa78The active-QA skill. Runs the repo's test suite, parses failures, applies targeted fixes for common patterns (snapshot drift, lint nits, type errors, missing imports), re-runs, and reports a clean pass or a structured stuck-state. Distinct from `/qa-only`, which never edits.910## When to use1112- You just finished implementation and want a clean test pass before `/review` or `/ship`13- CI is red and you want to reproduce + fix locally before pushing14- After a refactor where snapshots and fixtures need to catch up1516## When NOT to use1718- Tests have never passed on this branch — first establish a green baseline manually19- Failures are clearly product-logic bugs — use `/investigate` instead (hypothesis-driven, no auto-fix)20- Production deploy gate — use `/qa-only` (read-only, no edits)2122## Inputs2324- Optional `--scope <path>` — run only tests matching the path (default: full suite)25- Optional `--no-fix` — report failures, do not attempt fixes (same shape as `/qa-only`)26- Optional `--max-iterations <N>` — stop after N fix+rerun cycles (default: 3)2728## Workflow29301. **Detect test runner** — read `package.json` / `pyproject.toml` / `Cargo.toml` / equivalent. Pick the canonical script (`npm test`, `pytest`, `cargo test`). If multiple: ask via AskUserQuestion.312. **Baseline run** — execute, capture stdout/stderr + exit code. If clean: report + exit.323. **Failure classification** — group failures into buckets:33 - Snapshot drift (stable diff, no logic change) → auto-fix candidate34 - Lint / format nit → auto-fix candidate35 - Type error from new code → auto-fix candidate (add missing import, fix obvious typo)36 - Assertion failure (real product behavior) → DO NOT auto-fix, escalate37 - Flaky / timeout → retry once, then escalate384. **Auto-fix cycle** — for each auto-fix candidate, apply the targeted Edit. Group fixes into one commit-able batch. NEVER touch product code without explicit operator confirmation.395. **Re-run** — repeat steps 2-4 up to `--max-iterations`.406. **Final state** — either CLEAN PASS or STUCK with structured report.4142## Report format4344```45QA Status: <branch>4647Runner: npm test48Iterations: 2/349Initial failures: 750Auto-fixed: 551 - 3× snapshot drift (src/components/case/__snapshots__/)52 - 1× lint (src/lib/dlxClient.ts: unused import)53 - 1× missing import (src/hooks/useCaseBrain.ts: useEffect)54Remaining: 25556## Stuck — escalating57[FAIL] tests/billing.test.ts:42 — expected 100, got 20058 Likely cause: real product logic — refund doubles amount59 Recommendation: /investigate6061[FAIL] tests/e2e/auth.spec.ts:18 — timeout waiting for #login-btn62 Likely cause: flaky — but failed twice in a row, suspect real63 Recommendation: read playwright trace at .playwright/trace.zip64```6566## Compliance integration6768- Sanity-scan on every Edit before applying (no secrets/customer-data in fix payload).69- If auto-fix would touch a frozen-zone path (per project CLAUDE.md): block + escalate.70- Audit-log every auto-fix mechanically (Layer 2 traceability):71 `source "${LINTEL_SOURCE_ROOT:-$(git rev-parse --show-toplevel)}/bin/_audit.sh"; audit_log qa-fixes auto_fix file=<path> fix_kind=<lint|snapshot|import|assertion>` → `.claude/runtime/audit/qa-fixes.jsonl`.7273## Failure modes7475- **No test runner detected:** report + ask operator to declare via `package.json` scripts or `~/.lintel/qa.yaml`.76- **Runner crashes (not test failure, runner itself):** report + exit. Do not retry blindly.77- **Max iterations hit with failures remaining:** STUCK state — surface full failure list + recommendations. Operator chooses next move.78- **Auto-fix introduces a NEW failure:** revert the fix, mark that failure non-auto-fixable, continue with remaining.7980## Examples8182**Clean pass:**83```84> /qa85✓ All tests pass (npm test, 1 iteration, 142 tests / 0 failures)86Ready for /review.87```8889**Auto-fix success:**90```91> /qa92Iteration 1: 7 failures93Iteration 2: 0 failures (auto-fixed 7)94✓ Clean after 2 iterations. Fixes batched.95```9697**Stuck on real bug:**98```99> /qa100Iteration 3: 2 failures remaining (non-auto-fixable)101✗ STUCK — see report. Recommendation: /investigate102```103104## See also105106- `/qa-only` — read-only variant for ship-gate verification107- `/investigate` — when QA finds a real product-logic bug108- `/review` — runs after QA clean for diff-scoped review109- `/ship` — reads QA status as a pre-flight gate