Built for the Flip the Switch hackathon (WeMakeDevs × Switch AI). Demo: https://youtu.be/uioe7InEN9Q · Code: https://github.com/Gbangbolaoluwagbemiga/gatehouse
The judge was never the hard part
Coding agents made pull requests almost free to produce, and maintainers now wade through plausible-looking slop: a README full stop that "closes" a smart-contract bug, a personal notes file, an empty diff.
Some projects already put an AI judge in front of the queue. My earlier project, PatchBond, does exactly that: a stranger's PR carries a small refundable bond, and a model running in a trusted execution environment signs one of three verdicts: refund, forfeit or needs_human.
Watching it run taught me the uncomfortable part. The judge works. The team doesn't:
- Nobody watches the doubtful cases. A needs_human verdict sits on a web page until its 72-hour review window runs out.
- Nobody checks the verdict is real. Was it actually signed by the model, or is it just text on a page?
- There's no record of who decided what. When money taken from a stranger is at stake, that isn't acceptable.
- Contributors have nobody to ask why their PR is being forfeited.
I didn't need another dashboard. Maintainers already live in a chat, so the work had to happen there.
Gatehouse: two agents in the maintainers' Telegram
Switch turns a Slack, Teams, Discord or Telegram channel into a room where people and coding agents work together. Gatehouse is one Switch template that puts two Claude Code agents into the maintainers' group:
- The desk runs the queue. Say "I'm on rota" and it records you. Say "triage" and it posts every case that needs a person, with its deadline and verdict link, @mentioning whoever is on rota. Say "forfeit civicledger#61, it only adds a full stop to a README heading" and it records the decision.
- The auditor trusts nothing the desk says. It re-runs six signature checks offline on every verdict: the request and response hashes, the model, the recovered signer, the verdict inside the signed response, and the published hash. It replies ✓ 6/6 in the thread. In my demo it also noticed that two verdicts were signed by a different key, and handed that to a person instead of calling them verified.
A separate help room lets contributors ask "why was my PR forfeited?" The desk answers from the signed verdict and passes disputes to the maintainers' room through a linked room. It never records a decision there.
The rule I care most about: two keys
The AI proposes, and a person decides. gatehouse decide refuses to record anything unless the signature still passes every check at that moment, and it refuses anyone who isn't on the maintainers list. Each decision is appended to a hash-chained ledger, so editing an old entry breaks every hash after it, and the auditor re-walks the chain after every decision.
The agents hold no keys and move no money. The bond only moves when the maintainer signs on the verdict page with their own wallet.
What Switch made easy
-
One YAML template, two agents. Each agent runs in its own folder of the repo with a
CLAUDE.mdbrief. The folder is the permission boundary: the agent gets exactly one CLI and nothing else. -
addressingper agent. Anyone can talk to the desk, but the auditor only answers the desk and its owner, so a stranger can't steer the checker. -
Roles and room documents. The desk holds the
triage-deskrole and keeps a Triage Board document current; the auditor keeps an Audit Log. A maintainer catches up by reading one document instead of scrolling. - Linked rooms. A dispute in the public help room lands in the private maintainers' room, tagged to whoever is on rota.
- The visible trace. Telegram shows "Worked for 29s" with every command the agent ran. For a team deciding about money, seeing which command produced an answer is what builds trust.
What I'd tell a first-time Switch user
- Start with Switch Console and switch-buddy. It sets up the server and the Telegram connection.
- A template can't create a Telegram group. Create the group, add your bot, then have agents join it as a room parameter.
- Restart agents after changing their instructions. Running sessions keep the old brief.
- Make your tools print chat-sized text. Agents relay what they get, so a 2-line output becomes a 2-line message.
-
Make the agents check each other. A second agent with fewer permissions, whose only job is to doubt the first, cost me one folder and one
CLAUDE.md.
Try it
Clone https://github.com/Gbangbolaoluwagbemiga/gatehouse, then deploy switch/gatehouse.template.yaml from Switch Console with your maintainers' room. In that room, type @gatehouse-desk triage.
Watch the 3-minute demo, recorded live in Telegram: https://youtu.be/uioe7InEN9Q
Top comments (0)