agentleFS
keli-wenkeli-wen/cospan/AGENTS.md

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.

  • In this repository5 other files it gives its agents.

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
  1. Very specific:

    Thin Entrypoints (src/cli.mjs, src/mcp/cospan-mcp.mjs): Keep entry files strictly to argument/RPC dispatch and public re-exports—never …

    line 8
  2. Very specific:

    Hard Anti-Bloat Gates: Every .mjs module must stay <= 600 effective lines (max-lines), functions <= 120 lines (max-lines-per-function), …

    line 12
  3. Very specific:

    Run npm run lint, npm run format:check, and npm test before finishing any change (plus node bin/cospan.mjs install whenever installer/skill …

    line 29

≈ “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.

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

AGENTS.md

CLAUDE.md is a symlink to this file so all coding-agent harnesses share one entry.

Engineering & Modularity Invariants

  1. Pure ESM & Zero Runtime Dependencies: Target Node >=20 using .mjs modules only, node: prefixes for built-ins, and explicit .mjs extensions on relative imports. Never add runtime dependencies; tooling belongs strictly in devDependencies and must not enter package.json "files".
  2. 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.
  3. Module Responsibilities:
    • src/cli-args.mjs (flags/prompts/help), src/job-store.mjs (state & trajectories), src/job-diagnostics.mjs (bounded observe & 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 --help CLI 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).
  4. Hard Anti-Bloat Gates: Every .mjs module must stay <= 600 effective lines (max-lines), functions <= 120 lines (max-lines-per-function), nesting <= 4 (max-depth), cyclomatic complexity <= 20 (complexity), with zero circular imports (import-x/no-cycle).
  5. Contract Stability: Preserve CLI flags, job exit codes (0/2/3/4/5), <= 8 KiB bounded observe JSON, 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 releaseCONTRIBUTING.md
Writing tests, reusing helpers/fakes, or checking verification blind spotstests/README.md
Trimming diff bloat before review or planning architectural cleanupSIMPLIFY.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).

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.