Quick navigation to all rules, guidelines, and resources
New to AI-assisted coding? Start with these in order:
- README.md ✅ - All 54 rules with examples and philosophy
- RULES_ONE_PAGE.md ✅ - Printable quick reference
- DAILY_CHECKLIST.md ✅ - 31-step workflow checklist
- rules/01-prompts.md ✅ - Detailed prompt engineering guide
| Rule | Title | Summary |
|---|---|---|
| 1 | Never Use Generic Prompts | Be specific, not vague |
| 2 | Always Provide Context First | Give AI full picture before task |
| 3 | Specify Output Format Explicitly | Define files, style, structure |
| 4 | Include Validation Requirements | Detail all validation rules |
| 5 | Define Success and Error Scenarios | List all possible outcomes |
| 6 | Specify Dependencies Explicitly | List available packages |
| 7 | Request Tests Upfront | Always include test requirements |
| 8 | Provide Style Guidelines | Define coding conventions |
| 9 | Use Example-Driven Prompts | Show input/output examples |
| 10 | Break Complex Tasks Into Steps | Phase-by-phase generation |
Full Details: rules/01-prompts.md
| Rule | Title | Summary |
|---|---|---|
| 11 | Humans Design, AI Implements | Clear role separation |
| 12 | One Responsibility Per File | Small, focused files |
| 13 | Interface-First Development | Define contracts first |
| 14 | Dependency Injection Over Hardcoding | Pass dependencies |
| 15 | Stateless Services | External state management |
| 16 | Separation of Concerns | Controller/Service/Repository |
| 17 | Return Types Over Throwing | Use Result<T,E> types |
| 18 | Configuration as Code | Centralized config |
Full Details: rules/02-architecture.md
| Rule | Title | Summary |
|---|---|---|
| 19 | Never Hardcode Secrets | Environment variables only |
| 20 | AI Cannot Write Security-Critical Code Alone | Human oversight required |
| 21 | Validate All Inputs | Zod/Joi schemas |
| 22 | Use Parameterized Queries Only | Prevent SQL injection |
| 23 | Sanitize All Output | Prevent XSS |
| 24 | Implement Rate Limiting | Protect endpoints |
| 25 | Hash Passwords Correctly | bcrypt cost 12+ |
| 26 | Secure JWT Tokens | Short-lived, rotated |
| 27 | Apply Defense in Depth | Multiple security layers |
| 28 | Log Security Events | Audit trail |
Full Details: rules/03-security.md
| Rule | Title | Summary |
|---|---|---|
| 29 | Explicit Over Implicit | Clear types and names |
| 30 | Small Functions | Under 50 lines |
| 31 | No Magic Numbers | Use named constants |
| 32 | Meaningful Variable Names | Descriptive, not generic |
| 33 | DRY (Don't Repeat Yourself) | Extract reusable code |
| 34 | Comment Why, Not What | Explain reasoning |
| 35 | Handle Errors Gracefully | Specific error handling |
| 36 | Use TypeScript Strictly | No any types |
Full Details: README.md (Detailed doc coming soon)
| Rule | Title | Summary |
|---|---|---|
| 37 | Test Everything AI Generates | 90%+ coverage |
| 38 | Test Business Logic, Not Framework | Focus on your code |
| 39 | Arrange-Act-Assert Pattern | Clear test structure |
| 40 | Test Edge Cases | Boundaries and errors |
| 41 | Use Descriptive Test Names | Clear what's tested |
| 42 | Mock External Services | Isolate tests |
Full Details: README.md (Detailed doc coming soon)
| Rule | Title | Summary |
|---|---|---|
| 43 | Consistent File Structure | Standard project layout |
| 44 | AI Code in Separate Directory | Review before merge |
| 45 | Group by Feature, Not Type | Feature-based folders |
| 46 | Shared Code in Common Directory | Centralize utilities |
Full Details: AI_CODING_RULES_COMPLETE.md
| Rule | Title | Summary |
|---|---|---|
| 47 | Human Always Reviews First | No auto-deploy |
| 48 | Use Code Review Checklist | Standardized reviews |
| 49 | AI Code Gets Stricter Linting | Higher standards |
| 50 | Document AI Generation | Track AI involvement |
Full Details: AI_CODING_RULES_COMPLETE.md
| Rule | Title | Summary |
|---|---|---|
| 51 | Meaningful Commit Messages | Conventional commits |
| 52 | Small, Focused Commits | Logical units |
| 53 | Tag AI-Generated Commits | Clear attribution |
| 54 | Branch Strategy for AI Code | Feature branches |
Full Details: AI_CODING_RULES_COMPLETE.md
Must follow for security and reliability:
- Rule 19: Never hardcode secrets
- Rule 20: AI cannot write security-critical code alone
- Rule 21: Validate all inputs
- Rule 22: Use parameterized queries only
- Rule 37: Test everything AI generates
- Rule 47: Human always reviews first
Essential for quality:
- Rule 2: Always provide context first
- Rule 11: Humans design, AI implements
- Rule 30: Small functions
- Rule 44: AI code in separate directory
- Rule 48: Use code review checklist
For optimal results:
- All other rules in the list
| Template | Status | Use Case | Location |
|---|---|---|---|
| Backend Starter | ✅ Complete | REST API endpoints | prompts/templates/backend-starter.md |
| Frontend Component | 📝 Placeholder | React components | prompts/templates/frontend-component.md |
| Integration Builder | 📝 Placeholder | Slack/Notion bots | prompts/templates/integration-builder.md |
| Growth Playbook | 📝 Placeholder | Landing pages | prompts/templates/growth-playbook.md |
| Workflow | Status | Duration | Location |
|---|---|---|---|
| API Generator | 📝 Placeholder | 30-60 min | workflows/api-generator.md |
| Landing Page Builder | 📝 Placeholder | 45 min | workflows/landing-page-builder.md |
| Slack Bot Builder | 📝 Placeholder | 60 min | workflows/slack-bot-builder.md |
| SEO Content Generator | 📝 Placeholder | 30 min | workflows/seo-content-generator.md |
| Tool | Status | Purpose | Usage |
|---|---|---|---|
| lint-ai-code.js | ✅ Complete | Stricter linting for AI code | node tools/lint-ai-code.js <dir> |
| pre-commit-hook.sh | ✅ Complete | Git pre-commit security checks | cp tools/pre-commit-hook.sh .git/hooks/pre-commit |
| prompt-validator.py | ✅ Complete | Validate prompt templates | python tools/prompt-validator.py <template> |
# Validate a prompt template (Rule 1-10)
python tools/prompt-validator.py prompts/templates/backend-starter.md
# Lint AI-generated code with stricter rules (Rule 49)
node tools/lint-ai-code.js ai-generated/my-feature
# Install pre-commit hook (checks for secrets - Rule 19)
cp tools/pre-commit-hook.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit- README.md - All 54 rules with examples
- RULES_ONE_PAGE.md - Printable quick reference
- DAILY_CHECKLIST.md - 31-step workflow
- CLAUDE.md - AI assistant guidance
- CONTRIBUTING.md - How to contribute
- LICENSE - MIT License
- rules/01-prompts.md ✅ - Prompt engineering (Rules 1-10)
- rules/02-architecture.md ✅ - Architecture (Rules 11-18)
- rules/03-security.md ✅ - Security (Rules 19-28)
- rules/04-testing.md ✅ - Code quality & Testing (Rules 29-42)
- rules/05-file-structure.md ✅ - File org & Review (Rules 43-50)
- rules/06-version-control.md ✅ - Version control (Rules 51-54)
- rules/07-frontend.md 📝 - Frontend development
- rules/08-backend.md 📝 - Backend development
- rules/09-growth.md 📝 - Growth & marketing
- rules/10-integrations.md 📝 - Integrations
- prompts/templates/backend-starter.md ✅ - Complete API template
- prompts/templates/frontend-component.md ✅ - Complete component template
- prompts/templates/integration-builder.md ✅ - Complete integration template
- prompts/templates/growth-playbook.md ✅ - Complete growth template
- workflows/api-generator.md ✅ - Complete API workflow
- workflows/landing-page-builder.md ✅ - Complete landing page workflow
- workflows/slack-bot-builder.md ✅ - Complete Slack bot workflow
- workflows/seo-content-generator.md ✅ - Complete SEO workflow
- Read README.md
- Follow QUICK_START.md
- Study RULES_ONE_PAGE.md
- Try backend-starter.md
- Use DAILY_CHECKLIST.md
- Read 01-prompts.md in depth
- Read 02-architecture.md
- Follow api-generator.md
- Review security rules
- Practice with real projects
- Read AI_CODING_RULES_COMPLETE.md
- Customize templates for your stack
- Create team-specific workflows
- Contribute improvements
- Mentor others
- Read: backend-starter.md
- Follow: api-generator.md
- Check: 03-security.md
- Use: DAILY_CHECKLIST.md
- Use: DAILY_CHECKLIST.md
- Check: Security Rules (19-28)
- Verify: Code Quality Rules (29-36)
- Run:
npm run lint:ai-code && npm test
- Read: STRUCTURE.md
- Follow: 02-architecture.md
- Setup: Project structure
- Customize: Templates for your stack
- Read: 01-prompts.md
- Use: Template structure
- Follow: Rules 1-10
- Iterate: Based on results
Track these to measure success:
- Functions < 50 lines: 100%
- Test coverage: > 90%
- TypeScript strict: Enabled
- Linting errors: 0
- Hardcoded secrets: 0
- Security warnings: 0
- Code review coverage: 100%
- Vulnerability count: 0
- Time to build API: < 1 hour
- Code review time: < 30 min
- Bug rate: < 5%
- Deployment frequency: ↑
ai-coding-rules/
│
├── 📖 CORE DOCS (Start Here)
│ ├── README.md ⭐ All 54 rules
│ ├── QUICK_START.md ⭐ 5-minute setup
│ ├── RULES_ONE_PAGE.md ⭐ Printable reference
│ ├── DAILY_CHECKLIST.md ⭐ Daily workflow
│ ├── INDEX.md ⭐ This file
│ ├── SETUP.md Publishing guide
│ ├── STRUCTURE.md Repo organization
│ ├── CONTRIBUTING.md How to contribute
│ └── LICENSE MIT License
│
├── 📋 RULES (Detailed Guidelines)
│ └── rules/
│ ├── 01-prompts.md ✅ Complete
│ ├── 02-architecture.md ✅ Complete
│ └── 03-security.md ✅ Complete
│
├── 📝 TEMPLATES (Reusable Prompts)
│ └── prompts/templates/
│ └── backend-starter.md ✅ Complete
│
├── 🔄 WORKFLOWS (Step-by-Step)
│ └── workflows/
│ └── api-generator.md ✅ Complete
│
├── ⚙️ CONFIG (Setup Files)
│ ├── package.json ✅ Complete
│ ├── .eslintrc.js ✅ Complete
│ └── .gitignore ✅ Complete
│
└── 📁 DIRECTORIES (Ready for Content)
├── examples/ 🚧 Add your examples
├── tools/ 🚧 Add helper scripts
└── ai-generated/ 🚧 AI output staging
Q: Where do I start? A: QUICK_START.md
Q: How do I write a good prompt? A: rules/01-prompts.md
Q: Is this secure? A: rules/03-security.md
Q: What's the workflow? A: workflows/api-generator.md
Q: How do I contribute? A: CONTRIBUTING.md
Q: Can I print a quick reference? A: RULES_ONE_PAGE.md
- Documentation Issues: Open GitHub issue
- Questions: GitHub Discussions
- Security Concerns: Email maintainers
- Feature Requests: GitHub Issues
Last Updated: 2025-10-15
Total Rules: 54 Documentation Pages: 10+ Templates: 1 (more coming) Workflows: 1 (more coming)