Commit Graph
126 Commits
Author SHA1 Message Date
gurix 3a79379e5a feat(04-02): enhanced CSS animations + responsive layout
- Replace letter-float with leaf-fall sinusoidal sway animation
- Add stardust particles on falling-letter--dissolve via pseudo-elements
- Add companion-float animation on companion-area__avatar
- Add prefers-reduced-motion media query to disable animations
- Add responsive styles at max-width 700px (smaller keys, scaled fonts, adjusted grids)
2026-03-29 18:15:33 +02:00
gurix f9601cb271 docs(04-polish-audio): create phase plan 2026-03-29 18:12:06 +02:00
gurix 4a25e5e8a4 docs(state): record phase 4 context session 2026-03-29 18:06:03 +02:00
gurix 66352b247f docs(04): capture phase context (assumptions mode) 2026-03-29 18:06:03 +02:00
gurixandClaude Opus 4.6 e41d71d403 fix(03): soft radial mask for forest elements and green background prompt
- CSS radial-gradient mask for organic blending into forest scene
- Generate with light green background instead of transparency (avoids checkerboard)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 17:59:47 +02:00
gurix a02948d612 docs(phase-03): evolve PROJECT.md after phase completion 2026-03-29 13:58:25 +02:00
gurix f5163b00ea docs(phase-03): complete phase execution 2026-03-29 13:58:01 +02:00
gurix c0f32e09a4 docs(03-04): complete reward screen and game loop plan
- SUMMARY.md for reward module and game flow wiring
- STATE.md updated with position, decisions, metrics
- ROADMAP.md updated with plan progress
- Requirements RWRD-01 through RWRD-04 marked complete
2026-03-29 13:54:34 +02:00
gurix aaf9872f1d feat(03-04): wire complete game flow with reward screen and review triggers
- Lesson completion now shows reward screen instead of going directly to forest
- Pre-generation starts at lesson begin (fire-and-forget)
- Stats accumulated (correct/errors/errorKeys) in progress after each lesson
- Review mode triggers every 3rd session
- Encouragement shown after 2x same level (repetition protection)
- Progress migration for older saved data without new fields
2026-03-29 13:53:23 +02:00
gurix e599050303 feat(03-04): add reward module with pre-generation and reward screen
- Create src/forest/reward.ts with startPreGeneration() and initRewardScreen()
- Image pre-generation starts at lesson begin, placeholder shows while loading
- Fallback to static SVGs when rate-limited or API unavailable
- Reward screen HTML with image area, companion comment, action buttons
- CSS for reward screen with animated leaves placeholder and image appear animation
2026-03-29 13:52:05 +02:00
gurixandClaude Opus 4.6 4f1a2b55d6 docs(03-02): complete lesson flow plan
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:50:01 +02:00
gurixandClaude Opus 4.6 770f566972 feat(03-02): lesson screen 3-phase state machine with review and repetition
- Discover phase: companion introduces new key, key pulses, child presses once
- Practice phase: existing letter exercise with cumulative stats
- Words phase: word display with active letter highlighting
- Review mode skips discover, mixes letters/words from recent levels
- Encouragement messages for repetition protection
- Phase indicator UI (Entdecken / Ueben / Woerter)
- CSS for word display, phase indicator, discover pulse animation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:48:56 +02:00
gurixandClaude Opus 4.6 ab5bab9733 docs(03-05): complete parent area plan
- Add 03-05-SUMMARY.md with plan execution results
- Update STATE.md, ROADMAP.md, REQUIREMENTS.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:47:47 +02:00
gurix a5326c7a24 feat(03-05): wire parent area into app.ts
- Import showParentCodePrompt and initParentScreen from ui/parent
- Register global Ctrl+Shift+E keyboard listener in initApp
- Initialize parent screen with back-to-forest callback
2026-03-29 13:46:45 +02:00
gurix 44c28fe226 feat(03-05): parent area HTML, CSS, and access gate
- Add parent screen HTML with code gate, stats overview, and settings form
- Add parent area CSS styles for stats grid, calendar dots, error badges, settings
- Create src/ui/parent.ts with showParentCodePrompt, initParentScreen, loadParentData
2026-03-29 13:46:10 +02:00
gurixandClaude Opus 4.6 2c0c2f2701 feat(03-02): implement word mode for typing engine
- 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>
2026-03-29 13:45:54 +02:00
gurixandClaude Opus 4.6 958f4460a7 test(03-02): add failing tests for word mode typing engine
- 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>
2026-03-29 13:45:18 +02:00
gurixandClaude Opus 4.6 0bda51df7a docs(03-01): complete data layer foundation plan
- 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>
2026-03-29 13:43:44 +02:00
gurixandClaude Opus 4.6 3640fd5463 docs(03-03): complete forest scene plan
- 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>
2026-03-29 13:42:40 +02:00
gurixandClaude Opus 4.6 d4207bf33d feat(03-01): extend Progress type, add LessonPhase, update rate limits
- 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>
2026-03-29 13:42:32 +02:00
gurix e1fc5eb579 feat(03-03): render forest elements from IndexedDB in grid
- 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
2026-03-29 13:41:33 +02:00
gurixandClaude Opus 4.6 5a6ba70dab feat(03-01): implement word lists per level with getWordsForLevel
- 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>
2026-03-29 13:41:20 +02:00
gurix c9abc9e6a1 feat(03-03): add SVG forest background and 4x3 grid HTML/CSS structure
- 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
2026-03-29 13:40:54 +02:00
gurixandClaude Opus 4.6 420c0e1a1f test(03-01): add failing tests for word lists per level
- 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>
2026-03-29 13:40:27 +02:00
gurixandClaude Opus 4.6 5819ade457 docs(03): create phase plan — komplettes spielerlebnis
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>
2026-03-29 13:37:08 +02:00
gurix c9651ad476 docs(state): record phase 3 context session 2026-03-29 13:28:24 +02:00
gurix 94ce082939 docs(03): capture phase context (assumptions mode) 2026-03-29 13:28:24 +02:00
gurix 822382b0a4 docs(phase-02): evolve PROJECT.md after phase completion 2026-03-29 12:20:43 +02:00
gurix 0fea490f3d docs(phase-02): complete phase execution 2026-03-29 12:20:24 +02:00
gurixandClaude Opus 4.6 3ad53bc1f6 docs(02-05): complete UI integration plan - avatars, greetings, companion area
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:17:08 +02:00
gurixandClaude Opus 4.6 57a929bc1a feat(02-05): add companion greeting to forest and avatar to lesson screen
- 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>
2026-03-29 12:15:45 +02:00
gurixandClaude Opus 4.6 2cf7687d51 feat(02-05): add avatar images to welcome screen with emoji fallback
- 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>
2026-03-29 12:14:28 +02:00
gurixandClaude Opus 4.6 4538f392ef docs(02-03): complete asset generation and DB accessors plan
- 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>
2026-03-29 12:12:30 +02:00
gurixandClaude Opus 4.6 1fa7d52d94 feat(02-03): add asset generation build script and generate all character assets
- Create scripts/generate-assets.ts: reads config.json, calls Gemini API for each companion
- Generate 4 character sheets (3-view: front, side, face) for Fee Lila, Einhorn Stella, Fuchs Finn, Eule Elsa
- Generate 4 avatars using character sheets as reference images for consistency
- Generate 1 style reference (initial forest scene) for art direction
- Add tsx devDependency and npm run generate-assets script
- Fix imageModel name: gemini-3.1-flash-preview-image -> gemini-3.1-flash-image-preview
- Script handles errors gracefully, skips already-generated assets, logs progress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:10:59 +02:00
gurix eb94495b02 docs(02-04): complete companion text module plan
- 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
2026-03-29 12:06:54 +02:00
gurix 4b4aa8ecd9 feat(02-04): implement companion text module with API-first fallback strategy
- 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
2026-03-29 12:05:50 +02:00
gurix 6fba02cbe9 test(02-04): add failing tests for companion text module
- Tests for getGreeting, getLetterIntro, getForestComment
- Covers API success, API failure, no config, rate-limited paths
- 12 test cases total with mocked dependencies
2026-03-29 12:05:00 +02:00
gurixandClaude Opus 4.6 a242ce1570 feat(02-03): add IndexedDB accessor methods for companionAssets, styleReference, forestElements
- saveCompanionAssets/getCompanionAssets keyed by characterType
- saveStyleReference/getStyleReference singleton pattern (id: 1)
- saveForestElement (auto-increment add) / getForestElements (getAll)
- Extended type imports for CompanionAssets, CompanionType, ForestElement, StyleReference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:04:48 +02:00
gurixandClaude Opus 4.6 c268c6050e docs(02-01): complete config loader & Gemini API client plan
- SUMMARY.md with 18 tests, 6 files, 3min execution
- STATE.md advanced to plan 2/5, 70% progress
- ROADMAP.md updated with plan progress
- Requirements GAPI-01, GAPI-02, GAPI-03, GAPI-06 marked complete

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:57:53 +02:00
gurixandClaude Opus 4.6 2bea324962 feat(02-01): implement config loader and Gemini API client
- 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>
2026-03-29 11:56:21 +02:00
gurix 197ec24aa2 docs(02-02): complete fallback content plan 2026-03-29 11:56:13 +02:00
gurixandClaude Opus 4.6 66f8403b33 feat(02-02): add 7 SVG fallback images for forest elements
- 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>
2026-03-29 11:54:56 +02:00
gurixandClaude Opus 4.6 b31b9fd26c test(02-01): add failing tests for config loader and Gemini API client
- Config loader: fetch, error handling, caching (6 tests)
- Gemini text: response extraction, request body, retry, failure (4 tests)
- Gemini image: blob extraction, reference images, responseModalities, failure (4 tests)
- Rate limiting: under limit, at limit, increment, daily reset (4 tests)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:53:57 +02:00
gurixandClaude Opus 4.6 24bcbd1bba feat(02-02): add fallback texts module with German greetings, forest comments, and letter intros
- 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>
2026-03-29 11:53:47 +02:00
gurix 02a189b9f2 docs(02): create phase plan for Gemini integration + asset pipeline 2026-03-29 11:50:06 +02:00
gurix 1465ac45dc docs(state): record phase 2 context session 2026-03-29 11:41:10 +02:00
gurix 46a601dc7b docs(02): capture phase context (assumptions mode) 2026-03-29 11:41:05 +02:00
gurixandClaude Opus 4.6 78d516c55d fix(01): add lesson cancel button and handle level 6 completion
- 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>
2026-03-29 11:30:55 +02:00
gurix 46fa2e28d5 docs(phase-01): evolve PROJECT.md after phase completion 2026-03-29 11:20:13 +02:00
gurix 290fc87840 docs(phase-01): complete phase execution 2026-03-29 11:19:52 +02:00