Skip to content

W-075: demo-totalwar spec for the M1 features

Type: design · Size: S · Epic: E-totalwar-m1 · Target: docs/specs/demo-totalwar.md · Breaking: no Depends: W-004, W-018, W-073 Refs: demo-totalwar brief §4 (entity budget), §5 (ECS showcase, MemberOf row), §6 (TW-F01 to TW-F06, TW-F18), §7 (performance targets), ecs-schedule spec (W-004), concept §8, model W-072

Goal

Write docs/specs/demo-totalwar.md with spec-format requirement groups for the seven M1 features TW-F01 to TW-F06 and TW-F18. Define the per-frame pipeline (orders, formation, movement, engagement, damage, morale, cleanup), the entity budget guard, and the spatial grid once in the spec, so the features reference them instead of restating them.

Decided in the brief, to carry into the spec: - Entity budget: the guard stops spawning at 1,042,001 live entities; battle setup stays at or below 1,000,000 soldiers and 2,000 regiments. - Benchmarks use Vitest bench only, with no cross-library comparison. - Timing: ecs-schedule is frame-driven in M1; the demo clamps dt itself.

Open before writing requirements: - Membership: the spec uses MemberOf(regiment) unless W-073 shows it is too slow at the measured tiers. Then a plain regiment ID field replaces it and the relation row is dropped. This is the user's decision, and the spec waits for W-073 (Depends). - The brief's §6 says "at most 6 M1 features", but its backlog lists 7 M1 items (TW-F01, F02, F03, F04, F05, F06, F18). The user decides whether to cut one or change the limit in the brief before the spec is written.

Once the spec is approved, Triage creates one feature item per M1 feature and makes them ready, in the brief's M1 order (TW-F01, TW-F02, TW-F18, TW-F03, TW-F04, TW-F05, TW-F06).

Steps

Planner writes the steps when the item is started. The SpecWriter step comes after the brief (W-018, done) and the performance spike (W-073) decides membership.

Log

  • 2026-11-02 created, follow-up of W-018 (Triage). Depends W-073 added: the brief says the spike confirms the tiers and membership before the specs fix them (Triage)
  • 2026-11-02 placed in Next after W-073 and W-074, in dependency order (Triage)
  • 2026-11-02 moved up in Next to start the demo-totalwar path; stays below W-073 (Triage)