Harness
Overview

Harness Engineering

The harness is what separates "generic AI output" from "code that fits your project."

πŸ’‘

Without harness: "Here's a React component" (generic)

With harness: "Here's a functional component using your design tokens, following your naming convention, tested against your business rules"

Setup

Harness is generated automatically during npx buildcrew:

npx buildcrew
# Step 3: Generate project harness? (Y/n) β†’ scans your codebase
# Step 4: Pick additional templates

Or generate separately:

npx buildcrew init

Open Directory

.claude/harness/ is an open directory. Not limited to templates.

.claude/harness/
β”œβ”€β”€ project.md          ← core (auto by init)
β”œβ”€β”€ rules.md            ← core (auto by init)
β”œβ”€β”€ erd.md              ← template
β”œβ”€β”€ architecture.md     ← template
β”œβ”€β”€ design-system.md    ← template
β”œβ”€β”€ my-custom-notes.md  ← your own file
└── anything.md         ← agents read it all

Agent Routing

The orchestrator routes the right harness files to the right agents:

FileRouted to
project.md, rules.mdAll agents
erd.md, architecture.md, api-spec.mddeveloper, reviewer, security-auditor, investigator
design-system.mddesigner, design-reviewer
glossary.md, user-flow.mdplanner, designer, browser-qa, canary-monitor
env-vars.mddeveloper, security-auditor
ALL filesreviewer, security-auditor, thinker, architect, qa-auditor

Managing

npx buildcrew harness          # Show status
npx buildcrew add              # List templates
npx buildcrew add erd          # Add template
npx buildcrew init --force     # Regenerate core files (backs up existing)

When to Update

  • Stack changes β†’ architecture.md
  • New DB table β†’ erd.md
  • New business rule β†’ project.md or glossary.md
  • Bad pattern found β†’ rules.md "What to avoid"
  • New API β†’ api-spec.md