000-core-principles — rule for Claude Code: coding foundations
000-core-principles — a rule that enforces four principles: understand the task before coding, choose the simplest solution, build security from the start, design all code to be testable. Applies to all files and conversations in your IDE.
MIT ★ 97 updated 2026-06-11
.cursor/rules/000-core-principles.mdcWhat 000-core-principles does
The rule has four sections. First: clarify requirements before writing code and never start without clear goals. Second: pick the simplest working solution—complex patterns need explicit justification, readable code beats clever code. Third: validate all inputs, keep secrets out of code, use defense in depth, apply least privilege. Fourth: design code to be testable from the beginning, write tests as you code, verify before committing.
The rule applies globally to all files and conversations in the editor. Installation paths differ between Cursor, Claude Code, GitHub Copilot, and Cline, but the content stays the same.
What it helps with
- Clarify what needs to be built before you start writing
- Pick the simplest solution instead of over-engineering
- Add security checks from the first draft, not after
- Plan tests alongside code, not after the fact
Example prompts for the agent
- Help me understand what exactly needs to be built: ask clarifying questions before writing the function
- Show me the simplest way to solve this problem, no unnecessary abstractions
- Check the code for hardcoded secrets and missing input validation
How to install 000-core-principles
Manually: put the files in place
.cursor/rules/000-core-principles.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/000-core-principles.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/000-core-principles.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/000-core-principles.mdManually: put the files in place
.clinerules/000-core-principles.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about 000-core-principles
How do I install 000-core-principles?
Copy the file to your editor's rules folder. For Claude Code: .claude/rules/000-core-principles.md, for Cursor: .cursor/rules/000-core-principles.mdc, for GitHub Copilot: .github/instructions/000-core-principles.instructions.md, for Cline: .clinerules/000-core-principles.md.
What does this rule do?
It sets four principles: understand requirements before coding, choose simple solutions, build security in from the start, and design code to be testable.
Does this rule apply to all files in my project?
Yes, it's global—it works across all files and conversations in your editor because the config has alwaysApply: true.
Source text
000-core-principles.mdc · MIT
--- description: Core coding principles applied to all files and conversations globs: alwaysApply: true --- # Core Coding Principles ## Clarify Before Coding Understand requirements before writing code. Ask questions when intent is unclear. No code without clear goals. ## Simplicity First Choose the simplest viable solution. Complex patterns need explicit justification. Readable code over clever code. ## Security By Default Validate all inputs. No secrets in code. Defense in depth. Least privilege principle. ## Test-Driven Thinking Design all code to be testable from inception. Write tests alongside code. Verify before committing.
© obviousworks · MIT · obviousworks/vibe-coding-ai-rules