Commit Graph

48 Commits

Author SHA1 Message Date
5df1c1b4bf Migration Gitea 2025-12-04 19:50:16 +08:00
5dbb02f736 Add SBS 3-9 fusion homework and update existing homework files
- Add content/chapters/sbs-3-9-fusion.json: Combined chapters 3 & 9 with 115 vocab, 28 phrases, 4 dialogs
- Add homework-sbs-chapter3-9-fusion.md: Fusion homework using InThePark.mp3 audio
- Update homework-sbs-chapter3.md: Fix text to Jones family, simplify format
- Update homework-sbs-chapter9.md: Change text to Walter & Wendy, simplify format
- Update homework-wte2-chapter4.md: Remove markdown formatting for WeChat

Fusion homework contrasts Present Continuous (audio - Chen family) vs Simple Present (text - DiCarlo family)
Clear separation between "right now" and "every day" grammar points

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 21:21:23 +08:00
6231ddcd08 Add homework assignments for WTE2 Ch4, SBS Ch3, Ch9, Ch10 and audio scripts
- Add homework-wte2-chapter4.md: Present Continuous with animals and pets
- Add homework-sbs-chapter3.md: Present Continuous with daily activities
- Add homework-sbs-chapter9.md: Simple Present with languages and nationalities
- Add homework-sbs-chapter10.md: Yes/No questions and negatives
- Add audio-scripts.md: Recording scripts for homework audio files

All homework follow simplified bilingual format (Chinese/English)
SBS homeworks follow diagnostic format with audio, text, and 6 questions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 16:37:31 +08:00
53ff0adde9 Add SBS chapter 10, SBS 3-10 fusion, and WTE2 chapter 4
- Add SBS chapter 10: Simple Present Yes/No Questions & Negatives
  * Master Yes/No questions (Do/Does)
  * Learn negatives (don't/doesn't)
  * Practice short answers
  * Days of the week vocabulary
  * 125 vocabulary words, 17 phrases, 6 dialogs

- Add SBS 3-10 fusion chapter: Present Continuous vs Simple Present
  * Contrast present continuous (NOW) vs simple present (ALWAYS)
  * Combined 150 vocabulary words from both chapters
  * 7 texts showing both tenses in context
  * Comprehensive tense comparison exercises

- Add WTE2 chapter 4: More About Animals - Present Continuous
  * Learn animal actions with present continuous (is/are + -ing)
  * Fun Zoo story with Danny and elephants
  * Phonics: L and R sounds
  * Silly vs logical statements
  * 47 vocabulary words, 7 dialogs, miming game activity

- Update book metadata files
  * sbs.json: Add chapter 10 to available chapters
  * sbs-fusion.json: Add chapter 3-10 fusion
  * wte2.json: Add chapter 4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:02:09 +08:00
bc47483a99 Add diagnostic homework for Archie's class and WTE2 content
Archie's Class (SBS2/SBS8):
- Create diagnostic homework system with audio + text + 6 questions
- Add audio scripts (MyFriends.mp3, ImWearingClothes.mp3)
- Generate bilingual WeChat format homeworks (EN/CN)
- Move DIAGNOSTIC_HOMEWORK_PLAN.md to archie_class_homework/
- Add comprehensive creation process documentation

WTE2 Class:
- Add Chapter 3: Wild Animals & Numbers 11-20 (5 texts: Very Easy → Difficult)
- Add Alphabet Review A-Z (26 letters with vocabulary)
- Add Chapter 3-Alphabet Fusion (combines both chapters, 67 words)
- Update wte2.json book with new chapters
- All JSON files validated

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 23:22:52 +08:00
c7f48405a7 Add diagnostic homework planning documentation
- Create comprehensive DIAGNOSTIC_HOMEWORK_PLAN.md
- Document current situation with SBS2/SBS8 mixed class
- Define diagnostic homework structure (1 text + 3 comp + 3 prod questions)
- Outline exam prep strategy phases (diagnostic → drills → mock exams)
- Specify data collection goals and success metrics
- Plan AI-powered analysis and personalized prep modules

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 19:59:59 +08:00
3a024e6fab Add Hanyu Jiaocheng content and improve game UX
- Add Hanyu Jiaocheng (Chinese course) book and chapters (3 & 4)
- Update TODO with completed game improvements
- Remove legacy TODO file
- Improve game modules with visual enhancements and bug fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 11:43:56 +08:00
abb09023dd Add Canvas-rendered trunks to River Run game with proportional sizing
- Render floating words as wooden trunks using Canvas instead of div elements
- Trunks scale proportionally to word length (longer words = bigger trunks)
- Add realistic wood texture with grain, rings, and highlights
- Display word text both on trunk and below for clarity
- Improve event handling for Canvas-based clickable elements
- Update styles and animations to work with Canvas elements

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 11:14:35 +08:00
8ebc0b2334 Add TTS service, deployment docs, and refactor game modules
- Add TTSService.js for text-to-speech functionality
- Add comprehensive deployment documentation (guides, checklists, diagnostics)
- Add new SBS content (chapters 8 & 9)
- Refactor 14 game modules for better maintainability (-947 lines)
- Enhance SettingsDebug.js with improved debugging capabilities
- Update configuration files and startup scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 23:41:12 +08:00
ab84bbbc71 Reduce game sizes and fix Mario level display
- Reduce RiverRun game height from 100vh to 75vh for better screen fit
- Reduce AdventureReader game height from 100vh to 75vh
- Fix Mario level number display (was showing currentLevel + 1 twice)
  - Updated HUD level display in Renderer.js
  - Updated finish line flag level display in Renderer.js
- Add portable setup files and documentation
- Add new game modules: SentenceInvaders, ThematicQuestions
- Add new content: wte2 book, sbs chapters 2-3, wte2-2 chapter
- Update various game modules for improved compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 16:22:33 +08:00
e4d7e838d5 Enhance game modules with visual effects and improvements
Add visual enhancements including fireball animations, improved rendering, and physics updates across multiple game modules (WizardSpellCaster, MarioEducational, WordDiscovery, WordStorm, RiverRun, GrammarDiscovery).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 14:09:13 +08:00
4714a4a1c6 Add TTS support and improve content compatibility system
Major improvements:
- Add TTSHelper utility for text-to-speech functionality
- Enhance content compatibility scoring across all games
- Improve sentence extraction from multiple content sources
- Update all game modules to support diverse content formats
- Refine MarioEducational physics and rendering
- Polish UI styles and remove unused CSS

Games updated: AdventureReader, FillTheBlank, FlashcardLearning,
GrammarDiscovery, MarioEducational, QuizGame, RiverRun, WhackAMole,
WhackAMoleHard, WizardSpellCaster, WordDiscovery, WordStorm

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-18 02:49:48 +08:00
325b97060c Add LEDU Chinese course content and documentation
Add comprehensive Chinese reading course (乐读) with 4 chapters of vocabulary, texts, and exercises. Include architecture documentation for module development and progress tracking system.

Content:
- LEDU book metadata with 12 chapter outline
- Chapter 1: Food culture (民以食为天) - 45+ vocabulary, etiquette
- Chapter 2: Shopping (货比三家) - comparative shopping vocabulary
- Chapter 3: Sports & fitness (生命在于运动) - exercise habits
- Chapter 4: Additional vocabulary and grammar

Documentation:
- Architecture principles and patterns
- Module creation guide (Game, DRS, Progress)
- Interface system (C++ style contracts)
- Progress tracking and prerequisites

Game Enhancements:
- MarioEducational helper classes (Physics, Renderer, Sound, Enemies)
- VocabularyModule TTS improvements
- Updated CLAUDE.md with project status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 07:25:53 +08:00
7a18e27a44 Add TTS and pronunciation display to vocabulary games
Implement click-to-speak functionality with visual pronunciation feedback in QuizGame and FlashcardLearning. When users click on vocabulary options or answers, the system plays native language audio (e.g., Chinese) and highlights the pronunciation (pinyin) with animation.

Features:
- TTS uses chapter language (zh-CN, en-US, etc.) for correct pronunciation
- Pronunciation text displayed under each quiz option
- Click on answer triggers TTS + 2s highlight animation
- Hover effects on clickable elements
- Auto-detect and use matching voice from speechSynthesis API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 07:23:47 +08:00
838c8289b8 Refactor Fill The Blank game with dual-mode content system
Enhance Fill The Blank to work with both predefined exercises and auto-generated blanks from phrases:

- Add dual content mode support (predefined fill-in-blanks + auto-generated from phrases)
- Implement smart blank generation with max 20% word blanking and max 2 blanks per phrase
- Prefer vocabulary words for auto-blanking with intelligent word selection
- Add comprehensive JSDoc comments explaining both modes
- Improve compatibility scoring to prioritize predefined exercises
- Simplify input handling with data attributes for answers
- Fix WhackAMole and WhackAMoleHard games to use entire hole as clickable area
- Add pronunciation support for correct answers
- Improve error handling and user feedback

Games updated:
- FillTheBlank.js - Dual-mode content system with smart blank generation
- GrammarDiscovery.js - Code cleanup and consistency improvements
- WhackAMole.js - Entire hole clickable, not just text label
- WhackAMoleHard.js - Entire hole clickable, not just text label

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 18:15:24 +08:00
de3267c21d Improve WhackAMole clickable area - click entire hole not just text
Issue: Players found it difficult to click precisely on the mole text,
especially on mobile or with fast-paced gameplay.

Fix:
- Changed click event from hole.mole (text only) to hole.element (entire hole circle)
- Makes the entire circular hole clickable, not just the word
- Much easier to target, especially on small screens
- Applied to both WhackAMole and WhackAMoleHard

Changes:
- src/games/WhackAMole.js:719 - Click on hole.element instead of hole.mole
- src/games/WhackAMoleHard.js:862 - Click on hole.element instead of hole.mole

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 15:34:23 +08:00
0d17fb560c Fix FlashcardLearning content loading priority
Issue: Game failed with "No suitable content available for flashcards"
even when chapter had vocabulary data.

Root Cause:
- FlashcardLearning.init() tried window.contentLoader.getContent() first
- This synchronous utils ContentLoader might not have content yet
- Game already receives content via dependencies from GameLoader

Fix:
- Prioritize this._content (from dependencies) first
- Only fallback to window.contentLoader if no dependency content
- Content is guaranteed to be loaded by GameLoader before init()

Changes:
- src/games/FlashcardLearning.js:178 - Reversed content loading priority

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 10:11:38 +08:00
cdae675f9c Fix RiverRun EventBus module name validation errors
🐛 Bug Fixed:
"Module name must be a non-empty string" errors throughout RiverRun gameplay

🔍 Root Causes:
1. Module constructor not ensuring this.name is always defined
2. EventBus.emit() calls missing required third parameter (moduleName)
3. GameLoader may instantiate modules without providing a name

🔧 Solutions Applied:

**Constructor (lines 5, 11-14):**
- Added fallback: super(name || 'river-run', ['eventBus'])
- Explicit check: if (!this.name) this.name = 'river-run'
- Guarantees this.name is always 'river-run' if undefined

**_collectWord() (line 617):**
- Added missing third parameter to emit call
- Before: emit('game:score-update', {...})
- After: emit('game:score-update', {...}, this.name)

**_endGame() (line 719):**
- Added fallback for module name in emit
- emit('game:end', {...}, this.name || 'river-run')

 Result:
- All EventBus validation passes
- Game works during gameplay (collecting words, scoring)
- Game Over screen works without errors
- Play Again button works correctly

🎮 Tested:
- Launch game 
- Collect correct words 
- Miss words 
- Game over 
- Replay 

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 09:53:02 +08:00
6cafb9218b Fix StoryReader compatibility and memory leak issues
🔧 Changes:
- StoryReader now handles both old/new text structures (original_language vs content)
- Fixed memory leak: properly remove global event listeners on destroy
- Added null check in _hideWordPopup() to prevent errors after DOM cleanup
- Fixed chapter list display (was showing only one chapter instead of all)
- Smart routing: only load chapter content when needed
- Use module ContentLoader for proper content loading with vocabulary

🐛 Bugs Fixed:
1. "Cannot read properties of undefined (reading 'split')" - StoryReader couldn't handle texts with 'content' field
2. "Cannot read properties of null (reading 'style')" - Event listeners firing after game cleanup
3. Chapter list showing only book ID instead of all chapters
4. Game compatibility scores dropping to 0.00 after navigation

 Architecture Improvements:
- Event listener cleanup follows best practices
- Proper handler reference storage for removeEventListener
- Defensive programming with null checks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 09:33:16 +08:00
3da40c0d73 Save current state before exploring first DRS commit
Preserving current work:
- Modified DRS modules and factories
- Updated content and progress tracking
- Deprecated PhraseModule moved to archive

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 08:47:23 +08:00
44f43324cf Implement ExerciseFactory with strict DRS interface enforcement
🏭 **MAJOR ARCHITECTURE - Factory Pattern Implementation**

**ExerciseFactory Created** (src/DRS/factories/ExerciseFactory.js):
-  Unified creation system for all 11 DRS exercise modules
-  Strict DRSExerciseInterface validation (10 required methods)
-  Smart dependency injection (orchestrator, prerequisiteEngine, llmValidator, contextMemory)
-  Module type mapping: 20 exercise types → 11 module classes
-  Methods: create(), createAndRender(), batchCreate(), destroy()
-  Caching system for loaded module classes
-  Smart warnings (no LLM warning for local-validation modules)

**UnifiedDRS Refactored** (src/DRS/UnifiedDRS.js):
-  Integrated ExerciseFactory for all module loading
-  Created generic helper: _loadExerciseViaFactory()
-  Centralized dependencies: _getDependencies()
-  Simplified loaders: _loadVocabularyModule(), _loadWordDiscoveryModule(), _loadAIAnalysisModule()
-  Removed manual HTML generation - all via factory now
-  165 lines removed, code DRY improved

**Test Suite Created** (test-factory.html):
-  Interactive web-based test interface
-  3 test suites: Validation, Creation (11 modules), Interface compliance
-  Real-time results with success/failure indicators
-  Factory stats display

**Content Enhancement** (test-heavy-stress.json):
-  Added 12 comprehension questions (3 lessons + 1 dialog)
-  lesson1: 3 questions on research methodology
-  lesson2: 3 questions on statistical analysis
-  lesson3: 3 questions on qualitative research
-  conference_presentation: 3 questions on mixed-methods
-  Fixes IntelligentSequencer warnings (now has questions)

**Benefits:**
- 🛡️ Impossible to create modules without interface compliance
- 🔒 Red screen errors force correct implementation
- 📋 Self-documenting via strict contracts
- 🔄 100% DRY - zero code duplication
- 🧪 Fully testable with mock dependencies
- 🎯 Production-ready architecture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 15:39:53 +08:00
9cc4e30eed Complete DRS interface implementation - all systems validated
 **PART 2 COMPLETE - Progress Systems**:

**ProgressTracker** - 17/17 methods implemented:
- Vocabulary: markWordDiscovered, markWordMastered, isWordDiscovered, isWordMastered
- Content: markPhraseCompleted, markDialogCompleted, markTextCompleted, markAudioCompleted, markImageCompleted, markGrammarCompleted
- Core: canComplete, getProgress, saveProgress, loadProgress, reset

**PrerequisiteEngine** - 17/17 methods implemented:
- Same 17 methods as ProgressTracker
- Delegates to existing methods (markDiscovered, markMastered, etc.)
- Adds new Sets for dialogs, texts, audios, images

🎯 **Complete System Status**:
- PART 1:  8/8 progress items validated
- PART 2:  2/2 progress systems validated
- PART 3:  11/11 exercise modules validated
- **100% interface compliance achieved**

🔒 **Strict Interface Enforcement**:
- All systems implement required interfaces
- Red screen errors for missing methods
- Application validation at startup
- Production-ready architecture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 13:49:00 +08:00
194d65cd76 Implement strict DRS interface system for all 11 exercise modules
MAJOR ARCHITECTURE UPDATE - C++ Style Interface Enforcement

🔒 **Strict Interface System**:
- Created DRSExerciseInterface (10 required methods)
- Created ProgressSystemInterface (17 required methods)
- Updated ImplementationValidator with 3-phase validation
- Red screen errors for missing implementations

📚 **11/11 Exercise Modules Implemented**:
 VocabularyModule - Local flashcard validation
 TextAnalysisModule - AI text comprehension
 GrammarAnalysisModule - AI grammar correction
 TranslationModule - AI translation validation
 OpenResponseModule - AI open-ended responses
 PhraseModule - Phrase comprehension
 AudioModule - Audio listening exercises
 ImageModule - Visual comprehension
 GrammarModule - Grammar exercises
 TextModule - Reading comprehension
 WordDiscoveryModule - Vocabulary introduction

🎯 **Required Methods (All Modules)**:
- Lifecycle: init(), render(), destroy()
- Exercise: validate(), getResults(), handleUserInput()
- Progress: markCompleted(), getProgress()
- Metadata: getExerciseType(), getExerciseConfig()

📋 **Documentation**:
- Updated CLAUDE.md with complete interface hierarchy
- Created DRS_IMPLEMENTATION_PLAN.md (roadmap)
- Documented enforcement rules and patterns

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 13:43:25 +08:00
13f6d30e86 Implement robust progress system with ultra-strict validation
**Core Architecture:**
- StrictInterface: Base class with visual error enforcement (red screen, sound, shake)
- ProgressItemInterface: Strict contract requiring 4 methods (validate, serialize, getWeight, canComplete)
- Implementation validation at startup - app refuses to start if methods missing

**Progress Items (8 types with realistic weights):**
- VocabularyDiscoveryItem (1pt) - Passive word exposure, no prerequisites
- VocabularyMasteryItem (1pt) - Active flashcards, requires discovery
- PhraseItem (6pts, 3x vocab) - Requires vocabulary mastery
- DialogItem (12pts, 6x vocab) - Complex, requires vocabulary mastery
- TextItem (15pts, 7.5x vocab) - Most complex, requires vocabulary mastery
- AudioItem (12pts, 6x vocab) - Requires vocabulary mastery
- ImageItem (6pts, 3x vocab) - Requires vocabulary discovered
- GrammarItem (6pts, 3x vocab) - Requires vocabulary discovered

**Realistic Progress Calculation:**
- 1 vocab word = 2 points total (discovery + mastery)
- Other items weighted 3x-7.5x heavier for realistic progression
- Example: 171 vocab (342pts) + 75 phrases (450pts) + 6 dialogs (72pts) + 3 texts (45pts) = 909 total points
- Discovering all words = 38% progress (not 76%)

**Services:**
- ContentProgressAnalyzer: Scans chapter content, creates progress items, calculates total weight
- ProgressTracker: Manages state, tracks completion, saves progress to server
- ImplementationValidator: Validates all implementations at startup

**Integration:**
- Application.js validates ALL item implementations before startup
- Missing methods trigger full-screen red error with impossible-to-ignore UI
- Sound alert + screen shake in dev mode

**Pedagogical Flow Enforced:**
Discovery (passive) → Mastery (active) → Application (context)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 15:26:42 +08:00
837a225217 Add stress testing content and update DRS modules
- Add test-heavy.json book with 156 advanced academic vocabulary terms
- Add test-heavy-stress.json chapter for system stress testing
- Update UnifiedDRS with ContentDependencyAnalyzer integration
- Update VocabularyModule for unified persistence system
- Update progress saves with test data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 12:59:07 +08:00
29bc112c0c Unify vocabulary persistence system - remove dual systems
- Simplified loadPersistedVocabularyData() to use only VocabularyProgressManager
- Updated calculateVocabularyProgress() to use unified data structure
- Removed old system references from knowledge panel data loading
- Fixed field names (drsDiscovered, drsMastered) for unified system
- Knowledge panel now displays vocabulary progress correctly

 TESTED: Vocabulary Knowledge panel working with unified system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 13:39:00 +08:00
4b71aba3da Implement intelligent DRS vocabulary system with Smart Guide integration
Major Features:
• Smart vocabulary dependency analysis - only learn words needed for next content
• Discovered vs Mastered word tracking with self-assessment (Again/Hard/Good/Easy)
• Vocabulary Knowledge interface connected to DRS PrerequisiteEngine (not flashcard games)
• Smart Guide UI adaptation for vocabulary override with clear explanations
• Real PrerequisiteEngine with full method support replacing basic fallbacks

Technical Implementation:
• VocabularyModule: Added discovered words tracking + self-assessment scoring
• UnifiedDRS: Vocabulary override detection with Smart Guide signaling
• Vocabulary Knowledge: Reads from DRS only, shows discovered vs mastered stats
• Smart Guide: Adaptive UI showing "Vocabulary Practice (N words needed)" when overridden
• PrerequisiteEngine: Full initialization with analyzeChapter() method

Architecture Documentation:
• Added comprehensive "Intelligent Content Dependency System" to CLAUDE.md
• Content-driven vocabulary acquisition instead of arbitrary percentage-based forcing
• Complete implementation plan for smart content analysis and targeted learning

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 08:26:30 +08:00
f5cef0c913 Add comprehensive testing suite with UI/UX and E2E integration tests
- Create complete integration test system (test-integration.js)
- Add UI/UX interaction testing with real event simulation (test-uiux-integration.js)
- Implement end-to-end scenario testing for user journeys (test-e2e-scenarios.js)
- Add console testing commands for rapid development testing (test-console-commands.js)
- Create comprehensive test guide documentation (TEST-GUIDE.md)
- Integrate test buttons in debug panel (F12 → 3 test types)
- Add vocabulary modal two-progress-bar system integration
- Fix flashcard retry system for "don't know" cards
- Update IntelligentSequencer for task distribution validation

🧪 Testing Coverage:
- 35+ integration tests (architecture/modules)
- 20+ UI/UX tests (real user interactions)
- 5 E2E scenarios (complete user journeys)
- Console commands for rapid testing
- Debug panel integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 23:04:38 +08:00
e8805f878f Complete AI scoring system overhaul with production-ready validation
🎯 MAJOR ACHIEVEMENTS:
 Eliminated ALL mock/fallback responses - Real AI only
 Implemented strict scoring logic (0-20 wrong, 70-100 correct)
 Fixed multi-language translation support (Spanish bug resolved)
 Added comprehensive OpenAI → DeepSeek fallback system
 Created complete Open Analysis Modules suite
 Achieved 100% test validation accuracy

🔧 CORE CHANGES:
- IAEngine: Removed mock system, added environment variable support
- LLMValidator: Eliminated fallback responses, fail-hard approach
- Translation prompts: Fixed context.toLang parameter mapping
- Cache system: Temporarily disabled for accurate testing

🆕 NEW EXERCISE MODULES:
- TextAnalysisModule: Deep comprehension with AI coaching
- GrammarAnalysisModule: Grammar correction with explanations
- TranslationModule: Multi-language validation with context

📋 DOCUMENTATION:
- Updated CLAUDE.md with complete AI system status
- Added comprehensive cache management guide
- Included production deployment recommendations
- Documented 100% test validation results

🚀 PRODUCTION STATUS: READY
- Real AI scoring validated across all exercise types
- No fake responses possible - educational integrity ensured
- Multi-provider fallback working (OpenAI → DeepSeek)
- Comprehensive testing suite with 100% pass rate

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 00:14:00 +08:00
a6c81a8ec3 Implement Intelligent QCM system with AI-generated plausible distractors
- Transform ContentLoader from hardcoded QCM to AI-powered exercises
- Remove all mock content generators (_generateTextExercise, etc.)
- Add pure AI content generation with 6-option QCM (1 correct + 5 distractors)
- Create intelligent distractors testing common learning mistakes:
  * Text: main idea confusion, partial truths, logical but wrong conclusions
  * Audio: mishearing, speaker confusion, context misunderstanding
  * Image: object similarity, spatial confusion, descriptive errors
  * Grammar: common errors, tense mistakes, wrong constructions
- Reduce random success chance from 25% to 16.7% for better learning assessment
- Make AI mandatory - no fallback without IAEngine availability
- Update CLAUDE.md plan with dual exercise approach documentation
- Fix async/await issues in ContentLoader module loading chain

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 10:47:48 +08:00
05142bdfbc Implement comprehensive AI text report/export system
- Add AIReportSystem.js for detailed AI response capture and report generation
- Add AIReportInterface.js UI component for report access and export
- Integrate AI reporting into LLMValidator and SmartPreviewOrchestrator
- Add missing modules to Application.js configuration (unifiedDRS, smartPreviewOrchestrator)
- Create missing content/chapters/sbs.json for book metadata
- Enhance Application.js with debug logging for module loading
- Add multi-format export capabilities (text, HTML, JSON)
- Implement automatic learning insights extraction from AI feedback
- Add session management and performance tracking for AI reports

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 21:24:13 +08:00
38920cc858 Complete architectural rewrite with ultra-modular system
Major Changes:
- Moved legacy system to Legacy/ folder for archival
- Built new modular architecture with strict separation of concerns
- Created core system: Module, EventBus, ModuleLoader, Router
- Added Application bootstrap with auto-start functionality
- Implemented development server with ES6 modules support
- Created comprehensive documentation and project context
- Converted SBS-7-8 content to JSON format
- Copied all legacy games and content to new structure

New Architecture Features:
- Sealed modules with WeakMap private data
- Strict dependency injection system
- Event-driven communication only
- Inviolable responsibility patterns
- Auto-initialization without commands
- Component-based UI foundation ready

Technical Stack:
- Vanilla JS/HTML/CSS only
- ES6 modules with proper imports/exports
- HTTP development server (no file:// protocol)
- Modular CSS with component scoping
- Comprehensive error handling and debugging

Ready for Phase 2: Converting legacy modules to new architecture

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 07:08:39 +08:00
79a2cd3778 Add NCE modules integration and enhanced wizard effects
- Add 3 NCE content modules (NCE1-Lesson63-64, NCE2-Lesson3, NCE2-Lesson30)
- Integrate NCE modules in content-scanner, game-loader, navigation
- Add sentences extracted from stories for better game compatibility
- Add meteor spells to NCE1 (15+ word sentences for wizard game)
- Enhanced wizard spell effects with particles and casting animations
- Update games-config.json with NCE module configurations

Note: Architecture needs refactoring - too many interdependencies
Current state has issues that need systematic cleanup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 14:15:22 +08:00
30fb6cd46c Fix Fill the Blank with intelligent word selection and real sentences
🚨 MAJOR FIXES:
- Remove all hardcoded French templates (60+ lines of garbage)
- Replace with real sentence extraction from content
- Support story.chapters, rawContent.story, and sentences arrays
- Universal language support (English/Chinese, not French-only)

🎯 INTELLIGENT WORD SELECTION:
- Priority 1: Words from content vocabulary (educational value)
- Priority 2: Longest words if vocabulary not available
- Max 1-2 blanks per sentence (random) for readability
- Universal logic works for all languages (Chinese, English, etc.)

🔧 TECHNICAL IMPROVEMENTS:
- Clean punctuation before vocabulary matching
- Case-insensitive word comparison
- Proper fallback sentences with correct target language
- Better sentence filtering (min 3 words for blanks)

 RESULT:
- WTA1B1 now shows English sentences with Chinese translations
- Targets vocabulary words (turtle, umbrella, violet, etc.)
- No more "Je vois un..." French garbage
- Works universally for any language content

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 12:51:18 +08:00
638c734578 Add epic animations to Word Storm good/bad responses
🎉 GOOD ANSWER ANIMATIONS:
- Enhanced explosion with color transitions (blue→green→orange→red)
- Screen shake effect for impact feedback
- Floating points popup (+10, +12, etc.) with smooth animation
- Gentle vibration pattern for positive reinforcement

 BAD ANSWER ANIMATIONS:
- Red shake animation for all falling words
- Answer panel flash with red glow effect
- Full screen red overlay flash
- Strong vibration pattern for negative feedback

🎨 TECHNICAL IMPROVEMENTS:
- New CSS keyframes: explode, wrongShake, wrongFlash, screenShake, pointsFloat
- Enhanced correctAnswer() method with screen shake and points popup
- Enhanced wrongAnswer() method with multi-element animations
- Vibration API integration for tactile feedback
- Proper animation cleanup and timing

🎯 UX ENHANCEMENT:
- Much more satisfying and engaging gameplay experience
- Clear visual distinction between success and failure
- Gamification elements that motivate continued play

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 12:09:44 +08:00
e67e40f09b Fix Story Reader word parsing for letters and punctuation
- Separate punctuation from words during sentence parsing
- Add special handling for letter pairs (Aa, Bb, Cc, etc.)
- Add special handling for punctuation marks (., !, ?, :, etc.)
- Preserve punctuation display while enabling proper word-by-word navigation
- Fix alphabet learning display in SBS-1 content

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 11:29:36 +08:00
30a2028da6 Remove Text Reader game and enhance Story Reader
- Enhanced Story Reader with text-to-story conversion methods
- Added support for simple texts and sentences in Story Reader
- Removed Text Reader game file (js/games/text-reader.js)
- Updated all configuration files to remove Text Reader references
- Modified game compatibility system to use Story Reader instead
- Updated test fixtures to reflect game changes
- Cleaned up debug/test HTML files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 11:22:56 +08:00
e50dd624a0 Add comprehensive game suite with TTS integration and content modules
🎮 NEW GAMES:
- River Run: Endless runner with word collection and guaranteed target spawning
- Grammar Discovery: Focused grammar learning with 8-step rotation cycles
- Letter Discovery: Letter-first alphabet learning with progression system
- Enhanced Word Discovery: Shuffled practice mode with image support and auto-TTS

📚 NEW CONTENT MODULES:
- WTA1B-1: English letters U,V,T with pets vocabulary and Chinese translation
- SBS-1: English "To Be" introduction with comprehensive grammar lessons
- French Beginner Story: Story content for English speakers learning French

🔊 TTS ENHANCEMENTS:
- Story Reader: Multi-story support with TTS for sentences and individual words
- Adventure Reader: Auto-TTS for vocabulary popups and sentence modals
- Word Discovery: Immediate TTS playback with difficulty-based speed control
- Integrated SettingsManager compatibility across all games

🎯 GAMEPLAY IMPROVEMENTS:
- River Run: Target word guaranteed within 10 spawns, progressive spacing
- Story Reader: Story selector dropdown with independent progress tracking
- Adventure Reader: Fixed HUD overlap issue with proper viewport spacing
- Enhanced punctuation preservation in Story Reader word parsing

 SYSTEM UPDATES:
- Content scanner integration for all new modules
- Game loader mappings for seamless content discovery
- Simplified content titles: "WTA1B-1" and "SBS-1" for easy identification
- Comprehensive test files for isolated game development

🎉 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 09:15:01 +08:00
475006e912 Add Word Discovery game with auto-play TTS and Settings system
- New Word Discovery game with image support and practice phases
- Auto-play TTS on word appearance with speed control (0.7x-1.1x)
- Complete Settings page with TTS controls and debug interface
- Language standardization with BCP 47 codes (en-US, zh-CN, fr-FR)
- Media fallback handling for missing images and audio
- Settings Manager with voice selection and debug tools

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:39:08 +08:00
cb0c3b01f8 Clean repository: remove 42 debug, test and temporary files
- Remove all debug-*.js and test-*.* files from root directory
- Remove temporary conversion and example files
- Remove documentation files that cluttered root
- Remove admin and start batch files
- Keep only essential core files and organized directory structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 02:02:07 +08:00
dacc7e98a1 Implement Word Storm game and refactor CSS architecture
Major features:
- Add new Word Storm falling words vocabulary game
- Refactor CSS to modular architecture (global base + game injection)
- Fix template literal syntax errors causing loading failures
- Add comprehensive developer guidelines to prevent common mistakes

Technical changes:
- Word Storm: Complete game with falling words, scoring, levels, lives
- CSS Architecture: Move game-specific styles from global CSS to injectCSS()
- GameLoader: Add Word Storm mapping and improve error handling
- Navigation: Add Word Storm configuration
- Documentation: Add debugging guides and common pitfall prevention

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 01:55:08 +08:00
fe7153d28b Fix compatibility system and improve UX
- Add intelligent content-game compatibility system with visual badges
- Fix Adventure Reader to work with Dragon's Pearl content structure
- Implement multi-column games grid for faster navigation
- Add pronunciation display for Chinese vocabulary and sentences
- Fix navigation breadcrumb to show proper hierarchy (Home > Levels > Content)
- Add back buttons to all navigation pages
- Improve JSONContentLoader to preserve story structure
- Add comprehensive debugging and diagnostic tools

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 19:29:21 +08:00
0d5f577f28 Adapt text-reader.js to ultra-modular format
- Replace legacy extractTexts() method with ultra-modular support
- Add support for texts with original_language/user_language format
- Add extractSentences() and extractVocabulary() methods for content flexibility
- Support reading individual sentences and vocabulary words as mini-texts
- Remove legacy content.content references, use content.original/translation
- Update full text display to show both original and translation
- Maintain backward compatibility through rawContent fallback
- Improve error messages to reflect ultra-modular requirements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 13:53:06 +08:00
cb614a439d Add comprehensive test suite with unit tests and integration tests
- Complete test infrastructure with runners, helpers, and fixtures
- Unit tests for core modules: EnvConfig, ContentScanner, GameLoader
- Integration tests for proxy, content loading, and navigation
- Edge case tests covering data corruption, network failures, security
- Stress tests with 100+ concurrent requests and performance monitoring
- Test fixtures with malicious content samples and edge case data
- Comprehensive README with usage instructions and troubleshooting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 11:37:08 +08:00
1f8688c4aa Fix WebSocket logging system and add comprehensive network features
- Fix WebSocket server to properly broadcast logs to all connected clients
- Integrate professional logging system with real-time WebSocket interface
- Add network status indicator with DigitalOcean Spaces connectivity
- Implement AWS Signature V4 authentication for private bucket access
- Add JSON content loader with backward compatibility to JS modules
- Restore navigation breadcrumb system with comprehensive logging
- Add multiple content formats: JSON + JS with automatic discovery
- Enhance top bar with logger toggle and network status indicator
- Remove deprecated temp-games module and clean up unused files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 23:05:14 +08:00
855cfe2f94 Merge remote changes with local development
🔧 Resolved conflicts by accepting remote versions
📁 Added new content: basic-chinese.js, english-class-demo.js, chinese-study.js
 Updated game configurations and core modules
2025-09-15 14:45:13 +08:00
7d085243c1 Local changes before pull 2025-09-15 14:43:03 +08:00
b004382cee Initial commit: Interactive English Learning Platform
- Complete SPA architecture with dynamic module loading
- 9 different educational games (whack-a-mole, memory, quiz, etc.)
- Rich content system supporting multimedia (audio, images, video)
- Chinese study mode with character recognition
- Adaptive game system based on available content
- Content types: vocabulary, grammar, poems, fill-blanks, corrections
- AI-powered text evaluation for open-ended answers
- Flexible content schema with backward compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 14:25:13 +08:00