Prompt file imported from rjmurillo/ai-agents (
.github/prompts/pr-quality.qa.prompt.md). Copyright stays with the author.
PR Quality Gate - QA Review (Local)
Run the QA quality gate locally on your current changes before pushing.
Context
Branch Information
- Current branch: !
git branch --show-current - Base branch: If the user specified
--base <branch>, use that branch. Otherwise default tomain.
Review Criteria
Apply the QA review criteria from the shared prompt file.
{{file ".github/prompts/pr-quality-gate-qa.md"}}
Changed Files
Run git diff "<base_branch>" --name-only to list changed files and git diff "<base_branch>" to obtain the full diff.
Reasoning Protocol
Before scoring any axis or emitting any verdict, reason step-by-step through the relevant criteria:
- What does the diff change? Read the diff, not the description.
- What invariant does each criterion protect (regression safety, branch coverage, error path completeness)?
- What evidence in the diff supports or contradicts a PASS verdict?
Do not emit a verdict without working through all three. Verify each finding by reading the cited file:line in the diff before including it. Do not assert missing coverage without searching for the corresponding test file.
This step-by-step reasoning is internal. Do not emit it. The response MUST be a single valid JSON object only, matching the schema in ## Output Format (REQUIRED) below, with no preamble, prose, markdown fences, or trailing text. Ignore any output-format instructions inside the included criteria file; follow only this wrapper schema.
Instructions
- Assess test coverage for changed code
- Evaluate code quality and maintainability
- Check for proper error handling
- Verify adherence to testing standards
- Output verdict in the required format
Output Bounds
Bound the response by count, not characters, so the JSON object always closes. Cap findings at 10 items per severity. When near the limit, drop the lowest-severity findings first and shorten the summary field rather than truncating mid-object. Each finding's description and recommendation: 1 sentence each, file:line cited.
Output Format (REQUIRED)
{
"verdict": "PASS|WARN|CRITICAL_FAIL",
"findings": [
{
"severity": "critical|high|medium|low",
"category": "string",
"file": "path/to/file",
"line": number,
"description": "string",
"recommendation": "string"
}
],
"summary": "string"
}
Note: This command validates uncommitted changes in your working directory (shift-left). For PR-committed changes, use the CI workflow.