agentleFS
Jailsom-NogueiraJailsom-Nogueira/nextjs-bootstrap-template/AGENTS.md

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,…

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
  1. Distinctive:

    Read this file first. Treat it as a routing index: it tells you what to load next.

    line 5
  2. Distinctive:

    Before completion, run the required QA for any repo-changing task and run the self-review workflow.

    line 17
  3. Distinctive:

    Ask one focused question only when ambiguity changes artifact type, side effects, or user-visible behavior.

    line 19
  4. Very specific:

    Do not bypass gates with any, eslint-disable, .skip(), unreviewed @ts-expect-error, commented-out code, or git commit --no-verify for …

    line 44
  5. Distinctive:

    Do not read spec or plan templates for unrelated code-only tasks.

    line 70
  6. Very specific:

    When the task router above names files in .agents/rules/, .agents/references/, or .agents/workflows/, the directory's README.md is the …

    line 74
  7. Distinctive:

    If an index disagrees with this file, AGENTS.md wins and the index should be patched.

    line 88
  8. Distinctive:

    If no files changed, report the inspected files and the verdict.

    line 106
  9. Distinctive:

    If files changed, check git status, run the required QA loop, run self-review, and report commands with exit status.

    line 107
  10. Very specific:

    If the QA loop reaches its cap, write the blocker plan required by .agents/rules/qa-loop.md and report that path.

    line 108
  11. Very specific:

    Commit messages use Conventional Commits.

    line 109

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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

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

  1. Start here.
  2. 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.
  3. Load the smallest safe union of rule files from the task router below. If a task spans multiple surfaces, load all relevant rules.
  4. Work in the correct artifact layer. For docs/specs/plans/artifacts, read .agents/references/artifact-layers.md before creating, moving, or editing durable artifacts.
  5. 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

LayerPurpose
AGENTS.mdTerse 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.mdLong-form teaching: what / why / how / common mistakes.
README.mdHuman 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 filesThin 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 qa exit 0 is the baseline definition of done.
  • UI/browser-facing changes also require npm run qa:visual exit 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, or git commit --no-verify for application commits. Fix the root cause or escalate per .agents/rules/qa-loop.md.
  • CHANGELOG.md is generated by npm 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 surfaceRequired readsRequired verification
Read-only question / auditRelevant 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 fixDomain 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.

IndexUse when
.agents/README.mdMap of the whole .agents/ tree (rules / references / workflows / skills).
.agents/rules/README.mdCatalog of mandatory domain rules with load-when triggers per file.
.agents/references/README.mdCatalog of lookup material (artifact taxonomy, key files, components, events).
.agents/workflows/README.mdCatalog of repeatable procedures (QA loop, self-review, multi-agent handoff).
.agents/skills/README.mdInventory of universal agent skills installed via npx skills.
.claude/README.mdClaude Code slash commands installed in this repo.
.clinerules/README.mdCline base rules for this repo.
.codex/README.mdCodex Cloud sandbox bootstrap and how it ties into the QA loop.
.cursor/README.mdCursor 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.md and report that path.
  • Commit messages use Conventional Commits. Push via npm run push only when a remote/upstream exists and a push/release is intended.

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.