SrikanthVemulapally/ai-native-boilerplate

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

srikanthvemulapally.github.io/ai-native-boilerplate
accessibility
ai-agents
ai-coding
ai-native
boilerplate
claude-code
claude-hooks
cloudflare-workers
coding-discipline
compliance
design-system
developer-tools
gdpr
llm
saas-boilerplate
shadcn-ui
starter-kit
stripe
tailwindcss
tauri

README

AI-Native Boilerplate

AI-Native Boilerplate

Discipline for AI agents building serious software.
Stop AI drift. Enforce architecture. Save millions of tokens.

GitHub Stars GitHub Forks MIT License Issues Buy Me a Coffee

Quick Start · Architecture · What's Inside · Design System · Compliance · Extending · Cheatsheet


The Problem

You start coding with Claude. It's fast. It's fun. Then the codebase grows.

  • AI writes code that contradicts your architecture — every session
  • Requirements drift from implementation silently
  • Every session re-explains the same context, burning tokens
  • Patterns diverge across files with no enforcement
  • Decisions get re-litigated because nobody wrote them down
  • Features ship without tests because nothing enforced it
  • UI looks different on every page — no design discipline
  • Security, compliance, accessibility — afterthoughts

This boilerplate is the discipline layer that prevents all of that.


What It Is

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.

Why you'll save millions of tokens

ModeRules Loaded~TokensUse When
Minimal7~2KPrototypes, hackathons
Web-only~20~9KStandard SaaS web app
Agent+Web~24~10.5KDesktop agent + web admin
Full-stack~30~13KEverything enabled, large team

The generator concatenates content into a single CLAUDE.md — one read, zero import overhead, zero wasted context on irrelevant rules.


The Architecture

┌─────────────────────────────────────────────────────────────┐
│  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.


What's Inside

Discipline & Enforcement

ComponentCountWhat It Does
Core rules12Principles, security, git, MDD, discipline lifecycle, conventions, NFRs, testing, deployment, worktrees, multi-agent
Slash commands27/implement /review /commit /scaffold /debug /test /diagnose /preflight /release /audit /migrate /refactor /simplify and more
Lifecycle hooks16Block dangerous commands, auto-format, spec alignment, quality gate, eval compliance, file length guard, context handoff, env var docs
Git hooks3Pre-commit (secrets, lint, types), commit-msg (conventional), pre-push (protect main, tests)
Specialist agents4code-reviewer, security-auditor, test-writer, fullstack-builder
Doc templates8SPEC, ARCHITECTURE, DESIGN, DECISIONS, CHANGELOG, RUNBOOK, ROADMAP, API

Design System (15 rule files)

RuleCovers
design-system.mdMandatory stack (Tailwind + shadcn/ui + Framer Motion), Nielsen's 10 heuristics, 7-step design process
tokens.mdThree-tier token architecture (primitive → semantic → component), OKLCH color
typography.mdInter default, type scale, font pairing, self-hosted loading, tabular numbers
color.mdColor psychology by industry, 7 base palettes, custom primary, dark mode, WCAG contrast
components.mdFull shadcn/ui catalog, CVA variant pattern, button decision tree, composition rules
page-types.mdLanding page (hero→CTA→pricing), admin dashboard, auth, settings, list/detail
states.mdAll 4 states mandatory (skeleton with shimmer, empty with CTA, error hierarchy, success)
animation.mdDuration scale, spring physics, Framer Motion patterns, prefers-reduced-motion
accessibility.mdWCAG 2.2 AA checklist, semantic HTML, ARIA, keyboard nav, focus management
ux-patterns.mdOnboarding, conversion, forms, search, data viz, notifications, mobile, trust, UX writing
agent-ux.mdSystem tray, auto-update flow, background operations, permissions, desktop patterns
responsive.mdFluid typography, container queries, responsive nav, tables, CLS prevention
performance.mdCore Web Vitals (LCP/INP/CLS), bundle budgets, code splitting, font performance
error-pages.md404, 500, 403, offline, maintenance — with escape routes and Sentry IDs
email-templates.mdreact-email + Resend, 10 required transactional emails, dark mode, bulletproof CTA

Compliance (configurable)

RegulationWhen to Enable
GDPR + DPDPAEU/UK/India users
PCI DSSPayments (auto-loaded if payments: true)
SOC 2 Type IIEnterprise sales
HIPAAHealthcare / PHI
EU AI ActAI features to EU

Cross-Platform

  • Desktop: macOS (Intel + Apple Silicon), Windows, Linux (AppImage + .deb + .rpm)
  • Web: Chrome, Firefox, Safari (WebKit), mobile Chrome, iPhone 13
  • Mobile web: viewport, touch targets, iOS keyboard, PWA, offline UX
  • CI: cross-browser E2E matrix on every PR

AI-Native Git Discipline

  • Trunk-based or GitFlow — configurable
  • Experiment branches (exp/) — try uncertain approaches, delete without guilt
  • Checkpoint commits — logical units, not one giant commit
  • Scope-creep check — flag anything in the diff that wasn't requested
  • Work-free review loop — AI branches → implements → PRs. Human just reviews.
  • Git worktrees — parallel agents get isolated working directories
  • Feature flags > long branches — merge behind a flag, not a weeks-old branch

Testing & Auto-Eval Compliance

  • Red Gate / Green Gate — tests must fail before implementation, pass after
  • Minimum 3 assertions per test (URL + visibility + data)
  • Test co-locationComponent.test.tsx next to Component.tsx
  • File length guard — warns at 300 lines, blocks at 500
  • Eval compliance gate — AI features without evals can't ship
  • Eval regression detection — score drop = blocked merge
  • Eval runner template — TypeScript runner with LLM-as-judge hook

Getting Started

New project from this boilerplate

# 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.

Manual setup

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

One config file controls everything

{
  "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.


Profiles

ProfileWhat it isRules
web-onlyWeb SaaS only~20
agent-webDesktop agent + web admin~24
api-onlyHeadless API / microservice~14
full-stackEverything~30
minimalPrototype / hackathon7

agent-web enforces auto-update as mandatory. An agent without auto-update is not shippable.


Extensibility

See EXTENDING.md for the full guide. Quick version:

  • New stack? One .md file + one line in generator
  • New feature? One .md file + one line in generator
  • Override anything? Drop .md in rules/custom/ — loads last, always wins
  • New profile? One .json file
  • New command? Drop .md in .claude/commands/ — immediately available

Works with: Claude Code (native) · Cursor (.cursorrules) · Windsurf (.windsurfrules) · Copilot (.github/copilot-instructions.md) · Cline (.clinerules)


Quick Reference

See CHEATSHEET.md for the one-page scannable reference of all commands, hooks, and rules.


Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.


License

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.

Contributors

SrikanthVemulapally/ai-native-boilerplate

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

srikanthvemulapally.github.io/ai-native-boilerplate
accessibility
ai-agents
ai-coding
ai-native
boilerplate
claude-code
claude-hooks
cloudflare-workers
coding-discipline
compliance
design-system
developer-tools
gdpr
llm
saas-boilerplate
shadcn-ui
starter-kit
stripe
tailwindcss
tauri

README

AI-Native Boilerplate

AI-Native Boilerplate

Discipline for AI agents building serious software.
Stop AI drift. Enforce architecture. Save millions of tokens.

GitHub Stars GitHub Forks MIT License Issues Buy Me a Coffee

Quick Start · Architecture · What's Inside · Design System · Compliance · Extending · Cheatsheet


The Problem

You start coding with Claude. It's fast. It's fun. Then the codebase grows.

  • AI writes code that contradicts your architecture — every session
  • Requirements drift from implementation silently
  • Every session re-explains the same context, burning tokens
  • Patterns diverge across files with no enforcement
  • Decisions get re-litigated because nobody wrote them down
  • Features ship without tests because nothing enforced it
  • UI looks different on every page — no design discipline
  • Security, compliance, accessibility — afterthoughts

This boilerplate is the discipline layer that prevents all of that.


What It Is

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.

Why you'll save millions of tokens

ModeRules Loaded~TokensUse When
Minimal7~2KPrototypes, hackathons
Web-only~20~9KStandard SaaS web app
Agent+Web~24~10.5KDesktop agent + web admin
Full-stack~30~13KEverything enabled, large team

The generator concatenates content into a single CLAUDE.md — one read, zero import overhead, zero wasted context on irrelevant rules.


The Architecture

┌─────────────────────────────────────────────────────────────┐
│  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.


What's Inside

Discipline & Enforcement

ComponentCountWhat It Does
Core rules12Principles, security, git, MDD, discipline lifecycle, conventions, NFRs, testing, deployment, worktrees, multi-agent
Slash commands27/implement /review /commit /scaffold /debug /test /diagnose /preflight /release /audit /migrate /refactor /simplify and more
Lifecycle hooks16Block dangerous commands, auto-format, spec alignment, quality gate, eval compliance, file length guard, context handoff, env var docs
Git hooks3Pre-commit (secrets, lint, types), commit-msg (conventional), pre-push (protect main, tests)
Specialist agents4code-reviewer, security-auditor, test-writer, fullstack-builder
Doc templates8SPEC, ARCHITECTURE, DESIGN, DECISIONS, CHANGELOG, RUNBOOK, ROADMAP, API

Design System (15 rule files)

RuleCovers
design-system.mdMandatory stack (Tailwind + shadcn/ui + Framer Motion), Nielsen's 10 heuristics, 7-step design process
tokens.mdThree-tier token architecture (primitive → semantic → component), OKLCH color
typography.mdInter default, type scale, font pairing, self-hosted loading, tabular numbers
color.mdColor psychology by industry, 7 base palettes, custom primary, dark mode, WCAG contrast
components.mdFull shadcn/ui catalog, CVA variant pattern, button decision tree, composition rules
page-types.mdLanding page (hero→CTA→pricing), admin dashboard, auth, settings, list/detail
states.mdAll 4 states mandatory (skeleton with shimmer, empty with CTA, error hierarchy, success)
animation.mdDuration scale, spring physics, Framer Motion patterns, prefers-reduced-motion
accessibility.mdWCAG 2.2 AA checklist, semantic HTML, ARIA, keyboard nav, focus management
ux-patterns.mdOnboarding, conversion, forms, search, data viz, notifications, mobile, trust, UX writing
agent-ux.mdSystem tray, auto-update flow, background operations, permissions, desktop patterns
responsive.mdFluid typography, container queries, responsive nav, tables, CLS prevention
performance.mdCore Web Vitals (LCP/INP/CLS), bundle budgets, code splitting, font performance
error-pages.md404, 500, 403, offline, maintenance — with escape routes and Sentry IDs
email-templates.mdreact-email + Resend, 10 required transactional emails, dark mode, bulletproof CTA

Compliance (configurable)

RegulationWhen to Enable
GDPR + DPDPAEU/UK/India users
PCI DSSPayments (auto-loaded if payments: true)
SOC 2 Type IIEnterprise sales
HIPAAHealthcare / PHI
EU AI ActAI features to EU

Cross-Platform

  • Desktop: macOS (Intel + Apple Silicon), Windows, Linux (AppImage + .deb + .rpm)
  • Web: Chrome, Firefox, Safari (WebKit), mobile Chrome, iPhone 13
  • Mobile web: viewport, touch targets, iOS keyboard, PWA, offline UX
  • CI: cross-browser E2E matrix on every PR

AI-Native Git Discipline

  • Trunk-based or GitFlow — configurable
  • Experiment branches (exp/) — try uncertain approaches, delete without guilt
  • Checkpoint commits — logical units, not one giant commit
  • Scope-creep check — flag anything in the diff that wasn't requested
  • Work-free review loop — AI branches → implements → PRs. Human just reviews.
  • Git worktrees — parallel agents get isolated working directories
  • Feature flags > long branches — merge behind a flag, not a weeks-old branch

Testing & Auto-Eval Compliance

  • Red Gate / Green Gate — tests must fail before implementation, pass after
  • Minimum 3 assertions per test (URL + visibility + data)
  • Test co-locationComponent.test.tsx next to Component.tsx
  • File length guard — warns at 300 lines, blocks at 500
  • Eval compliance gate — AI features without evals can't ship
  • Eval regression detection — score drop = blocked merge
  • Eval runner template — TypeScript runner with LLM-as-judge hook

Getting Started

New project from this boilerplate

# 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.

Manual setup

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

One config file controls everything

{
  "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.


Profiles

ProfileWhat it isRules
web-onlyWeb SaaS only~20
agent-webDesktop agent + web admin~24
api-onlyHeadless API / microservice~14
full-stackEverything~30
minimalPrototype / hackathon7

agent-web enforces auto-update as mandatory. An agent without auto-update is not shippable.


Extensibility

See EXTENDING.md for the full guide. Quick version:

  • New stack? One .md file + one line in generator
  • New feature? One .md file + one line in generator
  • Override anything? Drop .md in rules/custom/ — loads last, always wins
  • New profile? One .json file
  • New command? Drop .md in .claude/commands/ — immediately available

Works with: Claude Code (native) · Cursor (.cursorrules) · Windsurf (.windsurfrules) · Copilot (.github/copilot-instructions.md) · Cline (.clinerules)


Quick Reference

See CHEATSHEET.md for the one-page scannable reference of all commands, hooks, and rules.


Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.


License

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.

Contributors

Languages

Shell

47.1%

JavaScript

23.6%

HTML

17.0%

TypeScript

12.2%