agentleFS
AnthonyDelaCruzAnthonyDelaCruz/agent-setup/AGENTS.md

agent-setup

AGENTS.md0 starsChanged 6 days agoMITView on GitHub

Machine-level defaults that apply across all workspaces and models. Project-level AGENTS.md files override these guidelines.

  • 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 repository4 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

13 rules. About 1 is common, 11 are distinctive, and 1 is very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

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

    Clarify ambiguity: When multiple interpretations exist, present them briefly with trade-offs and ask before proceeding.

    line 9
  2. Distinctive:

    Minimum code to solve the problem: No speculative features, single-use abstractions, or unrequested configurability.

    line 13
  3. Distinctive:

    Avoid over-engineering: Don't add defensive code for impossible cases.

    line 14
  4. Distinctive:

    Touch only what you must: Every changed line should trace directly to the user's request.

    line 17
  5. Distinctive:

    Match existing conventions: Follow the codebase's established style rather than introducing new patterns.

    line 18
  6. Distinctive:

    Clean up after yourself: Remove unused imports, variables, or functions orphaned by *your* edits.

    line 19
  7. Distinctive:

    Verify before finishing: Run relevant tests, linter, formatter, or typecheck and report what actually ran and passed.

    line 24
  8. Distinctive:

    Explain trade-offs and risks: Call out meaningful trade-offs, breaking changes, performance concerns, or security implications.

    line 28
  9. Distinctive:

    No guessing: Verify claims against files, tool output, or documentation.

    line 29
  10. Distinctive:

    Stop and ask first: before:

    line 34
  11. Distinctive:

    Use atomic commits (one logical change per commit).

    line 42
  12. Very specific:

    Prefer conventional commit prefixes (feat:, fix:, refactor:, docs:, test:, chore:) with a concise subject and a body explaining "why" when …

    line 43
  13. Common:

    Never commit, hardcode, or log secrets, API keys, tokens, credentials, or PII.

    line 46

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

Global Agent Defaults (AGENTS.md)

Machine-level defaults that apply across all workspaces and models. Project-level AGENTS.md files override these guidelines.

Core Principles (Karpathy Guidelines)

1. Think Before Coding

  • Surface assumptions: State assumptions explicitly before implementing. Never pick an interpretation silently or hide confusion.
  • Clarify ambiguity: When multiple interpretations exist, present them briefly with trade-offs and ask before proceeding.
  • Read first, push back when warranted: Inspect relevant files and existing patterns before writing code. If a simpler approach exists, suggest it.

2. Simplicity First

  • Minimum code to solve the problem: No speculative features, single-use abstractions, or unrequested configurability.
  • Avoid over-engineering: Don't add defensive code for impossible cases. If a solution feels bloated, rewrite it simpler before presenting.

3. Surgical Changes

  • Touch only what you must: Every changed line should trace directly to the user's request. Leave unrelated code, formatting, and comments untouched.
  • Match existing conventions: Follow the codebase's established style rather than introducing new patterns.
  • Clean up after yourself: Remove unused imports, variables, or functions orphaned by your edits. Mention pre-existing dead code instead of deleting it unasked.

4. Goal-Driven Execution

  • Define verifiable criteria: Convert requests into concrete checks and iterate until they pass (e.g., for bugs: inspect actual error/stack trace, write a reproducing test, then make it pass).
  • Plan multi-step work: For non-trivial tasks, state a brief step-by-step plan with explicit verification for each step.
  • Verify before finishing: Run relevant tests, linter, formatter, or typecheck and report what actually ran and passed.

Communication

  • Direct and concise: Skip filler and excessive apologies. Get straight to the solution.
  • Explain trade-offs and risks: Call out meaningful trade-offs, breaking changes, performance concerns, or security implications.
  • No guessing: Verify claims against files, tool output, or documentation. If unsure, say so explicitly instead of fabricating.
  • Minimal code comments: Let clear code speak for itself; only comment non-obvious intent or invariants.

Autonomy & Guardrails

  • Proceed autonomously on small, reversible decisions (local naming, test structure, minor refactors within scope).
  • Stop and ask first before:
    • Deleting files or removing data.
    • Adding new dependencies or changing build/CI/CD configs.
    • Modifying database schemas or migrations.
    • Pushing directly to main/master, force-pushing, or amending pushed commits.
    • Making architectural changes with broad blast radius.

Git Hygiene

  • Use atomic commits (one logical change per commit).
  • Prefer conventional commit prefixes (feat:, fix:, refactor:, docs:, test:, chore:) with a concise subject and a body explaining "why" when non-obvious.

Security

  • Never commit, hardcode, or log secrets, API keys, tokens, credentials, or PII.
  • Validate and sanitize untrusted inputs; use parameterized queries instead of string concatenation.
  • Apply the principle of least privilege and avoid exposing internal stack traces to end users.

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.