agentleFS
ContextLabContextLab/claude-skill-compounder/.claude/CLAUDE.md

claude-skill-compounder

CLAUDE.md1 starsChanged 38 days agoMITView on GitHub

Guidance for Claude Code when working in this repository. compound: a Claude Code mod plus a CLI. The repository root is the plugin. Read docs/design.md before changing anything; it is the contract both halves are built to. - One implementation of each thing. The mod never reads or writes a lesson file or the event log; it calls bin/compound. Event field names are defined once, in the docstring at the top of bin/compound. - No mocks. A test writes real…

  • Reads credentials

The file

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

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

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No mocks. A test writes real files and runs the real CLI.

    line 38
  2. Very specific:

    Never run bin/compound install, uninstall or update against the real ~/.claude while developing.

    line 40
  3. Very specific:

    Before a tool call the mod makes one CLI call, check, and no listing.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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

CLAUDE.md

Guidance for Claude Code when working in this repository.

What this is

compound: a Claude Code mod plus a CLI. The repository root is the plugin. Read docs/design.md before changing anything; it is the contract both halves are built to.

PathWhat
.claude-plugin/plugin.json, hooks/hooks.jsonthe plugin manifest and the hooks module's name
hooks/register.tsevery hook; the only file that touches the engine interface $
hooks/judge.ts, render.ts, store.ts, knobs.ts, safe.ts, view.tspure logic, each with a *.test.ts; view.ts is what the band and the /compound pane show
hooks/ui.test.tsthe band and the pane mounted through the hooks on the terminal and desktop surfaces
types/index.d.tsthe contract for the values the mod keeps in $.state; plugin.json names it
bin/compoundthe CLI: one Python file, standard library only, runs on Python 3.9
skills/learn, skills/reusethe two procedures the mod sends Claude to
lessons/, skills/the general pool shipped to every user
tests/test_*.pyCLI tests
tests/journeys/real-session drivers, run by hand
dev/ui-check.sh, dev/ui-check.tapea recorded interactive session (vhs) with a screenshot of each phase, for looking at the band and the pane

Commands

./run_tests.sh
claude plugin validate --strict .
claude plugin test .
python3 tests/journeys/journey_<name>.py

Rules

  • One implementation of each thing. The mod never reads or writes a lesson file or the event log; it calls bin/compound. Event field names are defined once, in the docstring at the top of bin/compound.
  • No mocks. A test writes real files and runs the real CLI. A journey runs a real session.
  • Never run bin/compound install, uninstall or update against the real ~/.claude while developing. Pass --claude-dir and --bin-dir, or set COMPOUND_HOME and COMPOUND_CLAUDE_DIR.
  • A hook must never break a turn: every failure is caught, logged as an error event and reported, and the turn goes on.
  • The function-hook API allows a plugin one unmatched tool.call hook, requires literal names in $.env.get, and keeps a module's variables for the life of the process, so per-session state is keyed on the session id.
  • A render hook draws from $.state and answers next(e) on any failure. The band's one timer runs only while a spinner turns or a result fades. The pane's CLI reads are never made on a path a tool call waits on.
  • A Bash call is exempt from the guards, recall and capture only when soleCliShape in hooks/render.ts proves it is one simple compound ... invocation. It is an allowlist and fails closed: add to it only what can be proved, with a case in hooks/decisions.test.ts in each direction.
  • Whether a recall counts toward ineffective is decided in the CLI (recall_verdict), when compound log writes the event. The mod reads the reply and predicts nothing.
  • compound log takes only the types the mod writes. A test that needs an event a command writes uses seed_event in tests/test_support.py, which refuses a store that is not in a temporary directory.
  • Before a tool call the mod makes one CLI call, check, and no listing. Every CLI call the mod makes takes its budget from BUDGET in hooks/render.ts: 2 s at most while a tool call or a stop waits, 5 s at most at a typed prompt.
  • What the user is told about a compound command the session ran follows the event the command wrote, never the command's text.
  • Documentation describes what the package does now, for a reader who has never seen it. A new COMPOUND_* name, subcommand, option or claim kind goes into docs/design.md in the same change; tests/test_docs.py fails otherwise.
  • notes/ holds dated session notes. It is a log, not a description of behaviour.

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.