Knowledge base
On this page
Flow installs docs for AdonisJS and the packages around it into your project. Your coding agent reads them while it works, instead of relying on its training data.
Why not the docs on the website
Section titled "Why not the docs on the website"The docs on the AdonisJS website are written for people learning the framework. They explain every feature, including the parts coding agents already get right.
Flow's docs are written for coding agents. They leave out what agents already know, and add strict rules for the decisions agents would otherwise make up. With less to infer, your agent makes the same decisions every time and spends fewer tokens.
How Flow picks the docs
Section titled "How Flow picks the docs"npx @adonisplus/flow install finds the packages below in your package.json, and installs the docs for the major version you use. Some docs, such as controllers and responses, have a separate version for Inertia + React, Inertia + Vue, JSON APIs and Edge templates. Flow installs the one for your stack.
Redis, Cache, Limiter, Lock, Transmit and the scheduler also have a short doc that Flow installs when your app doesn't use the package yet. It tells your agent when to use the package, and how to install and configure it.
Packages covered
Section titled "Packages covered"| Package | Versions |
|---|---|
@adonisjs/core | 7.x |
@adonisjs/lucid | 22.x |
@vinejs/vine | 4.x |
@adonisjs/inertia | 4.x, 5.x |
edge.js | 6.x |
@adonisjs/auth | 10.x |
@adonisjs/bouncer | 4.x |
@adonisjs/session | 8.x |
@adonisjs/mail | 10.x |
@adonisjs/drive | 4.x |
@adonisjs/redis | 10.x |
@adonisjs/cache | 2.x |
@adonisjs/limiter | 3.x |
@adonisjs/lock | 2.x |
@adonisjs/transmit | 3.x |
@adonisjs/transmit-client | 1.x |
@outloud/adonis-scheduler | 1.x |
@adonisplus/persona | 0.x |
@adonisplus/permissions | 0.x |
Flow also installs the docs for each feature pack. See Feature packs.
The code style doc
Section titled "The code style doc"Some rules of good code are not about any specific package, and a lint rule can't check them. A lint rule only matches the shape of the code. It can't tell whether an early return would make a function easier to read. Flow keeps these rules in a single doc, code-style.md, and installs it in every app.
Your agent reads the other docs only when a task needs them. It reads the code style doc before it writes or changes any code, because its rules apply everywhere. The review-code-style lens checks every change against the same doc, so reviews catch code that breaks one of its rules. See Lenses.
For now, the doc has one rule: use early returns. Check each condition that ends the work at the top of the function, and return or throw right there. Don't wrap the main logic of a function in an if.
To add your team's own rules, copy .flow/docs/code-style.md to .flow/custom/docs/code-style.md, add your rules, and run npx @adonisplus/flow install. Your copy replaces Flow's, and both your agent and the review lens follow it. Keep required: true in the frontmatter, since that is what makes your agent read the doc before it writes code. See Customizing Flow.
Where the docs live
Section titled "Where the docs live"Flow writes the docs to .flow/docs/ and adds the folder to .gitignore. When you upgrade a package or add one, run npx @adonisplus/flow install again. See Updating Flow.