bootspring_context

Generate and manage AI context files for your project.

Overview#

The bootspring_context tool creates comprehensive context files (like CLAUDE.md) that help AI assistants understand your project's structure, conventions, and requirements.

Parameters#

ParameterTypeRequiredDescription
actionstringYesAction to perform: generate, update, validate
optionsobjectNoGeneration options

Options Object#

OptionTypeDefaultDescription
includePatternsbooleantrueInclude detected code patterns
includeStackbooleantrueInclude tech stack info
includeConventionsbooleantrueInclude coding conventions
customSectionsarray[]Custom sections to add
outputPathstring"./CLAUDE.md"Output file path

Usage Examples#

Generate Context File#

Use the bootspring_context tool with: - action: "generate" - options: { includePatterns: true }

Result:

1# Project Context 2 3## Overview 4A Next.js 14 application with TypeScript... 5 6## Tech Stack 7- Framework: Next.js 14 (App Router) 8- Language: TypeScript 9- Styling: Tailwind CSS 10- Database: PostgreSQL with Prisma 11 12## Project Structure 13├── app/ # App Router pages 14├── components/ # React components 15├── lib/ # Utilities 16└── prisma/ # Database schema 17 18## Code Conventions 19- Use functional components 20- Prefer named exports 21- Use TypeScript strict mode 22...

Update Existing Context#

Use the bootspring_context tool with: - action: "update"

This updates the existing context file with any new patterns, dependencies, or structure changes detected.

Validate Context#

Use the bootspring_context tool with: - action: "validate"

Checks if the context file is accurate and up-to-date.

What Gets Detected#

Tech Stack#

  • Framework (Next.js, React, Vue, etc.)
  • Language (TypeScript, JavaScript)
  • Styling (Tailwind, CSS Modules, etc.)
  • Database (PostgreSQL, MySQL, MongoDB)
  • ORM (Prisma, Drizzle, TypeORM)
  • Testing (Jest, Vitest, Playwright)

Project Structure#

  • Directory organization
  • Key files and their purposes
  • Entry points

Code Patterns#

  • Component patterns
  • State management approach
  • API patterns
  • Error handling patterns

Conventions#

  • Naming conventions
  • File organization
  • Import ordering
  • Comment styles

Custom Sections#

Add custom sections via configuration:

1// bootspring.config.js 2module.exports = { 3 context: { 4 customSections: [ 5 { 6 title: 'Team Guidelines', 7 content: ` 8 - Use conventional commits 9 - Require PR reviews 10 - No direct pushes to main 11 `, 12 }, 13 { 14 title: 'API Conventions', 15 content: ` 16 - All endpoints return JSON 17 - Use camelCase for fields 18 - Include pagination metadata 19 `, 20 }, 21 ], 22 }, 23};

Output Format#

The generated context file follows this structure:

1# [Project Name] - AI Context 2 3**Version**: [version] 4**Generated**: [timestamp] 5**Type**: [project type] 6 7--- 8 9## Overview 10[Project description and purpose] 11 12--- 13 14## Tech Stack 15| Category | Technology | 16|----------|------------| 17| Framework | [framework] | 18| Language | [language] | 19... 20 21--- 22 23## Project Structure 24[Directory tree with descriptions] 25 26--- 27 28## Code Patterns 29[Detected patterns with examples] 30 31--- 32 33## Conventions 34[Coding conventions and guidelines] 35 36--- 37 38## Key Commands 39[Important npm scripts] 40 41--- 42 43## [Custom Sections] 44[User-defined content]

Best Practices#

When to Regenerate#

  • After adding new dependencies
  • After restructuring the project
  • After changing coding standards
  • After major feature additions

Keep Context Focused#

  • Remove irrelevant sections
  • Add project-specific guidelines
  • Include deployment notes
  • Document environment variables

Version Control#

  • Commit CLAUDE.md to source control
  • Review changes in PRs
  • Keep it updated with the codebase