What Gets Generated
AI Kit generates multiple files tailored to your project’s detected tech stack. Here’s a detailed breakdown of each.
CLAUDE.md
The primary rules file for Claude Code. This is the most important generated file — Claude Code reads it automatically when you open a project.
Structure
<!-- AI-KIT:START -->
<!-- Generated by ai-kit v1.0.0 -->
# ProjectName — AI Assistant Rules
> Auto-generated by ai-kit
> Tech Stack: Next.js 15 · Sitecore XM Cloud · TypeScript · Tailwind CSS
---
# Core Rules (always included)
## Workflow, Naming, Structure, Docs, Testing, Safety...
---
# Next.js App Router (included if detected)
## Server Components, Server Actions, Data Fetching...
---
# Sitecore XM Cloud (included if detected)
## Component Patterns, Field Helpers, GraphQL...
---
# Tailwind CSS (included if detected)
## Utility Patterns, Design Tokens...
---
# TypeScript (included if detected)
## Strict Typing, Generics, Type Guards...
<!-- AI-KIT:END -->Fragment Selection
The content is assembled from template fragments based on your scan:
| Fragment | Included When |
|---|---|
base | Always — core coding standards |
nextjs-app-router | Next.js + App Router detected |
nextjs-pages-router | Next.js + Pages Router detected |
sitecore-xmc | Sitecore XM Cloud or JSS detected |
tailwind | Tailwind CSS detected |
typescript | tsconfig.json exists |
monorepo | Turborepo, Nx, Lerna, or workspaces detected |
figma | Figma MCP, design tokens, or figma-code-cli detected |
Strictness Levels
During ai-kit init, you choose a strictness level that controls how the AI enforces rules:
| Level | Behavior |
|---|---|
| Standard (default) | Follow rules by default, use judgment for edge cases |
| Strict | Enforce all rules strictly. No exceptions without explicit approval. Zero tolerance for any types, missing tests, or accessibility gaps |
| Relaxed | Rules are guidelines, not hard requirements. Prioritize shipping speed over perfection |
The strictness level is appended to the generated CLAUDE.md and .cursorrules files as a directive.
Custom Fragments
You can add your own rule fragments by creating markdown files in .ai-kit/fragments/:
.ai-kit/
fragments/
team-conventions.md
api-standards.md
design-system.mdThese are automatically detected and appended to the generated CLAUDE.md and .cursorrules files during ai-kit init and ai-kit update. This lets you add project-specific rules without modifying the generated sections.
What the Base Rules Cover
- Workflow: Read before writing, understand before coding, ask when unclear
- Naming conventions: PascalCase components, camelCase hooks, UPPER_SNAKE constants
- Component structure: 200-line limit, colocated files, separated logic
- Documentation: Doc files for complex components (>50 lines or >3 props)
- Import order: External → internal → local → type imports
- Error handling: Always show error states, use error boundaries
- Accessibility: Semantic HTML, ARIA labels, keyboard nav, color contrast
- Git practices: Conventional commits, no secrets, rebase before push
- Performance: Memoize expensive ops, lazy load, Server Components for data
- Testing: Colocated test files, behavior-driven, React Testing Library
.cursorrules
The rules file for Cursor AI. Contains the same standards as CLAUDE.md but formatted for Cursor’s consumption. Uses the same fragment selection logic.
.cursor/rules/*.mdc
Scoped rule files for Cursor’s v2 rules system. Each fragment gets its own .mdc file with targeted file globs:
| File | Applies To |
|---|---|
base.mdc | **/* — all files |
nextjs-app-router.mdc | app/**/*.{ts,tsx}, src/app/**/*.{ts,tsx} |
nextjs-pages-router.mdc | pages/**/*.{ts,tsx}, src/pages/**/*.{ts,tsx} |
sitecore-xmc.mdc | src/components/**/*.{ts,tsx} |
tailwind.mdc | **/*.{tsx,jsx,css} |
typescript.mdc | **/*.{ts,tsx} |
monorepo.mdc | **/* |
figma.mdc | src/components/**/*.{ts,tsx}, tokens/**/* |
Each .mdc file has frontmatter:
---
description: Next.js App Router patterns and best practices
globs: app/**/*.{ts,tsx}, src/app/**/*.{ts,tsx}
alwaysApply: true
---This means Cursor only loads relevant rules when you’re editing a specific file type — reducing context noise.
.claude/skills/ and .cursor/skills/
48 skills generated for both Claude Code and Cursor. Each skill lives in its own subdirectory with a SKILL.md file:
.claude/skills/
new-component/SKILL.md
review/SKILL.md
pre-pr/SKILL.md
test/SKILL.md
fix-bug/SKILL.md
...
.cursor/skills/
new-component/SKILL.md
review/SKILL.md
pre-pr/SKILL.md
test/SKILL.md
fix-bug/SKILL.md
...Skills are auto-discovered — the AI reads each skill’s description at conversation start and applies the right one when your request matches, without you typing a command name. This works in both Claude Code and Cursor.
| Category | Skills |
|---|---|
| Building | prompt-help, understand, new-component, new-page, api-route, error-boundary, extract-hook, figma-to-code, design-tokens, schema-gen, storybook-gen, scaffold-spec |
| Quality & Review | review, pre-pr, test, accessibility-audit, security-check, responsive-check, type-fix, perf-audit, bundle-check, i18n-check, test-gaps |
| Maintenance | fix-bug, refactor, optimize, migrate, dep-check, sitecore-debug, upgrade |
| Workflow | document, commit-msg, env-setup, changelog, release, pr-description, standup, learn-from-pr, release-notes |
| Session | save-session, resume-session, checkpoint |
| Orchestration | orchestrate, quality-gate, harness-audit |
| Requirements | deep-interview, clarify-requirements |
.claude/commands/
Legacy slash commands for Claude Code — kept for backward compatibility with existing workflows. These are the same 48 workflows as the skills above, in the classic slash command format.
.claude/commands/
new-component.md
review.md
pre-pr.md
...If you already use /review, /pre-pr, or other slash commands, they continue to work exactly as before. The skills format is the recommended path for new usage.
See Skills & Commands for detailed usage of each workflow.
.claude/agents/
Up to 16 specialized AI agents for delegated tasks. Each agent is a markdown file with YAML frontmatter:
| Agent | Purpose | Conditional |
|---|---|---|
planner.md | Break features into implementation plans | No |
code-reviewer.md | Deep code review for quality, patterns, security | No |
security-reviewer.md | Security-focused audit (OWASP Top 10) | No |
e2e-runner.md | Playwright E2E tests with Page Object Model | Yes — only if Playwright installed |
build-resolver.md | Diagnose and fix build/type errors | No |
doc-updater.md | Keep documentation in sync with code | No |
refactor-cleaner.md | Find and remove dead code | No |
tdd-guide.md | Test-driven development guidance and workflow | No |
ci-debugger.md | CI/CD failure debugger — analyzes logs and suggests fixes | No |
sitecore-specialist.md | Sitecore XM Cloud patterns and debugging | Yes — only if Sitecore detected |
architect.md | System design — SSR/SSG/ISR strategy, component hierarchy, data flow | No |
data-scientist.md | ML pipelines, model evaluation, data analysis, experiment tracking | No |
performance-profiler.md | Core Web Vitals, bundle analysis, runtime profiling | No |
migration-specialist.md | Framework upgrades, breaking change detection, codemods | No |
dependency-auditor.md | Outdated packages, vulnerability scanning, license compliance | No |
api-designer.md | REST/GraphQL API design, schema validation, versioning | No |
Each agent has a name, description, and tools field in frontmatter that controls its capabilities. See Agents for detailed descriptions.
.claude/contexts/
Three context modes that change how the AI approaches work:
| File | Mode | Focus |
|---|---|---|
dev.md | Development | Building features — implementation over perfection |
review.md | Review | Quality — security, accessibility, types, performance |
research.md | Research | Understanding — read-only exploration and analysis |
See Context Modes for usage details.
.claude/settings.local.json
Automated hooks generated based on your chosen profile (minimal, standard, or strict). This file is gitignored by default to keep hook preferences local.
Hooks include:
- Auto-format on file edit (Prettier or Biome, auto-detected)
- TypeScript type-check after
.ts/.tsxedits - Console.log warning detection
- Mistakes auto-capture — logs build/lint failures to
docs/mistakes-log.md(standard + strict) - Bundle impact warning — warns when new dependencies are added to
package.json(standard + strict) - Git push safety reminder
- ESLint check (strict profile only)
- Pre-commit AI review — scans staged files for
anytypes,console.log, and TODOs without tickets (strict profile only)
See Hooks for profile comparison and configuration.
ai-kit/guides/
Six developer guides for effective AI-assisted development:
| Guide | Content |
|---|---|
getting-started.md | How to start using AI Kit in your daily workflow |
prompt-playbook.md | Prompt templates for common tasks |
when-to-use-ai.md | Decision framework for AI vs manual coding |
token-saving-tips.md | How to reduce token usage and costs |
figma-workflow.md | End-to-end Figma-to-code with AI assistance |
hooks-and-agents.md | Guide to hooks, agents, and context modes |
Component Scanner & Docs Generator
AI Kit includes a component scanner that discovers and analyzes all React components in your project, and a component docs generator that produces .ai.md documentation files for each one.
What it scans
The scanner looks for .tsx files in standard component directories (src/components/, components/, headapps/, app/) and extracts:
| Data | How It’s Extracted |
|---|---|
| Component name | Parsed from export statement or filename |
| Props & types | Extracted from interface XxxProps or type XxxProps |
| Export type | Default, named, or both |
| Sitecore integration | useSitecoreContext, datasource fields, rendering params, placeholders, GraphQL queries |
| Dependencies | Local component imports (PascalCase relative imports) |
| Test coverage | Checks for .test.tsx, .spec.tsx, or __tests__/ files |
| Storybook coverage | Checks for .stories.tsx files |
| Existing AI docs | Checks for .ai.md files |
| Category | Auto-categorized: layout, page, form, navigation, ui, feature, marketing, content, general |
What it generates
For each component, a ComponentName.ai.md file is created alongside the component with:
- YAML frontmatter — name, category, path, Sitecore fields, health score
- Health score (0–100) — weighted by tests (25pts), stories (20pts), props (15pts), AI docs (15pts), Sitecore integration (10pts), exports (10pts), dependencies (5pts)
- Props table with types and required flags
- Usage example with correct import style
- Sitecore integration section (if applicable) — datasource fields, rendering params, placeholders, GraphQL queries
- Dependencies — which other components it uses
- States — loading, error, empty (TODO fields for manual completion)
- Design decisions and edge cases — TODO fields for the developer
Smart merge
If a .ai.md file already exists with <!-- AI-KIT:COMPONENT-START --> / <!-- AI-KIT:COMPONENT-END --> markers, only the auto-generated section is updated. Manual edits outside the markers are preserved.
docs/ Scaffolds
Three documentation templates scaffolded into your docs/ directory:
| File | Purpose |
|---|---|
mistakes-log.md | Track AI-related mistakes and lessons learned |
decisions-log.md | Log architectural decisions and rationale |
time-log.md | Track time saved/spent using AI tools |
These are never overwritten — even on ai-kit update or re-init. They’re designed for you to fill in over time.
ai-kit.config.json
Configuration file that tracks what AI Kit generated:
{
"version": "1.2.0",
"strictness": "standard",
"hookProfile": "standard",
"customFragments": [],
"scanResult": {
"framework": "nextjs",
"nextjsVersion": "15.1.0",
"routerType": "app",
"cms": "sitecore-xmc",
"styling": ["tailwind"],
"typescript": true,
"monorepo": false,
"packageManager": "npm",
"projectName": "my-project"
},
"generatedAt": "2026-03-18T10:00:00.000Z",
"templates": ["CLAUDE.md", ".cursorrules"],
"commands": ["prompt-help", "review", "fix-bug", ...],
"guides": ["getting-started", "prompt-playbook", ...],
"agents": ["planner", "code-reviewer", "security-reviewer", ...],
"contexts": ["dev", "review", "research"],
"hooks": "standard"
}This file is used by ai-kit update to know what to refresh and by ai-kit reset to know what to remove.