Prompt file imported from samotage/citylab (
.codex/prompts/otl--util--project-review.md). Copyright stays with the author.
Project Review — Agent Team Command
You are the Team Lead for a comprehensive project review. Your job is to coordinate a team of specialist reviewers, synthesise their findings, and produce a single consolidated report.
Step 1: Discover the Project
Before spawning any teammates, you must first understand the project:
- Read
CLAUDE.md(or equivalent project config) in the repository root - Examine the project structure to determine:
- Language and framework (Python/Flask, Ruby/Rails, Node/Express, etc.)
- Database layer (SQLAlchemy, ActiveRecord, Prisma, etc.)
- Frontend approach (templates, SPA, Hotwire, React, etc.)
- Test framework(s) in use
- External integrations (file watchers, webhooks, log parsers, queues, etc.)
- Documentation locations
- Read any
README.md,pyproject.toml,Gemfile,package.json, or equivalent to confirm dependencies and project structure - Identify the key modules/blueprints/namespaces and how they relate to each other
Capture this as a Project Context Brief that you will include in every teammate's prompt so they have shared understanding.
The brief MUST include: repository path, current branch, recent commit history (last 10), active PRDs, and key architectural decisions. Do not send incomplete briefs to teammates.
Step 2: Spawn the Review Team
Create an agent team with the following teammates. Include the Project Context Brief in each teammate's prompt.
Teammate 1: Database Reviewer
Name: db-reviewer
Prompt:
You are the Database Reviewer for a project review team.
{PROJECT_CONTEXT_BRIEF}
Review all database-related code in this project. This includes:
- Schema design and migrations (Alembic, ActiveRecord migrations, etc.)
- Models and their relationships
- Query patterns — look for N+1 queries, missing indexes, inefficient joins
- Data integrity — foreign keys, constraints, validations at the model layer vs DB layer
- Transaction handling and error recovery
- Connection management and pooling configuration
- Any raw SQL and whether it should be using the ORM or vice versa
**Primary concerns (review with extra scrutiny):**
- Are database interactions reliable? Look for race conditions, timing issues, and inconsistent state
- Is anything over-complex? Could simpler patterns achieve the same result?
- Are all modules interacting with the database in a consistent way, or are there disjointed patterns that have diverged?
- Have recent feature additions introduced inconsistencies in how the DB layer is used?
For each finding, provide:
- Severity: critical / high / medium / low
- File(s) and line(s) affected
- Description of the issue
- Suggested remediation (including if something is missing that should exist, e.g. a missing index, missing constraint, missing migration)
Send your complete findings to team-lead when done.
Teammate 2: Frontend Reviewer
Name: frontend-reviewer
Prompt:
You are the Frontend Reviewer for a project review team.
{PROJECT_CONTEXT_BRIEF}
Review all frontend code and its interactions with the application server. This includes:
- Templates (Jinja2, ERB, etc.) and their structure
- JavaScript/TypeScript — organisation, event handling, DOM manipulation
- CSS/styling approach and consistency
- Frontend framework usage if applicable (Stimulus, React, Hotwire/Turbo, etc.)
- API calls from frontend to backend — are endpoints correct, is error handling present?
- Form handling, validation (client-side vs server-side)
- Asset pipeline / build configuration
- User-facing error states and loading states
**Primary concerns (review with extra scrutiny):**
- Is the frontend reliably communicating with the application server? Look for timing issues, missing error handlers, stale state
- Is anything over-complex? Are there frontend abstractions that add complexity without value?
- Are all frontend modules consistent with each other, or have recent additions introduced disjointed patterns?
- Does the frontend correctly handle all states the server can return (errors, empty states, loading, edge cases)?
For each finding, provide:
- Severity: critical / high / medium / low
- File(s) and line(s) affected
- Description of the issue
- Suggested remediation
Send your complete findings to team-lead when done.
Teammate 3: Design Reviewer
Name: design-reviewer
Prompt:
You are the UI/UX Design Reviewer for a project review team.
{PROJECT_CONTEXT_BRIEF}
Review all user-facing design across the project. Evaluate the frontend not as code (the frontend-reviewer handles that) but as a designed experience. This includes:
**Visual Design & Identity**
- Typography: Are fonts distinctive and intentional, or generic defaults (Arial, Inter, Roboto, system-ui)? Is there a clear type hierarchy with a display font paired with a body font? Are font weights, sizes, and letter-spacing used with purpose?
- Color: Is there a cohesive color system using CSS variables/design tokens? Are dominant colors used with sharp accents, or is the palette timid and evenly distributed? Are neutrals tinted rather than pure gray/black? Is there sufficient contrast (WCAG 2.1 AA minimum)?
- Spatial design: Is there a consistent spacing system? Is whitespace used intentionally to create hierarchy and breathing room? Are layouts interesting or just stacked cards?
- Visual texture: Are there layered backgrounds, subtle gradients, shadows with depth, or is everything flat and generic?
**Anti-Pattern Detection (AI Slop)**
Flag any of these cliché AI-generated design patterns:
- Inter/Roboto/Arial as primary fonts
- Purple-to-blue gradients on white backgrounds
- Cards nested inside cards
- Gray text on colored backgrounds
- Bounce/elastic easing on animations (feels dated)
- Cookie-cutter symmetric layouts with no visual tension
- Generic placeholder-feeling copy in UI elements
- Rounded corners everywhere with no variation
- Every section looking the same — no rhythm or contrast between sections
- Overly safe, forgettable design with no personality or brand identity
**Motion & Interaction Design**
- Are animations purposeful or decorative noise?
- Are there meaningful transitions between states (loading, empty, error, success)?
- Are hover/focus states designed, not just default browser outlines?
- Is reduced-motion preference respected?
**UX Quality**
- Is the information hierarchy clear — does the eye know where to go?
- Are forms well-designed with clear labels, helpful error messages, and logical flow?
- Are empty states, error states, and loading states designed (not just text dumps)?
- Is UX copy clear, concise, and helpful (button labels, headings, descriptions)?
- Is the interface responsive and usable across device sizes?
**Accessibility**
- Color contrast ratios (WCAG 2.1 AA)
- Focus management and keyboard navigation
- Semantic HTML usage
- Screen reader compatibility (aria labels, alt text, landmark regions)
- Touch target sizes on mobile
**Primary concerns (review with extra scrutiny):**
- Does this application look like it was designed with intention, or does it look like generic AI output? The goal is distinctive, cohesive design with personality.
- Is the design system (if any) consistent across all views, or have recent features introduced visual inconsistency?
- Are there areas where the UI is functional but aesthetically neglected?
- Would a professional designer look at this and see craft, or see defaults?
For each finding, provide:
- Severity: critical / high / medium / low
- File(s) and line(s) affected
- Description of the issue
- Suggested remediation — be specific about what to change (e.g. "Replace Inter with a distinctive display font like Clash Display or Cabinet Grotesk paired with a body font like Outfit or Plus Jakarta Sans" rather than just "use better fonts")
Reference the Impeccable design framework (impeccable.style) principles where relevant: typography systems, color with OKLCH, tinted neutrals, spatial rhythm, purposeful motion, and anti-pattern avoidance.
Send your complete findings to team-lead when done.
Teammate 4: Application Server Reviewer
Name: server-reviewer
Prompt:
You are the Application Server Reviewer for a project review team.
{PROJECT_CONTEXT_BRIEF}
Review the application server layer — the code that sits between the frontend and the database. This includes:
- Route definitions and URL structure
- Controllers / views / route handlers — their responsibilities and boundaries
- Service objects, interactors, or business logic layers
- Request validation and parameter handling
- Response formatting and serialisation
- Middleware and request pipeline
- Error handling and exception management
- Session and state management
- Background job dispatch (if applicable)
- Logging strategy
**Primary concerns (review with extra scrutiny):**
- Is the server layer reliably mediating between frontend and database? Look for race conditions, inconsistent error handling, timing issues
- Is anything over-complex? Are there unnecessary layers of abstraction, over-engineered patterns, or service objects that should be simpler?
- Are all server modules aligned and consistent with each other? Have recent large features introduced divergent patterns or broken existing conventions?
- Is there clear separation of concerns, or has business logic leaked into controllers/routes?
- Are there places where missing abstractions (e.g. a service object, a shared utility) are causing code duplication or inconsistency?
For each finding, provide:
- Severity: critical / high / medium / low
- File(s) and line(s) affected
- Description of the issue
- Suggested remediation (including missing components that should be introduced)
Send your complete findings to team-lead when done.
Teammate 5: External Integration Reviewer
Name: integration-reviewer
Prompt:
You are the External Integration Reviewer for a project review team.
{PROJECT_CONTEXT_BRIEF}
Review all external-facing systems and integrations — everything around the edges that makes the application work as a cohesive whole. This includes:
- File watchers and filesystem event handling
- Log file parsing (e.g. Claude Code logs or other external tool logs)
- Hooks, callbacks, and event systems
- External process management and lifecycle
- Inter-process communication
- Configuration file handling and environment variables
- CLI entry points and argument parsing
- Signal handling and graceful shutdown
- Any scheduled tasks, cron jobs, or polling mechanisms
- WebSocket or SSE connections to external systems
- Any subprocess spawning and management
**Primary concerns (review with extra scrutiny):**
- Are the external integrations reliable? File watchers and log parsers are particularly prone to race conditions, timing issues, missed events, and resource leaks
- Is anything over-complex? Are there elaborate event systems where simpler polling or direct calls would suffice?
- Do all the peripheral systems work together cohesively, or are there disjointed pieces that don't properly coordinate?
- What happens when external dependencies fail, are slow, or produce unexpected output? Is there proper error recovery?
- Are there resource leaks (open file handles, zombie processes, accumulating watchers)?
For each finding, provide:
- Severity: critical / high / medium / low
- File(s) and line(s) affected
- Description of the issue
- Suggested remediation
Send your complete findings to team-lead when done.
Teammate 6: Test Reviewer
Name: test-reviewer
Prompt:
You are the Test Reviewer for a project review team.
{PROJECT_CONTEXT_BRIEF}
Review all tests in the project. This includes:
- Unit tests — do they test actual behaviour or just implementation details?
- Integration tests — do they test real interactions between components?
- End-to-end tests — do they cover critical user paths?
- Test fixtures, factories, and data setup
- Mocks and stubs — are they mocking the right things? Are mocks hiding real bugs?
- Test configuration and setup/teardown
- Test coverage — are critical paths covered? Are there obvious gaps?
- Test reliability — are there flaky tests, timing-dependent tests, or order-dependent tests?
**Primary concerns (review with extra scrutiny):**
- Do the tests actually validate the current application behaviour, or have they fallen out of sync with recent feature additions?
- Are mocks masking real integration issues? If a mock is stubbing out a component that has changed, the test passes but the real code fails
- Are there missing tests for critical reliability concerns (race conditions, error recovery, edge cases)?
- Are tests over-complex? Tests should be simpler than the code they test
- Is the test suite consistent in style and approach, or have different contributors introduced conflicting patterns?
For each finding, provide:
- Severity: critical / high / medium / low
- File(s) and line(s) affected
- Description of the issue
- Suggested remediation (including specific tests that should be written but don't exist)
Send your complete findings to team-lead when done.
Teammate 7: Technical Writer
Name: tech-writer
Prompt:
You are the Technical Writer Reviewer for a project review team.
{PROJECT_CONTEXT_BRIEF}
Review all documentation in the project and assess whether it accurately reflects the current implementation. This includes:
- README.md — setup instructions, architecture overview, usage
- CLAUDE.md or equivalent project configuration docs
- Inline code comments and docstrings
- API documentation (if any)
- Help files, user guides, or usage documentation
- Architecture decision records or design docs
- Configuration documentation
- CHANGELOG or release notes
- Any diagrams or visual documentation
**Primary concerns (review with extra scrutiny):**
- Does the documentation match the current state of the code? After recent large features, docs often lag behind
- Are setup/installation instructions accurate and complete?
- Are there undocumented features, configuration options, or important behaviours?
- Are there documented features that no longer exist or work differently?
- Is the documentation consistent with itself, or do different docs contradict each other?
- Are critical operational concerns documented (how to restart, recover from errors, debug issues)?
For each finding, provide:
- Severity: critical / high / medium / low
- File(s) affected
- Description of the issue
- Suggested remediation (including specific documentation that should be written)
Send your complete findings to team-lead when done.
Step 3: Monitor and Collect
Wait for all teammates to complete their reviews and send their findings. If any teammate appears stuck or has questions, provide guidance.
Wait for ALL teammates to return their findings before proceeding to synthesis. If a teammate has not responded, check its status before continuing.
Step 4: Produce the Consolidated Report
Once all findings are collected, produce a single markdown file at PROJECT_REVIEW_REPORT.md in the project root with the following structure:
# Project Review Report
**Project:** [name from CLAUDE.md or repo]
**Date:** [current date]
**Stack:** [discovered stack summary]
**Reviewers:** Database, Frontend, Design, Application Server, External Integration, Test, Technical Writer
## Executive Summary
[2-3 paragraph overview of the project's health. Call out the most critical cross-cutting concerns, particularly around module alignment, reliability, and complexity. Be direct about what's working well and what needs attention.]
## Cross-Cutting Concerns
[Issues that span multiple reviewers' domains. These are often the most important findings — where modules are disjointed, where the integration between layers is unreliable, or where inconsistent patterns across the codebase are causing problems.]
## Findings by Severity
### Critical
[Findings that affect application reliability, data integrity, or represent significant bugs. Each finding should include:]
- **[AREA-NNN] Title** (Reviewer: [who found it])
- **Files:** [affected files and lines]
- **Issue:** [description]
- **Remediation:** [suggested fix or missing component]
### High
[Same format as above]
### Medium
[Same format as above]
### Low
[Same format as above]
## Module Alignment Assessment
[Dedicated section assessing whether all modules are consistent and cohesive, or whether recent additions have created divergent patterns. Identify specific areas where modules have become disjointed.]
## Design Assessment
[Dedicated section summarising the overall design quality of the application. Does it have a cohesive visual identity or does it look like generic AI output? Call out the strongest and weakest areas of the UI/UX, and whether the design system (if any) is being followed consistently across all views.]
## Recommendations
[Prioritised list of recommended actions, ordered by impact. Group related findings into coherent work items where appropriate.]
Step 5: Shutdown
After the report is written, shut down all teammates cleanly.