cliagents
AGENTS.md18 starsChanged 7 months agoMITView on GitHub
This file is the stable repo-local policy for coding agents working in cliagents. Keep it short. Do not duplicate transient runtime configuration, MCP server lists, or broad product documentation here.
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 33,398 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.
- CLAUDE.mdCLAUDE.md
- adding-adaptersSkill
- adding-adaptersSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
23 rules. About 0 are common, 15 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 4
Keep it short. Do not duplicate transient runtime configuration, MCP server lists, or broad product documentation here.
- Distinctive: line 8
Use this file for project-specific engineering guidance.
- Very specific: line 9
Start with docs/INDEX.md for canonical architecture, roadmap, reference, and research status.
- Distinctive: line 10
Use CLAUDE.md and the docs folder for architecture notes, API details, and user-facing documentation.
- Very specific: line 11
Use docs/research/CLIAGENTS-OPERATING-MODEL.md as the canonical operator policy for roots, child sessions, rooms, persistence, usage, and …
- Very specific: line 12
Use docs/reference/BRANCH-MANAGEMENT.md before starting or delegating broad work.
- Distinctive: line 13
If guidance belongs to the current machine, shell session, or MCP profile, it does not belong here.
- Very specific: line 17
Use Node 22.12.0 from .nvmrc.
- Very specific: line 18
Run nvm use before interactive work when possible.
- Very specific: line 19
Prefer the package scripts because they already route through scripts/run-with-supported-node.js.
- Distinctive: line 20
If you run a focused Node test directly and native modules fail under the current shell Node, rerun it through the wrapper.
- Distinctive: line 34
Treat the broker root identity and the provider's own resume identity as separate concepts.
- Very specific: line 40
Keep room_busy single-active-turn semantics unless a branch explicitly widens the room concurrency model.
- Distinctive: line 52
Use direct local execution for small or tightly coupled fixes.
- Distinctive: line 53
Use delegated agents when a second perspective or parallel work materially improves the result.
- Distinctive: line 55
Treat reviewer output as advisory until the local code and tests confirm it.
- Distinctive: line 60
Keep fixes small, explicit, and easy to verify.
- Distinctive: line 61
Add or update focused tests when behavior changes.
- Distinctive: line 62
Prefer improving adapter contracts, health checks, and control-plane visibility over one-off provider-specific patches.
- Distinctive: line 66
Keep this file concise.
- Very specific: line 67
Use docs/CANONICAL-MAP.json to decide whether a doc is canonical, active, draft, reference, or archived.
- Distinctive: line 68
Do not paste MCP inventories, personal workstation paths, or temporary operational notes into this file.
- Distinctive: line 69
When a rule becomes adapter-specific or user-facing, move it into the appropriate doc instead of growing this file.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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
cliagents Agent Guide
This file is the stable repo-local policy for coding agents working in cliagents.
Keep it short. Do not duplicate transient runtime configuration, MCP server lists, or broad product documentation here.
Scope
- Use this file for project-specific engineering guidance.
- Start with
docs/INDEX.mdfor canonical architecture, roadmap, reference, and research status. - Use
CLAUDE.mdand the docs folder for architecture notes, API details, and user-facing documentation. - Use
docs/research/CLIAGENTS-OPERATING-MODEL.mdas the canonical operator policy for roots, child sessions, rooms, persistence, usage, and broker routing. - Use
docs/reference/BRANCH-MANAGEMENT.mdbefore starting or delegating broad work. - If guidance belongs to the current machine, shell session, or MCP profile, it does not belong here.
Toolchain
- Use Node
22.12.0from.nvmrc. - Run
nvm usebefore interactive work when possible. - Prefer the package scripts because they already route through
scripts/run-with-supported-node.js. - If you run a focused Node test directly and native modules fail under the current shell Node, rerun it through the wrapper.
Default Commands
- Start server:
npm start - Dev server:
npm run dev - Focused regression suite:
npm test - Runtime consistency suite:
npm run test:runtime - Broad API surface suite:
npm run test:broad - Branch hygiene check:
npm run branch:check
Architecture Defaults
- The canonical active broker surface is
claude-code,gemini-cli,codex-cli,qwen-cli, andopencode-cli. - Treat the broker root identity and the provider's own resume identity as separate concepts.
- Humans should create or explicitly resume top-level roots. Child sessions should be attached beneath a root, not silently turned into new roots.
- Managed roots are the main path for browser supervision. If direct provider sessions are attached later, the binding must stay explicit and consistent.
- Root and child session state should be inspectable from the control plane without depending on raw tmux output alone.
- Rooms are the primary user-facing conversation surface; runs and discussions remain the backing audit surfaces.
discuss_roomdefaults to summary writeback. Curated transcript artifacts are opt-in and must stay distinguishable from the normal room conversation view.- Keep
room_busysingle-active-turn semantics unless a branch explicitly widens the room concurrency model.
Important Surfaces
- Root and tmux lifecycle:
src/tmux/session-manager.js - HTTP orchestration and root binding:
src/server/orchestration-router.js - MCP bridge and root-session tools:
src/mcp/cliagents-mcp-server.js - Orchestration logic and ledgers:
src/orchestration - Browser supervision UI:
public/console.html,public/dashboard.html
Delegation Policy
- Use direct local execution for small or tightly coupled fixes.
- Use delegated agents when a second perspective or parallel work materially improves the result.
- Give delegated workers bounded ownership and verify that their edits actually landed before depending on them.
- Treat reviewer output as advisory until the local code and tests confirm it.
Editing Rules
- The worktree may already be dirty. Do not revert unrelated changes.
- Keep fixes small, explicit, and easy to verify.
- Add or update focused tests when behavior changes.
- Prefer improving adapter contracts, health checks, and control-plane visibility over one-off provider-specific patches.
Documentation Rules
- Keep this file concise.
- Use
docs/CANONICAL-MAP.jsonto decide whether a doc is canonical, active, draft, reference, or archived. - Do not paste MCP inventories, personal workstation paths, or temporary operational notes into this file.
- When a rule becomes adapter-specific or user-facing, move it into the appropriate doc instead of growing this file.
- Runtime and broad suites may skip provider-auth, token-expiry, provider-discontinuation, quota, capacity, or timeout failures when the broker contract itself is still behaving correctly.
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.

