Skip to content

W-035: ecs-schedule plugins (SCH-F06, part 2)

Type: feature · Size: M · Epic: E-schedule-v0 · Target: packages/ecs-schedule · Breaking: no Depends: W-034 Refs: spec SCH-133, SCH-135, SCH-136, SCH-137, SCH-138, SCH-139

Goal

Add definePlugin as plain data and flatten plugins into createSchedule in array order, before the schedule's own entries. Check duplicates across the flattened lists and unknown set references. Plugins do not depend on other plugins.

Steps

  • S1 (SCH-135): definePlugin returns a plain readonly object with phases, sets, and systems defaulting to []; name check; no side effects; files: packages/ecs-schedule/src/plugin.ts, packages/ecs-schedule/tests/plugin-define.test.ts
  • S2 (SCH-136, SCH-137): plugins are flattened in array order, then the schedule's own phases, sets, and systems, per kind; order is deterministic; files: packages/ecs-schedule/src/flatten.ts, packages/ecs-schedule/tests/plugin-flatten.test.ts
  • S3 (SCH-138): a duplicate phase, set, or system across the flattened lists throws naming both sources; files: packages/ecs-schedule/tests/plugin-duplicates.test.ts
  • S4 (SCH-133, SCH-139): a set referenced by a system, an edge, or another set that is in neither sets nor a plugin's sets throws naming the referrer and the set; cross-plugin references work when both are in the schedule; files: packages/ecs-schedule/tests/plugin-refs.test.ts
  • S5 (changeset): add .changeset/w-035-ecs-schedule-plugins.md (patch, @workspace/ecs-schedule)

Log

  • 2026-11-01 created from the approved spec split of W-004 (Triage)