|
| 1 | +--- |
| 2 | +name: quality-audit-workflow |
| 3 | +description: Comprehensive codebase quality audit with parallel agent orchestration, GitHub issue creation, automated PR generation per issue, and PM-prioritized recommendations. Use for code review, refactoring audits, technical debt analysis, module quality assessment, or codebase health checks. |
| 4 | +source_urls: |
| 5 | + - https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices |
| 6 | +--- |
| 7 | + |
| 8 | +# Quality Audit Workflow |
| 9 | + |
| 10 | +## Purpose |
| 11 | + |
| 12 | +Orchestrates a systematic, parallel quality audit of any codebase with automated remediation through PR generation and PM-prioritized recommendations. |
| 13 | + |
| 14 | +## When I Activate |
| 15 | + |
| 16 | +I automatically load when you mention: |
| 17 | + |
| 18 | +- "quality audit" or "code audit" |
| 19 | +- "codebase review" or "full code review" |
| 20 | +- "refactoring opportunities" or "technical debt audit" |
| 21 | +- "module quality check" or "architecture review" |
| 22 | +- "parallel analysis" with multiple agents |
| 23 | + |
| 24 | +## What I Do |
| 25 | + |
| 26 | +Execute a 6-phase workflow that: |
| 27 | + |
| 28 | +1. **Familiarizes** with the project (investigation phase) |
| 29 | +2. **Audits** using parallel agents across codebase divisions |
| 30 | +3. **Creates** GitHub issues for each discovered problem |
| 31 | +4. **Generates** PRs in parallel worktrees per issue |
| 32 | +5. **Reviews** PRs with PM architect for prioritization |
| 33 | +6. **Reports** consolidated recommendations in master issue |
| 34 | + |
| 35 | +## Quick Start |
| 36 | + |
| 37 | +``` |
| 38 | +User: "Run a quality audit on this codebase" |
| 39 | +Skill: *activates automatically* |
| 40 | + "Beginning quality audit workflow..." |
| 41 | +``` |
| 42 | + |
| 43 | +## The 6 Phases |
| 44 | + |
| 45 | +### Phase 1: Project Familiarization |
| 46 | + |
| 47 | +- Run investigation workflow on project structure |
| 48 | +- Map modules, dependencies, and entry points |
| 49 | +- Understand existing patterns and architecture |
| 50 | + |
| 51 | +### Phase 2: Parallel Quality Audit |
| 52 | + |
| 53 | +- Divide codebase into logical sections |
| 54 | +- Deploy multiple agent types per section (analyzer, reviewer, security, optimizer) |
| 55 | +- Apply PHILOSOPHY.md standards ruthlessly |
| 56 | +- Check module size, complexity, single responsibility |
| 57 | + |
| 58 | +### Phase 3: Issue Assembly |
| 59 | + |
| 60 | +- Create GitHub issue for each finding |
| 61 | +- Include severity, location, recommendation |
| 62 | +- Tag with appropriate labels |
| 63 | + |
| 64 | +### Phase 4: Parallel PR Generation |
| 65 | + |
| 66 | +- Create worktree per issue (`worktrees/fix-issue-XXX`) |
| 67 | +- Run DEFAULT_WORKFLOW.md in each worktree |
| 68 | +- Generate fix PR for each issue |
| 69 | + |
| 70 | +### Phase 5: PM Review |
| 71 | + |
| 72 | +- Invoke pm-architect skill |
| 73 | +- Group PRs by category and priority |
| 74 | +- Identify dependencies between fixes |
| 75 | + |
| 76 | +### Phase 6: Master Report |
| 77 | + |
| 78 | +- Create master GitHub issue |
| 79 | +- Link all related issues and PRs |
| 80 | +- Prioritized action plan with recommendations |
| 81 | + |
| 82 | +## Philosophy Enforcement |
| 83 | + |
| 84 | +This workflow ruthlessly applies: |
| 85 | + |
| 86 | +- **Ruthless Simplicity**: Flag over-engineered modules |
| 87 | +- **Module Size Limits**: Target <300 LOC per module |
| 88 | +- **Single Responsibility**: One purpose per brick |
| 89 | +- **Zero-BS**: No stubs, no TODOs, no dead code |
| 90 | + |
| 91 | +## Navigation Guide |
| 92 | + |
| 93 | +### When to Read Supporting Files |
| 94 | + |
| 95 | +**reference.md** - Read when you need: |
| 96 | + |
| 97 | +- Detailed phase execution steps |
| 98 | +- Agent-to-phase mappings |
| 99 | +- Codebase division strategies |
| 100 | +- Issue template formats |
| 101 | + |
| 102 | +**examples.md** - Read when you need: |
| 103 | + |
| 104 | +- Working audit examples |
| 105 | +- Sample issue/PR formats |
| 106 | +- Real-world usage patterns |
| 107 | +- Output format examples |
| 108 | + |
| 109 | +## Configuration |
| 110 | + |
| 111 | +Override defaults via environment or prompt: |
| 112 | + |
| 113 | +- `AUDIT_PARALLEL_LIMIT`: Max concurrent worktrees (default: 8) |
| 114 | +- `AUDIT_SEVERITY_THRESHOLD`: Minimum severity to create issue (default: medium) |
| 115 | +- `AUDIT_MODULE_LOC_LIMIT`: Flag modules exceeding this LOC (default: 300) |
0 commit comments