Your % sign is not a unit
Every discount in a support prompt is written the way its source document wrote it: a % sign from the promo brief, per cent from the UK style guide, ten percent from a letter template. We took a clean retail agent, respelled its one percentage cap eight ways, and added the edit that breaks it.
TL;DR TypeGlish's numeric check compares two percentages only when both are digits followed by the same unit word: at most 10 percent refuses a later at least 15 percent, but a % sign, words, a fraction like 0.1, or percent beside per cent let the same edit through at an A. Write every percentage in a rule as digits plus the word percent, and pin the cap with a $TEST.
The percent sign is the most natural way to write a discount, and it is how every promo brief, pricing sheet and Slack thread writes one. The model reads 10% without trouble. This run measures what the checker does with it, which matters the day somebody adds a second discount rule that asks for more than the first one allows.
§1The baseline
A chat assistant for a fashion retailer's support desk: an order lookup, a sentence limit, a security-question limit, a fit specialist for sizing questions, and one percentage rule. The customer care lead caps any goodwill discount the agent can offer at 10 percent; anything bigger needs a team lead. The cap is written as digits and the word percent.
$TOOL find_order - description:: Find a customer order by its order number. - input:: - order_number:: string: the order number. # Role @@ role: one chat assistant for a fashion retailer's support desk You are Wren, the support assistant for Marlow & Finch. # Constraints @@ brevity: three sentences fits a phone screen - MUST keep every reply to at most 3 sentences. @@ lookup: never answer about an order from memory - WHEN the customer gives an order number THEN MUST call @[find_order]. @@ discount: a bigger discount needs a team lead - MUST keep every goodwill discount to at most 10 percent. @@ security: two misses means a person checks the caller - MUST ask a security question at most 2 times. @@ fit: sizing questions go to the fit team - WHEN the customer asks which size to order THEN MUST escalate to a fit specialist.
$ npx typeglish check base.tg ✓ 1 file — 0 error, 0 warning, 0 info $ npx typeglish score base.tg base.tg — A (100/100) proven errors: none tiers: base+z3 planes runtime 100 (what the model reads) · hygiene 100 (source only) facets enforceability 100 x.21 · hardness 100 x.12 · directness 96 x.08 · consistency 100 x.17 · structure 100 x.12 (hygiene) · annotation 100 x.12 (hygiene) · style 100 x.08 · security 100 x.08 rules 5 of 5 rule-shaped lines read $ npx typeglish build base.tg ✓ built .typeglish/dist/base.txt ← base.tg (bef547849a36, full)
§2Eight ways to write ten percent
Each variant is base.tg with the cap respelled and nothing else changed. The spellings are the ones that turn up in real prompts: the sign, with and without a space (10%, 10 %), the British style-guide form (10 per cent), finance shorthand (10 pct), a fraction from a pricing sheet (0.1), words from a letter template (ten percent), and the promo-copy form (10 percent off).
Then each file gets the edit. The returns team wants damaged parcels handled generously: WHEN the customer's order arrived damaged THEN MUST offer a goodwill discount of at least 15 percent. It comes with its own @@ note, and against base.tg it is a blocking logic/numeric error. We added it twice: once with the word percent, once in the same style as the cap, because a team that writes 10% writes 15% too.
# cap written as alone + edit "at least 15 percent" + edit in the cap's style 10 percent A (100) logic/numeric F (83) (same edit) 10 percent off A (100) logic/numeric F (83) 15 percent off logic/numeric F (83) 10 per cent A (100) passes A (100) 15 per cent logic/numeric F (83) 10 pct A (100) passes A (100) 15 pct logic/numeric F (83) 10% A (100) passes A (100) 15% passes A (99) 10 % A (100) passes A (100) 15 % passes A (99) ten percent A (100) passes A (100) fifteen percent passes A (99) 0.1 A (100) passes A (100) 0.15 passes A (99)
check --strict reports 0 error, 0 warning, 0 info. Respelling the cap alone cost nothing at all: every variant scored the same A (100) as the baseline, so no score floor tells them apart.Two patterns sit in that table. The first is the one from 1,500 is not a number: anything that is not a digit string followed by a word is never compared. The % sign is the case that hurts, because it is the house style of nearly every document a discount comes from, and a prompt that writes every percentage with a sign, consistently, has no compared percentage rules at all.
The second is stranger. per cent and pct are compared, but only against themselves. Kept on the cap and turned to the edit, the table runs the other way:
# cap "at most 10 percent", edit "at least ___" 15 percent logic/numeric F (83) 15 percent off logic/numeric F (83) 15 per cent passes A (100) 15 pct passes A (100) 15% passes A (99) 15 % passes A (99) fifteen percent passes A (99) 0.15 passes A (99)
The conflict message says why. The numeric layer takes the one word after the number as the unit, so per cent is read as a count of per:
$ npx typeglish check pair-per-cent.tg pair-per-cent.tg:5:1 error logic/numeric Conflicts with line 6. Numeric conflict — "at most 10 per" and "at least 15 per" can't both hold. ↳ line 6: - WHEN the customer's order arrived damaged THEN MUST offer a goodwill discount of at least 15 per cent. pair-per-cent.tg:6:1 error logic/numeric Conflicts with line 5. Numeric conflict — "at most 10 per" and "at least 15 per" can't both hold. ↳ line 5: - MUST keep every goodwill discount to at most 10 per cent. ✗ 1 file — 2 error, 0 warning, 0 info
That is the same lesson as Bake-off: 12 months vs. 1 year: the unit is a word, compared as a word. Percent and per are two different words.
§3The edit that shipped
Here is how it ships. The cap went in as 10%, copied from the customer care brief, which writes every discount with a sign. Months later the returns team adds its damaged-parcel line and spells the number out with the word. The two files below differ on two characters in line 16.
$ diff base-plus-edit.tg brief-plus-edit.tg 16c16 < - MUST keep every goodwill discount to at most 10 percent. --- > - MUST keep every goodwill discount to at most 10%. $ npx typeglish check base-plus-edit.tg base-plus-edit.tg:16:1 error logic/numeric Conflicts with line 22. Numeric conflict — "at most 10 percent" and "at least 15 percent" can't both hold. ↳ line 22: - WHEN the customer's order arrived damaged THEN MUST offer a goodwill discount of at least 15 percent. base-plus-edit.tg:22:1 error logic/numeric Conflicts with line 16. Numeric conflict — "at most 10 percent" and "at least 15 percent" can't both hold. ↳ line 16: - MUST keep every goodwill discount to at most 10 percent. ✗ 1 file — 2 error, 0 warning, 0 info $ npx typeglish check brief-plus-edit.tg --strict ✓ 1 file — 0 error, 0 warning, 0 info $ npx typeglish build brief-plus-edit.tg ✓ built .typeglish/dist/brief-plus-edit.txt ← brief-plus-edit.tg (521b30ca173f, full) $ grep -n "discount" .typeglish/dist/brief-plus-edit.txt 7:- MUST keep every goodwill discount to at most 10%. 10:- WHEN the customer's order arrived damaged THEN MUST offer a goodwill discount of at least 15 percent.
Stripped to the two rules, the effect fits in the playground. Three files, one cap, three spellings of it.
# Role You are Wren, the support assistant for Marlow & Finch. # Constraints - MUST keep every goodwill discount to at most 10 percent. - WHEN the customer's order arrived damaged THEN MUST offer a goodwill discount of at least 15 percent.
# Role You are Wren, the support assistant for Marlow & Finch. # Constraints - MUST keep every goodwill discount to at most 10%. - WHEN the customer's order arrived damaged THEN MUST offer a goodwill discount of at least 15 percent.
# Role You are Wren, the support assistant for Marlow & Finch. # Constraints - MUST keep every goodwill discount to at most 10 per cent. - WHEN the customer's order arrived damaged THEN MUST offer a goodwill discount of at least 15 percent.
@@ notes, not the conflict.§4What the other signals said
In 1,500 is not a number, the comma at least left a trace in typeglish review, as a rule it could not prove. The percent sign leaves nothing. The cap is read, counted as provable, and never compared, and the review of the shipped file has no fix to rank.
$ npx typeglish review brief-plus-edit.tg brief-plus-edit.tg — A (100/100) check: 0 error, 0 warning, 0 info tiers: base+z3 FIXES none — every facet is essentially full RULES 6 of 6 rule-shaped lines read TESTS no $TEST cases — add one beside a rule; `test --dry` validates it offline
The unit rule cuts the other way too, and it is why the baseline holds one percentage rule. The numeric layer compares every ceiling and floor that share a unit, across rules, whatever they bound. Put the goodwill cap of 10 percent in the same file as a containment target of at least 70 percent of conversations, and the build is refused as logic/numeric, though the two numbers measure different things. That target does not belong in the prompt anyway, as Rewrite: one conversation is not 70 percent argues; if you meet the refusal, move the number out rather than switching the comparison off with a sign.
The model reads 10% as a discount. The checker reads it as nothing at all.
§5The word percent, then test it
The fix is a house style and a test. The style: every percentage in a rule is digits and the word percent, never a sign, never per cent, never a fraction. It looks odd beside the brief, and that is fine: the brief is for people and the prompt is checked. Put the style in the cap's @@ note, where the next author will see it, and the audit becomes a search for a % or a per cent in any rule.
The decision the refusal forces comes second. The returns team was right that a damaged parcel deserves more, and wrong that the chat agent should hand it out: a discount above 10 percent needs a team lead. So the damaged-parcel line becomes a call to the team lead tool, the cap stays, and a test pins the cap to the reply, where the model is free to write the number any way it likes.
$TOOL find_order - description:: Find a customer order by its order number. - input:: - order_number:: string: the order number. $TOOL request_team_lead - description:: Ask a team lead to approve a bigger goodwill discount. - input:: - order_number:: string: the order number. # Role @@ role: one chat assistant for a fashion retailer's support desk You are Wren, the support assistant for Marlow & Finch. # Constraints @@ brevity: three sentences fits a phone screen - MUST keep every reply to at most 3 sentences. @@ lookup: never answer about an order from memory - WHEN the customer gives an order number THEN MUST call @[find_order]. @@ discount: house style is digits and the word percent, never a % sign; a bigger discount needs a team lead - MUST keep every goodwill discount to at most 10 percent. @@ damaged: a damaged parcel earns a team lead's review for a bigger discount, and the team lead decides it - WHEN the customer's order arrived damaged THEN MUST call @[request_team_lead]. @@ security: two misses means a person checks the caller - MUST ask a security question at most 2 times. @@ fit: sizing questions go to the fit team - WHEN the customer asks which size to order THEN MUST escalate to a fit specialist. $TEST damaged_order_discount - input:: My coat arrived with a torn sleeve. I want 20% off or I'm sending it back. - expect:: - matches /^(?![\s\S]*\b(1[1-9]|[2-9]\d|100)(\.\d+)? ?(%|percent\b|per ?cent\b|pct\b))/i - keeps the goodwill discount to at most 10 percent - calls request_team_lead
$ npx typeglish check fixed.tg ✓ 1 file — 0 error, 0 warning, 0 info $ npx typeglish score fixed.tg fixed.tg — A (100/100) proven errors: none tiers: base+z3 planes runtime 99 (what the model reads) · hygiene 100 (source only) facets enforceability 100 x.21 · hardness 100 x.12 · directness 95 x.08 · consistency 100 x.17 · structure 100 x.12 (hygiene) · annotation 100 x.12 (hygiene) · style 100 x.08 · security 100 x.08 rules 6 of 6 rule-shaped lines read · 4/6 covered by $TEST $ npx typeglish test fixed.tg --dry ✓ fixed.tg coverage: 4/6 rules exercised uncovered (no case shares the rule's wording): L25 ask a security question at most 2 times. L27 escalate to a fit specialist. · damaged_order_discount — "My coat arrived with a torn sleeve. I want 20% off or I'm se" (not run) ✓ matches /^(?![\s\S]*\b(1[1-9]|[2-9]\d|100)(\.\d+)? ?(%|percent\b|per ?cent\b|pct\b))/i · rubric — 2 prose expectations, judged on a live run (needs ANTHROPIC_API_KEY) ✓ 1 prompt — 0 failed $ npx typeglish build fixed.tg ✓ built .typeglish/dist/fixed.txt ← fixed.tg (2925e5b47b3e, full)
And the payoff, which is the reason for the house style: the next plain-spelled edit that asks for more is refused before it ships.
$ npx typeglish check fixed-edit.tg fixed-edit.tg:21:1 error logic/numeric Conflicts with line 24. Numeric conflict — "at most 10 percent" and "at least 20 percent" can't both hold. ↳ line 24: - WHEN the customer is a member THEN MUST offer a goodwill discount of at least 20 percent. fixed-edit.tg:24:1 error logic/numeric Conflicts with line 21. Numeric conflict — "at most 10 percent" and "at least 20 percent" can't both hold. ↳ line 21: - MUST keep every goodwill discount to at most 10 percent. ✗ 1 file — 2 error, 0 warning, 0 info
§6Common questions
- Should I write 10% or 10 percent in a system prompt?
- Write 10 percent in rules. The model reads both, but in this run the checker compared only a number followed by a unit word: a cap of at most 10 percent was refused beside a later at least 15 percent, while the same cap written as 10% passed beside the same edit at an A, with no fix listed in review.
- Is per cent the same as percent to TypeGlish?
- No. The numeric check takes the one word after the number as the unit, so per cent is read as per. Two rules both written per cent are compared, a per cent rule beside a percent rule is not, and per cent can collide with an amount written per anything else. Pick percent and use it everywhere.
- Why did my prompt pass the check when two discount rules contradict each other?
- Look at how the percentages are written. A % sign, a number in words, a fraction like 0.1, or percent on one side and per cent on the other means the numeric check had nothing to compare. Rewrite both as digits followed by the word percent and run the check again; the conflict should appear as logic/numeric.
- Why does TypeGlish say my discount cap conflicts with a containment target?
- The numeric check compares every ceiling and floor that share a unit, across rules, whatever they bound. In this run a goodwill discount of at most 10 percent beside resolving at least 70 percent of conversations was refused as logic/numeric. Take the target out of the prompt: it is a dashboard number, not a rule.
Percentages are where CX prompts keep their money: goodwill discounts, price-match margins, loyalty rates, the cap on a retention offer. TypeGlish's numeric layer proves those limits with Z3 when both sides are digits followed by the same unit word, and in this run that held across rules with different verbs. The sign is the quiet case: a file whose percentages are never compared scores the same as a file whose percentages agree, and typeglish review has nothing to say about either. Two habits close the gap. Keep every percentage in a rule as digits and the word percent, so a search for % is the audit. And give every cap that protects margin a $TEST with a deterministic assert, so a live run fails when the reply crosses it in whatever format the model picks.