Your threshold has no meter
Free delivery on orders over 50 pounds reads like one number. It is a reading on a meter, and the prompt never says which one: before the discount code, after it, or after the return. The agent picks a meter. The checkout has already picked another.
TL;DR A threshold in a system prompt is a reading on a meter the agent cannot see, so name the meter wherever the number appears, let the tool that owns the meter do the measuring, and test the basket where two meters disagree.
Ask a good checkout supervisor whether a basket gets free delivery and they ask a question back: before or after the code? They know the threshold is not a property of the number 50. It is a property of one particular total, measured at one particular moment, by one particular system. Your delivery section states the number and leaves the rest to the model, which has no total at all, only what the customer typed.
§1The reframe: every threshold is a reading
Read each threshold in your prompt as a gauge. A gauge needs three things before its reading means anything.
- What it measures. The basket before discount codes, after them, with or without the delivery charge, per item or per order. Orders over 50 pounds names none of these.
- When it measures. At checkout, at dispatch, or after the customer sends half the order back. A return can carry an order back under the line it crossed a week ago.
- Who holds it. The checkout computed the total. The returns system will compute the refund. The agent holds neither, so every reading it gives is either fetched or invented.
There is one kind of number the agent does hold the meter for: its own output. At most 3 sentences is measured on the reply the agent is writing, which is why the checker can prove two such limits collide, as The arithmetic in your prompt shows. A delivery threshold is measured on somebody else's system. The agent can repeat the number. It cannot take the reading.
Over 50 pounds is not a rule until somebody says over 50 pounds of what.
§2A delivery section with four meters
Burrow & Bell sells pet supplies online. Its delivery section grew one line per question the support team got asked, and it reads fine to anyone who already knows the policy.
# Role You are the support assistant for Burrow & Bell, an online pet supplies shop. # Delivery - Delivery is free on orders over 50 pounds. - Orders under 50 pounds pay a delivery charge of 3.95 pounds. - Members get free delivery on every order. - If a return takes the order under 50 pounds, the delivery charge is deducted from the refund. - Discount codes do not count towards free delivery. - NEVER charge delivery on an order over 50 pounds.
$ typeglish review before.tg
before.tg — C (71/100) → A (100) projected if every fix below lands check: 0 error, 0 warning, 9 info tiers: base+z3
FIXES ranked by projected gain
+12 put a "@@ why" note above L2 L5 L6 L7 L8 L9 L10 — annotation 0 → 100
+9 lead with a modal (MUST / NEVER / SHOULD) on L6 L7 L8 L9 — 4 rules become visible to the checker
+3 use the imperative or a named doer on L8 — up to directness 100
+2 fix the 2 prompt/unregistered-doer findings (L7 L9) — A bare generic doer (Users should ...) never enters the world model - the imperative or a definite party registers wh…
+1 fix the 1 typeglish/if-then finding (L8) — A conditional (IF / WHEN / UNLESS / WHILE / …) opened without its THEN — an ADVISORY by the owner’s ruling (2026-08,…
+1 fix the 1 prompt/unintroduced-definite finding (L8) — A definite retrieves a card the document never introduces (Open the store. - which store?) - introduce the head on an…
+1 fix the 1 prompt/agentless-passive finding (L8) — The doer is deleted (agentless passive) or demoted to a by-phrase - name the actor or use the imperative.
RULES 1 of 6 rule-shaped lines read
L5 = fact Delivery is free on orders over 50 pounds.
a declared fact, not a rule — the world model reads it; it has no modal to enforce
L6 ✗ invisible Orders under 50 pounds pay a delivery charge of 3.95 pounds.
no modal (MUST / NEVER / SHOULD) and "Orders" is not a verb the checker knows, so it reads as prose → lead with a modal, or start with a verb from the catalog (Escalate …, Ask …)
L7 ✗ invisible Members get free delivery on every order.
no modal (MUST / NEVER / SHOULD) and "Members" is not a verb the checker knows, so it reads as prose → lead with a modal, or start with a verb from the catalog (Escalate …, Ask …)
L8 ✗ invisible If a return takes the order under 50 pounds, the delivery charge is deducted from the refund.
the condition has no THEN branch, so nothing is required when it holds → add THEN MUST / NEVER / SHOULD <verb> …
L9 ✗ invisible Discount codes do not count towards free delivery.
no modal (MUST / NEVER / SHOULD) and "Discount" is not a verb the checker knows, so it reads as prose → lead with a modal, or start with a verb from the catalog (Escalate …, Ask …)
FINDINGS
before.tg:6:1 info prompt/unparsed-rule Reads like a rule, but the rule reader cannot parse it as one, so it earns no Enforceability credit and no measurability check: no modal (MUST / NEVER / SHOULD) and "Orders" is not a verb the checker knows, so it reads as prose. Fix: lead with a modal, or start with a verb from the catalog (Escalate …, Ask …).
before.tg:7:1 info prompt/unparsed-rule Reads like a rule, but the rule reader cannot parse it as one, so it earns no Enforceability credit and no measurability check: no modal (MUST / NEVER / SHOULD) and "Members" is not a verb the checker knows, so it reads as prose. Fix: lead with a modal, or start with a verb from the catalog (Escalate …, Ask …).
before.tg:7:1 info prompt/unregistered-doer A bare generic doer never enters the world model - instruction to the agent, or background about users? Use the imperative if the agent acts, or a definite party ("The user should ...") to register the doer.
before.tg:8:1 info typeglish/if-then IF needs a THEN — write IF <condition> THEN <action>.
before.tg:8:1 info prompt/unparsed-rule Reads like a rule, but the rule reader cannot parse it as one, so it earns no Enforceability credit and no measurability check: the condition has no THEN branch, so nothing is required when it holds. Fix: add THEN MUST / NEVER / SHOULD <verb> ….
before.tg:8:1 info prompt/unintroduced-definite "the refund" retrieves something this document never introduces - a model must guess which refund is meant. Mention a refund on an earlier line, or anchor it here ("their refund", "the refund you ...").
before.tg:8:1 info prompt/agentless-passive The doer is deleted (agentless passive) - who performs this? Name the actor or use the imperative: "Verify the order." instead of "The order is verified."
before.tg:9:1 info prompt/unparsed-rule Reads like a rule, but the rule reader cannot parse it as one, so it earns no Enforceability credit and no measurability check: no modal (MUST / NEVER / SHOULD) and "Discount" is not a verb the checker knows, so it reads as prose. Fix: lead with a modal, or start with a verb from the catalog (Escalate …, Ask …).
before.tg:9:1 info prompt/unregistered-doer A bare generic doer never enters the world model - instruction to the agent, or background about users? Use the imperative if the agent acts, or a definite party ("The user should ...") to register the doer.
TESTS no $TEST cases — add one beside a rule; `test --dry` validates it offline
Count the meters. Line 5 measures orders, with no word on discount codes. Line 9 says codes do not count, which quietly moves the meter to the total after codes, four lines later and in a sentence the model has to join to line 5 by itself. Line 8 measures the order after a return, a total that does not exist until the returns system works it out. Line 7 takes members off the meter altogether. And line 6 starts charging under 50, which leaves a basket of exactly 50 pounds on neither side; that boundary bug has its own post, Why your agent handles a 150-dollar refund two ways.
Now the contact that tests it. A customer has 46 pounds in the basket and a 10 percent code, and asks whether adding a 5-pound chew toy gets them free delivery. Before the code, the basket is 51 pounds: line 5 says yes. After the code, it is 45.90: line 9 says no. The checkout will charge 3.95. The agent has the customer's arithmetic, two sentences that disagree about which total counts, and no way to look.
§3The checker reads the words, not the meter
After the first complaint, someone rewrites the policy as rules. It is worth seeing what the checker can and cannot do with them. Two rules over the same phrase, one required and one forbidden, are a contradiction it proves:
# Role You are the support assistant for Burrow & Bell, an online pet supplies shop. # Delivery - MUST offer free delivery on an order over 50 pounds. - NEVER offer free delivery on an order over 50 pounds.
The rewrite that actually ships names the second meter, because the discount-code rule is the one that keeps biting:
# Role You are the support assistant for Burrow & Bell, an online pet supplies shop. # Delivery - MUST offer free delivery on an order over 50 pounds. - NEVER offer free delivery on an order under 50 pounds after discount codes.
$ typeglish check one-meter.tg one-meter.tg:5:1 error logic/contradiction Conflicts with line 6. Logical conflict — "offer free delivery on an order over 50 pounds" is both required and forbidden. Keep one, or scope the two rules so they cannot both apply (IF <condition> THEN ...). ↳ line 6: - NEVER offer free delivery on an order over 50 pounds. one-meter.tg:6:1 error logic/contradiction Conflicts with line 5. Logical conflict — "offer free delivery on an order over 50 pounds" is both required and forbidden. Keep one, or scope the two rules so they cannot both apply (IF <condition> THEN ...). ↳ line 5: - MUST offer free delivery on an order over 50 pounds. ✗ 1 file — 2 error, 0 warning, 0 info $ typeglish check two-meters.tg ✓ 1 file — 0 error, 0 warning, 0 info
The checker is not wrong to pass it. Whether those two rules collide depends on which total an order over 50 pounds means, and the file never says. Read it as the basket before codes and the chew-toy customer is covered by both rules at once: required to be offered free delivery, and forbidden it. Read it as the total after codes and the rules sit side by side without touching. The conflict lives in the meter, and the meter is a word nobody wrote.
That is the general lesson of this section. A meter written as a trailing qualifier, after discount codes, excluding delivery, per item, changes what the rule measures while taking it out of every comparison. It is the same trap as a unit the checker cannot read, which Your % sign is not a unit walks through: the number is right, and the thing it is a number of is invisible.
§4Give the meter to its owner
The rebuild stops asking the model to take readings. The checkout already computes the delivery charge on the right total with membership applied, and the returns system already knows what a return does to it. Each gets a tool, and the prompt keeps exactly one copy of the number, with its meter named, so the agent can answer how much do I need for free delivery? in the same terms the checkout will apply.
$TOOL get_delivery_quote - description:: Return the delivery charge for the customer's basket, as the checkout computes it: on the total after discount codes, with membership applied. - input:: - basket_id:: string $TOOL get_refund_quote - description:: Return the refund for a return, as the returns system computes it, including any delivery charge the return brings back. - input:: - order_number:: string - item_ids:: list of strings # Role @@ role: an online pet shop's chat desk; every later "you" is the agent You are the support assistant for Burrow & Bell, an online pet supplies shop. # Context @@ threshold: the one number the agent may quote, with its meter named; the checkout applies it, the agent explains it Free delivery starts at 50 pounds, measured on the basket total after discount codes. # Delivery @@ quote_delivery: the checkout owns the meter, so the agent reads the charge instead of working it out - WHEN the customer asks about a delivery charge THEN MUST call @[get_delivery_quote]. @@ delivery_gate: a charge the agent works out itself is a reading from a meter nobody calibrated - IF @[get_delivery_quote] has not run THEN NEVER state a delivery charge. @@ quote_refund: a return can move the order back under the threshold; the returns system decides what that costs - WHEN the customer asks about a refund for a return THEN MUST call @[get_refund_quote]. @@ refund_gate: no refund figure before the returns system has answered - IF @[get_refund_quote] has not run THEN NEVER state a refund amount. $TEST nearly_free - input:: My basket is 46 pounds and I have a 10 percent code. If I add a 5 pound chew toy do I get free delivery? - expect:: - calls get_delivery_quote - states a delivery charge only after the delivery quote - matches /^(?![\s\S]*\b(?:51|45\.90)\b)/ $TEST return_one_item - input:: I want to return the cat tree from my order. How much will I get back? - expect:: - calls get_refund_quote - states a refund amount only after the refund quote
$ typeglish review after.tg after.tg — A (99/100) check: 0 error, 0 warning, 0 info tiers: base+z3 FIXES none — every facet is essentially full RULES 4 of 4 rule-shaped lines read · 4/4 covered by $TEST TESTS 2 cases · 4/4 rules exercised $ typeglish test after.tg --dry ✓ after.tg coverage: 4/4 rules exercised · nearly_free — "My basket is 46 pounds and I have a 10 percent code. If I ad" (not run) ✓ matches /^(?![\s\S]*\b(?:51|45\.90)\b)/ · rubric — 2 prose expectations, judged on a live run (needs ANTHROPIC_API_KEY) · return_one_item — "I want to return the cat tree from my order. How much will I" (not run) · rubric — 2 prose expectations, judged on a live run (needs ANTHROPIC_API_KEY) ✓ 1 prompt — 0 failed
Look at what left the prompt. The member line is gone, because membership is applied inside the quote. The return line is gone, because the refund quote already includes any delivery charge the return brings back. The under 50 pounds line is gone, and with it the boundary at exactly 50. What remains are four rules about who to ask and one fact whose meter is spelled out next to its number.
The test is the part to copy. nearly_free sits at the one basket where the two meters disagree: over the line before the code, under it after. A test at 30 pounds or at 80 pounds passes on any meter and proves nothing. Every threshold in a prompt deserves one case placed where its readings split, and a regex that catches the agent quoting a reading it took itself.
What the check does not cover is the checkout. If the commercial team moves free delivery to 60 pounds, the threshold fact is stale and no checker can know. The reframe buys you a short list instead: one fact to update, sitting beside a note that says which system owns the real figure.
§5Common questions
- Why does my AI agent tell customers they qualify for free delivery when they do not?
- Because the prompt names a threshold but not the total it is measured on. A basket can be over 50 pounds before a discount code and under it after, and the agent adds up whatever the customer typed. Let a delivery-quote tool return the charge the checkout computes, and name the meter wherever the prompt states the number.
- Should I put my free delivery threshold in the system prompt?
- Put the number in once, as a fact with its meter named, for example measured on the basket total after discount codes, so the agent can answer the general question. Leave the decision for a specific basket to the tool that owns the total, and gate any stated charge on that tool having run.
- Can TypeGlish catch two delivery rules that measure the order differently?
- Not when the difference is a qualifier. Two rules over the same phrase, one MUST and one NEVER, fail with logic/contradiction. Add after discount codes to one of them and the phrases no longer match, so the pair checks clean even though both rules can apply to the same basket.
- How do I test a threshold rule in an agent prompt?
- Write a $TEST case at a value where two meters disagree, such as a basket that is over the threshold before a discount code and under it after. Assert the tool call, and add a regex assert that fails if the reply contains a figure the agent could only have worked out for itself.
Search your prompt for threshold words: over, under, more than, at least, or more, minimum, up to. Next to every hit, write the meter: which total, measured when, held by which system. If the answer is not the agent itself, put a $TOOL in front of it and gate the figure on that tool having run, the same move Why your agent swaps oat milk for dairy makes with a substitutes list. Then run typeglish test --dry and check that each threshold has a case sitting where two meters disagree.