brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
karpathy-guidelinesBehavioral guardrails against the six most common LLM coding failure modes. Apply on every coding task: writing, editing, reviewing, or refactoring.
Independent GitHub snapshot · Automated classification · Original documentation governs
Six failure modes. Six rules. Apply all six on every coding task.
Inspired by Andrej Karpathy's observations (Jan 2026).
Run this before each phase:
Before writing code: rules 1, 2, 4 While editing: rule 3 Before claiming done: rules 5, 6
Trigger: At the start of any task where the request requires an implicit choice - a library, a data structure, an architecture decision, an interpretation of ambiguous scope.
Rule: State every assumption before writing a line. If a requirement has multiple valid interpretations, list them and declare which one you will implement. Do not silently pick.
Do:
users.ts."Do not:
Self-audit: List every decision you made that wasn't explicitly specified in the request. If any decision is unnamed, name it before proceeding.
Trigger: Before writing any code, adding a dependency, creating an abstraction, or adding an error handler.
Rule: Write only what was asked for. Every line of code you write must be traceable to an explicit requirement in the request. If it isn't, do not write it.
Do:
Do not:
options parameter "in case someone needs flexibility later."Self-audit: If you removed every line that wasn't directly traceable to the request, would the task still be complete? If yes, those lines should not exist.
Trigger: Every time you open an existing file to edit it.
Rule: Modify only the code necessary to fulfill the request. Do not refactor, rename, reformat, or clean up code adjacent to your changes - even if you would write it differently.
Do:
parseDate() on line 47 - not in scope here, flagging for a separate fix."Do not:
Self-audit: Can every changed line be explained by a direct requirement from the request? If a line changed for any other reason, revert it.
Trigger: At the start of any task with more than one step, any bug fix, or any refactor.
Rule: Before writing code, state what "done" means as something you can verify with a command. Subjective criteria ("it works", "looks correct") are not success conditions. A passing test, a specific API response, or a zero-error build output are.
Do:
GET /items?page=2 returns the correct slice with total_pages in the response body."1. Write failing test for the broken case → verified by: test output shows 1 failure
2. Implement the fix → verified by: that test passes
3. Confirm no regressions → verified by: full suite passes
Do not:
Self-audit: Is your success condition something you can verify by running a command and reading the output? If not, restate it until it is.
Trigger: Any time you are about to write the words "done", "fixed", "complete", "it works", or "tests pass."
Rule: Run the verification command. Paste the relevant output. Do not claim completion without evidence. If verification is impossible (UI-only change, no test harness), state that explicitly - do not imply success.
Do:
pytest tests/auth_test.py -v - 14 passed, 0 failed." [paste output]npm run build exited with code 0." [paste last 5 lines]/auth/login."Do not:
Self-audit: Does your response contain actual command output proving the task is complete? If not, run the command before responding.
Trigger: Any time you notice a second issue while working on the first, or when your diff touches more than one logical concern.
Rule: One diff, one purpose. If you discover a second bug while fixing the first, stop - report it and leave it unfixed. Do not bundle unrelated changes into the same commit.
Do:
validateToken() has an off-by-one error on line 83 - not touching it here, flagging for a separate fix."Do not:
Self-audit: If the user ran git revert on this commit, would they lose only the thing they asked for - and nothing else? If they would also lose something unrelated, split the commit before proceeding.