Summary
Allow per-repo configuration of how aggressively the agent accepts or rejects review suggestions, via a .oompa.yml config file in the repository or a --review-policy flag.
Motivation
Different repos have different standards and different tolerance for AI-driven changes:
- Some repos want the agent to be conservative and only fix clear bugs
- Some repos want the agent to accept most suggestions to maintain reviewer satisfaction
- Some topics (architecture, API design, security) should always be deferred to humans
Proposed configuration
.oompa.yml in the repo root
review:
# How aggressively to accept suggestions: conservative, balanced, liberal
policy: balanced
# Topics the agent should always defer to humans on
defer-to-humans:
- architecture
- API design
- security
- breaking changes
# Project-specific conventions to enforce
conventions:
- "Use table-driven tests"
- "Error messages should not start with capital letters"
- "Prefer named returns for functions with 3+ return values"
# Reviewers whose suggestions get extra weight
trusted-reviewers:
- maintainer1
- maintainer2
--review-policy flag
oompa --review-policy conservative ...
Values:
conservative: only fix clear bugs, decline style suggestions
balanced (default): fix bugs and valid improvements, defer style to conventions
liberal: accept most suggestions, only decline clearly incorrect ones
Implementation
- Add
ReviewPolicy field to Config struct
- Look for
.oompa.yml in the repo root when processing reviews
- Inject policy context into
buildReviewResponsePrompt
- Conventions and defer-to-humans lists get included in the prompt as additional guidance
Scope
pkg/agent/config.go — add ReviewPolicy field
cmd/oompa/main.go — add --review-policy flag
pkg/agent/prompt.go — inject policy into review prompt
pkg/agent/loop.go — read .oompa.yml from worktree before building prompt
- New:
.oompa.yml parsing logic
Summary
Allow per-repo configuration of how aggressively the agent accepts or rejects review suggestions, via a
.oompa.ymlconfig file in the repository or a--review-policyflag.Motivation
Different repos have different standards and different tolerance for AI-driven changes:
Proposed configuration
.oompa.ymlin the repo root--review-policyflagValues:
conservative: only fix clear bugs, decline style suggestionsbalanced(default): fix bugs and valid improvements, defer style to conventionsliberal: accept most suggestions, only decline clearly incorrect onesImplementation
ReviewPolicyfield toConfigstruct.oompa.ymlin the repo root when processing reviewsbuildReviewResponsePromptScope
pkg/agent/config.go— add ReviewPolicy fieldcmd/oompa/main.go— add --review-policy flagpkg/agent/prompt.go— inject policy into review promptpkg/agent/loop.go— read .oompa.yml from worktree before building prompt.oompa.ymlparsing logic