Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

crates.io MIT CI Rust 147 tests

spec_version: 1 status: stable

Platform: macOS & Linux. Windows is not currently supported.

HighHarness

Git brought version control to software.
Docker brought portability to deployment.
Kubernetes brought orchestration.
HighHarness brings governance to AI-generated code.

cargo install highharness

Works with Claude Code Β· Codex Β· Cursor Β· Gemini CLI Β· opencode Β· Aider Β· any MCP client


The story

AI can now write production code.

It cannot prove what it changed.

It cannot prove who changed it.

It cannot prove that nothing was modified afterwards.

It cannot prove that policies were enforced.

Software engineering has version control.

AI engineering needs change control.

HighHarness is that layer.

AI should never directly modify software. AI should propose. The harness should verify. Humans should approve. Repositories should remember.


30-second value proposition

  • Every tool call your agent makes is checked against a default-deny permission policy. No permission file β†’ nothing allowed.
  • Every change is appended to a SHA-256 hash-chained audit log. Tamper with one byte β†’ chain breaks β†’ detected.
  • Every run is recorded as an episode trace with plan, decisions, tool calls, failures, and verification report. Render it as an HTML report with one command.

Quick start β€” 5 commands, 30 seconds

# 1. Install
cargo install highharness

# 2. Initialize the harness (one-time per repo)
HighHarness bootstrap init --human "Your Name"

# 3. Verify the hash chain is intact
HighHarness changelog verify-chain
# β†’ []    (empty array = no broken entries)

# 4. Start the governance server
HighHarness mcp serve-http --port 8931 &

# 5. Connect your agent
opencode mcp add highharness --url http://127.0.0.1:8931

Your agent is now governed. Every tool call is checked, recorded, and hash-chained.


What a session looks like

This is a real session, captured against a fresh HighHarness bootstrap:

# Initialize the harness in a new project
$ HighHarness bootstrap init --human "Demo User"
{
  "schema_version": 1,
  "bootstrapped_at": "2026-07-10T20:08:07Z",
  "bootstrap_human": "Demo User",
  "genesis_hash": "882b6146ec709542315363d5b5a09cdfdb7362bc091253e8a2928c00f6a7f7c4",
  "passed": true
}

# Verify the hash chain β€” empty confirms no tampered entries
$ HighHarness changelog verify-chain
[]

# Inspect the latest changelog entry
$ HighHarness changelog latest
{
  "n": 1,
  "ts": "2026-07-10T20:08:07Z",
  "agent": "highharness/bootstrap",
  "intent": "bootstrap eval: verify compare-and-append against GENESIS",
  "verification": "syntactic",
  "prev_hash": "882b6146ec709542315363d5b5a09cdfdb7362bc091253e8a2928c00f6a7f7c4",
  "this_hash": "ebabb121ade13867e24b3fa26dc66f8c6b383243538ed7888bea1b307ee40b01"
}

# Open an episode to record an agent session
$ HighHarness episode open \
    --run-id "fix-login-timeout-1783715690" \
    --agent-id "claude-code" \
    --task-spec-file task-spec.md \
    --tier trivial \
    --phase highharness
{"run_id": "fix-login-timeout-1783715690"}

# Append the plan to the episode
$ HighHarness episode append \
    --run-id "fix-login-timeout-1783715690" \
    --section "Plan" \
    --body-file plan.md

# Close the episode with verification evidence
$ HighHarness episode close \
    --run-id "fix-login-timeout-1783715690" \
    --verification-json verification.json
889555258c2e1825899500352e81359aab46f2875bc6c5a8042a4178a1e385b3

# Render the episode as a self-contained HTML report
$ HighHarness episode render \
    --run-id "fix-login-timeout-1783715690" \
    --output report.html

The episode trace file at logs/episodes/fix-login-timeout-<ts>.md contains the full story: task spec, plan, tool calls, decisions, failures, verification report, and the SHA-256 episode hash. The HTML report is a self-contained page with syntax-highlighted JSON, gate pass/fail badges, and a dark theme.


Visual episode viewer

Turn any episode into a standalone HTML report:

HighHarness episode render --run-id <ID> [--output <PATH>]

The report is a single self-contained HTML file (no external CSS/JS). It renders all 11 episode sections as styled cards with:

  • Status badge β€” "Closed" (green) or "Open" (orange) based on whether the episode hash is present
  • Gate results β€” Syntactic, Functional, Semantic, Regression with βœ“/βœ— pass/fail indicators
  • JSON syntax highlighting β€” colored keys (green), strings (blue), numbers (purple), booleans (pink)
  • SHA-256 hash display β€” prominently shown at the bottom, styled in a highlighted block
  • Dark theme β€” GitHub-dark aesthetic, easy on the eyes

The HTML report output from a canonical Entry 1 episode (119 lines of Markdown β†’ 211 lines of HTML):

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Episode    2026-06-29T110448Z-add-version-flag...  [Closed] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  TASK SPEC                                              β”‚
β”‚  Add a --version flag to the HighHarness CLI...          β”‚
β”‚                                                          β”‚
β”‚  PLAN                                                    β”‚
β”‚  Decomposition (each atom has its own pass/fail...)       β”‚
β”‚                                                          β”‚
β”‚  TASK STATE LOG                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ timestamp β”‚ subtask                  β”‚ status   β”‚     β”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€     β”‚
β”‚  β”‚ T+00m    β”‚ pre-task checklist...    β”‚ done     β”‚     β”‚
β”‚  β”‚ T+00m    β”‚ episode open             β”‚ done     β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                                          β”‚
β”‚  TOOL CALLS                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ { "tool": "fs.read", "args": {"path":"..."} }    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                          β”‚
β”‚  VERIFICATION REPORT                                     β”‚
β”‚  βœ“ All criteria met                                      β”‚
β”‚  βœ“ Syntactic    βœ“ Functional    βœ“ Semantic    βœ“ Regressionβ”‚
β”‚                                                          β”‚
β”‚  EPISODE HASH                                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ SHA-256: 461aeb7a72547d4447c0b50bebfea0f0e...   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For clients that don't support MCP (or don't need a running server), episode render works on any closed episode in the repository.


Why hash chains matter

Imagine your compliance team asks: "Who changed authentication.py last Tuesday at 3pm?"

HighHarness answers in milliseconds:

$ HighHarness changelog get 7
- run_id:       login-fix-2026-07-01
- agent:        claude-code
- intent:       Fix login timeout
- verification: full
- prev_hash:    52653a7da8f9be91b64992f5d11e297e838f7dd8fb228577ab0db6f021feec64
- this_hash:    f7d71dd1f6a8974b2abbb5ff0c8438b6d156bdd21e0bfb6cdfd8b411d25c2d6f

Now imagine someone edits yesterday's audit log to hide a bad change.

$ HighHarness changelog verify-chain
[3]                        ← entry 3 broken β€” tamper detected

The hash chain is a mathematical invariant, not a policy. It cannot be overridden, bypassed, or ignored. Every entry's this_hash = SHA-256(canonical entry bytes with this_hash blanked). Change one byte β†’ hash changes β†’ next entry's prev_hash doesn't match β†’ detected.

Why SHA-256 chain, not Merkle tree or signed transparency log?

Alternative Trade-off
Merkle tree Needs a separate witness format; compact proofs are useful for large logs but add complexity. A linear chain is simpler and still detects any byte-level tampering immediately.
Transparency log (Rekor / Sigstore) Requires PKI infrastructure, a running witness service, and network access to verify. HighHarness works offline on any laptop with zero external dependencies.
Signed-append-only log Needs key management, key rotation, and online signature verification. A hash chain is self-verifying β€” prev_hash is all the proof you need.

For a governance layer that must work in air-gapped environments, during git bisect, and on a developer's laptop without internet, a linear SHA-256 chain over canonical text is the right trade-off.


Why not just use the agent directly?

Permission engine Audit trail Policy enforcement Runtime neutral
Cursor ❌ Partial ❌ ❌
Claude Code ❌ Limited ❌ ❌
Codex CLI ❌ Limited ❌ ❌
Gemini CLI ❌ Limited ❌ ❌
Git hooks ⚠️ per-repo ❌ ⚠️ bypasable βœ“
CI/CD ❌ pre-merge ❌ pre-merge ⚠️ after-the-fact βœ“
Branch protection ❌ ❌ ⚠️ push only βœ“
HighHarness βœ“ default-deny βœ“ hash-chained βœ“ real-time βœ“

Who is this for / not for

For:

  • Compliance teams that need reproducible proof of what changed, who changed it, and whether policies were enforced
  • Platform engineers wiring AI coding agents into a regulated codebase
  • Security researchers testing guardrails on agent tool access
  • Anyone running an AI agent against production code who wants audit before damage, not after

Not for:

  • A sandbox for running untrusted code (use a container or VM)
  • An LLM output evaluator or prompt guardrail
  • A chat interface or agent framework (use Claude Code, Cursor, or opencode directly β€” HighHarness governs them)
  • A replacement for code review

What you get β€” organized by outcome

πŸ” Trust

Hash-chained audit trail β€” every change appended with SHA-256. Tampering breaks the chain immediately. Compliance teams get proof, not promises.

Threat model β€” HighHarness protects against:

  • βœ“ Malicious or compromised agents
  • βœ“ Accidental destructive edits
  • βœ“ Audit log tampering (hash chain breaks)
  • βœ“ SSRF and path-traversal attacks (web.fetch blocklists private IPs; fs.read resolves paths canonically)
  • ⚠️ Secret leakage (tool-result strings redacted via configurable regex vault; episodes and memory redaction planned)
  • βœ— Does not protect against root access, kernel compromise, or deleted repositories

πŸ“‹ Auditability

Episode traces β€” every run produces the full story: plan, tool calls, decisions, failures, verification report. All in logs/episodes/<run-id>.md with SHA-256 hash. Render any episode as a self-contained HTML report via HighHarness episode render --run-id <ID> [--output report.html].

πŸ›‘οΈ Safety

Permission engine β€” default-deny, priority-sorted rules. Define exactly what each agent can touch. Destructive operations blocked by default.

Verification gates β€” syntactic β†’ functional β†’ semantic β†’ regression. A change passes only when all four pass.

🧠 Memory

Persistent store β€” write, query, pin, forget across sessions. Streams for project, user, and org. Tombstone-based forgetting (never deleted, only marked).

πŸ”„ Verification

4-stage pipeline β€” compile, test, verify intent, check regression. Each stage produces evidence. Pipeline stops at first failure.

πŸ”Œ Interoperability

MCP integration β€” expose the harness as an MCP server (stdio or HTTP). Any MCP client connects. Claude Code, Cursor, opencode, Codex β€” all speak MCP. Connect any agent in two commands:

HighHarness mcp serve-http --port 8931 &
opencode mcp add highharness --url http://127.0.0.1:8931

Design principles

  • Hash chain and episode traces are append-only. Changelog entries and tool-call records are never modified. Memory store uses append + rewrite for pin/forget operations.
  • Everything is reproducible. Same inputs β†’ same hashes.
  • Nothing is trusted. Every tool call is checked against policy. Every entry is verified against the hash chain.
  • Policies are deterministic. Same rules + same inputs β†’ same decision. No LLM-as-judge in the permission path.
  • Verification before mutation. Gates run before changes land.
  • Governance over convenience. The harness is designed to say no when it should.

Commands

Command Description
bootstrap Initialize or verify the harness skeleton and hash chain
changelog Append, get, list, or verify the hash-chained changelog
episode Open, append, close, render episode traces as HTML
gates Run verification gates (syntactic/functional/semantic/regression)
tools Invoke built-in tools (fs.read, fs.edit, shell.exec, web.fetch, git.*, test.run, lint.run)
mcp Start MCP server (stdio or HTTP transport)

See docs/cli-reference.md for all 22 commands with flags, arguments, and usage examples.


Documentation

Configuration

Create .harness/permissions.toml to define what your agent can access:

# Default-deny: anything not explicitly allowed is blocked.
# Rules are evaluated in priority order; first match wins.

[[rules]]
priority = 100
effect = "allow"
paths = ["src/**", "tests/**"]
network = []
description = "Allow source and test file access"

[[rules]]
priority = 200
effect = "deny"
paths = [".git/**", "target/**"]
description = "Never touch build artifacts or git internals"

Tool-specific commands are configured in .harness/config.toml:

lint_cmd = "cargo clippy --all-targets"
test_cmd = "cargo test"

Security defaults (built-in, no config needed):

  • web.fetch blocks private (RFC 1918), loopback, and multicast IP addresses β€” SSRF protection from day one
  • fs.read and fs.edit resolve paths through canonicalize() β€” path-traversal attacks are rejected
  • All tool-result strings are scanned against a configurable regex vault β€” secrets are redacted before they reach the agent

See HARNESS_PRIMITIVES.md for the full spec.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     USER / AGENT LAYER                        β”‚
β”‚  Claude Code Β· Cursor Β· Codex Β· Gemini CLI Β· opencode        β”‚
β”‚                    Any MCP client                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ MCP (JSON-RPC 2.0) stdio / HTTP
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GOVERNANCE LAYER (HighHarness)              β”‚
β”‚                                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Permission       β”‚  β”‚  Episode Recorder               β”‚    β”‚
β”‚  β”‚  Engine           β”‚  β”‚  ──────────────────────         β”‚    β”‚
β”‚  β”‚  ─────────        β”‚  β”‚  tool calls Β· decisions         β”‚    β”‚
β”‚  β”‚  allow/deny/ask   β”‚  β”‚  failures Β· interventions       β”‚    β”‚
β”‚  β”‚  scope-narrow     β”‚  β”‚  verification Β· hash            β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚           β”‚                             β”‚                       β”‚
β”‚           β–Ό                             β–Ό                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚                  Hash Chain                             β”‚    β”‚
│  │  CHANGELOG.agent.md — SHA-256 prev→this chain           │    │
β”‚  β”‚  Tamper with any entry β†’ chain breaks                   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚Store β”‚ β”‚Gates  β”‚ β”‚Tools β”‚ β”‚Report β”‚ β”‚Models  β”‚           β”‚
β”‚  │──────│ │───────│ │──────│ │───────│ │────────│           β”‚
β”‚  β”‚mem   β”‚ β”‚syn.   β”‚ β”‚fs.*  β”‚ β”‚HTML   β”‚ β”‚OpenAI  β”‚           β”‚
β”‚  β”‚ep.   β”‚ β”‚func.  β”‚ β”‚git.* β”‚ β”‚ep.    β”‚ β”‚compat. β”‚           β”‚
β”‚  β”‚cl.   β”‚ β”‚sem.   β”‚ β”‚exec  β”‚ β”‚viewer β”‚ β”‚router  β”‚           β”‚
β”‚  β”‚snap  β”‚ β”‚reg.   β”‚ β”‚web   β”‚ β”‚       β”‚ β”‚        β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚                                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”                    β”‚
β”‚  β”‚MCP   β”‚ β”‚Redact β”‚ β”‚Eval    β”‚ β”‚Metrics  β”‚                    β”‚
β”‚  β”‚serve β”‚ β”‚vault  β”‚ β”‚runner  β”‚ β”‚KPIs     β”‚                    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       DATA LAYER                              β”‚
β”‚  .harness/              logs/               CHANGELOG.agent.md β”‚
β”‚  β”œβ”€β”€ permissions.toml   └── episodes/       (hash-chained     β”‚
β”‚  β”œβ”€β”€ config.toml            β”œβ”€β”€ <run>.md     audit log)        β”‚
β”‚  β”œβ”€β”€ redactions.toml        └── <run>.md                      β”‚
β”‚  └── artifacts/              (episode traces)                 β”‚
β”‚      β”œβ”€β”€ changelog/                                            β”‚
β”‚      β”œβ”€β”€ snapshots/                                            β”‚
β”‚      └── memory/                                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Repository layout

HighHarness/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ bootstrap.rs      # 10-step harness self-validation
β”‚   β”œβ”€β”€ canonical.rs      # SHA-256 canonical serialization
β”‚   β”œβ”€β”€ permissions.rs    # Permission engine (~470 lines)
β”‚   β”œβ”€β”€ gates.rs          # 4-stage verification pipeline
β”‚   β”œβ”€β”€ redaction.rs      # Secret redaction vault
β”‚   β”œβ”€β”€ telemetry.rs      # Integrity log (line-chained JSONL)
β”‚   β”œβ”€β”€ incident.rs       # Incident lifecycle
β”‚   β”œβ”€β”€ metrics.rs        # KPI rollup (11 functions)
β”‚   β”œβ”€β”€ id.rs             # CSPRNG ID generators
β”‚   β”œβ”€β”€ report.rs         # HTML episode viewer (528 lines)
β”‚   β”œβ”€β”€ eval.rs           # Synthetic eval runner
β”‚   β”œβ”€β”€ retrieval.rs      # grep-based filesystem search
β”‚   β”œβ”€β”€ error.rs          # HxError enum (14 variants)
β”‚   β”œβ”€β”€ models/           # Model registry + OpenAI adapter
β”‚   β”œβ”€β”€ mcp/              # MCP server (stdio + HTTP)
β”‚   β”œβ”€β”€ store/            # Episodes, changelog, memory, snapshots
β”‚   β”œβ”€β”€ cli/              # 22 CLI command modules
β”‚   β”œβ”€β”€ schema/           # Serde structs for all artifacts
β”‚   β”œβ”€β”€ tools/            # 10 built-in tool implementations
β”‚   β”œβ”€β”€ lib.rs            # Crate root, re-exports
β”‚   └── main.rs           # Binary entry point
β”œβ”€β”€ .harness/             # Bootstrap, permissions, redactions, tools
β”œβ”€β”€ logs/episodes/        # Episode trace files (.md)
β”œβ”€β”€ CHANGELOG.agent.md    # Hash-chained audit log
β”œβ”€β”€ Formula/              # Homebrew tap formula
β”œβ”€β”€ docs/                 # CLI reference, security policy
β”œβ”€β”€ tests/                # Integration tests (61)
β”œβ”€β”€ scripts/              # Demo fixtures + reproducibility
β”œβ”€β”€ evals/                # Synthetic task fixtures
β”œβ”€β”€ data/                 # Static data
β”œβ”€β”€ Cargo.toml            # 17 dependencies, deterministic feature
β”œβ”€β”€ Makefile              # entry-1-demo, repro, docs targets
β”œβ”€β”€ clippy.toml           # MSRV 1.85
β”œβ”€β”€ rustfmt.toml          # Edition 2021, 100 cols
└── rust-toolchain.toml   # Stable Rust, clippy + rustfmt

Security

HighHarness ships with security built into the governance layer, not bolted on after the fact.

  • Default-deny permission engine β€” no permission file means no tool calls allowed. Every rule is explicit.
  • SSRF protection β€” web.fetch rejects requests to private RFC 1918 IPs, loopback (127.0.0.1), link-local (169.254.x.x), and multicast addresses at the DNS-resolution layer. No opt-in required.
  • Path-traversal prevention β€” fs.read, fs.edit, and all filesystem tools resolve paths through canonicalize() before access. ../../etc/passwd tricks are rejected.
  • Secret redaction β€” tool-result strings are scanned against a configurable regex vault (AWS keys, GitHub PATs, JWTs, PEM blocks, etc.). Matches are replaced with <REDACTED:id> tokens before the agent sees them.
  • Incident response β€” HighHarness incident declare starts a 4-phase workflow (detect, declare, contain, remediate) with structured logging.

See SECURITY.md for the vulnerability disclosure policy and HARNESS_SECURITY.md for the full threat model.


Performance & benchmarks

Metric Value
Test suite 147 tests (86 unit + 61 integration), all passing on main
Rust toolchain MSRV 1.85, edition 2021 (macOS, Linux)
Release profile LTO = thin, codegen-units = 1, symbols stripped
Dependency count 17 direct crates (no web framework, no template engine)
Binary size Rust standard release build (~5 MB)

Benchmark numbers are not yet published. We plan to add criterion-based microbenchmarks for permission lookup (<2 Β΅s per check expected), audit hash append (<10 Β΅s), binary size, and session startup latency.


Roadmap

Shipped

Feature Status
Runtime neutral β€” works with any agent via MCP βœ…
Hash-chained audit trail with SHA-256 βœ…
Permission engine (default-deny, scope narrowing, safety-critical forcing) βœ…
Episode traces with plan, decisions, tool calls, failures, verification, hash βœ…
Memory store with pin/forget/query (project, user, org streams) βœ…
Git snapshots (take/diff/revert) βœ…
Model inference via OpenAI-compatible API βœ…
Published on crates.io (cargo install highharness) βœ…
Visual episode viewer (HTML report with syntax highlighting, gate badges, hash) βœ…
Secret redaction vault (regex pattern scanning) βœ…
Incident lifecycle (declare, list, acknowledge, close) βœ…
KPI rollups (11 metrics with alerts) βœ…
Integrity log (line-chained JSONL with SHA-256) βœ…
Homebrew tap formula βœ…
CLI reference documentation βœ…

Future

Feature
Multi-agent coordination
Enterprise RBAC + SSO
Visual episode timeline (interactive viewer)
Criterion microbenchmarks + published benchmarks
macOS binary bottle for Homebrew
Windows support

Contributing

PRs welcome. See CONTRIBUTING.md for:

  • Development setup (cargo build, test, clippy, fmt)
  • PR workflow and commit message conventions
  • How to add a new tool or subcommand
  • Release process

Status: pre-1.0. API may change. Semantic versioning starts at 1.0.0.


HighHarness is building the infrastructure layer between AI coding agents and production software engineering.

Git brought version control. Docker brought portability. Kubernetes brought orchestration.
HighHarness brings governance to AI-generated code.

cargo install highharness
GitHub Β· crates.io Β· Contributing Β· MIT
MCP guide Β· Engineering spec Β· Primitives spec Β· CLI reference

About

Runtime-neutral agent harness: hash-chained audit trails, permission gates, episode traces, and verification gates for AI coding agents.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages