| name | full-project-audit |
| description | Thoroughly analyze an unfamiliar or returning-to codebase: read project config, scan all source directories, identify issues, then fix them one by one. |
Full Project Audit
A systematic workflow for getting complete context on a codebase and fixing all identified issues sequentially. Used when the user says "analyze entire project", "analyze all code", "fix all issues", or similar broad directives.
When to use
- User says "analyze entire project" or "analyze all code"
- Returning to a project after a long gap
- First session on a new or unfamiliar codebase
- User says "fix all issues" or "fix everything"
Workflow
Phase 1: Read project context (ordered)
Read these files first — they contain the roadmap, conventions, and constraints:
AGENTS.md — project overview, conventions, architecture decisions
package.json — dependencies, scripts, project metadata
tsconfig.json (or equivalent config) — language/build configuration
next.config.ts / next.config.mjs — framework-specific config (if Next.js)
.env.local.example or .env.example — required environment variables
sql/schema.sql (if database project) — database schema
Phase 2: Scan source structure
Use glob to discover the full file tree, then read key entry points:
src/app/ or app/ — all pages, layouts, API routes (App Router pattern)
src/components/ or components/ — all UI components
src/lib/ or lib/ — all utility/service files
src/middleware.ts or middleware.ts — request middleware
- Any
*.test.* files — existing test coverage
Read each directory listing first, then read files in order of importance:
- Routes/API handlers → Components → Library/utility files → Config files
Phase 3: Identify issues
As you read, categorize findings:
- Security: exposed secrets, missing auth, unsafe patterns
- Dead code: unused imports, unreferenced files, dead functions
- Errors: missing error handling, unhandled edge cases, type errors
- Missing pieces: missing error boundaries, loading states, env vars
- Code quality: duplicated logic, inconsistent patterns
- Bugs: broken functionality, incorrect data flow
Phase 4: Fix one by one
Critical rule: complete each fix before starting the next.
For each fix:
- State what you're fixing and why
- Make the change
- Verify the change works (run relevant checks)
- Move to the next fix
Order fixes by priority: security → bugs → missing pieces → dead code → code quality.
Phase 5: Verification
After all fixes, run the project's verification chain:
npx tsc --noEmit — type check (if TypeScript)
npm run lint — lint check
npm run build — production build
npm run test — unit tests (if test suite exists)
Fix any issues found, then re-run until clean.
Output
Provide a structured summary:
- Project overview: what it does, tech stack, architecture
- Issues found: categorized list
- Fixes applied: what was changed and why
- Remaining items: anything that needs user input or is deferred