agentleFS
jimy-rjimy-r/agent-workspace-architecture/AGENTS.md

agent-workspace-architecture

AGENTS.md16 starsChanged 29 days agoMITView on GitHub

Instructions for any coding agent working in this repository, in the agents.md format. Runtime-neutral by design. Claude Code reads CLAUDE.md as well, and the two carry the same rules. Humans should start at README.md, contributors at CONTRIBUTING.md. A curated reference for agent workspaces: the roles, routines, hooks, memory, and task coordination that make working knowledge legible to an agent. It is documentation plus sample scaffolding, not a runnable product. Nothing here executes on its own, and no package is published…

  • 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

4 rules. About 1 is common, 2 are distinctive, and 1 is very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Read in this order when you are asked to explain or extend the repo.

    line 18
  2. Common:

    Every commit must be safe for a public audience.

    line 38
  3. Distinctive:

    When in doubt, generalise.

    line 52
  4. Very specific:

    Always branch: Never commit to main. Branch protection blocks force-pushes and deletions, and requires the redaction check on pull requests.

    line 80

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

AGENTS.md

Instructions for any coding agent working in this repository, in the agents.md format. Runtime-neutral by design. Claude Code reads CLAUDE.md as well, and the two carry the same rules. Humans should start at README.md, contributors at CONTRIBUTING.md.

What this repository is

A curated reference for agent workspaces: the roles, routines, hooks, memory, and task coordination that make working knowledge legible to an agent. It is documentation plus sample scaffolding, not a runnable product. Nothing here executes on its own, and no package is published from it.

Reading order

Read in this order when you are asked to explain or extend the repo.

  1. PATTERNS.md. The eighteen load-bearing decisions, each as problem, pattern, why it beats the obvious alternative, and what it costs. This is the repo's core asset. Almost every question resolves here.
  2. META_ARCHITECTURE.md. The structural map of layers, modules, personas, routines, hooks, MCP servers, memory and the task layer.
  3. WORKFLOW.md. How work moves through the workspace, session to session.
  4. samples/. The scaffold library to fork: roles, skills, subagents, scheduled tasks, hooks, and Python helpers.
  5. learn/ and teardowns/. The guided track over the patterns, and published architectures read against them.

Feeding the repo to a model instead of browsing it? docs/llms.txt is the link map and docs/llms-full.txt inlines the core documents in one fetch.

Hard rule: redaction

Every commit must be safe for a public audience. Before staging anything, scrub each changed file for personal identifiers, business or customer specifics, credentials of any kind (never, not even as placeholders), health, financial or legal data, and absolute paths that reveal a machine layout. Use the generic placeholders the repo already uses: <workspace>, <home>, <project>, "the user".

The automated gate runs in CI, not locally. redaction-check.yml calls the scanner published as jimy-r/redaction-check-action, and that is the check branch protection requires on every pull request. No copy of the scanner ships in this repo, so the pre-commit step is the manual scrub above.

When in doubt, generalise. A leak survives amendment because the push already happened.

Checks to run before you commit

python scripts/validate_samples.py         # sample frontmatter, links, schemas
python scripts/gen_llms_full.py --check    # llms-full.txt matches its sources
python scripts/gen_pattern_pages.py --check # docs/patterns/ matches PATTERNS.md
python scripts/check_freshness.py          # dated stamps, teardown re-check dates
python scripts/teardown_matrix.py --check  # matrix, Published table, llms.txt, PATTERNS lines
python tools/workspace_check.py --self-test
# redaction runs in CI (redaction-check.yml); there is no local script

Regenerate rather than hand-edit: python scripts/gen_llms_full.py rewrites docs/llms-full.txt, python scripts/gen_pattern_pages.py rewrites the pages under docs/patterns/, python scripts/teardown_matrix.py rewrites the marked blocks in teardowns/README.md, the teardown lines in docs/llms.txt and the "Seen in" line under each pattern in PATTERNS.md, and two marked blocks in README.md, and python scripts/check_freshness.py --fix rewrites the dated stamps. CI runs these same commands, so a green local run is the gate for all of them. Two of the checks have no local repair. Redaction has no script here and runs only in CI, and a teardown past its Re-check by date needs the subject re-read, or the page marked ageing or superseded.

Conventions

  • Always branch. Never commit to main. Branch protection blocks force-pushes and deletions, and requires the redaction check on pull requests.
  • One focused change per pull request.
  • Conventional Commits: feat:, fix:, docs:, refactor:, chore:.
  • Include a Co-Authored-By: trailer on agent-assisted commits.
  • Markdown is the source of truth. The Pages site under docs/ is a view over the markdown, never the other way round.
  • Prose follows STYLE_GUIDE.md. Anything under teardowns/ gets the full editing pass before commit, because those pages analyse someone else's published work.
  • Roles stay pure. Method lives in a role file, entity facts live in a CONTEXT.md, and a thin binding composes them. Schema in samples/roles/_template.md.
  • Numeric claims are derived, not typed. Pattern and role counts are gated in CI against PATTERNS.md and samples/roles/. Changing one means changing the source, not the prose.

Scope boundaries

Some files want issue agreement before a pull request arrives. The list is in the Scope boundaries section of CONTRIBUTING.md. Everything else is open to direct pull requests. The repo is a curated solo reference, so a good change can still be declined for pulling the doc off its shape.

Where to ask

Questions and comparisons go to Discussions. Corrections and concrete proposals go to Issues. Suspected privacy leaks follow SECURITY.md.

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.