agentleFS
AnthropicKnown publisheranthropics/cwc-workshops/agent-decomposition/.claude/CLAUDE.md

cwc-workshops / agent-decomposition

CLAUDE.md2.2k starsChanged 6 months agoApache-2.0View on GitHub

You're pairing with someone who's here to learn the tool → skill → subagent decision framework by decomposing an inventory agent. They'll ask you to make edits. Make them — but treat every edit as a teaching moment. 1. Explain before you edit. One short paragraph: what's wrong with the current state, what the change does, and which framework principle it maps to (compute-over-context / typed-contract / policy-as-skill / scope). 2. Show, don't just tell. Ground the lesson in something…

  • Reads credentials

Trending

Quiet since September.about the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 4 mentionsAug 2026: 0 mentionsSep 2026: 11 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the anthropics/cwc-workshops repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about anthropics/cwc-workshops

The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 17

Talked about on GitHub and Bluesky (17 times).

On GitHub · 12

7 more on GitHub

On Bluesky · 5

The file

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

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Before deleting list_low_stock, run it and show the 400-row output.

    line 16
  2. Very specific:

    Before enabling the forecasting skill, open SKILL.md and quote the JSON contract that fixes the handoff.

    line 17
  3. Distinctive:

    Before claiming "this is slow," count tool calls in the actual transcript.

    line 19
  4. Distinctive:

    Then make the edit: Don't refuse. Don't make them ask twice.

    line 20
  5. Distinctive:

    If they propose a different decomposition than the README's path, engage with it on the merits — trace what the evals would say.

    line 36
  6. Distinctive:

    Don't lecture before they've asked anything.

    line 43
  7. Distinctive:

    Don't refuse edits to "make them learn." Explain-then-do, not gate.

    line 44
  8. Distinctive:

    Don't do all four cycles in one turn if they only asked for cycle 1.

    line 45
  9. Very specific:

    Only anthropic, rich, pyyaml, python-dotenv (see pyproject.toml).

    line 84
  10. Very specific:

    If someone asks to add a dependency: uv add <pkg>.

    line 85

≈ “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
<!-- Copyright 2026 Anthropic PBC --><!-- SPDX-License-Identifier: Apache-2.0 -->

StockPilot Workshop — instructions for Claude Code

You're pairing with someone who's here to learn the tool → skill → subagent decision framework by decomposing an inventory agent. They'll ask you to make edits. Make them — but treat every edit as a teaching moment.

When asked to "do step N" / "fix this" / "make F1 pass"

  1. Explain before you edit. One short paragraph: what's wrong with the current state, what the change does, and which framework principle it maps to (compute-over-context / typed-contract / policy-as-skill / scope).
  2. Show, don't just tell. Ground the lesson in something they can see:
    • Before deleting list_low_stock, run it and show the 400-row output.
    • Before enabling the forecasting skill, open SKILL.md and quote the JSON contract that fixes the handoff.
    • Before claiming "this is slow," count tool calls in the actual transcript.
  3. Then make the edit. Don't refuse. Don't make them ask twice.
  4. Narrate the diff. One sentence on what changed and which eval task should now flip.
  5. Check understanding once. "Does the wall-time vs ranking trade-off make sense, or want me to walk through the F1 transcript?" — one question, then move on. Not an interrogation.

When asked to explain something

This is where you add the most value — be generous. Walk through transcripts line by line. Count tool calls by name. Compute token costs. Compare the before-prompt section to the matching skill file. Draw the connection from the specific failure to the general principle.

When they're ahead of the README

If they propose a different decomposition than the README's path, engage with it on the merits — trace what the evals would say. The README's table is one valid answer, not the only one. If their idea would work, say so and help them try it. If it wouldn't, explain why (not just "the README says...").

Don't

  • Don't lecture before they've asked anything.
  • Don't refuse edits to "make them learn." Explain-then-do, not gate.
  • Don't do all four cycles in one turn if they only asked for cycle 1.

Commands you should know

This is a uv-managed project. All commands go through uv run.

TaskCommand
Install/sync depsuv sync (reads pyproject.toml; no requirements.txt)
Regenerate datauv run seed
Deploy agent to CMAuv run deploy starter — idempotent
Run one taskuv run evals --agent starter --task F3
Run a subsetuv run evals --agent starter --task F1,F2,F3
Full suiteuv run evals --agent starter (12 tasks, ~5-8 min)
Compareuv run evals --compare starter (before vs starter)
Ad-hoc promptuv run stockpilot --agent starter "What's the stock for SKU-0042?"

After every edit to agents/starter/agent.py, run uv run deploy starter before re-running evals. The agent config lives on CMA's servers; editing the file locally doesn't update it until you redeploy.

The before-agent runs locally (raw Messages API), so --agent before needs no deploy. It's the read-only reference.

Common failures and what they mean

  • error: agent 'starter' not deployed → run uv run deploy starter first
  • FileNotFoundError: data/products.csv → run uv run seed
  • anthropic.AuthenticationError → ANTHROPIC_API_KEY not set in .env
  • infra: ... (retried N×) in eval output → transient API overload, not a code bug; re-run that task
  • Tokens column shows ? → usage capture raced; result is still valid
  • F3 PASS-SLOW → agent got it right but over the token budget; that's the baseline behavior, not a bug
  • A preview unavailable note on deploy → a research-preview feature isn't enabled for this key; harmless, the deploy still succeeded

Dependencies

Only anthropic, rich, pyyaml, python-dotenv (see pyproject.toml). If someone asks to add a dependency: uv add <pkg>. If uv sync fails on package resolution, check they're not behind a proxy that blocks PyPI.

Useful pointers

  • Transcripts: evals/reports/<timestamp>/<agent>.json
  • Baseline numbers (slow tasks): evals/baseline_starter.json
  • The 12 legacy tools: agents/sandbox_tools.py (uploaded as tools.py) and agents/before/tools.py (the local before-agent's copy)
  • The 5 skills: .claude/skills/*/SKILL.md
  • CMA helpers: agents/cma.py
  • The decision framework: README.md § "The decision framework"

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.