cospan
AGENTS.md85 starsChanged 17 days agoMITView on GitHub
CLAUDE.md is a symlink to this file so all coding-agent harnesses share one entry. Load only the guide for the phase you are in: Run npm run lint, npm run format:check, and npm test before finishing any change (plus node bin/cospan.mjs install whenever installer/skill templates or src/mcp/ change, and npm run sync:ui whenever src/ui/ or dsh/client-bridge.js changes).
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 35,196 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.
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- could be automatic: a setting could enforce it
- Very specific: line 8
Thin Entrypoints (
src/cli.mjs,src/mcp/cospan-mcp.mjs): Keep entry files strictly to argument/RPC dispatch and public re-exports—never … - Very specific: line 12
Hard Anti-Bloat Gates: Every .mjs module must stay <= 600 effective lines (max-lines), functions <= 120 lines (max-lines-per-function), …
- Very specific: line 29
Run npm run lint, npm run format:check, and npm test before finishing any change (plus node bin/cospan.mjs install whenever installer/skill …
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
AGENTS.md
CLAUDE.mdis a symlink to this file so all coding-agent harnesses share one entry.
Engineering & Modularity Invariants
- Pure ESM & Zero Runtime Dependencies: Target Node
>=20using.mjsmodules only,node:prefixes for built-ins, and explicit.mjsextensions on relative imports. Never add runtimedependencies; tooling belongs strictly indevDependenciesand must not enterpackage.json"files". - Thin Entrypoints (
src/cli.mjs,src/mcp/cospan-mcp.mjs): Keep entry files strictly to argument/RPC dispatch and public re-exports—never accumulate state persistence, worker execution, diagnostics, or subcommand bodies inside a single file. - Module Responsibilities:
src/cli-args.mjs(flags/prompts/help),src/job-store.mjs(state & trajectories),src/job-diagnostics.mjs(boundedobserve& recovery),src/job-worker.mjs(detached launch &_worker),src/commands/{dispatch,lifecycle,admin}.mjs(CLI subcommands).src/config.mjs&src/targets.mjs(layered config & binary discovery),src/contract-check.mjs(zero-token--helpCLI contract verification),src/process-tree.mjs&src/stream-worker.mjs(descendant PID tracking & NDJSON streaming),src/installer-templates.mjs&src/installer.mjs(host bundles),src/drivers/{agy,codex,claude,dsh}.mjs(target harnesses),src/mcp/{cospan-mcp,tools}.mjs(stdio MCP),src/sidebar-state.mjs,src/sidecar/*,src/ui/*,dsh/*(host sidebars).
- Hard Anti-Bloat Gates: Every
.mjsmodule must stay<= 600effective lines (max-lines), functions<= 120lines (max-lines-per-function), nesting<= 4(max-depth), cyclomatic complexity<= 20(complexity), with zero circular imports (import-x/no-cycle). - Contract Stability: Preserve CLI flags, job exit codes (
0/2/3/4/5),<= 8 KiBboundedobserveJSON, out-of-tree~/.cospan/trajectories/storage, public exports (durationToMs,repoRoot,workspaceStateDir,parseCliArgs,JOB_EXIT_CODES,main), and stdio MCP behavior.
Scenario Routing
Load only the guide for the phase you are in:
| When you are… | Read |
| Setting up, running change-surface checks, labeling, or cutting a release | CONTRIBUTING.md |
| Writing tests, reusing helpers/fakes, or checking verification blind spots | tests/README.md |
| Trimming diff bloat before review or planning architectural cleanup | SIMPLIFY.md |
| Reviewing a PR (risk depth, core lenses, findings & convergence) | REVIEW.md |
| Filing an issue or writing a human-first PR description | .github/ISSUE_TEMPLATE/ & .github/PULL_REQUEST_TEMPLATE.md |
Base Verification Gate
Run npm run lint, npm run format:check, and npm test before finishing any change (plus node bin/cospan.mjs install whenever installer/skill templates or src/mcp/ change, and npm run sync:ui whenever src/ui/ or dsh/client-bridge.js changes).
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.

