Phase 0: Project setup for agent-driven development

- Phaser 3 + bitECS 0.4 + TypeScript + Vite stack
- BootScene with title screen
- 6 cursor rules (project context, agent workflow, ECS, chemistry, Phaser, data)
- Vitest configured with happy-dom
- GDD, engine analysis, implementation plan, progress tracking

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Денис Шкабатур
2026-02-12 11:59:41 +03:00
commit 10bd67c951
20 changed files with 3256 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
---
description: Game data JSON schema and validation conventions
globs: src/data/**/*.json
alwaysApply: false
---
# Data File Conventions
## General Rules
- Every entity has a unique `id` field (string)
- Cross-references use `id` strings, never array indices
- Every entry has a `description` field (feeds the in-game Codex)
- Data must be valid JSON — no comments, no trailing commas
## elements.json
Array of Element objects. Keyed by `symbol`. All values from real periodic table.
```json
{
"symbol": "Na",
"name": "Sodium",
"nameRu": "Натрий",
"atomicNumber": 11,
"atomicMass": 22.99,
"electronegativity": 0.93,
"category": "alkali-metal",
"state": "solid",
"color": "#c8c8c8",
"description": "Мягкий щелочной металл. Бурно реагирует с водой."
}
```
## reactions.json
Array of Reaction objects. Include science explanation and failure reasons.
## Validation
All JSON is loaded and type-checked at boot. Schema mismatches crash with clear errors — never silently ignore bad data.