From architect
Generate hard enforcement tooling (ESLint, Ruff, golangci-lint, dependency-cruiser, pre-commit, arch tests, CI) from SDL
npx claudepluginhub navraj007in/architecture-cowork-plugin --plugin architectThis skill uses the workspace's default tool permissions.
Turns advisory coding rules into **hard gates** — linters, module boundary checks, architecture tests, pre-commit hooks, and CI workflows. All configs are derived deterministically from the SDL document.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Turns advisory coding rules into hard gates — linters, module boundary checks, architecture tests, pre-commit hooks, and CI workflows. All configs are derived deterministically from the SDL document.
Input: SDL document (via artifacts.generate including coding-rules-enforcement)
Output: Language-specific linter configs, dependency-cruiser rules, pre-commit hooks, architecture tests, CI workflow
API: POST /api/sdl/generate with artifactType: "coding-rules-enforcement" (no dedicated route)
The generator inspects architecture.projects.backend[] and frontend[] frameworks to determine which configs to produce:
| Framework | Language | Configs Generated |
|---|---|---|
nodejs | TypeScript | ESLint, dependency-cruiser, arch tests |
nextjs, react, vue, angular, svelte | TypeScript | ESLint (with React hooks/a11y if applicable) |
python-fastapi | Python | Ruff + Mypy config |
go | Go | golangci-lint config |
java-spring | Java | ArchUnit tests |
dotnet-8 | C# | NetArchTest tests |
| File | Language | Purpose |
|---|---|---|
.eslintrc.sdl.js | TypeScript/JS | Custom ESLint rules from SDL architecture |
pyproject.sdl.toml | Python | Ruff lint + Mypy strict + pytest coverage config |
.golangci.sdl.yml | Go | 16+ linters with complexity limits |
.dependency-cruiser.sdl.cjs | TypeScript/JS | Module boundary enforcement (modular-monolith/microservices) |
.lintstagedrc.sdl.json | All | Pre-commit hook command mapping |
.husky/pre-commit | All | Git pre-commit hook script |
__tests__/architecture.sdl.test.ts | TypeScript | Architecture conformance tests |
src/test/java/architecture/ArchitectureTest.java | Java | ArchUnit architecture tests |
tests/Architecture.Tests/ArchitectureTests.cs | .NET | NetArchTest architecture tests |
.github/workflows/enforce-architecture.yml | All | CI gate workflow |
20+ rules enforced:
@typescript-eslint/no-explicit-any: error — no any typemax-params: 3 — max function parametersno-console: error (allow warn) — no console.log in productionno-var, prefer-const — modern variable declarationsno-magic-numbers: warn — avoid unlabeled constantsmax-depth: 3 — max nesting depthmax-lines: 500 — max file sizemax-lines-per-function: 50 — max function length@typescript-eslint/consistent-type-imports — type-only importsimport/no-cycle — no circular importsimport/order — enforced import ordering@typescript-eslint/naming-convention — camelCase functions, PascalCase types, UPPER_CASE enums@typescript-eslint/no-floating-promises — no unhandled promisesno-await-in-loop: warn — avoid sequential async in loops@typescript-eslint/no-unused-vars — no dead codeReact-specific (when frontend uses React/Next.js):
react-hooks/rules-of-hooks — hook call rulesreact-hooks/exhaustive-deps — dependency arraysjsx-a11y/* — accessibility rules (alt-text, valid anchors, key events, labels)Generated when architecture.style is modular-monolith or microservices:
| Rule | Severity | What It Prevents |
|---|---|---|
no-circular | error | Circular dependencies |
no-cross-module-internals | error | Importing another module's internal files (only .interface.ts and .types.ts allowed) |
no-db-in-routes | error | Routes importing database directly |
no-repository-in-routes | error | Routes bypassing services to access repositories |
shared-no-module-imports | error | Shared utilities depending on business modules |
orm-only-in-repositories-{name} | error | ORM package imported outside repository files |
__tests__/architecture.sdl.test.ts)testing.coverage.targetArchitectureTest.java with ArchUnit)ArchitectureTests.cs with NetArchTest).github/workflows/enforce-architecture.yml)Runs on PR to main/develop and push to main. Jobs by language:
| Job | Steps |
|---|---|
lint-typescript | npm ci → ESLint → dependency-cruiser → architecture tests |
lint-python | pip install → ruff check → ruff format → mypy → pytest with coverage |
lint-go | golangci-lint → go test with coverage threshold |
lint-java | mvnw verify (includes ArchUnit) |
lint-dotnet | dotnet restore → dotnet test Architecture.Tests |
commit-lint | commitlint (conventional commits) |
| SDL Section | What It Controls |
|---|---|
architecture.projects.backend[].framework | Which language configs to generate |
architecture.projects.frontend[].framework | React hooks/a11y rules, TypeScript linting |
architecture.style | Enables dependency-cruiser module boundary rules |
architecture.services[] | Module names for cross-module import restrictions |
architecture.projects.backend[].orm | ORM-specific import restrictions |
testing.coverage.target | Coverage enforcement threshold in CI |
| Aspect | coding-rules | coding-rules-enforcement |
|---|---|---|
| Output | CLAUDE.md, .cursorrules, copilot-instructions.md | ESLint, Ruff, golangci-lint, tests, CI |
| Enforcement | Advisory (AI tool reads them) | Hard gates (CI blocks violations) |
| Scope | 27+ categories of architecture rules | Linting, boundaries, secrets, coverage |
| When | Always useful | When team needs CI-level enforcement |
Both are triggered via artifacts.generate in SDL. Use coding-rules alone for AI-guided development, add coding-rules-enforcement for automated CI gates.