ecs: std/ecs with one Store per group type, and std/transform (ECS slice 1) #89

Open
opened 2026-10-05 21:07:19 +00:00 by orion · 13 comments
Collaborator

Context

Umbrella for ECS slice 1 of ECS.md section 13 plus std/transform (section 11). It needs nothing from the compiler (no seed impact in any step); examples/ecs-probe-2 builds the form. The design record stays the specification. Too large for one PR (a package, a scheduler with a native gate, and a second package), so it is split into the steps below; this issue closes when the last one has landed.

Goal

std/ecs (data layer and schedule with a sequential runner) and std/transform (decomposed transforms and their propagation over the hierarchy), each green on its own, with a native program that steps a world and prints the same bytes in the VM and natively.

Steps (dependency order; a step's PR says Refs #89, not Closes #89)

  1. #453 std/ecs data layer: Entity, Entities, Column, Store, Parent, depthOrder, the four query arities, Events, ComponentKey as a hand-written string; unit tests and the conformance program ecs-data.
  2. #763 std/ecs schedule: System<World> with declared reads/writes, Stage (Input, Fixed, Update, Late, user stages), Schedule<World> with the sequential runner, the diagnostic for two systems of one stage that write the same key, the fixed-step accumulator over Duration (std/time); the gate of this slice: tests/conformance/ecs-schedule.trb steps a world through a schedule for several frames, VM and native byte for byte. Filed as #763 (ready); step 1 merged.
  3. (3a #779 merged, 3b #787) std/transform (depends on std/linear and std/ecs): Transform2/Transform3 as decomposed transformations (translation, rotation as Angle/Quaternion, scale) with composition, inverse, interpolated(toward:by:) and toMatrix3/toMatrix4; GlobalTransform2/GlobalTransform3 as their own components (ECS.md section 15 q7); the propagation system over depthOrder, generic over the stores it reads and writes. Over the scalar the way std/linear is (Float default, Fixed works). Too large for one PR, so split: 3a (2D: Transform2, GlobalTransform2, propagation, transform-propagate conformance program) is filed as #779 (merged, PR #780); 3b (Transform3, GlobalTransform3, toMatrix4, 3D propagation) is filed as #787 (ready). Steps 1, 2 and 3a merged.

Slices 2 to 4 of the design record (#90) wait on this issue; slices 5 to 9 are #91 and #92.

Decisions (refinement)

  • One package per step boundary of ECS.md section 11: std/ecs knows nothing of positions or std/linear (it depends on std/core, std/collections, and std/time from step 2); std/transform is its own package and owns the arithmetic while std/ecs owns the order.
  • No World in std/ecs (section 15 q3); the conformance programs declare their own, as the probe does.
  • Step 1 ships the data layer alone: the gate is split into the two conformance programs of steps 1 and 2 so that each step is green on its own. Details and reasons are in #453.

Acceptance criteria (of the whole)

  • Entity, Column, Store, Events, System/Stage/Schedule, Parent, the four query arities (steps 1 and 2)
  • Gate: a native program steps a world and matches the interpreter byte for byte (ecs-data in step 1, ecs-schedule in step 2, both tier B)
  • std/transform (step 3)

Dependencies

None known. Verified against main (bc504c24) on 2026-10-24: ECS.md section 12 gaps 1, 3, 4, 5 and 11 are closed, which is all slice 1 uses.

Moved from the planning lists of the docs; the design record stays the specification.

## Context Umbrella for ECS slice 1 of [ECS.md section 13](https://git.torb.dev/torbscript/language/src/commit/bc504c243bbc6c247fdac1b6776100c2d7ebd044/docs/design/ECS.md#L1418) plus `std/transform` ([section 11](https://git.torb.dev/torbscript/language/src/commit/bc504c243bbc6c247fdac1b6776100c2d7ebd044/docs/design/ECS.md#L1257)). It needs nothing from the compiler (no seed impact in any step); `examples/ecs-probe-2` builds the form. The design record stays the specification. Too large for one PR (a package, a scheduler with a native gate, and a second package), so it is split into the steps below; this issue closes when the last one has landed. ## Goal `std/ecs` (data layer and schedule with a sequential runner) and `std/transform` (decomposed transforms and their propagation over the hierarchy), each green on its own, with a native program that steps a world and prints the same bytes in the VM and natively. ## Steps (dependency order; a step's PR says `Refs #89`, not `Closes #89`) 1. [x] #453 `std/ecs` data layer: `Entity`, `Entities`, `Column`, `Store`, `Parent`, `depthOrder`, the four `query` arities, `Events`, `ComponentKey` as a hand-written string; unit tests and the conformance program `ecs-data`. 2. [x] #763 `std/ecs` schedule: `System<World>` with declared reads/writes, `Stage` (`Input`, `Fixed`, `Update`, `Late`, user stages), `Schedule<World>` with the sequential runner, the diagnostic for two systems of one stage that write the same key, the fixed-step accumulator over `Duration` (`std/time`); the **gate** of this slice: `tests/conformance/ecs-schedule.trb` steps a world through a schedule for several frames, VM and native byte for byte. Filed as #763 (ready); step 1 merged. 3. [ ] (3a #779 merged, 3b #787) `std/transform` (depends on `std/linear` and `std/ecs`): `Transform2`/`Transform3` as decomposed transformations (translation, rotation as `Angle`/`Quaternion`, scale) with composition, inverse, `interpolated(toward:by:)` and `toMatrix3`/`toMatrix4`; `GlobalTransform2`/`GlobalTransform3` as their own components (ECS.md section 15 q7); the propagation system over `depthOrder`, generic over the stores it reads and writes. Over the scalar the way `std/linear` is (`Float` default, `Fixed` works). Too large for one PR, so split: **3a** (2D: `Transform2`, `GlobalTransform2`, propagation, `transform-propagate` conformance program) is filed as #779 (merged, PR #780); **3b** (`Transform3`, `GlobalTransform3`, `toMatrix4`, 3D propagation) is filed as #787 (ready). Steps 1, 2 and 3a merged. Slices 2 to 4 of the design record (#90) wait on this issue; slices 5 to 9 are #91 and #92. ## Decisions (refinement) - One package per step boundary of ECS.md section 11: `std/ecs` knows nothing of positions or `std/linear` (it depends on `std/core`, `std/collections`, and `std/time` from step 2); `std/transform` is its own package and owns the arithmetic while `std/ecs` owns the order. - No `World` in `std/ecs` (section 15 q3); the conformance programs declare their own, as the probe does. - Step 1 ships the data layer alone: the gate is split into the two conformance programs of steps 1 and 2 so that each step is green on its own. Details and reasons are in #453. ## Acceptance criteria (of the whole) - [ ] `Entity`, `Column`, `Store`, `Events`, `System`/`Stage`/`Schedule`, `Parent`, the four `query` arities (steps 1 and 2) - [ ] Gate: a native program steps a world and matches the interpreter byte for byte (`ecs-data` in step 1, `ecs-schedule` in step 2, both tier B) - [ ] `std/transform` (step 3) ## Dependencies None known. Verified against `main` (bc504c24) on 2026-10-24: ECS.md section 12 gaps 1, 3, 4, 5 and 11 are closed, which is all slice 1 uses. _Moved from the planning lists of the docs; the design record stays the specification._
Author
Collaborator

[loop:torbscript] intake: in scope (author orion, label loop), source ECS.md slice 1, not a duplicate, no collision with a design record. Needs nothing from the compiler per the issue (no seed impact), but is large; refine splits it. A native byte-for-byte gate against the interpreter runs in forge CI. next: refine, waiting (ready buffer full: #4, #163, #164, #223 are ready) until 2026-10-10T04:00:00Z

[loop:torbscript] intake: in scope (author orion, label loop), source ECS.md slice 1, not a duplicate, no collision with a design record. Needs nothing from the compiler per the issue (no seed impact), but is large; refine splits it. A native byte-for-byte gate against the interpreter runs in forge CI. next: refine, waiting (ready buffer full: #4, #163, #164, #223 are ready) until 2026-10-10T04:00:00Z
Author
Collaborator

[loop:torbscript] claim refine by session:loop-torbscript-20261024 until 2026-10-24T02:15:21Z

[loop:torbscript] claim refine by session:loop-torbscript-20261024 until 2026-10-24T02:15:21Z
Author
Collaborator

[loop:torbscript] refine: too large for one PR (a package, a scheduler with a native gate, a second package), so #89 is now the umbrella with a three-step checklist and its body rewritten (criteria kept, grouped by step). Step 1 filed as #453 (std/ecs data layer, ready); steps 2 (schedule and the ecs-schedule native gate) and 3 (std/transform) get their issues when they start, per the contract. #89 stays without ready. No owner question: every product choice is decided in ECS.md section 15. No seed impact. Worker usage: one refine worker, sonnet, about 0.4M tokens. next: waiting (steps in #453, then 2 and 3 in order)

[loop:torbscript] refine: too large for one PR (a package, a scheduler with a native gate, a second package), so #89 is now the umbrella with a three-step checklist and its body rewritten (criteria kept, grouped by step). Step 1 filed as #453 (`std/ecs` data layer, `ready`); steps 2 (schedule and the `ecs-schedule` native gate) and 3 (`std/transform`) get their issues when they start, per the contract. #89 stays without `ready`. No owner question: every product choice is decided in ECS.md section 15. No seed impact. Worker usage: one refine worker, sonnet, about 0.4M tokens. next: waiting (steps in #453, then 2 and 3 in order)
Author
Collaborator

[loop:torbscript] re-sweep: ticked #453 in the checklist, because this step is closed and landed on main; the checklist now matches the state of its children.

[loop:torbscript] re-sweep: ticked #453 in the checklist, because this step is closed and landed on main; the checklist now matches the state of its children.
Author
Collaborator

[loop:torbscript] refine: step 1 (#453) is merged, so steps 2 (std/ecs schedule, the gate) and 3 (std/transform) are startable and each needs its own ready issue; no worker slot is free this tick (gateway lanes 7 of 8 used). Step 2 is filed first at the next free slot, step 3 after it. next: waiting (worker slot) until 2026-11-13T13:30:00Z

[loop:torbscript] refine: step 1 (#453) is merged, so steps 2 (std/ecs schedule, the gate) and 3 (std/transform) are startable and each needs its own ready issue; no worker slot is free this tick (gateway lanes 7 of 8 used). Step 2 is filed first at the next free slot, step 3 after it. next: waiting (worker slot) until 2026-11-13T13:30:00Z
Author
Collaborator

[loop:torbscript] claim refine by session:loop-torbscript-20261113 until 2026-11-14T01:10:00Z

[loop:torbscript] claim refine by session:loop-torbscript-20261113 until 2026-11-14T01:10:00Z
Author
Collaborator

[loop:torbscript] refine: filed step 2 (std/ecs schedule, ecs-schedule gate) as #763 with label ready, decided by the loop: stage as struct value, on-demand conflicts(), maxStepsPerFrame cap; no owner question, next: implement via #763

[loop:torbscript] refine: filed step 2 (std/ecs schedule, ecs-schedule gate) as #763 with label ready, decided by the loop: stage as struct value, on-demand conflicts(), maxStepsPerFrame cap; no owner question, next: implement via #763
Author
Collaborator

[loop:torbscript] wait: step 2 (#763) is in review as PR #769 (CI pending); step 3 (std/transform) is filed once it lands, next: waiting (PR #769 CI and review)

[loop:torbscript] wait: step 2 (#763) is in review as PR #769 (CI pending); step 3 (std/transform) is filed once it lands, next: waiting (PR #769 CI and review)
Author
Collaborator

[loop:torbscript] claim refine by session:loop-torbscript-20261114 until 2026-11-14T06:00:00Z

[loop:torbscript] claim refine by session:loop-torbscript-20261114 until 2026-11-14T06:00:00Z
Author
Collaborator

[loop:torbscript] refine: step 3 (std/transform) is larger than one PR (a package with 2D and 3D types, matrices and a propagation system), so only the first sub-step is filed: #779 std/transform 2D (Transform2, GlobalTransform2, propagate, conformance program transform-propagate), label ready, no seed impact. 3b (3D) is filed when 3a has landed. The checklist of #89 now points at #779, and step 2 is ticked (#763 merged).

[loop:torbscript] decided by the loop: GlobalTransform2 holds a Matrix3, not a decomposed transform, because a rotated child under a non-uniform parent scale is a shear a translation/rotation/scale triple cannot hold; Transform2 stays decomposed for authoring and interpolation. Split by dimension because 3D repeats the same shape. No owner question.

Claim by session:loop-torbscript-20261114 (comment 12349) released. next: implement via #779

[loop:torbscript] refine: step 3 (`std/transform`) is larger than one PR (a package with 2D and 3D types, matrices and a propagation system), so only the first sub-step is filed: #779 `std/transform` 2D (`Transform2`, `GlobalTransform2`, `propagate`, conformance program `transform-propagate`), label `ready`, no seed impact. 3b (3D) is filed when 3a has landed. The checklist of #89 now points at #779, and step 2 is ticked (#763 merged). [loop:torbscript] decided by the loop: `GlobalTransform2` holds a `Matrix3`, not a decomposed transform, because a rotated child under a non-uniform parent scale is a shear a translation/rotation/scale triple cannot hold; `Transform2` stays decomposed for authoring and interpolation. Split by dimension because 3D repeats the same shape. No owner question. Claim by session:loop-torbscript-20261114 (comment 12349) released. next: implement via #779
Author
Collaborator

[loop:torbscript] wait: step 3a is #779 (implement running); step 3b (3D) is filed when #779 has landed. next: waiting (dependency #779)

[loop:torbscript] wait: step 3a is #779 (implement running); step 3b (3D) is filed when #779 has landed. next: waiting (dependency #779)
Author
Collaborator

[loop:torbscript] refine: step 3a (#779) landed on main (PR #780, 74605bb); step 3b filed as #787 (std/transform 3D: Transform3, GlobalTransform3, 3D propagation, label ready, no seed impact) and listed in the checklist. next: waiting (dependency #787)

[loop:torbscript] refine: step 3a (#779) landed on main (PR #780, 74605bb); step 3b filed as #787 (std/transform 3D: Transform3, GlobalTransform3, 3D propagation, label ready, no seed impact) and listed in the checklist. next: waiting (dependency #787)
Author
Collaborator

[loop:torbscript] park: step 3b is #787 (implement done, PR #788 open, CI and Argus review pending); nothing on this epic is actionable until it merges, and further waits would only repeat. Parked with status/parked; unpark and file the next step once #788 has merged. next: waiting (dependency #787, PR #788)

[loop:torbscript] park: step 3b is #787 (implement done, PR #788 open, CI and Argus review pending); nothing on this epic is actionable until it merges, and further waits would only repeat. Parked with status/parked; unpark and file the next step once #788 has merged. next: waiting (dependency #787, PR #788)
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language#89
No description provided.