Tooling
Tooling overview
Hybrid enforcement model: full graph in CLI, fast feedback in the editor.
DMA validates architecture hybridly: heavy graph audit in the CLI, lightweight per-file hints in linters.
Rules that cannot be checked by a machine eventually stop being followed. That is why the core is npx @derived-modular/cli check, not "set up ESLint and forget."
Two surfaces
| Tool | Where to run | Role |
|---|---|---|
npx @derived-modular/cli check | CI, pre-push | Hard gate: graph, cycles, inbound predicates |
npx @derived-modular/cli doctor | Locally | Soft growth signals (exit 0) |
Agent skill dma | Cursor, Claude Code, … | Placement algorithm and prohibitions for LLMs |
| ESLint / Oxlint / Biome | Editor, lint script | Four file-scoped rules |
Always run npx @derived-modular/cli check in CI. Linters are a speed supplement, not a replacement.
Coverage matrix
| Rule | dma check | dma doctor | ESLint / Oxlint | Biome |
|---|---|---|---|---|
layer-direction | ✓ | — | ✓ | heuristic |
feature-to-feature | ✓ | — | ✓ | heuristic |
public-api | ✓ | — | ✓ | heuristic |
no-barrel | ✓ | — | ✓ | heuristic |
no-cycle | ✓ | — | — | — |
| inbound predicates | ✓ | — | — | — |
| evolution signals | — | ✓ | — | — |
Cycles and "a feature with inbound edges must be a service" are graph properties. A linter sees one file at a time and cannot see the full graph, so these rules live only in the CLI.
Why linters alone are not enough → Why CLI, not linters only.
Packages
| Package | Purpose |
|---|---|
@derived-modular/cli | check + doctor |
@derived-modular/eslint-plugin | ESLint flat config |
@derived-modular/oxlint-plugin | Same rules for Oxlint |
@derived-modular/biome-plugin | GritQL heuristics (weaker) |
@derived-modular/boundaries | Shared path classification for CLI and ESLint |
Skill dma (skills/dma) | Agent skill — not an npm package; npx skills add … --skill dma |
Recommended workflow
- Locally: ESLint (or Biome/Oxlint) on save — catches obvious imports
- Before push:
npx @derived-modular/cli check . - From time to time:
npx @derived-modular/cli doctor .— see what to extract or promote - In CI:
npx @derived-modular/cli check . --format json(or SARIF for GitHub Code Scanning)
What to choose
| Situation | Recommendation |
|---|---|
| Already on ESLint 9+ flat config | @derived-modular/eslint-plugin |
| Biome as unified linter/formatter | @derived-modular/biome-plugin + still run dma check in CI |
| Oxlint for speed | @derived-modular/oxlint-plugin (alpha) |
| CI only, no editor | @derived-modular/cli is enough |