feat(commands): add app state dispatcher foundation

This commit is contained in:
syntaxbullet
2026-07-03 09:28:06 +02:00
parent 697d12725d
commit a8dbd26474
11 changed files with 331 additions and 3 deletions

View File

@@ -5,7 +5,8 @@ Follow these rules for the whole repository. More specific `AGENTS.md` files ove
## Boundaries
- `core/`: pure domain models only. See `core/AGENTS.md`.
- `commands/`: the only write path for application state.
- `editor/`: transient editor/app state types, e.g. viewport/camera and selection.
- `editor/`: transient editor/app state types and app store, e.g. viewport/camera and selection.
- `keybinds/`: keybind resolution; global consumer first, command fallback second.
- `renderer/`: renders the current `ImageDocument` using the graphics backend, e.g. WebGL.
- `view/`: React UI shell and controls only.
@@ -46,6 +47,7 @@ Follow these rules for the whole repository. More specific `AGENTS.md` files ove
## Imports
- `core/` imports nothing from app layers.
- `commands/` may import `core/` and `editor/`; avoid importing React or renderer backend APIs.
- `editor/` may import `core/` types; it must not import React, commands, renderer, storage, or backend APIs.
- `editor/` may import `core/` types and command dispatch infrastructure; it must not import React, renderer, storage, or backend APIs.
- `keybinds/` may import command dispatch types; it must not mutate state directly.
- `renderer/` may import `core/` and `editor/` types; it must not import React components.
- `view/` may import UI components and command dispatch interfaces; avoid importing renderer internals except through stable view-facing adapters.