Date baseline: February 26, 2026.
This document defines the required end-state write contract for the current platform.
- Canonical project state remains tree-based where applicable (
items + tree). - Tree is part of domain model semantics, not a legacy compatibility layer.
- Collection roots are top-level plural fields.
- Do not wrap general collections under
resources.*. - Each collection owns its own ordering tree.
- Do not duplicate collection ordering in separate root-level
...Orderarrays. - Singleton roots such as
storykeep only singleton settings.
- Persist only typed domain commands/events.
- End-state command families should be:
project.*scene.*section.*line.*image.*sound.*video.*animation.*character.*character.sprite.*font.*transform.*color.*textStyle.*variable.*layout.*layout.element.*
- Collection-level authored entities should converge on explicit per-family
command groups, not a generic
resource.*wrapper. charactersusecharacter.*for character lifecycle, whilecharacter.sprite.*remains separate for internal sprite editing.layoutsuselayout.*for collection lifecycle, whilelayout.element.*remains separate for internal layout editing.- Do not persist intermediary legacy repository mutation events:
setunsetnodeInsertnodeDeletenodeUpdatenodeMove
In short: command stream is authoritative; state is materialized by domain reducer replay.
Partitions must be coarse and stable.
- Base:
project:<projectId>:story - Scene-level:
project:<projectId>:story:scene:<sceneId> - Do not partition story by section or line.
- Base per collection family:
project:<projectId>:resources:<collection> - Example:
project:p1:resources:images - The partition segment uses the plural collection root name.
- Do not partition resources by item id.
character.sprite.*also usesproject:<projectId>:resources:characters
- Base:
project:<projectId>:layouts
- Base:
project:<projectId>:settings
- No runtime write path emits
set/unset/node*. - Story commands include scene-level partition when a scene is known.
- Collection-family commands use collection partition only.
- Reducer replay from the command stream reconstructs canonical tree state.