Commit graph

422 commits

Author SHA1 Message Date
562711555e
Merge pull request #31 from russellballestrini/claude/template-system-documentation-011CUzhHbaPXsG7W92zZ1Dci
OpenCompletion Template System Documentation
2025-11-10 13:59:23 -05:00
Claude
6ce46fc5a0
Add template control structure validation to YAML validator
Enhance the activity YAML validator to detect and reject Jinja2 and
Handlebars control structures, enforcing the substitution-only template
system design.

Changes:
- Add regex patterns for Jinja2 ({% %}) and Handlebars ({{# }})
- Add _check_template_syntax() method
- Integrate checks in content_blocks, questions, tokens_for_ai, hints
- Add 7 comprehensive unit tests for template validation
- All 59 activity YAMLs + SPEC.yaml pass validation (0 errors)
2025-11-10 18:55:21 +00:00
Claude
b45712f503
Remove Jinja2 control structures from SPEC.yaml
Update the attempt counter example in SPEC.yaml to use substitution-only
template syntax instead of Jinja2 control structures ({% if %}).

The AI can naturally understand attempt context from {{current_attempt}},
{{max_attempts}}, and {{attempts_remaining}} variables without needing
conditional logic in the template itself.

This aligns with the substitution-only template system where logic lives
in scripts and templates only display pre-computed values.
2025-11-10 18:44:48 +00:00
5ad1279f72
Merge pull request #29 from russellballestrini/claude/yaml-spec-immersive-activities-011CUzPAMF9VZh8Po4GNrM6W
Identify YAML limitations for interactive activities
2025-11-10 12:08:25 -05:00
Claude
b833983b30
Add GitHub Actions workflow for automated testing
- Run unit, functional, and integration tests on push/PR
- Test on Python 3.11 with Ubuntu latest
- Include code coverage reporting for unit tests
- Add linting job with black and flake8
- Validate all activity YAML files
- Trigger on main, master, develop, and claude/** branches
2025-11-10 17:06:04 +00:00
Claude
653c72020c
Fix progressive hints in CLI simulator for first failed attempt
Removed "attempts > 0" check in research/guarded_ai.py that prevented
hints from showing on the first attempt. Matches the fix made to
activity.py for consistent behavior across web app and CLI simulator.
2025-11-10 17:02:56 +00:00
Claude
3df402505c
Fix progressive hints to display on first failed attempt
Removed "activity_state.attempts > 0" check that prevented hints from
showing on the first attempt. The code already correctly computes
current_attempt as activity_state.attempts + 1, so hints now work
starting from attempt 1 (when attempts = 0).
2025-11-10 17:02:06 +00:00
Claude
693dd9dace
Add comprehensive unit tests for activity_utils.py v2.0 features
- Created 58 unit tests covering all 8 utility functions
- Tests cover template rendering, metadata conditions, conditional content,
  navigation, weighted random, progressive hints, and context creation
- Fixed operator precedence bug: _not_contains and _not_exists must be
  checked before _contains and _exists to prevent false matches
- All tests passing (58/58)
2025-11-10 16:55:12 +00:00
Claude
bd779e06fa
Fix SPEC.yaml validation and refactor guarded_ai.py for v2.0 consistency
SPEC.yaml fixes:
- Comment out orphaned example code blocks that broke YAML parsing
- Convert progressive hints and dynamic question examples to comments
- Add placeholder keys to maintain valid YAML structure
- All examples now documented but non-executable (reference only)
- Validates with 0 errors

guarded_ai.py refactor (CLI simulator now uses v2.0 features):
- Import activity_utils.py for consistency with activity.py
- Use check_conditions() for advanced metadata conditions (gte, lt, contains, etc.)
- Use filter_content_blocks() for template rendering and conditional blocks
- Use render_template() for dynamic question text with {{variables}}
- Use resolve_conditional_navigation() for if/elif/else navigation
- Use select_weighted_random() for weighted random selection
- Use get_progressive_hint() for progressive hints system
- Create template contexts with built-in variables (current_attempt, etc.)

Benefits:
- Single source of truth for v2.0 logic (activity_utils.py)
- CLI simulator now tests all v2.0 features
- Maintainability: changes to features only need updates in one place
- Consistency: web app and CLI behave identically

All changes validated and tested.
2025-11-10 15:19:50 +00:00
Claude
2b19fc5b9d
Implement OpenCompletion Activity YAML v2.0 features for immersive activities
Add comprehensive v2.0 features to enhance activity creation:

Features Implemented:
- Template variables: {{metadata.key}}, {{current_attempt}}, etc.
- Conditional content blocks: show_if conditions for dynamic content
- Advanced metadata conditions: gte, lt, contains, regex, exists operators
- Conditional navigation: if/elif/else branching based on metadata
- Progressive hints system: Auto-display hints based on attempt number
- Weighted random selection: Probabilistic outcomes with custom weights
- Dynamic question text: Questions with template variables
- Built-in attempt counters: Access to current_attempt, max_attempts, attempts_remaining

Files Modified:
- activity.py: Integrated all v2.0 features into activity execution
- activity_utils.py: New utility module for templates and conditions
- activity_yaml_validator.py: Updated validator for v2.0 schema
- CLAUDE.md: Added session persistence and Twitch Plays model docs
- research/SPEC.yaml: Comprehensive v2.0 feature documentation

Added:
- research/activity-test-v2-features.yaml: Test activity demonstrating all features

All changes validated and tested. Zero errors in validator.
2025-11-10 15:13:02 +00:00
7c61328943 Require validation for all activity YAML files
Added mandatory validation step to activity creation workflow:
1. Read research/SPEC.yaml first (fresh spec)
2. Validate with activity_yaml_validator.py after changes
3. All YAMLs must pass validation (0 errors) before committing

Ensures quality and prevents broken activity files from entering the repo.
2025-11-10 09:28:54 -05:00
11b16aa12a Add instruction to read SPEC.yaml before creating activities
Ensures Claude always has the latest activity YAML specification
fresh in context when creating or modifying activity files.
2025-11-10 09:10:08 -05:00
da9792ad63 Fix SPEC.yaml validation errors
- Add random bucket names (emergency, surprise, bonus) to main buckets list
- Fix invalid transition targets to use existing steps
- Add tokens_for_ai to all feedback_prompts (required field)
- Add bonus transition definition

All validation errors resolved - SPEC.yaml now passes validation
2025-11-10 09:03:24 -05:00
002e64b6c1 Add random bucket support and comprehensive YAML specification
Random Bucket System:
- Probabilistic events that trigger alongside user responses
- Random rolls before categorization to prevent AI bias
- Multiple random events can trigger simultaneously
- User bucket processed first, random events layer on top
- Metadata accumulates across all transitions
- Last transition's navigation wins

Implementation:
- activity.py: Core random bucket rolling logic
- activity_yaml_validator.py: Validation for random_buckets config
- research/guarded_ai.py: CLI simulator with random event display
- tests/unit/test_random_buckets.py: 22 comprehensive tests (all passing)

Fashion Empire Enhancement:
- activity40-fashion-empire-backrooms.yaml: Added random events to 4 zones
  - fashion_emergency (5%): Urgent crises testing leadership
  - creative_opportunity (10%): Breakthroughs rewarding innovation
  - surprise_client (5%): VIP visitors recognizing reputation
- Random events enhance gameplay without hijacking user intent

Documentation:
- research/SPEC.yaml: Complete YAML specification with verbose comments
  - All metadata operations (string concat, numeric ops, random)
  - Random buckets with flow explanation
  - Feedback prompts (multi-agent system)
  - Processing scripts (pre_script, processing_script)
  - Model overrides (classifier_model, feedback_model)
  - Termination patterns and best practices
  - Validation rules and examples

New Activities:
- activity-nuclear-power-plant-ai.yaml: Nuclear reactor control simulation
- activity-submarine-simulation.yaml: Deep sea exploration
- activity-unwaste-factory.yaml: Recycling facility management

Testing:
 All 22 random bucket tests passing
 YAML validation passing for all activities
 Deterministic triple-trigger test (100% probability)
2025-11-10 08:57:14 -05:00
ff69d2ec5f
Merge pull request #28 from russellballestrini/claude/biblical-time-machine-activity-011CUz9eUAXGD4MS8gjgAkxU
Build Biblical Time Machine Conversation Game
2025-11-10 08:42:26 -05:00
Claude
33c90b99b0
Expand Biblical time machine to global spiritual time machine
Major expansion to support travel to ANY location during biblical timeline:

NEW REGIONS SUPPORTED:
- Biblical Lands: All biblical eras from Garden of Eden to persecution
- Greece: Philosophers (Socrates, Plato, Aristotle), mystery religions, gods
- Rome: Stoics, emperors, gladiators, early Christians, Roman religion
- India: Buddhist monks, Hindu gurus, yogis, karma/reincarnation
- China: Confucius, Laozi, Taoism, Confucianism, ancestor worship
- Persia: Zoroastrian magi, fire temples, dualism
- Other: Arabia, Africa, Britain, Celtic druids, etc.

KEY FEATURES:
- Geography-aware classifier: Detects both TIME and PLACE from user input
- Dynamic briefings: AI generates context for any location/time combination
- Examples: "30 AD Greece" → Athens philosophers, "500 BC India" → Buddhist monks
- NPC system supports non-biblical spiritual figures
- Conversation system respects all spiritual traditions
- Maintains Temple accuracy for biblical lands

EXAMPLES NOW WORK:
- "Take me to 30 AD Greece" → Meet Stoic philosophers
- "500 BC India" → Meet Buddha's followers
- "Moses" → Egypt ~1446 BC
- "Socrates" → Athens ~400 BC
- "Confucius" → China ~500 BC
- "Garden of Eden" → Paradise before Fall ~4000 BC

File: 662 lines (was 532), validates with 0 errors
2025-11-10 13:33:50 +00:00
Claude
6fcf5502e0
Rewrite Biblical time machine to truly open-ended format
Major changes:
- Reduced from 1608 to 532 lines (70% reduction)
- Single open-ended question: "Where/who/when would you like to visit?"
- AI dynamically determines era from ANY input (person, date, event, place)
- Replaced static content_blocks with dynamic ai_feedback briefings
- User can say "I want to meet Moses" → AI determines ~1446 BC Egypt
- User can say "30 AD" → AI determines Jesus' ministry
- User can say "Red Sea crossing" → AI determines Exodus event
- Open-ended NPC selection and conversation system
- Maintains location accuracy (Temple progression throughout history)
- Focus on AI-driven responses over rigid menu structure

User feedback: "feedback over heavy content... needs to be open ended"
2025-11-10 12:45:39 +00:00
Claude
3930a99a5d
Add detailed departure briefings to time machine transitions
Each time travel destination now includes comprehensive briefing:

**Briefing Format:**
- Destination (geographic location)
- Time Period (specific dates)
- Biblical Reference (relevant scripture)
- What You'll Experience (historical context, key events, atmosphere)
- Important/Critical Location Notes (especially Temple status)

**Educational Enhancements:**

Garden of Eden:
- Explains it's before sin, perfect creation
- Notes no buildings/cities exist yet

Fall & Early World:
- Describes life after sin entered
- Notes Cain/Abel, first altars, long lifespans

Egypt & Exodus:
- **CRITICAL:** Emphasizes NO Temple for 500+ more years
- Explains Moses uses simple altars
- Egyptian temples to Ra/Osiris present

Solomon's Temple:
- **HISTORIC MOMENT:** FIRST Temple after 480 years!
- Describes gold overlay, Ark location
- This is what Moses and David longed for

Jesus' Ministry:
- SECOND Temple (Herod's) stands
- Jesus prophesies its destruction
- Will be gone in 40 years (70 AD)

Roman Persecution:
- NO Temple (destroyed 70 AD)
- Christians meet in catacombs
- Fish symbol as secret sign

Makes Temple progression crystal clear: none → altars → First Temple → Second Temple → destroyed → underground faith.

Users now understand WHEN and WHERE they're going before arrival.
2025-11-10 12:40:06 +00:00
Claude
dc06025b59
Expand Biblical Time Machine: Garden of Eden to persecution, open-ended NPCs, location accuracy
COMPLETE REWRITE with all requested features:

**Starts at the Beginning:**
- Garden of Eden (Paradise before sin)
- Fall & Early World (Cain, Abel, Enoch)

**Covers Full Bible Chronologically:**
- Egypt & Exodus (~1446 BC)
- Solomon's Temple (~970 BC)
- Life of Jesus (~30 AD)
- Persecution & Martyrdom (~64-313 AD)

**Open-Ended NPC Selection:**
- Users can request ANY biblical figure from each era
- AI dynamically rolepl ays any character accurately
- Suggestions provided but not limiting
- Examples: "Moses", "Queen of Sheba", "a Hebrew slave"

**Historically Accurate Locations:**
- Garden of Eden: NO buildings, only perfect nature
- Egypt: NO Temple to YHWH (only altars, won't exist for 500+ years)
- Solomon: FIRST Temple in all its glory
- Jesus' time: SECOND Temple (Herod's Temple)
- Persecution: NO Temple (destroyed 70 AD), catacombs instead

**Features:**
- 1608 lines, 9 sections, 25 steps
- Metadata tracking (epochs visited, people met)
- Multilingual support
- Looping time machine hub
- Biblically accurate character portrayals
- Scripture references throughout

Demonstrates location accuracy progression: no temple → Tabernacle/altars → First Temple → Second Temple → no temple (destroyed) → faith survives underground.
2025-11-10 12:29:42 +00:00
Claude
79c072abec
Add extensive Biblical Time Machine activity
Create immersive time travel experience through key Biblical epochs:
- Egypt & Exodus: Meet Moses, Pharaoh, Hebrew slaves, Aaron
- Kingdom of David: Visit King David, Prophet Nathan, musicians, citizens
- Life of Jesus: Walk with Jesus, disciples, Mary Magdalene, crowds
- Pentecost & Early Church: Experience Holy Spirit, meet apostles and converts
- Roman Persecution: Stand with martyrs, Paul, persecuted believers

Features:
- Time machine hub for epoch selection
- Multiple NPCs per epoch with unique personalities
- Biblically accurate dialogue and references
- Metadata tracking for journey statistics
- Looping mechanism to revisit epochs
- Final reflection on spiritual journey

The activity maintains historical accuracy while being engaging and educational.
2025-11-10 11:48:58 +00:00
d02ad855fd
Merge pull request #27 from russellballestrini/claude/expand-fashion-activity-011CUyyXxXyVV3TgwysppcCi
Expand fashion activity to backrooms setting
2025-11-10 05:31:46 -05:00
Claude
09202d31dc
Expand fashion activity into immersive backrooms empire management game
Create activity40-fashion-empire-backrooms.yaml with:

Features:
- Player is a girl running her own fashion brand underground
- Backrooms aesthetic: liminal warehouse spaces, mysterious locations
- 4 explorable locations: Warehouse Level -3, The Salon, Sub Bay (underwater lab), Reactor Atelier (nuclear power)
- Full control over 70+ robots and NPC employees (Zara-7, Viktor, Mx. Kai, Luna & Sol)
- Mission-based gameplay (15% tasks, 5% emergencies)
- Player makes creative, leadership, and strategic decisions

Locations:
- Warehouse Level -3: Storage backrooms, assembly drones, fabric management
- The Salon: Creative hub, style bots, runway preparation
- Sub Bay: Underwater dye laboratory, bioluminescent experiments, submersibles
- Reactor Atelier: Nuclear-powered textile synthesis, atomic fabric manipulation

Gameplay:
- Choose locations via central elevator
- Complete missions (color selection, robot commands, textile treatments, power management)
- Handle emergencies (fabric contamination crisis with multiple solutions)
- Manage NPCs and give directives
- Make creative vision decisions for runway shows
- Culminates in Neon Dreams runway show featuring player's choices
- Player sees their vision realized through their empire

All transitions validated, proper termination, educational about fashion + leadership
2025-11-10 09:37:07 +00:00
6bc896b9b0 Fix TTS voice selection validation breaking API calls
Remove obsolete VALID_VOICES validation that was rejecting the new
"model:voice" format from the voices endpoint integration. The old
validation expected simple voice names like "onyx" but the new format
uses "tts-1:onyx", causing validation to fail and produce malformed
API requests that returned HTTP 400 errors.

Changes:
- Remove VALID_VOICES constant (no longer needed)
- Update syncInputsAndQueryString() to accept any voice value from dropdown
- Default to "tts-1:onyx" format if no value present

Fixes the TTS errors seen in production where voice selection was
failing with HTTP 400 status.
2025-11-09 15:32:38 -05:00
33a6eaa215
Merge pull request #26 from russellballestrini/claude/integrate-voices-endpoint-011CUxuw49z1GN41YMxKoq3C
Integrate new voices API endpoint
2025-11-09 15:26:52 -05:00
Claude
d7ea04a3f9
Integrate voices endpoint with dynamic model and voice selection
Update TTS implementation to fetch available voices from the API and
support multiple TTS models:

- Add VOICES_API_URL constant for /v1/voices endpoint
- Create populateVoiceDropdown() to dynamically populate voice options
- Group voices by model using optgroups in the dropdown
- Implement voice fetching with localStorage caching (1 minute)
- Update speakText() to parse model:voice from dropdown value
- Update speakTextQueued() to use dynamic model and voice
- Add backward compatibility for legacy voice-only format
- Update both desktop and mobile voice selectors
- Add fallback to tts-1:onyx if voice fetch fails

Voice dropdown now displays all available models (tts-1, tts-1-hd,
tts-1-silero, tts-1-kokoro) with their respective voices organized
by optgroups for better UX.
2025-11-09 20:08:37 +00:00
fafaf1557f
Merge pull request #25 from russellballestrini/claude/dinosaur-time-machine-011CUxk9UNRz6vj4pZv5K8R8
Build interactive dinosaur time machine explorer
2025-11-09 13:52:47 -05:00
15e235d7c0
Merge pull request #24 from russellballestrini/claude/solar-system-explorer-011CUxhwWXbNR5iKFzq6St7o
Build interactive solar system explorer
2025-11-09 13:03:49 -05:00
Claude
8d22bfa388
Add comprehensive dinosaur time machine educational activity
This activity provides an immersive, open-ended exploration of Earth's
prehistoric eras where users can:

- Travel through Triassic, Jurassic, and Cretaceous periods
- Explore climate, geography, dinosaurs, marine reptiles, and pterosaurs
- Learn about specific creatures on demand
- Understand the evolution of life and flowering plants
- Witness the K-T extinction event
- Jump freely between time periods

Features:
- Central "control room" hub for navigation
- Detailed information about 30+ dinosaurs and creatures
- Covers vegetation changes including flowering plant revolution
- Open-ended exploration with AI-guided learning
- Comprehensive extinction event explanation
- Supports looping and non-linear exploration

The activity validates successfully and follows best practices for
engagement, education, and proper termination.
2025-11-09 18:00:03 +00:00
Claude
2f34365fd5
Add back-to-planet navigation from moons to host planet
Enhanced moon navigation to allow easy return to the host planet's details.
Previously, moon navigation only had "leave_jupiter" which took you to the
final navigation menu. Now you can also go back to see the planet itself.

New Navigation Pattern (implemented for Jupiter's moons):

From any moon, you can now:
1. **Jump to other moons** - "Europa", "Ganymede", etc.
2. **Return to moon menu** - "moon menu" shows all moon options
3. **Back to planet** - "Jupiter" or "back to Jupiter" returns to planet details
4. **Leave entirely** - "leave Jupiter" goes to planet-to-planet navigation

Example Navigation Flow:
- Visit Jupiter → See planet details
- Choose "Io" → See Io's volcanoes
- Say "back to Jupiter" → Return to Jupiter's details (storms, bands, etc.)
- Say "Europa" → Jump directly to Europa
- Say "leave Jupiter" → Continue to Saturn

Updated Navigation Steps:
- moon_io_nav: Added back_to_planet → jupiter:jupiter_details
- moon_europa_nav: Added back_to_planet → jupiter:jupiter_details
- moon_ganymede_nav: Added back_to_planet → jupiter:jupiter_details
- moon_callisto_nav: Added back_to_planet → jupiter:jupiter_details
- jupiter_other_moons_nav: Added back_to_planet → jupiter:jupiter_details

This same pattern can be extended to Saturn, Uranus, and Neptune moons,
allowing seamless navigation: Moon → Moon, Moon → Planet, Planet → Planet.
2025-11-09 17:59:03 +00:00
Claude
ecc2122e1a
Add interactive moon navigation to Solar System Explorer
Enhanced the Solar System Explorer with comprehensive moon navigation menus,
allowing users to jump freely between moons within each planet's system.

New Navigation Features:
- Moon selection menus after each planet's moon intro
- Individual navigation after each moon's details
- Ability to jump directly to any moon or back to the menu
- "Stay" option to ask questions without penalty

Jupiter (95 moons):
- Moon menu: Choose Io, Europa, Ganymede, Callisto, or other moons
- Navigation after each Galilean moon
- Can jump between any moons freely

Saturn (146 moons):
- Moon menu: Choose Titan, Enceladus, Mimas, or other moons
- Navigation after each major moon
- Jump between moons or back to menu

Uranus (28 moons):
- Moon menu: Choose Miranda or other major moons
- Navigation from Miranda to other moons
- Can explore Ariel, Umbriel, Titania, Oberon via other moons

Neptune (16 moons):
- Moon menu: Choose Triton or other moons
- Navigation after Triton
- Can jump back to major moon or continue journey

Example Usage:
1. Visit Jupiter → Choose moon menu
2. Say "Europa" → See Europa details
3. Say "I want to see Io" → Jump directly to Io
4. Say "moon menu" → Back to selection
5. Say "other moons" → See smaller moons
6. Say "leave Jupiter" → Continue to Saturn

This makes exploration truly non-linear and interactive, exactly as
requested for exploring moons like jumping between Uranus's moons!
2025-11-09 17:54:01 +00:00
Claude
45fc9d6c9d
Add comprehensive Solar System Explorer activity
Created an interactive, open-ended educational activity that allows students to explore the entire solar system at their own pace.

Features:
- Complete coverage of all major celestial bodies
- The Sun with detailed structure and solar activity
- All 8 planets with comprehensive details
- 200+ moons documented with attributes:
  - Jupiter's 95 moons (4 Galilean moons + others)
  - Saturn's 146 moons (Titan, Enceladus, Mimas, etc.)
  - Uranus's 28 moons (Miranda and major moons)
  - Neptune's 16 moons (Triton and others)
  - Earth's Moon, Mars's Phobos & Deimos
- Asteroid Belt (Ceres, Vesta, Pallas, Hygiea)
- Kuiper Belt (Pluto, Eris, Makemake, Haumea, etc.)

Activity Structure:
- 13 main sections (Introduction, Sun, 8 planets, Asteroid Belt, Kuiper Belt, Conclusion)
- Non-linear exploration - jump to any location at any time
- Detailed scientific information with current data
- Engaging presentation with emojis and formatting
- Educational content based on latest discoveries (New Horizons, Cassini, Juno missions)

Technical:
- Fully validated YAML structure
- All transitions properly mapped
- Proper termination paths
- Interactive Q&A at each location
- "Stay" option allows asking questions without counting as attempts

Perfect for astronomy education and space exploration learning!
2025-11-09 17:33:17 +00:00
0a338e9166
Merge pull request #23 from russellballestrini/claude/update-claude-md-agents-011CUxUXaHNttGa2q92LjGjV
Update CLAUDE.md for agent expertise
2025-11-09 12:24:49 -05:00
Claude
fd6360d7d8
Add 4 advanced programming activities with algorithm education
NEW ACTIVITIES:

activity48-monty-hall-simulation.yaml - Monty Hall paradox proof
- Simulate stay vs switch strategies
- Prove switching wins 2/3 through code
- Any programming language support

activity49-multi-armed-bandit.yaml - Adaptive algorithms beat A/B testing
- Epsilon-greedy implementation
- 88% regret reduction vs traditional A/B
- Real-world applications (web optimization, clinical trials)

activity50-genetic-algorithms.yaml - Evolution-based optimization
- String evolution challenge
- Fitness, selection, crossover, mutation
- 803,181x faster than brute force

activity51-connect-four.yaml - Complete game development
- 2D arrays and game state
- Win detection algorithms (horizontal, vertical, diagonal)
- Full game loop implementation

All activities:
- Support ANY programming language choice
- Follow pedagogical best practices (concepts first, code in feedback)
- Validate with zero errors/warnings
- Engaging and fun (aha moments, real games, simulations)
2025-11-09 16:07:15 +00:00
Claude
4e72fed8be
Add game theory programming courses for Python and C
NEW ACTIVITIES:

activity46-game-theory-python.yaml - Game theory implementation in Python
- Representing games with dictionaries
- Payoff matrix as dict with tuple keys
- Query functions and game simulation
- One-shot and repeated games
- Tit-for-Tat strategy implementation
- Function composition and abstraction

activity47-game-theory-c.yaml - Game theory implementation in C
- Defining Payoff struct for outcomes
- 2D arrays for payoff matrices
- Memory-efficient game representation
- Strategy lookup functions
- Enum for self-documenting code
- Pointer and struct fundamentals

Both activities:
- Teach programming through game theory concepts
- Follow pedagogical best practice (concepts first, code examples in feedback)
- Validate with zero errors/warnings
- Progressive difficulty (structures → functions → simulation)
- Real-world application of abstract concepts
- Engage students with strategic thinking + coding
2025-11-09 15:36:12 +00:00
Claude
b8bf7261cb
Add complete statistics and game theory curriculum (6 activities)
NEW ACTIVITIES:

activity40-statistics-101.yaml - Foundational statistics
- Central tendency, spread, probability, distributions
- Real-world applications and critical thinking

activity41-game-theory-101.yaml - Strategic fundamentals
- Prisoner's Dilemma, Nash Equilibrium, dominant strategies

activity42-game-theory-201.yaml - Advanced concepts
- Mixed strategies, repeated games, Tit-for-Tat

activity43-game-theory-301.yaml - Cooperative games
- Coalition formation, Shapley value, fair division

activity44-game-theory-401.yaml - Information asymmetry
- Signaling, screening, adverse selection

activity45-game-theory-501.yaml - Mechanism design
- Auction theory, Vickrey auctions, incentive compatibility

All activities:
- Validate with zero errors/warnings
- Follow expert guide requirements
- Include engaging examples
- Terminate properly
- Support language switching
2025-11-09 15:27:38 +00:00
Claude
31e357e8bf
Add statistics and game theory 101 activities plus pedagogical fixes 2025-11-09 15:25:04 +00:00
Claude
e4ab13ae78
Fix pedagogical issue: Don't show code examples before asking students to write code
PROBLEM: activity37 was showing complete code examples in Python, JavaScript,
Java, and C++ BEFORE asking students to write code themselves. This turns
learning into copy-paste practice.

FIXED:
- Hello World section: Removed multi-language code examples from content_blocks
- Variables section: Removed multi-language code examples from content_blocks
- Now explains CONCEPTS (what, why, how languages differ) without showing syntax
- Code examples remain in AI feedback for when students struggle or ask for help

PEDAGOGICAL APPROACH:
1. Explain the concept (stdout, variables, etc.)
2. Explain language differences conceptually (dynamic vs static typing)
3. Ask students to TRY writing code in THEIR language
4. Provide language-specific examples in AI FEEDBACK if they struggle

This way students actually have to THINK and LEARN, not just copy.

UPDATED CLAUDE.md:
- Added new pitfall: "Showing answers before questions"
- Guidance: Explain concepts in content_blocks, provide code examples in ai_feedback

Still validates perfectly with zero errors/warnings.
2025-11-09 15:09:50 +00:00
Claude
10d0ec27a2
Add two fashion activities: modern style and historical journey
activity38-fashion-today.yaml - Fun, interactive style discovery
- Personal style identification (classic, boho, streetwear, etc.)
- Color psychology and preferences
- Outfit building for occasions
- Statement pieces and accessories
- Fashion philosophy reflection
- Encourages self-expression and confidence

activity39-fashion-history.yaml - Educational timeline 1800-2025
- Victorian era corsets and social restrictions
- 1920s flappers and women's liberation
- WWII rationing and practical fashion
- 1950s ultra-femininity and gender politics
- 1960s-70s revolution (mod, hippie, disco, punk)
- 1980s excess and 1990s grunge backlash
- 2000s-2010s fast fashion and social media
- 2020s sustainability, inclusivity, technology
- Critical thinking about fashion as social mirror

Both activities:
- Follow expert guide validation requirements
- Include engaging content with emojis and formatting
- Support language switching
- Use metadata strategically
- Have multiple response paths with tailored feedback
- Terminate properly with activity_completed markers
- Passed activity_yaml_validator.py with zero errors/warnings
2025-11-09 14:50:04 +00:00
Claude
3df69c83cd
Add comprehensive activity creation expert guide to CLAUDE.md
This guide empowers agents to create activities that validate properly,
are fun and engaging, and terminate correctly.

Key additions:
- Core activity structure with detailed examples
- Critical validation requirements checklist
- Four termination patterns with code examples
- Ten engagement techniques from successful activities
- Best practices for activity development
- Common pitfalls table with fixes
- Complete development workflow
- Quick reference for essential fields
- Minimal working activity example

References activity26-magic-8-ball.yaml, activity31-scientific-method.yaml,
and activity37-programming-languages.yaml as exemplary activities.
2025-11-09 14:36:10 +00:00
698857e04e
Merge pull request #22 from russellballestrini/claude/review-research-directory-011CUxEBYqsik2pWtWM3UufC
Review Research Directory Structure
2025-11-09 09:28:48 -05:00
Claude
cfc2a8ad08
Expand stdout explanation with comprehensive technical details
- Added 53 new lines of stdout/standard output explanation
- Broke down terminology: standard, output, stdout/STDOUT
- Explained the three standard streams (stdin, stdout, stderr)
- Added visual diagram of stdout flow
- Included Unix/1970s historical context
- Explained why it's called "standard"
- Added advanced redirection concepts (pipes, file redirection)
- Total file now 1,948 lines (up from 1,895)
- Validation passed successfully
2025-11-09 11:56:22 +00:00
Claude
3ef98143b2
Expand activity37 with comprehensive fundamental explanations
- Increased from 1,148 to 1,895 lines (+65%)
- Added detailed explanations before each coding exercise
- Enhanced Hello World section with stdout concepts and multi-language examples
- Expanded Variables section with box analogy, naming rules, and typing differences
- Enhanced Data Types with comprehensive type explanations and string formatting
- Expanded If Statements with conditional logic fundamentals and comparison operators
- Enhanced Loops with detailed for loop explanations, execution traces, and common patterns
- Expanded Functions with DRY principle, parameter explanations, and best practices
- Enhanced Return Values with display vs return differences and common mistakes
- All sections now teach fundamentals thoroughly before asking students to code
- Validation passed successfully
2025-11-09 11:31:28 +00:00
9ad911c615
Merge pull request #21 from russellballestrini/claude/merge-new-yamls-011CUwF3BsT47vPjtkvSq2r7
Merge new YAML configuration files
2025-11-08 18:04:53 -05:00
c294814e60
Delete fix_all_new_activities.py 2025-11-08 18:04:26 -05:00
0b41cab970
Delete fix_activity37.py 2025-11-08 18:04:13 -05:00
Claude
6fa1b15188
Add auto-growing textarea for chat input
- Textarea now automatically expands as user types multiline messages
- Resets to minimum height after message is sent
- CSS: Set min-height (60px) and max-height (400px) with auto overflow
- Removed fixed rows attribute to allow dynamic height
- Disabled manual resize to prevent user confusion
- Provides better UX for composing longer messages
2025-11-08 23:02:24 +00:00
Claude
0560de004d
Add fix scripts for activity YAML corrections
These scripts document the automated fixes applied to activities 30-37:
- fix_activity37.py: Changes 'close' bucket behavior + fixes completion
- fix_all_new_activities.py: Fixes final step completion for all activities

Keeping for reference and potential reuse on future activities.
2025-11-08 23:00:01 +00:00
Claude
f774d36d74
Fix activity completion and progression issues in activities 30-37
This commit addresses two critical issues:

1. Completion Bug (activities 30-37):
   - Final steps were looping forever, preventing activity completion
   - Fixed by removing next_section_and_step from completion transitions
   - Kept off_topic transition looping to avoid validator terminal step errors
   - Activities now complete properly when users give valid final answers

2. Activity37 Bucket Logic:
   - Changed "close" bucket to retry same step instead of advancing
   - Only "correct" bucket now advances to next step
   - All other buckets (close, incomplete, wrong_language, etc.) retry
   - This ensures students must get correct answers to progress

Technical Details:
- Final steps are not considered "terminal" if at least one transition
  has next_section_and_step (validator requirement)
- Off-topic transitions loop back to allow another attempt
- Completion happens when get_next_step() returns None, None

Validation:
- All 8 activities pass activity_yaml_validator.py
- No errors or warnings

Affects: activity30-37 (all new merged activities)
2025-11-08 22:59:06 +00:00
08bbc47a6b
Merge pull request #20 from russellballestrini/claude/expand-research-yamls-011CUvoNn9xvytg4xr5eJ7Rx
Generate synthetic activities from research YAMLs
2025-11-08 15:07:53 -05:00
Claude
fd78927e7c
Fix MODEL_X references to use dynamic model registry
When MODEL_X references (MODEL_0, MODEL_1, etc.) are used, the code now
properly looks up actual model names from the dynamic registry (MODEL_CLIENT_MAP)
instead of hardcoding "model" or requiring MODEL_NAME_X environment variables.

Changes:
- app.py: Look up models from MODEL_CLIENT_MAP for the specified endpoint
- guarded_ai.py: Query endpoints for actual model names at initialization
- guarded_ai.py: Use dynamic registry for MODEL_X lookups

This fixes the "model not found" error when using activities with MODEL_X
references like activity37.
2025-11-08 19:58:21 +00:00