Skip to content
Projects

About

CLAUDE.md / AGENTS.md 规则模板:放进项目根目录,让 Claude Code、Codex、Cursor 少返工(附前后对比)|Drop-in rules for AI coding agents | 微信 AIPMAndy · 官网 https://metaver.vip/

Developer Tools

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original

👉 中文文档 Chinese README


AndySoul - Core Operating Directives for AI Agents

License: MIT GitHub stars PRs Welcome

📖 中文完整文档请点击这里 | Click here for Chinese documentation

Universal behavioral guidelines for AI coding agents (Claude Code, Codex, Cursor, etc.) that combines fundamental cognitive axioms, Musk's engineering methodology, and Karpathy's coding principles to maximize execution quality and minimize common LLM mistakes.

Works with: Claude Code, OpenAI Codex, Cursor, and any AI agent that reads project instructions.

中文 | English

What This Is

A universal configuration file designed to make AI coding agents:

  • Think from first principles instead of surface analogies
  • Question requirements before implementing
  • Write minimal, surgical code changes
  • Verify results systematically
  • Handle uncertainty transparently

Compatible with:

  • 🤖 Claude Code (via CLAUDE.md)
  • 🔧 OpenAI Codex (via .cursorrules or system prompt)
  • ⚡ Cursor (via .cursorrules)
  • 🎯 Any AI agent that reads project instructions

Built on three pillars:

  1. 9 Cognitive Axioms (entropy law, reductionism, probabilistic uncertainty, etc.)
  2. Musk's 5-Step Engineering Method (question → delete → simplify → accelerate → automate)
  3. Karpathy's 4 Coding Principles (think before coding, simplicity first, surgical changes, goal-driven execution)

Who This Is For

Use this if you:

  • Want AI agents to think more systematically and make fewer mistakes
  • Need transparent reasoning and explicit uncertainty handling
  • Value minimal, surgical code changes over "improvements"
  • Want goal-driven execution with verifiable checkpoints
  • Work on projects where data integrity is critical

This is NOT:

  • A project template (no scaffolding, no CI/CD, no tech stack)
  • An application framework
  • A replacement for domain-specific instructions

Quick Start

# For Claude Code
curl -o CLAUDE.md https://raw.githubusercontent.com/AIPMAndy/AndySoul/main/CLAUDE.md

# For Cursor / Codex
curl -o .cursorrules https://raw.githubusercontent.com/AIPMAndy/AndySoul/main/CLAUDE.md

# Or browse templates for specific use cases
curl -O https://raw.githubusercontent.com/AIPMAndy/AndySoul/main/TEMPLATES.md

How to Use

For Claude Code

Copy CLAUDE.md to your project root:

curl -o CLAUDE.md https://raw.githubusercontent.com/AIPMAndy/AndySoul/main/CLAUDE.md

Claude Code will automatically load it.

For Cursor / Codex

Copy as .cursorrules:

curl -o .cursorrules https://raw.githubusercontent.com/AIPMAndy/AndySoul/main/CLAUDE.md

For Other AI Agents

Copy the content and adapt to your agent's configuration format (system prompt, instruction file, etc.).

Customize

Edit the file to add your:

  • Tech stack and locked dependencies
  • Project-specific rules and conventions
  • Team workflow and git practices
  • Domain knowledge and edge cases

The file is modular - keep what fits your workflow, remove what doesn't.

Documentation

  • 📖 Templates - 6 pre-configured templates for different use cases
  • 💡 Examples - Before/after comparisons showing real behavior changes
  • 🇨🇳 中文文档 - Complete Chinese documentation

What Makes This Different

Most prompt engineering focuses on "how to code." This focuses on "how to think" before coding:

  1. Cognitive Foundation: Grounded in universal principles (entropy, evolution, emergence) rather than coding conventions
  2. Question-First Culture: Challenges requirements systematically (Musk's method)
  3. Surgical Precision: Only touch what must change (Karpathy's principles)
  4. Verified Execution: Every step has a success criterion
  5. Transparent Uncertainty: Never guess or beautify data

Key Concepts

First Principles Thinking

Strip away conventions and analogies. Derive solutions from fundamental truths (physics, math, logic).

5-Step Execution Priority

  1. Question necessity
  2. Delete non-essentials
  3. Simplify what remains
  4. Accelerate cycles
  5. Automate last

Data Integrity

  • Never guess from unclear images
  • Never beautify data for reports
  • Always show calculation process
  • Admit errors immediately

Surgical Changes

  • Each line change traces to user request
  • Match existing style exactly
  • Don't "improve" adjacent code
  • Only clean up orphans from your changes

Examples

Before (typical LLM behavior):

User: "Add validation to the login form"
AI: [Adds validation + refactors form + updates styles + adds unused error states]

After (with AndySoul):

User: "Add validation to the login form"
AI: "I'll add email/password validation. Plan:
1. Add validation rules → Test with invalid inputs
2. Show error messages → Test error display
3. Prevent submission on invalid → Test submit blocking

Should I also handle edge cases like empty strings, or just basic format validation?"
[Makes only the requested changes, matching existing code style]

See EXAMPLES.md for 5 detailed before/after comparisons.

Tradeoffs

These guidelines bias toward caution over speed. They are designed for:

  • Non-trivial features
  • Production systems
  • Code with long-term maintenance
  • Projects with multiple contributors

For simple typos or one-line fixes, use your judgment.

Star History

If this helped you, consider giving it a star ⭐

Community

Related Work

  • Karpathy's observations: Tweet thread on LLM coding mistakes
  • Musk's engineering methodology: First principles thinking from SpaceX/Tesla manufacturing
  • BMAD-METHOD: For full SDLC workflow (PM → Architect → Dev → QA)
  • claude-code-bmad-foundation: Template that combines Karpathy + BMAD

Contributing

This is a living document. If you find improvements:

  1. Open an issue with your use case
  2. Share what worked and what didn't
  3. Suggest additions with clear reasoning

License

MIT - Use freely, modify as needed, no attribution required.

Acknowledgments

  • Andrej Karpathy: For surfacing common LLM coding failure modes
  • Elon Musk: For the 5-step engineering methodology
  • First principles thinkers: For the cognitive foundation

Not affiliated with Anthropic, OpenAI, Cursor, or any AI company.
Just one developer's attempt to make AI coding agents more systematically reliable.

Support

If you find this valuable:

  • ⭐ Star the repo
  • 🐦 Share on Twitter/X
  • 💬 Share your success story in Issues
  • 🤝 Contribute improvements via PR

Explore related projects

Loading…