Build a Codex-Powered AI Code Review Agent That Analyzes Diffs and Generates Structured Feedback

Build a Codex-Powered AI Code Review Agent That Analyzes Diffs and Generates Structured Feedback

simpleFlows
simpleFlows February 17, 2026
AI Agents
Post Your Own Prompt
Build a fully functional web-based micro app that acts as an AI-powered Code Review Agent.

This app must allow a developer to paste:
• A Git diff
• A pull request snippet
• Or a full file

The AI agent analyzes the code and produces structured, actionable review feedback.

This is not a generic “improve this code” tool.
It must simulate a real senior engineer reviewing a PR.



Core Behavior

The agent must generate output structured into these sections:
1. Summary of Changes
2. Potential Bugs
3. Performance Concerns
4. Security Risks
5. Code Smells / Anti-patterns
6. Refactor Suggestions
7. Test Coverage Gaps
8. Overall Risk Level (Low / Medium / High)

Each section must contain clear reasoning and specific references to code patterns.

No vague statements.



Review Quality Rules

The AI must:
• Identify unused variables
• Detect possible async/await mistakes
• Flag improper error handling
• Suggest memoization where appropriate
• Detect unsafe patterns (eval, innerHTML misuse, unsanitized input)
• Recommend typing improvements if TypeScript is detected
• Identify duplicated logic
• Flag deeply nested conditionals
• Highlight potential race conditions

It must behave like a thoughtful reviewer, not a linter.



Unique Twist

Add a “Review Mode” selector:
• Strict → enterprise-grade review
• Balanced → pragmatic startup review
• Teaching Mode → detailed explanation of reasoning

Tone and verbosity must adapt based on selected mode.



UI Requirements

Dark mode only.
Premium developer dashboard aesthetic.

Layout:
• Left panel: code input area
• Right panel: structured review output
• Top: Review Mode selector + Analyze button
• Bottom: Export Review button (copy markdown format)

Include:
• Collapsible feedback sections
• Subtle severity indicators
• Loading state with progressive output rendering
• Review history stored locally



Technical Requirements
• Single-page app
• Pure HTML, CSS, JavaScript frontend
• Modular structure
• AI API integration layer (mockable)
• LocalStorage for review history
• Clean separation between:
• UI layer
• Review generation logic
• AI prompt builder



Internal AI Prompt Template (Used by App)

You are a senior software engineer performing a detailed code review.

Analyze the following code or diff carefully.

Provide feedback structured exactly into the following sections:

Summary of Changes
Potential Bugs
Performance Concerns
Security Risks
Code Smells / Anti-patterns
Refactor Suggestions
Test Coverage Gaps
Overall Risk Level

Be specific. Reference patterns in the code.
Avoid generic advice.
Match tone according to selected review mode.

Code to review:
{{PASTED_CODE}}



Output Requirements

Return:
1. Complete runnable frontend code
2. The internal AI prompt template
3. Explanation of how to connect to a real AI API key securely

No placeholders.
No pseudo-code.



Recommended LLMs

ChatGPT 5.2
Claude



Programming Languages

HTML
CSS
JavaScript



Tags

ai code review, codex automation, developer productivity, pull request review, vibecoding, ai agents, javascript tools, automation workflow



If you want, next we can build:
• An OpenClaw-style autonomous workflow agent
• An AI Daily Digest productivity agent
• A fully local task automation orchestrator
• Or something experimental and powerful

You choose the direction 🚀

This tool should:
• Reduce PR friction
• Improve solo developer quality
• Help junior developers learn review thinking
• Simulate team-level review without team overhead

Avoid generic feedback.

The review must feel deliberate and intelligent.

Share Your Thoughts

Your email address will not be published. Required fields are marked *

Save Prompt