All Recipes

Harness Configurator: stack → tools and DoD

An interactive tool of the Harness Engineering series: pick a stack (JS/TS, Python, Java/Kotlin, Go, PHP) and get a personal setup. A role → tool table (boundary linter, dead code, strict types, cycles, security, pre-commit), a Definition of Done checklist across all rollout phases (0→8), and ready copy/download artifacts for your stack: an AGENTS.md skeleton, a pre-commit config and an ExecPlan template. The role is universal, the tool is an example to choose and pin once in an ADR. Stack-agnostic.

IntermediateAI DevOps15 minAGENTS.md, pre-commit, ExecPlan, ADR, CI
1

The role is universal, the tool fits the stack

The whole Harness Engineering series describes not tools but ROLES: 'module-boundary linter', 'dead-code finder', 'strict types'. That's deliberate — a role is the same on any stack, while the concrete tool inside it differs. This keeps the guide untied to one language, and any team plugs in its own. The configurator materializes this: it takes the abstract roles from the rollout plan and assembles a concrete setup for the chosen stack. It's essentially an interactive version of the environment.md from Phase 0 (the audit) — the very tool-selection table every later phase leans on. Except here it also hands you ready artifacts on the spot. Keep one thing in mind from the start: the tool in a cell is an example to choose, not the law. You make the final choice yourself and pin it once in ADR 0001-tool-selection.

🟦 Role (universal)

  • Module-boundary linter
  • Dead-code finder
  • Strict types
  • The same on any stack

🟩 Tool (per stack, in an ADR)

  • dependency-cruiser · import-linter · ArchUnit · deptrac
  • knip · vulture · deadcode · Psalm
  • tsc · mypy · PHPStan · compiler
  • Pick one and pin it in an ADR
The configurator doesn't replace Phase 0. If the project already exists (brownfield), audit first: which roles you actually need and what's already wired in. The configurator is great as a starter set and as a way not to forget any role.
2

Assemble your setup: pick a stack

Below is the configurator itself. Pick a stack at the top, then three tabs. 'Tools' — a role → concrete-tool table for your stack with a short reason why the role matters and a phase tag (a Phase 3 barrier or a Phase 5 GC check). 'DoD by phase' — a compact Definition of Done checklist across every rollout phase from 0 (audit) to 8 (scaling out): it shows what must be done at each step. 'Templates' — ready artifacts for the chosen stack: an AGENTS.md skeleton with the sensors already filled in, a pre-commit config and an ExecPlan template. Each can be copied or downloaded as a file. Switch the stack and the table and templates rebuild for it. This is the 'pick your bet → get a ready setup for your stack' from the series funnel.

Harness Configurator

STACK → SETUP

Pick a stack — get a personal setup: a role → tool table, a per-phase Definition of Done checklist, and ready artifacts (AGENTS.md, pre-commit, ExecPlan) you can copy or download. The role is universal, the tool is an example to choose; you pin it once in an ADR.

RoleToolPhase
Formatter
one style, zero review bikeshedding
Prettier · BiomePhase 3 · barriers
General-purpose linter
common bugs and anti-patterns
ESLint · BiomePhase 3 · barriers
Module-boundary linter
dependency direction, no bypassing the public API
dependency-cruiser · eslint-plugin-boundariesPhase 3 · barriers
Strict types
environment legibility — the agent improvises less
tsc --strictPhase 3 · barriers
Dependency cycles
cycles erode the boundaries the architecture rests on
madgePhase 3 · barriers
Dead-code finder
orphan code the agent starts 'fixing'
knip · ts-prunePhase 5 · GC
Security / dependency scanner
CVEs and dependency drift
npm audit · osv-scannerPhase 5 · GC
Pre-commit orchestrator
the enforcement point before commit (CI repeats on full)
husky + lint-stagedPhase 3 · barriers

Tools are examples to choose from, not the law. Pick one per role for your project and pin it in ADR 0001-tool-selection. lefthook and pre-commit (framework) are stack-agnostic and work as an orchestrator anywhere.

The templates are skeletons, not finished truth. AGENTS.md has placeholders (what the project does, where the domain lives) you must fill by hand: a machine can't guess your project's context.
3

Don't hunt for 'one tool for everything'

The main selection mistake is to grab one popular tool and declare it the law of the universe. Each role has its own class of bugs, closed by a separate barrier. ESLint doesn't catch import cycles the way madge does; tsc doesn't replace a boundary linter. So the table is a set of separate roles, not a 'one-tool setup'. Second rule: pick a role by the class of bugs you actually need to catch, not by hype. If the repo has no import cycles, don't drag in madge for show: an empty barrier only slows the build and gets disabled fast. One real role with a configured tool beats seven proposed 'for later'. And whatever no off-the-shelf tool covers (your own project rule — 'no infra imports in the domain layer') you close with a custom check script in the same pre-commit + CI combo.

Tool-selection discipline

One role — one tool, the choice pinned in an ADR
A role is taken for a real class of bugs, not "for later"
What no off-the-shelf tool covers → a custom check script
One popular tool as the "law of the universe"
An empty barrier for a dashboard checkmark
Pin every row of the table in an ADR with a rationale. Otherwise the next agent installs a second tool into the same role a month later — and you get two diverging barriers that quietly conflict.
4

Artifacts: skeletons that get enforced

The 'Templates' tab gives three artifacts, and each is a working draft, not theory. The AGENTS.md skeleton already has a sensors section with the stack's tools filled in, working rules, a Definition of Done and the retrieve rule for the lessons-ledger — you just fill the placeholders about the project itself. The pre-commit config shows the combo: formatter, linter, boundaries and a type-check on the diff. The ExecPlan template is for tasks longer than a working day. The key nuance baked into the templates: barriers are enforced mechanically, not 'by discipline'. pre-commit runs on the diff (fast, before the commit), and CI repeats it all on the full base — bypassing with --no-verify won't work. And about tests in the DoD: no coverage mandate (that's Goodhart — the agent writes fake tests for the number). Instead, test-integrity: the agent may not weaken, delete or skip existing tests, and that's checked by diff in CI. Coverage is a health signal, not a target.
Picked a stack
Filled the placeholders
pre-commit (diff)
can't bypass
CI (full base)
# AGENTS.md — sensors section (auto-filled from the matrix for your stack)
## Sensors (Definition of Done — all must be green)
- boundaries: <module-boundary linter>     # e.g. dependency-cruiser / import-linter
- types:      <strict type checker>         # e.g. tsc --strict / mypy --strict
- dead code:  <dead-code finder>            # e.g. knip / vulture
- tests green; test-integrity — do NOT weaken / delete / skip existing tests
  (checked by diff in CI). Coverage is a SIGNAL, not a target.
Enforcement: <pre-commit orchestrator> on commit (diff), CI on the full base.
Download the artifacts straight into a fresh repo and wire up pre-commit immediately. A barrier that exists but isn't hooked in is a convention: it rests on the agent's memory, not on mechanics.
5

The funnel: mode → stack → setup

The configurator is the last link in the series funnel. First, at the entrance, you pick a development mode (A / B / B+ / C) — how much AI the project even needs. If it's B+ or C (the agent writes code, a harness is needed), you come here, pick a stack and get a ready setup: which barriers to set, what counts as done per phase, and which files to start from. Then follow the series map: phase by phase, from the audit to scaling out. The configurator doesn't build the harness for you — it removes the pause of 'which tool closes this role on my stack' and 'where do I even start'. The real work — configuring barriers, describing layers, accumulating lessons — you do via the phase recipes. Head back to the hub for the full map and the rollout order.
Mode (A/B/B+/C)
B+ / C → harness needed
Stack → configurator
Phases 0→8 via recipes
If the project's mode is A or B (human leads, AI only speeds up typing), the full configurator setup is overkill. Take the light part: an ADR for tool choices, a DoD and a couple of barriers — without the whole machinery.

Result

The configurator turns the harness's abstract roles into a concrete setup for your stack: a role → tool table, a Definition of Done checklist across all phases, and copy/download artifacts (AGENTS.md, pre-commit, ExecPlan). You understand that the role is universal while the tool is chosen per stack and pinned in an ADR; that barriers must be enforced mechanically (pre-commit + CI), and tests rest on test-integrity, not a coverage mandate. This is the last link in the series funnel: mode → stack → setup. Next: phases 0→8 via the recipes in the hub.