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

claw-code / src

AGENTS.md195k starsChanged 7 months agoMITView on GitHub

This is a porting workspace, not production code. Nothing here is imported by, built with, or shipped in the Rust product (rust/crates/). The Python tree exists solely to mirror and track parity against the Claude Code TypeScript source. Placeholder packages follow an identical template: load reference_data/subsystems/<name>.json via archivehelper.loadarchivemetadata(), re-export ARCHIVENAME, MODULECOUNT, SAMPLEFILES, PORTINGNOTE. There is no voice, vim, or other real functionality behind them. Run tests: python -m unittest discover -s tests from repo root. - snakecase filenames, preserving TS…

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

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

  • 3

    Very specific

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

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

    Run tests: python -m unittest discover -s tests from repo root.

    line 44
  2. Very specific:

    Every mirrored entry carries a source_hint pointing back to its original .ts/.tsx path.

    line 50
  3. Distinctive:

    Read-only shims return handled/message results.

    line 54
  4. Very specific:

    Don't let parity_audit.py drift: When you rename a mirrored module, update the hard-coded mapping in parity_audit.py to match.

    line 66

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

src/ AGENTS.md

OVERVIEW

This is a porting workspace, not production code. Nothing here is imported by, built with, or shipped in the Rust product (rust/crates/). The Python tree exists solely to mirror and track parity against the Claude Code TypeScript source.

STRUCTURE

src/
├── main.py              # argparse CLI entry point (summary, parity-audit, manifest, etc.)
├── ~38 top-level .py    # mirror TS root files one-to-one
├── models.py            # frozen dataclasses: Subsystem, PortingModule, PermissionDenial, ...
├── parity_audit.py      # hard-coded TS→Python filename mapping (main.tsx→main.py, etc.)
├── port_manifest.py     # builds a manifest of the src/ tree itself
├── reference_data/      # tracked JSON snapshots extracted from the TS archive
│   ├── archive_surface_snapshot.json
│   ├── tools_snapshot.json, commands_snapshot.json
│   └── subsystems/*.json   (29 per-subsystem records)
└── ~30 subdirectories/  # PLACEHOLDER PACKAGES (assistant/, bootstrap/, voice/, vim/, ...)
    └── each contains only __init__.py loading subsystems/<name>.json

Placeholder packages follow an identical template: load reference_data/subsystems/<name>.json via _archive_helper.load_archive_metadata(), re-export ARCHIVE_NAME, MODULE_COUNT, SAMPLE_FILES, PORTING_NOTE. There is no voice, vim, or other real functionality behind them.

WHERE TO LOOK

GoalStart here
Understand the CLI subcommandsmain.py
See which TS files map to which .pyparity_audit.py
Find shared data structuresmodels.py
Check TS archive metadatareference_data/
Real logic (permissions, path scoping)permissions.py, path_scope.py
Query engine shimquery_engine.py
Runtime simulationruntime.py
Testsrepo-root tests/ (test_porting_workspace.py, test_security_scope.py)

Run tests: python -m unittest discover -s tests from repo root.

CONVENTIONS

  • snake_case filenames, preserving TS names. camelCase exceptions exist where the TS original used it: QueryEngine.py, costHook.py, replLauncher.py.
  • Every mirrored entry carries a source_hint pointing back to its original .ts/.tsx path.
  • from __future__ import annotations throughout. Stdlib only, no third-party deps.
  • models.py dataclasses are frozen. Renderers are as_markdown() / to_markdown().
  • main.py simulates routing, turn-loops, bootstrap over mirrored inventories. Read-only shims return handled/message results. It never calls an LLM.
  • Thin shim modules (e.g. ink.py) exist as backlog metadata, not working code.

ANTI-PATTERNS

Don't add real agent, tool, voice, or vim functionality here. That belongs in rust/crates/. This tree is a scaffold, not an implementation target.

Don't commit anything from archive/. The local TS snapshot (archive/claude_code_ts_snapshot/src) is gitignored. reference_data/ holds the tracked extracts; work from those.

Don't let parity_audit.py drift. When you rename a mirrored module, update the hard-coded mapping in parity_audit.py to match.

Don't add third-party dependencies. Everything runs on stdlib.

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.