Skip to content

ecs-architecture 0.6.0: main composes the app; plugins list their own layer's systems; load order, private folders and test features checked - #281

Merged
krisnye merged 3 commits into
mainfrom
ecs-architecture-feedback
Nov 19, 2026
Merged

krisnye merged 3 commits into
mainfrom
ecs-architecture-feedback

Conversation

@krisnye

@krisnye krisnye commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

The fixes come from moving a 1,900-file app (55 features, 88 systems lists, five samples, node benchmarks and tools) from 0.4 to 0.5. Each point below is something that app hit. Fixes #280.

The checker

  • main composes the app. features/main and its sub-features may import any layer of any feature, their own sub-features included. A page that starts views and ports both had no layer it could live in, since view may not import ports and ports may not import view (ecs-architecture: main's page entry can't start both view and ports plugins (no layer may import both) #280). The module bans still apply in main's layers. Anything outside main that imports it is now a violation (imports-main); the standard said so, but nothing checked it.
  • A plugin lists only its own layer's systems, and spreads its sub-features' plugins of the same layer (plugin-foreign-systems). A ports plugin that listed its model's systems now only connects, and is started beside its model's plugin.
  • Plugin names are unique (plugin-name-clash). A plugin is named for its feature's folder, so two nested features with one name exported the same identifier. That surfaced only when both were imported together, in main.
  • unused-export-ok also keeps a system nothing runs yet, such as one public for a feature still to come. Before, a public export could be marked but an unreached system couldn't.
  • The export-first rule allows statements that fill what the export reads, such as a loop pushing into an array the export reads as the module loads. It used to ask for that loop to move beneath the export, which leaves the array empty when the export reads it.
  • A load-time call can't read what is declared beneath it (used-before-declared). A function declared beneath and called as the module loads, reading a const declared beneath the call, throws as the module loads. TypeScript doesn't see that through a hoisted function.
  • Test features reach private files by path, as tests do, and those imports make no file of internal/ shared. A test feature's own internal/ is still checked.
  • A component's folders are internal/, its parts, or part components (private-folder). Old shared/ and systems/ folders passed without a warning.
  • src/index.ts may be export {}; for an app with no public API, as a layer holding only entries already may.
  • The settings 0.5 removed say where they went: apps and systems name features/main and the plugins, and point to the README's new "Upgrading to 0.5" section.

Docs

standard.md, the agent rules and the README cover each change. The README has a step-by-step upgrade from 0.4. The agent rules in ecs/ are regenerated, and all five sample apps pass.

Checks

Run from the root with every *.tsbuildinfo deleted first: check:workspace and build pass, and every ecs/ package's suite passes (@adobe/ecs 1992 tests, ecs-architecture 130, the samples, the guide).

@adobe/ecs's loop.test.ts ("a back-to-back driver ticks as fast as tasks run") failed once in the root run on a heavily loaded machine. It passed three times in a row run alone, and again in the full ecs/ run. Nothing here touches that package.

🤖 Generated with Claude Code

… layer's systems; load order, private folders and test features checked

- features/main and its sub-features may import any layer, and nothing outside main imports it (imports-main).
- A plugin lists only its own layer's systems and its sub-features' plugins of the same layer (plugin-foreign-systems), and no two plugins share a name (plugin-name-clash).
- A function called as a module loads can't read what is declared beneath the call (used-before-declared).
- A component's folders are internal/, its parts, or part components (private-folder).
- unused-export-ok also keeps a system nothing runs yet; export-first allows what fills a value the export reads; test features reach private files as tests do; src/index.ts may be export {}.
- The settings 0.5 removed (apps, systems) say where they went, and the README has an upgrade from 0.4.

Fixes #280.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
krisnye and others added 2 commits November 18, 2026 10:06
…ons and var

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@krisnye
krisnye merged commit 93658e8 into main Nov 19, 2026
3 checks passed
@krisnye
krisnye deleted the ecs-architecture-feedback branch November 19, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ecs-architecture: main's page entry can't start both view and ports plugins (no layer may import both)

1 participant