Skip to Content
What Gets Generated

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:

FragmentIncluded When
baseAlways — core coding standards
nextjs-app-routerNext.js + App Router detected
nextjs-pages-routerNext.js + Pages Router detected
sitecore-xmcSitecore XM Cloud or JSS detected
tailwindTailwind CSS detected
typescripttsconfig.json exists
monorepoTurborepo, Nx, Lerna, or workspaces detected
figmaFigma 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:

LevelBehavior
Standard (default)Follow rules by default, use judgment for edge cases
StrictEnforce all rules strictly. No exceptions without explicit approval. Zero tolerance for any types, missing tests, or accessibility gaps
RelaxedRules 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.md

These 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:

FileApplies To
base.mdc**/* — all files
nextjs-app-router.mdcapp/**/*.{ts,tsx}, src/app/**/*.{ts,tsx}
nextjs-pages-router.mdcpages/**/*.{ts,tsx}, src/pages/**/*.{ts,tsx}
sitecore-xmc.mdcsrc/components/**/*.{ts,tsx}
tailwind.mdc**/*.{tsx,jsx,css}
typescript.mdc**/*.{ts,tsx}
monorepo.mdc**/*
figma.mdcsrc/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.

CategorySkills
Buildingprompt-help, understand, new-component, new-page, api-route, error-boundary, extract-hook, figma-to-code, design-tokens, schema-gen, storybook-gen, scaffold-spec
Quality & Reviewreview, pre-pr, test, accessibility-audit, security-check, responsive-check, type-fix, perf-audit, bundle-check, i18n-check, test-gaps
Maintenancefix-bug, refactor, optimize, migrate, dep-check, sitecore-debug, upgrade
Workflowdocument, commit-msg, env-setup, changelog, release, pr-description, standup, learn-from-pr, release-notes
Sessionsave-session, resume-session, checkpoint
Orchestrationorchestrate, quality-gate, harness-audit
Requirementsdeep-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:

AgentPurposeConditional
planner.mdBreak features into implementation plansNo
code-reviewer.mdDeep code review for quality, patterns, securityNo
security-reviewer.mdSecurity-focused audit (OWASP Top 10)No
e2e-runner.mdPlaywright E2E tests with Page Object ModelYes — only if Playwright installed
build-resolver.mdDiagnose and fix build/type errorsNo
doc-updater.mdKeep documentation in sync with codeNo
refactor-cleaner.mdFind and remove dead codeNo
tdd-guide.mdTest-driven development guidance and workflowNo
ci-debugger.mdCI/CD failure debugger — analyzes logs and suggests fixesNo
sitecore-specialist.mdSitecore XM Cloud patterns and debuggingYes — only if Sitecore detected
architect.mdSystem design — SSR/SSG/ISR strategy, component hierarchy, data flowNo
data-scientist.mdML pipelines, model evaluation, data analysis, experiment trackingNo
performance-profiler.mdCore Web Vitals, bundle analysis, runtime profilingNo
migration-specialist.mdFramework upgrades, breaking change detection, codemodsNo
dependency-auditor.mdOutdated packages, vulnerability scanning, license complianceNo
api-designer.mdREST/GraphQL API design, schema validation, versioningNo

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:

FileModeFocus
dev.mdDevelopmentBuilding features — implementation over perfection
review.mdReviewQuality — security, accessibility, types, performance
research.mdResearchUnderstanding — 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/.tsx edits
  • 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 any types, 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:

GuideContent
getting-started.mdHow to start using AI Kit in your daily workflow
prompt-playbook.mdPrompt templates for common tasks
when-to-use-ai.mdDecision framework for AI vs manual coding
token-saving-tips.mdHow to reduce token usage and costs
figma-workflow.mdEnd-to-end Figma-to-code with AI assistance
hooks-and-agents.mdGuide 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:

DataHow It’s Extracted
Component nameParsed from export statement or filename
Props & typesExtracted from interface XxxProps or type XxxProps
Export typeDefault, named, or both
Sitecore integrationuseSitecoreContext, datasource fields, rendering params, placeholders, GraphQL queries
DependenciesLocal component imports (PascalCase relative imports)
Test coverageChecks for .test.tsx, .spec.tsx, or __tests__/ files
Storybook coverageChecks for .stories.tsx files
Existing AI docsChecks for .ai.md files
CategoryAuto-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:

FilePurpose
mistakes-log.mdTrack AI-related mistakes and lessons learned
decisions-log.mdLog architectural decisions and rationale
time-log.mdTrack 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.

Last updated on