Understanding Context
The CLAUDE.md file is the heart of Bootspring. It's an automatically generated context file that helps your AI assistant understand your project instantly.
What is CLAUDE.md?
CLAUDE.md is a markdown file that contains everything your AI assistant needs to know about your project:
- Project type and purpose
- Tech stack and frameworks
- File structure and conventions
- Available commands
- Development guidelines
- Custom instructions
When your AI assistant reads this file, it can provide tailored guidance specific to your project.
How Context Generation Works
When you run bootspring init or bootspring generate, Bootspring:
- Scans your project for configuration files
- Detects your tech stack from dependencies
- Analyzes project structure to understand organization
- Reads existing configs (tsconfig, eslint, etc.)
- Generates CLAUDE.md with comprehensive context
Bootspring reads your project files (package.json, tsconfig.json, source directories, etc.), analyzes and generates a CLAUDE.md file, which your AI assistant then reads to understand your project.
CLAUDE.md Structure
A typical CLAUDE.md file contains these sections:
Automatic Detection
Bootspring automatically detects many aspects of your project:
Framework Detection
| Files Detected | Framework Identified |
|---|---|
next.config.js, app/ | Next.js (App Router) |
next.config.js, pages/ | Next.js (Pages Router) |
vite.config.ts | Vite |
gatsby-config.js | Gatsby |
remix.config.js | Remix |
nuxt.config.ts | Nuxt |
angular.json | Angular |
svelte.config.js | SvelteKit |
Database Detection
| Files Detected | Database Identified |
|---|---|
prisma/schema.prisma | Prisma |
drizzle.config.ts | Drizzle |
typeorm.config.ts | TypeORM |
mongoose in package.json | MongoDB/Mongoose |
Testing Detection
| Files Detected | Framework Identified |
|---|---|
vitest.config.ts | Vitest |
jest.config.js | Jest |
playwright.config.ts | Playwright |
cypress.config.ts | Cypress |
Customizing Context
Custom Sections
Add custom sections in bootspring.config.js:
Excluding Files
Exclude sensitive or irrelevant files:
Including Additional Files
Explicitly include important files:
Regenerating Context
Context should be regenerated when your project changes significantly.
Manual Regeneration
Or ask your AI assistant:
Regenerate the CLAUDE.md context file.
Automatic Regeneration
Enable auto-regeneration in config:
When to Regenerate
Regenerate your context when:
- Adding new dependencies
- Changing project structure
- Updating configuration files
- Adding new features
- Modifying coding conventions
- Onboarding new team members
Context Best Practices
1. Keep It Current
Outdated context leads to outdated advice. Regenerate regularly:
2. Add Team Conventions
Include your team's specific patterns:
3. Document Key Patterns
Help the AI understand your patterns:
4. Include Architecture Decisions
Document important decisions:
How AI Assistants Use Context
When you interact with your AI assistant, here's what happens:
- Context Loading: The assistant reads CLAUDE.md
- Understanding: It parses your tech stack, structure, and guidelines
- Tailored Response: Advice matches your specific setup
Without Context
User: Create a button component
AI: Here's a React button component:
[Generic component with CSS classes]
With Context
User: Create a button component
AI: Based on your Next.js + Tailwind setup, here's a button
component following your existing patterns:
[Component using your design system, TypeScript,
your naming conventions, exported correctly]
Viewing Current Context
See what context is being used:
Or ask your AI:
Show me the current Bootspring context for this project.
Context and Agents
Agents use context to provide specialized advice. The context informs:
- frontend-expert: Your UI framework and styling approach
- database-expert: Your ORM and database type
- testing-expert: Your testing framework and patterns
- security-expert: Your auth setup and security requirements
Troubleshooting
"AI doesn't seem to understand my project"
- Check if CLAUDE.md exists:
ls CLAUDE.md - Regenerate context:
bootspring generate - Verify it's not in .gitignore
"Context is missing my tech stack"
Add it explicitly in config:
"Context includes sensitive information"
Add to exclusions:
Next Steps
- Using Agents - Get expert help
- Using Skills - Use code patterns
- Configuration - Full config reference