Reviewer Maturity

Reviewer Maturity

These options improve review accuracy and cut CI cost. They all live in .ai-review.yml.

Self-critique

An adversarial second pass refutes weak findings before they are posted, and drops low-confidence, low-severity ones. This reduces false positives. On by default.

selfCritique:
  enabled: true              # enabled by default
  confidenceThreshold: 0.6   # findings with confidence < 0.6 AND severity <= minor are dropped

Every finding now also carries two fields the model must fill in:

  • codeRef — the exact code snippet the finding refers to. It anchors the finding so it is not re-reported when its line shifts or its title is reworded.
  • confidence — the model's confidence the finding is real (0 = guess, 1 = certain).

Project grounding (CLAUDE.md + docs/)

The reviewer reads CLAUDE.md and your architecture documents under docs/ as authority above the generic stack rules. A finding that contradicts your documented decisions is not reported; a violation of them is treated as high priority.

projectContext:
  claudeMd: true
  docsGlobs:
    - 'CLAUDE.md'
    - 'docs/**/architecture*.md'
    - 'docs/**/adr/**/*.md'
    - 'docs/**/*-rules*.md'
    - 'docs/**/conventions*.md'
    - 'docs/**/domain*.md'
  maxChars: 8000

Official stack docs (opt-in)

Disabled by default. With context7 enabled, the reviewer injects version-specific official docs for the libraries touched by the diff. It is fail-open: if the provider is unavailable, the review continues without docs and never fails CI. Requires the CONTEXT7_API_KEY secret.

officialDocs:
  enabled: false
  provider: none   # set to 'context7' to enable

Dismissing findings with @botai

On every inline comment you can reply in the thread with:

  • @botai resolved — close the finding.
  • @botai dismiss — mark it a false positive: it is closed and never reported again on later pushes.
  • @botai explain — request a fuller explanation and a concrete fix.
  • @botai approved — (from a general PR comment) approve the PR manually.

CI cost

The example workflow uses concurrency with cancel-in-progress (only the latest push runs) and paths-ignore (docs and lockfile changes do not trigger a review). See examples/.github/workflows/ai-review.yml.

No comment trickle

The first run is exhaustive — all findings are posted at once (inline where they map, the rest grouped in the summary). Later pushes run a strict verify-only re-review: they only report new critical/major issues the push introduced, and never add new style observations or re-discover pre-existing issues.