Pattern Enforcement
Critical rules
- Patterns survive only as
'error'lint/type/CI failures — not README suggestions. - Enforce layer boundaries (domain must not import infra), object params, and server/client separation.
- Compiler-level
any/asbans belong instrict-typescript; this skill enforces structure. - Adopt incrementally if needed, but keep rules on so new violations cannot land.
- Before editing ESLint config, read references/eslint-config.md.
Workflow
- Map layers (
domain/infra/api) and client vs server globs. - Add
boundaries(orno-restricted-imports),prefer-object-params, andno-server-imports/no-nodejs-modules. - Set every architectural rule to
'error'. Wire ESLint into CI so failures block merge. - For existing debt, follow references/migration.md (warn → fix → error, or codemod).
- Verify agents and humans get deterministic failures on pattern drift.
Resources
- references/eslint-config.md — boundary/object-param/server rules and starter config. Read when configuring.
- references/migration.md — incremental adoption, AI rationale, rationalizations. Read when remediating.
Validation
- [ ] Directional boundary rules defined and enforced
- [ ]
prefer-object-paramson (off only in tests) - [ ] Server/client separation enforced on client globs
- [ ] Architectural rules are
'error'; CI fails on ESLint errors - [ ] Existing violations have a tracked migration plan
Constraints
- Does not replace teaching a single pattern in depth — load that skill. Does not enforce runtime values (use
validation-boundary). - Related:
strict-typescript,fn-args-deps,config-management,api-design.