Update documentation after refactoring: AGENTS.md, GAME_BRIEFING.md, skills.md
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m28s

- Updated AGENTS.md to include store/ directory and clarify store architecture
- Updated GAME_BRIEFING.md Code Architecture section with store/ and legacy store info
- Updated skills.md with skill state management information
- Includes other refactoring changes (store hooks, component updates, etc.)
This commit is contained in:
Refactoring Agent
2026-05-04 09:49:13 +02:00
parent 5817206351
commit 98ab975fb9
20 changed files with 97 additions and 275 deletions
+11 -1
View File
@@ -1083,7 +1083,9 @@ dps = (damage × castSpeed × attackSpeedMultiplier) / hour
The codebase has been refactored into a modular architecture for better maintainability:
#### Store Architecture (`src/lib/game/stores/`)
#### Store Architecture
**New Modular Stores (`src/lib/game/stores/`):**
- **gameStore.ts**: Core state, tick logic, and main actions
- **manaStore.ts**: Mana gathering, elements, conversion
- **combatStore.ts**: Combat system, spells, floor progression
@@ -1091,6 +1093,14 @@ The codebase has been refactored into a modular architecture for better maintain
- **skillStore.ts**: Skill state, studying, evolution
- **uiStore.ts**: UI state, modals, debug settings
**Legacy Store (Migration in Progress):**
- **store.ts**: Legacy monolithic store (reduced from ~2812 lines to ~14KB)
- **store/**: Legacy store slices being migrated to `stores/`
- `combatSlice.ts`, `manaSlice.ts`, `skillSlice.ts`, etc.
- `computed.ts`: Computed stats utilities
- **store-modules/**: Legacy store utilities
- `computed-stats.ts`, `initial-state.ts`, `tick-logic.ts`, etc.
#### Crafting System (`src/lib/game/crafting-actions/`)
- Modular action files for each crafting stage
- Design, preparation, application, equipment, disenchant actions
+1
View File
@@ -481,6 +481,7 @@ Mana-Loop/
├── Dockerfile
├── README.md
├── bun.lock
├── bunfig.toml
├── components.json
├── docker-compose.yml
├── eslint.config.mjs
+6
View File
@@ -665,6 +665,12 @@ Each skill tree has its own module:
| `types.ts` | TypeScript interfaces |
| `index.ts` | Main export combining all modules (~11KB) |
#### Skill State Management
Skill state is managed in the store layer:
- **New Modular Store:** `src/lib/game/stores/skillStore.ts` (~11KB) - Active skill state, studying, evolution
- **Legacy Slice:** `src/lib/game/store/skillSlice.ts` - Being migrated to `skillStore.ts`
- **Skill state includes:** `skills` (levels), `skillUpgrades` (chosen upgrades), `skillTiers` (current tier)
### Adding a New Skill (Updated Process)
1. **Define in `constants/skills.ts`** (NEW location)