Skip to content
hermes98761234Public

About

Compact coding-discipline skill for AI agents on small/local models — Karpathy guidelines × Superpowers loop in <500 words

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

🔁 lean-loop

CI License: MIT Words

A single compact coding-discipline skill for AI agents — built for small and local models.

It distills two excellent but opposite-sized sources into one 457-word skill:

Source What we took
andrej-karpathy-skills The 4 behavioral rules: surface assumptions, simplicity first, surgical changes, verifiable success criteria
obra/superpowers The process loop (clarify → define done → test-first → evidence before "done") and the red-flags / rationalization-table technique

Why small models need their own skill

Big models can follow a 14-skill methodology. Small models can't — long process docs fall out of context, and prose rules get skipped under pressure. lean-loop compensates with:

  • One file, 5 steps, <500 words — fits in any context window
  • A required 4-line reply template (Assumptions / Done means / Changed / Check output) — structural slots bind small models where prose rules fail
  • A red-flags table countering the exact rationalizations observed in baseline testing

The loop

Step 0  Say assumptions out loud      (incl. tradeoffs the user should know)
Step 1  Define done as a runnable check
Step 2  Write the least code          (a config value nothing reads is a lie)
Step 3  Run the check, paste output   ("should work" ≠ done)

Install

Claude Code (plugin marketplace):

/plugin marketplace add hermes98761234/lean-loop
/plugin install lean-loop@lean-loop

Or as a plain personal skill: cp -r lean-loop/skills/lean-loop ~/.claude/skills/

Other agents — clone the repo, then one command per harness (the skill is one markdown file; each agent just reads it from its own location):

Agent Command (from your project root)
Codex CLI / App sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> AGENTS.md
Cursor mkdir -p .cursor/rules && cp lean-loop/adapters/cursor/lean-loop.mdc .cursor/rules/
GitHub Copilot sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> .github/copilot-instructions.md
Gemini CLI sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> GEMINI.md
OpenCode / others sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> AGENTS.md

The sed strips the Claude-specific frontmatter; everything below it is plain agent-agnostic markdown. CI verifies adapters never drift from the canonical SKILL.md.

Tested, not vibed

The skill was developed with the TDD-for-documentation method from superpowers' writing-skills:

  1. RED — baseline agent (Haiku), pressure scenario (urgent deadline + vague scope + "make it configurable" bait): produced dead config nothing read, claimed done without running anything, hid the cache-staleness tradeoff.
  2. GREEN — with the skill: wired constant, real test run, pasted output.
  3. REFACTOR — assumptions were still skipped under time pressure → made them a required template slot → full compliance on retest.

CI runs scripts/validate.py on every push: frontmatter validity, trigger-form description, and the <500-word budget.

License

MIT — see LICENSE. Sources credited above; go star them.

About

Compact coding-discipline skill for AI agents on small/local models — Karpathy guidelines × Superpowers loop in <500 words

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages