agentleFS
instructkrinstructkr/claw-code/AGENTS.md

claw-code

AGENTS.md195k starsChanged 7 months agoMITView on GitHub

Generated: 2026-08-16 Commit: b71afdd Branch: main (Refs = rg count across rust/crates; rust-analyzer references timed out during mapping.)

  • Reads credentials
  • Installs packages

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

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

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

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

    NEVER cargo install claw-code — crates.io stub is deprecated and installs claw-code-deprecated.exe.

    line 63

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

PROJECT KNOWLEDGE BASE

Generated: 2026-08-16 Commit: b71afdd Branch: main

OVERVIEW

Claw Code: public Rust implementation of the claw CLI agent harness (Claude-Code-style). Canonical code lives in rust/; the repo is an agent-managed exhibit (harnesses plan/execute/verify per README), not a hand-operated product. src/ is a companion Python porting/parity workspace, not production code.

STRUCTURE

claw-code/
├── rust/      # canonical Cargo workspace: 11 crates, `claw` binary
├── src/       # Python porting workspace + reference_data/ parity snapshots
├── tests/     # Python unittest validation of src/ + scripts/ (stdlib unittest)
├── docs/      # g0XX gate verification maps + topic docs
├── scripts/   # fmt.sh, dogfood-build.sh, roadmap/board helpers
├── assets/    # README images only
└── install.sh, Containerfile, docker-compose.yml

WHERE TO LOOK

TaskLocationNotes
CLI subcommandsrust/crates/rusty-claude-cli/src/main.rshand-rolled parser; CliAction enum ~L1162; dispatch in run() L995-1158
Sessions/permissions/MCPrust/crates/runtime/src/47 flat modules
Provider clientsrust/crates/api/src/providers/anthropic.rs + openai_compat.rs
Tool definitionsrust/crates/tools/src/lib.rs55-tool spec table L484-1348
Slash commandsrust/crates/commands/src/lib.rs120+ spec table L60-1047
Plugins/hooksrust/crates/plugins/src/manifest = .claude-plugin/plugin.json
Lean agent harnessrust/crates/claw-analog/src/lib.rslib+bin; tool loop over api+runtime
RAG HTTP servicerust/crates/claw-rag-service/src/axum; SQLite + optional Qdrant
Test mock serverrust/crates/mock-anthropic-service/SCENARIO_PREFIX scripted responses
Python porting CLIsrc/main.pyargparse: manifest, parity-audit, graphs
Parity reference DBsrc/reference_data/subsystems/29 JSON snapshots of TS archive

CODE MAP

SymbolTypeLocationRefsRole
Sessionstructruntime/src/session.rs:117229session persistence/lifecycle
ConfigLoaderstructruntime/src/config.rs:40983config schema/load
PluginManagerstructplugins/src/lib.rs48plugin install/registry
PermissionEnforcerstructruntime/src/permission_enforcer.rs:2735pre-dispatch permission gate
ConversationRuntimestructruntime/src/conversation.rs:13032conversation loop driver
McpServerManagerstructruntime/src/mcp_stdio.rs:48830MCP JSON-RPC processes
HookRunnerstructruntime/src/hooks.rs:15525shell hook execution
CliActionenumrusty-claude-cli/src/main.rs:1162—25 subcommand variants
mvp_tool_specsfntools/src/lib.rs:484—static 55-tool table
SLASH_COMMAND_SPECSconstcommands/src/lib.rs:60—120+ slash commands

(Refs = rg count across rust/crates; rust-analyzer references timed out during mapping.)

CONVENTIONS

  • unsafe_code = "forbid" workspace-wide; every crate opts in via [lints] workspace = true; clippy all=warn, pedantic=allow
  • Edition 2021, resolver 2, publish=false; no rust-toolchain pin (CI floats stable); no rustfmt.toml/clippy.toml — stock defaults
  • Giant flat files by design (main.rs 19.8k, tools/lib.rs 10.9k, commands/lib.rs 7.2k): organization is positional — types → spec table → dispatch → handlers → tests at EOF
  • Dual output paths everywhere: render_x + render_x_json; JSON errors to stdout, text errors to stderr
  • Tests: inline #[cfg(test)] mod tests primary; integration tests spawn CARGO_BIN_EXE_claw subprocess against mock-anthropic-service; tempfile everywhere; env-mutating tests serialize via env_lock/test_env_lock
  • Comments carry issue numbers (#824, #146); gate tests named by roadmap gate (g004_conformance.rs)
  • Python side: stdlib only, python -m unittest; src/ mixes camelCase (QueryEngine.py) and snake_case filenames

ANTI-PATTERNS (THIS PROJECT)

  • NEVER cargo install claw-code — crates.io stub is deprecated and installs claw-code-deprecated.exe; build from source
  • Forbidden doc strings (CI-enforced by .github/scripts/check_doc_source_of_truth.py): old org links github.com/Yeachan-Heo/claw-code, github.com/code-yeongyu/claw-code, discord.gg/6ztZB9jvWq, assets/clawd-hero.jpeg
  • Deprecated config keys: permissionMode → permissions.defaultMode; enabledPlugins → plugins.enabled; env RUSTY_CLAUDE_PERMISSION_MODE is dead
  • Direct push to main is policy-blocked (main_push_forbidden approval scope)
  • Automation lanes must not merge/close remote PRs/issues (docs/anti-slop-triage.md)
  • claw init must not scaffold dontAsk permission mode (regression-pinned in output_format_contract.rs)
  • File-level #![allow(dead_code)] blocks (main.rs, session_control.rs) are tolerated legacy — do not extend the pattern

UNIQUE STYLES

  • Dogfood build: scripts/dogfood-build.sh injects GIT_SHA; claw version provenance must equal HEAD
  • Mock parity: rust/mock_parity_scenarios.json drives CLI subprocess vs MockAnthropicService
  • Dogfooding uses CLAW_CONFIG_HOME=$(mktemp -d) for config isolation
  • Env contracts: GIT_SHA (build), CLAW_CONFIG_HOME (config dir), OLLAMA_HOST (provider override), *_API_KEY/*_BASE_URL per provider

COMMANDS

scripts/fmt.sh --check                 # fmt check (apply: scripts/fmt.sh)
cd rust && cargo clippy --workspace --all-targets -- -D warnings
cd rust && cargo test --workspace
cd rust && cargo build -p rusty-claude-cli   # binary: rust/target/debug/claw
python -m unittest discover -s tests   # Python suite
python .github/scripts/check_doc_source_of_truth.py && scripts/roadmap-check-ids.sh   # docs/roadmap CI

NOTES

  • claw binary comes from crate rusty-claude-cli (package/bin name mismatch)
  • rust-ci.yml triggers only on rust/, docs/, listed meta file changes (path filters)
  • CI clippy job runs without -D warnings — weaker than the documented gate; known pre-existing failures recorded in docs/g002/g003 maps
  • claw acp is a status stub, not a real ACP server
  • rust/ has committed harness dotdirs (.clawd-agents/, .omc/, .sandbox-home/) — intentional

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.