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:

  1. Scans your project for configuration files
  2. Detects your tech stack from dependencies
  3. Analyzes project structure to understand organization
  4. Reads existing configs (tsconfig, eslint, etc.)
  5. 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:

Loading code block...

Automatic Detection#

Bootspring automatically detects many aspects of your project:

Framework Detection#

Files DetectedFramework Identified
next.config.js, app/Next.js (App Router)
next.config.js, pages/Next.js (Pages Router)
vite.config.tsVite
gatsby-config.jsGatsby
remix.config.jsRemix
nuxt.config.tsNuxt
angular.jsonAngular
svelte.config.jsSvelteKit

Database Detection#

Files DetectedDatabase Identified
prisma/schema.prismaPrisma
drizzle.config.tsDrizzle
typeorm.config.tsTypeORM
mongoose in package.jsonMongoDB/Mongoose

Testing Detection#

Files DetectedFramework Identified
vitest.config.tsVitest
jest.config.jsJest
playwright.config.tsPlaywright
cypress.config.tsCypress

Customizing Context#

Custom Sections#

Add custom sections in bootspring.config.js:

Loading code block...

Excluding Files#

Exclude sensitive or irrelevant files:

Loading code block...

Including Additional Files#

Explicitly include important files:

Loading code block...

Regenerating Context#

Context should be regenerated when your project changes significantly.

Manual Regeneration#

Loading code block...

Or ask your AI assistant:

Regenerate the CLAUDE.md context file.

Automatic Regeneration#

Enable auto-regeneration in config:

Loading code block...

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:

Loading code block...

2. Add Team Conventions#

Include your team's specific patterns:

Loading code block...

3. Document Key Patterns#

Help the AI understand your patterns:

Loading code block...

4. Include Architecture Decisions#

Document important decisions:

Loading code block...

How AI Assistants Use Context#

When you interact with your AI assistant, here's what happens:

  1. Context Loading: The assistant reads CLAUDE.md
  2. Understanding: It parses your tech stack, structure, and guidelines
  3. 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:

Loading code block...

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

  1. Check if CLAUDE.md exists: ls CLAUDE.md
  2. Regenerate context: bootspring generate
  3. Verify it's not in .gitignore

"Context is missing my tech stack"#

Add it explicitly in config:

Loading code block...

"Context includes sensitive information"#

Add to exclusions:

Loading code block...

Next Steps#