Rules in plain English
Write sentences such as “Ask me before refunds over €50” and get the rules they mean, with example requests checked against them. No AI model reads them: the same sentence always gives the same rules, and a sentence that cannot be read exactly gives none and says why.
Write your policy the way you would tell a colleague: “Ask me before refunds over €50. Never let agents delete customer data.” VariantGate turns each sentence into the rules it means and shows them to you, with example requests checked against them. Nothing is added until you add it, and the API checks each rule as it checks one you made by hand.
No AI model reads your sentences. A fixed reader does, so the same sentence always gives the same rules. When a sentence holds a word it does not know, or a condition a rule cannot hold, it gives no rule at all and says why, instead of guessing. A rule is never broader or looser than what you wrote without a note telling you.
Sentences and the rules they give
- Ask me before refunds over €50.
- ask refund.* above €50.00
- Allow refunds up to €50, at most €500 a day.
- allow refund.* up to €50.00, €500.00 a day in total
- Never let agents delete customer data.
- never delete.*
- Ask two people before deploys to production.
- ask deploy.*, 2 people
- The support bot may send emails.
- allow email.* for the support bot key only
- Allow `invoice.send` for 2 hours with 10 minutes to cancel.
- allow invoice.send, 10 minutes to cancel, ends in 2 hours
- Refunds over $1000 need my approval.
- ask refund.* above $1,000.00
Each sentence is one rule, or one per kind of action it names: “Ask me before refunds and payments” gives two. Sentences end at a full stop, a semicolon or a new line; a question makes no rule. Up to 30 sentences and 4,000 characters are read at once, and a sentence past the 30th is shown as refused, never dropped.
What a sentence can say
- What happens
- Start with “Never …”, “Don't allow …” or “Block …” for a rule that denies; “Ask me before …”, “Check with me before …” or “… need my approval” for one that waits for a person; “Allow …”, “Let agents …” or “… may …” for one that approves.
- An amount
- “over €50”, “above $100” or “more than 50 EUR” for an ask or never rule; “up to €50”, “at most” or “no more than” for an approval. €, $ and £ work, and three-letter codes and names such as EUR, USD, GBP, CHF or euros.
- A total
- “at most €500 a day”, per week or per month, on an approval only: once that much is approved, a person decides until the period starts again.
- More than one person
- “Ask two people before deploys”: two or three different people must approve. Only an ask rule can wait for more than one.
- How long
- “for 2 hours”, minutes, days or weeks from now, or “until 2026-12-31” (the start of that day, UTC). The rule stops applying then.
- A cancel window
- “with 10 minutes to cancel”, 1 to 1440 minutes: an approval waits that long before the agent may act, so anyone can still stop it. Not on a never rule.
- One agent
- The name you gave an agent key, as in “The support bot may send emails” or “… for the support bot key”. The rule matches that key, never the name an agent gives itself.
- An action name
- Write the name an agent sends, such as invoice.send or deploy.* (in backticks or as is), when no word below fits.
Words for kinds of action, and the pattern each becomes:
- read.*
- reading, looking things up, searching, viewing, fetching
- calendar.*
- the calendar, meetings, bookings, scheduling
- records.*
- records, the CRM
- email.*
- emails, mail, messages, replies
- post.*
- posts, publishing, tweets
- refund.*
- refunds
- payment.*
- paying, payments, payouts, transfers, money, wires
- purchase.*
- purchases, buying, subscribing, subscriptions
- shell.*
- the shell, commands, the terminal, scripts
- deploy.*
- deploys, deployments, releases
- database.*
- the database, migrations, the schema, SQL
- delete.*
- deleting, erasing, wiping
- access.*
- access, permissions
- *
- anything, everything
What it refuses, and why
- Never pay suppliers unless I said so.
- “unless” is a condition a rule cannot hold. Write each case as its own sentence.
- Allow deploys to staging.
- “staging” would narrow an approval, and a rule cannot tell staging deploys from the rest, so it would approve them all. Name the action instead, such as `deploy.staging`.
- Allow refunds under €20.
- “under €20” leaves out €20 itself; “up to €20” says exactly where the limit is.
- Ask before payments over 50.
- 50 of what? Say the currency: “over €50” or “over 50 EUR”.
- Allow payments over €100.
- An automatic approval can only go up to an amount, never start above one.
- Agents may read records.
- An automatic approval covers one kind of action per sentence; this one would approve every look-up and every record change.
- Allow revoking access.
- “revoking” picks part of the access family, and a rule cannot tell revoking from granting, so it would approve both.
- Never refunds over €50 or deletes.
- The amount belongs to refunds only; with deletes in the same sentence it would let a small delete through. Write each in its own sentence.
- Can agents refund?
- A question makes no rule.
- Allow refunds up to €1,500.
- “€1,500” can mean one and a half or fifteen hundred. Write €1500 or €1.50.
- Ask me before frobnicating widgets.
- “frobnicating” is not a word the reader knows.
- Conditions such as unless, except, only, if, when, before or after a time. When rules disagree the most cautious one wins, so an exception cannot live inside one rule. Write each case as its own sentence: “Allow refunds up to €50.” and “Ask me before refunds over €50.”
- Words that narrow an approval, such as staging, production, customer, test or small. A rule cannot tell those actions apart from the rest of their family, so the approval would cover all of them. In an ask or never rule the same word is dropped with a note, because covering more is the cautious side.
- “Under”, “below” and “less than”. An amount limit includes the amount itself, so “up to €50” is the exact way to say it.
- An amount in the wrong direction: an approval only goes up to an amount, and an ask or never rule only starts above one.
- A number without a currency, a word it does not know, an end date that has passed, four or more people, or a sentence with no kind of action in it.
Notes on what it understood
An understood sentence can carry notes: that an ask or never rule above an amount also catches a request that leaves the amount out or uses another currency; that an approval with a limit approves only a request stating an amount in that currency at or under it; that an approval with no agent named applies to every key; that a word was dropped from an ask or never rule; and that more than one person needs the Team plan.
Checks
Under the rules you see example requests and what the new rules together would make of them, worked out the way the API decides: the most cautious rule that covers a request wins. For each rule with an amount there is a request at the limit, one just above it, one with no amount and one in another currency; for a rule on one key, the same requests from any other key. Only the new rules count, not the ones already in your workspace, and a total per period is not counted.
Where to write them
- In the app, under Rules: write the sentences, read the rules and the checks, and add them. Only owners can add rules.
- Rules in plain English, the free tool: try it without signing in. It runs in your browser.
- The playground, to see the rules answer requests.
Rules need the Pro plan or above; a rule that waits for two or three people needs Team. See pricing. To start from a whole policy instead, use a template or the policy generator. Action names are explained in naming agent actions; the rules themselves in Rules, where allow, ask and deny are described in full.