agentleFS
coltonbeardencoltonbearden/carrel/CLAUDE.md

carrel

CLAUDE.md2 starsChanged 5 months agoMITView on GitHub

Resume from disk: read STATE.md first — it always says what's done, what's in flight, and what's next. Decisions live in docs/DECISIONS.md. The product name, tagline, and version live ONLY in product.json at the repo root. Never hardcode the name in code. Docs/manifests may use the name in prose, but anything generated (CLI banner, --version, asset text) must read product.json. Do not run scripts/finalize.sh: it was for the original hand-off only (it relocates the tree and creates a new repo;…

  • In this repositoryOne other file it gives its agents.

The file

We split this CLAUDE.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:

    Resume from disk: read STATE.md first — it always says what's done, what's in flight, and what's next.

    line 3
  2. Very specific:

    Every CLI command MUST have: working --help, --json flag when output is data, ≥1 test, graceful degradation when an optional binary is …

    line 19
  3. Very specific:

    No stubs/TODO/placeholder code in shipped commands.

    line 20
  4. Distinctive:

    Never commit generated junk (see .gitignore).

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md

Project CLAUDE.md — Local File Toolkit + Plugin Marketplace

Resume from disk: read STATE.md first — it always says what's done, what's in flight, and what's next. Decisions live in docs/DECISIONS.md.

Product name — single source of truth

The product name, tagline, and version live ONLY in product.json at the repo root. Never hardcode the name in code. Docs/manifests may use the name in prose, but anything generated (CLI banner, --version, asset text) must read product.json. Do not run scripts/finalize.sh: it was for the original hand-off only (it relocates the tree and creates a new repo; STATE.md).

Stack & layout

  • Python ≥3.12 (dev box: 3.14), managed by uv (pyproject.toml, uv run, uv sync).
  • Core library in src/carrel/; umbrella CLI entry in pyproject.toml [project.scripts].
  • All external binaries are called through the single adapter layer src/carrel/core/adapters.py — never subprocess directly from command modules. Adapters do capability detection and convert timeouts into a clean error. One documented exception: core/actions.py runs the user-authored --run shell actions of watch and batch (shell-quoted substitutions, --action-timeout; D-013).
  • Repo root doubles as a Claude Code plugin marketplace: .claude-plugin/marketplace.json + plugins/<name>/.

Coding standards

  • Python: type hints on public functions, pathlib.Path over strings, no global state, f-strings, stdlib argparse-free — we use the CLI framework chosen in Phase 2 (see docs/ARCHITECTURE.md).
  • Every CLI command MUST have: working --help, --json flag when output is data, ≥1 test, graceful degradation when an optional binary is missing (actionable message + install hint, exit code 3 — never a traceback, never a silent no-op).
  • No stubs/TODO/placeholder code in shipped commands. Cut and document in docs/FEATURES.md instead.
  • Wrap, don't rewrite: prefer proven libraries/binaries via the adapter layer; attribute in docs/LICENSES section.

Exit code convention

  • 0 success
  • 1 general/unexpected error (message to stderr, no traceback unless --debug); diff reuses 1 to mean "inputs differ" (documented in its --help)
  • 2 bad usage/arguments (argparse-style)
  • 3 missing optional dependency (message names the binary + install hint)
  • 4 input file not found / unreadable / unsupported type
  • 5 operation produced no result (e.g., search with no hits when --fail-empty)

Testing

  • uv run pytest from repo root runs everything. Fixtures in tests/fixtures/ (generated by tests/fixtures/generate.py; never hand-edit binaries).
  • Tests that need an optional binary must skip (with reason) when it's absent, not fail.

Subagent rules

Subagents: read your spec in specs/, respect your write boundary exactly, and report: files touched, tests written+run (with real output), deviations from spec, open issues. Claims are verified by execution — write tests that actually run.

Versioning

product.json is the only place a version is typed by hand. Bump it, run scripts/sync_product.py (regenerates _product.py, pyproject.toml, plugin/marketplace manifests, CITATION.cff), add a CHANGELOG.md entry; tests/test_product_sync.py fails otherwise. Release steps: docs/RELEASING.md.

Git

  • Branch main is protected by a ruleset: changes land through a PR with green lint/test/test-minimal checks (admin bypass for emergencies only). Historical commits used phase(N): ... / wave(N): ...; use conventional prefixes (fix:, feat:, docs:, ci:) now.
  • Never commit generated junk (see .gitignore); fixtures ARE committed once generated.

Review gates the merge

A PR merges only after /code-review <pr> high has completed and every confirmed finding is either fixed in that same PR or written into STATE.md Open issues with the reason it was deferred. A PR whose review has not finished is not merged, however green CI is — the reviews find things CI cannot. In the v0.4.0 session three of them found 42 verified defects across five PRs; in v0.4.1 one of them found that the new work-tree guard did not stop the incident it was written for. Launch the review right after opening the PR so it runs while CI does.

Mutating smoke tests run in /tmp, never in the checkout

Any hand-run of --apply, batch --run, intake or watch happens in a scratch directory under /tmp (mktemp -d), never against this working tree or any path inside it. On 2026-09-10 a carrel rename --apply aimed at the checkout renamed 21 tracked files; recovery was possible only because the command prints its plan. carrel now refuses to move files git is tracking (spec 29), but that guard is the second line of defence, not a licence to test in place — and --force exists.

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.