@by-association-only/harness
The agent harness from BAO's unisian-next, for any Vite+ repo: a rulebook for coding agents, lint and prose lint that fail on the shortcuts agents take, git and Claude Code hooks that agents can't skip, and a browser driver so an agent proves a change the way its user sees it.
Set up a repo
The repo needs pnpm and Vite+ (vite-plus and a vite.config.ts).
pnpm add -DE @by-association-only/harness
pnpm exec harness init
Then open the repo in Claude Code and run /harness-setup. The skill reads the repo and fills each part of AGENTS.md that only the repo can answer, with you, until pnpm check and pnpm test pass.
After a bump of the package, pnpm exec harness rulebook --update brings its text in AGENTS.md, the docs and the skills up to date. It rewrites only the text between <!-- harness:begin --> and <!-- harness:end --> markers, so the repo's own text stays as it is.
Init also sets the repo up for Ultimate in .ultimate/; its README.md there says what each file does. A repo that ran init before 0.7.0 gets the .ultimate/ files from harness rulebook --update, except .ultimate/automations/ci-watch/, which a second harness init copies, skipping every file the repo already has.
pnpm exec harness init github --yes adds the issue labels, merge-commit-only merges and branch protection on the default branch. Without --yes it prints the calls and runs none.
What you get
| Command | What it does |
|---|---|
harness init | Copies the rulebook, docs, skills, git hooks and CI into the repo, and wires the Claude Code hooks to run from the package; never overwrites |
harness rulebook --check | Fails when a block of harness text in the repo differs from the installed package; --update rewrites the blocks and nothing outside them |
harness green-tree run <script> | Runs <script>:steps, skipping it when it already passed on this exact tree |
harness worktree <branch> | Makes a worktree for an agent; --done <branch> cleans up a merged one |
harness second-opinion "<q>" | Asks a fresh, read-only agent for a pick before an agent asks you |
harness ci-watch | Prints a FIRE line for each failed Actions run on the default branch; Ultimate's .ultimate/automations/ci-watch runs it |
harness sighting <message file> | Refuses a commit whose Sighting: <slug> trailer git log already holds, until it stages the rule or tool; commit-msg runs it |
harness verify <command> | Drives the product in a real browser and writes evidence |
harness vendor-agent-sources | Clones pinned upstream sources so agents read them, not their memory |
harness pins --check | Fails when docs/pins.md and the installed versions disagree |
harness peers | Lists public repos that pin at least two of the prerelease lines in docs/pins.md, marking those missing from the repo's roster |
prose-lint | Fails on AI-slop prose an agent writes in docs, skills and commit messages |
The lint plugins load from @by-association-only/harness/lint; spread harnessLint into vite.config.ts.