agentleFS
instructkrinstructkr/claw-code/rust/AGENTS.md

claw-code / rust

AGENTS.md195k starsChanged 7 months agoMITView on GitHub

Virtual Cargo workspace (resolver 2, edition 2021) housing 11 crates that compose the claw CLI and supporting services. Dependency direction: rusty-claude-cli → tools/commands/runtime/api/plugins. tools → commands. Workspace lints (all crates opt in via [lints] workspace = true): - unsafe_code = forbid. No exceptions. - clippy all = warn, pedantic = allow. Explicitly allowed: modulenamerepetitions, missingpanicsdoc, missingerrorsdoc. No rustfmt.toml or clippy.toml. Stock defaults only. TUI rule: formatting fns take &mut impl Write, never stdout directly. Never mix raw ANSI escapes with…

We split this AGENTS.md into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No rust-toolchain file, no MSRV.

    line 46
  2. Very specific:

    Don't run cargo fmt --manifest-path rust/Cargo.toml from the repo root.

    line 50
  3. Very specific:

    Don't add unsafe code. The lint is set to forbid, not deny.

    line 51
  4. Very specific:

    Don't create dependencies from commands → tools.

    line 52
  5. Distinctive:

    Don't write TUI output directly to stdout or use raw ANSI escape sequences.

    line 53
  6. Very specific:

    Don't add features to crates other than claw-rag-service without good reason.

    line 54
  7. Very specific:

    All run from rust/:

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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 — rust/ workspace

OVERVIEW

Virtual Cargo workspace (resolver 2, edition 2021) housing 11 crates that compose the claw CLI and supporting services.

STRUCTURE

CrateKindPurpose
rusty-claude-clibin (claw)Main CLI binary. Package name ≠ binary name.
claw-analoglib+binAlternate entry point; depends on api + runtime only.
claw-rag-servicebinRAG service. Only crate with [features] (qdrant-index).
mock-anthropic-servicelib+binMock Anthropic Messages API. Prints MOCK_ANTHROPIC_BASE_URL. Dev-dep for CLI and analog tests.
runtimelibCore: sessions, permissions, MCP, conversation loop. ~47 modules.
apilibProvider clients: Anthropic, OpenAI-compat (xAI, OpenAI, DashScope, Ollama).
toolslib55-tool surface area. Depends on commands (not vice versa).
commandslib120+ slash commands.
pluginslibPlugin manifest and lifecycle.
telemetrylibRequest identity + analytics sinks.
compat-harnesslibExtracts upstream TS claude-code manifest/commands/tools for parity comparison.

Dependency direction: rusty-claude-cli → tools/commands/runtime/api/plugins. tools → commands.

WHERE TO LOOK

  • Parity testing: mock_parity_scenarios.json at workspace root, loaded via CARGO_MANIFEST_DIR/../../mock_parity_scenarios.json. Scripts in scripts/ (run_mock_parity_harness.sh, run_mock_parity_diff.py).
  • CI: .github/workflows/rust-ci.yml (fmt, clippy, test, docs, Windows smoke) and release.yml (v* tag builds for linux-x64/macos-arm64/windows-x64).
  • Committed test fixtures: .clawd-agents/, .omc/, .sandbox-home/ are checked-in harness dotdirs.
  • Docs: PARITY.md, TUI-ENHANCEMENT-PLAN.md, README.md alongside this file.

CONVENTIONS

Workspace lints (all crates opt in via [lints] workspace = true):

  • unsafe_code = forbid. No exceptions.
  • clippy all = warn, pedantic = allow. Explicitly allowed: module_name_repetitions, missing_panics_doc, missing_errors_doc.

No rustfmt.toml or clippy.toml. Stock defaults only.

TUI rule: formatting fns take &mut impl Write, never stdout directly. Never mix raw ANSI escapes with crossterm.

Library crates don't carry the claw- prefix. Binary crates do (except legacy rusty-claude-cli).

Workspace version is 0.1.4, publish = false, MIT license.

No rust-toolchain file, no MSRV. CI pins dtolnay/rust-toolchain@stable.

ANTI-PATTERNS

  • Don't run cargo fmt --manifest-path rust/Cargo.toml from the repo root. Use ../scripts/fmt.sh instead.
  • Don't add unsafe code. The lint is set to forbid, not deny. You can't #[allow] it.
  • Don't create dependencies from commands → tools. The arrow goes tools → commands.
  • Don't write TUI output directly to stdout or use raw ANSI escape sequences.
  • Don't add features to crates other than claw-rag-service without good reason; the workspace is feature-lean by design.

COMMANDS

All run from rust/:

# Format (check only)
../scripts/fmt.sh --check

# Format (apply)
../scripts/fmt.sh

# Lint (strict, matches what you should pass before pushing)
cargo clippy --workspace --all-targets -- -D warnings

# Test
cargo test --workspace

# Build specific binary
cargo build -p rusty-claude-cli
cargo build -p claw-analog
cargo build -p claw-rag-service
cargo build -p mock-anthropic-service

Note: CI clippy runs without -D warnings, so the local check above is stricter than the gate.

Download now (ZIP)

Trending

Quiet since July.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 11 mentionsApr 2026: 45 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the instructkr/claw-code repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about instructkr/claw-code

The biggest 5 of 57 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 57

Talked about on Bluesky, GitHub, the web and Hacker News (57 times).

On Bluesky · 23

18 more on Bluesky

On GitHub · 18

13 more on GitHub

On the web · 13

8 more on the web

On Hacker News · 3

  • Other versions3 projects use a version of this.

    Word for word · 3

    1. ultraworkers/claw-code★ 195k100% same
    2. instructkr/claude-code★ 195k100% same
    3. instructkr/clawd-code★ 195k100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • 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 28,693 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 repository4 other files it gives its agents.

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.