TGViewer
TechLead Bits TechLead Bits @techleadbits · 516 subscribers
Post #248 270
AI-Ready Repos: AGENTS.md

Structuring project documentation helps build a good knowledge base, but it's not enough to work effectively with the codebase. In practice, agents also need extra instruction files: AGENTS.md and SKILLS.md. Let's start with AGENTS.md: what it is for and how to cook it properly.

AGENTS.md is a markdown file that provides context, instructions, and guidelines for AI coding agents working with the repo.

Its content is added to the initial prompt (system context) when LLM session is created. What matters that this is a standard that widely adopted by different agents such as Cursor, Codex, Claude Code and many others.

Common structure:
🔸 Project overview: project description, tech stack with particular versions, key folders and dependencies.
🔸 Commands: list of build and test commands with required flags and options.
🔸 Code Style: describe preferred code style.
🔸 Testing: commands to run different types of tests and linters.
🔸 Boundaries: do's and don'ts (e.g., never touch secrets, env configs).
🔸 Extra: PR guidelines, git workflow details, deployment instructions, etc.

Common recommendations:
🔸 Keep it short (~150 lines)
🔸 Continuously update it with code changes
🔸 Be specific, prefer samples over description
🔸 Improve it iteratively by adding what really works and removing what doesn't
🔸 Use nested AGENTS.md files in large codebases. The agent reads the closest file to the work it is doing.

Sample:
# Tech Stack
- Language: Go 1.24+
- API: gRPC
- Database: PostgreSQL 18
- Message Queue: RabbitMQ 4.2, Apache Kafka 4.1.x
- Observability: OpenTelemetry, Jaeger, Prometheus, Grafana
- Security: JWT, OAuth2, TLS
- Deployment: Docker, Kubernetes, Helm

# Build & Test Commands
- Build: `go build -o myapp`
- Test `go test`

# Boundaries
- Never touch `/charts/secrets/` files.
- Avoid adding unnecessary dependencies.

# PR Submission

## Title Format (MANDATORY)
Issue No: User-facing description


Samples from opensource projects:
- RabbitMQ Cluster Operator
- Kubebuilder
- Airflow
- Headlamp

Additionally I recommend reading How to write a great agents.md: Lessons from over 2,500 repositories from Github blog. I didn't get how they measured the effectiveness of analyzed instructions, but anyway the overall recommendations can be helpful.

#ai #agents #engineering #documentation
agents.md AGENTS.md is a simple, open format for guiding coding agents. Think of it as a README for agents.
  • 🔥 2
  • 👍 1
More from @techleadbits
  1. Oct 1, 2026Tracer Bullets Continuing the topic from the previous post, let's talk in more detail abou…
  2. Sep 28, 2026Why Software Factories Fail "Read the Code!" is one of the key ideas from Dex Horthy's tal…
  3. Sep 21, 2026Illustrations from The Culture Map showing how different cultures compare on the scales. #…
  4. Sep 21, 2026The Culture Map Have you ever worked in international distributed teams? Or collaborated w…
  5. Sep 10, 2026Loop Engineering from First Principles Continuing the topic of Loop Engineering, I'd like…
  6. Sep 7, 2026Loop Engineering Over the past year, AI has been constantly bringing new terms and practic…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →