QA → Review → Fix Loop Protocol
Comprehensive, evidence-based QA protocol. Layer-based testing with mandatory re-verification. Works on any project — web app, mobile app, trading engine, bot, API, CLI tool, monorepo. Every layer reaches a state that is independently verified, not claimed, to function correctly.
Source: QA_REVIEW_FIX_LOOP_PROTOCOL.md — universal QA protocol
Overview
QA Review-Fix Loop implements an iterative quality cycle: review code → identify issues → fix → re-review → verify. Maintains a fix queue and tracks resolution progress until all issues are resolved.
When to Use
Trigger phrases:
- "Run QA on this codebase"
- "Full QA cycle"
- "Test everything end-to-end"
- "Pre-release testing"
- "Codebase audit"
- "Find and fix all bugs"
- "Verify this works"
Use cases:
- Pre-release QA cycles
- Post-refactor regression testing
- New codebase onboarding (understand + verify)
- Defect-driven development
- Cross-layer integration verification
When NOT to use:
- Single bug fix (use
skill://systematic-debugging instead)
- Code review only (use
skill://code-reviewer)
- Unit test writing (use
skill://test-driven-development)
When NOT to Use
- For throwaway prototypes (skip the ceremony)
- When the fix is a single-line change with no side effects
- When the codebase already has a working solution
Process
Step 0 — Discover the Codebase
Do not assume the stack. Inspect the repository first:
- Read
README.md, package.json / pyproject.toml / go.mod / Cargo.toml to identify languages, frameworks, entry points
- Map actual layers present — only test what exists:
- Frontend (web, mobile, desktop UI)
- Backend services / servers
- REST / GraphQL / RPC APIs
- Databases & migrations
- MCP servers / tool integrations
- Bots (chat, trading, Discord/Telegram/Slack)
- Engines (trading, simulation, rules, scoring)
- Background jobs / workers / cron tasks
- CLI tools
- Infra/config (Docker, CI/CD, env handling)
- Third-party integrations (payment, auth, data providers)
- For each layer, identify how it's tested (existing suite?
npm test? pytest? manual? none?)
- Produce a Layer Inventory before testing begins
Step 1 — The Loop (per layer)
For each layer in the Layer Inventory, repeat:
[1] QA PASS → run tests, click through, call endpoints, log every defect
[2] REVIEW PASS → root-cause each defect, confirm reproducibility,
reject fixes that only mask symptoms
[3] FIX PASS → implement one fix at a time per defect
[4] RE-QA → re-run the EXACT test that caught the defect,
PLUS regression check on adjacent code
[5] EXIT CHECK
├─ New or surviving defects? → back to [2] REVIEW
├─ Zero defects this pass? → layer CLEARED → next layer
└─ Same defect survives 3 attempts? → STOP, escalate with root-cause writeup
Rules:
- No layer is "done" off a single pass. Done = zero new defects + regression check
- No batching unrelated fixes — fix and re-verify as separate changes
- A fix that only suppresses a symptom is rejected at Review
- After all layers CLEARED, run one full cross-layer end-to-end pass
Step 2 — Coverage Requirements (per layer)
Frontend / UI:
- Every page/screen, route (including 404, redirects)
- Every button, menu, dropdown, modal, tab, tooltip, toast
- Every form: valid/invalid/empty input, boundary values, required fields
- Every interactive state: loading, empty, error, success, disabled, offline
- Navigation flows end-to-end
- Responsive breakpoints if applicable
Backend / Services:
- Every endpoint × every HTTP method
- Auth & permission boundaries (authenticated vs not, role A vs role B, expired tokens)
- Input validation: valid, invalid, missing, boundary, malicious
- Error handling: correct status codes, no stack traces to clients
- Idempotency where it matters (payments, order creation)
- Concurrency/race conditions (double-submits, parallel writes)
APIs:
- Response shape matches declared schema exactly
- Status codes correct for every branch (2xx/4xx/5xx)
- Rate limiting behavior if implemented
- Backward compatibility if breaking-change-sensitive
MCP Servers / Tool Integrations:
- Every tool called with: valid args, invalid args, missing args, wrong types
- Returned data matches declared output schema
- Failures surfaced as informative errors, never silent no-ops
- Tool descriptions match actual behavior
Bots (chat, trading, messaging):
- Every command/trigger phrase, including near-misses and typos
- Conversation state transitions (multi-step flows, cancel, timeout)
- Failure recovery: malformed input, network drop, upstream failure
Engines (trading, simulation, rules):
- Core calculations verified against known expected values
- Edge cases: zero, negative, null, extreme values, empty datasets
- A wrong number that doesn't crash is worse than a crash — silent miscalculation must be tested
- Determinism check where expected, or documented non-determinism where intentional
Background Jobs / Workers / Cron:
- Job runs on schedule/trigger as configured
- Failure and retry behavior
- Idempotency on re-run
- Resource cleanup (no orphaned processes, locks, temp files)
Infra / Config / CI-CD:
- Environment variable handling (missing var fails loudly)
- Build succeeds from clean clone
- CI pipeline actually runs the test suite it claims
Cross-cutting (always check):
- Logging: real errors visible, not swallowed
- Secrets: none hardcoded in code
- Dependency drift:
npm install / pip install from clean environment works
Step 3 — End-to-End Cross-Layer Pass
After every layer is CLEARED, run at least one full journey crossing layers:
User action → API call → backend logic → engine/bot processing →
database write → response back → UI reflects new state correctly
Pick 2-4 most important real-world journeys and run them fully after the last fix.
Step 4 — Definition of Done
Done when, and only when:
- Every layer in the Layer Inventory is CLEARED (zero open defects, confirmed by re-test)
- Cross-layer end-to-end pass run after the last fix, and is itself defect-free
- Final Evidence Report complete, including explicit list of anything not tested and why
If any of these three are missing, the work is not done.
Verification
Evidence Requirements (replaces "100% working" claims)
For every layer, report:
LAYER: <name>
Method: [ ] Automated (suite/command name)
[ ] Manual (what was clicked/called/observed)
Test cases run: <N>
Passed: <N>
Failed → fixed → re-verified: <N>
Open defects: <N> (must be 0 to mark CLEARED)
Not tested: <list skipped items + exact reason>
An honest "not verified — here's why" is strictly better than a false "100% confirmed."
Anti-Patterns to Reject
- Claiming "100% tested" without evidence table
- Marking a layer done after single QA pass with no re-test
- Fixing a bug by catching/silencing an error instead of addressing root cause
- Batch-fixing unrelated defects in one change
- Skipping harder layers while testing easy ones
- Reporting "no defects found" without stating what was actually run
Tracking Template
Use this for each layer:
| Pass |
Method |
Defects Found |
Fixed |
Re-verified |
Open |
| 1 |
Automated/Manual |
N |
N |
N |
N |
| 2 |
Automated/Manual |
N |
N |
N |
0 |
Status progression: Not started → In QA → Fixing → Re-QA → CLEARED
Anti-Rationalization Table
| Rationalization |
Reality |
| "Tests slow me down" |
Bugs slow you down 10x more. Tests are speed, not overhead. |
| "I will refactor later" |
Technical debt compounds. Refactor as you go. |
| "It works on my machine" |
If it is not in CI, it does not work. Ship proof, not claims. |
Related Skills
skill://verification-before-completion — Pre-completion verification
skill://code-reviewer — Code review process
skill://systematic-debugging — Individual bug investigation
skill://test-driven-development — TDD workflow
skill://engineering-hard-rules — Engineering enforcement protocol
skill://requesting-code-review — Request external review
1---2name: qa-review-fix-loop3description: Use when comprehensive QA→Review→Fix loop protocol for any codebase. Layer-based testing with evidence requirements. Use when performing full QA cycles, codebase audits, pre-release testing, or.4license: Apache-2.05---678# QA → Review → Fix Loop Protocol910Comprehensive, evidence-based QA protocol. Layer-based testing with mandatory re-verification. Works on any project — web app, mobile app, trading engine, bot, API, CLI tool, monorepo. Every layer reaches a state that is **independently verified**, not claimed, to function correctly.1112**Source:** QA_REVIEW_FIX_LOOP_PROTOCOL.md — universal QA protocol1314## Overview1516**QA Review-Fix Loop** implements an iterative quality cycle: review code → identify issues → fix → re-review → verify. Maintains a fix queue and tracks resolution progress until all issues are resolved.171819## When to Use2021**Trigger phrases:**22- "Run QA on this codebase"23- "Full QA cycle"24- "Test everything end-to-end"25- "Pre-release testing"26- "Codebase audit"27- "Find and fix all bugs"28- "Verify this works"2930**Use cases:**31- Pre-release QA cycles32- Post-refactor regression testing33- New codebase onboarding (understand + verify)34- Defect-driven development35- Cross-layer integration verification3637**When NOT to use:**38- Single bug fix (use `skill://systematic-debugging` instead)39- Code review only (use `skill://code-reviewer`)40- Unit test writing (use `skill://test-driven-development`)414243## When NOT to Use4445- For throwaway prototypes (skip the ceremony)46- When the fix is a single-line change with no side effects47- When the codebase already has a working solution484950## Process5152### Step 0 — Discover the Codebase5354Do not assume the stack. Inspect the repository first:55561. Read `README.md`, `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml` to identify languages, frameworks, entry points572. Map actual layers present — only test what exists:58 - Frontend (web, mobile, desktop UI)59 - Backend services / servers60 - REST / GraphQL / RPC APIs61 - Databases & migrations62 - MCP servers / tool integrations63 - Bots (chat, trading, Discord/Telegram/Slack)64 - Engines (trading, simulation, rules, scoring)65 - Background jobs / workers / cron tasks66 - CLI tools67 - Infra/config (Docker, CI/CD, env handling)68 - Third-party integrations (payment, auth, data providers)693. For each layer, identify how it's tested (existing suite? `npm test`? `pytest`? manual? none?)704. Produce a Layer Inventory before testing begins7172### Step 1 — The Loop (per layer)7374For **each layer** in the Layer Inventory, repeat:7576```77[1] QA PASS → run tests, click through, call endpoints, log every defect78[2] REVIEW PASS → root-cause each defect, confirm reproducibility,79 reject fixes that only mask symptoms80[3] FIX PASS → implement one fix at a time per defect81[4] RE-QA → re-run the EXACT test that caught the defect,82 PLUS regression check on adjacent code83[5] EXIT CHECK84 ├─ New or surviving defects? → back to [2] REVIEW85 ├─ Zero defects this pass? → layer CLEARED → next layer86 └─ Same defect survives 3 attempts? → STOP, escalate with root-cause writeup87```8889**Rules:**90- No layer is "done" off a single pass. Done = zero new defects + regression check91- No batching unrelated fixes — fix and re-verify as separate changes92- A fix that only suppresses a symptom is rejected at Review93- After all layers CLEARED, run one full cross-layer end-to-end pass9495### Step 2 — Coverage Requirements (per layer)9697**Frontend / UI:**98- Every page/screen, route (including 404, redirects)99- Every button, menu, dropdown, modal, tab, tooltip, toast100- Every form: valid/invalid/empty input, boundary values, required fields101- Every interactive state: loading, empty, error, success, disabled, offline102- Navigation flows end-to-end103- Responsive breakpoints if applicable104105**Backend / Services:**106- Every endpoint × every HTTP method107- Auth & permission boundaries (authenticated vs not, role A vs role B, expired tokens)108- Input validation: valid, invalid, missing, boundary, malicious109- Error handling: correct status codes, no stack traces to clients110- Idempotency where it matters (payments, order creation)111- Concurrency/race conditions (double-submits, parallel writes)112113**APIs:**114- Response shape matches declared schema exactly115- Status codes correct for every branch (2xx/4xx/5xx)116- Rate limiting behavior if implemented117- Backward compatibility if breaking-change-sensitive118119**MCP Servers / Tool Integrations:**120- Every tool called with: valid args, invalid args, missing args, wrong types121- Returned data matches declared output schema122- Failures surfaced as informative errors, never silent no-ops123- Tool descriptions match actual behavior124125**Bots (chat, trading, messaging):**126- Every command/trigger phrase, including near-misses and typos127- Conversation state transitions (multi-step flows, cancel, timeout)128- Failure recovery: malformed input, network drop, upstream failure129130**Engines (trading, simulation, rules):**131- Core calculations verified against known expected values132- Edge cases: zero, negative, null, extreme values, empty datasets133- **A wrong number that doesn't crash is worse than a crash** — silent miscalculation must be tested134- Determinism check where expected, or documented non-determinism where intentional135136**Background Jobs / Workers / Cron:**137- Job runs on schedule/trigger as configured138- Failure and retry behavior139- Idempotency on re-run140- Resource cleanup (no orphaned processes, locks, temp files)141142**Infra / Config / CI-CD:**143- Environment variable handling (missing var fails loudly)144- Build succeeds from clean clone145- CI pipeline actually runs the test suite it claims146147**Cross-cutting (always check):**148- Logging: real errors visible, not swallowed149- Secrets: none hardcoded in code150- Dependency drift: `npm install` / `pip install` from clean environment works151152### Step 3 — End-to-End Cross-Layer Pass153154After every layer is CLEARED, run at least one full journey crossing layers:155156```157User action → API call → backend logic → engine/bot processing →158database write → response back → UI reflects new state correctly159```160161Pick 2-4 most important real-world journeys and run them fully after the last fix.162163### Step 4 — Definition of Done164165Done when, and only when:1661671. Every layer in the Layer Inventory is CLEARED (zero open defects, confirmed by re-test)1682. Cross-layer end-to-end pass run after the last fix, and is itself defect-free1693. Final Evidence Report complete, including explicit list of anything not tested and why170171If any of these three are missing, the work is **not done**.172173## Verification174175### Evidence Requirements (replaces "100% working" claims)176177For **every layer**, report:178179```180LAYER: <name>181Method: [ ] Automated (suite/command name)182 [ ] Manual (what was clicked/called/observed)183Test cases run: <N>184Passed: <N>185Failed → fixed → re-verified: <N>186Open defects: <N> (must be 0 to mark CLEARED)187Not tested: <list skipped items + exact reason>188```189190An honest "not verified — here's why" is strictly better than a false "100% confirmed."191192### Anti-Patterns to Reject193194- Claiming "100% tested" without evidence table195- Marking a layer done after single QA pass with no re-test196- Fixing a bug by catching/silencing an error instead of addressing root cause197- Batch-fixing unrelated defects in one change198- Skipping harder layers while testing easy ones199- Reporting "no defects found" without stating what was actually run200201### Tracking Template202203Use this for each layer:204205| Pass | Method | Defects Found | Fixed | Re-verified | Open |206|------|--------|---------------|-------|-------------|------|207| 1 | Automated/Manual | N | N | N | N |208| 2 | Automated/Manual | N | N | N | 0 |209210Status progression: `Not started` → `In QA` → `Fixing` → `Re-QA` → `CLEARED`211212## Anti-Rationalization Table213214| Rationalization | Reality |215|---|---|216| "Tests slow me down" | Bugs slow you down 10x more. Tests are speed, not overhead. |217| "I will refactor later" | Technical debt compounds. Refactor as you go. |218| "It works on my machine" | If it is not in CI, it does not work. Ship proof, not claims. |219220## Related Skills221222- `skill://verification-before-completion` — Pre-completion verification223- `skill://code-reviewer` — Code review process224- `skill://systematic-debugging` — Individual bug investigation225- `skill://test-driven-development` — TDD workflow226- `skill://engineering-hard-rules` — Engineering enforcement protocol227- `skill://requesting-code-review` — Request external review