@starci/eslint-canon-fe 8.4.39 → 8.4.40

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 (54) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +6 -0
  3. package/callback-shape.mjs +1 -13
  4. package/docs/grammar-boundary.md +25 -1
  5. package/docs/surface-rules.md +41 -0
  6. package/grammar-boundary.mjs +112 -0
  7. package/hooks-folder.mjs +9 -3
  8. package/icon.mjs +31 -1
  9. package/index.mjs +4 -0
  10. package/lib/bindings.mjs +15 -0
  11. package/lib/config.mjs +1 -0
  12. package/lib/fe-stack.mjs +8 -4
  13. package/lib/scope.mjs +2 -2
  14. package/lib/typed-class-values.mjs +72 -0
  15. package/lib/why.mjs +17 -2
  16. package/lint-escape-hatch.mjs +2 -2
  17. package/menu-entries.mjs +133 -0
  18. package/package.json +1 -1
  19. package/runtime/knowledge/hfs/canon-pins.yaml +65 -9
  20. package/runtime/knowledge/hfs/fe-stack.yaml +23 -5
  21. package/runtime/knowledge/hfs/slots.yaml +110 -52
  22. package/runtime/knowledge/sonar-gate.yaml +1 -1
  23. package/runtime/modules/kernel/removed-vocabulary.yaml +62 -0
  24. package/runtime/modules/models/registry.yaml +3 -1
  25. package/runtime/modules/models/runtimes.yaml +2 -0
  26. package/runtime/scripts/api/git/ls-tree.mjs +5 -0
  27. package/runtime/scripts/api/git/show.mjs +6 -0
  28. package/runtime/scripts/hfs/architecture/dead-exports.mjs +10 -10
  29. package/runtime/scripts/hfs/architecture/function-spec-providers.mjs +1 -1
  30. package/runtime/scripts/hfs/architecture/operation-contract-roots.mjs +53 -0
  31. package/runtime/scripts/hfs/architecture/reachability.mjs +1 -1
  32. package/runtime/scripts/hfs/architecture/sql-owner.mjs +17 -6
  33. package/runtime/scripts/hfs/architecture/sql-token-forms.mjs +105 -0
  34. package/runtime/scripts/hfs/architecture/sql-tokens.mjs +38 -52
  35. package/runtime/scripts/hfs/architecture/supabase-keys.mjs +261 -0
  36. package/runtime/scripts/hfs/architecture/transport-owner.mjs +49 -3
  37. package/runtime/scripts/hfs/declaration-shape.mjs +4 -4
  38. package/runtime/scripts/hfs/declaration-slots.mjs +12 -3
  39. package/runtime/scripts/hfs/manifest-shape.mjs +10 -6
  40. package/runtime/scripts/hfs/rule-params-shape.mjs +16 -6
  41. package/runtime/scripts/hfs/rules/database-constants.mjs +26 -0
  42. package/runtime/scripts/hfs/rules/database-migrations.mjs +489 -0
  43. package/runtime/scripts/hfs/slot-side-problems.mjs +2 -2
  44. package/runtime/scripts/hfs/slots.mjs +1 -0
  45. package/runtime/scripts/hfs/view.mjs +2 -1
  46. package/runtime/scripts/lib/in-order.mjs +71 -0
  47. package/runtime/scripts/lib/language.mjs +94 -1
  48. package/runtime/scripts/lib/package-at.mjs +62 -0
  49. package/runtime/scripts/lib/same-text.mjs +5 -0
  50. package/runtime/scripts/lib/ts-analysis.mjs +10 -0
  51. package/size-and-state-budget.mjs +3 -3
  52. package/surface-rules.mjs +230 -0
  53. package/swr-family.mjs +136 -7
  54. package/transport.mjs +2 -1
@@ -0,0 +1,133 @@
1
+ /**
2
+ * The menu entries a product hands to Grammar's `DropdownMenu`.
3
+ *
4
+ * HeroUI colours a destructive menu item through its `danger` variant, which Grammar exposes as `tone: "danger"`. An entry the app
5
+ * forgets to tone reads like any other command: sign out and delete sit beside "Settings" in the same ink, and the one click that
6
+ * cannot be taken back gets no mark. The decision is the entry's meaning, so it is checked where the entry is written: an entry whose
7
+ * id or label says it signs out, deletes, removes, leaves or revokes carries `tone: "danger"`.
8
+ *
9
+ * The terms are this canon's own list, English and Vietnamese. They are compared as whole words after the text is lower-cased, split
10
+ * at `-`, `_` and camelCase, and stripped of diacritics (the Vietnamese for "sign out" with its tone marks is `dang xuat`), so `signOut`, `sign-out`,
11
+ * `Sign out` and the tone-marked Vietnamese spelling are one term.
12
+ *
13
+ * WHERE IT LOOKS. A menu entry is an object literal in the `entries` attribute of a `DropdownMenu`, or in a declaration typed as
14
+ * `DropdownMenuEntry`, `DropdownMenuItem` or `DropdownMenuSection` (an array of them too), including the `items` of a section and the
15
+ * `submenu` of an item. Anything it cannot see through (a spread, a call) it leaves alone: the rule refuses to guess.
16
+ */
17
+
18
+ import { stringOf } from "./lib/ast.mjs"
19
+ import { isProductSource } from "./lib/scope.mjs"
20
+
21
+ /** The English terms of a destructive entry. */
22
+ const DESTRUCTIVE_TERMS_EN = Object.freeze([
23
+ "sign out", "log out", "logout", "signout",
24
+ "delete", "remove", "erase", "destroy", "discard", "purge",
25
+ "leave workspace", "leave team", "leave group", "leave organization", "leave project", "leave channel", "leave course", "revoke", "deactivate", "disconnect", "unlink", "unsubscribe", "terminate",
26
+ "close account", "cancel subscription", "cancel plan",
27
+ ])
28
+
29
+ /** The Vietnamese terms, written without diacritics (the text is compared after the diacritics are stripped). */
30
+ const DESTRUCTIVE_TERMS_VI = Object.freeze([
31
+ "dang xuat", "xoa", "xoa bo", "go bo", "loai bo", "roi khoi", "roi nhom", "thu hoi",
32
+ "vo hieu hoa", "ngat ket noi", "huy dang ky", "huy goi", "cham dut", "dong tai khoan",
33
+ ])
34
+
35
+ /** A destructive term as a whole word or phrase of the normalized text. */
36
+ const DESTRUCTIVE_PATTERN = new RegExp(String.raw`(?:^|\s)(?:${[...DESTRUCTIVE_TERMS_EN, ...DESTRUCTIVE_TERMS_VI].map((term) => term.replaceAll(" ", String.raw`\s+`)).join("|")})(?=\s|$)`)
37
+
38
+ /** The text lower-cased, split at separators and camelCase, with diacritics stripped. */
39
+ export const normalizeText = (text) =>
40
+ text
41
+ .replaceAll(/([a-z0-9])([A-Z])/g, "$1 $2")
42
+ .replaceAll(/[-_./:]+/g, " ")
43
+ .toLowerCase()
44
+ .replaceAll("\u0111", "d")
45
+ .normalize("NFD")
46
+ .replaceAll(/\p{M}+/gu, "")
47
+ .replaceAll(/\s+/g, " ")
48
+ .trim()
49
+
50
+ /** True when the id or label text names a destructive command. */
51
+ export const isDestructiveText = (text) => DESTRUCTIVE_PATTERN.test(normalizeText(text))
52
+
53
+ const MENU_TYPES = new Set(["DropdownMenuEntry", "DropdownMenuItem", "DropdownMenuSection"])
54
+
55
+ /** The value node of the property called `name` in an object literal, or null. */
56
+ const propertyValue = (object, name) =>
57
+ object.properties.find((entry) => entry.type === "Property" && !entry.computed && (entry.key.name === name || entry.key.value === name))?.value ?? null
58
+
59
+ /** The element type of an array type (`T[]`, `readonly T[]`, `ReadonlyArray<T>`), else the type itself. */
60
+ const elementTypeOf = (type) => {
61
+ if (type.type === "TSTypeOperator") return elementTypeOf(type.typeAnnotation)
62
+ if (type.type === "TSArrayType") return type.elementType
63
+ const isArrayName = type.type === "TSTypeReference" && type.typeName.type === "Identifier" && (type.typeName.name === "ReadonlyArray" || type.typeName.name === "Array")
64
+ return isArrayName ? (type.typeArguments ?? type.typeParameters)?.params[0] ?? type : type
65
+ }
66
+
67
+ /** True when the type annotation names a menu entry type or an array of one. */
68
+ const isMenuType = (annotation) => {
69
+ const type = annotation?.typeAnnotation
70
+ if (!type) return false
71
+ const element = elementTypeOf(type)
72
+ return element.type === "TSTypeReference" && element.typeName.type === "Identifier" && MENU_TYPES.has(element.typeName.name)
73
+ }
74
+
75
+ /** Report an entry (an object literal), then walk the `items` of a section and the `submenu` of an item. */
76
+ function visitEntries(node, report) {
77
+ if (!node) return
78
+ if (node.type === "ArrayExpression") {
79
+ for (const element of node.elements) visitEntries(element, report)
80
+ return
81
+ }
82
+ if (node.type === "TSAsExpression" || node.type === "TSSatisfiesExpression") {
83
+ visitEntries(node.expression, report)
84
+ return
85
+ }
86
+ if (node.type !== "ObjectExpression") return
87
+ const kind = stringOf(propertyValue(node, "kind"))
88
+ if (kind === "section") {
89
+ visitEntries(propertyValue(node, "items"), report)
90
+ return
91
+ }
92
+ const text = [stringOf(propertyValue(node, "id")), stringOf(propertyValue(node, "label"))].filter((value) => value !== null)
93
+ const tone = propertyValue(node, "tone")
94
+ const toned = tone !== null && (stringOf(tone) === "danger" || stringOf(tone) === null)
95
+ if (!toned && text.some(isDestructiveText)) report(node, text.find(isDestructiveText))
96
+ visitEntries(propertyValue(node, "submenu"), report)
97
+ }
98
+
99
+ /** A destructive menu entry carries `tone: "danger"`. */
100
+ export const destructiveMenuEntryNeedsDangerTone = {
101
+ meta: {
102
+ type: "problem",
103
+ docs: { description: "A menu entry whose id or label signs out, deletes, removes, leaves or revokes carries `tone: \"danger\"`." },
104
+ schema: [],
105
+ messages: {
106
+ tone:
107
+ "The menu entry `{{text}}` is destructive but has no `tone: \"danger\"`. HeroUI colours the label and glyph of a danger item so the one click that cannot be taken back is marked; without the tone it reads like \"Settings\". Add `tone: \"danger\"` to the entry.",
108
+ },
109
+ },
110
+ create(context) {
111
+ if (!isProductSource(context)) return {}
112
+ const report = (node, text) => context.report({ node, messageId: "tone", data: { text } })
113
+ return {
114
+ JSXAttribute(node) {
115
+ if (node.name.type !== "JSXIdentifier" || node.name.name !== "entries") return
116
+ const element = node.parent?.name
117
+ if (element?.type !== "JSXIdentifier" || element.name !== "DropdownMenu") return
118
+ visitEntries(node.value?.type === "JSXExpressionContainer" ? node.value.expression : null, report)
119
+ },
120
+ VariableDeclarator(node) {
121
+ if (isMenuType(node.id.typeAnnotation)) visitEntries(node.init, report)
122
+ },
123
+ }
124
+ },
125
+ }
126
+
127
+ /** The rules this law contributes to the plugin. */
128
+ export const rules = {
129
+ "destructive-menu-entry-needs-danger-tone": destructiveMenuEntryNeedsDangerTone,
130
+ }
131
+
132
+ /** Every rule is an error. */
133
+ export const recommended = Object.fromEntries(Object.keys(rules).map((name) => [`starci-fe/${name}`, "error"]))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-canon-fe",
3
- "version": "8.4.39",
3
+ "version": "8.4.40",
4
4
  "description": "The StarCi front-end lint canon: every rule its laws publish, gathered as one flat-config plugin and attached by one factory.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  schema: starci/canon-pins@1
2
2
  purpose: >-
3
- The exact version of every dependency a StarCi product repository pins. One version per dependency for the whole
3
+ The exact version of every shared dependency in the StarCi family, including package-owned runtime dependencies. One version per dependency for the whole
4
4
  family. Raising a version is a change to this file first (with the package bump when it is a @starci package),
5
5
  then the repositories' own upgrade lane (each sets the exact version and reinstalls; nothing else installs a @starci package). Read on 2026-09-29 from the packages under
6
6
  .claude/packages and from the installed node_modules of the six product repositories; where they disagreed the
@@ -10,7 +10,8 @@ purpose: >-
10
10
  two, pinned here with a why (2026-10-01: every such conflict but graphql was already pinned). The runtime's example apps
11
11
  merged the same way on 2026-10-01: no dependency outside this file was declared at two versions across their sides, so
12
12
  every choice is a pin (each side's older @starci pins and graphql moved to the version here). `side` names the side whose code uses
13
- the dependency; the app root package.json carries the pins of both.
13
+ the dependency; the app root package.json declares the direct dependencies and tools its sides need. Package-owned
14
+ runtime dependencies are declared by their package, not by the app.
14
15
  pins:
15
16
  # --- @starci packages. Every @starci package is a PUBLISHED npm package (install: registry): a product repository
16
17
  # installs the exact pinned version from the npm registry in the root and every workspace package.json, never `file:`.
@@ -22,28 +23,28 @@ pins:
22
23
  source: packages/heroicons/package.json
23
24
  why: 'StarCi custom Heroicons-compatible cuts; eslint-canon-fe (icon.mjs) admits @starci/heroicons/24/outline and /16/solid as icon sources, so an app that uses them gets this exact version.'
24
25
  '@starci/grammar':
25
- version: 0.11.0
26
+ version: 0.12.0
26
27
  group: starci
27
28
  install: registry
28
29
  side: fe
29
30
  source: packages/grammar/package.json
30
31
  why: 'the grammar front ends read: the brand layer sets `--font-sans` and `--font-mono` and the grammar reads them; it carries the Input tel kind, the copyable and read-only Input, the IconButton disclosure props and count badge, ChatBubble, FillViewport, Textarea mentions and Enter-to-send, the leading PrimaryRailLayout rail, the plate-less Image, ListRow, the soft Alert, Progress steps, the floating primary IconButton, FlowGraph, the STATE-8 loading views and the bordered selectable TagGroup chips. The runtime source version wins for a @starci package.'
31
32
  '@starci/eslint-canon-be':
32
- version: 3.4.40
33
+ version: 3.4.41
33
34
  group: starci
34
35
  install: registry
35
36
  side: be
36
37
  source: packages/eslint/be/package.json
37
38
  why: 'the back-end ESLint canon: `loadHfs(import.meta.url)` of be/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the be side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; `starciBeConfig({ hfs: loadHfs(import.meta.url) })` is the typed factory and the BE-CONVENTION laws are its rules.'
38
39
  '@starci/eslint-canon-fe':
39
- version: 8.4.39
40
+ version: 8.4.40
40
41
  group: starci
41
42
  install: registry
42
43
  side: fe
43
44
  source: packages/eslint/fe/package.json
44
45
  why: 'the front-end ESLint canon: `loadHfs(import.meta.url)` of fe/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the fe side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; the front end has no tests (FE_NO_TESTS R97 in hfs) and no-vietnamese-in-source (R91) applies.'
45
46
  '@starci/stylelint-canon':
46
- version: 2.0.10
47
+ version: 2.0.11
47
48
  group: starci
48
49
  install: registry
49
50
  side: fe
@@ -62,7 +63,7 @@ pins:
62
63
  side: both
63
64
  source: packages/prettier-config/package.json
64
65
  '@starci/jest-preset':
65
- version: 2.3.5
66
+ version: 2.3.6
66
67
  group: starci
67
68
  install: registry
68
69
  side: be
@@ -76,14 +77,14 @@ pins:
76
77
  source: packages/test-world/package.json
77
78
  why: 'the shared e2e library of every back end (R47, R48), a devDependency of every back end: the warm stack behind toxiproxy, the network-edge fakes, the Nest boot, the typed useTestWorld handle, useSandbox for contract specs and the outage lock. Kafka is real own infra (the one digest-pinned apache/kafka KRaft image, a broker listener and proxy per slot, slot-prefixed topics, consumer groups and client ids) and Postgres is schema-per-context (a schema and a login role per context in a shared database). Each worker has its own data slot (<ns>_w<k>) with its own databases, Keycloak realm, leased Redis DB, bucket/collection/topic prefixes, fakes host, toxiproxy proxies and outage lock; a run provisions min(jest workers, workers cap, default 2) slots, and state file protocol 2 pairs exactly with @starci/jest-preset (TEST_WORLD_PAIR_MISMATCH otherwise). A modules world boots real peer apps beside its modules, world.apps.<name>.during(fn) is the outage of a peer app, w.keycloak.clientSecret(client) answers the run-generated secret of a confidential realm client, world.keycloak.events/sessions read the realm user events and live sessions, world.infra.postgresql.connection(name) takes one database connection down while the others serve, and world.resolve and scope.resolve take any Nest token. Every path a declaration names (`stack`, seeds, the realm, Dockerfiles) resolves from the app root (the directory of hfs.json); the globalSetup registers the path aliases as TypeScript resolves them. Its CLI main is exported at ./cli for starci app stack.'
78
79
  '@starci/cli':
79
- version: 1.7.32
80
+ version: 1.7.33
80
81
  group: starci
81
82
  install: registry
82
83
  side: both
83
84
  source: packages/cli/package.json
84
85
  why: 'the only StarCi command package; product repositories install it for starci app, while @starci/hfs remains its pinned transitive implementation.'
85
86
  '@starci/hfs':
86
- version: 4.7.32
87
+ version: 4.7.33
87
88
  group: starci
88
89
  install: registry
89
90
  side: both
@@ -238,6 +239,11 @@ pins:
238
239
  group: framework
239
240
  side: be
240
241
  why: 'the Postgres driver behind TypeORM; the reference app declares ^8.12.0 and resolves 8.23.1.'
242
+ bullmq:
243
+ version: 6.3.11
244
+ group: framework
245
+ side: be
246
+ why: 'the queue transport of both editions behind platform/queue (ruling:R212/case-10); starci app add queue|job declares it in a lite app together with its Redis, and both example apps resolve this version.'
241
247
  reflect-metadata:
242
248
  version: 0.2.2
243
249
  group: framework
@@ -305,6 +311,11 @@ pins:
305
311
  group: framework
306
312
  side: fe
307
313
  why: 'the GraphQL client of every front end (fe-stack graphql): auth and no-auth clients with the link chain in modules/api/graphql; version read from the starci-academy package-lock on 2026-10-13.'
314
+ graphql-ws:
315
+ version: 6.2.1
316
+ group: framework
317
+ side: both
318
+ why: 'the subscription transport: the front end opens it only in the Apollo clients folder (fe-stack graphql, GraphQLWsLink of @apollo/client/link/subscriptions) and the back end serves it only from platform/realtime; the version resolved by the full-app lockfile on 2026-10-24.'
308
319
  '@graphql-codegen/cli':
309
320
  version: 7.4.6
310
321
  group: tooling
@@ -370,6 +381,16 @@ pins:
370
381
  group: ui
371
382
  side: fe
372
383
  why: 'the base of the one application icon set (fe-stack icons, with @starci/heroicons for the glyphs it lacks); eslint-canon-fe (icon.mjs) admits @heroicons/react/24/outline and /16/solid.'
384
+ '@dicebear/core':
385
+ version: 10.4.0
386
+ group: ui
387
+ side: fe
388
+ why: 'runtime dependency of @starci/grammar for its seeded circle avatars; apps use the Avatar seed prop and never declare or import @dicebear/*; pinned with @dicebear/styles.'
389
+ '@dicebear/styles':
390
+ version: 10.4.0
391
+ group: ui
392
+ side: fe
393
+ why: 'runtime dependency of @starci/grammar supplying its fixed avatar DNA style; apps use the Avatar seed prop and never declare or import @dicebear/*; pinned with @dicebear/core.'
373
394
  'next-themes':
374
395
  version: 0.4.6
375
396
  group: ui
@@ -481,6 +502,16 @@ pins:
481
502
  group: framework
482
503
  side: be
483
504
  why: 'the Apollo driver of @nestjs/graphql; the full-app resolution on 2026-10-13. Stays on 13.x with @nestjs/graphql (accepted advisory, major deferred to alpha.19).'
505
+ '@aws-sdk/client-s3':
506
+ version: 3.1150.0
507
+ group: framework
508
+ side: be
509
+ why: 'the S3 transport of integrations/object-storage, the one ObjectStorage adapter of both editions (MinIO, S3, Spaces, Supabase Storage); 3.1150.0 is the release of 2026-10-12, chosen over newer ones that had not aged two weeks.'
510
+ '@aws-sdk/s3-request-presigner':
511
+ version: 3.1150.0
512
+ group: framework
513
+ side: be
514
+ why: 'signs the presigned PUT and GET of integrations/object-storage locally, the same release as client-s3.'
484
515
  '@apollo/server':
485
516
  version: 5.5.1
486
517
  group: framework
@@ -496,6 +527,31 @@ pins:
496
527
  group: framework
497
528
  side: be
498
529
  why: 'the socket.io platform of @nestjs/websockets; the @nestjs/core pin line.'
530
+ socket.io:
531
+ version: 4.8.3
532
+ group: framework
533
+ side: be
534
+ why: 'the socket.io server the IoAdapter of platform/realtime builds (types and the adapter contract); the exact version @nestjs/platform-socket.io 11.2.5 depends on, so the workspace keeps one copy (4.8.4 is the latest on 2026-10-24).'
535
+ '@socket.io/postgres-adapter':
536
+ version: 0.5.0
537
+ group: framework
538
+ side: be
539
+ why: 'the stateless socket.io adapter of a back end without Redis that runs several api replicas (LISTEN/NOTIFY, no sticky sessions, websocket only), imported only by platform/realtime (knowledge/patterns/be/realtime.yaml BE-REALTIME-7); the latest registry version on 2026-10-24.'
540
+ '@socket.io/redis-adapter':
541
+ version: 8.3.0
542
+ group: framework
543
+ side: be
544
+ why: 'the sharded Redis adapter (createShardedAdapter, Redis 7 or later) of a back end with Redis declared that runs several api replicas, imported only by platform/realtime; the latest registry version on 2026-10-24.'
545
+ ioredis:
546
+ version: 5.11.1
547
+ group: framework
548
+ side: be
549
+ why: 'the one Redis client of a back end: the cache, the optional peer bullmq loads for the queue of platform/queue, and the Redis hub and sharded socket.io adapter of platform/realtime (its docs recommend ioredis over redis); the latest 5.x on 2026-10-24, because typeorm 0.3.31 declares ioredis ^5.0.4 as a peer and ioredis 6.0.0 (the latest) does not satisfy it.'
550
+ '@types/pg':
551
+ version: 8.23.1
552
+ group: framework
553
+ side: be
554
+ why: 'the types of the pg driver the Postgres hub of platform/realtime opens a LISTEN connection with; the pg pin line, the latest registry version on 2026-10-24.'
499
555
  '@as-integrations/express5':
500
556
  version: 1.1.2
501
557
  group: framework
@@ -19,7 +19,14 @@ concerns:
19
19
  home: [fe.modules.api, fe.transport.client, fe.transport.outcome]
20
20
  pattern: FE-API-GRAPHQL
21
21
  forbids: [urql, graphql-request, '@urql/core', graphql-hooks, apollo-boost]
22
- why: one file per operation under modules/api/graphql/{queries,mutations}, run by the auth or no-auth Apollo client with the link chain.
22
+ why: one file per operation under modules/api/graphql/{queries,mutations,subscriptions}, run by the auth or no-auth Apollo client with the link chain.
23
+ - id: graphql-subscriptions
24
+ tier: opt
25
+ packages: [graphql-ws]
26
+ home: [fe.transport.client, fe.package.api.client]
27
+ pattern: FE-REALTIME
28
+ forbids: []
29
+ why: the subscription transport of a GraphQL subscription door (be.feature.realtime.graphql); only the Apollo clients folder imports it (GraphQLWsLink of @apollo/client/link/subscriptions), a subscription operation runs on that client and a useSubscribe hook of hooks/swr reads it.
23
30
  - id: codegen
24
31
  tier: core
25
32
  packages: ['@graphql-codegen/cli', '@graphql-codegen/client-preset']
@@ -74,8 +81,8 @@ concerns:
74
81
  packages: [socket.io-client, eventemitter2]
75
82
  home: [fe.hooks.socketio]
76
83
  pattern: FE-REALTIME
77
- forbids: [graphql-ws, subscriptions-transport-ws, '@supabase/realtime-js', pusher-js, ably]
78
- why: one socket.io-client singleton per namespace and one side-effect component that dispatches to redux and SWR; lite runs the gateway in the be api process. A one-way channel served as server-sent events needs no package, only a fetch reader in modules/api/sse and a use<Channel>Stream hook (FE-REALTIME).
84
+ forbids: [subscriptions-transport-ws, '@supabase/realtime-js', pusher-js, ably]
85
+ why: one socket.io-client singleton per namespace and one side-effect component that dispatches to redux and SWR; both editions run the gateway in the be api process. A one-way channel served as server-sent events needs no package, only a stream reader in modules/api/sse/clients, a stream operation in modules/api/sse and a useSubscribe<Channel>Swr hook (FE-REALTIME).
79
86
  - id: auth
80
87
  tier: core
81
88
  packages: []
@@ -89,7 +96,7 @@ concerns:
89
96
  home: [fe.modules.i18n]
90
97
  pattern: FE-I18N
91
98
  forbids: [i18next, react-i18next, next-i18next, react-intl, '@lingui/react']
92
- why: useTranslations for copy and the next-intl formatter for numbers, dates and currency.
99
+ why: useTranslations for copy and the next-intl formatter for numbers, fixed dates and currency; FE-DATE owns live time display.
93
100
  - id: ui
94
101
  tier: core
95
102
  packages: ['@heroui/react', '@heroui/styles', tailwindcss, '@starci/grammar']
@@ -107,6 +114,17 @@ concerns:
107
114
  one application icon set, the heroicons family (owner ruling 2026-10-13), on the 24/outline and 16/solid cuts. @heroicons/react
108
115
  is the base set and is used first; @starci/heroicons holds only the glyphs heroicons lacks (brand or domain glyphs drawn in
109
116
  heroicons style), never duplicates a heroicons glyph, and a missing glyph is added to it.
117
+ - id: avatar-illustration
118
+ tier: opt
119
+ packages: ['@starci/grammar']
120
+ home: [fe.components]
121
+ pattern: FE-UI
122
+ forbids: ['@dicebear/*', boring-avatars, 'react-nice-avatar', multiavatar]
123
+ why: >-
124
+ Grammar owns circle avatars: pass the uploaded avatar as src, otherwise pass the user or identity id as seed on
125
+ Avatar, AvatarButton or AvatarGroup members. Grammar renders deterministic DiceBear images with its fixed DNA style;
126
+ @dicebear/core and @dicebear/styles are Grammar runtime dependencies pinned in canon-pins.yaml. Apps declare and
127
+ import @starci/grammar, never @dicebear/*, and draw no avatar visuals. With neither src nor seed, initials remain.
110
128
  - id: theme
111
129
  tier: core
112
130
  packages: [next-themes]
@@ -127,7 +145,7 @@ concerns:
127
145
  home: [fe.modules]
128
146
  pattern: FE-DATE
129
147
  forbids: [moment, moment-timezone, date-fns, luxon]
130
- why: dayjs (modules/dayjs) for date math and parsing; display through the next-intl formatter.
148
+ why: FE-DATE owns application date math, fixed date formatting and Grammar's live time display.
131
149
  - id: numbers
132
150
  tier: opt
133
151
  packages: [decimal.js]