quality-review
Review delivered code for engineering quality (organization, readability, error handling, tests, consistency with the codebase's patterns) independent of the specification. Use after a delivery in parallel with code-review and security-review, or on any files the user points at, such as 'is this module maintainable' or 'review this file for readability and tests'. Not for checking a delivery against its ticket (code-review), vulnerabilities (security-review) or decay across many deliveries (rot-watch).
- License 许可
- MIT
- 最近更新
- 2026-10-22
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- quality-review
- effort
- xhigh
- description
- Review delivered code for engineering quality (organization, readability, error handling, tests, consistency with the codebase's patterns) independent of the specification. Use after a delivery in parallel with code-review and security-review, or on any files the user points at, such as 'is this module maintainable' or 'review this file for readability and tests'. Not for checking a delivery against its ticket (code-review), vulnerabilities (security-review) or decay across many deliveries (rot-watch).
- argument-hint
- [capability area] [TICKET-XXX] [in change-slug] | [files]
02 资源文件 3
- 资产文件assets/quality-review-report.md2.5 KB
- 参考文档references/example.md5.0 KB
- 脚本scripts/run-social-video.sh11.0 KB
03 SKILL.md 正文
Quality Review Skill
Invoked with: $ARGUMENTS
If that is empty, ask the user which delivered ticket (or which files) to review before doing anything else. Never guess the target. The ticket lives in a change: when exactly one change is active (active_changes in .gener8v/pipeline-state.yaml), default to it; when several are and the argument does not say in <change-slug>, ask which change before doing anything else.
Purpose
Review implemented code for engineering quality independent of pipeline artifacts. This skill does not care whether the code matches the spec — that is the Code Review skill's job. It cares whether the code is well-written, maintainable, testable, and follows sound engineering practices. It evaluates code organization, readability, error handling, test coverage, observability and operability, and adherence to established patterns in the codebase.
When to Use
Use this skill when:
- A ticket has been delivered (a delivery record exists in
.gener8v/changes/<change-slug>/delivery/) - After or in parallel with Code Review
- When code quality standards need enforcement before merging
- When evaluating delivered code for maintainability concerns
- When onboarding new patterns or conventions and ensuring consistency
Input
Source: Delivered code files Read from:
- Delivery record:
.gener8v/changes/<change-slug>/delivery/<area-slug>-ticket-NNN-delivery.md(for the file list) - Actual code files listed in the delivery record's "Files Produced" section
- System Context:
.gener8v/context.md(if available — for language, framework, convention expectations and the## Repositoriestable's verify commands for the repository the delivery changed) - Conventions:
.gener8v/CONVENTIONS.md - Existing codebase files in the same directory or module (for pattern consistency checks)
Expects: Code files to exist. Does NOT require pipeline artifacts beyond the delivery record — this skill is intentionally pipeline-independent in its review criteria.
If input is missing or malformed:
- If no delivery record exists, the user can point directly to code files to review
- If system context is missing, the skill infers conventions from the existing codebase and notes reduced context in the report
- If the code files listed in the delivery record do not exist, stop and flag the issue
Output
Produces: A quality review report with findings and interactive resolutions
Write to: .gener8v/changes/<change-slug>/reviews/<area-slug>-ticket-NNN-quality-review.md
Creates directory: .gener8v/changes/<change-slug>/reviews/ if it does not exist
Naming convention: Matches the delivery record naming with -quality-review suffix
The report is written as soon as findings are drafted (all Open) and updated finding by finding during resolution. Approved code changes are applied in the resolution phase, re-verified, and recorded in the delivery record's ## Post-Review Amendments.
Output Format
Write the report in the shape of assets/quality-review-report.md — Read it before writing and follow it exactly, headings and status lines included. gener8v-state.py parses its **Result:** line for the verdict and counts its ### QR-NNN headings and **Severity:** lines for the metrics, so none of the three may be renamed or reformatted.
Principles
Quality Is Objective, Not Aesthetic
Findings must identify concrete engineering concerns: missing error handling, naming that obscures intent, duplicated logic, untested edge cases, functions too complex to reason about. "I would have done it differently" is not a finding. "This function has a cyclomatic complexity of 15 with 6 nested conditionals" is.
Context-Sensitive Standards
A prototype and a production service have different quality bars. A CLI script and a shared library have different expectations. Use system context (.gener8v/context.md) when available to calibrate. Examine the existing codebase to understand established patterns. Do not demand enterprise patterns in a proof-of-concept or library-grade polish in an internal tool.
Readability Over Cleverness
Code is read far more often than it is written. Prefer findings that improve readability even at the cost of conciseness. A three-line conditional is better than a one-line ternary that requires three re-reads to parse. Name things for the reader who will debug this at 2am.
Patterns Over Rules
Check for consistency with the codebase's existing patterns before flagging deviations from textbook best practices. A codebase that consistently uses one error handling pattern should not be told to switch mid-stream. Pattern consistency within a project trumps theoretical ideals.
SOLID Is a Lens, Not a Law
Use SOLID principles as diagnostic tools to identify potential problems, not as a checklist that must be fully satisfied. Flag Single Responsibility violations only when a module is doing so many things that changes in one area risk breaking another. Flag Open/Closed violations only when extension points are clearly needed. Do not flag SOLID "violations" in code that is simple, clear, and unlikely to change.
Tests Are First-Class Code — and Their Absence Is a Block
A ticket with testable acceptance criteria and no tests is Changes Required, not a suggestion: the delivery's Verification Run has nothing to run, so nothing about the ticket is proven. Review test code with the same rigor as production code. Tests that are brittle (tied to implementation details), unclear (test names that don't describe behavior), or incomplete (happy path only) are quality findings. Tests that test the framework instead of the behavior are quality findings.
Two Phases, Two Runtimes
Findings (steps 1–13) can run in a fresh context — the shipped quality-reviewer agent, started on its route (kind review, CONVENTIONS §13), in parallel with the other two reviewers — because a reviewer who did not build the code has no reason to trust the builder's account of it. The findings phase writes the report with every finding Status: Open and a provisional verdict, and changes nothing else. Resolution (steps 14–16) runs in the main session with the user, one review at a time so three reviewers never edit the same file concurrently. Every approved change is re-verified and appended to the delivery record's ## Post-Review Amendments; the report is updated per finding as it is resolved, and the final verdict is written last.
Performance Is Contextual
Do not flag performance concerns without considering the actual usage context. An O(n^2) loop over a list that will never exceed 10 items is not a finding. A synchronous blocking call in a request handler that serves 10,000 concurrent users is. State the context that makes a performance concern relevant.
Process
-
Locate Code: Read the delivery record to get the list of files produced. If no delivery record exists, use file paths provided directly by the user.
-
Read All Code: Read every delivered code file, including test files if present.
-
Read System Context: If
.gener8v/context.mdexists, read it for language, framework, and convention expectations, and take the verify commands for the repository the delivery changed from its## Repositoriestable. -
Read Surrounding Code: Read existing code files in the same directory or module to understand established patterns, naming conventions, and error handling approaches.
-
Assess Code Organization: Evaluate module structure, separation of concerns, file organization. Check whether responsibilities are clearly delineated. Check import structure and dependency direction.
-
Assess Readability: Evaluate naming conventions (variables, functions, classes, files). Check function length and cognitive complexity. Look for self-documenting code vs. code that requires extensive comments to understand.
-
Assess Error Handling: Check for missing error handling on operations that can fail. Check for swallowed errors (catch-and-ignore). Verify error messages are meaningful and actionable. Check for consistent error handling patterns.
-
Assess Test Coverage: Run the project's test, lint and type-check commands (from the
## Repositoriestable incontext.mdfor the repository the delivery changed, or the repository's scripts when the table is absent) and record the results. Check for test presence. Evaluate coverage of key code paths, edge cases, and error conditions. Assess test quality — are tests testing behavior or implementation? Are test names descriptive? Testable acceptance criteria with no tests is a Critical finding. -
Assess Observability & Operability: Check what the code logs, at what level and with what context (identifiers, durations, causes). Check whether failures are visible to an operator — not swallowed, not logged as noise — and whether metrics or health signals exist where the surrounding code provides them. Rate it like the other four categories; calibrate to the codebase's existing logging and metrics patterns rather than demanding instrumentation the project does not use.
-
Check DRY: Identify duplicated logic that should be extracted. Distinguish between coincidental similarity (leave alone) and actual duplication (extract).
-
Check Patterns: Verify consistency with the codebase's established patterns. Flag deviations that introduce inconsistency without justification.
-
Check Performance: Identify obvious performance concerns in context. Consider the actual usage patterns and data volumes.
-
Draft Findings and Write the Report: Create findings with category, severity, root-relative location, and specific recommendations. Write the full report to
.gener8v/changes/<change-slug>/reviews/now, every findingOpen, verdict provisional. (End of the findings phase — when run as thequality-revieweragent, stop here and return the report path, verdict and counts.) -
Present to User: Share findings starting with Critical, then Concerns, then Suggestions. Work through interactive resolution — fix, defer or dismiss — updating each finding in the report as it is decided. A finding deferred to a named ticket (
Deferred → TICKET-NNN) also gets a Known Hazard appended to that ticket's file —.gener8v/changes/<change-slug>/tickets/<area-slug>/TICKET-NNN.md— so the implementer sees it (CONVENTIONS.md§2). -
Apply Approved Changes: Update code files for findings the user approves, re-run the delivery record's Verification Run, and append each change to the delivery record's
## Post-Review Amendments. -
Write the Verdict: Set the final
**Result:**last.
Example
A quality review of support-search/search-and-retrieval/TICKET-001 (query input interface) — one delivered file, no tests, five rated categories, a Critical finding that blocks the ticket and a Suggestion, written under changes/support-search/reviews/. The full worked example is in references/example.md (relative to this skill's directory). Read it before producing your first artifact of this kind.
Troubleshooting
- Orchestrate still lists the quality review as missing after the report was written. The state script opens exactly
.gener8v/changes/<change-slug>/reviews/<area-slug>-ticket-nnn-quality-review.md— area slug, lowercaseticket-nnn, inside the ticket's change. Any other name or directory is invisible to it. Move or rename the file; never leave two copies. - The user pointed at files with no ticket behind them. There is no change, area or ticket to build the report path from, and no delivery record to append
## Post-Review Amendmentsto. Ask where the report goes, state in its Summary that no ticket is attached (Orchestrate will not count it), and record every applied change in the Resolution Log instead. - The test, lint or type-check commands will not run. Step 8 takes them from
context.md's## Repositoriestable or the repository's own scripts. When neither yields a command that runs, record what was tried and what it printed under Test Coverage, and rate the tests from their content. Do not report results that were not produced; tests that exist but cannot be run are a Testing finding in their own right. - The surrounding code has no single pattern to be consistent with. Patterns Over Rules does not mean choosing one style and flagging every deviation. Raise the inconsistency once, as a Patterns finding on the module, and judge the delivery against the style of its nearest neighbours.
- The
quality-revieweragent returned without a report path. The findings phase ends at step 13 by writing the report; an agent that stops at its turn limit returns partial output instead. Resume or re-launch it on the same ticket, or run steps 1–13 in the main session, before starting step 14.
Integration with Other Skills
Upstream:
- Delivery Skill: Provides the delivery record (file list) and the delivered code to review
Downstream:
- Audit Skill: Can include quality review ratings in cross-stage assessments
- Delivery Skill (later tickets): reads this report for findings deferred to a named ticket
- Orchestrate: reads the
**Result:**line;Changes Requiredholds the ticket atchanges_required
Parallel:
- Code Review Skill: Reviews the same code for pipeline traceability — different concern, can run in parallel
- Security Review Skill: Reviews the same code for vulnerabilities — different concern, can run in parallel
Revisions
- Quality review reports capture a point-in-time assessment — they do not auto-update when code changes
- If code is modified after review (e.g., from code review or security review findings), the quality review remains valid for its original scope
- Previous quality review reports remain in
.gener8v/changes/<change-slug>/reviews/for reference - If the codebase's patterns or conventions change significantly, earlier quality reviews may be less relevant
Notes
- This skill is intentionally pipeline-independent — it evaluates engineering quality, not specification compliance
- The only pipeline artifacts it reads are the delivery record (for the file list),
pipeline-state.yaml(to find the active change) and optionally system context (for calibration and verify commands) - The findings phase runs after Delivery, in parallel with Code Review and Security Review (as the reviewer agents); resolution phases run one at a time
- Verdict vocabulary is shared by all three reviews: Approved / Approved with Notes / Changes Required
- Quality standards should match the project's maturity and purpose — do not over-engineer a prototype or under-engineer a production service
- When reviewing test code, apply the same quality lens as production code — tests are not second-class artifacts
- If no delivery record exists, this skill can still be used by pointing it directly at code files — it degrades gracefully
04 同仓库更多 Skills
ticket-breakdown
Decompose one capability area's requirements for one change into implementable tickets with Priority, Value, acceptance criteria, Prior Art, Output contracts, Known Hazards, dependency ordering and relative sizing: one TICKET-NNN.md per ticket plus backlog.md, in the change's tickets directory. Use when a specification is approved and the team needs work items, such as 'break this spec into tickets' or 'create the backlog for search'. Not for implementing a ticket (delivery) or ordering whole capability areas (dependencies).
technical-design
Translate specifications, constraints and dependencies into architecture decisions (AD-XXX), component boundaries, data model and interface contracts under .gener8v/technical-design/. Use when technology or architecture choices must be settled before tickets are written, such as 'which datastore should we use' or 'design the components for search'. Skip it when the approach is obvious and uncontested. Not for judging an architecture that has already shipped (architecture-review).
specification
Expand one capability area from .gener8v/prd.md into a functional specification with atomic, testable [PREFIX]-REQ-XXX requirements, behaviors, edge cases and open questions under .gener8v/specifications/. Use when a PRD capability area needs elaboration before constraints, technical design or tickets, or a change brief still marks an area as pending specification, such as 'spec out the search area' or 'write the requirements for billing'. Not for the whole product (planning) or work items (ticket-breakdown).
setup
Bootstrap the gener8v pipeline in a project: create .gener8v/, copy the conventions, generate pipeline-state.yaml, and add the pipeline directives to CLAUDE.md. Use when the user says 'set up gener8v' or 'initialize the pipeline', when a project has no .gener8v/prd.md, or after a plugin upgrade to refresh the conventions. Not for deciding what to do next on a project already on the pipeline (orchestrate).
security-review
OWASP-informed, code-level security review of delivered code: injection, authentication and authorization, data exposure, configuration, dependencies, cryptography and logging, with attack scenarios for Medium+ findings and compliance constraints (CC-XXX) treated as Critical. Use after a delivery, especially one touching input handling, auth, sensitive data or external integrations, such as 'security review TICKET-007' or 'check what this delivery shipped for injection or auth bypass before we merge'. Not for a whole-codebase OWASP posture assessment (owasp-top10-review) or prompt-injection risk in LLM features (owasp-llm-top10-review).
rot-watch
Detect decay in code that is being actively written: measure six signals (packaging drift, dependency direction, comment language, growth slopes, tests, the detectable subset of SOLID) against a recorded baseline and report only what moved, at .gener8v/rot/. Use once code has been delivered and again every few deliveries, before a release, or when asked 'is the codebase getting worse' or 'has this module drifted'. The first run records the baseline and reports nothing. Not for one delivery's quality (quality-review), defects (defect-sweep) or whether the architecture was right (architecture-review).