The Ai–Hi Bridge
AI builds, people operate. This draft splits software work into two sides that meet at one crossing point: an Ai side where AI agents write and test with people supervising, and a Hi side where people run what reaches the public with AI assisting. Code crosses one way, people check it in parallel before release, and checks keep running after it ships. GOVW Foundation calls it the Ai –| |– Hi Bridge and follows it for its own sites.
1Goals
- Use AI as far as the risk is measured: agents do most of the building and testing, at their own pace.
- Protect people as far as the cost allows: nothing an AI agent writes reaches the public until people have checked it.
- Keep a fault on one side: a mistake or a compromised agent on the Ai side can't reach production on its own.
- Leave a record: every change says who wrote it, who checked it and who released it.
Not a goal: keeping AI away from operations. AI assists on the Hi side too; it just doesn't hold the keys there.
2Two sides
| Ai side | Hi side | |
|---|---|---|
| Who leads | AI agents, people supervising | People, AI assisting |
| What happens | Writing code, tests, static checks, reviews | Staging, human checks, release, running the service |
| Repository | Its own repository | A separate repository that builds production |
| Production access | None | People only |
| Secrets | None that open production | Held by people, in a secrets store |
- An AI agent on the Ai side MUST NOT hold credentials that can change production, read production data, or send messages to the public.
- A person who wants to change code SHOULD make the change on the Ai side too, so every change takes the same path. Edits made directly on the Hi side are for emergencies, and are carried back to the Ai side afterwards.
- AI that only checks public sites from outside (a monitoring crawler) MAY run fully automated, following Disclosing Monitoring Bots.
3One crossing point
The two sides meet at a single, named crossing point, the Synapse. Everything that crosses goes through it, and it keeps a record.
- Changes (code, and values for approved scripts) cross Ai to Hi only, as a handoff a person starts (section 5).
- An outside AI process gets a public process card (what it may do, written as a state diagram) and a scoped, short-lived token checked at the Synapse. Operational details stay on the Hi side, not in files given to the AI.
- Reports (test results, alerts) MAY cross Hi to Ai so agents can fix what failed. They MUST NOT carry personal data, secrets, or text typed by the public; text from the public is shown as described in A Little Picture Quietly.
4The pipeline
Everything that crosses from the Ai side to the Hi side goes through the same six stages. Each kind of change applies them with its own tools; a failure at any gate sends the change back to the start.
flowchart LR
BUILD[Ai build] --> AICHECK[Ai checks] --> XREPO[X-REPO handoff]
XREPO --> GATES[Hi gates: verification, testing, security checks]
GATES --> RELEASE[Release]
RELEASE --> CV[Continuous verification]
GATES -. fails .-> BUILD
| Stage | Code | Scripts that change live systems |
|---|---|---|
| Ai build | AiDEV: agents (and people) write the change on a feature branch | The agent fills in values for an approved template |
| Ai checks | AiQA (automated tests) and AiSAST (static security testing) | A dry run against a copy of the target |
| X-REPO handoff (Synapse) | A person moves the reviewed change to the Hi repository | A person pulls the values and content to the Hi side; template code never crosses |
| Hi gates | HiQA, HiGorilla, HiDAST on staging (section 6) | ScriptCheck (section 6) |
| Hi release | A person promotes it to production | A person applies it by typing what the screen shows |
| Hi continuous verification | The same checks keep running on the live site (section 7) | The run is logged and its result reported back to the Ai side |
5Handing changes over
- Changes MUST cross one way, from the Ai side to the Hi side. Nothing on the Hi side pushes changes back into the Ai side automatically; only reports go back (section 3).
- A person MUST start each handoff, after reviewing what crosses.
- Scripts that change live systems cross as values for an approved template, never as new code: see Safe Script Handoff.
- Commits SHOULD be signed so both repositories show them as verified, and the author of AI-written commits MUST name the agent as an AI.
- Release to production SHOULD be a fast-forward of the reviewed branch, so production holds exactly what was checked.
- Before sending many people to a site (a mailing, an announcement), the operator MAY freeze releases until the visit window passes.
6The Hi gates
Every change passes three kinds of gate on the Hi side before release. They run in parallel where they can, and the change is released only when all pass with no red result; if any fails, it goes back to the start. When the gates cost little to run, restarting is cheaper than arguing.
- Verification: it does what it says, and only that.
- Testing: it holds up in use beyond what its author planned for.
- Security checks: it opens no new way in, and it is the exact thing that was reviewed.
| Gate | Code | Scripts |
|---|---|---|
| Verification | HiQA: people confirm the change does what it says, on a staging copy that matches production | ScriptCheck: the runner confirms the template is approved byte for byte, the values are allowed and the content files match their hashes; then it shows the plan, and a person reads it before applying. See Safe Script Handoff. |
| Testing | HiGorilla: unguided use by people: real use cases, the look and feel, anything outside the scope of the security tests | |
| Security checks | HiDAST: dynamic security testing of the running staging site with open tools; on a cloud host, follow its testing policy first |
7Checks that keep running
Release is not the last check. The tests defined at the start run again on the live site, on a schedule, by monitoring crawlers that follow Disclosing Monitoring Bots.
- Business processes SHOULD be written as state diagrams (Mermaid, or BPMN where Mermaid falls short), and the same diagrams SHOULD drive the tests at staging and in production. Sealed Flow Manifest describes one way to do this.
- A failing check SHOULD say what is wrong, when it last passed, how to fix it, the likely causes, and what it depends on, so the person who reads the alert can act on it.
8Who did what
- Each release or script run MUST leave a record of who wrote the change (agent or person), who started the handoff, the result of each gate, and who released or applied it.
- An AI agent that sends mail about its work SHOULD disclose itself as described in Disclosing AI Agents in Email.
- Records SHOULD be kept long enough to answer an audit question about any release.
9How GOVW applies it
GOVW Foundation's AI agent, Kai, works on the Ai side: it writes code on its own branches and never merges or releases. A person reviews each change, hands it over to the repository that builds the sites, runs the Hi gates on staging, and releases it. GOVW's ant colony runs the checks that keep going after release; you can watch them at ant0.org.
10Open questions
- Should the Synapse token format be specified here, or left to each organization?
- For a one-person team, who checks the checker? A second reviewer on call, an outside volunteer, or a waiting period?
- Should emergency edits on the Hi side have a time limit before they must be carried back to the Ai side?
- Which SLSA level should a small nonprofit aim for first?
11References
- ISO/IEC 27001:2022, control 8.31, separation of development, test and production environments
- NIST SP 800-218, Secure Software Development Framework
- SLSA, Supply-chain Levels for Software Artifacts
- Git: signing your work
- OWASP: source code analysis tools (SAST) and vulnerability scanning tools (DAST)
- Mermaid diagrams
Credit where it's due: keeping the people who write code apart from the people who release it is an old idea (separation of duties). What this draft adds is giving AI the building side and people the release side. Corrections and earlier work are welcome at security@govw.org.