cc-quality-practices
Improving quality reduces development cost. No single defect-detection technique exceeds ~75% effectiveness, so combine techniques — combining nearly doubles detection rates. Mature suites run about 5 dirty tests (error paths, bad data, edge cases) for every 1 clean test (happy path).
For active bug diagnosis (an actual failing test or repro to chase down), hand off: Skill(code-foundations:cc-debugging). This skill is for QA planning and process design.
Shared CC vocabulary and thresholds (cohesion spectrum, coupling, key metrics): Read(${CLAUDE_PLUGIN_ROOT}/references/cc-foundations.md).
External vs internal quality
- External (users care): correctness, usability, efficiency, reliability, integrity, robustness.
- Internal (developers care): maintainability, flexibility, portability, reusability, readability, testability.
Internal quality enables external quality: poor maintainability blocks fixing defects, which degrades reliability.
Defect-detection techniques (detection rate)
| Technique |
Rate |
Notes |
| Formal inspection |
45–70% |
Roles, checklists, preparation. Preparation finds ~90% of the defects; the meeting adds ~10% [Votta 1991]. |
| Pair programming |
40–60% |
Real-time review during development. |
| Walk-through |
20–40% |
Author-led, less structured. |
| Code reading |
20–35% |
Individual review emphasizing preparation. |
| Unit testing |
15–50% |
Developer tests of individual components. |
Modes
CHECKER
Execute the quality, review, and testing checklists against the code or process. Checklists:
Read(${CLAUDE_SKILL_DIR}/checklists/qa-and-testing.md) — QA plan, inspections, test cases, data-flow.
Read(${CLAUDE_SKILL_DIR}/checklists/debugging.md) — finding, fixing, brute-force, general approach.
Output one row per item: | Item | Status | Evidence | Location |, status ∈ VIOLATION (fails item) / WARNING (partial) / PASS.
APPLIER
Produce test cases, review procedures, and quality plans.
Test-case generation (output: test-case list):
- Identify requirements → one test per requirement.
- Compute minimum tests:
1 + count(if/while/for/and/or) + case branches (add 1 if no default case).
- Add data-flow tests covering all defined-used paths.
- Add boundary tests: below, at, above each boundary.
- Add dirty tests at ~5:1 — bad data, wrong size/kind, uninitialized.
- Add nominal tests: middle-of-road expected values.
- Run with a coverage monitor — compare actual vs believed coverage.
Choosing a review method
| Need |
Method |
| Highest defect detection (45–70%) |
Formal inspection (default) |
| Team geographically dispersed |
Code reading (individual prep, async-friendly) |
| Schedule pressure + quality |
Pair programming |
| Diverse viewpoints, larger group |
Walk-through |
When advising a human team's review process
Inspection roles and meeting mechanics apply when designing a review process for a human team (not for solo or agent work):
- PLANNING — moderator distributes materials with line numbers + checklist.
- PREPARATION — each reviewer works alone using the checklist (where ~90% of defects are found).
- MEETING — reader paraphrases the code; scribe records defects.
- REPORT — moderator lists each defect with type and severity.
- REWORK — author fixes defects.
- FOLLOW-UP — moderator verifies all fixes complete.
Chain
| After |
Next |
| Defect to fix found |
Skill(code-foundations:cc-refactoring-guidance) |
| Design issues found |
Skill(code-foundations:cc-routine-and-class-design) |
| Active bug to diagnose |
Skill(code-foundations:cc-debugging) |
1---2name: cc-quality-practices3description: Applies Code Complete's QA process design: selects defect-detection techniques by phase, sizes the test suite, and designs review and inspection processes. For QA planning and process design, not active bug investigation (use cc-debugging).4---56# cc-quality-practices78Improving quality reduces development cost. No single defect-detection technique exceeds ~75% effectiveness, so combine techniques — combining nearly doubles detection rates. Mature suites run about 5 dirty tests (error paths, bad data, edge cases) for every 1 clean test (happy path).910For active bug diagnosis (an actual failing test or repro to chase down), hand off: `Skill(code-foundations:cc-debugging)`. This skill is for QA planning and process design.1112Shared CC vocabulary and thresholds (cohesion spectrum, coupling, key metrics): `Read(${CLAUDE_PLUGIN_ROOT}/references/cc-foundations.md)`.1314## External vs internal quality1516- **External** (users care): correctness, usability, efficiency, reliability, integrity, robustness.17- **Internal** (developers care): maintainability, flexibility, portability, reusability, readability, testability.1819Internal quality enables external quality: poor maintainability blocks fixing defects, which degrades reliability.2021## Defect-detection techniques (detection rate)2223| Technique | Rate | Notes |24|---|---|---|25| Formal inspection | 45–70% | Roles, checklists, preparation. Preparation finds ~90% of the defects; the meeting adds ~10% [Votta 1991]. |26| Pair programming | 40–60% | Real-time review during development. |27| Walk-through | 20–40% | Author-led, less structured. |28| Code reading | 20–35% | Individual review emphasizing preparation. |29| Unit testing | 15–50% | Developer tests of individual components. |3031## Modes3233### CHECKER3435Execute the quality, review, and testing checklists against the code or process. Checklists:3637- `Read(${CLAUDE_SKILL_DIR}/checklists/qa-and-testing.md)` — QA plan, inspections, test cases, data-flow.38- `Read(${CLAUDE_SKILL_DIR}/checklists/debugging.md)` — finding, fixing, brute-force, general approach.3940Output one row per item: `| Item | Status | Evidence | Location |`, status ∈ VIOLATION (fails item) / WARNING (partial) / PASS.4142### APPLIER4344Produce test cases, review procedures, and quality plans.4546**Test-case generation** (output: test-case list):471. Identify requirements → one test per requirement.482. Compute minimum tests: `1 + count(if/while/for/and/or) + case branches` (add 1 if no default case).493. Add data-flow tests covering all defined-used paths.504. Add boundary tests: below, at, above each boundary.515. Add dirty tests at ~5:1 — bad data, wrong size/kind, uninitialized.526. Add nominal tests: middle-of-road expected values.537. Run with a coverage monitor — compare actual vs believed coverage.5455## Choosing a review method5657| Need | Method |58|---|---|59| Highest defect detection (45–70%) | Formal inspection (default) |60| Team geographically dispersed | Code reading (individual prep, async-friendly) |61| Schedule pressure + quality | Pair programming |62| Diverse viewpoints, larger group | Walk-through |6364## When advising a human team's review process6566Inspection roles and meeting mechanics apply when designing a review process for a human team (not for solo or agent work):67681. PLANNING — moderator distributes materials with line numbers + checklist.692. PREPARATION — each reviewer works alone using the checklist (where ~90% of defects are found).703. MEETING — reader paraphrases the code; scribe records defects.714. REPORT — moderator lists each defect with type and severity.725. REWORK — author fixes defects.736. FOLLOW-UP — moderator verifies all fixes complete.7475## Chain7677| After | Next |78|---|---|79| Defect to fix found | `Skill(code-foundations:cc-refactoring-guidance)` |80| Design issues found | `Skill(code-foundations:cc-routine-and-class-design)` |81| Active bug to diagnose | `Skill(code-foundations:cc-debugging)` |