cloclo
AGENTS.md114 starsChanged 8 months agoMITView on GitHub
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 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 repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- browseSkill
- chatgpt-searchSkill
- commitSkill
- debugSkill
- docxSkill
- file-readingSkill
- frontend-designSkill
- pdf-readingSkill
- pdfSkill
- pptxSkill
- product-self-knowledgeSkill
- review-prSkill
- simplifySkill
- skill-creatorSkill
- xlsxSkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Keep core agent logic provider-agnostic.
- Distinctive: line 18
When adding a provider, implement the full provider contract: detection, auth/base URL resolution, model transform, client creation, and …
- Very specific: line 20
Keep deferred tools marked as deferred.
- Distinctive: line 33
Add tests before changing behavior.
- Distinctive: line 38
If you change NDJSON, deferred tools, provider detection, permissions, skills/hooks, or CLAUDE.md loading, update or add targeted tests.
- Distinctive: line 41
Read files before editing.
- Distinctive: line 42
Avoid introducing native dependencies or unnecessary package dependencies.
- Distinctive: line 43
Do not break macOS-oriented auth/keychain flows.
- Distinctive: line 46
Keep user-facing errors concise and consistent with existing CLI messaging.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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
cloclo — Project Conventions
Project
cloclo is an open-source Claude Code alternative: a multi-provider AI coding agent CLI. The shipped runtime is claude-native.mjs, a bundled single-file Node.js CLI with zero native dependencies. The editable source lives in src/. Supporting parity/reference implementations exist in claude-native.py, claude-native.go, and rust-sdk/.
Architecture
- CRITICAL:
claude-native.mjsis a build output. Do not edit it directly for normal feature or bug work. Make source changes insrc/, then rebuildclaude-native.mjswithnode build.mjs. - Main source modules live in
src/(utils.mjs,config.mjs,providers.mjs,auth.mjs,security-rules.mjs,security.mjs,browser.mjs,tools.mjs,lsp.mjs,auto-memory.mjs,audit.mjs,teams.mjs,sandbox.mjs,context-refs.mjs,smart-routing.mjs,cron.mjs,engine.mjs,session.mjs,index.mjs). Start there before touching bundled output. - Keep core agent logic provider-agnostic. Provider differences belong in the
PROVIDERScontract and client conversion layers, not inAgentLoop. - Built-in tools are registered through
ToolRegistry; some tools are eager, others deferred and surfaced viaToolSearch. - Extensibility features are built into the main CLI:
CLAUDE.mdloading,.claude/settings*.json, rules, skills, hooks, memory, sessions, and MCP integration. ink-ui.mjscontains the Ink terminal UI; avoid coupling UI-only behavior into non-interactive/NDJSON paths.claude-tool-loop.jsis the NDJSON bridge/runtime wrapper; keep bridge-specific behavior there rather than in provider code.gstack/is a separate subtree with its own docs/conventions; do not assume its patterns apply to the root CLI unless files explicitly integrate.
Key Patterns
- Preserve the single-file distribution model for the main CLI unless a change explicitly requires otherwise.
- When adding a provider, implement the full provider contract: detection, auth/base URL resolution, model transform, client creation, and capabilities.
- Respect instruction-placement differences by provider (
system-blocks,system-message,developer-message,instructions-field). - Keep deferred tools marked as deferred; register
ToolSearchwhen deferred tools exist. - Maintain backward-compatible CLI behavior and help text for user-facing flags where possible.
Build / Run
node build.mjs— rebuildclaude-native.mjsfromsrc/node claude-native.mjs— interactive REPLnode claude-native.mjs -p "explain this code"— one-shot modenpm testornode test-suite.mjs— main test suitenpm run test:ink— Ink smoke testnpm run test:e2e— deferred-tools E2E testnpx cloclo— package entrypoint behavior
Testing Conventions
- Add tests before changing behavior; do not ship untested changes.
- Primary tests live in
test-suite.mjs; this file mixes extraction-based unit tests with spawned-process E2E checks. - Unit tests often validate the bundled output in
claude-native.mjs, so source edits insrc/usually need a rebuild before those tests reflect the change. - E2E tests spawn
node claude-native.mjs; keep CLI I/O and exit codes deterministic. - API-backed E2E in
test-suite.mjs --e2erequire credentials; keep non-E2E tests runnable without API keys. - If you change NDJSON, deferred tools, provider detection, permissions, skills/hooks, or CLAUDE.md loading, update or add targeted tests.
Important Constraints
- Read files before editing; do not make assumptions about uninspected code.
- Avoid introducing native dependencies or unnecessary package dependencies.
- Do not break macOS-oriented auth/keychain flows; current conventions assume macOS for OAuth helpers.
- Preserve support for multiple invocation styles: REPL, one-shot, NDJSON bridge, packaged binary entrypoint.
- Be careful with security-sensitive areas: Bash/tool permissions, hooks, file editing, auth handling, MCP tool registration.
- Keep user-facing errors concise and consistent with existing CLI messaging.
- Ignore generated/runtime state such as
.claude-native/,node_modules/,target/, and packaged artifacts unless the task is specifically about them.
AICL — Agent Interlingua
Cloclo is a multi-agent runtime. Agents communicate using AICL (Agent Interlingua for Cooperative Labor). AICL is agent-to-agent only — never expose it to humans. Full protocol below:
@./AICL_ONBOARDING.md
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.

