# `ecs::components` Notes
ECS components store editor-owned state at Bevy entity boundaries. They should
not invent editing semantics. Pure modules such as `vim`, `text_stream`, and
`domain` establish invariants first; components carry those proofs or snapshots
for owner systems.
## Vim Modal State
`VimModalState` is split by ownership role:
- `VimGrammarState` owns pending parsers only: normal and visual grammars.
- `VimEditorState` owns view-local editor state: mode, selection, prompts,
leader UI state, status, registers, and dot-repeat.
This split keeps grammar state from becoming a bag of editor authority.
Registers, repeat state, search history, selection anchors, and prompt text are
editor state because they survive parsed commands and affect later operations.
Normal and visual grammar state should only remember incomplete key sequences
or grammar-local command history such as character-search repeat.
## Diagnostics
`Debug` output for modal state is redacted. It reports shape: mode, active
selection, prompt activity, previous-search presence, leader state, status
presence, register shape, and repeat shape. It must not include prompt text,
register text, buffer text, raw paths, or backend output.
## Boundaries
Systems may borrow component fields to adapt pure Vim outcomes into ECS
messages, but authoritative mutation still belongs to the owner system for that
state. Buffer text mutates in buffer owners. Cursor coordinates mutate in cursor
owners. Status messages mutate through status owner systems. Vim adapters may
propose typed effects, not bypass those owners.