nextjs-bootstrap-template
AGENTS.md0 starsChanged 6 months agoMITView on GitHub
Hub for AI coding agents (Claude Code, Cursor, Codex, Gemini, Aider, Cline, etc.) working in this repo. Read this file first. Treat it as a routing index: it tells you what to load next. Do not turn it into long-form docs or duplicate rule-file content here. Do not assume one fixed persona. Derive the working stance from the classified task and loaded rules: engineer for implementation, QA/reviewer for validation, UI/product designer for visual work, tech lead/architect for specs and plans,…
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 35,337 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 repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/00-base.mdcCursor rule
- .cursor/rules/10-nextjs.mdcCursor rule
- .cursor/rules/20-supabase.mdcCursor rule
- .cursor/rules/30-tests.mdcCursor rule
- .cursor/rules/40-a11y-i18n.mdcCursor rule
- agent-browserSkill
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
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
- Distinctive: line 5
Read this file first. Treat it as a routing index: it tells you what to load next.
- Distinctive: line 17
Before completion, run the required QA for any repo-changing task and run the self-review workflow.
- Distinctive: line 19
Ask one focused question only when ambiguity changes artifact type, side effects, or user-visible behavior.
- Very specific: line 44
Do not bypass gates with any, eslint-disable, .skip(), unreviewed @ts-expect-error, commented-out code, or git commit --no-verify for …
- Distinctive: line 70
Do not read spec or plan templates for unrelated code-only tasks.
- Very specific: line 74
When the task router above names files in .agents/rules/, .agents/references/, or .agents/workflows/, the directory's README.md is the …
- Distinctive: line 88
If an index disagrees with this file, AGENTS.md wins and the index should be patched.
- Distinctive: line 106
If no files changed, report the inspected files and the verdict.
- Distinctive: line 107
If files changed, check git status, run the required QA loop, run self-review, and report commands with exit status.
- Very specific: line 108
If the QA loop reaches its cap, write the blocker plan required by .agents/rules/qa-loop.md and report that path.
- Very specific: line 109
Commit messages use Conventional Commits.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
AGENTS.md
Hub for AI coding agents (Claude Code, Cursor, Codex, Gemini, Aider, Cline, etc.) working in this repo.
Read this file first. Treat it as a routing index: it tells you what to load next. Do not turn it into long-form docs or duplicate rule-file content here.
Do not assume one fixed persona. Derive the working stance from the classified task and loaded rules: engineer for implementation, QA/reviewer for validation, UI/product designer for visual work, tech lead/architect for specs and plans, technical writer for docs, security reviewer for auth/API/risk work, and the relevant specialist stance for any other surface.
Exact stack versions live in package.json. Human quickstart and stack overview live in README.md. If a concept is unfamiliar, read CONCEPTS.md; teaching belongs there, not here.
Operating protocol
- Start here.
- Classify the task from evidence, not only from the prompt: mentioned paths,
git status, active.plans/*, current diff, recent commits, reported errors, UI symptoms, requested output, and artifact type. - Load the smallest safe union of rule files from the task router below. If a task spans multiple surfaces, load all relevant rules.
- Work in the correct artifact layer. For docs/specs/plans/artifacts, read
.agents/references/artifact-layers.mdbefore creating, moving, or editing durable artifacts. - Before completion, run the required QA for any repo-changing task and run the self-review workflow.
Ask one focused question only when ambiguity changes artifact type, side effects, or user-visible behavior. Otherwise choose the safest default and continue.
What belongs where
| Layer | Purpose |
AGENTS.md | Terse routing hub: protocol, task router, invariant pointers. |
.agents/rules/ | Mandatory domain rules that agents must obey when that surface is touched. |
.agents/workflows/ | Repeatable procedures such as QA, self-review, and multi-agent handoff. |
.agents/references/ | Lookup material: artifact taxonomy, path maps, component catalogs, event catalogs. |
CONCEPTS.md | Long-form teaching: what / why / how / common mistakes. |
README.md | Human quickstart, stack overview, project map, scripts. |
.docs/ | Durable product/technical docs, specs, architecture, decisions, runbooks. |
.plans/ | Active implementation plans as standalone HTML/CSS documents. Completed or superseded plans move to .plans/archived/. |
| Tool-specific files | Thin adapters only. They point back to AGENTS.md and must not duplicate canonical rules. |
If a new fact could fit in more than one layer, decide the layer explicitly and prefer the dedicated file over AGENTS.md. The full convention — including the four meta-rules for adding directories, adapters, sync gates, and indexes — lives in .agents/references/repo-structure.md. Read it before creating a new directory or per-tool adapter.
Non-negotiable invariants
- Infer task type from evidence before editing.
- Load the rule files for every affected surface; project rules override generic agent habits.
- For any repo-changing task,
npm run qaexit 0 is the baseline definition of done. - UI/browser-facing changes also require
npm run qa:visualexit 0. Do not say the user must verify visually when browser/Playwright tooling is available. - PR/release readiness requires
npm run qa:strict. - Do not bypass gates with
any,eslint-disable,.skip(), unreviewed@ts-expect-error, commented-out code, orgit commit --no-verifyfor application commits. Fix the root cause or escalate per.agents/rules/qa-loop.md. CHANGELOG.mdis generated bynpm run push; do not edit it manually.- Per-agent files (
CLAUDE.md,GEMINI.md,.cursor/rules/*,.clinerules/*,CONVENTIONS.md, etc.) are adapters. If they disagree with this file, AGENTS.md wins and the adapter should be patched.
Task router
Paths are relative to repo root. Load files in the listed order.
| Task surface | Required reads | Required verification |
| Read-only question / audit | Relevant rules or references only; cite inspected files. | No QA command unless files changed. |
| Any repo-changing task | .agents/rules/qa-loop.md; before final response: .agents/workflows/self-review.md. | npm run qa until exit 0, or blocker plan per QA rule. |
| UI / styling / components | .agents/rules/styling.md, responsiveness.md, accessibility.md, performance.md, lazy-loading.md; add i18n.md for user-facing strings. | npm run qa and npm run qa:visual. |
| New page / route | .agents/rules/file-organization.md, performance.md, lazy-loading.md, accessibility.md, responsiveness.md, i18n.md. | npm run qa and npm run qa:visual. |
| Forms / inputs | .agents/rules/forms.md, accessibility.md, i18n.md, clean-code.md. | npm run qa; add visual QA when browser-facing. |
| Data fetching / Supabase / migrations | .agents/rules/supabase.md, security.md, error-handling.md, performance.md. | npm run qa; use DB/type generation commands only when the task needs them. |
| Auth / role gates / admin | .agents/rules/security.md, admin.md, supabase.md, accessibility.md for UI. | npm run qa; add visual QA for browser-facing paths. |
| API routes / server actions | .agents/rules/security.md, supabase.md, error-handling.md, performance.md. | npm run qa. |
| Analytics / tracking | .agents/rules/analytics.md, security.md. | npm run qa; verify events only when instrumentation changed. |
| SEO / metadata / icons / social previews | .agents/rules/seo.md; accessibility.md + visual QA for icon/OG image work. Metadata is assembled only via buildMetadata (src/lib/seo/). | npm run qa; npm run qa:visual for icon/OG image changes. |
| Performance / interaction work | .agents/rules/performance.md, lazy-loading.md, clean-code.md. | npm run qa; inspect build/bundle output when bundle size is relevant. |
| Refactor / cleanup | .agents/rules/clean-code.md, file-organization.md, plus the domain rules for touched files. | npm run qa. |
| Bug fix | Domain rules for the failing surface, then clean-code.md; add error-handling.md for async/catch paths. | Reproduce or characterize when possible, then npm run qa. |
| Tests | .agents/workflows/self-review.md plus domain rules for the code under test. | npm run qa; targeted test command is fine before the full loop. |
| Docs / specs / plans / artifacts | .agents/references/artifact-layers.md; use .docs/templates/spec.md only for specs and .plans/templates/plan.html only for plans. | For docs-only edits run npm run qa; for HTML plans/artifacts, verify with the intended browser/static renderer. |
Do not read spec or plan templates for unrelated code-only tasks.
Rule, reference, workflow, and adapter indexes
When the task router above names files in .agents/rules/, .agents/references/, or .agents/workflows/, the directory's README.md is the canonical index of what lives there. Read the index file when you need to know what is available, then load only the listed file the task requires.
| Index | Use when |
.agents/README.md | Map of the whole .agents/ tree (rules / references / workflows / skills). |
.agents/rules/README.md | Catalog of mandatory domain rules with load-when triggers per file. |
.agents/references/README.md | Catalog of lookup material (artifact taxonomy, key files, components, events). |
.agents/workflows/README.md | Catalog of repeatable procedures (QA loop, self-review, multi-agent handoff). |
.agents/skills/README.md | Inventory of universal agent skills installed via npx skills. |
.claude/README.md | Claude Code slash commands installed in this repo. |
.clinerules/README.md | Cline base rules for this repo. |
.codex/README.md | Codex Cloud sandbox bootstrap and how it ties into the QA loop. |
.cursor/README.md | Cursor MCP config and auto-attaching rule stubs. |
If an index disagrees with this file, AGENTS.md wins and the index should be patched. If the index lists a file that does not exist, fix the index — do not invent the file.
Tool-specific adapters
Per-tool config files are thin adapters that load AGENTS.md, never canonical content. See the per-directory README for the up-to-date list. Quick map:
CLAUDE.md+.claude/— Claude Code (project memory + slash commands).GEMINI.md— Gemini reminder..cursor/— Cursor IDE (MCP config + auto-attach rule stubs)..clinerules/+.clineignore— Cline..aider.conf.yml+CONVENTIONS.md— Aider..codex/setup.sh+.mcp.json— Codex Cloud / shared MCP root config..agents/skills/+skills-lock.json— universal agent skills.
The mcp-sync QA gate (npm run check:mcp-sync) enforces that .mcp.json and .cursor/mcp.json stay byte-identical.
Completion contract
- If no files changed, report the inspected files and the verdict; do not claim QA ran.
- If files changed, check
git status, run the required QA loop, run self-review, and report commands with exit status. - If the QA loop reaches its cap, write the blocker plan required by
.agents/rules/qa-loop.mdand report that path. - Commit messages use Conventional Commits. Push via
npm run pushonly when a remote/upstream exists and a push/release is intended.
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.

