@starci/eslint-canon-be 3.18.3 → 3.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/comments.js +1 -1
  3. package/dist/explicit-surface.js +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/jwt-alg.js +1 -1
  6. package/dist/lib/edition.d.ts +1 -1
  7. package/dist/lib/edition.js +1 -1
  8. package/dist/lib/hfs.d.ts +0 -6
  9. package/dist/lib/hfs.js +7 -5
  10. package/dist/lib/runtime-root.d.ts +6 -1
  11. package/dist/lib/runtime-root.js +8 -2
  12. package/dist/lib/subject-values.js +1 -1
  13. package/dist/module-layering.js +2 -2
  14. package/dist/project-graph.js +1 -1
  15. package/dist/third-party-owner.js +1 -1
  16. package/package.json +3 -1
  17. package/runtime/bundle.json +1 -190
  18. package/runtime/scripts/api/git/recorded-lines.mjs +5 -5
  19. package/runtime/scripts/hfs/project-graph.mjs +6 -6
  20. package/runtime/scripts/hfs/project-rule.mjs +3 -3
  21. package/runtime/config.example.yaml +0 -194
  22. package/runtime/engine/by-code-unit.mjs +0 -12
  23. package/runtime/engine/config.mjs +0 -461
  24. package/runtime/engine/invalid-config.mjs +0 -15
  25. package/runtime/engine/model-config.mjs +0 -112
  26. package/runtime/engine/orca-config.mjs +0 -34
  27. package/runtime/engine/plain-object.mjs +0 -5
  28. package/runtime/engine/release-config.mjs +0 -32
  29. package/runtime/engine/removed-vocabulary.mjs +0 -27
  30. package/runtime/engine/resources-config.mjs +0 -59
  31. package/runtime/engine/runtime-root.mjs +0 -138
  32. package/runtime/engine/secrets.mjs +0 -202
  33. package/runtime/engine/sonar-config.mjs +0 -24
  34. package/runtime/engine/temp-root.mjs +0 -26
  35. package/runtime/engine/yaml.mjs +0 -161
  36. package/runtime/knowledge/grammars/index.yaml +0 -114
  37. package/runtime/knowledge/hfs/canon-pins.yaml +0 -716
  38. package/runtime/knowledge/hfs/fe-stack.yaml +0 -272
  39. package/runtime/knowledge/hfs/rules.yaml +0 -6760
  40. package/runtime/knowledge/hfs/slots.yaml +0 -2783
  41. package/runtime/knowledge/patterns/fe/folder.yaml +0 -425
  42. package/runtime/knowledge/sonar-gate.yaml +0 -151
  43. package/runtime/modules/kernel/removed-vocabulary.yaml +0 -458
  44. package/runtime/modules/models/registry.yaml +0 -221
  45. package/runtime/modules/models/runtimes.yaml +0 -556
  46. package/runtime/modules/models/tiers.yaml +0 -66
  47. package/runtime/scripts/api/git/cat-file.mjs +0 -4
  48. package/runtime/scripts/api/git/config-get.mjs +0 -9
  49. package/runtime/scripts/api/git/diff.mjs +0 -4
  50. package/runtime/scripts/api/git/lib.mjs +0 -80
  51. package/runtime/scripts/api/git/ls-files.mjs +0 -5
  52. package/runtime/scripts/api/git/ls-tree.mjs +0 -4
  53. package/runtime/scripts/api/git/merge-base.mjs +0 -8
  54. package/runtime/scripts/api/git/remote.mjs +0 -4
  55. package/runtime/scripts/api/git/rev-parse-query.mjs +0 -4
  56. package/runtime/scripts/api/git/show.mjs +0 -5
  57. package/runtime/scripts/api/git/tag.mjs +0 -4
  58. package/runtime/scripts/hfs/allows.mjs +0 -77
  59. package/runtime/scripts/hfs/architecture/ast-walks.mjs +0 -250
  60. package/runtime/scripts/hfs/architecture/automatic-gates.mjs +0 -103
  61. package/runtime/scripts/hfs/architecture/backend-app-files.mjs +0 -114
  62. package/runtime/scripts/hfs/architecture/backend.mjs +0 -462
  63. package/runtime/scripts/hfs/architecture/background-unowned.mjs +0 -254
  64. package/runtime/scripts/hfs/architecture/canon-clones.mjs +0 -291
  65. package/runtime/scripts/hfs/architecture/canon-jsx-clones.mjs +0 -224
  66. package/runtime/scripts/hfs/architecture/client-reaches-server.mjs +0 -102
  67. package/runtime/scripts/hfs/architecture/clones.mjs +0 -287
  68. package/runtime/scripts/hfs/architecture/component-tiers.mjs +0 -161
  69. package/runtime/scripts/hfs/architecture/config-unread.mjs +0 -16
  70. package/runtime/scripts/hfs/architecture/config.mjs +0 -407
  71. package/runtime/scripts/hfs/architecture/connection-map.mjs +0 -350
  72. package/runtime/scripts/hfs/architecture/constructor-deps.mjs +0 -115
  73. package/runtime/scripts/hfs/architecture/context-coupling.mjs +0 -117
  74. package/runtime/scripts/hfs/architecture/context-map.mjs +0 -355
  75. package/runtime/scripts/hfs/architecture/context-owner.mjs +0 -102
  76. package/runtime/scripts/hfs/architecture/context-platform-tables.mjs +0 -65
  77. package/runtime/scripts/hfs/architecture/context-transaction.mjs +0 -75
  78. package/runtime/scripts/hfs/architecture/contract-bounds.mjs +0 -72
  79. package/runtime/scripts/hfs/architecture/contract-fixture-guard.mjs +0 -177
  80. package/runtime/scripts/hfs/architecture/contracts-readonly.mjs +0 -360
  81. package/runtime/scripts/hfs/architecture/contracts.mjs +0 -489
  82. package/runtime/scripts/hfs/architecture/cross-app-duplicate.mjs +0 -81
  83. package/runtime/scripts/hfs/architecture/dead-exports-bindings.mjs +0 -173
  84. package/runtime/scripts/hfs/architecture/dead-exports.mjs +0 -420
  85. package/runtime/scripts/hfs/architecture/default-deny.mjs +0 -175
  86. package/runtime/scripts/hfs/architecture/doc-language.mjs +0 -45
  87. package/runtime/scripts/hfs/architecture/entity-registry.mjs +0 -51
  88. package/runtime/scripts/hfs/architecture/entrypoint.mjs +0 -75
  89. package/runtime/scripts/hfs/architecture/error-codes.mjs +0 -54
  90. package/runtime/scripts/hfs/architecture/error-masked.mjs +0 -78
  91. package/runtime/scripts/hfs/architecture/fe-slot-allows.mjs +0 -44
  92. package/runtime/scripts/hfs/architecture/feature-shape.mjs +0 -60
  93. package/runtime/scripts/hfs/architecture/framework-pinned.mjs +0 -41
  94. package/runtime/scripts/hfs/architecture/frontend-block-render.mjs +0 -112
  95. package/runtime/scripts/hfs/architecture/frontend-grammar.mjs +0 -193
  96. package/runtime/scripts/hfs/architecture/frontend-routing.mjs +0 -198
  97. package/runtime/scripts/hfs/architecture/frontend-world-render.mjs +0 -368
  98. package/runtime/scripts/hfs/architecture/frontend-world.mjs +0 -374
  99. package/runtime/scripts/hfs/architecture/frontend.mjs +0 -248
  100. package/runtime/scripts/hfs/architecture/function-spec-providers.mjs +0 -185
  101. package/runtime/scripts/hfs/architecture/hfs-graph.mjs +0 -77
  102. package/runtime/scripts/hfs/architecture/hfs.mjs +0 -394
  103. package/runtime/scripts/hfs/architecture/hooks-are-hooks.mjs +0 -118
  104. package/runtime/scripts/hfs/architecture/i18n-keys.mjs +0 -213
  105. package/runtime/scripts/hfs/architecture/identity.mjs +0 -121
  106. package/runtime/scripts/hfs/architecture/index.mjs +0 -402
  107. package/runtime/scripts/hfs/architecture/injection-token-exported.mjs +0 -69
  108. package/runtime/scripts/hfs/architecture/jwt-ast.mjs +0 -231
  109. package/runtime/scripts/hfs/architecture/machine-ast.mjs +0 -232
  110. package/runtime/scripts/hfs/architecture/managed-scripts.mjs +0 -32
  111. package/runtime/scripts/hfs/architecture/module-per-transport.mjs +0 -237
  112. package/runtime/scripts/hfs/architecture/next-data-contract.mjs +0 -126
  113. package/runtime/scripts/hfs/architecture/next-data-inference.mjs +0 -192
  114. package/runtime/scripts/hfs/architecture/next-data-key.mjs +0 -374
  115. package/runtime/scripts/hfs/architecture/next-data-symbols.mjs +0 -26
  116. package/runtime/scripts/hfs/architecture/next-data.mjs +0 -425
  117. package/runtime/scripts/hfs/architecture/operation-contract-roots.mjs +0 -55
  118. package/runtime/scripts/hfs/architecture/owners.mjs +0 -142
  119. package/runtime/scripts/hfs/architecture/package-shape.mjs +0 -92
  120. package/runtime/scripts/hfs/architecture/presentation.mjs +0 -173
  121. package/runtime/scripts/hfs/architecture/reachability.mjs +0 -330
  122. package/runtime/scripts/hfs/architecture/register-once.mjs +0 -212
  123. package/runtime/scripts/hfs/architecture/registration.mjs +0 -372
  124. package/runtime/scripts/hfs/architecture/render-graph.mjs +0 -449
  125. package/runtime/scripts/hfs/architecture/render-prop-across-server.mjs +0 -58
  126. package/runtime/scripts/hfs/architecture/required-files.mjs +0 -237
  127. package/runtime/scripts/hfs/architecture/root-packages.mjs +0 -78
  128. package/runtime/scripts/hfs/architecture/route-files-thin.mjs +0 -133
  129. package/runtime/scripts/hfs/architecture/schema-owner.mjs +0 -288
  130. package/runtime/scripts/hfs/architecture/server-action.mjs +0 -78
  131. package/runtime/scripts/hfs/architecture/side-boundary.mjs +0 -13
  132. package/runtime/scripts/hfs/architecture/source-names-shape.mjs +0 -320
  133. package/runtime/scripts/hfs/architecture/source-names.mjs +0 -393
  134. package/runtime/scripts/hfs/architecture/sql-keys.mjs +0 -344
  135. package/runtime/scripts/hfs/architecture/sql-owner.mjs +0 -291
  136. package/runtime/scripts/hfs/architecture/sql-returning.mjs +0 -76
  137. package/runtime/scripts/hfs/architecture/sql-token-forms.mjs +0 -117
  138. package/runtime/scripts/hfs/architecture/sql-tokens.mjs +0 -587
  139. package/runtime/scripts/hfs/architecture/staged-consumers.mjs +0 -42
  140. package/runtime/scripts/hfs/architecture/surface-nesting.mjs +0 -127
  141. package/runtime/scripts/hfs/architecture/surface.mjs +0 -88
  142. package/runtime/scripts/hfs/architecture/symbols.mjs +0 -273
  143. package/runtime/scripts/hfs/architecture/test-world-files.mjs +0 -263
  144. package/runtime/scripts/hfs/architecture/tiers.mjs +0 -256
  145. package/runtime/scripts/hfs/architecture/transport-owner.mjs +0 -248
  146. package/runtime/scripts/hfs/architecture/type-context.mjs +0 -335
  147. package/runtime/scripts/hfs/architecture/typescript.mjs +0 -477
  148. package/runtime/scripts/hfs/architecture/unit-spec-providers.mjs +0 -165
  149. package/runtime/scripts/hfs/declaration-shape.mjs +0 -196
  150. package/runtime/scripts/hfs/declaration-slots.mjs +0 -89
  151. package/runtime/scripts/hfs/edition-slots.mjs +0 -80
  152. package/runtime/scripts/hfs/explicit-surface-rule.mjs +0 -59
  153. package/runtime/scripts/hfs/linear-text.mjs +0 -30
  154. package/runtime/scripts/hfs/manifest-shape.mjs +0 -474
  155. package/runtime/scripts/hfs/param-names.mjs +0 -13
  156. package/runtime/scripts/hfs/path-findings.mjs +0 -167
  157. package/runtime/scripts/hfs/repo-identity.mjs +0 -89
  158. package/runtime/scripts/hfs/rule-catalog.mjs +0 -458
  159. package/runtime/scripts/hfs/rule-params-shape.mjs +0 -103
  160. package/runtime/scripts/hfs/rules/database-constants.mjs +0 -25
  161. package/runtime/scripts/hfs/rules/database-migrations.mjs +0 -684
  162. package/runtime/scripts/hfs/rules/fe-no-tests.mjs +0 -68
  163. package/runtime/scripts/hfs/rules/read.mjs +0 -45
  164. package/runtime/scripts/hfs/rules/secrets.mjs +0 -79
  165. package/runtime/scripts/hfs/rules/spec-placement.mjs +0 -28
  166. package/runtime/scripts/hfs/slot-app-view.mjs +0 -97
  167. package/runtime/scripts/hfs/slot-classify.mjs +0 -69
  168. package/runtime/scripts/hfs/slot-errors.mjs +0 -12
  169. package/runtime/scripts/hfs/slot-imports.mjs +0 -98
  170. package/runtime/scripts/hfs/slot-manifest-shape.mjs +0 -111
  171. package/runtime/scripts/hfs/slot-match.mjs +0 -164
  172. package/runtime/scripts/hfs/slot-path.mjs +0 -6
  173. package/runtime/scripts/hfs/slot-required.mjs +0 -95
  174. package/runtime/scripts/hfs/slot-semantic-problems.mjs +0 -175
  175. package/runtime/scripts/hfs/slot-side-problems.mjs +0 -32
  176. package/runtime/scripts/hfs/slots.mjs +0 -306
  177. package/runtime/scripts/hfs/test-world-slot.mjs +0 -5
  178. package/runtime/scripts/hfs/trailing-slashes.mjs +0 -8
  179. package/runtime/scripts/hfs/typescript-programs.mjs +0 -95
  180. package/runtime/scripts/hfs/view.mjs +0 -180
  181. package/runtime/scripts/lib/declaration-surface.mjs +0 -166
  182. package/runtime/scripts/lib/dockerfile.mjs +0 -164
  183. package/runtime/scripts/lib/env.mjs +0 -18
  184. package/runtime/scripts/lib/event-contract.mjs +0 -102
  185. package/runtime/scripts/lib/git-hooks-dir.mjs +0 -30
  186. package/runtime/scripts/lib/git.mjs +0 -35
  187. package/runtime/scripts/lib/glob.mjs +0 -32
  188. package/runtime/scripts/lib/grammar-lint.mjs +0 -57
  189. package/runtime/scripts/lib/i18n.mjs +0 -82
  190. package/runtime/scripts/lib/in-order.mjs +0 -90
  191. package/runtime/scripts/lib/json-clone.mjs +0 -70
  192. package/runtime/scripts/lib/json.mjs +0 -44
  193. package/runtime/scripts/lib/language.mjs +0 -233
  194. package/runtime/scripts/lib/list.mjs +0 -26
  195. package/runtime/scripts/lib/mutation-fence.mjs +0 -20
  196. package/runtime/scripts/lib/package-at.mjs +0 -62
  197. package/runtime/scripts/lib/path-key.mjs +0 -124
  198. package/runtime/scripts/lib/read-text.mjs +0 -47
  199. package/runtime/scripts/lib/regex.mjs +0 -3
  200. package/runtime/scripts/lib/rule-packs.mjs +0 -243
  201. package/runtime/scripts/lib/same-text.mjs +0 -4
  202. package/runtime/scripts/lib/secret-patterns.mjs +0 -230
  203. package/runtime/scripts/lib/sops-envelope.mjs +0 -212
  204. package/runtime/scripts/lib/stack-services.mjs +0 -191
  205. package/runtime/scripts/lib/ts-analysis.mjs +0 -39
  206. package/runtime/scripts/lib/ts-ast.mjs +0 -63
  207. package/runtime/scripts/lib/walk.mjs +0 -45
  208. package/runtime/scripts/lib/yaml-cached.mjs +0 -14
@@ -1,425 +0,0 @@
1
- schema: starci/knowledge-source@1
2
- id: fe.folder
3
- title: Folder
4
- purpose: |
5
- Given a piece of frontend code, which directory and which file name does it get? Apply the HFS frontend tree
6
- (knowledge/hfs/README.md section 6, slots fe.*).
7
- appliesTo:
8
- - frontend
9
- family: fe
10
- provenance:
11
- reviewedAt: 2026-09-29
12
- sources:
13
- - knowledge/hfs/README.md
14
- - knowledge/hfs/slots.yaml
15
- - https://nextjs.org/docs/app/getting-started/project-structure
16
- - https://next-intl.dev/docs/routing
17
- - packages/grammar/src/**
18
- limitations: |
19
- Folder rules place code by responsibility. They do not prove rendered behavior or accessibility. Inspect the
20
- selected app's actual source, manifests, aliases and lint configuration. Verify installed Grammar
21
- exports at @starci/grammar/common.
22
- rules:
23
- - id: FE-FOLDER-1
24
- title: Responsibility directories
25
- kind: mandatory
26
- hfsRules: [R01, R02, R59, R64, R26, R54, R56, R91, R94]
27
- requirement: |
28
- The front end of every app (`fe/`) is an fe/apps/<app>/ monorepo even with one app — each app declared in
29
- `hfs.json` `sides.fe.apps` with kind `next` (slot `fe.app.next`; the scaffold writes `landing` and `app`) — and all
30
- product source lives under fe/apps/<app>/src. An fe/src/ does not exist. Each Next source root
31
- (fe/apps/<app>/src) uses app/ for framework adapters; features/{pages,layouts,overlays} for route-facing product
32
- composition; components/{blocks,composites,branches,leaves} for product visuals and components/providers for the
33
- client providers the root layout mounts; hooks/ for React hooks (swr, rhf, zustand, socketio, effects, reuseables and
34
- <domain>); redux/ for the app-wide store; and modules/<capability> for cohesive reusable technical and domain
35
- capabilities (api, auth, toast, i18n, config, routes, brand, types, storage, superjson, dayjs, utils). Each concern's
36
- library and home is knowledge/hfs/fe-stack.yaml. Every app carries the required
37
- module instances of slot `fe.modules` and one brand.css under modules/brand when it sets brand tokens
38
- (`fe.modules.brand`). No other empty role
39
- folder is required. Grammar remains a separate product-agnostic package. The only files that may sit directly in the
40
- source root (the directory holding app/) are the framework-pinned root files listed in frameworkPinnedRootFiles
41
- below: Next.js loads them from that exact place. Each is a thin framework adapter whose internal imports enter
42
- modules or a feature public entry only; every other rule still applies to it, except that the export names the
43
- framework mandates there (frameworkPinnedRootExports) keep their framework spelling. HFS uses proxy.ts for locale
44
- routing; a middleware.* file is refused on Next 16 and later by the Next conventions check and the slot
45
- fe.source-root-pinned, even though the machine list names it as a file Next loads. Any other file at the source
46
- root, including a helper folder beside a pinned file, has no owner and is refused.
47
- frameworkPinnedRootFiles:
48
- # Machine list read by scripts/hfs/architecture/framework-pinned.mjs (FE_SOURCE_LAYOUT_INVALID accepts exactly
49
- # these basenames directly in a Next source root; FE_TIER_DIRECTION keeps them thin). Exact names,
50
- # case-sensitive, no globs. It lists what the framework loads from the source root. Which of them a repository may
51
- # keep is decided by the slot fe.source-root-pinned and FE_NEXT_CONVENTIONS, not by this list.
52
- # Machine list read by scripts/hfs/architecture/framework-pinned.mjs (FE_SOURCE_LAYOUT_INVALID
53
- # accepts exactly these basenames directly in a Next source root;
54
- # their imports follow the FE_TIER_DIRECTION matrix). Exact names, case-sensitive, no globs. Supervisor rulings
55
- # (proxy is the Next 16 name of middleware, listed so the list survives the upgrade).
56
- - middleware.ts
57
- - middleware.js
58
- - middleware.mjs
59
- - proxy.ts
60
- - proxy.js
61
- - proxy.mjs
62
- - instrumentation.ts
63
- - instrumentation.js
64
- - instrumentation.mjs
65
- - instrumentation-client.ts
66
- - instrumentation-client.js
67
- - instrumentation-client.mjs
68
- - next-env.d.ts
69
- frameworkPinnedRootExports:
70
- # Export names the framework mandates in a pinned root file, keyed by file stem: a naming review keeps exactly these
71
- # names in exactly these files when they sit directly in a Next source root.
72
- middleware: [config, middleware, default]
73
- proxy: [config, proxy, default]
74
- instrumentation: [register, onRequestError]
75
- instrumentation-client: [onRouterTransitionStart]
76
- rationale: |
77
- One fixed source root per app keeps every front end the same shape while preventing app helpers, component-local
78
- hooks and feature-local transport buckets from becoming undeclared owners.
79
- cases:
80
- - id: case-1
81
- when: "A routed authentication scenario"
82
- write: "fe/apps/<app>/src/features/pages/AuthenticationPage/index.tsx"
83
- - id: case-2
84
- when: "A back-end call or the session"
85
- write: >
86
- slot fe.modules.api (one file per query or mutation) or slot fe.modules.auth, each with one explicit public index.ts
87
- entry
88
- - id: case-3
89
- when: "A reusable product visual without scenario ownership"
90
- write: "an owner folder of slot `fe.components` under the layer it belongs to — for example fe/apps/<app>/src/components/leaves/<Name>/index.tsx"
91
- - id: case-4
92
- when: "A React hook"
93
- write: "fe/apps/<app>/src/hooks/<domain>/useAutoScroll.ts; built-in React hook calls may remain in visuals"
94
- - id: case-5
95
- kind: exception
96
- when: "Next.js only loads the file from the source root (proxy, instrumentation, instrumentation-client, next-env.d.ts)"
97
- write: >
98
- fe/apps/<app>/src/proxy.ts beside fe/apps/<app>/src/app/ as a thin adapter; locale routing logic lives in
99
- fe/apps/<app>/src/modules/i18n/ and the adapter imports it; the names the framework mandates there
100
- (frameworkPinnedRootExports, for example export const config = { matcher }) keep their framework spelling
101
- - id: case-6
102
- when: "Any other file or folder directly under the source root (an `i18n/request.ts` or a `config.ts` there), and an fe/src/"
103
- write: >
104
- Move it to its owner, for example fe/apps/<app>/src/modules/i18n/request.ts, and point framework configuration
105
- (fe/apps/<app>/next.config.ts) at the new path
106
- - id: case-7
107
- when: "The per-slot data-status recipe"
108
- write: >
109
- fe/apps/<app>/src/components/composites/SlotView/index.tsx, fe/apps/<app>/src/modules/slot/index.ts (Slot, toSlot,
110
- SlotLabels) and fe/apps/<app>/src/hooks/slot/useSlotLabels.ts, one copy each (examples/shape-slot)
111
- verification:
112
- automated:
113
- - HFS_SLOT_UNDECLARED
114
- - HFS_SLOT_AMBIGUOUS
115
- - HFS_SLOT_NOT_ENABLED
116
- - HFS_FORBIDDEN_PRESENT
117
- - HFS_TRACKED_MUST_BE_IGNORED
118
- - HFS_ROOT_ENTRY_FORBIDDEN
119
- - HFS_ROOT_MARKDOWN_FORBIDDEN
120
- - HFS_ROOT_SRC_FORBIDDEN_FE
121
- - HFS_SRC_LAYOUT_INVALID
122
- - HFS_MODULE_TIER_INVALID
123
- - HFS_WORK_IN_FE
124
- - HFS_STACKS_IN_SIDE
125
- - HFS_SLOT_REQUIRED_MISSING
126
- - HFS_MIN_INSTANCES
127
- - HFS_REQUIRED_FILE_MISSING
128
- - HFS_ROOT_ENTRY_MISSING
129
- - HFS_APPS_REQUIRED
130
- - HFS_APP_LAYOUT_INVALID
131
- - HFS_README_TITLE_INVALID
132
- - HFS_README_DESCRIPTION_INVALID
133
- - HFS_README_SECTION_MISSING
134
- - HFS_README_SECTION_ORDER
135
- - HFS_README_DEVELOPMENT_INCOMPLETE
136
- - HFS_README_WORK_POINTER_MISSING
137
- - HFS_README_PRIVATE_URL
138
- - HFS_README_BADGE_NOT_LIVE
139
- - FE_I18N_PLACEMENT
140
- - FE_I18N_NAVIGATION
141
- - FE_I18N_FORMATTER
142
- - FE_APP_ISOLATION
143
- - BE_TIER_DIRECTION
144
- - FE_TIER_DIRECTION
145
- - ARCH_PACKAGE_IMPORTS_APP
146
- - FE_ROUTE_FILES_THIN
147
- - FE_NEXT_CONVENTIONS
148
- - FE_PAGE_METADATA_MISSING
149
- - FE_ROUTE_ONE_PAGE
150
- - FE_ROUTE_DRAWING_DECISION
151
- - FE_ROUTE_CLIENT_BOUNDARY
152
- - FE_ROUTE_CLIENT_HOOK
153
- - FE_ROUTE_DEFAULT_EXPORT
154
- - FE_HOOKS_ARE_HOOKS
155
- - FE_CUSTOM_HOOK_LOCATION
156
- - FE_BLOCK_PRODUCT_HOOK_DEFINITION
157
- - FE_COMPONENT_DEEP_HOOK_IMPORT
158
- - FE_SOURCE_FORM
159
- - FE_SOURCE_LAYOUT_INVALID
160
- - FE_SLOT_FILE_ROLE
161
- manual:
162
- - Confirm the unit's responsibility and public entry, rather than assigning it by consumer count.
163
- relatedExamples:
164
- - connected-block
165
-
166
- - id: FE-FOLDER-2
167
- title: Discoverable files for one unit
168
- kind: mandatory
169
- hfsRules: [R02, R55, R65, R20, R92]
170
- requirement: |
171
- A split unit (a connected block, and a feature page, layout or overlay) uses index.tsx for the connected X and
172
- sibling component.tsx for the pure XBase, its XBaseProps and xDefaultState, plus XState when the shape is its own union
173
- (a shape that is a domain status is typed with that status, never a second name for it). Only that index.tsx imports
174
- component.tsx. Pure blocks, composites, branches and leaves use index.tsx only and never gain an
175
- empty twin. classNames.ts is present only when the unit owns class strings. Budgets: component.tsx 300 lines,
176
- connected index.tsx 200 lines, at most 6 data hooks and 6 useState per connected unit.
177
- A composition-only feature may render an existing public pure component owner directly instead of creating a
178
- forwarding component.tsx. The route-state overlay host of FE-BOUNDARY-5 renders components/branches/OverlayHost;
179
- a connected block still requires its exact private Base twin.
180
- rationale: |
181
- Stable basenames make class names and the connected and presentational split discoverable without forwarding
182
- twins, and budgets keep a unit reviewable.
183
- cases:
184
- - id: case-1
185
- when: "Connected block with product-world lifecycle"
186
- write: "blocks/CatalogBlock/{index.tsx,component.tsx}; every nonempty index render reaches the sibling"
187
- - id: case-2
188
- when: "Feature page, layout or overlay"
189
- write: >
190
- features/pages/OperatePage/{index.tsx,component.tsx,classNames.ts}, features/layouts/WorkspaceLayout/…,
191
- features/overlays/SendHandoffOverlay/… (examples/shape-slot)
192
- - id: case-3
193
- when: "Single visual unit"
194
- write: "leaves/ButtonStateSample/{classNames.ts,index.tsx}; no component.tsx twin without a separate world owner"
195
- - id: case-4
196
- when: "Custom hook or reusable module"
197
- write: "hooks/<domain>/useX.ts or modules/<capability>/...; do not create visual twins"
198
- verification:
199
- automated:
200
- - HFS_SLOT_REQUIRED_MISSING
201
- - HFS_MIN_INSTANCES
202
- - HFS_REQUIRED_FILE_MISSING
203
- - HFS_ROOT_ENTRY_MISSING
204
- - HFS_APPS_REQUIRED
205
- - HFS_APP_LAYOUT_INVALID
206
- - HFS_README_TITLE_INVALID
207
- - HFS_README_DESCRIPTION_INVALID
208
- - HFS_README_SECTION_MISSING
209
- - HFS_README_SECTION_ORDER
210
- - HFS_README_DEVELOPMENT_INCOMPLETE
211
- - HFS_README_WORK_POINTER_MISSING
212
- - HFS_README_PRIVATE_URL
213
- - HFS_README_BADGE_NOT_LIVE
214
- - FE_CLIENT_BOUNDARY
215
- - FE_CLIENT_SERVER_IMPORT
216
- - FE_CLIENT_REACHES_SERVER
217
- - FE_SERVER_ONLY_MARK
218
- - FE_STORAGE_OUTSIDE_MODULES
219
- - FE_DANGEROUS_HTML
220
- - FE_SIZE_AND_STATE_BUDGET
221
- - FE_LIST_KEY
222
- - FE_EFFECT_CLEANUP
223
- - FE_SWALLOWED_ERROR
224
- - FE_CONSOLE_CALL
225
- - HFS_SIZE_GROWTH
226
- - HFS_SIZE_SOFT_BACKLOG
227
- - FE_COMPONENT_API
228
- - FE_COMPONENT_WORLD_OWNERSHIP
229
- - FE_WORLD_OWNER_RENDER_BOUNDARY
230
- - FE_CONNECTED_BLOCK_RENDER_PAIR
231
- - FE_PURE_REACHES_DATA
232
- - FE_PURE_WORLD_HOOK
233
- - FE_PURE_WORLD_IMPORT
234
- manual:
235
- - Confirm each file owns a real responsibility; do not add a component.tsx twin by habit.
236
- relatedExamples:
237
- - connected-block
238
-
239
- - id: FE-FOLDER-3
240
- title: Route files adapt to one visual owner and every app has its boundaries
241
- kind: mandatory
242
- hfsRules: [R53, R54, R55, R57, R26]
243
- requirement: |
244
- Route files under app/[locale]/ (page, layout, template, loading, not-found) are server components. A route may
245
- resolve framework server inputs (params, searchParams, headers, cookies), then mounts one page-level visual owner.
246
- A route whose complete responsibility is redirect or notFound mounts none. A route file holds no inline component, no
247
- drawing decision and no hook, and a redirect from an old URL lives in next.config redirects(), never in a page. Every app has
248
- app/global-error.tsx, app/[locale]/layout.tsx, app/[locale]/error.tsx and app/[locale]/not-found.tsx, and a loading.tsx
249
- for each route group that reads data. Each page exports generateMetadata. force-dynamic on a client page is forbidden.
250
- rationale: |
251
- Keeping default exports in the App Router layer prevents components from becoming route-coupled, and mandatory
252
- boundaries turn a render failure into a recoverable screen instead of a blank page.
253
- cases:
254
- - id: case-1
255
- when: "A route"
256
- write: >
257
- app/[locale]/authentication/page.tsx: const AuthenticationRoute = async () => <AuthenticationPage />, then export
258
- default AuthenticationRoute
259
- - id: case-2
260
- kind: exception
261
- when: "Redirect or notFound adapter"
262
- write: "Resolve framework inputs and redirect or terminate without a visual owner."
263
- - id: case-3
264
- when: "Global app files"
265
- write: >
266
- app/globals.css, app/global-error.tsx, app/[locale]/error.tsx, app/[locale]/not-found.tsx, app/sitemap.ts,
267
- app/robots.ts, app/health/live/route.ts (the one route handler, FE-ROUTE)
268
- verification:
269
- automated:
270
- - FE_ERROR_BOUNDARY_MISSING
271
- - FE_SUSPENSE_NULL_FALLBACK
272
- - FE_ROUTE_FILES_THIN
273
- - FE_NEXT_CONVENTIONS
274
- - FE_PAGE_METADATA_MISSING
275
- - FE_ROUTE_ONE_PAGE
276
- - FE_ROUTE_DRAWING_DECISION
277
- - FE_ROUTE_CLIENT_BOUNDARY
278
- - FE_ROUTE_CLIENT_HOOK
279
- - FE_ROUTE_DEFAULT_EXPORT
280
- - FE_CLIENT_BOUNDARY
281
- - FE_CLIENT_SERVER_IMPORT
282
- - FE_CLIENT_REACHES_SERVER
283
- - FE_SERVER_ONLY_MARK
284
- - FE_STORAGE_OUTSIDE_MODULES
285
- - FE_DANGEROUS_HTML
286
- - FE_OWNER_REACHABLE
287
- - FE_ROUTE_HARDCODED
288
- - FE_HREF_RESOLVES
289
- - BE_TIER_DIRECTION
290
- - FE_TIER_DIRECTION
291
- - ARCH_PACKAGE_IMPORTS_APP
292
- manual:
293
- - Confirm visual routes have one page owner and redirect-only routes have no visual tree.
294
- relatedExamples: []
295
-
296
- - id: FE-FOLDER-4
297
- title: Hooks are hooks; operations and transport live in modules
298
- kind: mandatory
299
- hfsRules: [R56, R50, R49, R21, R26]
300
- requirement: |
301
- hooks/ holds React hooks (use*.ts, one hook per file): hooks/swr (one SWR wrapper per modules/api operation, plus
302
- SwrSideEffects.tsx), hooks/rhf (forms), hooks/zustand/<store> (a store and its hooks), hooks/socketio (sockets.ts,
303
- SocketIoSideEffects.tsx, enums/, types/), hooks/effects (app-wide side effects), hooks/reuseables (generic hooks) and
304
- hooks/<domain>/ with exactly one <domain>.shared.ts for shared non-hook helpers of that domain. A file in hooks/ that is
305
- none of these is a finding. The Apollo clients and their links, one file per query and mutation, the GraphQLResponse
306
- envelope, the generated wire types (from be/contracts/, through the root codegen) and the axios calls live in
307
- modules/api; the session lives in modules/auth; mutation feedback in modules/toast; environment reading in
308
- modules/config; every href builder in modules/routes; locale routing in modules/i18n; colour values in modules/brand.
309
- Only hooks/swr imports the API transport operations; feature owners and other hooks consume those SWR hooks.
310
- A helper name defined twice across hook files is a finding.
311
- rationale: |
312
- A rule that says what a hooks folder is also says where everything else goes, so nobody copies a helper sixteen
313
- times or fills hooks/ with transport calls.
314
- cases:
315
- - id: case-1
316
- when: "A query the sales page reads"
317
- write: "fe/apps/<app>/src/hooks/swr/api/graphql/queries/useQuerySalesSummarySwr.ts over modules/api/graphql/queries/query-sales-summary.ts"
318
- - id: case-2
319
- when: "A helper shared by the hooks of one domain"
320
- write: "fe/apps/<app>/src/hooks/sales/sales.shared.ts, for example useSalesAccessToken's token reader"
321
- - id: case-3
322
- when: "A form"
323
- write: "fe/apps/<app>/src/hooks/rhf/useSendHandoffForm.ts"
324
- - id: case-4
325
- when: "The API client"
326
- write: "fe/apps/<app>/src/modules/api/graphql/clients/ (auth and no-auth Apollo clients, links/) and fe/apps/<app>/src/modules/api/graphql/types.ts"
327
- - id: case-5
328
- when: "Intrinsic custom helper"
329
- write: "fe/apps/<app>/src/hooks/ui/useAutoScroll.ts; direct useRef and useState calls may remain in their visual owner"
330
- verification:
331
- automated:
332
- - FE_HOOKS_ARE_HOOKS
333
- - FE_CUSTOM_HOOK_LOCATION
334
- - FE_BLOCK_PRODUCT_HOOK_DEFINITION
335
- - FE_COMPONENT_DEEP_HOOK_IMPORT
336
- - FE_TRANSPORT_OWNER
337
- - FE_EFFECT_FETCH
338
- - FE_SWR_KEY_IDENTITY
339
- - FE_SWR_MUTATION_RESOURCE_IDENTITY
340
- - FE_ENV_OWNER
341
- - HFS_DUPLICATE_CODE
342
- - HFS_DUPLICATE_SYMBOL
343
- - FE_CROSS_APP_DUPLICATE
344
- - BE_TIER_DIRECTION
345
- - FE_TIER_DIRECTION
346
- - ARCH_PACKAGE_IMPORTS_APP
347
- manual:
348
- - Confirm each lifecycle has one feature owner and transport mechanics have one module owner.
349
- relatedExamples:
350
- - connected-block
351
-
352
- - id: FE-FOLDER-5
353
- title: Package unit
354
- kind: mandatory
355
- hfsRules: [R63]
356
- requirement: |
357
- A shared front-end package is fe/packages/<pkg>/ with package.json (explicit exports), src/index.ts and tsconfig.json,
358
- built to dist, and no spec (the front end has no tests, FE_NO_TESTS). The design system is the runtime's own
359
- `@starci/grammar` package (`.claude/packages/grammar`, installed from the npm registry): its components live under
360
- packages/grammar/src/core/<tier>/<Name>/ of the runtime with collocated class strings and specs, and its family
361
- entries and built-output proof stay at its package roots. See packages.yaml for the shared UI package shape.
362
- rationale: |
363
- Package layout separates primitives from app composition and keeps public entry verification against dist.
364
- cases:
365
- - id: case-1
366
- when: "A Grammar component (runtime package)"
367
- write: "packages/grammar/src/core/<leaf|branch|composite|frame>/<Name>/index.tsx"
368
- - id: case-2
369
- when: "A Grammar component's class strings and spec (runtime package)"
370
- write: "sibling classNames.ts and index.spec.tsx"
371
- - id: case-3
372
- when: "Grammar built-output proof (runtime package)"
373
- write: "common/index.test.mjs, core/index.test.mjs, package-boundary.test.mjs (node:test against dist/)"
374
- verification:
375
- automated:
376
- - FE_PACKAGE_SHAPE
377
- manual:
378
- - Verify public app imports use @starci/grammar/common and installed exports, never the package root.
379
- relatedExamples: []
380
-
381
- - id: FE-FOLDER-6
382
- title: Keep units cohesive
383
- kind: mandatory
384
- hfsRules: [R49, R21, R91, R92]
385
- requirement: |
386
- A unit folder contains files that change for the same responsibility. Do not create generic helpers/ or utils/
387
- buckets inside components, read deployment configuration in presentation, or split files solely to meet a count.
388
- Collocated subordinate renders and pure helpers are valid when they remain private to the owner; a separately stable
389
- responsibility receives its own named owner.
390
- rationale: |
391
- Cohesion prevents helper sprawl and duplicated configuration while avoiding one-component-per-folder ceremony that
392
- has no dependency boundary.
393
- cases:
394
- - id: case-1
395
- when: "A small subordinate render is private to one owner"
396
- write: "Keep it local with an unexported contract; extract it when it gains a stable public responsibility."
397
- - id: case-2
398
- when: "Class strings in component.tsx"
399
- write: "Never; they go to classNames.ts (lint class-names-in-colocated-file, no-inline-class-name)"
400
- - id: case-3
401
- when: "A helpers/ or utils/ folder"
402
- write: "Do not use it to hide mixed feature, transport or visual responsibilities."
403
- - id: case-4
404
- when: "A deployment constant"
405
- write: >
406
- Never. process.env.NEXT_PUBLIC_* is read only in fe/apps/<app>/src/modules/config and reached through that module,
407
- with no localhost fallback; a missing value in production throws when the module loads.
408
- verification:
409
- automated:
410
- - FE_ENV_OWNER
411
- - HFS_DUPLICATE_CODE
412
- - HFS_DUPLICATE_SYMBOL
413
- - FE_CROSS_APP_DUPLICATE
414
- - FE_SOURCE_FORM
415
- - FE_SOURCE_LAYOUT_INVALID
416
- - FE_COMPONENT_API
417
- - FE_COMPONENT_WORLD_OWNERSHIP
418
- - FE_WORLD_OWNER_RENDER_BOUNDARY
419
- - FE_CONNECTED_BLOCK_RENDER_PAIR
420
- - FE_PURE_REACHES_DATA
421
- - FE_PURE_WORLD_HOOK
422
- - FE_PURE_WORLD_IMPORT
423
- manual:
424
- - Confirm extraction is justified by ownership or lifecycle rather than file length or count.
425
- relatedExamples: []
@@ -1,151 +0,0 @@
1
- schema: starci/sonar-gate@1
2
- id: sonar-gate
3
- title: The Sonar quality gate every product is held to
4
- purpose: |
5
- The one place the Sonar thresholds live. A product repository never restates them: its
6
- .starcistacks/application-stacks.yaml `services.sonar.qualityGate` names the gate below, and
7
- scripts/gates/sonar-local.mjs (1) makes the local SonarQube's gate of that name carry exactly these
8
- conditions and selects it for the project, and (2) judges an op's slice - the lines it changed - against
9
- the same numbers. Code-writing ops cannot settle done while the slice is red
10
- (scripts/kernel/sonar-settle.mjs). Changing a number here changes every repository on the next scan.
11
- The gate has two parts: `newCode` (the recent work: coverage, duplication, issues of every severity, hotspots) and
12
- `overall` (the whole code: coverage, no imported HFS, ESLint or stylelint finding, no bug, code smell or
13
- vulnerability, every hotspot reviewed, no duplicated-lines excess, no cognitive-complexity issue). The one Sonar
14
- mechanism of the HFS canon is packages/hfs/README.md section "Sonar".
15
- gate:
16
- name: starci-quality
17
- # A project with no new-code baseline judges the whole project as new code; a fixed
18
- # window keeps "new code" the recent work on main, so the server gate is passable on a healthy main.
19
- newCodePeriod: {type: NUMBER_OF_DAYS, value: 30}
20
- newCode:
21
- # Coverage of the measured logic files only (the `ruleParams.be.logicRoles` roles of the `coverage: required` slots). The be unit run writes coverage/lcov.info (@starci/jest-preset coverageReporters lcov) and the
22
- # managed sonar-project.properties imports it (sonar.javascript.lcov.reportPaths=be/coverage/lcov.info) with
23
- # sonar.coverage.exclusions = the complement of the measured files (SonarQube has no coverage inclusions), rendered by starci app sync from the one derivation scripts/hfs/coverage-scope.mjs (be/jest.config.js and codecov.yml
24
- # are rendered from it too; a hand edit of any of them is R204 HFS_COVERAGE_SCOPE_DRIFT). The feature tier, declaration files, tests and
25
- # fe/ are never coverage targets, so coverage on these conditions is the coverage of the modules' logic alone.
26
- coverage:
27
- metric: new_coverage
28
- minPercent: 100
29
- # SonarQube's ignoreSmallChanges floor: 0, so a change of any size is held to duplication.
30
- ignoreBelowChangedLines: 0
31
- duplication:
32
- metric: new_duplicated_lines_density
33
- maxPercent: 3
34
- issues:
35
- # An open issue of any severity on a changed line fails the slice: there is no lesser severity that is only listed.
36
- blockingSeverities: [BLOCKER, CRITICAL, MAJOR, MINOR, INFO]
37
- metrics: {BLOCKER: new_blocker_violations, CRITICAL: new_critical_violations, MAJOR: new_major_violations, MINOR: new_minor_violations, INFO: new_info_violations}
38
- max: 0
39
- hotspots:
40
- metric: new_security_hotspots_reviewed
41
- minReviewedPercent: 100
42
- unreviewedMax: 0
43
- # The whole code, not only the new code. Every finding of the HFS canon reaches Sonar through ONE entry, `starci app check --gate lint --out`
44
- # (packages/hfs, contract changes hfs-sonar-import and hfs-lint-entry). CI runs it per side with --side and --out,
45
- # then merges rules by id and joins issues into ONE file, reports/lint.sonar.json, named by sonar.externalIssuesReportPaths; the gate holds the open-issue count of
46
- # the whole project at zero. The file carries three engines:
47
- # starci-hfs the repository findings of the gates a run selects (managed files, tree, pins, CI, contracts; the rule id is the finding code)
48
- # eslint ESLint's json over the repository (the BE and FE canon plugins alike, per-file and project-graph rules)
49
- # stylelint stylelint's json over the style glob (front ends)
50
- # The engines share ONE placement rule (a finding on a file Sonar does not index is filed on the first source file); Sonar's own
51
- # ESLint import (sonar.eslint.reportPaths) is not used because it drops such issues.
52
- # A SonarQube gate condition cannot filter issues by engine, so the condition is the project's open issues (`violations`,
53
- # overall code): the three engines above are the imports it counts, and every native Sonar issue counts with them. That is
54
- # stricter than the engines alone and it is intended: a project that meets this gate has no open issue of any origin.
55
- overall:
56
- issues:
57
- metric: violations
58
- max: 0
59
- engines: [starci-hfs, eslint, stylelint]
60
- # The dashboard counts (`sonar-local dashboard`): each type of open issue, each held at `max`.
61
- types: {bugs: BUG, code_smells: CODE_SMELL, vulnerabilities: VULNERABILITY}
62
- # Every security hotspot of the whole code is reviewed (the dashboard's "hotspots reviewed").
63
- hotspots:
64
- metric: security_hotspots_reviewed
65
- minReviewedPercent: 100
66
- # The measured files' coverage (see newCode.coverage), overall and per file: with the exclusions in place each measured file is its
67
- # own measure, so one measured file below 100 fails the slice verdict (sonar-local evaluateSlice) and the dashboard verdict
68
- # (sonar-local dashboard) although the project average may round to 100. A file outside the scope is never read.
69
- coverage:
70
- metric: coverage
71
- minPercent: 100
72
- perFile: true
73
- # HFS_DUPLICATE_CODE (R21): duplicated lines density of the whole project, the Sonar enforcer of the machine's clone check.
74
- # SonarJS runs its own token-based detection (sonar.cpd.* minimums are not read for TypeScript), so ruleParams.<profile>.duplicateBlock
75
- # is enforced by the machine and imported as starci-hfs issues, and this density is the Sonar-side backstop.
76
- duplication:
77
- metric: duplicated_lines_density
78
- maxPercent: 3
79
- # HFS_SIZE_GROWTH (R20): the cognitive complexity of a function is the Sonar rule S3776 (typescript:S3776, Sonar way, default
80
- # threshold); an open S3776 issue is an open issue of `overall.issues`, so the zero-issue condition is its gate.
81
- cognitiveComplexity:
82
- rule: typescript:S3776
83
- via: overall.issues
84
- # Lite is the same quality policy, coverage included: a lite back end keeps full's unit run and its 100 per file on the measured
85
- # logic files (owner ruling 2026-10-12, R212 case-1 (owner:lite-production-swarm), with the Work boundary amended by ruling:R212/case-4). Readers select this block from hfs.json edition; the gate keeps its own
86
- # name so a lite project's server gate stays a separate object, and every threshold below equals full's.
87
- lite:
88
- gate:
89
- name: starci-quality-lite
90
- newCodePeriod: {type: NUMBER_OF_DAYS, value: 30}
91
- newCode:
92
- coverage:
93
- metric: new_coverage
94
- minPercent: 100
95
- ignoreBelowChangedLines: 0
96
- duplication:
97
- metric: new_duplicated_lines_density
98
- maxPercent: 3
99
- issues:
100
- blockingSeverities: [BLOCKER, CRITICAL, MAJOR, MINOR, INFO]
101
- metrics: {BLOCKER: new_blocker_violations, CRITICAL: new_critical_violations, MAJOR: new_major_violations, MINOR: new_minor_violations, INFO: new_info_violations}
102
- max: 0
103
- hotspots:
104
- metric: new_security_hotspots_reviewed
105
- minReviewedPercent: 100
106
- unreviewedMax: 0
107
- overall:
108
- issues:
109
- metric: violations
110
- max: 0
111
- engines: [starci-hfs, eslint, stylelint]
112
- types: {bugs: BUG, code_smells: CODE_SMELL, vulnerabilities: VULNERABILITY}
113
- hotspots:
114
- metric: security_hotspots_reviewed
115
- minReviewedPercent: 100
116
- coverage:
117
- metric: coverage
118
- minPercent: 100
119
- perFile: true
120
- duplication:
121
- metric: duplicated_lines_density
122
- maxPercent: 3
123
- cognitiveComplexity:
124
- rule: typescript:S3776
125
- via: overall.issues
126
- # The Sonar enforcers of the rule catalog (knowledge/hfs/rules.yaml): the failure code each condition above is the gate of.
127
- enforces:
128
- - {rule: R20, code: HFS_SIZE_GROWTH, enforcer: cognitive-complexity, condition: cognitiveComplexity}
129
- - {rule: R21, code: HFS_DUPLICATE_CODE, enforcer: duplicated-lines-density, condition: duplication}
130
- - {rule: R21, code: HFS_DUPLICATE_SYMBOL, enforcer: duplicated-lines-density, condition: duplication}
131
- # Ops that write product code: each runs sonar-local on its own change and cannot settle done while the gate is red.
132
- enforcedOps: [backend.implement, interface.implement, code.refactor, code.fix]
133
- reasoning: |
134
- Chosen against the four projects the local server holds on 2026-09-29 (whole-project duplicated lines
135
- 1.6 / 2.1 / 1.7 / 0.0 percent), so new code that meets them is at or below what main already carries.
136
- coverage 100 on the measured logic files, overall and new code (owner 2026-10-01): the unit project already fails below its per-file
137
- 100 threshold on the `ruleParams.be.logicRoles` files of the `coverage: required` slots; Sonar imports the same run's lcov with the same scope, so the dashboard, the slice
138
- verdict and the server gate show the number the runner enforces, file by file. Only the modules' logic counts: business logic
139
- lives there, the feature tier is thin (R203) and proven by integration and e2e, and the front end has no unit tests.
140
- duplication 3: the Sonar way value; the worst project today is 2.1, so 3 rejects a real copy-paste block and
141
- passes ordinary work.
142
- issues 0 at every severity (blocker, critical, major, minor, info), owner ruling 2026-10-22 (no loosening): a lesser severity is not a
143
- lesser finding. The SLICE verdict reads only changed lines and never main's backlog; the overall condition holds the whole project.
144
- A change of any size is held to duplication (ignoreBelowChangedLines 0).
145
- overall issues 0 and overall duplication 3: the server gate is also the owner's definition of done for the HFS canon:
146
- a repository that carries any open ESLint, stylelint or HFS finding is not green, whatever the age of the line. The
147
- op slice keeps judging changed lines (an op cannot fix a repository's whole backlog); the dashboard and CI show the
148
- whole-project condition. Adopting a repository therefore means clearing its imported findings, which `starci app check`,
149
- eslint and stylelint already demand at land.
150
- hotspots 0 unreviewed: a hotspot is a question the author must answer; on changed lines it is answered in the
151
- same slice.