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>
7.4 KiB
7.4 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 03-komplettes-spielerlebnis | 01 | execute | 1 |
|
true |
|
|
Purpose: All subsequent plans (lesson flow, reward, parent area) depend on these types and data structures.
Output: src/game/words.ts with tested word lists, extended Progress interface, updated rate limits in gemini.ts.
<execution_context> @$HOME/.claude/get-shit-done/workflows/execute-plan.md @$HOME/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @src/types.ts @src/game/levels.ts @src/api/gemini.ts Task 1: Word lists per level with validation tests src/game/words.ts, src/game/words.test.ts src/game/levels.ts, src/types.ts - Test: wordsByLevel has entries for levels 1-6 - Test: Each level has at least 8 words (per D-04: 8-10 minimum) - Test: Every word in level N uses only characters from levels[N].allKeys (no spaces) - Test: No word exceeds 5 characters (per D-04) - Test: getWordsForLevel(level, count) returns `count` random words from that level - Test: getWordsForLevel returns empty array for non-existent level Create `src/game/words.ts` (per D-04):```typescript
import { getKeysUpToLevel } from './levels';
export const wordsByLevel: Record<number, string[]> = {
1: [], // Level 1 has only F, J, space — no real words possible, use letter combos: "ff", "jj", "fj", "jf", "fjf", "jfj", "ff", "jj", "fjfj", "jfjf"
2: ['fdk', 'kdf', 'djf', 'fkd', 'dkf', 'jdk', 'kfj', 'fdkj', 'kjdf', 'dfjk'], // F,J,D,K — no real German words, use combos
3: ['falls', 'lass', 'das', 'sdf', 'sdk', 'lsd', 'flsk', 'sldf', 'dsl', 'kls'], // adds S, L — "falls", "lass" are real words
4: ['als', 'da', 'das', 'dafö', 'salad', 'lass', 'falls', 'aas', 'sa', 'ask'], // adds A, OE
5: ['glas', 'halb', 'jagd', 'gash', 'hagl', 'gah', 'hag', 'lag', 'gal', 'sah'], // adds G, H
6: ['eis', 'idee', 'kleid', 'lied', 'lief', 'fies', 'dies', 'die', 'sie', 'sei'], // adds E, I
};
```
IMPORTANT: For levels 1-2, real German words are impossible with only F/J/D/K + space. Use letter combination patterns instead (the Spec acknowledges this implicitly — words only become meaningful at level 3+). Each word MUST only use characters from that level's `allKeys` (excluding space). Validate at test time by cross-referencing `getKeysUpToLevel()`.
Export `getWordsForLevel(level: number, count: number): string[]` that returns `count` random words from the level's list (sampling without replacement if count <= list length, with replacement otherwise).
Create `src/game/words.test.ts` with vitest tests covering all behaviors above.
Also add a `LessonPhase` type:
```typescript
export type LessonPhase = 'discover' | 'practice' | 'words';
```
**Update rate limits (per D-13):**
In `src/api/gemini.ts`, change `checkRateLimit` function:
- Current: `settings.apiCallsToday[type] < 1` (allows 1 each)
- New: text limit = 10, image limit = 5
- Add constants: `const TEXT_RATE_LIMIT = 10;` and `const IMAGE_RATE_LIMIT = 5;`
- Change comparison: `type === 'text' ? settings.apiCallsToday.text < TEXT_RATE_LIMIT : settings.apiCallsToday.image < IMAGE_RATE_LIMIT`
**Update initWelcomeScreen in screens.ts** to include new Progress fields with defaults:
In `src/ui/screens.ts`, find the `Progress` object creation in `startBtn` click handler and add:
```typescript
totalCorrect: 0,
totalErrors: 0,
errorKeyCounts: {},
lastPlayedLevels: [],
```
<success_criteria>
src/game/words.tsexports wordsByLevel (levels 1-6, 8+ words each) and getWordsForLevel()- All words validated: only use allKeys from their level, max 5 chars
- Progress interface extended with totalCorrect, totalErrors, errorKeyCounts, lastPlayedLevels
- LessonPhase type exported from types.ts
- Rate limits updated to 10 text / 5 image per day
- All tests pass, TypeScript compiles clean </success_criteria>