A practical guide and starter kit for building an agent-friendly repository, based on my real workspace myBrainFood.
This repository is not just a template pack. It is a publishable entry point built from a real workspace example.
If you are new to the idea of an agent-friendly repo, do not start from the templates first. Start from the guide, understand how myBrainFood split entry files, structure abstraction, local guides, and source-of-truth boundaries, then come back to the starter kit.
This repository is designed for two kinds of readers:
- people who want to understand how an agent-friendly repo grows from a real workspace
- beginners who want a simple starter kit they can adapt into their own repo
guide/The main walkthrough, written from the perspective of a real workspacetemplates/The starter kit you can copy into your own repo
If you want to understand the design:
- Read
guide/agent-friendly-repo-by-example.mdfor the English guide, orguide/agent-friendly-repo-by-example_zh.mdfor the Chinese guide - Understand why
README.md,AGENTS.md, andARCHITECTURE.mdare separate - Then inspect the files in
templates/
If you want to start building right away:
- Copy
templates/ROOT-README.md,templates/AGENTS.md, andtemplates/ARCHITECTURE.mdinto your own repo - Rename
templates/ROOT-README.mdtoREADME.md - Adapt the placeholder directory names to your own workspace
- Add the optional
docs/README.mdtemplate only when your repo starts needing stable workflow documentation - Add the optional
docs/archive-release-policy.mdtemplate when completed-task history starts interfering with active workspace navigation
- Read
guide/agent-friendly-repo-by-example.mdonce, or useguide/agent-friendly-repo-by-example_zh.mdif you prefer Chinese. - Copy these files into your repository root:
templates/ROOT-README.mdtemplates/AGENTS.mdtemplates/ARCHITECTURE.md - Rename
templates/ROOT-README.mdtoREADME.md. - Replace placeholder directory names such as
[active-dir],[history-dir], and[dir-a]with your real workspace structure. - Keep file responsibilities separate:
README.mdfor overview,AGENTS.mdfor navigation,ARCHITECTURE.mdfor structure and source-of-truth rules. - Add
docs/anddocs/README.mdonly when your repo starts accumulating stable workflows or methods. - Add
docs/archive-release-policy.mdwhen completed-task history should become thin in-repo pointers plus GitHub release snapshots instead of full historical trees. - Add deeper local guides only after the root files are clear.
This repository comes from a simple observation: many repos have useful documents, but their responsibilities blur together. myBrainFood gradually evolved a clearer split between overview, navigation, structure abstraction, and stable workflow guidance.
This publish repo shares that learning in a form that others can actually reuse:
- a real workspace guide that explains why the structure exists
- a starter kit that helps beginners build a simple version of their own
templates/ROOT-README.mdThe overview file for your repo roottemplates/AGENTS.mdThe navigation file for humans and agents entering the repotemplates/ARCHITECTURE.mdThe structure and source-of-truth file for boundary decisionstemplates/docs-README.optional.mdAn optional local guide fordocs/once your repo needs a stable documentation areatemplates/archive-release-policy.optional.mdAn optional archive policy when completed-task history should move to release snapshots instead of staying as full in-repo trees
The minimal starter kit keeps only these root files:
README.mdAGENTS.mdARCHITECTURE.md
Add a docs/ directory only when your repository starts accumulating stable workflows, methods, operating rules, or repository-level guidance that should not stay inside a single task or feature area.
If you do add docs/, also add docs/README.md as a local guide for that directory. Its job is to explain:
- what belongs in
docs/ - what does not belong in
docs/ - how
docs/relates to the root files - where readers should start when
docs/grows
In other words, docs/README.md is not a duplicate of the root README.md. It is a boundary and navigation file for docs/ itself. This repository includes templates/docs-README.optional.md for that upgrade step.
If your repository starts accumulating completed tasks, a full in-repo historical tree may become noisy for agents. In repositories that already rely on git and GitHub for version history, a better pattern is often:
- keep a thin
archive/completed-tasks/index in the main workspace - move the full completed-task history to a Git tag + GitHub release asset
This repository includes templates/archive-release-policy.optional.md for that upgrade step.
MIT