View v1 design
Open source · npm: agentharness-toolkit

Portable engineering policies for coding agents.

Git, testing, logging, and language conventions written once and referenced everywhere — instead of re-authored (and drifting) in every project's own CLAUDE.md. One source of truth for the rules your coding agents follow, across every project you run them in.

Status: early — see the repo's MANIFEST.md for what exists today and ROADMAP.md for what's planned.

The problem

Why not just CLAUDE.md?

One project's conventions work fine — until the second project quietly diverges, and the third, and the fourth.

A single project's CLAUDE.md works fine — until there's a second project, and its CLAUDE.md quietly diverges: a different coverage bar, a branch-naming rule that contradicts the first repo's, a logging convention nobody remembers deciding. Multiply by N projects and the conventions aren't really policies anymore — just N independent guesses that happen to overlap.

agentharness fixes that specific problem: one CLAUDE.md router plus a set of skills and convention docs that every project's own (short) CLAUDE.md references. You still write a project-specific CLAUDE.md; it just stops being where the shared rules live.

Before — copy-pasted and drifted
<!-- project-a/CLAUDE.md -->
## Testing
Aim for 80% coverage. Use pytest.
Don't mock the database.

<!-- project-b/CLAUDE.md, six months later -->
## Testing
Try to keep coverage reasonable
(70%+ ok for now). pytest preferred.
After — one source, referenced
<!-- both projects, identical -->
## Testing
See agentharness's
patterns/testing/COVERAGE_REQUIREMENTS.md
for the coverage bar by rigor tier.
This project is Production tier.
Governance

What makes it different.

Most agent configuration is advisory. agentharness layers in three governance mechanisms most coding-agent setups lack.

Opt-in publish authority

Agents verify and stage work locally, then stop and ask before pushing, opening a PR, or auto-implementing a recommendation. Full remote-write authority requires an explicit flag file or per-task instruction — work that's only staged locally is never "complete."

Enforced completion gate

Before an agent can declare done, it runs a completion check verifying lint, types, tests, coverage, and content quality in one shot. A Stop hook enforces it — the agent cannot end its session until the gate exits 0.

Review & merge mandates

Merging on CI green alone is not enough. The mandate requires fetching issue-level and inline PR comments, verifying each finding against current code, fixing what's real, and replying to every comment — closing the "agent silently ignored review feedback" failure class.

Client support

One harness, every major agent.

Built for and dogfooded in Claude Code; also tested with Codex CLI, Gemini CLI, and GitHub Copilot.

Generators produce an always-on routing file plus an Agent-Skills-standard skill index for every major agentic coding tool:

Platform Always-on file Status
Claude CodeCLAUDE.md✅ built + dogfooded
Codex CLIAGENTS.md✅ built + tested
OpenCode / ZedAGENTS.md⚠️ passively covered
Gemini CLI / AntigravityGEMINI.md✅ built + tested
GitHub Copilot.github/copilot-instructions.md✅ built + tested
Kilo Code.kilo/rules/agentharness.md✅ built, not live-tested
Cursor.cursor/rules/agentharness-router.mdc✅ built, not live-tested
No telemetry No background processes Linux & macOS Symlink / copy / submodule / npm modes
Quick start

Two commands to a governed project.

The lifecycle CLI covers init, plan, status, doctor, audit, update, and uninstall.

Via npm — no separate clone step:

npx agentharness-toolkit init /path/to/your-project

Or via git clone:

git clone https://github.com/andr-ca/agentharness.git ~/agentharness
~/agentharness/tools/setup/harness-link.sh init /path/to/your-project

Preview without changing anything with --dry-run (or run plan instead of init), and verify afterward with doctor. Opt into the trunk-protection git hook with --with-hook, or a generated coverage-enforcing pre-push hook with --with-coverage-hook.