feat: add karpathy coding discipline guidelines#4
Merged
Conversation
…karpathy-skills Four principles (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution) addressing common LLM coding pitfalls. Sourced from multica-ai/andrej-karpathy-skills (MIT), itself distilled from Karpathy's public observations. Doc lives in docs/ so CLAUDE.md can @-import a tight summary while keeping the full reference one click away.
…rules Adds a four-bullet 'Coding Discipline (Karpathy)' section between Approach Rules and GitHub Workflow with an @-import to docs/karpathy-guidelines.md. Mirrors the existing pattern used for github-workflow, mcp-reference, etc. Complements existing approach rules rather than duplicating them — adds explicit guardrails against over-engineering and drive-by edits that the current rules don't spell out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Karpathy-derived coding discipline section to the global
CLAUDE.md.Why
Andrej Karpathy's public observations on LLM coding pitfalls (wrong assumptions, over-engineering, drive-by edits, weak success criteria) line up with the gaps in the current Approach Rules. multica-ai/andrej-karpathy-skills distills these into four principles under MIT — worth merging into the setup we publish.
Changes
docs/karpathy-guidelines.md— full four-principle reference (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution) with attribution to the upstream repo and Karpathy's original post.CLAUDE.md— new "Coding Discipline (Karpathy)" section between Approach Rules and GitHub Workflow: four headline bullets plus an@docs/karpathy-guidelines.mdimport. Follows the same pattern used forgithub-workflow.md,mcp-reference.md,skills-reference.md, etc.Why not just copy
CLAUDE.mdfrom upstreamTheir install methods are (a) a Claude Code plugin, or (b)
curltheirCLAUDE.mdover our own. Both fight our existing structure. The doc-import pattern keeps the rules first-class in our setup, attributes the source cleanly, and avoids a runtime dependency.Verification
grep -n "Karpathy" CLAUDE.mdshows the new section is loaded.@docs/karpathy-guidelines.mdresolves on session start (matches the pattern of the other@docs/*.mdimports already inCLAUDE.md).