Skip to content

feat: configurable review policy per repo #103

@qinqon

Description

@qinqon

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

  1. Add ReviewPolicy field to Config struct
  2. Look for .oompa.yml in the repo root when processing reviews
  3. Inject policy context into buildReviewResponsePrompt
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions