Skip to content
Dipen Patel
Data + systems + applied AI
Healthcare data · Since 2014
Harness · Tollgate

A governed harness for Claude Code. Claude proposes, you approve.

Tollgate is my open-source harness for Claude Code. It carries context between sessions, moves each ticket through approved steps, and checks every tool call before and after it runs.

Read the code on GitHub

Three predictable failures, three answers

It forgets between sessions

Context engineering

Every prompt is searched against your notes vault and relevant excerpts are injected. Standards, memory and per-ticket state files load automatically.

It skips steps

A skill chain with gates

Spec, architecture, build and QA are separate roles with defined handoffs. Hooks refuse to start a later step until the earlier one is approved.

It sees or writes what it should not

Guardrail hooks

Patient data, credentials, sensitive paths, writes into the read-only code folder and Databricks row queries are checked before and after each tool call.

How Tollgate works

Every prompt

A request gets retrieved context, goes to Claude with a skill, passes pre-tool checks, the tool runs, the result is scanned, and a human approves before the next step. Blocked actions, scan results and unapproved drafts return to Claude.

  1. Request
  2. Retrieved context
  3. Claude with skill
  4. Pre-tool checks
  5. Tool action
  6. Result scan
  7. Human approval
  8. Next step
How a ticket moves

Ticket, then Spec, then Architecture after approval, then Dev after approval, then QA once validated, then a pull request opened by you once QA passes.

  1. Ticket
  2. Spec
  3. Architecture
  4. Dev
  5. QA
  6. Pull request by you

Each step is a role with a defined handoff. Ticket state is written to the notes vault, so any session picks up where the last one stopped. Every output is a draft; nothing is sent or committed without you.

What you can verify

Hook scripts
25
Hook unit tests
534
Shell tests
23
Installer tests
164
Commands
29

Counts as stated in the project README.

Its limits, stated plainly

  • These are guardrails for a cooperative model, not a sandbox.
  • Patient-data detection is a safety net built from fixed text patterns. It is not de-identification: it misses names with no nearby clue, non-US formats, images, PDFs and anything typed in the chat prompt.
  • A hook that cannot start blocks the action only on Claude Code 2.1.295 or newer.
  • Approvals are plain status lines a model can write, so check approval lines yourself. The commit and push check can be bypassed by indirection.