Bootspring Internals
Deep dive into the core Bootspring system architecture.
Package Structure
Bootspring is organized as a monorepo:
bootspring/
├── packages/
│ ├── cli/ # Command-line interface
│ ├── core/ # Core business logic
│ ├── mcp-server/ # MCP server implementation
│ ├── sdk/ # JavaScript/TypeScript SDK
│ └── shared/ # Shared utilities
├── skills/ # Built-in skill patterns
├── agents/ # Agent definitions
├── workflows/ # Workflow definitions
└── templates/ # Project templates
Core Package
The core package contains the primary business logic:
packages/core/
├── src/
│ ├── agents/ # Agent system
│ │ ├── registry.ts
│ │ ├── invoker.ts
│ │ └── profiles/
│ ├── skills/ # Skill system
│ │ ├── loader.ts
│ │ ├── applier.ts
│ │ └── registry.ts
│ ├── context/ # Context generation
│ │ ├── generator.ts
│ │ ├── analyzers/
│ │ └── templates/
│ ├── workflows/ # Workflow engine
│ │ ├── orchestrator.ts
│ │ ├── phases.ts
│ │ └── signals.ts
│ ├── quality/ # Quality gates
│ │ ├── gates.ts
│ │ └── checks/
│ └── config/ # Configuration
│ ├── loader.ts
│ └── schema.ts
└── tests/
Context Generation System
Generator Architecture
Loading code block...
Built-in Analyzers
| Analyzer | Purpose |
|---|---|
PackageAnalyzer | package.json analysis |
FrameworkAnalyzer | Framework detection |
StructureAnalyzer | Project structure |
DependencyAnalyzer | Dependency analysis |
DatabaseAnalyzer | Database schema |
ApiAnalyzer | API routes |
ComponentAnalyzer | UI components |
TestAnalyzer | Test coverage |
Analysis Pipeline
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ File Scan │───▶│ Analyze │───▶│ Aggregate │
└─────────────┘ └─────────────┘ └─────────────┘
│
┌────────────────┼────────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Package │ │Framework │ │Structure │
│ Analyzer │ │ Analyzer │ │ Analyzer │
└──────────┘ └──────────┘ └──────────┘
Agent System
Agent Registry
Loading code block...
Agent Profile Structure
Loading code block...
Agent Invocation
Loading code block...
Skill System
Skill Loader
Loading code block...
Skill Structure
Loading code block...
Skill Application
Loading code block...
Workflow Engine
Orchestrator
Loading code block...
Phase Management
Loading code block...
Configuration System
Config Loader
Loading code block...
Configuration Schema
Loading code block...
Event System
Event Emitter
Loading code block...
Event Types
| Event | When Fired |
|---|---|
context.generated | Context file created |
agent.invoked | Agent called |
agent.completed | Agent finished |
skill.applied | Skill applied |
workflow.started | Workflow begun |
workflow.completed | Workflow finished |
quality.passed | Quality gate passed |
quality.failed | Quality gate failed |
Caching
Cache Manager
Loading code block...
Error Handling
Error Hierarchy
Loading code block...