This project provides an agent that reviews git diffs and offers actionable, senior-level code review recommendations. It uses Google ADK for agent development and Ruff for linting.
- Python 3.12+
- uv for dependency management
- Google API key (see
.envsetup)
- Create and activate a virtual environment:
uv venv source .venv/bin/activate - Install dependencies:
uv add google-adk ruff
- Configure your API key:
- Edit
git_diff_critique_agent/.envand set your Google API key and region.
- Edit
You can pipe a git diff directly to the agent for review:
git diff | python main.pyIf no input is detected, an error message will be shown.
You can also run the agent in a web UI for interactive use:
adk webThen open the provided URL in your browser and select the agent.
Run Ruff to check code style:
uv run ruff check .Run the test suite with:
uv run pytestThis will discover and run all tests in the tests/ directory. Ensure your virtual environment is activated and dependencies are installed.
- Follow the coding and review guidelines in
.gemini/context.md. - Use
uvfor all dependency management. - Ensure all code passes Ruff linting before submitting.
For more details, see the inline documentation and Copilot instructions.