agentleFS
suyashb734suyashb734/cliagents/AGENTS.md

cliagents

AGENTS.md19 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.

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
  1. Distinctive:

    Keep it short. Do not duplicate transient runtime configuration, MCP server lists, or broad product documentation here.

    line 4
  2. Distinctive:

    Use this file for project-specific engineering guidance.

    line 8
  3. Very specific:

    Start with docs/INDEX.md for canonical architecture, roadmap, reference, and research status.

    line 9
  4. Distinctive:

    Use CLAUDE.md and the docs folder for architecture notes, API details, and user-facing documentation.

    line 10
  5. Very specific:

    Use docs/research/CLIAGENTS-OPERATING-MODEL.md as the canonical operator policy for roots, child sessions, rooms, persistence, usage, and …

    line 11
  6. Very specific:

    Use docs/reference/BRANCH-MANAGEMENT.md before starting or delegating broad work.

    line 12
  7. Distinctive:

    If guidance belongs to the current machine, shell session, or MCP profile, it does not belong here.

    line 13
  8. Very specific:

    Use Node 22.12.0 from .nvmrc.

    line 17
  9. Very specific:

    Run nvm use before interactive work when possible.

    line 18
  10. Very specific:

    Prefer the package scripts because they already route through scripts/run-with-supported-node.js.

    line 19
  11. Distinctive:

    If you run a focused Node test directly and native modules fail under the current shell Node, rerun it through the wrapper.

    line 20
  12. Distinctive:

    Treat the broker root identity and the provider's own resume identity as separate concepts.

    line 34
  13. Very specific:

    Keep room_busy single-active-turn semantics unless a branch explicitly widens the room concurrency model.

    line 40
  14. Distinctive:

    Use direct local execution for small or tightly coupled fixes.

    line 52
  15. Distinctive:

    Use delegated agents when a second perspective or parallel work materially improves the result.

    line 53
  16. Distinctive:

    Treat reviewer output as advisory until the local code and tests confirm it.

    line 55
  17. Distinctive:

    Keep fixes small, explicit, and easy to verify.

    line 60
  18. Distinctive:

    Add or update focused tests when behavior changes.

    line 61
  19. Distinctive:

    Prefer improving adapter contracts, health checks, and control-plane visibility over one-off provider-specific patches.

    line 62
  20. Distinctive:

    Keep this file concise.

    line 66
  21. Very specific:

    Use docs/CANONICAL-MAP.json to decide whether a doc is canonical, active, draft, reference, or archived.

    line 67
  22. Distinctive:

    Do not paste MCP inventories, personal workstation paths, or temporary operational notes into this file.

    line 68
  23. Distinctive:

    When a rule becomes adapter-specific or user-facing, move it into the appropriate doc instead of growing this file.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.md for canonical architecture, roadmap, reference, and research status.
  • Use CLAUDE.md and the docs folder for architecture notes, API details, and user-facing documentation.
  • Use docs/research/CLIAGENTS-OPERATING-MODEL.md as the canonical operator policy for roots, child sessions, rooms, persistence, usage, and broker routing.
  • Use docs/reference/BRANCH-MANAGEMENT.md before 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.0 from .nvmrc.
  • Run nvm use before 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, and opencode-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_room defaults to summary writeback. Curated transcript artifacts are opt-in and must stay distinguishable from the normal room conversation view.
  • Keep room_busy single-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.json to 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.