Context
Injection tokens were string or symbol constants chosen per package (gap B20). The owner’s answer (mem L546, 2026-10-20) picksdefineToken<T>() and a define* family. On 2026-10-20 the owner also set the declaration rule: decorators annotate code, and
define* functions create values. definePermissions is one of those values. Separately, the owner banned container-backed global
helpers and kept plain utilities (mem L548, L555).
Decision
- Tokens.
defineToken<T>()returns a typed, namespacedSymbol.forvalue. Class tokens are allowed. String tokens are not. Tokens are values, not authored concepts (0094 is clarified). - The define family.
define*functions create values, and decorators annotate code. The family is:defineToken,defineConfig,definePermissions,defineEvents,defineMeters,defineEntitlements,defineSkillanddefinePrompts.definePermissionsbuilds the one permission value each module declares; the catalogue is in 0132. - Helpers.
app(),config()andlogger()are banned everywhere. Dependencies come by injection. - Utilities. Pure utilities (
Str,Arr,Num,DateTime) are plain imported functions, with no injection. - Stateful code. Anything stateful, such as config, the logger or the clock in testable code, is injected.
- The forRoot table of audit 3.3 is folded into 0143.
Consequences
- Code that calls
app()orconfig()fails review. A migration is needed where it exists. - Tests replace injected dependencies, not globals.
- Every
define*value has one name in the family, so a reader finds the value by the verb.
Enforcement
planned —packages/tooling/oxlint/boundaries.jsonc bans the app, config and logger helper imports. The token and define
family rules have no check yet.
Alternatives
- String tokens: rejected by the owner.
- A
@Permissionsclass with nodefinePermissionsvalue: rejected, the define rule applies.
Supersedes and sources
Supersedes: none. Amends: 0094 decision 1, 0005 decisions 2 and 4, 0084 (support row). Sources: owner answers B20 (stackra-decisions-2026-10-19.md L546),
Q10 (L548), the clarified utility rule (L555), and the owner’s declaration rule and define family (2026-10-20). Contradiction C-04 is
resolved: definePermissions is in the family.