This guide covers .flow/review.yml, the settings of a Flow code review. You will learn:

  • What each setting does, and its default
  • How to accept a finding

npx @adonisplus/flow install writes .flow/review.yml with the built-in lenses. Commit it. Once it exists, the installer leaves it as it is, so your changes stay.

agent, env, emojis, triggers and workflow apply only to reviews on GitHub. Flow reads them from your default branch, so a pull request cannot change how it is reviewed. A local review uses the other settings, and reports every finding, with no maxFindings limit.

.flow/review.yml
agent: claude
maxFindings: 10
ignore: ['database/seeders/**']
env: ['DATABASE_URL']
triggers:
  drafts: false
lenses:
  - ref: .flow/lenses/review-access-control.md
    globs: ['app/**']
  - ref: .flow/lenses/review-code-placement.md
    globs: ['app/**']
    severity: nit
lenseslist
The lenses that run. Each has a ref, the path of its file, globs, the files it reads, and an optional severity that gives all its findings that severity: critical, major, minor or nit. Without globs, a lens reads every changed file. See Lenses.
maxFindingsnumber
The most findings one review reports, the most severe first. Defaults to 10.
maxParallelnumber
The most lenses that run at the same time. Defaults to 4.
batchSizenumber
The most files one sub-agent of a lens reviews. A lens with more files splits them into batches. Defaults to 20.
ignorelist of globs
Files that no lens reviews, such as generated code or seeders.
acceptedlist
Findings your team accepts. See Accepting a finding.
agentclaude | codex
The agent that reviews, when the repository has credentials for both. See Supported agents.
envlist of names
The variables of the workflow job that the review's shell can see, such as DATABASE_URL for a test run. The model credential and GITHUB_TOKEN are never passed.
emojismap
The emoji of each severity in the review's comments. Defaults to 🔴 critical, 🟠 major, 🟡 minor and 🔵 nit.
triggers.draftsboolean
Whether draft pull requests are reviewed. Defaults to false.
triggers.forksmembers | all
Whose pull requests from forks are reviewed. members reviews only those of people with write access to the repository. Defaults to members.
workflowstring
The workflow file the Flow App starts. Defaults to flow-review.yml.

When your team decides a finding is fine, accept it so the review stops reporting it.

For the whole repository, add it to accepted, with the lens, the finding in a few words, and the reason.

.flow/review.yml
accepted:
  - lens: review-query-cost
    finding: Reports loads every order of the month
    reason: The report runs once a night on a replica

For one place in the code, add a flow-allow comment right above the line or block. Name the doc or skill whose rule the code breaks, and why it must. A reason that only says someone asked for it is not enough.

app/controllers/webhooks_controller.ts
// flow-allow flow-cruddy-controllers: Stripe calls this exact path, so it cannot be a resource route
router.post('/stripe/webhook', [controllers.Webhooks, 'handle'])

Lenses

What each lens checks, and writing your own.

GitHub setup

Turn on the Flow review for a repository.