agentleFS
nazmulnahid-gitnazmulnahid-git/Ai-Stack/skills/adonis-next-monorepo/template/AGENTS.md

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.

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
  1. Very specific:

    Every convention in docs/conventions.md is a hard rule.

    line 3
  2. Very specific:

    Read before writing: Read the docs/conventions.md section for the area you're changing, then the closest existing code of the same kind, …

    line 7
  3. Very specific:

    Ask first: before adding or upgrading a dependency, introducing a pattern that docs/conventions.md doesn't describe, or changing the folder …

    line 8
  4. Very specific:

    Record decisions: When a convention is added or changed, add or update its entry in docs/conventions.md (decision, why, implementing files) …

    line 9
  5. Distinctive:

    Create files with the project's generators so they start in the right shape:

    line 14

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

  1. Read before writing. Read the docs/conventions.md section for the area you're changing, then the closest existing code of the same kind, and follow its pattern.
  2. Ask first before adding or upgrading a dependency, introducing a pattern that docs/conventions.md doesn't describe, or changing the folder structure or a convention.
  3. 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.
  4. Done means green: pnpm format:check, pnpm lint, pnpm typecheck and pnpm test pass 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> in apps/api, then pnpm codegen.
  • Migration, model, factory, transformer: node ace make:migration|model|factory|transformer in apps/api.
  • UI component: pnpm dlx shadcn@latest add <name> in apps/web (lands in packages/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 as unknown.
  • Commits are <type>(<scope>): <subject>, where scope is an API module, a workspace (api, web, ui, …) or repo/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 -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.