Skip to main content

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 (uv manages dev tooling).
  • Plugin owns methodology; repos stay thin: hb init never copies plugin/ into target repos.
  • Strict startup token discipline: Combined plugin + project always_on context stays <= 3,000 tokens (hard cap 4,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 (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 git+https://github.com/Mr-Fred/harness-builder.git
hb install-plugin
hb doctor .

(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]

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, < 150ms p95): Blocks deletion or tampering of protected files (AGENTS.md, .agents/harness.json, .agents/rules/PROJECT_RULES.md), catastrophic rm, force-push/deletion on protected branches (main, master), oversized README.md writes, unpaired production commits, > 400-line commits, and invalid commit subjects.
  • PostToolUse (post_tool_format.py, 10s timeout): Fail-open runner for configured verification_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 emergency HB_BYPASS_STOP_HOOK=1 escape 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for harness-builder 1.0.0
File Size Uploaded Provenance Actions
harness_builder-1.0.0.tar.gz 75.5 kB Without provenance Details for harness_builder-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for harness-builder 1.0.0
File Interpreter ABI Platform Actions
harness_builder-1.0.0-py3-none-any.whl Python 3 none any Details for harness_builder-1.0.0-py3-none-any.whl

Total release size: 180.9 kB

Release files / harness_builder-1.0.0.tar.gz

Download URL harness_builder-1.0.0.tar.gz
Size 75.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1c0d554d6a0deb40f25850b719d9008c98a7767ef83c61c4c7cd8dd246593b83
BLAKE2b-256 checksum
How to use checksums
0aefa5e2a5c206a4caa99a165eddaa4062d8fa662ef064037907f2b51f2a7048
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / harness_builder-1.0.0-py3-none-any.whl

Download URL harness_builder-1.0.0-py3-none-any.whl
Size 105.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a1bf6ee0df7de3d40357a252d161b77ba951fac622ac81e91a32a38ab3c7589
BLAKE2b-256 checksum
How to use checksums
fd8abf9f4dd1ebaf6b0428fb3f2df1e743a448e41e3399d50d23b7e7a0934dc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for harness-builder 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page