11. Boundaries
-
[E]
.dependency-cruiser.cjsenforces them in the CI Gate: a feature may importsrc/core, never another feature;src/coresees features only through the generated index;*.server.tsonly from the server. No workspace packages: reuse stays inside the project. -
[E] Built with #112 as the rules
feature-not-feature(a foldersrc/features/<key>/orsrc/features/missions/<m>/imports only its own files besides the core; the index of all features is no exception),core-sees-features-through-indexandserver-parts-on-server(*.server.tsonly fromsrc/server, other*.server.tsand tests). The rules that were there stay;shared-stays-pureis nowcore-stays-pure.src/test/boundaries.test.tsruns the real rules on a small project per rule: each violation fails, the allowed imports pass. -
[E] Built with #112 beyond the first decision and confirmed by the owner (2026-11-13):
feature-stays-pure(the files of a feature other than*.server.tsand tests import neither server nor client, because the core reaches them through the index and the browser runs them);server-not-clientandserver-runtime-deps(no dev dependencies) cover the*.server.tsparts andsrc/featurestoo; tests may import a*.server.tspart. -
[E] Built with #116 (owner, 2026-11-14, only
src/serverimports the server index): the ruleserver-index-on-serverforbidssrc/features/index.server.gen.tsto every file outsidesrc/server, tests included;server-parts-on-serverlets that index import the*.server.tsparts.src/test/boundaries.test.tschecks both. -
[E] Changed for #542, not built yet (owner, 2026-11-30): every feature gets one folder
src/features/<feature>/with its rules and checks, its action inputs and state shape, its Lexicanum page, its server part (*.server.ts) and its client part (*.client.ts), and its tests;src/corekeeps only what two or more features share. This replaces, once #542 is built, the place of the checks insrc/core(pattern 7), the ban of client code in a feature folder (pattern 11) and the separate places of pattern 13 and 14. Names are readable (#543), and each rule exists once and is checked by the server (#544). -
[E] Checked first (owner, 2026-11-30, #546, not built yet): names of at least 4 characters and readable feature folders and catalog keys, as a ratchet; no file in
src/corethat only one feature imports (a ratchet list of today’s cases); a feature imports onlysrc/coreand its own folder;*.server.tsnever reaches the client; a hint on a pull request that changes many directories outside its feature’s folder. -
[E] The older patterns are checked in the CI too (owner, 2026-11-30, #546, not built yet), as ratchets: texts apart from rules (2), stocks changed only by
settleand the booking (3), noswitch (mission)outside the mission folders (4), noMath.randominsrc/coreandsrc/features(5), place ids only throughplaceId()/parsePlaceId()(6), no SQL outside the repositories (8); pattern 7 by the guard of #544; every pattern page names under „Geprüft durch“ its checks, and a meta-test checks that they exist.