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
- Worker implements the task and reports completion.
- For a page task, the worker records the required centralized
nas-e2ecoverage. When cross-repository changes are authorized, the assigned E2E owner updates the centralized spec and runs its focused command. - Master agent marks the E2E item complete only when required centralized coverage exists and passes, or records the unapproved cross-repository work as an explicit follow-up or blocker.
- QA reruns the recorded centralized E2E command when that coverage is in scope and verifies it against requirements and acceptance criteria.
- Code review agent reviews with
.agents/skills/code-review/SKILL.md. - If both pass, mark task
passed. - 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. - 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. - 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.
- Every affected page has its centralized E2E coverage decision recorded. When coverage is in scope, the exact focused command passes and cases cover the main flow plus relevant acceptance-criteria states.
- Any blocked or excluded E2E flow records the exact missing prerequisite.
not-applicableis accepted only when the feature has no user-facing page impact.
Code review passes only when:
.agents/rules/*.mdcare 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.
- Page-by-page centralized E2E coverage, cases, ownership, and execution evidence are complete or explicitly tracked as cross-repository follow-up work.
- 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 every focused E2E command recorded in the page test inventory from the
nas-e2echeckout when cross-repository coverage is in scope. - Run the appropriate centralized
nas-e2esuite gate after integration. - Return feature-related E2E failures to the responsible test owner; do not waive or silently skip them.
- 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.