Code Quality

AuditStandards

Make sure your codebase is maintainable — because clean code scales and messy code creates debt.

Run this audit before major releases, when onboarding new team members, or when technical debt feels overwhelming.
Useful for developers and technical leads assessing codebase health.

Why This Matters

Code quality determines how fast you can move. Clean, tested code lets you add features confidently. Messy code slows everything down — bugs multiply, changes become risky, and new team members struggle to contribute. Investing in quality now pays dividends later.

What to Check

Focus on these four areas when reviewing code quality:

Coding Standards

Is the code consistent? Check that linting passes, TypeScript is used properly, and naming conventions are followed. Consistent code is easier to read and maintain.

Test Coverage

Is the code tested? Critical paths should have automated tests. Tests catch bugs before users do and give confidence when making changes.

Dependencies

Are dependencies healthy? Check for security vulnerabilities, outdated packages, and unused dependencies. Healthy dependencies reduce risk.

Technical Debt

Is debt being managed? TODOs should have linked issues, dead code should be removed, and debt should be tracked and prioritized.

Stage Expectations

What quality standards apply at each stage:

POC

Skip

Lint passes, that's enough. Speed over quality at this stage.

MVP

Light

Happy path tests exist. No critical vulnerabilities. Basic structure.

MMP

Full

Good test coverage. Tech debt documented. Dependencies audited.

PROD

Complete

High coverage on critical paths. Dependencies current. Debt managed.

Test Coverage Targets

Suggested coverage by stage:

POC

0% — tests optional

MVP

~40% — happy paths

MMP

~70% — critical paths

PROD

~80% — comprehensive

Common Issues

Linting errors ignored

Make lint failures block PR merges. Fix errors before they accumulate.

TypeScript 'any' everywhere

Gradually add proper types. Use 'unknown' instead of 'any' where possible.

No tests for critical features

Start with integration tests for user journeys. Add unit tests for utilities.

Security vulnerabilities in dependencies

Run npm audit regularly. Update or replace vulnerable packages promptly.

TODO comments never addressed

Create issues for TODOs. Add to backlog with priority. Delete stale TODOs.

Run with AI: Use /audit code to have an AI agent check your codebase for quality issues. The agent will analyze linting, TypeScript usage, test coverage, and dependency health.

Next Steps

Continue your quality review: