Description
Summary
Consolidates three related QA improvement issues into a single comprehensive enhancement. The core problem: QA passes without catching real issues because it relies on self-reporting rather than actual verification.
Part 1: Execution Evidence (from #143)
Problem: QA self-reports "verified working: yes" without actually running the feature. Analysis of 34 run logs shows zero /loop phases triggered - QA passes every time.
Solution: QA must execute at least one smoke command and include output as evidence.
Execution Matrix
| Change Type | QA Must Execute | Example |
|---|---|---|
| scripts/ | Run the script with safe args | npx tsx scripts/foo.ts --help |
| CLI commands | Run with --help or dry-run | npx sequant run --help |
| UI components | Note: requires /test for browser verification |
N/A |
| Types/config only | Waiver with reason | N/A |
| Tests only | Run the tests | npm test -- --grep "feature" |
Output Format
### Execution Evidence
| Test Type | Command | Exit Code | Result |
|-----------|---------|-----------|--------|
| Smoke test | `npx tsx scripts/analytics.ts --help` | 0 | Usage info displayed ✓ |
**Evidence status:** Complete / Incomplete / Waived (reason)Verdict Gating
| Verdict | Evidence Requirement |
|---|---|
| READY_FOR_MERGE | Evidence status: Complete |
| AC_MET_BUT_NOT_A_PLUS | Evidence status: Incomplete + note why |
Part 2: Test Quality Checklist (from #91)
Problem: Tests exist but don't actually validate behavior - testing implementation details, happy path only, over-mocking, snapshot abuse.
Solution: Add test quality evaluation checklist to QA.
Checklist
## Test Quality Review
### Behavior vs Implementation
- [ ] Tests assert on observable outputs, not internal state
- [ ] Refactoring internals shouldn't require test changes
### Coverage Depth
- [ ] Error paths tested (what happens when things fail?)
- [ ] Boundary conditions tested (empty, null, max values)
### Mock Hygiene
- [ ] Mocks are minimal (only external dependencies)
- [ ] Not mocking the thing being tested
### Test Reliability
- [ ] No timing-dependent assertions (use waitFor, not setTimeout)
- [ ] Tests are deterministic and independentExample Output
### Test Quality: ⚠️ Needs Attention
**Over-mocking in `auth.test.ts`:**
- 4 of 5 modules mocked, leaving little to actually test
**Missing error paths in `checkout.test.ts`:**
- No tests for payment failure scenarioPart 3: Anti-Pattern Detection (from #92)
Problem: Common issues slip through that experts would catch immediately - N+1 queries, swallowed errors, sketchy dependencies.
Solution: Add lightweight pattern-matching sanity checks.
New Dependency Audit
| Flag | Threshold |
|---|---|
| Low downloads | < 1,000/week |
| Stale | No updates in 12+ months |
| License risk | UNLICENSED, GPL in MIT project |
| Size concern | > 100kb for utility |
| Security advisory | Known vulnerabilities |
Code Pattern Checks
| Category | Pattern | Suggestion |
|---|---|---|
| Performance | N+1 query (await in loop) |
Use batch query or Promise.all |
| Performance | Unbounded loop | Add iteration limit |
| Error Handling | Empty catch block | Log or rethrow |
| Error Handling | Unhandled promise | Add .catch() |
| Security | Hardcoded secret | Use env variable |
| Security | SQL concatenation | Use parameterized query |
| Memory | Uncleared interval | Clear in cleanup |
| A11y | Image without alt | Add descriptive alt |
Acceptance Criteria
Execution Evidence
- QA detects change type (scripts/CLI/UI/types) and determines execution requirement
- QA executes at least one smoke command for scripts/CLI changes
- Output includes "Execution Evidence" section with command, exit code, result
- READY_FOR_MERGE requires evidence status "Complete" or explicit waiver
Test Quality
- QA includes test quality checklist adapted per test type
- Common anti-patterns flagged with suggested fixes
- Test quality section in QA output
Anti-Pattern Detection
- QA audits new dependencies added during exec
- Dependency flags: low downloads, stale, license issues, size, vulnerabilities
- Code sanity checks for common anti-patterns
- Each flag includes location and fix suggestion
Files to Modify
.claude/skills/qa/SKILL.md- Add all three enhancement areas.claude/skills/qa/references/quality-gates.md- Add evidence requirements.claude/skills/qa/references/testing-requirements.md- Add test quality guidance
Supersedes
- feat: Test quality checklist in /qa #91 - Test quality checklist in /qa
- feat: Lightweight sanity checks for common anti-patterns in /qa #92 - Lightweight sanity checks for common anti-patterns in /qa
- feat: Evidence-based QA - require execution proof for READY_FOR_MERGE #143 - Evidence-based QA - require execution proof for READY_FOR_MERGE
Activity
admarble commentedon Jan 21, 2026
Plan: Comprehensive QA Improvements
Acceptance Criteria Checklist
Part 1: Execution Evidence
Part 2: Test Quality
Part 3: Anti-Pattern Detection
Implementation Plan
SKILL.md,quality-gates.mdSKILL.md, newtest-quality-checklist.mdSKILL.md, newanti-pattern-detection.mdSKILL.mdFiles to Modify
.claude/skills/qa/SKILL.md- Main skill file (all three enhancements).claude/skills/qa/references/quality-gates.md- Evidence requirements for verdicts.claude/skills/qa/references/testing-requirements.md- Test quality guidanceFiles to Create
.claude/skills/qa/references/test-quality-checklist.md- Test quality evaluation.claude/skills/qa/references/anti-pattern-detection.md- Anti-pattern detectionSupersedes
This issue consolidates:
Plan generated by
/specfeat(#147): add comprehensive QA improvements
feat(#147): add comprehensive QA improvements (#148)
docs: add QA improvements to CHANGELOG and README