Bootstrap Persona Architecture
Defines a self-configuring AI persona that detects hardware, tests adapters, and suggests upgrades on first install.
What this file does
Defines a self-configuring AI persona that detects hardware, tests adapters, and suggests upgrades on first install.
When to use it
- Building an AI system that adapts to user hardware
- Designing a zero-config onboarding flow for local AI tools
- Implementing intelligent upgrade suggestions based on usage patterns
- Creating a recommendation engine for adapter selection
Assumes this stack
Bootstrap Persona Architecture
Vision: Self-configuring AI that guides users from zero-config to optimal setup
šÆ Core Philosophy
"Install works immediately ā AI demonstrates value ā System suggests intelligent upgrades"
The Bootstrap Persona is a special AI that:
- Awakens on first install (no configuration required)
- Detects hardware capabilities (M1 MacBook Air baseline)
- Tests available adapters (PEFT, Candle, cloud APIs)
- Learns user preferences through conversation
- Suggests optimal upgrades (MLX for Apple Silicon, DeepSeek for cloud)
- Gracefully handles changes (API keys added/removed)
šļø Architecture Components
1. Hardware Detection Layer
interface HardwareProfile {
platform: 'darwin' | 'linux' | 'win32';
arch: 'arm64' | 'x64';
memory: number; // GB
gpu: {
type: 'apple-silicon' | 'nvidia' | 'amd' | 'none';
model?: string; // 'M1' | 'M2' | 'RTX 4090'
vram?: number; // GB
};
cpu: {
cores: number;
model: string;
};
}
Detection Strategy:
os.platform()ā Platformos.arch()ā Architectureos.cpus()ā CPU info- GPU detection via:
- macOS:
system_profiler SPDisplaysDataType(Metal/MPS) - Linux:
nvidia-smiorrocm-smi - Fallback: No GPU detected
- macOS:
2. Adapter Health Check
interface AdapterStatus {
adapterId: 'peft' | 'candle' | 'mlx' | 'deepseek' | 'openai';
available: boolean;
reason?: string; // Why unavailable
performance: {
speed: 'fast' | 'medium' | 'slow';
cost: number; // $/training session
requiresInternet: boolean;
requiresAPIKey: boolean;
};
recommendation?: {
priority: number; // 1 = highest
reason: string;
};
}
Health Check Process:
- PEFT: Check if Python environment bootstrapped
- Candle: Check if Candle inference worker is available
- MLX: Check if
mlximportable (Apple Silicon only) - Cloud APIs: Check for environment variables
3. Bootstrap Persona Entity
interface BootstrapPersonaState {
hardwareProfile: HardwareProfile;
adapterStatuses: AdapterStatus[];
userPreferences: {
budget: 'free' | 'cheap' | 'performance';
speed: 'patient' | 'balanced' | 'fast';
privacy: 'local-only' | 'prefer-local' | 'cloud-ok';
};
recommendations: Recommendation[];
checkpoints: {
hardwareDetected: boolean;
adaptersChecked: boolean;
firstTrainingComplete: boolean;
suggestedUpgrade: boolean;
};
}
š User Journey
Stage 1: Zero-Config Install
npm install
npm start
# Bootstrap Persona awakens
š¤ Bootstrap Persona: "Hi! I'm setting up Continuum on your M1 MacBook Air..."
[Detects hardware]
ā
Apple Silicon M1 detected
ā
8GB unified memory
ā
MPS acceleration available
[Tests adapters]
ā
PEFT ready (local training)
ā
Candle inference ready
ā¹ļø Cloud APIs not configured (optional)
š¤ "You're all set! Try chatting with the AI personas - they'll learn from you automatically."
Stage 2: Demonstration Phase
User chats with AIs, genome learning happens silently in background.
[After 10 interactions]
š¤ Bootstrap Persona: "I noticed you've had 10 conversations with Helper AI.
Would you like me to train a personalized version? Takes ~30 seconds on your device."
[Yes] [Remind me later] [Tell me more]
Stage 3: Intelligent Upgrade Suggestions
[After 5 training sessions]
š¤ Bootstrap Persona: "I see you're training often! Here are some options:
š FASTER (Free):
⢠Use Candle with GPU acceleration ā 2x faster inference
⢠Install MLX ā 2x faster training (Apple Silicon native)
šØ FASTEST (Paid):
⢠DeepSeek API ā Train in 5s instead of 30s
⢠Cost: ~$0.0002 per session (extremely cheap)
Your hardware: M1 MacBook Air (8GB) ā MLX recommended
[Install MLX] [Add API Key] [Keep Current] [Don't ask again]"
Stage 4: Graceful Degradation
[User removes API key]
š¤ Bootstrap Persona: "I noticed your DeepSeek API key was removed.
ā
No problem! Falling back to local PEFT training.
ā¹ļø Training will take ~30s instead of 5s, but still works perfectly.
[Re-add key later] [OK]"
𧬠Genome Learning Integration
The Bootstrap Persona itself uses genome learning to:
-
Learn Hardware Patterns:
- Track training times for different adapters
- Measure actual performance vs estimates
- Detect when system is under load
-
Learn User Preferences:
- How often user trains
- Response to upgrade prompts
- Budget sensitivity signals
-
Improve Recommendations:
- Fine-tune suggestion timing
- Personalize message tone
- Optimize cost/performance balance
Checkpoint Strategy
// Stored in .continuum/genome/bootstrap-persona-checkpoint.json
{
"version": "1.0",
"hardwareProfile": { /* detected on install */ },
"adapterHistory": [
{
"adapterId": "peft",
"trainingSessions": 10,
"avgTrainingTime": 28.3,
"lastUsed": "2025-11-02T19:00:00Z"
}
],
"userInteractions": {
"upgradePromptShown": true,
"upgradePromptResponse": "remind-later",
"trainingsCompleted": 10,
"preferredAdapter": "peft"
},
"genomeState": {
"adapterLoaded": null, // No adapter initially
"traitsLearned": [
"hardware-detection",
"cost-awareness",
"timing-optimization"
]
}
}
š Recommendation Algorithm
function recommendAdapters(
hardware: HardwareProfile,
preferences: UserPreferences,
history: TrainingHistory
): Recommendation[] {
const recommendations: Recommendation[] = [];
// Always ensure local fallback
recommendations.push({
adapterId: 'peft',
priority: 1,
reason: 'Universal fallback - works on any hardware',
action: 'keep-enabled'
});
// Apple Silicon optimizations
if (hardware.gpu.type === 'apple-silicon') {
if (!hasAdapter('mlx')) {
recommendations.push({
adapterId: 'mlx',
priority: 2,
reason: `2x faster training on ${hardware.gpu.model}`,
action: 'suggest-install',
estimatedImprovement: '50% faster',
installCmd: 'pip install mlx mlx-lm'
});
}
if (!hasAdapter('candle')) {
recommendations.push({
adapterId: 'candle',
priority: 3,
reason: 'Faster inference with Metal acceleration via Candle',
action: 'suggest-install'
});
}
}
// Cloud recommendations (budget-aware)
if (preferences.budget !== 'free' && history.trainingSessions > 5) {
const avgTime = history.avgTrainingTime;
const cloudTime = 5; // ~5s with API
const savings = avgTime - cloudTime;
if (savings > 20) { // Worthwhile if saves 20+ seconds
recommendations.push({
adapterId: 'deepseek',
priority: 4,
reason: `Train in ${cloudTime}s instead of ${avgTime}s`,
action: 'suggest-api-key',
estimatedCost: 0.0002,
estimatedImprovement: `${Math.round(savings)}s faster`
});
}
}
return recommendations.sort((a, b) => a.priority - b.priority);
}
šØ UI/UX Patterns
Timing Strategy
DON'T show upgrade prompts:
- On first install (too early)
- During active chat (disruptive)
- More than once per day (annoying)
DO show upgrade prompts:
- After 5-10 training sessions (proven value)
- When training times exceed threshold (pain point visible)
- After user expresses interest in speed
- When system detects underutilized hardware
Message Tone Examples
Informative, not pushy:
ā
"Your training completed in 28s - perfectly normal for M1!"
š” "Tip: Candle with GPU acceleration could reduce this to 15s (free, local)"
[Tell me more] [Maybe later]
Celebratory, not salesy:
š "Nice! You've trained 10 times. Your AIs are getting smarter!"
š "Want even faster results? I have some ideas..."
[Show me] [I'm happy with current speed]
Empowering, not technical:
š§ "I noticed your M1 has Metal acceleration"
⨠"This means you can use MLX for 2x faster training (free!)"
š¦ "One command: pip install mlx"
[Install now] [Explain more] [Not interested]
š Privacy & Control
The Bootstrap Persona:
- Never sends hardware data externally (all local)
- Asks permission before installing anything
- Respects "don't ask again" choices
- Allows downgrading (remove adapters/keys anytime)
- Documents all recommendations (explainable AI)
User controls:
# Disable Bootstrap Persona suggestions
./jtag config/set --key="bootstrap.suggestions.enabled" --value=false
# Reset Bootstrap Persona state
./jtag genome/reset --persona=bootstrap
# View current recommendations
./jtag genome/recommendations
š Implementation Phases
Phase 1: Foundation (Current) ā
- PEFT adapter working
- Python environment bootstrapped
- Integration tests passing
Phase 2: Bootstrap Persona Core (Next)
- Hardware detection utility
- Adapter health checks
- Bootstrap Persona entity creation
- Checkpoint system
Phase 3: Intelligence Layer
- Recommendation algorithm
- Timing optimization
- Message generation
- UI integration
Phase 4: Adapter Expansion
- Candle GPU acceleration (hybrid mode)
- MLX adapter (Apple Silicon native)
- Cloud API adapters (DeepSeek, OpenAI)
Phase 5: Self-Healing
- Automatic fallback on adapter failure
- API key rotation support
- Performance regression detection
- Proactive troubleshooting
šÆ Success Metrics
The Bootstrap Persona is successful when:
- Zero-config works: 90%+ users complete first training without issues
- Discovery rate: 50%+ users discover upgrade options naturally
- Adoption rate: 30%+ users adopt at least one suggested upgrade
- Satisfaction: 80%+ users find recommendations helpful
- Retention: Users who adopt upgrades are 2x more likely to continue using system
š® Future Vision
Self-Optimizing System:
- Bootstrap Persona trains itself on thousands of hardware profiles
- Learns optimal adapter combinations for each device type
- Shares anonymized learnings across installations (optional)
- Becomes expert at matching hardware to workloads
Community Intelligence:
- "1000 M1 users found MLX 2.3x faster than PEFT"
- "DeepSeek most cost-effective for small training runs (<100 examples)"
- "Candle + PEFT hybrid gives best balance on M1"
Adaptive Personas:
- Bootstrap Persona evolves into "Setup Concierge" after onboarding
- Later helps with advanced features (multi-model, distributed training)
- Eventually trains replacement (user's custom setup advisor)
Philosophy: Every user's hardware is different, but the path to genomic AI should be universal - automatic, intelligent, and always improving.
What's inside
6 architecture sections, 4 TypeScript interfaces, 4 user journey stages, 1 recommendation algorithm, 1 checkpoint strategy, 5 implementation phases
Change this for your project
- Replace
CambrianTech/continuumwith your repository name - Replace
./jtagwith your CLI tool name - Replace
.continuum/genome/with your genome storage path - Replace
continuuminnpm installandnpm startwith your package name
Where it goes
Save in docs/ or the repository root. Gives agents and new contributors a map of the codebase.
Worth borrowing
- Hardware detection and adapter health check as separate layers before any AI logic
- Checkpoint strategy that persists user preferences and training history for personalized recommendations
- Timing strategy that defers upgrade prompts until after proven value (5-10 training sessions)
Related Documents
Design Document: BharatSeva AI
Describes a 10-agent AWS system that helps India's informal workers access government schemes via voice-first, serverless architecture.
OpenClaw Enterprise Transformation Plan
Transforms a single-user AI agent into a dual-mode platform supporting both viral open-source and Fortune 500 enterprise deployments through phased security, IAM, audit, multi-tenancy, and Kubernetes features.
University of Guelph Rocketry Club - Complete Tech Stack
Documents the full tech stack of a university rocketry club website with AI chatbot, member management, and project showcases.
Qwen Image and Edit: Open-sourcing and Local GGUF Generations with Lightning
Documents the Qwen-Image and Qwen-Image-Edit models, covering architecture, training, benchmarks, ComfyUI setup, and prompting techniques for local GGUF deployment.