| name | execute-review |
| description | Execute code reviews for project changes. Use when Codex is asked to review implementation changes, validate code against project rules and skills, verify TechSpec and task adherence, run tests for review, or generate a code review report. |
Execute Review
Role
You are an AI assistant specialized in Code Review. Your task is to analyze the produced code, verify whether it complies with the project rules, whether the tests pass, and whether the implementation follows the defined TechSpec and Tasks.
Check whether the code complies with the project's rules and skills
ALL tests must pass before approving the review
The implementation must follow the TechSpec and Tasks
Goals
- Analyze produced code via git diff
- Verify compliance with the project's rules
- Validate that the tests pass
- Confirm adherence to the TechSpec and Tasks
- Identify code smells and improvement opportunities
- Generate a code review report
Prerequisites / File Locations
- PRD:
./tasks/prd-[feature-name]/prd.md
- TechSpec:
./tasks/prd-[feature-name]/techspec.md
- Tasks:
./tasks/prd-[feature-name]/tasks.md
- Project Rules: @.codex/rules
- Project Skills: @.codex/
Template Reference
- Load and follow
references/code-review-report-template.md when generating the final code review report.
- Do not inline or alter the report structure in
SKILL.md; the reference file is the source of truth for the code review report format.
Process Steps
1. Documentation Analysis (Mandatory)
- Read the TechSpec to understand the expected architectural decisions
- Read the Tasks to verify the implemented scope
- Read the project rules to know the required standards
- Read the project skills to know the required standards
DO NOT SKIP THIS STEP - Understanding the context is essential for the review
2. Rules Compliance Check (Mandatory)
For each code change, check:
3. TechSpec Adherence Check (Mandatory)
Compare the implementation against the TechSpec:
4. Task Completeness Check (Mandatory)
For each task marked as complete:
5. Test Execution (Mandatory)
Run the test suite:
npm test
yarn test
npm run test:coverage
Check:
THE REVIEW CANNOT BE APPROVED IF ANY TEST FAILS
6. Code Quality Analysis (Mandatory)
Check code smells and best practices:
| Aspect | Check |
|---|
| Complexity | Functions not too long, low cyclomatic complexity |
| DRY | No duplicated code |
| Naming | Clear and descriptive names |
| Comments | Comments only where necessary |
| Error Handling | Proper error handling |
| Security | No obvious vulnerabilities (SQL injection, XSS, etc.) |
| Performance | No obvious performance issues |
8. Code Review Report (Mandatory)
ALWAYS save the final report in codereview.md at the project root (or in ./tasks/prd-[feature-name]/codereview.md when the review is specific to a feature)
Generate a final report using references/code-review-report-template.md.
Quality Checklist
Approval Criteria
APPROVED: All criteria met, tests passing, code compliant with rules and TechSpec.
APPROVED WITH RESERVATIONS: Main criteria met, but there are recommended non-blocking improvements.
REJECTED: Failing tests, serious rule violation, non-adherence to the TechSpec, or security issues.
THE REVIEW IS NOT COMPLETE UNTIL ALL TESTS PASS
ALWAYS check the project rules before flagging issues