Summary
Add a configurable TDD mode that adjusts codereviewbuddy's agent instructions to guide the AI into a test-driven development flow when reviewing and resolving PR comments.
Motivation
When an agent fixes review comments, it typically jumps straight to implementation. A TDD mode would instruct the agent to:
- Write a failing test first that reproduces the issue flagged by the reviewer
- Implement the fix to make the test pass
- Verify the fix doesn't break existing tests
This produces higher-quality fixes with built-in regression coverage.
Design
Config
[agent]
tdd_mode = false # Set to true to enable TDD-guided review flow
Behavior when enabled
- Agent instructions (system prompt / tool descriptions) are augmented with TDD guidance
- When resolving a review comment, the agent is guided to:
- Read the comment and understand the issue
- Write a test that would catch the bug/issue
- Run the test to confirm it fails
- Implement the minimal fix
- Run the test to confirm it passes
- Run the full test suite
Open questions
- Should TDD mode be per-reviewer or global?
- Should it apply to all comment severities or only bug/flagged?
- How prescriptive should the instructions be? (strict TDD vs gentle nudge)
- Should it integrate with the existing
resolve_levels config?
Summary
Add a configurable TDD mode that adjusts codereviewbuddy's agent instructions to guide the AI into a test-driven development flow when reviewing and resolving PR comments.
Motivation
When an agent fixes review comments, it typically jumps straight to implementation. A TDD mode would instruct the agent to:
This produces higher-quality fixes with built-in regression coverage.
Design
Config
Behavior when enabled
Open questions
resolve_levelsconfig?