Skip to main content

gatehouse

Local AI code review using 8 concurrent Gemini agents. Inspired by diffray's multi-agent architecture and anti-noise prompting.

Install

uv tool install gatehouse-crunchtools

Usage

# Review current branch vs main
gatehouse

# Review staged changes only
gatehouse --staged

# Review against a specific base
gatehouse --base develop

# Run specific agents only
gatehouse --agents bugs,security

# Use a different model
gatehouse --model gemini-2.5-pro

# Advisory mode (never exit non-zero)
gatehouse --advisory

Agents

Agent Focus Blocking
Bug Hunter Null safety, logic errors, edge cases, async bugs, resource leaks Yes (high/critical)
Security Scan Injection, auth bypass, hardcoded secrets, data exposure Yes (always)
Performance Check O(n^2), N+1 queries, memory leaks, blocking I/O Yes (high/critical)
Test Coverage Missing unit/integration tests, untested edge cases and APIs Advisory only
Documentation Missing/stale docstrings, undocumented public APIs Yes (critical/high)
Constitution Violations of project constitution/spec rules Yes (critical/high)
Consistency Check Naming patterns, API consistency, error handling patterns Advisory only
General Review Over-abstraction, unclear naming, hidden dependencies Advisory only

All 8 agents run concurrently. Findings below 80% confidence are filtered out.

How Agents See Changes

Since v0.3.0, agents do not receive raw unified diffs. Each hunk is rendered as a structured view: a BEFORE block (the old code, removed lines marked [-]) and an AFTER block (the new code with real file line numbers, added lines marked [+]), plus instructions to judge the direction of a change. Protections added by a change are treated as fixes, not findings; protections removed by a change are flagged. Diffs that cannot be parsed fall back to the raw unified format.

Exit Codes

Code Meaning
0 No issues or advisory-only findings
1 Blocking findings detected (critical/high)
2 Usage error (missing API key, bad arguments)

GitHub Actions

Drop in examples/gatehouse.yml to review every PR (forks included) via the reusable review.yml workflow — the diff is piped as data, never checked out or executed.

The review is advisory by default: findings post as PR comments and the check always passes, so a non-deterministic LLM finding can never block a merge. Do not mark it a required status check. To let critical/high findings fail the check (still not recommended as a required gate), opt in:

uses: crunchtools/gatehouse/.github/workflows/review.yml@v0.2.0
with:
  blocking: true

Configuration

Set GEMINI_API_KEY environment variable. If .gemini/styleguide.md exists in the reviewed project, it is injected as context.

Constitution Discovery

The Constitution agent auto-discovers a project constitution in priority order:

  1. --constitution <path> (explicit override)
  2. .specify/memory/constitution.md (spec-kit)
  3. AGENTS.md (cross-runtime standard)
  4. CLAUDE.md (Anthropic project instructions)

If no constitution file is found, the agent is silently skipped.

License

AGPL-3.0-or-later

Metadata

Release files for gatehouse-crunchtools 0.7.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 gatehouse-crunchtools 0.7.0
File Size Uploaded Provenance Actions
gatehouse_crunchtools-0.7.0.tar.gz 74.7 kB With provenance Details for gatehouse_crunchtools-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gatehouse-crunchtools 0.7.0
File Interpreter ABI Platform Actions
gatehouse_crunchtools-0.7.0-py3-none-any.whl Python 3 none any Details for gatehouse_crunchtools-0.7.0-py3-none-any.whl

Total release size: 107.8 kB

Release files / gatehouse_crunchtools-0.7.0.tar.gz

Download URL gatehouse_crunchtools-0.7.0.tar.gz
Size 74.7 kB
Tags Source
SHA-256 checksum
How to use checksums
25a5b171dbb243940ea9769dd89320b6233210a675b1a9fad9e57148e61c22e5
BLAKE2b-256 checksum
How to use checksums
482cc3a249a104a97b9f9c44b4b2c069c80f215ee03152ad7ab7e3f94b10b722
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gatehouse_crunchtools-0.7.0-py3-none-any.whl

Download URL gatehouse_crunchtools-0.7.0-py3-none-any.whl
Size 33.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3eab66889ecabdb87eee4ada9a2ab21680aef09f872127a409f2f283320506e4
BLAKE2b-256 checksum
How to use checksums
d067d3ec848effb2f3a6d093f8f975bbd2c5c67da18ebfe3ad18b226dc5feb9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Security for gatehouse-crunchtools 0.7.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gatehouse_crunchtools-0.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

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

0.7.0 This release

2 release files Full 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