# ADR-0005: Component storage before a general ECS ## Status Adopted for proof as bounded experiment; production ECS deferred to M1 measurements. ## Context Composition is locked; taxonomy inheritance is prohibited. The proof needs identity/state, not dynamic queries. ## Decision Use sorted component-composed rows with monotonic non-reused u64 IDs, capped at100,000. Public values expose no third-party handles. lower_bound lookup is O(log n); erase is O(n). ## Alternatives Considered EnTT is MIT, header-only C++ with documented uses. Flecs offers C/C++, relationships, queries/scheduling under MIT. Relative workload performance is unmeasured. ## Benefits Small lifecycle/replay surface, stable order, easy diagnostics. ## Costs Less flexible than archetypes or independent pools; erase moves rows. ## Risks Prototype grows into homemade ECS, ID exhaustion, view invalidation, structural-order drift. ## Consequences Compare churn/query/memory/order/diagnostics on sparse/dense workloads before adoption. Defer structural edits to stable phases. Reject exhausted/stale IDs; generational reuse needs separate design. [EnTT](https://github.com/skypjack/entt), [Flecs](https://github.com/SanderMertens/flecs).