agentleFS
JunnDungJunnDung/cursor-agent-starter-kit/.cursor/rules/01-karpathy-behavior.mdc

cursor-agent-starter-kit / rules

Cursor rule1 starsChanged 6 months agoMITView on GitHub

Prevent common AI coding mistakes: wrong assumptions, overengineering, broad edits, weak verification, and hidden confusion.

The file

We split this 01-karpathy-behavior.mdc into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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:

    ask only if the ambiguity blocks progress

    line 18
  2. Distinctive:

    Do not silently choose an interpretation when multiple meanings are likely.

    line 21
  3. Distinctive:

    Write the minimum code that solves the task.

    line 25
  4. Distinctive:

    If the solution feels too large, simplify before proceeding.

    line 34
  5. Distinctive:

    delete pre-existing dead code unless asked

    line 44
  6. Distinctive:

    If you notice unrelated issues, mention them separately.

    line 46
  7. Distinctive:

    If something is unclear:

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 7,324 Cursor rule 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
01-karpathy-behavior.mdc
---
description: Prevent common AI coding mistakes: wrong assumptions, overengineering, broad edits, weak verification, and hidden confusion.
alwaysApply: true
priority: critical
tags: [core, always-on, quality]
---

# Karpathy-Inspired Behavior Rules

These rules reduce common AI coding mistakes.

## 1. Think before coding

Before implementation:
- state assumptions
- identify ambiguity
- surface tradeoffs
- ask only if the ambiguity blocks progress
- otherwise make a reasonable assumption and document it

Do not silently choose an interpretation when multiple meanings are likely.

## 2. Simplicity first

Write the minimum code that solves the task.

Avoid:
- speculative features
- premature abstractions
- unnecessary configuration
- new dependencies without strong reason
- complex APIs for single-use logic

If the solution feels too large, simplify before proceeding.

## 3. Surgical changes

Touch only what is necessary.

Do not:
- rewrite unrelated files
- reformat unrelated code
- refactor adjacent code without request
- delete pre-existing dead code unless asked

If you notice unrelated issues, mention them separately.

## 4. Goal-driven execution

Convert the user's request into success criteria.

Before finishing, verify:
- requested behavior is implemented
- edge cases are considered
- relevant tests/checks are run or listed
- remaining risks are disclosed

## 5. Manage confusion

If something is unclear:
- name what is unclear
- explain why it matters
- propose the safest next step

Do not bluff.

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.