Skip to content

feat(skills): integrate Karpathy coding guidelines for LLM behavior - #19

Merged
robertraf merged 1 commit into
mainfrom
claude/exciting-kilby
Apr 16, 2026
Merged

feat(skills): integrate Karpathy coding guidelines for LLM behavior#19
robertraf merged 1 commit into
mainfrom
claude/exciting-kilby

Conversation

@robertraf

@robertraf robertraf commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

Integrates behavioral guidelines from Andrej Karpathy's observations on common LLM coding mistakes into our SDD workflow. Adapted from forrestchang/andrej-karpathy-skills (MIT licensed).

Changes:

  • New rule file (.claude/rules/karpathy-guidelines.md) — 4 principles (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution) always loaded into context
  • New anti-pattern reference (skills/implement/references/common-llm-mistakes.md) — 5 catalogued mistakes with before/after examples for /implement sessions
  • Enhanced /review — added "Simplicity & Scope" section to the review checklist catching over-abstraction, speculative features, and drive-by refactoring
  • Enhanced /spec — added "Think Before Coding" guidance with explicit assumption-surfacing and multi-interpretation presentation in the interview phase

Why

Our CLAUDE.md already contains many of these principles implicitly, but the Karpathy framing provides:

  1. Concise, principle-based language that's easy to reference
  2. Concrete anti-pattern examples showing exactly what goes wrong
  3. Verification-centric step format ([Step] → verify: [check]) that aligns with our TDD approach

Test plan

  • Verify rules file loads in new sessions (auto-loaded from .claude/rules/)
  • Run /spec with a vague user story — confirm it surfaces assumptions before writing
  • Run /implement on a task — confirm anti-pattern reference is available
  • Run /review on a change — confirm "Simplicity & Scope" appears in checklist

🤖 Generated with Claude Code

Add behavioral guidelines derived from Andrej Karpathy's observations on
common LLM coding mistakes. This improves skill quality by making Claude
avoid over-abstraction, drive-by refactoring, speculative features, and
silent assumptions.

- New rule file (.claude/rules/karpathy-guidelines.md) with 4 principles
- New anti-pattern reference (skills/implement/references/common-llm-mistakes.md)
- Enhanced /review checklist with "Simplicity & Scope" criteria
- Enhanced /spec with explicit assumption-surfacing in interview phase

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robertraf robertraf self-assigned this Apr 16, 2026
@robertraf robertraf added the enhancement New feature or request label Apr 16, 2026
@robertraf
robertraf merged commit 14463ec into main Apr 16, 2026
1 check passed
@robertraf
robertraf deleted the claude/exciting-kilby branch April 16, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant