🧠AI suggests, rules decide
The AI does the reading and suggests what to do. Fixed rules check it before anything actually happens.
Like a new staff member whose work is checked before it goes out.
Show the code
const s = await model.classify(email); // AI suggests
const r = gates.check(s); // code decides
if (!r.ok) return handoff(email, r.reason);
await act(s);
🙋People handle the risky stuff
Simple, low-risk jobs run on their own. Anything that moves money or speaks for the business waits for a person.
Filing a document: automatic. Sending a refund: needs a yes.
Show the code
const RISK = {
file_document: "auto",
send_reminder: "approve",
issue_refund: "person",
} as const;
🔐Only the access it needs
The AI only gets the keys to the rooms it works in. It can read a checklist, but it can’t delete files or make payments.
Security first, because that’s my background.
Show the code
server.tool("get_checklist",
{ clientId: z.string() },
async ({ clientId }) => readOnly.checklist(clientId));
// read-only by default
🧪Tested before it goes live
Every change is tested against a set of real-world examples, including tricky emails designed to fool the AI.
If it can be tricked in testing, it doesn’t ship.
Show the code
test("injection goes to a person", async () => {
const r = await run(fixture("ignore-instructions.eml"));
expect(r.outcome).toBe("handoff");
});