harness-builder
Personal, open-source, vendor-neutral AI Agent Engineering Harness for Google
Antigravity (agy IDE & CLI).
harness-builder keeps methodology in a single globally installed Antigravity
plugin while keeping scaffolded repositories thin, deterministic, and strictly
within startup token budgets.
Architecture
harness-builder/
├── plugin/ # Installable Antigravity plugin (rules, 11 skills, 4 subagents, templates, hooks)
└── src/harness_builder/ # Pure Python 3.11+ stdlib-only CLI (`hb`)
├── core/ # Functional core (schema, frontmatter, token budget, design lint, plan, drift, repo detector)
├── adapters/ # Imperative shell (git, safe fs, repo scanner, scaffolder, doctor)
└── cli.py # Thin argparse entrypoint (`hb`)
- Zero runtime dependencies: Python 3.11+ standard library only (
uvmanages dev tooling). - Plugin owns methodology; repos stay thin:
hb initnever copiesplugin/into target repos. - Strict startup token discipline: Combined plugin + project
always_oncontext stays<= 3,000tokens (hard cap4,500). Detailed project docs (.agents/PROJECT_STRUCTURE.md,.agents/DEPENDENCIES.md,.agents/RULES.md,.agents/GETTING_STARTED.md) load strictly on demand.
Quickstart
1. Install Globally (Zero git clone Required)
Install the hb CLI from PyPI (with plugin/ bundled inside the wheel) and
register the Antigravity plugin once on your machine—never clone
harness-builder inside your project repositories:
uv tool install harness-builder
hb install-plugin
hb doctor .
(Install from main directly via uv tool install git+https://github.com/Mr-Fred/harness-builder.git, or for local contributor development run uv sync --dev && uv tool install -e . && hb install-plugin.)
2. Onboard a New (Greenfield) or Existing (Brownfield) Repository
harness-builder uses a 2-Stage Hybrid Bootstrap — deterministic offline
scaffolding via hb init followed by optional agentic hydration via
/hb-bootstrap inside Antigravity:
# Preview every CREATE / MERGE / SKIP action without touching disk
hb init --mode auto --dry-run /path/to/repo
# Scaffold safely (merges managed block into existing AGENTS.md; never clobbers CLAUDE.md, .cursorrules, GEMINI.md, or docs/)
hb init --mode auto /path/to/repo
For existing repositories, open the repo in Antigravity and run /hb-bootstrap
to hydrate .agents/PROJECT_STRUCTURE.md, .agents/DEPENDENCIES.md,
.agents/rules/PROJECT_RULES.md, and .agents/GETTING_STARTED.md, verify
detected test/lint commands, and confirm hb check . passes with startup tokens
<= 3,000.
3-Tier, 4-Stage SDLC Loop
| Tier | Blast Radius | Required Workflow |
|---|---|---|
| Tier 1 (Surgical) | <= 100 LOC, single module or bugfix |
Direct edit + paired test + Stop verification. Zero ceremony. |
| Tier 2 (Feature / Refactor) | 100–400 LOC |
/hb-design (brief, <= 750 words) → /hb-plan → /hb-build → /hb-ship (hb drift + fresh-context zero-trust-verifier). |
| Tier 3 (Architecture / Epic) | > 400 LOC, new subsystem, schema, or API |
/hb-design (full, <= 1,800 words + 4-lens design-gauntlet) → /hb-plan --scorecard → iterative /hb-build → /hb-ship (hb drift --mode strict). |
CLI Command Reference (hb)
hb install-plugin [--plugin-dir <dir>] [--dry-run] [--json]
hb init [--name <name>] [--mode auto|new|existing] [--stack python,ts,go,rust] [--docs-dir docs] [--dry-run] [--force] [dir]
hb check [--strict] [--plugin-dir ./plugin] [--json] [dir]
hb visualize [--plugin-dir ./plugin] [--json] [dir]
hb design-lint [--tier brief|full] [--json] <design.md>
hb plan [--scorecard] --out-dir <dir> [--json] <design.md>
hb drift [--mode advisory|strict|blocking] [--json] <design.md> <src_dir>
hb doctor [--strict] [--json] [dir]
hb drift modes: advisory always exits 0; blocking exits 1 on error
findings (missing_symbol, signature_mismatch, protected_file_missing);
strict exits 1 on any error or unspec_public_symbol warning.
Lifecycle Hooks & Safety Guards (plugin/hooks/)
All hooks run isolated via python3 -I -B with zero non-stdlib imports, zero
shell=True, explicit subprocess timeouts, and fail-open behavior on malformed
inputs or timeouts:
PreToolUse(pre_tool_guard.py,< 150msp95): Blocks deletion or tampering of protected files (AGENTS.md,.agents/harness.json,.agents/rules/PROJECT_RULES.md), catastrophicrm, force-push/deletion on protected branches (main,master), oversizedREADME.mdwrites, unpaired production commits,> 400-line commits, and invalid commit subjects.PostToolUse(post_tool_format.py, 10s timeout): Fail-open runner for configuredverification_loop.format_commands.Stop(verify_stop.py, 60s timeout): Runs configured test and lint commands when uncommitted changes exist, backed by a persistent atomic circuit breaker (~/.cache/harness-builder/state/<conversation_id>.json) and an emergencyHB_BYPASS_STOP_HOOK=1escape hatch.
Development & Verification
uv run pytest tests/unit tests/hooks tests/e2e -v
uv run ruff check src tests plugin/hooks
uv run mypy --strict src
agy plugin validate --strict ./plugin
hb check . && hb doctor .
Metadata
Release files for harness-builder 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| harness_builder-1.0.1.tar.gz | 74.2 kB | Without provenance | Details for harness_builder-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| harness_builder-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for harness_builder-1.0.1-py3-none-any.whl |
Total release size: 178.3 kB
Release files / harness_builder-1.0.1.tar.gz
| Download URL | harness_builder-1.0.1.tar.gz |
|---|---|
| Size | 74.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48bc044a92c2f3bc4d5fffcdf349e51bd6c50a2c1ddc9a3842fae6666e547c47
|
|
BLAKE2b-256 checksum How to use checksums |
56d339c9655b2d1aca36ff0e7109e08c19db90947555f110e48c33d22c9ab457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / harness_builder-1.0.1-py3-none-any.whl
| Download URL | harness_builder-1.0.1-py3-none-any.whl |
|---|---|
| Size | 104.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
822c363eebdd7c9e29a7c5739eb98eb69bd96e88b007edebfff2038981084d16
|
|
BLAKE2b-256 checksum How to use checksums |
f549e781ec5dc03dfef3bbe6397eed8b2ae2119514306dd7b83a762d6e96c796
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for harness-builder 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.