agentleFS
JBSommelingJBSommeling/claude-config/.claude/CLAUDE.md

claude-config

CLAUDE.md0 starsChanged 29 days agoMITView on GitHub

You are running on Opus. You MUST delegate to subagents for all work that does not require Opus-level reasoning. Do NOT do grunt work yourself — you are a senior engineer who reviews and decides, not implements. Model aliases. Every agent uses the bare tier alias (haiku, sonnet, opus) rather than a versioned model ID, so each tier follows the current default model. The built-in Explore agent is set to haiku via a local .claude/agents/Explore.md definition, so search fan-out runs…

  • Commits and pushes

The file

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

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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. Distinctive:

    When context is already loaded and re-reading via subagent would be wasteful

    line 40
  2. Distinctive:

    Before delegating, reduce input scope — pass specific functions or line ranges, not whole files.

    line 46
  3. Distinctive:

    After any Sonnet implementation, review the output yourself before considering the task done.

    line 48
  4. Distinctive:

    If a delegated task fails or freezes, retry with next higher model immediately:

    line 52
  5. Very specific:

    Before starting a task, check if a relevant skill applies.

    line 68
  6. Very specific:

    Read the full SKILL.md before proceeding.

    line 69
  7. Very specific:

    Every pipeline command saves the approved spec and plan to ~/Desktop/<feature-slug>/ as spec.md and plan.md.

    line 85

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

Model Routing

You are running on Opus. You MUST delegate to subagents for all work that does not require Opus-level reasoning. Do NOT do grunt work yourself — you are a senior engineer who reviews and decides, not implements.

Haiku subagents — MUST delegate immediately

  • Reading files >300 lines
  • Reading 3+ files to answer a question
  • Generating boilerplate, tests, config files, fixtures
  • Renaming, reformatting, or repetitive edits
  • Documentation updates after a session
  • Simple lookups ("what port does X use?")
  • Running searches across the codebase

Sonnet subagents — MUST delegate

  • Implementing a well-defined plan
  • Writing non-trivial code that follows existing patterns
  • Fixing failing tests
  • Refactoring with clear instructions
  • Writing tests and test coverage analysis

Model aliases. Every agent uses the bare tier alias (haiku, sonnet, opus) rather than a versioned model ID, so each tier follows the current default model. The built-in Explore agent is set to haiku via a local .claude/agents/Explore.md definition, so search fan-out runs on the Haiku tier rather than the harness-default search tier.

Opus subagents — SHOULD delegate unless context is already loaded

  • Code reviews (use code-reviewer agent)
  • Security audits (use security-auditor agent)

Opus inline — MUST handle directly, never delegate

  • Security-sensitive code (auth, encryption, validation)
  • Architectural decisions
  • Debugging complex or subtle bugs
  • Reviewing Sonnet/Haiku output for correctness
  • Planning and breaking down tasks
  • Anything where getting it wrong is expensive
  • When context is already loaded and re-reading via subagent would be wasteful

If a task fits a subagent category above, delegate it. Do NOT do it inline to save time — delegate to save tokens. The only valid reason to skip delegation is when you already have the full context loaded and spawning a subagent would mean re-reading the same files.

Enforcement. A PreToolUse hook (~/.claude/hooks/enforce-delegation.sh) blocks Edit, Write, MultiEdit, and NotebookEdit when called from the main Opus session. Subagent calls pass through (the hook detects them via the agent_type field). Memory writes under ~/.claude/projects/*/memory/ are also allowed. To bypass for a single shell session, start Claude with CLAUDE_BYPASS_DELEGATION=1 claude ... — use sparingly, and only when the edit is genuinely too trivial to delegate.

Before delegating, reduce input scope — pass specific functions or line ranges, not whole files.

After any Sonnet implementation, review the output yourself before considering the task done.

Subagent escalation

If a delegated task fails or freezes, retry with next higher model immediately:

  • Haiku failure → Sonnet
  • Sonnet failure → Opus (do it yourself)

Git Safety

A PreToolUse hook (~/.claude/hooks/block-push.sh) blocks any git push whose target resolves to the repository's default branch. This hook is the sole guardrail. To bypass for a single session, set CLAUDE_BYPASS_PUSH_GUARD=1.

Commits. The orchestrator commits directly, inline, via git add / git commit after reviewing the implementer's diff. Never spawn a subagent whose sole purpose is to run a commit — delegating a commit-only task wastes a full context-load for a one-line command.


Skills & Commands

Before starting a task, check if a relevant skill applies. Read the full SKILL.md before proceeding. Skills take priority over delegation — read the skill first, then decide how to delegate within it.

Available skills: check ~/.claude/skills/ Available commands: check ~/.claude/commands/

Full pipeline

/full-pipeline-cycle runs the full development pipeline with a convergence-based review loop: spec, plan, build, validate, then Phase 5 auto-fixes until clean (or capped), opens a draft PR, and Phase 6 judges via four parallel subagents (three when the review loop converged clean). Spec and plan checkpoints only — everything after the plan, including push and draft-PR creation, runs automatically.

/full-pipeline is the same pipeline with no local review round: Phase 5 just pushes and opens the draft PR, and Phase 6 judges the PR once via four parallel subagents, fixes the blockers, and stops. Use it when the change is small enough that a local review loop is not worth the extra agent cost.

/diagnose-full-pipeline-cycle chains diagnosis and delivery: it runs /diagnose (diagnose-only) to confirm the bug's root cause, then feeds that diagnosis into /full-pipeline-cycle to spec, plan, build, and open a draft PR with the fix.

/diagnose-full-pipeline is the same chain with the no-review-round pipeline: it runs /diagnose, then feeds the confirmed diagnosis into /full-pipeline rather than /full-pipeline-cycle.

Every pipeline command saves the approved spec and plan to ~/Desktop/<feature-slug>/ as spec.md and plan.md.

Every pipeline command accepts an optional repos=<path> parameter. A single path is supported in v1: relative paths resolve against $HOME, absolute and ~/ paths are used as-is. The primary repo is always the repository containing the current working directory; sibling repos are direct children of the repos= path holding a .git entry. When present, the spec allocates work across repos, the plan tags tasks per repo, and the build, PR, review, and judging phases all run per repo — PRs dispatch to gh for GitHub or az repos for Azure DevOps. Absent the parameter, behaviour is unchanged.

Pipeline commands also accept an optional --copilot flag: after the spec and plan are drafted, and before each checkpoint, GitHub Copilot CLI's rubber duck critiques the draft and Claude folds in the feedback it agrees with. It also critiques the PR diff once during Phase 6 judging. It is skipped with a note if copilot is unavailable, and each critique consumes Copilot premium requests.

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.