Der 18. Waldwächter betritt den Wald: BashPanda lehrt Bash als Kampfkunst! ✨ Neue Features: 🐼 BashPanda Waldwächter: - Kung Fu Meister Persönlichkeit - Lehrt Bash durch Kampfkunst-Metaphern - Integriert in waldwaechter.sh Library - Crew Memory: Kennt alle anderen Waldwächter 🥋 6 Gürtel-Missionen (Progressive Bash-Meisterschaft): - 🖤 Schwarzer Gürtel: echo, Variablen, read, ANSI codes - 💖 Pinker Gürtel: if/then, while/for, Arrays, Arithmetik - 💙 Blauer Gürtel: sed, case, bc, Textverarbeitung - 💚 Grüner Gürtel: grep, regex, Pattern Matching - 💛 Gelber Gürtel: Funktionen, source, Parameter - 🤍 Weisser Gürtel: Background jobs, Prozesse, Parallelität 📝 Interaktives Quiz-System: - Browser-based Gürtelprüfung (crumbblocks) - 30 Fragen (5 pro Gürtel) - Farbcodiert nach Gürtel - Auto-Export via Clipboard - Terminal-Auswertung mit Zertifikaten 🎓 Zertifikate-System: - Automatische Generierung bei 80%+ - Gespeichert in logs/zertifikate/ - BashPanda's Segen & Weisheiten 📚 Dokumentation: - CLAUDE.md komplett aktualisiert - BashPanda als 18. Waldwächter dokumentiert - Vollständige Dojo-Architektur beschrieben "Der Weg des Codes ist wie der Weg der Kampfkunst: Geduld, Präzision, Wiederholung." - BashPanda 🐼🎋 Crumbforest wächst! 🌲 Der Wurzelbau geht weiter! 🌳 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
36 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
CF_Zero_V1 Project Overview
CF_Zero_V1 is an educational Bash learning platform called "Crumbforest" that uses 17 character-based AI assistants ("Waldwächter" - Forest Guardians) to teach command-line concepts, programming fundamentals, and hardware/robotics projects through interactive missions. The system is designed to run on devices ranging from Raspberry Pi Zero to desktop computers, emphasizing transparency, file-based state, and pedagogical value.
Key Commands
Mission System
# Launch the interactive mission selector (main entry point)
./crumb-mission-selector.sh
# Option 9 opens CrumbCrew Command Central (interactive shell with all AI characters)
# Run individual missions directly
bash missions/basics/fridolin.sh # Navigation basics
bash missions/basics/balu.sh # File creation
bash missions/basics/noko.sh # File reading
bash missions/advanced/dns_mission.sh # DNS tools
bash missions/advanced/ssh_security.sh # SSH basics
bash missions/robots/lipo_power_academy.sh # LiPo battery education
bash missions/robots/regenbogen_zaehlmaschine.sh # Rainbow counter project
bash missions/robots/mond_maschine.sh # Moon machine ML project
bash missions/robots/solar_kettle.sh # Solar water heater physics
AI Character Assistants - The 17 Waldwächter
All characters require OPENROUTER_API_KEY environment variable set in .env file:
# Configure environment (required first step)
cp .env.template .env
# Edit .env and add your OPENROUTER_API_KEY
# === DAS DREIECK (The Triangle - Foundation) ===
# Philosophical/didactic framework (not a technical module)
./crumbforest_roles/dumbosql_zero.sh "Design a sensor database" # Structure/Lists
./crumbforest_roles/funkfox_zero.sh "Explain pipes in rap form" # Flow/Rhythm
./crumbforest_roles/taichitaube_zero.sh "How to balance chaos?" # Balance/Spiral
# === Hardware Team ===
./crumbforest_roles/tobi_zero.sh "Explain capacitors" # CapaciTobi - Electronics
./crumbforest_roles/schnecki_zero.sh "How to wire sensors?" # Wiring specialist
./crumbforest_roles/schraubaer_zero_final.sh "Welding tips?" # Heavy machinery
# === Code Team ===
./crumbforest_roles/snakepy_zero.sh "Python list comprehension" # Python guide
./crumbforest_roles/pepperphp_zero.sh "MVC architecture" # PHP structure
./crumbforest_roles/crabbrust_zero.sh "Memory safety in Rust" # Security guardian
./crumbforest_roles/spider_zero.sh "API REST design" # Network specialist
# === UI Team ===
./crumbforest_roles/schnippsi_zero.sh "CSS grid layout" # Styling
./crumbforest_roles/templatus_zero.sh "HTML structure" # Templates
./crumbforest_roles/asciimonster_zero.sh "Draw ASCII art" # Terminal art
# === System Team ===
./crumbforest_roles/mayaeule_zero.sh "What is wisdom?" # Meta-knowledge owl
./crumbforest_roles/deepbit_zero.sh "How does grep work?" # Bash deep dive
./crumbforest_roles/bugsy_zero.sh "Debug this error" # Debugging
./crumbforest_roles/vektor_zero.sh "Navigate this project" # Point-to-point guide
Unified Access via Waldwächter Library
Preferred method for missions and scripts:
# Source the library to get all characters as shell functions
source lib/waldwaechter.sh
# Now all characters are available as commands (no path needed)
dumbosql "Design a users table"
funkfox "Explain while loops as a rap"
schnippsi "Center a div with CSS"
mayaeule "What is the meaning of code?"
# Utility commands (available after sourcing waldwaechter.sh)
crew_tokens # View token usage across all characters
crew_status # Check which characters are available
crew_memory # View conversation histories (crew context)
crew_doctor # System health check (dependencies, API keys)
crew_syntax # Validate bash syntax for all scripts
crew_help # Show available commands
crew_memo # Track creative outputs (Mixcloud, Git, etc.)
CrumbCrew Command Central (Position 9 in Mission Selector)
Interactive shell with all Waldwächter pre-loaded:
- Custom prompt:
(🌲 CrumbCrew) user@host:path$ - All 17 characters available as direct commands
- Utilities:
crew_status,crew_tokens,crew_memory,crew_doctor - Exit with
exitor Ctrl+D
Crumbblocks - Browser-Terminal Bridge
# Start local server for interactive HTML simulations
./start_crumbblocks.sh
# Opens browser to http://localhost:8000 (or similar)
# Available simulations:
# - lipo_6s_charger_sim_safe_v7.html (LiPo battery charger)
# - rainbow_counter.html (Color event counter)
# - solar_kettle_dark.html (Solar water heater physics)
# - bezier_stream.html, painter.html, and more
# Simulations use Clipboard API to send results back to terminal
# Evaluation scripts in missions/robots/ parse clipboard data
Token Usage Monitoring
# View token usage across all AI assistants (new unified system)
crew_tokens
# View individual character logs (repo-based)
cat logs/mayaeule/token_log.json
cat logs/funkfox/token_log.json
cat logs/dumbosql/token_log.json
# View conversation history
cat logs/mayaeule/eule_history.json
cat logs/funkfox/funkfox_history.json
# Track creative outputs
crew_memo
cat logs/crumb_memo.json
Creative Output Tracking (crumb_memo)
# Log creative outputs (dual transparency: input + output)
crumb_memo "https://mixcloud.com/your-mix" "My first beat"
crumb_memo "https://github.com/user/repo" "My robot code"
crumb_memo "https://youtube.com/watch?v=..." "Tutorial video"
# View all logged creative outputs
crew_memo
Architecture Overview
Core Design Philosophy
Waldwächter (Forest Guardian) Architecture:
- Transparency over magic - All state is file-based JSON
- Metadata-driven extensibility - Add content without code changes
- Educational first - Token tracking teaches mindful questioning
- Raspberry Pi Zero compatible - Minimal dependencies, lightweight
- Multilingual - Characters respond in the language of the question
- File-based agent memory - Characters can read each other's logs
Mission System Architecture
Metadata-Driven Design:
- Each mission consists of two files:
mission_name.sh(executable) andmission_name.meta.json(metadata) - The mission selector (
crumb-mission-selector.sh) dynamically loads missions by scanning directories - No code changes required to add new content - just drop in files
Metadata structure:
{
"icon": "🦊",
"title": "Mission Title",
"description": "What this teaches",
"category": "basics|advanced|challenges|robots",
"enabled": true
}
Mission Categories:
missions/basics/- Beginner missions (navigation, file operations) - 3 missionsmissions/advanced/- Advanced topics (DNS, SSH, networking) - 2 missionsmissions/challenges/- Story-based complex missions - 1 missionmissions/robots/- Hardware projects (LiPo, rainbow counter, moon machine, solar kettle) - 5 missionsmissions/dojo/- BashPanda Kung Fu Belt System (progressive Bash mastery) - 6 missions
AI Assistant Architecture - The 17 Waldwächter
Character Roster (Organized by Role):
-
Das Dreieck (The Triangle) - Philosophical framework:
- DumboSQL (🐘) - Structure/Lists (SQL, data organization, never forgets)
- FunkFox (🦊) - Flow/Rhythm (Bash rapper, explains as hip-hop)
- Taichi Taube (🕊️) - Balance/Spiral (Chaos management, patience)
-
Hardware Team:
- CapaciTobi (🐿️) - Electronics, power, capacitors (alias: Tobi)
- Schnecki (🐌) - Wiring, connections (slow and precise)
- Schraubbär (🐻) - Heavy machinery, welding, mechanical systems
-
Code Team:
- SnakePy (🐍) - Python guide (shows multiple paths)
- PepperPHP (🧓) - PHP structure mentor (MVC as recipes)
- CrabbyRust (🦀) - Rust security guardian (memory safety)
- Spider (🕷️) - Network specialist (APIs, connections)
-
UI Team:
- Schnippsi (✂️) - CSS and styling expert
- Templatus (📄) - HTML template master
- ASCII-Monster (👾) - Terminal artist (ASCII art)
-
System Team:
- Maya-Eule (🦉) - Wise owl with meta-knowledge
- Deepbit (🔧) - Bash deep dive explainer
- Bugsy (🐛) - Debugging detective
- Vektor (🧭) - Point-to-point navigation guide
-
Education Team:
- BashPanda (🐼) - Kung Fu Bash Meister (teaches progressive Bash through martial arts metaphors)
Common Pattern (Each Character Script):
- Load
.envfile (API keys) - Check token budget (optional parental control)
- Build personality-specific system prompt
- Check crew memory (if other characters mentioned in question)
- Call OpenRouter API with conversation history
- Log response + tokens to
logs/{character}/ - Display with character-specific formatting
The Personality IS the System Prompt: Each character has a unique system prompt that defines their teaching style. Example from FunkFox:
"Du bist FunkFox - der Bash Rapper.
Du erklärst Terminal-Konzepte im Hip-Hop-Flow.
Pipes sind Beats, Loops sind Rhythmen."
API Flow:
Question → Check Budget → Load History → Build Prompt → OpenRouter API → Log Response → Display
↓
Check Crew Memory (if other characters mentioned)
Log Structure (Repo-Based):
logs/
├── mayaeule/
│ ├── eule_history.json # Conversation history
│ ├── token_log.json # Token usage tracking
│ ├── eule_request.json # Last API request
│ └── eule_response.json # Last API response
├── funkfox/
│ ├── funkfox_history.json
│ └── token_log.json
├── dumbosql/
│ ├── dumbosql_history.json
│ └── token_log.json
├── ... (all 17 characters)
├── crumb_memo.json # Creative output tracking
└── missions/ # Mission execution logs
Key Difference from Old System:
- Old: Logs in
~/.{character}_logs/(home directory) - New: Logs in
logs/{character}/(repository-based) - Why: Git-trackable, transparent, portable, easier debugging
Waldwächter Library (lib/waldwaechter.sh)
Central Integration Point - 715 lines of unified functionality:
This is the most important file for understanding how the system works. It provides:
- Unified character access - All 17 characters as shell functions
- Environment management - Loads
.env, setsCRUMB_LOGS_DIR - Utility functions -
crew_tokens,crew_status,crew_memory,crew_doctor, etc. - Token budget enforcement - Optional parental controls
- Cross-shell compatibility - Works in bash, zsh
Usage in missions:
# At top of mission script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/../../lib/waldwaechter.sh"
# Now all characters and utilities are available
funkfox "Explain this concept"
crew_tokens
Utility Functions:
crew_tokens- Display token usage across all characters with cost estimatescrew_status- Check which character scripts are availablecrew_memory- View conversation histories (crew context awareness)crew_doctor- System health check (dependencies, API keys, paths)crew_syntax- Validate bash syntax for all scriptscrew_help- Show available commands and characterscrew_memo- Track creative outputs (Mixcloud, Git repos, YouTube, etc.)
Inter-Character Communication (Crew Memory)
Lightweight Agent-Like Behavior:
Characters can reference each other's conversation histories through JSON log files:
# User asks FunkFox a question mentioning another character
funkfox "DumboSQL said we need a users table, what bash loops do I use?"
# FunkFox script automatically:
# 1. Detects "dumbosql" mention in question
# 2. Reads logs/dumbosql/dumbosql_history.json
# 3. Includes last 3 conversations as context
# 4. Enriches system prompt with crew context
# 5. Responds with awareness of DumboSQL's advice
Implementation:
- Characters detect mentions of other crew members (case-insensitive grep)
- Read last 3 conversations from mentioned character's history file
- Include as context in API call system prompt
- Lightweight: Simple JSON file reading, no complex orchestration
- Transparent: All context visible in log files
- Raspberry Pi friendly: No Redis, no databases, just files
Crew context format:
{
"role": "system",
"content": "Context from DumboSQL: [last 3 conversations]..."
}
Crumbblocks Architecture (Browser-Terminal Bridge)
17 HTML files in crumbblocks/ directory:
Design Pattern:
- Self-contained - No external dependencies, single HTML files
- Clipboard API - Send data back to terminal via copy to clipboard
- Interactive simulations - Physics engines, visualizations, games
- Educational - Each teaches a concept (batteries, colors, energy, art)
Key Examples:
lipo_6s_charger_sim_safe_v7.html- LiPo battery charger simulation (6S, balancing, safety)rainbow_counter.html- Color event counter with RGB sensor simulationsolar_kettle_dark.html- Solar water heater physics enginebezier_stream.html- Bézier curve generatorpainter.html,painter_spray.html,painter_lines.html- Creative painting toolsschnippsi_ui.html- Schnippsi's UI editor
Evaluation Flow:
- User interacts with Crumbblock simulation in browser
- Simulation calculates results (e.g., battery voltage, water temperature)
- Results exported to clipboard as JSON
- User pastes in terminal
- Mission evaluation script parses JSON and provides feedback
Server Options:
# PHP server (if available)
php -S localhost:8000
# Python server (fallback)
python3 -m http.server 8000
# start_crumbblocks.sh detects and uses best option
"Das Dreieck" - Philosophical Framework
Important: This is a didactic model, not a technical module.
The Triangle represents three foundational concepts taught through specific characters:
-
DumboSQL (🐘) - Structure/Lists
- Data organization, SQL, tables, persistence
- "The elephant never forgets"
- Teaches: How to organize information
-
FunkFox (🦊) - Flow/Rhythm
- Pipes, loops, process orchestration
- "Terminal concepts as hip-hop beats"
- Teaches: How processes flow and connect
-
Taichi Taube (🕊️) - Balance/Spiral
- Chaos management, patience, iterative refinement
- "The spiral path, not the straight line"
- Teaches: How to handle complexity gracefully
Usage in Missions:
Complex projects (like robots missions) explicitly invoke The Triangle for planning:
dumbosql "Design the data structure for rainbow counter"
funkfox "What's the flow of data from sensor to display?"
taichitaube "How do we balance hardware and software complexity?"
This creates a structured approach to problem-solving that children can internalize.
"BashPanda Dojo" - Progressive Bash Learning System
NEW in v0.0-RC4: A complete Kung Fu-themed Bash learning curriculum with belt progression system.
The BashPanda Dojo teaches Bash through martial arts metaphors, creating a gamified progression path from beginner to master. Each belt represents a skill level with dedicated missions and interactive quizzes.
The 6 Belts:
-
🖤 Schwarzer Gürtel (Black) - The Basics
- echo, printf, ANSI codes
- Variables (creating, using)
- read (user input)
- Mission:
bash missions/dojo/schwarzer_guertel.sh
-
💖 Pinker Gürtel (Pink) - Control Flow
- if/then/else conditions
- while and for loops
- Arrays
- Arithmetik $(( ))
- Mission:
bash missions/dojo/pinker_guertel.sh
-
💙 Blauer Gürtel (Blue) - Text Mastery
- sed (stream editor)
- case statements
- bc (floating point math)
- wc (word count)
- Mission:
bash missions/dojo/blauer_guertel.sh
-
💚 Grüner Gürtel (Green) - Pattern Recognition
- grep basics and options
- Regular expressions (regex)
- Email/date pattern matching
- grep -E (extended regex)
- Mission:
bash missions/dojo/gruener_guertel.sh
-
💛 Gelber Gürtel (Yellow) - Modularity
- Functions (defining, calling)
- Function parameters ($1, $@, $#)
- source (library loading)
- return vs exit
- local variables
- Mission:
bash missions/dojo/gelber_guertel.sh
-
🤍 Weisser Gürtel (White) - Mastery
- Background jobs (&)
- jobs, ps commands
- wait for synchronization
- Parallel processing
- Process control
- Mission:
bash missions/dojo/weisser_guertel.sh
Interactive Gürtelprüfung (Belt Exam):
Each belt has a browser-based quiz for assessment:
- Open:
./start_crumbblocks.sh - Navigate to:
bashpanda_guertelpruefung.html - Select your belt and answer 5 questions
- Results auto-copy to clipboard
- Paste into terminal:
bash missions/dojo/evaluate_guertelpruefung.sh - Receive certificate if passed (80%+ required)
Certificates:
- Stored in
logs/zertifikate/ - Format:
{belt}_{user}_{timestamp}.txt - Contains score, date, BashPanda seal
Teaching Philosophy:
- "Der Weg des Codes ist wie der Weg der Kampfkunst: Geduld, Präzision, Wiederholung"
- Each command is a "kata" (form) to be practiced
- Errors are teachers, not failures
- Progressive difficulty builds confidence
- BashPanda provides wisdom and encouragement throughout
Integration with Waldwächter:
- BashPanda can be called from any mission:
bashpanda "question" - Understands context from other characters via crew memory
- Responds in language of question (German/English/etc.)
- Token tracking for mindful learning
Usage Example:
# Start belt progression
bash missions/dojo/schwarzer_guertel.sh
# Ask BashPanda for help
source lib/waldwaechter.sh
bashpanda "Erkläre mir echo vs printf"
# Take belt exam
./start_crumbblocks.sh
# (Open bashpanda_guertelpruefung.html in browser)
# Evaluate results
bash missions/dojo/evaluate_guertelpruefung.sh
Project Structure
CF_Zero_V1/
├── crumb-mission-selector.sh # Main entry point (1027 lines)
├── lib/
│ └── waldwaechter.sh # 17 AI characters + utilities (715 lines)
├── crumbforest_roles/ # 17 individual AI character scripts
│ ├── dumbosql_zero.sh # Structure/Lists (Das Dreieck)
│ ├── funkfox_zero.sh # Flow/Rhythm (Das Dreieck)
│ ├── taichitaube_zero.sh # Balance/Spiral (Das Dreieck)
│ ├── tobi_zero.sh # CapaciTobi - Electronics
│ ├── schnecki_zero.sh # Wiring specialist
│ ├── schraubaer_zero_final.sh # Heavy machinery
│ ├── snakepy_zero.sh # Python guide
│ ├── pepperphp_zero.sh # PHP structure
│ ├── crabbrust_zero.sh # Rust security
│ ├── spider_zero.sh # Network APIs
│ ├── schnippsi_zero.sh # CSS styling
│ ├── templatus_zero.sh # HTML templates
│ ├── asciimonster_zero.sh # ASCII art
│ ├── mayaeule_zero.sh # Wise owl
│ ├── deepbit_zero.sh # Bash deep dive
│ ├── bugsy_zero.sh # Debugging
│ └── vektor_zero.sh # Navigation
├── missions/ # Educational missions
│ ├── basics/ # 3 beginner missions
│ │ ├── fridolin.sh/meta.json # Navigation (pwd, ls, cd)
│ │ ├── balu.sh/meta.json # File creation (mkdir, touch)
│ │ └── noko.sh/meta.json # File reading (cat, grep)
│ ├── advanced/ # 2 advanced missions
│ │ ├── dns_mission.sh/meta.json # DNS tools
│ │ └── ssh_security.sh/meta.json # SSH basics
│ ├── challenges/ # 1 story-based mission
│ ├── robots/ # 5 hardware missions
│ │ ├── lipo_power_academy.sh # LiPo battery education (8 phases)
│ │ ├── regenbogen_zaehlmaschine.sh # Rainbow counter (7 phases)
│ │ ├── mond_maschine.sh # Moon machine ML (8 phases)
│ │ ├── solar_kettle.sh # Solar water heater (6 phases)
│ │ └── evaluate_solar_kettle.sh # Evaluation script
│ └── dojo/ # 6 BashPanda belt missions (NEW!)
│ ├── schwarzer_guertel.sh # Black belt - Basics
│ ├── pinker_guertel.sh # Pink belt - Control flow
│ ├── blauer_guertel.sh # Blue belt - Text
│ ├── gruener_guertel.sh # Green belt - Pattern matching
│ ├── gelber_guertel.sh # Yellow belt - Functions
│ ├── weisser_guertel.sh # White belt - Processes
│ └── evaluate_guertelpruefung.sh # Quiz evaluation
├── crumbblocks/ # 18 HTML interactive simulations
│ ├── lipo_6s_charger_sim_safe_v7.html
│ ├── rainbow_counter.html
│ ├── solar_kettle_dark.html
│ ├── bashpanda_guertelpruefung.html # Belt quiz (NEW!)
│ ├── bezier_stream.html
│ ├── painter.html
│ └── ... (12 more)
├── logs/ # Repo-based logging
│ ├── mayaeule/
│ │ ├── eule_history.json
│ │ └── token_log.json
│ ├── funkfox/
│ ├── dumbosql/
│ ├── bashpanda/ # BashPanda logs (NEW!)
│ ├── ... (all 18 characters)
│ ├── crumb_memo.json # Creative output tracking
│ ├── zertifikate/ # Belt certificates (NEW!)
│ └── missions/ # Mission execution logs
├── seeds/ # Seed data for collaborative systems
├── start_crumbblocks.sh # Launch browser simulations
├── .env.template # Environment variables template
└── README.md # German documentation
Important Implementation Notes
Adding New Missions
Zero code changes required - just drop in two files:
-
Create two files in appropriate category folder:
touch missions/robots/new_mission.sh touch missions/robots/new_mission.meta.json chmod +x missions/robots/new_mission.sh -
Metadata must include:
{ "icon": "🚀", "title": "Your Mission Title", "description": "What this teaches", "category": "basics|advanced|challenges|robots", "enabled": true } -
Mission script best practices:
#!/bin/bash # Source waldwaechter library for AI character access SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${SCRIPT_DIR}/../../lib/waldwaechter.sh" # Use cat << 'EOF' for multi-line instructions # Include interactive prompts with read -p # Provide examples before asking user to try # Call AI characters as needed: funkfox "question" # End with success message -
Mission will automatically appear in mission selector on next run
Creating New AI Assistants
Current roster is complete (17 characters), but if adding new ones:
-
Copy template from existing character:
cp crumbforest_roles/deepbit_zero.sh crumbforest_roles/newchar_zero.sh -
Update these elements:
- Character name and emoji in echo statements
- System prompt in
jq -ncommand (defines personality) - Log file paths (use
${CRUMB_LOGS_DIR}/newchar/) - Function name if adding to waldwaechter.sh
-
Add to
lib/waldwaechter.sh:# 🎭 NewChar - Description function newchar() { "${ROLES_DIR}/newchar_zero.sh" "$@" } export -f newchar -
Test with:
source lib/waldwaechter.sh newchar "Test question" crew_status # Should show new character
Token Log Format
Each character logs API usage in this format:
{
"zeit": "2025-12-23 19:05:33",
"rolle": "funkfox",
"usage": {
"prompt_tokens": 45,
"completion_tokens": 123,
"total_tokens": 168
}
}
View with: crew_tokens (formatted with cost estimates)
Creating New Crumblocks
Self-contained HTML simulations:
-
Create single HTML file in
crumbblocks/:touch crumbblocks/my_simulation.html -
Include in HTML:
- All CSS in
<style>tags - All JavaScript inline
- No external dependencies (except standard browser APIs)
- Use Clipboard API to export results:
const results = {your: "data"}; navigator.clipboard.writeText(JSON.stringify(results));
- All CSS in
-
Create evaluation script in mission:
# missions/robots/my_mission.sh echo "Paste your results from the browser:" read USER_CLIPBOARD # Parse JSON with jq VALUE=$(echo "$USER_CLIPBOARD" | jq -r '.your') # Evaluate and provide feedback if [[ $VALUE == "expected" ]]; then echo "✅ Success!" fi -
Launch with:
./start_crumbblocks.sh→ navigate to your simulation
Environment Requirements
Minimal Requirements (Bash Missions Only)
- Bash 3.2+ (macOS default shell compatible)
- jq - JSON processing (
brew install jqorapt install jq) - curl - API calls (usually pre-installed)
- bc - Math calculations (usually pre-installed)
AI Assistants
OPENROUTER_API_KEYin.envfile (required)- Optional:
OPENAI_API_KEY,ANTHROPIC_API_KEY, or local Ollama - Internet connection for API calls
Crumbblocks (Browser Simulations)
- Modern web browser (Chrome, Firefox, Safari, Edge)
- PHP or Python3 for local server (
start_crumbblocks.shauto-detects)
Computer Vision Missions (Optional)
- Python 3.x
- OpenCV:
pip install opencv-python - Webcam (for SnakeCam missions)
- Requires Raspberry Pi 4+ (Raspberry Pi Zero insufficient for OpenCV)
Recommended Development Tools
shellcheck- Bash linting (brew install shellcheck)tree- Directory visualization
Philosophy and Design Principles
Token Philosophy - "Was kostet die Frage eines Kindes?"
"What does a child's question cost?"
In the forest, a child's question is priceless. In our digital age, questions to AI consume tokens. This creates a teaching moment:
- In the forest: Unbezahlbar (priceless) - every question holds infinite value
- In the system: Measured in tokens - a concrete, understandable metric
- Pedagogically: Token tracking teaches mindful questioning
Why This Matters:
- Teaches Reflection - Think before asking
- Creates Awareness - Resources have value
- Builds Quality - Better questions → better answers
- Encourages Research - Try to find answers independently first
- Develops Patience - Not every thought needs immediate AI response
Token Budget System:
# In .env file
DAILY_TOKEN_BUDGET=0 # 0 = unlimited (default)
DAILY_TOKEN_BUDGET=10000 # ~20 thoughtful questions per day
This isn't restriction - it's mindfulness education.
Dual Transparency: Input + Output
Input Transparency: crew_tokens - What you ASK
- Tracks every question to AI characters
- Shows token cost per question
- Teaches resource awareness
Output Transparency: crew_memo - What you CREATE
- Tracks creative outputs (Mixcloud, Git, YouTube)
- Values both learning AND creation
- Celebrates achievements
# Log a creative output
crumb_memo "https://mixcloud.com/your-mix" "My first beat"
crumb_memo "https://github.com/user/repo" "Robot project code"
# View all logged outputs
crew_memo
Philosophy: Transparency in what we consume AND what we produce.
Character-Based Learning
Why 17 distinct personalities?
Different learners connect with different teaching styles:
- FunkFox - Explains concepts as rap/hip-hop (rhythm learners)
- DumboSQL - Never forgets, structured explanations (logical learners)
- Taichi Taube - Poetic, patient, spiral approach (reflective learners)
- CrabbyRust - Security-focused, precise (safety-conscious learners)
- ASCII-Monster - Visual, artistic (creative learners)
Result: Every child finds a character they connect with.
File-Based State (No Databases)
Why JSON files instead of Redis/Postgres?
- Transparency - Any text editor can read state
- Debuggability -
cat logs/funkfox/funkfox_history.jsonshows everything - Git-trackable - Version control for learning history
- Raspberry Pi friendly - No database server overhead
- Educational - Students can see how data is stored
- Portable - Copy
logs/folder = copy entire history
Trade-off: Not suitable for concurrent multi-user systems. Perfect for single-user educational context.
Raspberry Pi Zero Compatibility
Design Constraint: Core features must run on Raspberry Pi Zero (ARM, 512MB RAM)
Implications:
- Bash-first, no heavy frameworks
- File-based state, no databases
- Lightweight AI models (gpt-3.5-turbo default)
- Optional features for higher-spec hardware (OpenCV missions)
- Minimal dependencies
Testing: Always test on constrained hardware, not just desktop.
German-First, Multilingual Ready
Primary Language: German (all documentation, missions, README)
Multilingual AI: Characters respond in the language of the question:
mayaeule "What is wisdom?" # → English response
mayaeule "Was ist Weisheit?" # → German response
funkfox "Explique les pipes" # → French response
Implementation: OpenRouter API automatically detects input language.
Common Pitfalls and Solutions
Pitfall 1: Hardcoded Log Paths
Wrong:
LOGDIR="$HOME/.funkfox_logs"
Correct:
# Use repo-based logging with CRUMB_LOGS_DIR
LOGDIR="${CRUMB_LOGS_DIR}/funkfox"
mkdir -p "$LOGDIR"
Why: Repo-based logs are git-trackable, portable, and transparent.
Pitfall 2: Circular Imports
Wrong:
# In a mission script
source "${SCRIPT_DIR}/../../crumb-mission-selector.sh"
Correct:
# Only source the library
source "${SCRIPT_DIR}/../../lib/waldwaechter.sh"
Why: Mission selector is an entry point, not a library.
Pitfall 3: Bash Version Assumptions
Wrong:
# Uses Bash 4+ features
declare -A assoc_array
Correct:
# Compatible with Bash 3.2 (macOS default)
# Use arrays or alternative approaches
Why: macOS ships with Bash 3.2 by default (license reasons).
Pitfall 4: Missing API Keys
Wrong:
# Assumes API key exists
curl -H "Authorization: Bearer $OPENROUTER_API_KEY" ...
Correct:
# Check for API key first
if [[ -z "$OPENROUTER_API_KEY" ]]; then
echo "❌ Error: OPENROUTER_API_KEY not set"
echo "Copy .env.template to .env and add your key"
exit 1
fi
Why: Better error messages help new users set up correctly.
Pitfall 5: Ignoring Token Budget
Wrong:
# Call API without checking budget
curl ... "$API_URL"
Correct:
# Check token budget first (if enabled)
if [[ -n "$DAILY_TOKEN_BUDGET" ]] && [[ "$DAILY_TOKEN_BUDGET" -gt 0 ]]; then
# Check today's usage
# Compare with budget
# Warn or block if over budget
fi
Why: Parental controls for children's AI usage.
Pitfall 6: Not Testing on Raspberry Pi
Wrong:
# Only test on desktop with 16GB RAM
Correct:
# Test on actual target hardware
# Or simulate constraints: limit memory, slow CPU
Why: Educational system should work on affordable hardware.
Development Workflow
Quick Start for New Developers
-
Clone and setup:
git clone <repo> cd CF_Zero_V1 cp .env.template .env # Edit .env, add OPENROUTER_API_KEY -
Explore the system:
./crumb-mission-selector.sh # Main entry point # Choose option 9 for CrumbCrew Command Central # Try: crew_status, crew_help, crew_doctor -
Read key files:
README.md- German overviewCLAUDE.md- This filelib/waldwaechter.sh- Core integration (most important!)crumbforest_roles/funkfox_zero.sh- Example character
-
Run a mission:
bash missions/basics/fridolin.sh # Follow along, see how AI characters are used -
Check system health:
source lib/waldwaechter.sh crew_doctor # System diagnostics
Testing Changes
No formal test suite - philosophy relies on:
- Manual testing - Run missions and interact
- Syntax validation:
source lib/waldwaechter.sh crew_syntax # Validates all bash scripts - Health checks:
crew_doctor # Dependencies, API keys, paths - Token logging - Verify AI interactions work
Making Changes
Before making changes:
- Read the philosophical sections of this CLAUDE.md
- Understand the "why" behind file-based state, transparency, etc.
- Test on Raspberry Pi if possible (or simulate constraints)
When adding features:
- Maintain transparency (no hidden state)
- Keep Raspberry Pi Zero compatible
- Use file-based state (JSON)
- Add token tracking if using AI
- Update this CLAUDE.md if architecture changes
When adding missions:
- Follow metadata-driven pattern
- Source
lib/waldwaechter.sh - Use AI characters for teaching
- Include interactive elements
- Test on actual target audience (children!)
Project Maturity and Status
Version: v0.0-RC3 (Release Candidate 3) Status: Active development, production-ready for educational use Git: Clean working tree at time of this CLAUDE.md update
Recent Developments:
- RC3: Crumbblocks browser-terminal bridge
- RC3: "Dein Zeichen im Wald" UI mission (Schnippsi)
- RC3: Smart evaluation routing (clipboard → JSON → bash evaluation)
- RC3: Solar Wasserkocher mission (physics engine)
- RC0: Full 17-character roster complete
Philosophy: "Der Wald ist nie fertig - er wächst mit jeder Idee!" (The forest is never finished - it grows with every idea)
Quick Reference: Most Important Files
For maximum productivity, focus on these core files:
- lib/waldwaechter.sh (715 lines) - Central integration, all characters + utilities
- crumb-mission-selector.sh (1027 lines) - Main entry point, metadata parser
- crumbforest_roles/funkfox_zero.sh - Example character (understand the pattern)
- missions/robots/lipo_power_academy.sh - Example complex mission (8 phases, multiple characters)
- .env.template - Configuration reference
- README.md - User-facing documentation (German)
- This CLAUDE.md - Architecture and development guide
Summary: What Makes This Unique
CF_Zero_V1 is not just another educational coding platform. It's unique because:
- Character-Driven Learning - 17 distinct AI personalities, each teaching differently
- Token Transparency as Pedagogy - "What does a question cost?" teaches mindfulness
- File-Based Agent Memory - Characters read each other's logs for context
- Browser-Terminal Bridge - Crumbblocks simulations export to terminal
- Das Dreieck Framework - Structure/Flow/Balance as a teaching model
- Raspberry Pi Zero Compatible - Runs on $15 hardware
- Metadata-Driven - Add content without touching code
- Dual Transparency - Track both input (questions) and output (creations)
- Hardware-Software Integration - Teach coding through robotics projects
- Multilingual by Default - AI responds in the language of the question
The architecture prioritizes transparency, extensibility, and pedagogical value over technical complexity. Every design decision serves the educational mission.