Discipline for AI agents building serious software. 160+ rules across 6 layers: core discipline, design system, features, stacks, compliance, custom. Configurable, token-efficient, cross-platform. Works with Claude Code, Cursor, Windsurf, Copilot.
1
stars
9
commits
Shell
primary language
Sep 5, 2026
updated
Discipline for AI agents building serious software.
Stop AI drift. Enforce architecture. Save millions of tokens.
Quick Start · Architecture · What's Inside · Design System · Compliance · Extending · Cheatsheet
You start coding with Claude. It's fast. It's fun. Then the codebase grows.
This boilerplate is the discipline layer that prevents all of that.
A configurable, token-efficient boilerplate that gives AI coding agents (Claude Code, Cursor, Windsurf, Copilot, Cline) the rules, context, and enforcement they need to build production-grade software without drifting.
160+ files of discipline across 6 layers, loaded surgically — only what your project needs.
| Mode | Rules Loaded | ~Tokens | Use When |
|---|---|---|---|
| Minimal | 7 | ~2K | Prototypes, hackathons |
| Web-only | ~20 | ~9K | Standard SaaS web app |
| Agent+Web | ~24 | ~10.5K | Desktop agent + web admin |
| Full-stack | ~30 | ~13K | Everything enabled, large team |
The generator concatenates content into a single CLAUDE.md — one read, zero import overhead, zero wasted context on irrelevant rules.
┌─────────────────────────────────────────────────────────────┐
│ Layer 6: Compliance (GDPR · HIPAA · SOC2 · PCI · EU AI Act) │ ← Configurable per regulation
├─────────────────────────────────────────────────────────────┤
│ Layer 5: Custom Rules (.claude/rules/custom/) │ ← Your overrides. Load last. Win.
├─────────────────────────────────────────────────────────────┤
│ Layer 4: Feature Rules (.claude/rules/features/) │ ← Loaded by feature flag only
│ payments · seo · auth · auto-update · ai · i18n · realtime │
│ email · analytics · file-uploads · error-tracking · openapi │
├─────────────────────────────────────────────────────────────┤
│ Layer 3: Design System (.claude/rules/design/) │ ← UI/UX discipline (default: on)
│ tokens · typography · color · components · page-types │
│ states · animation · accessibility · ux-patterns · │
│ agent-ux · responsive · performance · error-pages · │
│ email-templates │
├─────────────────────────────────────────────────────────────┤
│ Layer 2: Stack Rules (.claude/rules/stack/) │ ← Loaded by config.stack
│ tanstack · tauri · nextjs · cloudflare · monorepo · │
│ cross-platform · mobile-web │
├─────────────────────────────────────────────────────────────┤
│ Layer 1: Core (PRINCIPLES.md + core/ rules) │ ← Always loaded. Non-negotiable.
│ principles · security · git · mdd · discipline · │
│ conventions · nfr · testing · deployment · worktrees · │
│ multi-agent │
└─────────────────────────────────────────────────────────────┘
The key insight: Claude loads ONLY what is relevant to your project. A web-only app doesn't load auto-update rules. An API-only app doesn't load SEO rules. Zero token waste.
| Component | Count | What It Does |
|---|---|---|
| Core rules | 12 | Principles, security, git, MDD, discipline lifecycle, conventions, NFRs, testing, deployment, worktrees, multi-agent |
| Slash commands | 27 | /implement /review /commit /scaffold /debug /test /diagnose /preflight /release /audit /migrate /refactor /simplify and more |
| Lifecycle hooks | 16 | Block dangerous commands, auto-format, spec alignment, quality gate, eval compliance, file length guard, context handoff, env var docs |
| Git hooks | 3 | Pre-commit (secrets, lint, types), commit-msg (conventional), pre-push (protect main, tests) |
| Specialist agents | 4 | code-reviewer, security-auditor, test-writer, fullstack-builder |
| Doc templates | 8 | SPEC, ARCHITECTURE, DESIGN, DECISIONS, CHANGELOG, RUNBOOK, ROADMAP, API |
| Rule | Covers |
|---|---|
design-system.md | Mandatory stack (Tailwind + shadcn/ui + Framer Motion), Nielsen's 10 heuristics, 7-step design process |
tokens.md | Three-tier token architecture (primitive → semantic → component), OKLCH color |
typography.md | Inter default, type scale, font pairing, self-hosted loading, tabular numbers |
color.md | Color psychology by industry, 7 base palettes, custom primary, dark mode, WCAG contrast |
components.md | Full shadcn/ui catalog, CVA variant pattern, button decision tree, composition rules |
page-types.md | Landing page (hero→CTA→pricing), admin dashboard, auth, settings, list/detail |
states.md | All 4 states mandatory (skeleton with shimmer, empty with CTA, error hierarchy, success) |
animation.md | Duration scale, spring physics, Framer Motion patterns, prefers-reduced-motion |
accessibility.md | WCAG 2.2 AA checklist, semantic HTML, ARIA, keyboard nav, focus management |
ux-patterns.md | Onboarding, conversion, forms, search, data viz, notifications, mobile, trust, UX writing |
agent-ux.md | System tray, auto-update flow, background operations, permissions, desktop patterns |
responsive.md | Fluid typography, container queries, responsive nav, tables, CLS prevention |
performance.md | Core Web Vitals (LCP/INP/CLS), bundle budgets, code splitting, font performance |
error-pages.md | 404, 500, 403, offline, maintenance — with escape routes and Sentry IDs |
email-templates.md | react-email + Resend, 10 required transactional emails, dark mode, bulletproof CTA |
| Regulation | When to Enable |
|---|---|
| GDPR + DPDPA | EU/UK/India users |
| PCI DSS | Payments (auto-loaded if payments: true) |
| SOC 2 Type II | Enterprise sales |
| HIPAA | Healthcare / PHI |
| EU AI Act | AI features to EU |
exp/) — try uncertain approaches, delete without guiltComponent.test.tsx next to Component.tsx# Clone
git clone https://github.com/SrikanthVemulapally/ai-native-boilerplate.git my-project
cd my-project
# Install & setup
pnpm install
pnpm setup # guided setup — fills config, generates CLAUDE.md, installs hooks
# Open in Claude Code
claude .
Then type /setup in Claude Code. That's it.
cp boilerplate.config.json.example boilerplate.config.json
# Edit boilerplate.config.json for your project
node scripts/generate-claude-md.js
git config core.hooksPath .githooks
chmod +x .githooks/* .claude/hooks/*.sh
{
"profile": "web-only",
"stack": { "frontend": "tanstack-start", "backend": "cloudflare-workers" },
"features": {
"payments": true,
"auth": true,
"seo": true,
"i18n": true,
"ai": false
},
"compliance": {
"gdpr": true,
"dpdpa": true,
"pci": true,
"hipaa": false,
"soc2": false,
"eu_ai_act": false
},
"designSystem": {
"headingFont": "inter",
"baseColor": "neutral",
"darkMode": "system"
},
"gitStrategy": "trunk"
}
Run node scripts/generate-claude-md.js → Claude gets exactly the rules it needs. Nothing more.
| Profile | What it is | Rules |
|---|---|---|
web-only | Web SaaS only | ~20 |
agent-web | Desktop agent + web admin | ~24 |
api-only | Headless API / microservice | ~14 |
full-stack | Everything | ~30 |
minimal | Prototype / hackathon | 7 |
agent-webenforces auto-update as mandatory. An agent without auto-update is not shippable.
See EXTENDING.md for the full guide. Quick version:
.md file + one line in generator.md file + one line in generator.md in rules/custom/ — loads last, always wins.json file.md in .claude/commands/ — immediately availableWorks with: Claude Code (native) · Cursor (.cursorrules) · Windsurf (.windsurfrules) · Copilot (.github/copilot-instructions.md) · Cline (.clinerules)
See CHEATSHEET.md for the one-page scannable reference of all commands, hooks, and rules.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT — use it, fork it, sell it, build your empire with it.
If this saved you tokens, give it a ⭐
Built by Srikanth Vemulapally · for builders who take AI-native coding seriously.
9 commits
Shell
47.1%
JavaScript
23.6%
HTML
17.0%
TypeScript
12.2%
Discipline for AI agents building serious software. 160+ rules across 6 layers: core discipline, design system, features, stacks, compliance, custom. Configurable, token-efficient, cross-platform. Works with Claude Code, Cursor, Windsurf, Copilot.
1
stars
9
commits
Shell
primary language
Sep 5, 2026
updated
Discipline for AI agents building serious software.
Stop AI drift. Enforce architecture. Save millions of tokens.
Quick Start · Architecture · What's Inside · Design System · Compliance · Extending · Cheatsheet
You start coding with Claude. It's fast. It's fun. Then the codebase grows.
This boilerplate is the discipline layer that prevents all of that.
A configurable, token-efficient boilerplate that gives AI coding agents (Claude Code, Cursor, Windsurf, Copilot, Cline) the rules, context, and enforcement they need to build production-grade software without drifting.
160+ files of discipline across 6 layers, loaded surgically — only what your project needs.
| Mode | Rules Loaded | ~Tokens | Use When |
|---|---|---|---|
| Minimal | 7 | ~2K | Prototypes, hackathons |
| Web-only | ~20 | ~9K | Standard SaaS web app |
| Agent+Web | ~24 | ~10.5K | Desktop agent + web admin |
| Full-stack | ~30 | ~13K | Everything enabled, large team |
The generator concatenates content into a single CLAUDE.md — one read, zero import overhead, zero wasted context on irrelevant rules.
┌─────────────────────────────────────────────────────────────┐
│ Layer 6: Compliance (GDPR · HIPAA · SOC2 · PCI · EU AI Act) │ ← Configurable per regulation
├─────────────────────────────────────────────────────────────┤
│ Layer 5: Custom Rules (.claude/rules/custom/) │ ← Your overrides. Load last. Win.
├─────────────────────────────────────────────────────────────┤
│ Layer 4: Feature Rules (.claude/rules/features/) │ ← Loaded by feature flag only
│ payments · seo · auth · auto-update · ai · i18n · realtime │
│ email · analytics · file-uploads · error-tracking · openapi │
├─────────────────────────────────────────────────────────────┤
│ Layer 3: Design System (.claude/rules/design/) │ ← UI/UX discipline (default: on)
│ tokens · typography · color · components · page-types │
│ states · animation · accessibility · ux-patterns · │
│ agent-ux · responsive · performance · error-pages · │
│ email-templates │
├─────────────────────────────────────────────────────────────┤
│ Layer 2: Stack Rules (.claude/rules/stack/) │ ← Loaded by config.stack
│ tanstack · tauri · nextjs · cloudflare · monorepo · │
│ cross-platform · mobile-web │
├─────────────────────────────────────────────────────────────┤
│ Layer 1: Core (PRINCIPLES.md + core/ rules) │ ← Always loaded. Non-negotiable.
│ principles · security · git · mdd · discipline · │
│ conventions · nfr · testing · deployment · worktrees · │
│ multi-agent │
└─────────────────────────────────────────────────────────────┘
The key insight: Claude loads ONLY what is relevant to your project. A web-only app doesn't load auto-update rules. An API-only app doesn't load SEO rules. Zero token waste.
| Component | Count | What It Does |
|---|---|---|
| Core rules | 12 | Principles, security, git, MDD, discipline lifecycle, conventions, NFRs, testing, deployment, worktrees, multi-agent |
| Slash commands | 27 | /implement /review /commit /scaffold /debug /test /diagnose /preflight /release /audit /migrate /refactor /simplify and more |
| Lifecycle hooks | 16 | Block dangerous commands, auto-format, spec alignment, quality gate, eval compliance, file length guard, context handoff, env var docs |
| Git hooks | 3 | Pre-commit (secrets, lint, types), commit-msg (conventional), pre-push (protect main, tests) |
| Specialist agents | 4 | code-reviewer, security-auditor, test-writer, fullstack-builder |
| Doc templates | 8 | SPEC, ARCHITECTURE, DESIGN, DECISIONS, CHANGELOG, RUNBOOK, ROADMAP, API |
| Rule | Covers |
|---|---|
design-system.md | Mandatory stack (Tailwind + shadcn/ui + Framer Motion), Nielsen's 10 heuristics, 7-step design process |
tokens.md | Three-tier token architecture (primitive → semantic → component), OKLCH color |
typography.md | Inter default, type scale, font pairing, self-hosted loading, tabular numbers |
color.md | Color psychology by industry, 7 base palettes, custom primary, dark mode, WCAG contrast |
components.md | Full shadcn/ui catalog, CVA variant pattern, button decision tree, composition rules |
page-types.md | Landing page (hero→CTA→pricing), admin dashboard, auth, settings, list/detail |
states.md | All 4 states mandatory (skeleton with shimmer, empty with CTA, error hierarchy, success) |
animation.md | Duration scale, spring physics, Framer Motion patterns, prefers-reduced-motion |
accessibility.md | WCAG 2.2 AA checklist, semantic HTML, ARIA, keyboard nav, focus management |
ux-patterns.md | Onboarding, conversion, forms, search, data viz, notifications, mobile, trust, UX writing |
agent-ux.md | System tray, auto-update flow, background operations, permissions, desktop patterns |
responsive.md | Fluid typography, container queries, responsive nav, tables, CLS prevention |
performance.md | Core Web Vitals (LCP/INP/CLS), bundle budgets, code splitting, font performance |
error-pages.md | 404, 500, 403, offline, maintenance — with escape routes and Sentry IDs |
email-templates.md | react-email + Resend, 10 required transactional emails, dark mode, bulletproof CTA |
| Regulation | When to Enable |
|---|---|
| GDPR + DPDPA | EU/UK/India users |
| PCI DSS | Payments (auto-loaded if payments: true) |
| SOC 2 Type II | Enterprise sales |
| HIPAA | Healthcare / PHI |
| EU AI Act | AI features to EU |
exp/) — try uncertain approaches, delete without guiltComponent.test.tsx next to Component.tsx# Clone
git clone https://github.com/SrikanthVemulapally/ai-native-boilerplate.git my-project
cd my-project
# Install & setup
pnpm install
pnpm setup # guided setup — fills config, generates CLAUDE.md, installs hooks
# Open in Claude Code
claude .
Then type /setup in Claude Code. That's it.
cp boilerplate.config.json.example boilerplate.config.json
# Edit boilerplate.config.json for your project
node scripts/generate-claude-md.js
git config core.hooksPath .githooks
chmod +x .githooks/* .claude/hooks/*.sh
{
"profile": "web-only",
"stack": { "frontend": "tanstack-start", "backend": "cloudflare-workers" },
"features": {
"payments": true,
"auth": true,
"seo": true,
"i18n": true,
"ai": false
},
"compliance": {
"gdpr": true,
"dpdpa": true,
"pci": true,
"hipaa": false,
"soc2": false,
"eu_ai_act": false
},
"designSystem": {
"headingFont": "inter",
"baseColor": "neutral",
"darkMode": "system"
},
"gitStrategy": "trunk"
}
Run node scripts/generate-claude-md.js → Claude gets exactly the rules it needs. Nothing more.
| Profile | What it is | Rules |
|---|---|---|
web-only | Web SaaS only | ~20 |
agent-web | Desktop agent + web admin | ~24 |
api-only | Headless API / microservice | ~14 |
full-stack | Everything | ~30 |
minimal | Prototype / hackathon | 7 |
agent-webenforces auto-update as mandatory. An agent without auto-update is not shippable.
See EXTENDING.md for the full guide. Quick version:
.md file + one line in generator.md file + one line in generator.md in rules/custom/ — loads last, always wins.json file.md in .claude/commands/ — immediately availableWorks with: Claude Code (native) · Cursor (.cursorrules) · Windsurf (.windsurfrules) · Copilot (.github/copilot-instructions.md) · Cline (.clinerules)
See CHEATSHEET.md for the one-page scannable reference of all commands, hooks, and rules.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT — use it, fork it, sell it, build your empire with it.
If this saved you tokens, give it a ⭐
Built by Srikanth Vemulapally · for builders who take AI-native coding seriously.
9 commits
Shell
47.1%
JavaScript
23.6%
HTML
17.0%
TypeScript
12.2%