Ai-Stack / template
AGENTS.md4 starsChanged 17 days agoMITView on GitHub
Every convention in docs/conventions.md is a hard rule. Follow it on every change until the user explicitly allows an exception for the current task. Create files with the project's generators so they start in the right shape: This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- skills/adonis-next-monorepo/template/CLAUDE.mdCLAUDE.md
- adonis-next-monorepoSkill
- mergemainSkill
- prodcheckSkill
- prodtestSkill
- shipitSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
Every convention in docs/conventions.md is a hard rule.
- Very specific: line 7
Read before writing: Read the docs/conventions.md section for the area you're changing, then the closest existing code of the same kind, …
- Very specific: line 8
Ask first: before adding or upgrading a dependency, introducing a pattern that docs/conventions.md doesn't describe, or changing the folder …
- Very specific: line 9
Record decisions: When a convention is added or changed, add or update its entry in docs/conventions.md (decision, why, implementing files) …
- Distinctive: line 14
Create files with the project's generators so they start in the right shape:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TITLE: agent rules
Every convention in docs/conventions.md is a hard rule. Follow it on every change until the user explicitly allows an exception for the current task.
Working rules
- Read before writing. Read the
docs/conventions.mdsection for the area you're changing, then the closest existing code of the same kind, and follow its pattern. - Ask first before adding or upgrading a dependency, introducing a pattern that
docs/conventions.mddoesn't describe, or changing the folder structure or a convention. - Record decisions. When a convention is added or changed, add or update its entry in
docs/conventions.md(decision, why, implementing files) in the same change. - Done means green:
pnpm format:check,pnpm lint,pnpm typecheckandpnpm testpass from the repo root. Report any failure with its output.
Generators
Create files with the project's generators so they start in the right shape:
- API feature module:
node ace make:module <name>inapps/api, thenpnpm codegen. - Migration, model, factory, transformer:
node ace make:migration|model|factory|transformerinapps/api. - UI component:
pnpm dlx shadcn@latest add <name>inapps/web(lands inpackages/ui).
Gotchas
- TypeScript stays on 6.0 (AdonisJS and typescript-eslint don't support 7).
- The web client is keyed by route name:
api.<module>.<action>(e.g.api.auth.login). Name every route with.as(). - Return responses from controller methods via
serialize(). Tuyau types route closures asunknown. - Commits are
<type>(<scope>): <subject>, where scope is an API module, a workspace (api,web,ui, …) orrepo/deps/ci/docs. Branches are<type>/<kebab-description>.
<!-- BEGIN:nextjs-agent-rules -->This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
<!-- END:nextjs-agent-rules -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

