agentleFS
dawoodshahzad07dawoodshahzad07/context-os/templates/AGENTS.md

context-os / templates

AGENTS.md0 starsChanged 4 months agoMITView on GitHub

Living doc for AI agents. Keep this file under ~200 lines. Detail lives in docs/. Tracking: todo.md · implementation-plan.md · stakeholder-gates.md **[PHASE_NAME]** — [one line: what is in progress]. Last completed: [YYYY-MM-DD] [what shipped]. Out of scope unless the user redirects: [list]. On every task session: How this actually runs (do not assume Docker unless it is locked above): Legacy compose/docs, if any: [ignore / reference only]. Design folders are inspiration only. Ship minimal production UI with locked tokens and…

  • Reads credentials
  • 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 repository3 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, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Read docs/todo.md and docs/implementation-plan.md first.

    line 27
  2. Very specific:

    When deliverables or exit criteria are done, update docs/todo.md and this file's Current phase — do not wait to be asked.

    line 29
  3. Distinctive:

    After a phase is complete, advance to the next phase in the implementation plan.

    line 31
  4. Distinctive:

    Keep route handlers thin: parse HTTP, call services, return schemas.

    line 59
  5. Very specific:

    Do not commit secrets or .env files.

    line 64

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

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

[PRODUCT_NAME] — Agent Context

Living doc for AI agents. Keep this file under ~200 lines. Detail lives in docs/.

Repos

RepoPurpose
[FRONTEND_REPO][e.g. Next.js web portal]
[BACKEND_REPO][e.g. FastAPI REST API]
docs/PRD, TRD, plan, todo, eval

Tracking: todo.md · implementation-plan.md · stakeholder-gates.md

Current phase

[PHASE_NAME] — [one line: what is in progress].

Last completed: [YYYY-MM-DD] [what shipped].

Out of scope unless the user redirects: [list].

Agent workflow (auto)

On every task session:

  1. Read docs/todo.md and docs/implementation-plan.md first.
  2. Work only on the current incomplete phase unless the user explicitly redirects.
  3. When deliverables or exit criteria are done, update docs/todo.md and this file's Current phase — do not wait to be asked.
  4. Mark a phase complete only when its exit criteria are met, not when files are scaffolded.
  5. After a phase is complete, advance to the next phase in the implementation plan.

Locked stack

AreaChoice
Frontend[e.g. Next.js, TypeScript, Tailwind, shadcn/ui, TanStack Query]
Backend[e.g. FastAPI, Python 3.12+]
Database[e.g. PostgreSQL]
ORM / migrations[e.g. SQLModel, Alembic]
Queue[e.g. Redis + Celery]
Auth[e.g. JWT + RBAC, HTTP-only cookies]
Files[e.g. S3 in production]
Deploy API[e.g. native process on host / container]
Deploy web[e.g. Vercel]

Runtime

How this actually runs (do not assume Docker unless it is locked above):

  • API: [command]
  • Worker: [command] — must share [BROKER_URL] with the API
  • Web: [command]

Legacy compose/docs, if any: [ignore / reference only].

Architecture rules

  • Keep route handlers thin: parse HTTP, call services, return schemas.
  • Business rules in services/; queries in repositories/.
  • Enforce RBAC on the API, not only in frontend navigation.
  • Service-layer transactions for money, inventory, and audit-sensitive writes.
  • Critical writes create audit records when the module requires them.
  • Do not commit secrets or .env files.

Auth (locked)

  • Tokens: [HTTP-only cookies / Bearer / …]
  • CORS: explicit origins + credentials; never * with credentials.
  • Production cookies: [SameSite, Secure, Domain].

UI (if this file is at the frontend repo)

Design folders are inspiration only. Ship minimal production UI with locked tokens and the shared component library. Wire real API/state on every page. Do not copy-paste prototype HTML.

TokenValue
Product name[PRODUCT_NAME]
Primary[COLOR]
[other tokens]

Roles stay separate: [list]. Admin-style roles that act across tenants must pick a tenant when the API requires it.

Do not

  • Re-decide the locked stack or auth without an explicit user request
  • Mark a phase done on scaffold alone
  • Collapse distinct RBAC roles
  • Hold a DB transaction across LLM, object storage, or other long IO
  • Trust model-normalized identifiers; normalize in code from raw output
  • Invent entities from messy imports; lock the identity column first
  • Ship static shells without Query/forms/RBAC
  • Silently commit AI-extracted writes; propose → human confirm

Decided

Add dated bullets when a debate ends. Move durable rationale to docs/decisions.md.

  • [YYYY-MM-DD] [decision]

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.