Design an AI-powered code review agent that assists developers by reviewing pull requests and producing actionable feedback.
The agent should be able to:
-
Inspect code changes in a pull request.
-
Understand repository context when necessary.
-
Identify bugs, security risks, style issues, maintainability problems, and missing tests.
-
Produce comments that are specific, actionable, and grounded in the code.
-
Decide which parts of the workflow require an LLM and which parts can be handled by deterministic tools.
Deep-dive areas:
-
Which components need an LLM, and which should not use an LLM?
-
How would you validate the quality and safety of the agent's generated review comments?
-
How would the orchestrator work?
-
What memory or repository context should the system maintain?
-
What tools should the agent be able to use?
-
How would you estimate and control the cost of each LLM inference?