← Tidelines/Best practices

Bake-off: half an hour vs. 30 minutes

A restaurant group's booking assistant holds a table for a late guest, and how long it holds it is one line in the prompt. Two copies of that prompt, identical except for how the grace period is spelled, then the Friday edit from the floor team. The checker referees.

by TypeGlish team8 min read#best-practices
One grace period, two spellings.

TL;DR TypeGlish's time check compares a duration written as digits and a unit word, such as 30 minutes, so a Friday rule that holds tables for at most 15 minutes beside a 30-minute grace period is refused as logic/time, while beside half an hour the same pair checks clean at an A. Write every duration in a prompt as digits plus the full unit word, and put the busy-night hold in a $IF chain instead of a second line.

Nobody chooses how to spell a duration. The restaurant manager says half an hour because that is what they tell guests on the phone; the booking platform's settings page says 30 mins; the operations doc says 0.5 hours because it came out of a spreadsheet. The model reads all of them as the same thirty minutes. This bake-off measures whether the checker does, because the checker is the part that notices when somebody adds a second hold and nobody removes the first.

§1The contenders

A chat booking assistant for a group of three restaurants. Guests message it when they are running late, so the rule that matters most is the grace period: how long a booked table is held before it goes to the walk-in queue. It also looks up the booking before answering, keeps replies to two sentences, and stays out of deposit refunds, which the restaurant team handles. Two copies go into the ring. digits.tg writes the grace period as 30 minutes. words.tg writes it as half an hour. Nothing else differs.

digits.tg - the booking assistant, the hold written in digits✓ A (99/100)
$TOOL lookup_booking
  - description:: Look up a table booking by the guest's surname.
  - input::
    - surname:: string: the surname on the booking.

# Role
@@ role: one restaurant group, one booking line
You are Tilly, the booking assistant for Larder and Lamp, a group of three restaurants.

# Constraints
@@ grace: guests on a late train still get their table
- MUST hold every booked table for at least 30 minutes.
@@ late_lookup: never guess whether a table is still held
- WHEN a guest says they are running late THEN MUST call @[lookup_booking].
@@ brevity: a running-late guest is reading on a phone
- MUST keep every reply to at most 2 sentences.
@@ no_deposit: deposits are handled by the restaurant team
- NEVER offer a deposit refund.

$TEST running_late
  - input:: We are stuck on the train, about 20 minutes behind. Will you keep our table?
  - expect::
    - calls lookup_booking
    - says we hold the table
    - at most 2 sentences

$TEST deposit
  - input:: We can't make it tonight. Can I get my deposit back?
  - expect::
    - matches /^(?![\s\S]*refund)/
tg review - both contenders
$ diff digits.tg words.tg
12c12
< - MUST hold every booked table for at least 30 minutes.
---
> - MUST hold every booked table for at least half an hour.

$ npx typeglish review digits.tg
digits.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

$ npx typeglish review words.tg
words.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
A tie on every number the toolchain prints: same grade, no fixes, all four rules read, all four covered by a test. review counts the half an hour line as read, and it is: the modal, the verb and the object all parse. What it does not say is that the duration at the end of the line carries no bound. If the bake-off stopped here, the spelling would be a matter of taste.

§2The Friday edit

Friday late service is two sittings, and the floor team wants no-show tables back fast. Somebody opens the prompt and adds a hold of their own under the deposit rule, with its own @@ note. It is the realistic edit: they did not write the grace period, they did not search for it, and their line is correct for Friday. It is also unscoped, so on every other night the prompt now says both things.

tg check and build - the same Friday edit in each file✗ one refused, one shipped
$ diff digits-friday.tg words-friday.tg
12c12
< - MUST hold every booked table for at least 30 minutes.
---
> - MUST hold every booked table for at least half an hour.

$ npx typeglish check digits-friday.tg
digits-friday.tg:12:1  error  logic/time  Conflicts with line 20. Time conflict — "at least 30 minutes" and "at most 15 minutes" cannot both bound "you hold every booked table · for": the windows never intersect.
                  ↳ line 20: - MUST hold every booked table for at most 15 minutes.
digits-friday.tg:12:1  error  logic/numeric  Conflicts with line 20. Numeric conflict — "at least 30 minutes" and "at most 15 minutes" can't both hold.
                  ↳ line 20: - MUST hold every booked table for at most 15 minutes.
digits-friday.tg:20:1  error  logic/time  Conflicts with line 12. Time conflict — "at least 30 minutes" and "at most 15 minutes" cannot both bound "you hold every booked table · for": the windows never intersect.
                  ↳ line 12: - MUST hold every booked table for at least 30 minutes.
digits-friday.tg:20:1  error  logic/numeric  Conflicts with line 12. Numeric conflict — "at least 30 minutes" and "at most 15 minutes" can't both hold.
                  ↳ line 12: - MUST hold every booked table for at least 30 minutes.

✗ 1 file — 4 error, 0 warning, 0 info

$ npx typeglish score digits-friday.tg | head -1
digits-friday.tg — F (83/100)  proven errors — grade capped at F  tiers: base+z3

$ npx typeglish check words-friday.tg --strict
✓ 1 file — 0 error, 0 warning, 0 info

$ npx typeglish score words-friday.tg | head -1
words-friday.tg — A (100/100)  proven errors: none  tiers: base+z3

$ npx typeglish build words-friday.tg
✓ built .typeglish/dist/words-friday.txt ← words-friday.tg (1c0bc6424b7a, full)

$ grep -n "hold every" .typeglish/dist/words-friday.txt
5:- MUST hold every booked table for at least half an hour.
9:- MUST hold every booked table for at most 15 minutes.
digits-friday.tg is refused at F (83/100), twice over: the time layer and the numeric layer each prove that at least 30 and at most 15 cannot both hold. words-friday.tg builds at A (100/100), one point higher than before the edit, because the new line is a perfectly provable rule with nothing to be compared against. Both holds are in the artifact. A guest who messages at 19:20 to say they are 20 minutes behind gets whichever line the model leans on that turn: the failure in Your prompt argues with itself, with somebody's anniversary dinner in the middle of it.

Stripped to the two lines, the effect fits in the playground.

pair-digits.tg - 30 minutes, then 15✗ logic/time
# Role
You are Tilly, the booking assistant for Larder and Lamp.

# Constraints
- MUST hold every booked table for at least 30 minutes.
- MUST hold every booked table for at most 15 minutes.
pair-words.tg - half an hour, then 15 minutes✓ clean, B (87/100)
# Role
You are Tilly, the booking assistant for Larder and Lamp.

# Constraints
- MUST hold every booked table for at least half an hour.
- MUST hold every booked table for at most 15 minutes.
The first is refused at F (71/100). The second checks with 0 error, 0 warning, 0 info at B (87/100), with nothing in the output to say that one of its two lines carries no bound.

§3Nine ways to write half an hour

Two spellings is a small sample, so we ran the bake-off across every spelling of the grace period we have seen in booking prompts and platform exports. Each row is digits.tg with the grace period respelled, alone, then with the Friday line added as at most 15 minutes.

the results - one grace period spelled nine ways, then contradicted✗ 3 of 9 spellings defend it
# grace written as    alone        + "at most 15 minutes"
30 minutes            A (99)       logic/time F (83)
0.5 hours             A (99)       logic/time F (83)
half hour             A (99)       logic/time F (83)
half an hour          A (99)       passes A (100)
a half hour           A (99)       passes A (100)
thirty minutes        A (99)       passes A (100)
30 mins               A (99)       passes A (100)
30 min                A (99)       passes A (100)
1/2 hour              A (99)       passes A (100)
"Passes" means check reports 0 error, 0 warning, 0 info and build writes the artifact. Every row reads 4 of 4 rules alone, so review cannot tell the silent rows from the defended ones before the edit arrives.

The three defended rows are one rule: digits, or the bare word half, directly in front of a full unit word. Everything that bends that shape goes quiet. A number in words (thirty minutes), a fraction with an article attached (half an hour, a half hour), a slash (1/2 hour) and, most painfully, the abbreviation a settings page tends to use (30 mins, 30 min) all check clean beside a ceiling they contradict. half hour being read and a half hour not is exactly the kind of difference nobody will remember in review, which is the argument for a house style rather than a list of safe exceptions.

The edit's own spelling matters as much as the grace period's. Against the 30 minutes baseline, the Friday line was refused when written 15 minutes or 0.25 hours, and it passed at an A as fifteen minutes, 15 mins, a quarter hour or a quarter of an hour. A digit baseline does not protect itself from a worded edit.

Two spellings are worse than silent, because they are read as something else. a quarter of an hour as the grace period, beside a ceiling of an hour, is a consistent policy, and it is refused:

pair-quarter.tg - a quarter of an hour, then 1 hour✗ logic/time
# Role
You are Tilly, the booking assistant for Larder and Lamp.

# Constraints
- MUST hold every booked table for at least a quarter of an hour.
- MUST hold every booked table for at most 1 hour.
tg check - pair-quarter.tg
$ npx typeglish check pair-quarter.tg
pair-quarter.tg:5:1  error  logic/time  Conflicts with line 6. Time conflict — "at least a quarter" and "at most 1 hour" cannot both bound "you hold every booked table · for": the windows never intersect.
                 ↳ line 6: - MUST hold every booked table for at most 1 hour.
pair-quarter.tg:6:1  error  logic/time  Conflicts with line 5. Time conflict — "at least a quarter" and "at most 1 hour" cannot both bound "you hold every booked table · for": the windows never intersect.
                 ↳ line 5: - MUST hold every booked table for at least a quarter of an hour.

✗ 1 file — 2 error, 0 warning, 0 info
Refused at F (68/100). The message quotes the bound back as at least a quarter, with of an hour gone. Swapping the ceiling shows how long that quarter is: refused against at most 60 days and at most 2 months, passing against at most 100 days and at most 4 months. That is the length of a quarter of a year. As the Friday edit, the same phrase passes and shows up only as ~ unprovable in the score's rules table.

And an hour and a half loses its half. Beside an 80-minute ceiling, which a 90-minute floor plainly breaks, it checks clean:

pair-hour-half.tg - an hour and a half, then 80 minutes✓ clean, B (84/100)
# Role
You are Tilly, the booking assistant for Larder and Lamp.

# Constraints
- MUST hold every booked table for at least an hour and a half.
- MUST hold every booked table for at most 80 minutes.
0 error, 0 warning, 0 info. Written as at least 90 minutes, the same pair is refused as logic/time and logic/numeric. Against other ceilings, the phrase was refused beside at most 59 minutes and passed beside at most 61 minutes, and its conflict messages quote it as at least an hour: the checker holds the first two words and drops the rest.
The guest hears half an hour. The checker hears nothing at all.

§4Verdict: digits, a full unit, and a switch

Digits win, followed by the unit spelled out: 30 minutes, never 30 mins. 0.5 hours and half hour were defended too, but a house style should be the shape that is defended every time, and one unit for every duration under a day makes the audit a search rather than a judgment call. Say so in the @@ note, so the next author reads it at the moment they add a duration. It costs nothing at the guest's end: the house style binds the prompt, and the agent can still tell a guest in its reply that they have half an hour.

The refusal also forces a decision the worded file never asked for. Friday late service is not a second grace period, it is the same grace period on a different night, and the prompt should ship one of them. A $IF chain on a boolean the host passes does that: the compiler picks the arm, and the model only ever reads one hold.

fixed.tg - digits and minutes, Friday late service as a switch✓ A (100/100)
$REQUIRE variable friday_late: boolean default to false

$TOOL lookup_booking
  - description:: Look up a table booking by the guest's surname.
  - input::
    - surname:: string: the surname on the booking.

# Role
@@ role: one restaurant group, one booking line
You are Tilly, the booking assistant for Larder and Lamp, a group of three restaurants.

# Constraints
@@ grace: house style is digits and the word minutes; the floor team sets the hold and Friday late service shortens it
$IF @{friday_late} is equal to true:
  - MUST hold every booked table for at most 15 minutes.
$ELSE:
  - MUST hold every booked table for at least 30 minutes.
@@ late_lookup: never guess whether a table is still held
- WHEN a guest says they are running late THEN MUST call @[lookup_booking].
@@ brevity: a running-late guest is reading on a phone
- MUST keep every reply to at most 2 sentences.
@@ no_deposit: deposits are handled by the restaurant team
- NEVER offer a deposit refund.

$TEST running_late
  - input:: We are stuck on the train, about 20 minutes behind. Will you keep our table?
  - expect::
    - calls lookup_booking
    - says we hold the table
    - at most 2 sentences

$TEST deposit
  - input:: We can't make it tonight. Can I get my deposit back?
  - expect::
    - matches /^(?![\s\S]*refund)/
tg check, score, test --dry and build --vars - fixed.tg
$ 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   5 of 5 rule-shaped lines read · 5/5 covered by $TEST

$ npx typeglish test fixed.tg --dry
✓ fixed.tg  coverage: 5/5 rules exercised
  · running_late — "We are stuck on the train, about 20 minutes behind. Will you" (not run)
      ✓ at most 2 sentences
      · rubric — 2 prose expectations, judged on a live run (needs ANTHROPIC_API_KEY)
  · deposit — "We can't make it tonight. Can I get my deposit back?" (not run)
      ✓ matches /^(?![\s\S]*refund)/
✓ 1 prompt — 0 failed

$ npx typeglish build fixed.tg --vars '{"friday_late":true}'
✓ built .typeglish/dist/fixed.txt ← fixed.tg (b33c5f5b6504, full)

$ grep -n "hold every" .typeglish/dist/fixed.txt
5:- MUST hold every booked table for at most 15 minutes.
The Friday artifact carries one hold. The @@ note above the chain is where the house style lives, so it is the first thing the next editor sees when they come to change the hold.

The switch is still defended. Add the line somebody adds next, a 10-minute hold for New Year's Eve, outside the chain, and the build is refused against both arms, with the case that triggers each conflict named:

tg check - fixed.tg plus an unguarded New Year's Eve hold of 10 minutes✗ refused against both arms
$ npx typeglish check fixed-nye.tg
fixed-nye.tg:15:3  error  logic/time-strength  Conflicts with line 25. One bound per slot — "at most 10 minutes" already entails "at most 15 minutes"; the looser rule on "you hold every booked table · for" is dead weight. Keep one. A single serve can hold both - e.g. when friday_late = true.
              ↳ line 25: - MUST hold every booked table for at most 10 minutes.
fixed-nye.tg:17:3  error  logic/time  Conflicts with line 25. Time conflict — "at least 30 minutes" and "at most 10 minutes" cannot both bound "you hold every booked table · for": the windows never intersect. A single serve can hold both - e.g. when friday_late ≠ true.
              ↳ line 25: - MUST hold every booked table for at most 10 minutes.
fixed-nye.tg:17:3  error  logic/numeric  Conflicts with line 25. Numeric conflict — "at least 30 minutes" and "at most 10 minutes" can't both hold. A single serve can hold both - e.g. when friday_late ≠ true.
              ↳ line 25: - MUST hold every booked table for at most 10 minutes.
fixed-nye.tg:25:1  error  logic/time-strength  Conflicts with line 15. One bound per slot — "at most 10 minutes" already entails "at most 15 minutes"; the looser rule on "you hold every booked table · for" is dead weight. Keep one. A single serve can hold both - e.g. when friday_late = true.
              ↳ line 15: - MUST hold every booked table for at most 15 minutes.
fixed-nye.tg:25:1  error  logic/time  Conflicts with line 17. Time conflict — "at least 30 minutes" and "at most 10 minutes" cannot both bound "you hold every booked table · for": the windows never intersect. A single serve can hold both - e.g. when friday_late ≠ true.
              ↳ line 17: - MUST hold every booked table for at least 30 minutes.
fixed-nye.tg:25:1  error  logic/numeric  Conflicts with line 17. Numeric conflict — "at least 30 minutes" and "at most 10 minutes" can't both hold. A single serve can hold both - e.g. when friday_late ≠ true.
              ↳ line 17: - MUST hold every booked table for at least 30 minutes.

✗ 1 file — 6 error, 0 warning, 0 info
The New Year's Eve hold belongs in the chain as an arm of its own. Written at most ten minutes or at most 10 mins, the same line would have shipped beside both arms.

This is the duration edition of Bake-off: 1.30pm vs. 13:30, where the punctuation of a clock time decided whether two cut-offs were compared, and a companion to Bake-off: 12 months vs. 1 year, which covers what happens when two digit durations use different units. When the two bounds are both readable and simply stack up, as two response-time promises on one rule, Rewrite: two clocks on the same promise has the fix.

§5Common questions

Should I write half an hour or 30 minutes in a system prompt?
Write 30 minutes: digits, then the full unit word. In this run the checker read 30 minutes, 0.5 hours and half hour as durations and refused a 15-minute ceiling beside them as logic/time, while half an hour, thirty minutes, 30 mins and 1/2 hour were never compared, so the same contradiction checked clean at an A.
Why did my prompt pass the check when two time limits contradict each other?
Look at how each duration is spelled. A number in words, an abbreviated unit such as mins, or a fraction such as half an hour on either side leaves the time check nothing to compare. Rewrite both bounds as digits and a full unit word and run the check again; the conflict should appear as logic/time.
Does TypeGlish understand a quarter of an hour?
Not as fifteen minutes. In this run it quoted the bound back as at least a quarter and refused it beside a 1-hour ceiling, and it compared it like a quarter of a year. An hour and a half fared no better: it was quoted as at least an hour. Write 15 minutes and 90 minutes instead.
How do I give my booking agent a shorter grace period on busy nights?
Do not append a second hold line; the model reads both, and only a digit spelling gets the pair refused. Put both holds in a $IF chain on a boolean the host passes, such as friday_late, so build --vars ships one hold, and a later unguarded hold line is refused against both arms.
Field note

A duration is the fact in a CX prompt most likely to arrive in the spelling of whoever wrote it down first: the manager's half an hour, the platform's 30 mins, the spreadsheet's 0.5 hours. TypeGlish's time layer gives each slot, such as how long a table is held, one window, and refuses a file whose bounds on that slot cannot all hold, across minutes, hours, days and months alike, as long as each bound is digits in front of a unit word. Everything else is either silent, a file whose holds are never compared looking exactly like one whose holds agree, or read as a different length entirely. Two habits close the gap. Write every duration as digits and a full unit word, and say so in the @@ note. And when the same hold needs a different length on some nights, make it a $IF arm the host selects, so the build ships one hold and the checker defends the rest.

∿ washed up Nov 13, 2026 ∿