| description | subtask |
|---|---|
Audit codebase for quality, readability, and clean architecture |
true |
Perform a thorough quality audit of the codebase (or the files/area specified by $ARGUMENTS if provided). Evaluate each dimension below, citing specific files and lines where issues are found.
- Are names (variables, functions, types, modules) clear and intention-revealing?
- Is control flow straightforward or unnecessarily nested/convoluted?
- Are comments used only where behavior is non-obvious, and are they accurate?
- Is formatting consistent?
- Can individual components be changed without cascading modifications?
- Are there hidden coupling points, shared mutable state, or temporal dependencies?
- Is error handling explicit and consistent rather than silently swallowed?
- Are configuration values and magic numbers properly extracted?
- Do modules/packages have a single, well-defined responsibility?
- Are dependency directions clean (no circular deps, no inner layers depending on outer)?
- Are interfaces/boundaries narrow and well-defined?
- Is IO separated from pure logic where practical?
- Is there duplicated logic that should be extracted into shared abstractions?
- Conversely, is there premature abstraction that harms clarity?
- Are there dead code paths, unused exports, or vestigial features?
- Are dependencies justified, or could any be removed?
- Does the code follow established conventions and idioms of its language and ecosystem?
- Are language-native constructs used instead of hand-rolled equivalents?
- Does the project follow its ecosystem's standard project structure?
- Are types, patterns, and APIs used as the language community expects?
- Are edge cases and failure modes handled?
- Are inputs validated at system boundaries?
- Is resource cleanup handled properly (connections, file handles, etc.)?
For each dimension, provide:
- Rating: Strong / Adequate / Needs Improvement
- Findings: Specific issues with file paths and line numbers
- Recommendations: Concrete, actionable fixes ordered by impact
End with a Summary table of all dimension ratings and a prioritized list of the top improvements that would yield the greatest quality gains.