bro
AGENTS.md12 starsChanged 13 days agoApache-2.0View on GitHub
Bro is the agent system: independent specialised agents (a "Bro") each run as a stateless LLM loop with their own system prompt and MCP-tool access. The conceptual model is README.md; this file maps the repository and carries the rules every change follows. Every subsystem carries its own AGENTS.md, titled after what the subsystem is rather than the path it sits at: read the one for each subsystem you touch, and follow its pointers as questions arise rather than reading ahead.…
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 31,439 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 repository9 other files it gives its agents.
- bench/AGENTS.mdAGENTS.md
- benchmark/AGENTS.mdAGENTS.md
- bro/AGENTS.mdAGENTS.md
- browser/AGENTS.mdAGENTS.md
- dev/AGENTS.mdAGENTS.md
- filetypes/AGENTS.mdAGENTS.md
- local/AGENTS.mdAGENTS.md
- oops/AGENTS.mdAGENTS.md
- ride/AGENTS.mdAGENTS.md
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 1 is common, 1 is distinctive, and 3 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Every subsystem carries its own AGENTS.md, titled after what the subsystem is rather than the path it sits at: read the one for each …
- Very specific: line 9
Run any script with --help for flags.
- Very specific: line 14
All published members depend on bro.
- Very specific: line 53
Run the repository's console scripts and its own shell scripts through uv run -q <command> (uv run -q ./format.sh, uv run -q run-tests …
- Common: line 83
Never stage a credential store or a synthesized secret directory.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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.
Files
Bro framework
Bro is the agent system:
independent specialised agents (a "Bro") each run as a stateless LLM loop with their own system prompt and MCP-tool access.
The conceptual model is README.md;
this file maps the repository and carries the rules every change follows.
Every subsystem carries its own AGENTS.md, titled after what the subsystem is rather than the path it sits at:
read the one for each subsystem you touch, and follow its pointers as questions arise rather than reading ahead.
Run any script with --help for flags.
Map
The repository is a uv workspace.
All published members depend on bro;
core imports none of them, and bro-native depends on bro-ride for the managed-session seam.
bro-ride depends on no harness; it loads the selected one through its installed bro.harnesses entry.
| Directory | Distribution | What it is | Map |
bro/, bros/bro/ | bro | the framework core: the persona declaration and what composes and runs one, the declaration vocabulary, file-access seam, and the minimal bro persona with the spells every bro inherits | bro/AGENTS.md |
harnesses/native/harness/ | bro-native | the native engine, its registered harness, and the bro command | harnesses/native/harness/AGENTS.md |
harnesses/native/trails/ | bro-native-trails | the native trail envelope and projection | harnesses/native/trails/AGENTS.md |
dev/ | bro-dev | the bro.dev and bro.workflow packages, poll-pr and pr-state, and the development personas | dev/AGENTS.md |
ride/ | bro-ride | top-level ride and the managed-workspace runtime | ride/AGENTS.md |
harnesses/claude/harness/ | bro-claude | the Claude Code harness, its session hooks and recorder | harnesses/claude/harness/AGENTS.md |
harnesses/claude/trails/ | bro-claude-trails | the Claude transcript envelope, lineage and projection | harnesses/claude/trails/AGENTS.md |
oops/ | bro-oops | consumer-neutral deployment and operations machinery | oops/AGENTS.md |
oops/cdk/ | bro-oops-cdk | the AWS CDK stacks bro-oops deploys, and this repository's CDK app; deliberately not a member, it locks, syncs and tests in an environment of its own | oops/cdk/AGENTS.md |
bench/ | bro-bench | the launcher-side benchmark credentials, registered worker type, and session commands | bench/AGENTS.md |
browser/ | bro-browser | the browser persona and page reader, registered webview worker type, owner and profile-setup commands, image, daemon, and capture process | browser/AGENTS.md |
filetypes/ | bro-filetypes | sandboxed file-type providers, including PDF inspection | filetypes/AGENTS.md |
llms/deepseek/ | bro-deepseek | DeepSeek recipes, peak pricing and credential kind | llms/deepseek/AGENTS.md |
llms/openai/ | bro-openai | OpenAI recipes, pricing and credential kind | llms/openai/AGENTS.md |
llms/anthropic/ | bro-anthropic | Anthropic recipes, pricing, model-family labels and credential kind | llms/anthropic/AGENTS.md |
wires/responses/ | bro-wire-responses | Responses response decoding, usage counts and wire client | wires/responses/AGENTS.md |
wires/messages/ | bro-wire-messages | SDK-free Messages response decoding and usage counts | wires/messages/AGENTS.md |
wires/chat/ | bro-wire-chat | Chat Completions decoding, usage counts and wire client | wires/chat/AGENTS.md |
local/ | bro-local | this checkout's own personas and policy scripts, kept out of every published wheel by riding the root's dev dependency group | local/AGENTS.md |
benchmark/ | bro-benchmark | the Terminal-Bench harness adapter; deliberately not a member, it locks, syncs and tests in an environment of its own | benchmark/AGENTS.md |
The root also carries pyproject.toml (core distribution metadata, the workspace table, and the tool config every member runs under),
conftest.py (test isolation: local/AGENTS.md, "Test gate"),
and README.md (the front page: the framework's features and limits, shown on one example crew, linking into the references).
Reference docs for framework users live in bro/reference/ and ship in the wheel:
extending.md (declaring and registering a bro, adding a data source or a toolset, the entry-point groups), conditions.md and template.md (conditioning in code and in text), ride.md (the runtime), dive_in.md,
llm_providers.md (adopting providers and models), mu.md (structured one-shot calls), and the permission pages (permission_model.md, permissions.md, permissions_cheatsheet.md).
BOOTSTRAP.md is the executable checklist for adopting the framework in another repository.
Development
./setup.sh syncs the workspace and installs the repository hooks;
it leaves the environments of the projects outside the workspace (benchmark/.venv, oops/cdk/.venv) alone, which are synced on demand, by their gate stages or by hand.
Run the repository's console scripts and its own shell scripts through uv run -q <command> (uv run -q ./format.sh, uv run -q run-tests --changed) or .venv/bin/<command>;
-q keeps uv's own sync report out of the command's output.
A session that carries a bro::banner tool runs on a frozen runtime bundle whose PATH publishes these same command names;
activating the checkout's venv over it would shadow them with the code being edited.
The root owns the formatter, lint, and ruff/pytest/pyright/dependency policy for every member, and the test gate for all of them:
./format.sh— format and autofix the whole repositoryrun-tests --changed --base origin/<base>— the pre-push gate, narrowed to what the diff against the pull request's base can reach; the whole gate is the pull request's CI. The stages, the narrowing, and the opt-in and host-only stages:local/AGENTS.md, "Test gate"sync-scripts --project <directory>— regenerate a distribution's[project.scripts]and committed_entrypoints.py, thenuv sync --all-packages --all-groups --all-extrasuv build --package <distribution>— build a member's wheel;benchmark/'s andoops/cdk/'s areuv build --directory <directory>, since neither is a member to name with--package
The development style policy is dev/bro/prompts/dev/style.md and the guide pages beside it, tool-served to dev sessions as dev-style-source::read and as man-source::read topics;
shell scripts follow dev/bro/dev/shell_policy.py (prelude sourcing, shebang), enforced repository-wide by local/bro/local/shell_policy_test.py,
and pass ShellCheck, which reads each file's dialect off its shebang and follows the sourced libraries through the root .shellcheckrc;
the repository's logger is bro.base.log in Python and the prelude's log in shell;
markdown prose follows the semantic line breaks of dev/bro/dev/markdown_policy.py, enforced repository-wide by local/bro/local/markdown_policy_test.py and checked over a reflow by check-markdown;
a test module's sleeps follow dev/bro/dev/sleep_policy.py (a yield, a poll interval in a loudly bounded loop, or a marked subject or bound), enforced repository-wide by local/bro/local/sleep_policy_test.py;
and code outside the credential resolver reads a credential by kind, never through the storage-addressed get_instance family, enforced repository-wide by local/bro/local/credential_policy_test.py.
Plug-in imports and provider-name literals require a direct dependency on the contributing distribution, enforced by local/bro/local/provider_policy_test.py.
Wheel contents are policy too (dev/AGENTS.md, "Wheel contents").
Conventions
Framework code stays consumer-neutral:
what belongs to a consumer
— personas, credentials, task backends, toolsets
— reaches the framework through the entry-point groups (bro/reference/extending.md, "Entry-point groups"), and this checkout's own lives in local/.
Never stage a credential store or a synthesized secret directory.
Backward compatibility is not a design constraint:
the framework is in early beta with no external consumers to protect, so when the right design breaks an interface, moves a mechanism between distributions, or deletes a half-finished idea, that is the change to make
— "nothing existing changes" is no merit of a proposal;
the merit is the structure left behind.
A commit subject names its area, then states the change in the imperative, lowercase and without a trailing period: trails: score the retirement soak by coverage.
The area is the subsystem the change lands in
— a distribution or package directory (ride:, trails:, bro/launch: for a subpackage), the console script or spell it changes (dive-in:, run-pr:), docs: for a documentation-only change, repo: for a repository-wide one.
A body, in prose, carries what the subject cannot: the why, and the shape of the fix where it is not obvious from the diff.
A Task: line linking the task closes the message when the work has one;
what follows it is the hooks' own.
The token-accounting footer and the Co-Authored-By trailer are the hooks' (dev/AGENTS.md, "Commit metadata");
never hand-write or strip either.
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
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.

