- Add createWordExerciseState() that splits words into letters with boundaries
- Add getCurrentWordIndex() helper for UI word tracking
- Extend TypingExerciseState with mode, words, wordBoundaries fields
- Backwards compatible: createExerciseState sets mode='letters'
- All 85 tests pass
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Tests for createWordExerciseState, getCurrentWordIndex
- Backwards compatibility test for createExerciseState mode field
- handleKeyPress test with word-mode state
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SUMMARY.md with execution results
- STATE.md updated with position and decisions
- ROADMAP.md updated with plan progress
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SUMMARY.md with forest scene implementation details
- STATE.md updated with progress and decisions
- ROADMAP.md updated with plan progress
- Requirements FRST-01, FRST-02, FRST-03 marked complete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Progress: added totalCorrect, totalErrors, errorKeyCounts, lastPlayedLevels
- New LessonPhase type: discover | practice | words
- Rate limits: 10 text / 5 image per day (was 1 each)
- Updated screens.ts with new Progress field defaults
- Updated existing tests for new rate limits and Progress shape
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- renderForestScene() loads elements from IDB and renders as images
- Object URLs tracked and revoked on re-render to prevent memory leaks
- Random +-10-20px offset for natural element placement
- New element animation class applied via newElementId parameter
- Integrated into initForestScreen alongside renderLevelMap
- Static word lists for levels 1-6, 8-10 words each
- Levels 1-2 use letter combos (no real words possible with F/J/D/K)
- Levels 3-6 mix real German words with combos
- All words validated: only use learned letters, max 5 chars
- getWordsForLevel with/without replacement sampling
- All 8 tests pass
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SVG woodland background with sky gradient, clouds, sun, trees, hills, ground
- 4x3 CSS grid overlay for forest element placement
- Fade-in + scale-up animation keyframes for new elements
- Tests for wordsByLevel entries levels 1-6
- Tests for allKeys-only characters validation
- Tests for max 5 chars per word
- Tests for getWordsForLevel random selection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 plans across 3 waves covering all 17 requirements:
- Plan 01 (W1): Word lists, Progress extension, rate limits
- Plan 02 (W2): Lesson 3-phase state machine, review/repeat
- Plan 03 (W1): Forest visual scene with SVG + grid
- Plan 04 (W3): Reward screen, pre-generation, full flow wiring
- Plan 05 (W2): Parent area with stats and settings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add forest-greeting companion area in HTML with avatar + text
- Add lesson-companion area in HTML above letter area
- Wire getGreeting() call for returning users in app.ts
- Show companion avatar in lesson screen via getProgress lookup
- Fix pre-existing noUncheckedIndexedAccess errors in fallbacks.ts (Rule 3)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extend CompanionDefinition with avatarUrl field using Vite static imports
- Replace emoji-only companion cards with avatar img + onerror emoji fallback
- Add companion-card__avatar CSS (80px round) and companion-area styles (48px)
- Add vite-env.d.ts for PNG import type declarations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SUMMARY: 6 IndexedDB accessors + 9 generated assets via Gemini API
- STATE: advance to plan 4/5, 90% progress
- ROADMAP: update phase 02 plan progress
- REQUIREMENTS: mark ASST-01, ASST-02 complete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SUMMARY.md with task commits and decisions
- STATE.md advanced to plan 4 of 5, 80% progress
- ROADMAP.md updated with plan progress
- Requirements COMP-01 through COMP-04 marked complete
- getGreeting: AI greeting with time-of-day context, falls back to static texts
- getLetterIntro: AI letter introduction with finger description, falls back to curated intros
- getForestComment: AI forest element comment, falls back to static comments
- All functions check config availability and rate limits before API calls
- System prompts enforce max 25 words, simple German, no performance praise
- Tests for getGreeting, getLetterIntro, getForestComment
- Covers API success, API failure, no config, rate-limited paths
- 12 test cases total with mocked dependencies
- Config loader: fetches/caches public/config.json with GeminiConfig interface
- generateText: Gemini REST with 3x exponential backoff retry, returns string|null
- generateImage: reference images as base64 inlineData, responseModalities: ["IMAGE"]
- Rate limiting: checkRateLimit/incrementApiCall with daily reset in Settings store
- Extended Settings type with apiCallsToday and lastApiCallDate fields
- 18 tests across config.test.ts and gemini.test.ts, all passing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- blume, pilz, vogel, schmetterling, reh, baum, bach
- Pastel watercolor style with soft gradients, 200x200 viewBox
- All under 2KB, no text elements, child-friendly aesthetic
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 10 time-of-day keyed greetings (morgen/mittag/abend/any)
- 10 forest element discovery comments
- 13 letter introductions for levels 1-6 with finger mapping
- Helper functions for random selection and letter lookup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Back button in lesson screen to return to forest without completing
- "Alle Stufen geschafft!" message when all 6 levels are done
- Cap currentLevel at MAX_LEVEL to prevent out-of-bounds progression
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Lesson screen HTML with letter-area and keyboard containers
- initLessonScreen: renders keyboard, shows letters, handles keypress
- Correct key dissolves letter with animation, advances to next
- Wrong key does nothing (per D-03), correct key stays highlighted
- startLesson in app.ts: manages lesson lifecycle and cleanup
- onComplete: updates progress, unlocks next level, saves to IndexedDB
- CSS: floating letter animation, dissolve effect on correct press
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- generateLetters: random 8-12 letters from level key set
- handleKeyPress: correct/wrong input with adaptive tempo
- Adaptive tempo: 3s start, -200ms after 2x correct, +500ms on error
- Bounds: min 1500ms, max 4000ms
- 18 passing tests covering all behavior
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SUMMARY.md with 2 tasks, 4 files, 3 commits
- STATE.md advanced to plan 4/5, 60% progress
- ROADMAP.md and REQUIREMENTS.md updated
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add 01-02-SUMMARY.md with execution results
- Update STATE.md: plan 3/5, 40% progress, decisions logged
- Update ROADMAP.md with plan progress
- Mark requirements FNDN-05, ONBD-01-04 complete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Full QWERTZ keyboard with DE and CH layout support
- Finger color mapping for all keys per spec section 8.3
- renderKeyboard, highlightKey, pressKey, updateKeyboardForLevel exports
- CSS: pulse animation for target key, press animation on keydown
- Inactive keys grayed at 0.5 opacity, active keys with finger colors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Create companion/characters.ts with 4 companion definitions (fee, einhorn, fuchs, eule)
- Create app.ts with showScreen, getDB, initApp (routes to welcome or forest)
- Update main.ts to call initApp on DOMContentLoaded
- Add stub ui/screens.ts for initWelcomeScreen
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SUMMARY.md with all task commits and deviations
- STATE.md advanced to plan 2 of 5 (20%)
- ROADMAP.md and REQUIREMENTS.md updated
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- All shared interfaces: Progress, Settings, ForestElement, CompanionAssets, etc.
- IndexedDB wrapper with 5 stores (progress, companionAssets, styleReference, forestElements, settings)
- CRUD for progress and settings stores
- 5 passing tests with fake-indexeddb
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>