docs(02-02): complete fallback content plan

This commit is contained in:
2026-03-29 11:56:13 +02:00
parent 66f8403b33
commit 197ec24aa2
4 changed files with 130 additions and 17 deletions
+4 -4
View File
@@ -54,8 +54,8 @@ Requirements for initial release (MVP). Each maps to roadmap phases.
- [ ] **GAPI-01**: Config-Loader: `public/config.json` via fetch laden, typisiertes Interface
- [ ] **GAPI-02**: Text-API-Client: `generateText(prompt, systemPrompt)` mit Retry und Fehlerbehandlung
- [ ] **GAPI-03**: Bild-API-Client: `generateImage(prompt, referenceImages[])` mit Character Consistency
- [ ] **GAPI-04**: Fallback-Texte: 10 Begrüssungen, 10 Wald-Kommentare, Buchstaben-Vorstellungen Stufe 16
- [ ] **GAPI-05**: Fallback-Bilder: 510 statische SVG/PNG-Bilder als Backup
- [x] **GAPI-04**: Fallback-Texte: 10 Begrüssungen, 10 Wald-Kommentare, Buchstaben-Vorstellungen Stufe 16
- [x] **GAPI-05**: Fallback-Bilder: 510 statische SVG/PNG-Bilder als Backup
- [ ] **GAPI-06**: Rate-Limiting: Max 1 Bild + 1 Text pro Übungseinheit
### Assets
@@ -176,8 +176,8 @@ Which phases cover which requirements. Updated during roadmap creation.
| GAPI-01 | Phase 2 | Pending |
| GAPI-02 | Phase 2 | Pending |
| GAPI-03 | Phase 2 | Pending |
| GAPI-04 | Phase 2 | Pending |
| GAPI-05 | Phase 2 | Pending |
| GAPI-04 | Phase 2 | Complete |
| GAPI-05 | Phase 2 | Complete |
| GAPI-06 | Phase 2 | Pending |
| ASST-01 | Phase 2 | Pending |
| ASST-02 | Phase 2 | Pending |
+1 -1
View File
@@ -53,7 +53,7 @@ Plans:
Plans:
- [ ] 02-01-PLAN.md — Config loader, Gemini API client (text + image), retry logic, rate-limiting (TDD)
- [ ] 02-02-PLAN.md — Fallback texts (greetings, forest comments, letter intros) and fallback SVG images
- [x] 02-02-PLAN.md — Fallback texts (greetings, forest comments, letter intros) and fallback SVG images
- [ ] 02-03-PLAN.md — IndexedDB store accessors, build script for asset generation, generate all character assets
- [ ] 02-04-PLAN.md — Companion text module (getGreeting, getLetterIntro, getForestComment) with API-first fallback
- [ ] 02-05-PLAN.md — Wire avatars into welcome screen, companion greeting on forest screen, visual verification
+15 -12
View File
@@ -2,15 +2,15 @@
gsd_state_version: 1.0
milestone: v1.0
milestone_name: milestone
status: verifying
stopped_at: Phase 2 context gathered (assumptions mode)
last_updated: "2026-03-29T09:41:10.460Z"
status: executing
stopped_at: Completed 02-02-PLAN.md
last_updated: "2026-03-29T09:56:04.201Z"
last_activity: 2026-03-29
progress:
total_phases: 4
completed_phases: 1
total_plans: 5
completed_plans: 5
total_plans: 10
completed_plans: 6
percent: 0
---
@@ -21,13 +21,13 @@ progress:
See: .planning/PROJECT.md (updated 2026-03-29)
**Core value:** Das Kind übt freiwillig weiter, weil es wissen will, was als Nächstes im Wald erscheint — nicht weil es Punkte sammelt.
**Current focus:** Phase 01 — grundger-st-tippmechanik
**Current focus:** Phase 02 — gemini-integration-asset-pipeline
## Current Position
Phase: 2
Plan: Not started
Status: Phase complete — ready for verification
Phase: 02 (gemini-integration-asset-pipeline) — EXECUTING
Plan: 2 of 5
Status: Ready to execute
Last activity: 2026-03-29
Progress: [░░░░░░░░░░] 0%
@@ -57,6 +57,7 @@ Progress: [░░░░░░░░░░] 0%
| Phase 01 P03 | 3min | 2 tasks | 4 files |
| Phase 01 P04 | 2min | 2 tasks | 6 files |
| Phase 01 P05 | 2min | 2 tasks | 4 files |
| Phase 02 P02 | 2min | 2 tasks | 8 files |
## Accumulated Context
@@ -74,6 +75,8 @@ Recent decisions affecting current work:
- [Phase 01]: Finger color map duplicated in keyboard.ts for module independence
- [Phase 01]: Exercise state uses direct mutation pattern for game loop simplicity
- [Phase 01]: Forest screen re-initializes on every navigation to reflect updated progress
- [Phase 02]: Fallback texts use ue/oe/ae transliteration for umlauts, consistent with existing codebase convention
- [Phase 02]: SVGs use gradient-based rendering under 2KB each for watercolor feel
### Pending Todos
@@ -85,6 +88,6 @@ None yet.
## Session Continuity
Last session: 2026-03-29T09:41:10.453Z
Stopped at: Phase 2 context gathered (assumptions mode)
Resume file: .planning/phases/02-gemini-integration-asset-pipeline/02-CONTEXT.md
Last session: 2026-03-29T09:56:04.194Z
Stopped at: Completed 02-02-PLAN.md
Resume file: None
@@ -0,0 +1,110 @@
---
phase: 02-gemini-integration-asset-pipeline
plan: 02
subsystem: content
tags: [fallback, svg, german-text, companion, i18n]
requires:
- phase: 01-grundgeruest-tippmechanik
provides: companion characters (CompanionType), level definitions (keys per level)
provides:
- Static fallback text arrays (greetings, forest comments, letter intros)
- 7 SVG fallback forest element images
affects: [02-04-companion-integration, 02-05-forest-rewards]
tech-stack:
added: []
patterns: [time-of-day keyed content, finger-to-letter mapping in fallback data]
key-files:
created:
- src/companion/fallbacks.ts
- src/assets/fallback-images/blume.svg
- src/assets/fallback-images/pilz.svg
- src/assets/fallback-images/vogel.svg
- src/assets/fallback-images/schmetterling.svg
- src/assets/fallback-images/reh.svg
- src/assets/fallback-images/baum.svg
- src/assets/fallback-images/bach.svg
modified: []
key-decisions:
- "Fallback texts use ue/oe/ae transliteration for umlauts to match existing codebase convention"
- "SVGs use radialGradient and opacity layering for watercolor feel, all under 2KB"
patterns-established:
- "Fallback content pattern: typed arrays with helper functions for random selection"
- "SVG style: 200x200 viewBox, pastel palette from spec, gradient-based soft rendering"
requirements-completed: [GAPI-04, GAPI-05]
duration: 2min
completed: 2026-03-29
---
# Phase 02 Plan 02: Fallback Content Summary
**Static German fallback texts (greetings, forest comments, letter intros for levels 1-6) and 7 pastel SVG forest element images**
## Performance
- **Duration:** 2 min
- **Started:** 2026-03-29T09:52:48Z
- **Completed:** 2026-03-29T09:55:07Z
- **Tasks:** 2
- **Files created:** 8
## Accomplishments
- 10 time-of-day keyed greetings, 10 forest discovery comments, 13 letter introductions covering all keys in levels 1-6
- All texts in simple German (max 25 words), no performance praise, nature-themed
- 7 SVG fallback images (blume, pilz, vogel, schmetterling, reh, baum, bach) in pastel watercolor style, all under 2KB
## Task Commits
Each task was committed atomically:
1. **Task 1: Fallback texts module** - `24bcbd1` (feat)
2. **Task 2: Fallback SVG images** - `66f8403` (feat)
## Files Created/Modified
- `src/companion/fallbacks.ts` - Typed fallback text arrays with TimeOfDay greetings, forest comments, letter intros, and helper functions
- `src/assets/fallback-images/blume.svg` - Flower with pink/purple gradient petals
- `src/assets/fallback-images/pilz.svg` - Fairy tale mushroom with pastel cap
- `src/assets/fallback-images/vogel.svg` - Small bird in blue/green tones
- `src/assets/fallback-images/schmetterling.svg` - Butterfly with purple/pink wings
- `src/assets/fallback-images/reh.svg` - Young deer with white spots
- `src/assets/fallback-images/baum.svg` - Magical tree with round green crown
- `src/assets/fallback-images/bach.svg` - Stream with stones in blue tones
## Decisions Made
- Used ue/oe/ae transliteration for umlauts in fallback texts, consistent with existing codebase convention (characters.ts uses same pattern)
- SVGs kept minimal (under 2KB each) using gradient-based rendering rather than complex paths for watercolor feel
## Deviations from Plan
None - plan executed exactly as written.
## Issues Encountered
None
## User Setup Required
None - no external service configuration required.
## Known Stubs
None - all content is complete and functional.
## Next Phase Readiness
- Fallback texts ready for companion integration (Plan 04)
- SVG images ready for forest reward display (Plan 05)
- Helper functions provide clean API for random fallback selection
## Self-Check: PASSED
All 8 created files verified present. Both task commits (24bcbd1, 66f8403) verified in git log.
---
*Phase: 02-gemini-integration-asset-pipeline*
*Completed: 2026-03-29*