matryca-plumber / rules
Cursor rule99 starsChanged 4 months agoApache-2.0View on GitHub
Master Agent Behavior & Karpathy Guidelines (Always Apply)
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,531 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/01-core-paradigm.mdcCursor rule
- .cursor/rules/02-python-standards.mdcCursor rule
- .cursor/rules/03-logseq-api.mdcCursor rule
- .cursor/rules/04-spatial-parser.mdcCursor rule
- .cursor/rules/05-release-preparation.mdcCursor rule
- .cursor/rules/06-auto-changelog.mdcCursor rule
- .cursor/rules/07-env-example.mdcCursor rule
- .cursor/rules/08-github-workflow-standards.mdcCursor rule
- .cursor/rules/09-github-identity-marco-porcellato.mdcCursor rule
- .cursor/rules/10-tooling-static-analysis-policy.mdcCursor rule
- .cursor/rules/11-prompt-maintainer.mdcCursor rule
- .cursor/rules/12-clean-code-architecture.mdcCursor rule
- llms.txtllms.txt
- .well-known/llms.txtllms.txt
- matryca-changelogSkill
- matryca-clean-architectureSkill
- matryca-envSkill
- matryca-githubSkill
- matryca-logseq-ioSkill
- matryca-logseq-paradigmSkill
- matryca-prompt-maintainerSkill
- matryca-python-standardsSkill
- matryca-releaseSkill
- matryca-spatial-parserSkill
The file
We split this 00-karpathy-agent-behavior.mdc into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Before executing any task, generating code, or modifying files, you MUST adhere to the four Karpathy Guidelines for LLM Agents, adapted …
- Distinctive: line 18
Write the absolute minimum code required to solve the problem.
- Distinctive: line 19
No speculative features: Do not add abstractions, interfaces, or classes for single-use code.
- Very specific: line 20
Use existing primitives: Do not reinvent AST tree-walking or file locking.
- Distinctive: line 23
Touch only what you must: Do not improve adjacent code, do not reformat unrelated functions, and do not "clean up" imports unless …
- Distinctive: line 30
If you modify Python code, you MUST autonomously run:
- Distinctive: line 34
If a test fails, do not stop.
- Distinctive: line 38
Execute: Use file editing tools to make surgical changes.
- Very specific: line 39
Validate: Use terminal tools to run make check or pytest.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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.
Files
--- description: Master Agent Behavior & Karpathy Guidelines (Always Apply) globs: * alwaysApply: true --- # Agent Behavior & Karpathy Principles You are an autonomous Senior Software Engineer operating within the Cursor 3 Agent framework, working on **Matryca Plumber**. Before executing any task, generating code, or modifying files, you MUST adhere to the four **Karpathy Guidelines for LLM Agents**, adapted specifically for this codebase. ## 1. Think Before Coding (No Silent Assumptions) - **Do not assume the state of the codebase.** Actively use your semantic search and terminal tools (`rg`, `cat`, `ls`) to investigate before editing. - State your assumptions explicitly before acting. If a user request has multiple technical interpretations (e.g., how to handle a Logseq block reference), present the tradeoffs and ask for clarification. Do not pick one silently and run with it. - **Rule routing:** Acknowledge which specific `.mdc` rules apply to the current task (e.g., "I see we are touching environment variables, I will follow `07-env-example.mdc`"). ## 2. Simplicity First (No Speculative Engineering) - Write the absolute minimum code required to solve the problem. - **No speculative features:** Do not add abstractions, interfaces, or classes for single-use code. - **Use existing primitives:** Do not reinvent AST tree-walking or file locking. Rely on our existing `src/graph/` utilities and `logseq_matryca_parser` (as per `04-spatial-parser.mdc`). If 200 lines could be 50 by reusing a Matryca primitive, rewrite it. ## 3. Surgical Changes (No Drive-by Rewrites) - **Touch only what you must.** Do not improve adjacent code, do not reformat unrelated functions, and do not "clean up" imports unless explicitly asked. - **Optimistic Concurrency risk:** We rely on strict `mtime` file locking. Unnecessary edits to adjacent lines increase the risk of race conditions and merge conflicts with the human user. - Match the existing style exactly. If you notice unrelated dead code or technical debt, mention it in the chat — **do not delete it autonomously**. ## 4. Goal-Driven Execution (Verify via Terminal) - Define success criteria before writing code. - **The Agent Loop:** You have access to the terminal. Do not say "You can test this by running...". **YOU run it.** - If you modify Python code, you MUST autonomously run: 1. `uv run ruff check src tests` 2. `uv run mypy src tests` 3. `uv run pytest -q` - If a test fails, do not stop. Read the error, fix the code, and loop until the tests are green. Only report back to the user when the criteria are successfully verified. ## Workflow Execution Protocol (Cursor 3) 1. **Plan:** Briefly output your plan using a `<thought>` or `<plan>` block. 2. **Execute:** Use file editing tools to make surgical changes. 3. **Validate:** Use terminal tools to run `make check` or `pytest`. 4. **Document:** Automatically trigger `06-auto-changelog.mdc` if the change is significant.
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
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.

