AGENT SKILL

x-review-qa

QA specialist review: validates test coverage, TDD compliance, test naming, fixtures, parametrized tests, and acceptance criteria coverage.

License 许可
MIT
最近更新
2026-10-27
Stars
★ 0
Forks
1

01 前言 Front Matter

name
x-review-qa
description
QA specialist review: validates test coverage, TDD compliance, test naming, fixtures, parametrized tests, and acceptance criteria coverage.
allowed-tools
Read, Grep, Glob, Bash
argument-hint
[PR number or file paths]
fragment-slot
{ "slot": "review-specialist", "fragment-id": "qa", "fragment-order": 100 }
context-budget
light
user-invocable
true
requires-capabilities
[]

03 SKILL.md 正文

Global Output Policy

  • Language: English ONLY.
  • Tone: Technical, Direct, and Concise.
  • Efficiency: Remove all conversational fillers and greetings to save tokens.

Skill: QA Specialist Review

Purpose

Review code changes for QA compliance: test coverage thresholds, TDD process adherence, test naming conventions, fixture centralization, parametrized tests for data-driven scenarios, and acceptance criteria coverage. Validates that tests follow the Transformation Priority Premise (TPP) and Double-Loop TDD.

When to Use

  • Pre-PR quality validation for test quality
  • Verifying TDD compliance in commit history
  • Ensuring coverage thresholds are met
  • Checking test naming and organization

Triggers

  • /x-review-qa 42 -- review PR #42 for QA compliance
  • /x-review-qa src/test/ -- review test files at specific paths
  • /x-review-qa -- review all current test changes

Parameters

Parameter Type Required Default Description
target String No (current changes) PR number or file paths to review

Knowledge Pack References

Pack Files Purpose
testing knowledge/testing.md Test categories, coverage thresholds, fixture patterns, TDD workflow

Checklist (20 Items, Max Score: /40 full scale; adjusted max excludes N/A items)

Each applicable item scores 0 (missing), 1 (partial), or 2 (fully compliant). Items marked N/A are excluded from BOTH the earned score and the maximum possible score. When testing.smoke_tests == false, QA-19 and QA-20 are automatically marked N/A, so the adjusted maximum is /36 instead of /40. Report the adjusted max in the final score line (see Output Template below).

Coverage & Criteria (QA-01 to QA-03)

# Item Score
QA-01 Test exists for each acceptance criterion /2
QA-02 Line coverage >= 95% (absolute gate — Rule 05 RULE-005-01) /2
QA-03 Branch coverage >= 90% (absolute gate — Rule 05 RULE-005-01) /2

Absolute-gate note (Rule 05 RULE-005-01): QA-02 and QA-03 evaluate the repository's current coverage, not just the PR diff. The specialist MUST fail these items regardless of whether the deficit was introduced by this PR or was pre-existing on the base branch. Pre-existing deficits must be closed in the current PR or in a predecessor PR; no "pre-existing" exemption is permitted. The only escape path is an approved ADR that temporarily lowers the gate for a specific package (with sunset date).

Test Quality (QA-04 to QA-10)

# Item Score
QA-04 Test naming convention followed: [method]_[scenario]_[expected] /2
QA-05 AAA pattern (Arrange-Act-Assert) in every test /2
QA-06 Parametrized tests for data-driven scenarios /2
QA-07 Exception paths tested with specific assertions /2
QA-08 No test interdependency (tests run in any order) /2
QA-09 Fixtures centralized (no duplicate records/classes across test files) /2
QA-10 Unique test data per test (no shared mutable state) /2

Test Completeness (QA-11 to QA-12)

# Item Score
QA-11 Edge cases covered (null, empty, boundary values) /2
QA-12 Integration tests for DB/API interactions /2

TDD Compliance (QA-13 to QA-18)

# Item Score
QA-13 Commits show test-first pattern (test precedes implementation in git log) /2
QA-14 Explicit refactoring after green (separate refactor commits) /2
QA-15 Tests follow TPP progression (simple to complex) /2
QA-16 No test written after implementation (test-after is a violation) /2
QA-17 Acceptance tests validate end-to-end behavior /2
QA-18 TDD coverage thresholds maintained across all modules /2

Smoke Test Verification (QA-19 to QA-20) — EPIC-0042

# Item Score
QA-19 Smoke tests exist and cover critical path (when testing.smoke_tests == true; N/A when false) /2
QA-20 ALL smoke tests pass — {{SMOKE_COMMAND}} executed with zero failures (when testing.smoke_tests == true; N/A when false) /2

Workflow

Step 1 -- Gather Context

Read the testing knowledge pack for project test conventions:

  • knowledge/testing.md

Step 2 -- Identify Changed Files

Determine scope: PR diff or specified paths. Separate production code from test code.

Step 3 -- Coverage Analysis

Check coverage reports or run coverage tool. Verify line >= 95% and branch >= 90%.

Absolute gate (Rule 05 RULE-005-01): the gate fires when the repository's measured coverage falls below either threshold, regardless of whether the deficit was caused by the PR or was pre-existing on the base branch. The specialist MUST record the finding and fail QA-02/QA-03 in both cases; it is not the specialist's place to grant a pre-existing exemption.

Step 4 -- Test Naming Audit

Scan test files for naming convention compliance: [methodUnderTest]_[scenario]_[expectedBehavior].

Step 5 -- TDD Commit Audit

Analyze git log for test-first pattern: test commits should precede or accompany implementation commits.

Step 6 -- Test Quality Review

For each test file:

  • Check AAA pattern
  • Check parametrized tests for multi-scenario validations
  • Check exception path coverage
  • Check fixture centralization
  • Check unique test data

Step 6.5 -- Smoke Test Verification (EPIC-0042)

Execute smoke test verification when testing.smoke_tests == true:

  1. Check if smoke test infrastructure exists:
    • If testing.smoke_tests == false: mark QA-19 and QA-20 as N/A (not scored, excluded from max score)
    • If testing.smoke_tests == true: proceed with smoke verification
  2. QA-19 — Smoke test existence: Verify smoke tests exist and cover at least the critical path (health check + primary flow)
  3. QA-20 — Smoke test execution: Run {{SMOKE_COMMAND}} and verify ALL smoke tests pass:
    {{SMOKE_COMMAND}}
    
    • If ALL smoke tests PASS: QA-20 scores 2/2
    • If ANY smoke test FAILS: QA-20 scores 0/2 AND STATUS becomes Rejected
    • Log each failing smoke test name and failure reason
  4. Hard rule: ALL unit + integration + smoke tests MUST pass for STATUS: Approved

Step 7 -- Generate Report

Produce the scored report.

Output Format

ENGINEER: QA
STORY: [story-id or change description]
SCORE: XX/40 (or XX/36 when QA-19 and QA-20 are N/A — use the adjusted max that
       excludes N/A items; see Checklist header for the N/A rules)

STATUS: PASS | FAIL | PARTIAL

### PASSED
- [QA-XX] [Item description]

### FAILED
- [QA-XX] [Item description]
  - Finding: [file:line] [issue description]
  - Fix: [remediation guidance]

### PARTIAL
- [QA-XX] [Item description]
  - Finding: [partial compliance details]

Error Handling

Scenario Action
No test files found Report INFO: no test code discovered
Coverage tool not configured Warn and skip QA-02, QA-03
Git log not available Warn and skip QA-13, QA-14, QA-16
Smoke test failure (QA-20) STATUS becomes Rejected regardless of other scores
testing.smoke_tests == false Mark QA-19, QA-20 as N/A (excluded from max score)

04 同仓库更多 Skills

review-bench
review-bench/edercnj_ia-dev-environment

x-parallel-eval

Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan / x-story-plan, applies the parallelism-heuristics knowledge pack (hard / regen / soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

parallelism-heuristics

Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard / regen / soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-watch-pr-ci

Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-validate-docs

Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared/auto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-system-architecture

Incrementally updates docs/architecture/system.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component/integration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-architecture

Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.

★ 0