Skip to content

Feature Overview

Everything blueprint does, with a one-line description for each — click a feature name to see how to use it.

Commands — what you run

  • init — greenfield scaffold — one command scaffolds the whole operating contract: layer folders, config, lint, handbook, agent contracts, import alias
  • init — brownfield authoring — on a repo with code but no config, writes an executable authoring playbook instead of guessing a preset
  • init --agent claude|codex — launches your own agent CLI on that playbook; it derives the config from evidence and iterates until every finding is explainable
  • survey — deterministic repo evidence: folder shapes, the import matrix, package concentration — the raw material for authoring a config
  • inspect — scans the configured architecture.sourceRoot (src/ by default) against the blueprint and lists every violation; any error-level finding exits 1 — gate on it anywhere (a git hook, CI, whatever you run)
  • inspect --baseline — the brownfield ratchet: lock today's debt, fail only on new findings, tighten as debt is paid down
  • impact — dry-run the emitted lint rules through the project's own ESLint: hits per rule, heaviest files named — rule conflicts decided on numbers, before wiring
  • deps — blast radius per module: who gets hit if I change this, plus the fan-in leaderboard
  • rules — the emitted-rule catalog, queryable: what always emits, what needs declaring, metric defaults — annotated with the config's declared tiers
  • doctor — is adoption finished? A read-only checklist: config, no leftover references or authoring artifacts, eslint wired, alias wired, emitted rules alive in the merged config, architecture clean (with its coverage stated), suppressions ledger current
  • doctor — three outcomes — complete / unverified / incomplete: a check that could not run is not one that passed, and since a skip still exits 0, a CI gate reads verdict out of --json
  • All CLI flags — the full flag matrix for every command, including init --preset and --dry-run

Artifacts — what one config compiles into

  • eslint.config.mjsemitLint compiles the layer flow, ownership, and module boundaries into a flat config — embedded plugin included, nothing extra to install
  • docs/architecture-handbook.mdemitHandbook renders the human handbook (mermaid diagram, layer table, playbook) from the same source as the rules — it cannot drift
  • CLAUDE.md / AGENTS.md / …emitAgentFiles distributes one agent contract across Claude, AGENTS.md, Gemini, Copilot, Cursor, and Windsurf — hand-written content survives behind markers

The blueprint — what you declare

  • defineBlueprint — the single source of truth, validated at definition and on every load, so a structural mistake fails with a precise message
  • Layers & one-way flow — ordered layers where each imports only downward; allowedImporters narrows who may import, selfOnly bars re-exporting
  • Ownership — owns — a layer exclusively owns packages, named imports, or globals — every other layer is barred from them
  • Module shapefolder = one feature per folder behind a public entry; flat = the layer is one node (e.g. a Next route tree) — overridable per layer
  • blueprint.rules — rule ids with tiers: the machine-checkable ones become lint gates, the rest land in the handbook and agent contract as judgment
  • Every other config fieldsourceRoot, additionalAliases, naming, lintOverrides, emit.* — one line each, typed in full in the API reference
  • PresetsvuePreset / reactPreset encode the full governance handbook; nextPreset adapts to the App or Pages router, with or without src/

Checks — what gets caught

  • The inspect findings — undeclared folders, flow violations, deep imports, ownership, relative escapes, selfOnly re-exports, cycles, missing entries, missing layers, declaratory selfOnly bans
  • The embedded ESLint rulesrelative-escape, no-deep-watch, use-prefix (+ reactivity), test-filename-matches-source, no-typedef-only-file
  • The three-tier landing — what a machine can check compiles into lint; what needs judgment compiles into the contract — a green lint run is never an architecture verdict

Trust & compatibility

  • Security & trust — no network code, zero runtime dependencies, the two declared child processes (the init install, the opt-in agent launch), read-only checks, writes declared and bounded to the repo root, --dry-run, provenance-signed releases
  • Field-tested setups — what has actually been run: production apps, all five stacks, monorepo model — plus what is unsupported (Nuxt) and why
  • Prior art — how it differs — where blueprint overlaps with import-boundary linters, and what only it compiles from the same source
  • Programmatic API — every emitter and runtime is importable — emitLint in your own eslint config, runInspect / runDeps in your own tooling