agentleFS
audriusstataudriusstat/execution-discipline/skills/compounding-engineering/SKILL.md

compounding-engineering

Skill0 starsChanged 4 months agoMITView on GitHub

Use when the user corrects you or repeats a request, when the same manual step or fix recurs across sessions, when a pattern change (style, API, naming, framework) leaves old and new forms coexisting, when declaring significant multi-file work done, or when repeated fix attempts keep failing in a long conversation. Process-level discipline from Boris Cherny; complements karpathy-guidelines (code-level) and universal-loop (single-task execution).

The file

We split this skill into the rules it gives an agent

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

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user corrects you — even mildly, even once — fix the issue, then propose a one-line rule for CLAUDE.md or the relevant skill.

    line 20
  2. Distinctive:

    When old and new patterns coexist after your change (style, naming, API shape, framework), a verbal flag dies with the conversation.

    line 44
  3. Distinctive:

    After 2 fix attempts the user reported failed, the conversation is polluted with dead hypotheses.

    line 67
  4. Distinctive:

    Every CLAUDE.md line must pass: *"would removing it cause mistakes?"* If not, cut it — bloat makes real rules get ignored.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

Compounding Engineering

Triggers automatically when relevant; invoke directly with /compounding-engineering or ask, e.g. "turn this correction into a rule".

The system must improve between tasks, not just within them (Boris Cherny, creator of Claude Code). karpathy-guidelines governs the code you write; universal-loop governs one task's execution; this one governs what survives the task.

Core principle: a lesson that lives only in the conversation is discarded work. Write it into the system.

1. Compound Every Mistake

When the user corrects you — even mildly, even once — fix the issue, then propose a one-line rule for CLAUDE.md or the relevant skill. Same when you catch yourself repeating an error.

  • "Mental note", "I'll remember", "self-enforce going forward" are forbidden — memory dies at /clear. A lesson not written into a file doesn't exist.
  • One line, matching the file's style; mention the addition in one sentence, no ceremony.

Litmus: "Will this lesson survive /clear?"

2. Rule of Three → Automate

A manual step or correction recurring a 3rd time is a process gap, not a slip. Propose automation paired with a written rule:

  • No-exceptions rule → deterministic guard (hook, lint, CI). Instructions are advisory; hooks are guaranteed.
  • Judgment call → CLAUDE.md line, slash command, or skill.

Litmus: "Did I do this yesterday and the day before?"

3. Record Migration Boundaries

When old and new patterns coexist after your change (style, naming, API shape, framework), a verbal flag dies with the conversation. Record the boundary durably: a TODO in the project's tracking file, a CLAUDE.md note naming the canonical pattern, or an issue. Mixed states mislead humans and models. Scope stays surgical — record the boundary, don't expand the task.

Litmus: "Would a newcomer in a fresh session know which pattern is canonical and what remains to migrate?"

4. Fresh-Eyes Review

Self-review is biased toward code you just wrote. For significant changes (multi-file; auth, money, or data paths), after your own verification passes, have a fresh-context subagent review the diff against the stated criteria — it sees only the diff and the plan, not your reasoning. Tell it to report only correctness gaps, not style: chasing every finding produces over-engineering.

Litmus: "Has anything without my conversation history checked this?"

5. Context Economy

  • Exploration → subagents; they read the files, you get the summary.
  • After 2 fix attempts the user reported failed, the conversation is polluted with dead hypotheses. Don't patch a third time in place: restate the problem cleanly (fresh session or reset), carrying forward evidence, not hypotheses. Precedence: two-strike-debug's in-session re-diagnosis runs first; reset when re-diagnosis has also failed. (universal-loop's inner loop — iterating against your own checks — is different.)
  • Every CLAUDE.md line must pass: "would removing it cause mistakes?" If not, cut it — bloat makes real rules get ignored.

Red Flags — stop and write it down

  • "I'll remember that" / "mental note" / "self-enforce going forward"
  • Third identical manual step without proposing automation
  • Verbal-only mention of a mixed pattern state
  • Declaring multi-file work done with no independent review
  • Attempting a 3rd fix in a conversation full of failed diffs

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.