Skip to main content

QA and Review Loop

Source: .agents/references/implementation/qa-and-review-loop.md

Content

QA and Review Loop

Use this after a worker reports DONE or DONE_WITH_CONCERNS.

Per-Task Loop

  1. Worker implements the task and reports completion.
  2. Master agent marks task implementation-done.
  3. QA agent verifies against requirements and acceptance criteria.
  4. Code review agent reviews with .agents/skills/code-review/SKILL.md.
  5. If both pass, mark task passed.
  6. If QA fails, mark qa-failed, record feedback, increment retry count, and return the task to the same worker or a replacement worker with exact QA feedback.
  7. If code review fails, mark review-failed, record feedback, increment retry count, and return the task to the same worker or a replacement worker with exact review feedback.
  8. Repeat until both QA and code review pass or the task is blocked.

Pass Criteria

QA passes only when:

  • Acceptance criteria are satisfied.
  • Required user flows work.
  • Edge cases are handled or explicitly out of scope.
  • Design/Figma requirements match when applicable.
  • Claimed tests/checks are credible for the task.

Code review passes only when:

  • .agents/rules/*.mdc are followed.
  • Relevant feature and coding-standard references were considered.
  • Changed code is scoped to the task.
  • Type safety, service error handling, localization, security, and styling rules are respected.
  • Tests are adequate for risk and blast radius.
  • Any conflict resolution is scoped correctly and does not revert unrelated work, dependency-task behavior, or existing approved behavior.

Retry Handling

  • Keep retry count per task.
  • Preserve failed feedback in the checklist.
  • Do not retry with identical instructions after a blocker; add context, narrow scope, or escalate.
  • If a task fails repeatedly because scope is too large, split it and update the checklist/worktree assignments.
  • If QA or review fails because of incorrect conflict resolution, return the task to the conflict owner with the exact files, expected preserved behavior, and dependency task(s) involved.

Integration Gate

The master agent may coordinate integration of a task only after:

  • Status is passed.
  • Worker changed-file report is reviewed.
  • QA result is PASS.
  • Code review result is PASS.
  • No unresolved dependency is blocking the task.
  • Any task-scoped conflicts are resolved by that task owner and reviewed.

Final Feature Verification

After all tasks pass and are integrated:

  • Run final relevant checks/tests.
  • Run or delegate final code review for the integrated diff.
  • Assign any repo-editing final integration fixes to a dedicated non-master integration worker.
  • Confirm no unrelated files changed.
  • Confirm conflict resolutions preserve all passed task behavior.
  • Confirm feature references were updated if durable domain behavior changed.
  • Prepare final summary and suggested PR description.