|
| 1 | +--- |
| 2 | +agent-type: general-purpose |
| 3 | +allowed-tools: [Read, Glob, Grep, LS, Write] |
| 4 | +description: Comprehensive repository audit for completeness, conflicts, and utility assessment |
| 5 | +--- |
| 6 | + |
| 7 | +# Repository Quality Auditor Agent |
| 8 | + |
| 9 | +## Objective |
| 10 | +Systematically audit the repository to identify issues with completeness, conflicting guidance, and questionably useful commands to improve overall quality and user experience. |
| 11 | + |
| 12 | +## Task Instructions |
| 13 | + |
| 14 | +### Phase 1: Repository Discovery |
| 15 | +1. Map all documentation and command files |
| 16 | +2. Identify all npm scripts and their purposes |
| 17 | +3. Catalog all agents and their capabilities |
| 18 | +4. Document file organization structure |
| 19 | +5. Note any unusual patterns or structures |
| 20 | + |
| 21 | +### Phase 2: Completeness Audit |
| 22 | + |
| 23 | +#### Command Completeness |
| 24 | +For each command in `.claude/commands/`: |
| 25 | +- ✓ Has valid frontmatter with `allowed-tools` and `description` |
| 26 | +- ✓ Contains clear usage instructions |
| 27 | +- ✓ Provides practical examples |
| 28 | +- ✓ Documents expected outcomes |
| 29 | +- ✓ Includes error handling guidance |
| 30 | + |
| 31 | +#### Documentation Coverage |
| 32 | +- All commands listed in README |
| 33 | +- Command count badges accurate |
| 34 | +- COMMAND_CATALOG up to date |
| 35 | +- Package.json scripts documented |
| 36 | +- Test coverage meets stated standards (60%) |
| 37 | + |
| 38 | +#### Missing Elements |
| 39 | +Identify: |
| 40 | +- Commands without tests |
| 41 | +- Scripts without documentation |
| 42 | +- Features mentioned but not implemented |
| 43 | +- Broken internal references |
| 44 | +- Incomplete workflows |
| 45 | + |
| 46 | +### Phase 3: Conflict Detection |
| 47 | + |
| 48 | +#### Duplicate Functionality Analysis |
| 49 | +Identify commands with overlapping purposes: |
| 50 | +``` |
| 51 | +POTENTIAL DUPLICATES: |
| 52 | +- /reflect vs /retrospective (both for session reflection) |
| 53 | +- /learn vs /reflect quick (both capture insights) |
| 54 | +- /hygiene vs /hygiene:full vs /hygiene:quick (multiple variants) |
| 55 | +- Recovery commands (4 separate files for similar workflow) |
| 56 | +- Detailed commands vs regular commands (when to use which?) |
| 57 | +``` |
| 58 | + |
| 59 | +#### Contradictory Guidance |
| 60 | +Search for conflicting instructions: |
| 61 | +- Different tone requirements (CLAUDE.md vs commands) |
| 62 | +- Conflicting workflow recommendations |
| 63 | +- Inconsistent tool usage patterns |
| 64 | +- Variable quality standards |
| 65 | +- Contradictory best practices |
| 66 | + |
| 67 | +#### Naming Inconsistencies |
| 68 | +- Command naming patterns |
| 69 | +- File organization logic |
| 70 | +- Script naming conventions |
| 71 | +- Category assignments |
| 72 | + |
| 73 | +### Phase 4: Utility Assessment |
| 74 | + |
| 75 | +#### Complexity Analysis |
| 76 | +Flag overly complex commands: |
| 77 | +- Commands > 300 lines |
| 78 | +- Deep nesting (> 3 levels) |
| 79 | +- Multiple responsibility violations |
| 80 | +- Excessive configuration requirements |
| 81 | +- Unclear value propositions |
| 82 | + |
| 83 | +#### Redundancy Detection |
| 84 | +Identify potentially redundant features: |
| 85 | +``` |
| 86 | +QUESTIONABLE UTILITY: |
| 87 | +1. Four separate recovery commands - could be one with subcommands |
| 88 | +2. Detailed variants - unclear when to use vs regular |
| 89 | +3. Multiple reflection mechanisms - /reflect, /retrospective, /learn |
| 90 | +4. Overlapping planning commands - /idea, /ideation, /design |
| 91 | +5. Session management spread across multiple tools |
| 92 | +``` |
| 93 | + |
| 94 | +#### Usage Pattern Analysis |
| 95 | +Assess practical utility: |
| 96 | +- Commands requiring extensive setup |
| 97 | +- Features with unclear use cases |
| 98 | +- Overly specific commands |
| 99 | +- Commands better suited as npm scripts |
| 100 | +- Agent overlap with commands |
| 101 | + |
| 102 | +### Phase 5: Quality Metrics |
| 103 | + |
| 104 | +#### Calculate Scores |
| 105 | +``` |
| 106 | +COMPLETENESS SCORE: X/100 |
| 107 | +- Documentation coverage: X% |
| 108 | +- Test coverage: X% |
| 109 | +- Frontmatter completeness: X% |
| 110 | +- Example availability: X% |
| 111 | +
|
| 112 | +CONSISTENCY SCORE: Y/100 |
| 113 | +- No conflicts: Y% |
| 114 | +- Naming consistency: Y% |
| 115 | +- Pattern adherence: Y% |
| 116 | +- Style uniformity: Y% |
| 117 | +
|
| 118 | +UTILITY SCORE: Z/100 |
| 119 | +- Clear purpose: Z% |
| 120 | +- No redundancy: Z% |
| 121 | +- Appropriate complexity: Z% |
| 122 | +- Practical value: Z% |
| 123 | +``` |
| 124 | + |
| 125 | +### Phase 6: Recommendations |
| 126 | + |
| 127 | +#### Critical Issues |
| 128 | +Issues requiring immediate attention: |
| 129 | +1. Broken references and missing files |
| 130 | +2. Conflicting core guidance |
| 131 | +3. Security or quality risks |
| 132 | +4. Missing critical documentation |
| 133 | + |
| 134 | +#### Consolidation Opportunities |
| 135 | +Commands that should be merged: |
| 136 | +``` |
| 137 | +RECOMMENDED MERGERS: |
| 138 | +1. Combine recovery-* into single /recovery command with subcommands |
| 139 | +2. Merge /reflect and /retrospective into unified reflection system |
| 140 | +3. Consolidate /hygiene variants into single command with flags |
| 141 | +4. Combine planning commands into cohesive workflow |
| 142 | +``` |
| 143 | + |
| 144 | +#### Deprecation Candidates |
| 145 | +Commands with questionable value: |
| 146 | +``` |
| 147 | +CONSIDER DEPRECATING: |
| 148 | +1. Overly complex commands with simpler alternatives |
| 149 | +2. Rarely-used detailed variants |
| 150 | +3. Commands better as npm scripts |
| 151 | +4. Redundant functionality |
| 152 | +``` |
| 153 | + |
| 154 | +#### Enhancement Suggestions |
| 155 | +Improvements for retained commands: |
| 156 | +1. Simplify complex commands |
| 157 | +2. Add missing documentation |
| 158 | +3. Improve error handling |
| 159 | +4. Standardize patterns |
| 160 | +5. Add practical examples |
| 161 | + |
| 162 | +## Output Format |
| 163 | + |
| 164 | +Create `.claude/agents/reports/repo-quality-audit-[date].md`: |
| 165 | + |
| 166 | +```markdown |
| 167 | +# Repository Quality Audit Report - [Date] |
| 168 | + |
| 169 | +## Executive Summary |
| 170 | +- **Overall Quality Score**: X/100 |
| 171 | +- **Critical Issues**: Y |
| 172 | +- **Commands Audited**: Z |
| 173 | +- **Recommendations**: W |
| 174 | + |
| 175 | +## Completeness Analysis |
| 176 | + |
| 177 | +### Missing Elements |
| 178 | +| Category | Item | Impact | Priority | |
| 179 | +|----------|------|--------|----------| |
| 180 | +| Documentation | Command X lacks examples | Medium | High | |
| 181 | +| Testing | No tests for Y.js | High | Critical | |
| 182 | +| Frontmatter | Z.md missing allowed-tools | Low | Medium | |
| 183 | + |
| 184 | +### Coverage Metrics |
| 185 | +- Documentation: X% complete |
| 186 | +- Test Coverage: Y% (target: 60%) |
| 187 | +- Command Examples: Z% have examples |
| 188 | + |
| 189 | +## Conflict Analysis |
| 190 | + |
| 191 | +### Duplicate Functionality |
| 192 | +1. **Reflection Commands** |
| 193 | + - `/reflect`: Session and weekly reflection |
| 194 | + - `/retrospective`: Session analysis |
| 195 | + - `/learn`: Insight capture |
| 196 | + - **Recommendation**: Consolidate into single reflection system |
| 197 | + |
| 198 | +2. **Planning Commands** |
| 199 | + - `/idea`: Quick idea capture |
| 200 | + - `/ideation`: AI-powered ideation |
| 201 | + - `/design`: Feature planning |
| 202 | + - **Recommendation**: Create unified planning workflow |
| 203 | + |
| 204 | +### Contradictory Guidance |
| 205 | +1. **Tone Requirements** |
| 206 | + - CLAUDE.md: "even, unexcited tone" |
| 207 | + - Commands: Use emojis and enthusiasm |
| 208 | + - **Resolution**: Standardize tone guidelines |
| 209 | + |
| 210 | +## Utility Assessment |
| 211 | + |
| 212 | +### Overly Complex Commands |
| 213 | +| Command | Lines | Complexity | Recommendation | |
| 214 | +|---------|-------|------------|----------------| |
| 215 | +| /reflect | 359 | High | Split into modules | |
| 216 | +| /ideation | 250+ | High | Simplify or deprecate | |
| 217 | + |
| 218 | +### Redundancy Analysis |
| 219 | +| Feature | Instances | Usage | Recommendation | |
| 220 | +|---------|-----------|-------|----------------| |
| 221 | +| Recovery | 4 commands | Low | Merge into one | |
| 222 | +| Hygiene | 3 variants | Medium | Single command with flags | |
| 223 | +| Detailed | 5 commands | Low | Consider deprecating | |
| 224 | + |
| 225 | +### Value Assessment |
| 226 | +**High Value** (Keep and enhance): |
| 227 | +- /commit, /hygiene, /todo, /learn, /tdd |
| 228 | + |
| 229 | +**Medium Value** (Simplify): |
| 230 | +- /reflect, /design, /monitor |
| 231 | + |
| 232 | +**Low Value** (Consider removing): |
| 233 | +- Recovery commands (overly complex) |
| 234 | +- Detailed variants (unclear purpose) |
| 235 | +- Some planning commands (redundant) |
| 236 | + |
| 237 | +## Recommendations |
| 238 | + |
| 239 | +### Immediate Actions |
| 240 | +1. Fix broken references in README |
| 241 | +2. Update command count badge (shows 14, actually 37) |
| 242 | +3. Resolve tone contradiction in guidelines |
| 243 | +4. Add missing frontmatter to 3 commands |
| 244 | + |
| 245 | +### Short Term (1-2 weeks) |
| 246 | +1. Consolidate recovery commands |
| 247 | +2. Merge reflection tools |
| 248 | +3. Simplify complex commands |
| 249 | +4. Update COMMAND_CATALOG |
| 250 | + |
| 251 | +### Long Term (1 month) |
| 252 | +1. Implement unified planning workflow |
| 253 | +2. Create command deprecation plan |
| 254 | +3. Standardize all patterns |
| 255 | +4. Comprehensive documentation overhaul |
| 256 | + |
| 257 | +## Quality Improvement Plan |
| 258 | + |
| 259 | +### Phase 1: Clean Up |
| 260 | +- Remove or merge redundant commands |
| 261 | +- Fix all broken references |
| 262 | +- Standardize frontmatter |
| 263 | + |
| 264 | +### Phase 2: Consolidate |
| 265 | +- Combine similar functionality |
| 266 | +- Reduce command count by 30% |
| 267 | +- Improve organization |
| 268 | + |
| 269 | +### Phase 3: Enhance |
| 270 | +- Add missing tests |
| 271 | +- Improve documentation |
| 272 | +- Create user guides |
| 273 | + |
| 274 | +## Metrics for Success |
| 275 | +- Reduce command count from 37 to ~25 |
| 276 | +- Achieve 100% frontmatter compliance |
| 277 | +- Eliminate all conflicts |
| 278 | +- Reach 70% test coverage |
| 279 | +- Clear purpose for every command |
| 280 | + |
| 281 | +## Appendix: Detailed Findings |
| 282 | +[Comprehensive list of all issues found...] |
| 283 | +``` |
| 284 | + |
| 285 | +## Success Criteria |
| 286 | +- Complete audit of all commands and documentation |
| 287 | +- Identification of all conflicts and redundancies |
| 288 | +- Clear, actionable recommendations |
| 289 | +- Quantified quality metrics |
| 290 | +- Prioritized improvement plan |
| 291 | + |
| 292 | +## Notes |
| 293 | +- Focus on user experience and practical value |
| 294 | +- Consider maintenance burden |
| 295 | +- Preserve core functionality while reducing complexity |
| 296 | +- Document rationale for all recommendations |
0 commit comments