The AI harness and code reviewer for AdonisJS

Make your agents write idiomatic AdonisJS code, and get each pull request reviewed before it's merged. Created and maintained by the team behind the framework.

Learn more

Agents now write a large part of the code we ship, and reading all of it before it's merged has become the slow part.

Review only gets faster when the code holds no surprises. For that, the agent has to understand your codebase well, from the patterns it follows to the decisions behind its design. Then it has little room to guess, and the review has clear rules to check the code against.

That's why I'm building Flow, the official AdonisJS harness. It gives your agents the framework's patterns and design decisions up front, and checks every pull request against them. You can trust more of the code they produce, and merge it without reading all of it.

Flow is still growing. The way we build with agents keeps changing, and Flow will change with it.

We build and maintain the harness for your stack, so you don't have to.

Harminder VirkCreator of AdonisJS

Every pull request reviewed before you merge

Set up Flow to review your pull requests and address the comments your teammates leave on them. It looks only for problems specific to AdonisJS, so keep your general code reviewer for everything else.

Flow review comments
adonisjs-flowbot2 minutes agoCriticalreview-access-control, review-response-exposure

The public subscribe form re-activates a confirmed, unsubscribed address right away, with no confirmation email. The store flash then gives a different message for that state.

Impact: Any anonymous visitor can post someone else's address and undo that person's unsubscribe, so they get newsletters they opted out of. The 're-subscribed' message also tells the visitor that the address was a confirmed subscriber who unsubscribed.

Fix: In the unsubscribedAt branch, leave the row unchanged and dispatch SendNewsletterConfirmation. Clear unsubscribedAt in update, behind the signed confirm link. Flash the same neutral message for every status.

app/services/newsletter_service.ts
+ if (existing.unsubscribedAt) {
+ existing.unsubscribedAt = null
+ existing.subscribedAt = DateTime.now()
+ await existing.save()
+ return 'resubscribed' as const
+ }
adonisjs-flowbot2 minutes agoMajorreview-access-control

The GitHub and Discord invite actions check only that the user is signed in, not that the member's access has not ended (accessExpiresAt), so a member whose subscription ended can still invite any email to the organization and its members' team.

Impact: A former member can get a new GitHub team invitation, read the current private repositories, and mint new Discord invites.

Fix: Add a User method such as hasActiveAccess(). Reject POST /account/invites/github and POST /account/invites/discord for a member without access, and hide the forms on the Invites page for that member.

app/controllers/github_invites_controller.ts
+ async store({ auth, request, response, session }: HttpContext, github: GitHubService) {
+ const { email } = await request.validateUsing(createGitHubInviteValidator)
+ const member = auth.getUserOrFail()
+ const invite = await member.related('githubInvite').query().first()
adonisjs-flowbot2 minutes agoMajorreview-access-control, review-response-exposure

The public thank-you page returns the buyer's full customer_email and amount to any anonymous visitor who has the checkout id. Nothing ties the page to the buyer through a session or a cookie.

Impact: The checkout id is the only barrier, and it sits in the URL. Anyone who gets it from browser history on a shared machine, a Referer header, a proxy log or a shared link can read the buyer's email address and what they paid.

Fix: Remove email from the transformer, or mask it. Another option is to bind the page to the buyer: store the checkout id in the session in create, and in show render the checkout only when it matches the query id.

app/transformers/checkout_transformer.ts
+ return {
+ id: this.resource.id,
+ state: this.#state(),
+ email: this.resource.customer_email,
adonisjs-flowbot2 minutes agoMajorreview-query-cost

subscriptions.user_id has no index. PostgreSQL does not index foreign keys by itself, yet User.hasAccess() filters subscriptions by user_id.

Impact: Each signed-in visit to the Flow page, and each fulfil() for an existing account, scans every row of subscriptions. The fulfil() scan runs inside a transaction that holds a forUpdate row lock. The cost grows with the number of purchases.

Fix: Add table.index(['user_id']) to the subscriptions migration. Use table.index(['user_id', 'status']) to also cover the status = 'active' scope.

database/migrations/1792581800001_create_subscriptions_table.ts
+ this.schema.createTable(this.tableName, (table) => {
+ table.increments('id').notNullable()
+ table.integer('user_id').unsigned().notNullable().references('users.id')
adonisjs-flowbot2 minutes agoMinorreview-migration-safety

table.index(['user_id']) builds the index with a plain CREATE INDEX on orders, a table that an earlier migration creates and that can have rows, so the build blocks writes to the table.

Impact: While migration:run builds the index during a deploy, PostgreSQL blocks inserts, updates and deletes on orders, so the Polar webhook jobs that write orders stall until the build ends. The stall grows with the size of the table.

Fix: Set static disableTransactions = true. In up, run CREATE INDEX CONCURRENTLY IF NOT EXISTS orders_user_id_index ON orders (user_id) with this.schema.raw. In down, drop the index.

database/migrations/1793872264507_alter_orders_table.ts
+ async up() {
+ this.schema.alterTable(this.tableName, (table) => {
+ table.index(['user_id'])
adonisjs-flowbot2 minutes agoMinorreview-input-validation

The email is not trimmed or lowercased before the lookup and the insert, and the unique index on email is case-sensitive. The same applies to newsletterLinkValidator at line 8.

Impact: One person can end up with separate rows for 'Reader@x.com' and 'reader@x.com'. Each row gets its own confirmation and its own mailings, and unsubscribing one leaves the other active.

Fix: Use vine.string().trim().toLowerCase().email().maxLength(254) in both validators.

app/validators/newsletter_subscription.ts · Suggested change
- email: vine.string().email().maxLength(254),
+ email: vine.string().trim().toLowerCase().email().maxLength(254),
  • CodeRabbit
  • Greptile
  • AdonisJS

Finds what a general reviewer misses

It knows how the parts of an AdonisJS app work together. So it catches problems that a general reviewer has no way to see.

  • Claude Code
  • Codex
  • Kimi

Your agent, no credits to buy

Reviews run on the AI plan or API key you already pay for, and your provider bills you for the tokens. Plus never charges for a review.

  • GitHub

Runs in your GitHub Actions

Each review runs as one more job in the CI, on the same runners as the other jobs. Flow's server never reads your source code.

The harness, installed in your project

Your agent reads the docs for the packages your app uses, settles the design first, and writes code that follows your project's conventions.

  • Claude Code
  • Cursor
  • Codex
  • GitHub Copilot
  • OpenCode

Knowledge that matches your application

.flow/docs/transactions.md
.flow/docs/
├── authentication.md
├── authorization.md
├── controllers.md
├── middleware.md
├── models.md
├── routing.md
├── transactions.md
├── validation.md
├── vine/
│   └── types/
└── …
# Transactions

Read when multiple database operations must succeed or fail together.

## Contents
- Make several database writes succeed or fail as one operation- Ensure every query in a workflow uses the same transaction- Isolate a nested unit of work with a savepoint- Send mail, events, or other side effects only after commit- Prevent concurrent writers from changing the same rows- Coordinate work that spans more than one database connection
## Recommended Defaults
- Default to the managed form `db.transaction(async (trx) => ...)`. Returns the callback's resolved value; rethrows the original error on rollback.- Build every query, insert, update, delete, raw call, and model write off `trx`, never `db`. Queries issued through `db` inside the callback run outside the transaction and commit immediately.

Architectural and program design skills

Claude Code

✻ Welcome to Claude Code!

/help for help, /status for your current setup

cwd: ~/code/invoices

> /flow-
❯ /flow-code-placementDecides where code goes: the class that needs it, a model method, a service or a pattern object.
/flow-validation-layersDecides which checks belong in the validator, in a guard on a loaded record, or in a database constraint.
/flow-access-controlLimits each read and write to the records a user may reach.
/flow-schema-designSettles soft deletes, enums, money, polymorphic relations and JSON columns.
/flow-cruddy-controllersPicks the controller and the method for each action.
/flow-response-designDecides what an action returns, and how the page uses it.
/flow-design-testsDecides which tests to write, what each one asserts and what it fakes.
/flow-pattern-object-designWrites one class for a concept, holding its value, its forms and its operations.

AST-based lint rules

app/controllers/invoices_controller.ts4 problems
1import type { HttpContext } from '@adonisjs/core/http'
2import Invoice from '#models/invoice'
3
4interface InvoiceFilters {types-live-in-types-directory
5 status?: string
6}
7
8function toCents(amount: number) {no-top-level-functions
9 return Math.round(amount * 100)
10}
11
12export function formatTotal(cents: number) {exported-functions-are-factories
13 return `$${(cents / 100).toFixed(2)}`
14}
15
16export default class InvoicesController {
17 async index({ request }: HttpContext) {
18 const filters = request.qs() as InvoiceFilters
19 return Invoice.query().where('status', filters.status ?? 'open')
20 }
21
22 async store({ request, response }: HttpContext) {
23 const invoice = await this.#createInvoice(request.input('amount'))
24 return response.redirect().toRoute('invoices.show', [invoice.id])
25 }
26
27 async #createInvoice(amount: number) {no-private-controller-methods
28 return Invoice.create({ totalInCents: toCents(amount) })
29 }
30}

Get started

Flow comes with Plus

One yearly subscription covers Flow, the premium packages, and everything we add while you're subscribed.

30-day money-back guarantee.

PLUS
$19/ month

Billed annually at $228

  1. The Flow harness, pull request reviews and feature packs
  2. Persona and Permissions, our premium packages
  3. A private Discord with the creator and other members
  4. Every update while your subscription is active

Your agents and reviews run on your own API key or AI subscription, billed by your provider.

Not ready to buy?

Get the newsletter for new Flow releases, feature packs, and what we're working on next.

Frequently asked questions

Which coding agents does Flow work with?

Claude Code, Cursor, Codex, GitHub Copilot and OpenCode.

Do I pay for AI usage separately?

Yes. Your agents and reviews run on your own API key or AI subscription, and your provider bills you for that usage.

Does Flow send my code to your servers?

No. The harness is a set of files in your project, and reviews run inside your own GitHub workflows.

Does it work with private repositories?

Yes. Reviews run in GitHub Actions on your repository, so they use your Actions minutes.

Which AdonisJS versions does it support, and does it work in an existing app?

AdonisJS 7. Flow works in new and existing apps, and installs docs for the packages your app already uses.

Can I use it on more than one project, including client work?

Yes, on as many projects as you like, including client work. You can't resell Flow's files, or bundle them into a template you sell to several clients.

Can I use it on open-source projects?

Yes. The project you build with Flow can be open source. Flow's skills, docs and rules stay private, so keep them out of the public repository.

What happens when I cancel?

Your subscription runs until the end of the year you paid for. After that, the files already in your projects stay, but updates and reviews stop, and you leave the private Discord.

Can I get a refund?

Yes. Email virk@adonisjs.com within 30 days of buying for a full refund.

Is there a plan for teams?

Not yet. Plus is a personal subscription for now, and a team plan is coming next. Use your membership for reviews on your own GitHub account and your own organizations, not on a company's repositories.