Bullet-proof repository

Bullet-proof repository

// Bullet-proof repository · 03

The structure of an agent-ready repository

The files that let a coding agent work in a repository, what each one is for, and how they change with the agent you use and the number of repositories.

// Anatomy of an agent-ready workspace

[ Pick your agent, then open a file ]

Agent
Repositories
  • agent files
  • checks: people, agents and CI
  • there before the agents
  • changes with the agent you pick
  • only because of several repositories
  • read-only or personal

<app>/one git repository

<app>/AGENTS.md

Sample only, shortened for brevity

# Orders

The app customers use to place and track orders. Docs index: docs/README.md.

## Commands
- pnpm dev: runs the app at http://localhost:3000
- ./scripts/check.sh: all the checks. Run it before you say a change is done.

## Rules that always hold
1. The frontend calls the backend, never the database (AR-03).
2. An API change starts in openapi.yaml, then the code (AR-07).
3. No personal data in a log (AR-11).
4. Write the test first, then the code.

## Stop and ask
- Before a change to stored data, a new dependency, or an agent file.

## Never
- Read .env.local or another secret file.
- Push to main. Mark a pull request ready, approve it or merge it.
Loaded
At the start of every session
Edited by
A person. The agent has to ask first.
In other tools
Copilot, Cursor and Codex read it as it is. Claude Code reads it through the import in CLAUDE.md.

The repository, skill and file names are examples. Name yours after your own product and workflow.