shunt / src
AGENTS.md267 starsChanged 25 days agoApache-2.0View on GitHub
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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- wiki/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- wiki/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- wiki/llms-full.txtllms.txt
- wiki/llms.txtllms.txt
- run-claude-gateway-refSkill
- run-shuntSkill
- verifySkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 6
Run from repository root: cargo run -- run
- Distinctive: line 29
Keep files focused and preferably under 500 lines.
- Distinctive: line 31
Keep protocol-specific behavior inside adapters and model translation modules.
- Distinctive: line 32
Use typed config and explicit enums for externally visible modes.
- Very specific: line 37
Keep implementation PRs aligned with docs under docs/ when behavior changes.
≈ “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
src Agent Instructions
Build & Run Commands
- Build from repository root:
cargo build - Run from repository root:
cargo run -- run - Validate config from repository root:
cargo run -- check
Testing
- Full suite from repository root:
cargo test --all-features --workspace - Source-focused checks:
cargo clippy --all-targets --all-features -- -D warnings - Format check:
cargo fmt --all --check
Project Structure
main.rs: CLI entry point and process lifecycle.shutdown.rs: graceful-shutdown signal handling (SIGTERM/ctrl-c drain, force-exit escape hatch).server.rs: Axum router and shared state.proxy.rs: request buffering, route resolution, adapter dispatch.config.rs: configuration schema, defaults, loading, validation.routing.rs: model-to-provider route selection.adapters/: provider protocol boundaries.model/: Anthropic Messages ↔ OpenAI Responses translation.auth/: credential lookup and token refresh.
Code Style
- Keep files focused and preferably under 500 lines.
- Preserve streaming behavior for upstream responses.
- Keep protocol-specific behavior inside adapters and model translation modules.
- Use typed config and explicit enums for externally visible modes.
Git Workflow
- Pair code behavior changes with tests.
- Keep implementation PRs aligned with docs under
docs/when behavior changes. - Use conventional commits.
Boundaries
- ✅ Add focused unit tests near changed modules.
- ✅ Preserve Anthropic error envelope for gateway-owned errors.
- ⚠️ Ask before changing credential refresh/writeback semantics.
- ⚠️ Ask before changing public config keys.
- 🚫 Never remove streaming tests or weaken protocol assertions.
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.

