Agent Skills: Pattern Enforcement

>-

UncategorizedID: jagreehal/jagreehal-claude-skills/pattern-enforcement

Install this agent skill to your local

pnpm dlx add-skill https://github.com/jagreehal/jagreehal-claude-skills/tree/HEAD/skills/pattern-enforcement

Skill Files

Browse the full folder contents for pattern-enforcement.

Download Skill

Loading file tree…

skills/pattern-enforcement/SKILL.md

Skill Metadata

Name
pattern-enforcement
Description
>-

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/as bans belong in strict-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

  1. Map layers (domain / infra / api) and client vs server globs.
  2. Add boundaries (or no-restricted-imports), prefer-object-params, and no-server-imports / no-nodejs-modules.
  3. Set every architectural rule to 'error'. Wire ESLint into CI so failures block merge.
  4. For existing debt, follow references/migration.md (warn → fix → error, or codemod).
  5. Verify agents and humans get deterministic failures on pattern drift.

Resources

Validation

  • [ ] Directional boundary rules defined and enforced
  • [ ] prefer-object-params on (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.