> Markdown rendition of https://typeglish.dev/blog/returns-label-rewrite ("Rewrite: we'll email you a free returns label - Tidelines"). Canonical page: https://typeglish.dev/blog/returns-label-rewrite · All pages: https://typeglish.dev/llms.txt

[← Tidelines](https://typeglish.dev/blog)/ Best practices Nov 8, 2026

# Rewrite: we'll email you a free returns label

The returns team has a new API that makes a label on the spot, and they want the chat agent to hand labels out. Their help-page paragraph goes into the prompt as written. It checks clean at a C, promises an email the agent will never send, and calls every label free one line above the one that says some are not.

by **TypeGlish team** 7 min read #best-practices

Free to post. Mostly.

**TL;DR** When your support agent starts sending returns labels, let a label tool own the postage cost, the expiry date and the replacement for a lost label, ask the customer for the drop-off method the tool needs, and scope every rule that states a cost on whether that tool has run.

Fernhill sells outdoor clothing online. Its chat assistant, Rowan, starts returns through a `start_return` tool, and until now the label followed a day later by email from the warehouse system. Customers chased it in the chat, and Rowan could only say it was on its way. This month the returns team got an API that creates a label on the spot, and they want Rowan to hand labels out directly. The first thing they paste in is the paragraph from the returns help page. This is the rewrite that turns it into something Rowan can follow.

## §1 Before: the help-page paragraph

before.tg - the live prompt, plus the returns-label section ✓ C (79/100)

```typeglish
$TOOL start_return
  - description:: Start a return for an item in an order.
  - input::
    - order_id:: string: the order the item came from.

# Role
You are Rowan, the support assistant for Fernhill, an online outdoor clothing shop.

# Constraints
- MUST keep every reply to at most 4 sentences.
- WHEN a customer asks for a refund THEN MUST call @[start_return].

# Returns labels
We'll email you a free returns label within 24 hours. Returns are free for UK orders.
- ALWAYS send a free returns label.
- NEVER send a free returns label for an international order.
- Customers can also use a QR code at the post office instead of printing.
- Labels expire after 14 days, so remind customers to post it quickly.
- If a customer has lost their label, send them a new one.
```

Everything above `# Returns labels` is the live prompt. The section is the help-page paragraph, followed by five lines the returns team wrote from it.

tg check and score - before.tg ✓ 0 error

```
$ typeglish check before.tg
before.tg:17: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 "Customers" 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:17:1  info   prompt/unintroduced-definite  "the post office" retrieves something this document never introduces - a model must guess which office is meant. Mention an office on an earlier line, or anchor it here ("their office", "the office you ...").
before.tg:17: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:18: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 "Labels" 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:19:1  info   typeglish/if-then  IF needs a THEN — write IF <condition> THEN <action>.
before.tg:19: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> ….

✓ 1 file — 0 error, 0 warning, 6 info

$ typeglish score before.tg
before.tg — C (79/100)  proven errors: none  tiers: base+z3
  planes  runtime 91 (what the model reads) · hygiene 46 (source only)
  facets  enforceability 79 x.21 · hardness 100 x.12 · directness 85 x.08 · consistency 100 x.17 · structure 92 x.12 (hygiene) · annotation 0 x.12 (hygiene) · style 83 x.08 · security 100 x.08
  lever   annotation 0/100 (up to +12 overall) — 9 statements without a @@ note (L7 L10 L11 L14 L15 L16 L17 L18 +1 more) — put a "@@ why" line directly above each
  rules   4 of 7 rule-shaped lines read
    L17  ✗ invisible     Customers can also use a QR code at the post office instead of printing.
                         no modal (MUST / NEVER / SHOULD) and "Customers" 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 …)
    L18  ✗ invisible     Labels expire after 14 days, so remind customers to post it quickly.
                         no modal (MUST / NEVER / SHOULD) and "Labels" 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 …)
    L19  ✗ invisible     If a customer has lost their label, send them a new one.
                         the condition has no THEN branch, so nothing is required when it holds → add THEN MUST / NEVER / SHOULD <verb> …
  L17  prompt/unintroduced-definite −0.25  "the post office" retrieves something this document never introduces - a model
  L17  prompt/unregistered-doer     −0.25  A bare generic doer never enters the world model - instruction to the agent, o
  L19  typeglish/if-then            −0.25  IF needs a THEN — write IF <condition> THEN <action>.
```

## §2 What the clean run is telling you

No errors, no warnings, a C, and a rules table that names three of the new lines as invisible. Read it as a list of things the checker could not do, because each one is something the model will do instead.

**Three lines are background, not rules.* Customers can also use a QR code at the post office instead of printing* is a fact about customers, with no modal. *Labels expire after 14 days, so remind customers to post it quickly* glues a fact to a reminder with *so*, and *quickly* is not something anyone can measure. *If a customer has lost their label, send them a new one* has the right idea and the wrong shape: an `IF` with no `THEN`, so the reader finds nothing required when it holds. The model will still read all three. It will decide for itself when a QR code is worth mentioning and what quickly means.

**Line 14 draws nothing, and it is the one the customer will hear.* We’ll email you a free returns label within 24 hours.* was written by the shop, to the customer, for a help page. In a prompt, the model speaks for the shop, so this is a sentence it can repeat word for word. The new API puts the label in the chat in seconds. The paragraph tells the customer to wait a day for an email that is never sent. [Rewrite: we'll refund the difference](https://typeglish.dev/blog/price-adjustment-rewrite) takes apart the same first-person help-page voice.

**Lines 15 and 16 are a fight with no finding.** `ALWAYS send a free returns label.` applies to every customer. `NEVER send a free returns label for an international order.` is meant as its exception, but *for an international order* is not a condition the checker reads. It is part of the action, so the ban and the obligation are about different things and never get compared. A customer in Dublin who asks for a label is covered by both, and the model picks.

> Free is not a policy the agent can apply. It is the price of one label, and only the order knows which one.

## §3 Fix the shape, find the fight

Before deciding what the international rule should say, put the exception into a shape the checker can compare: the same action on both lines, and the scope as a condition.

scoped.tg - the free label and its exception, both readable ✗ logic/contradiction

```typeglish
You are Rowan, the support assistant for Fernhill.

# Constraints
- ALWAYS send a free returns label.
- IF the customer lives outside the UK THEN NEVER send a free returns label.
```

tg check - scoped.tg ✗ build refused

```
$ typeglish check scoped.tg
scoped.tg:4:1  error  logic/contradiction  Conflicts with line 5. Logical conflict — "send a free returns label." is both required and forbidden. Keep one, or scope the two rules so they cannot both apply (IF <condition> THEN ...).
           ↳ line 5: - IF the customer lives outside the UK THEN NEVER send a free returns label.
scoped.tg:5:1  error  logic/contradiction  Conflicts with line 4. Logical conflict — "send a free returns label." is both required and forbidden. Keep one, or scope the two rules so they cannot both apply (IF <condition> THEN ...).
           ↳ line 4: - ALWAYS send a free returns label.

✗ 1 file — 2 error, 0 warning, 0 info
```

The condition does not shelter the ban. The obligation has no condition, so it still covers the customer outside the UK, and one action cannot be both required and forbidden.

That is the fight the paragraph was hiding, now refusing to build. The obvious patch is a matching condition on the obligation, *IF the customer lives in the UK*. That would compile, and it would leave the model deciding where each customer lives from what they type. The order already knows where it was shipped. So does the label API, because it has to price the postage.

So the cost leaves the prompt. A `create_return_label` tool returns the label’s link, its expiry date and the postage cost, and its description says what the returns team decided: free for UK orders, at cost everywhere else. The description also says that calling it again for the same order replaces a lost label, which turns line 19 into a one-line rule. The QR code line becomes a typed input, `drop_off:: one of printed_label, qr_code`. The tool cannot run without it, so Rowan has a reason to ask, and the rule that makes it ask can be read: `WHEN the customer asks for a returns label THEN MUST ask which drop-off method the customer wants.`

The prompt keeps one job on cost: never say one until the tool has answered. The first draft of that had a bug, and the checker found it.

draft.tg - the first draft of the cost rules ✗ logic/contradiction

```typeglish
You are Rowan, the support assistant for Fernhill.

# Context
Every returns label comes from the label tool.

# Constraints
- IF the label tool has not run THEN NEVER state a postage cost.
- MUST state the postage cost.
```

tg check - draft.tg ✗ build refused

```
$ typeglish check draft.tg
draft.tg:7:1  error  logic/contradiction  Conflicts with line 8. Logical conflict — "state the postage cost." vs "state a postage cost." is both required and forbidden. Keep one, or scope the two rules so they cannot both apply (IF <condition> THEN ...).
          ↳ line 8: - MUST state the postage cost.
draft.tg:8:1  error  logic/contradiction  Conflicts with line 7. Logical conflict — "state the postage cost." vs "state a postage cost." is both required and forbidden. Keep one, or scope the two rules so they cannot both apply (IF <condition> THEN ...).
          ↳ line 7: - IF the label tool has not run THEN NEVER state a postage cost.

✗ 1 file — 2 error, 0 warning, 0 info
```

*the postage cost* and *a postage cost* are compared as one action. The article does not hide the conflict.

`MUST state the postage cost.` has no condition, so it applies before the tool has run as well as after, which is exactly when the line above forbids it. The fix is to scope it on the event it depends on: `IF the label tool has run THEN MUST state the postage cost.` The expiry date gets the same shape. One honest caveat: the checker does not prove that *has run* and *has not run* cannot both hold. Two rules guarded by different conditions draw no error, even when both conditions can be true at once. The wording makes them opposites, and the `international_label` test below is what holds them apart. [Why your agent promises the refund instead of issuing it](https://typeglish.dev/blog/agent-promises-the-refund) covers the same gap between a tool and a sentence about it.

## §4 After: a label tool, scoped rules, four tests

rowan.tg - labels as a tool, facts, rules and tests ✓ A (99/100)

```typeglish
$TOOL start_return
  - description:: Start a return for an item in an order.
  - input::
    - order_id:: string: the order the item came from.

$TOOL create_return_label
  - description:: Create a returns label for an order and return its link, its expiry date and the postage cost. Postage is free for UK orders and charged at cost for every other country. Calling it again for the same order replaces a lost label.
  - input::
    - order_id:: string: the order the item came from.
    - drop_off:: one of printed_label, qr_code: how the customer will hand the parcel in.

# Role
@@ role: one sentence names the speaker, so every later "you" is the agent
You are Rowan, the support assistant for Fernhill, an online outdoor clothing shop.

# Context
@@ label_source: introduces the label and where it comes from, for every rule below
Every returns label comes from the label tool.
@@ expiry_fact: a fact the agent can explain; the tool returns each label's own date
A returns label expires 14 days after the label tool creates it.

# Constraints
@@ brevity: a chat bubble, not an email
- MUST keep every reply to at most 4 sentences.
@@ refund_tool: a refund request starts a return; the label is a separate step
- WHEN a customer asks for a refund THEN MUST call @[start_return].
@@ label_tool: the tool knows the country, the cost and the date; the agent does not
- WHEN the customer asks for a returns label THEN MUST call @[create_return_label].
@@ drop_off_choice: the tool needs the method, so ask before calling it
- WHEN the customer asks for a returns label THEN MUST ask which drop-off method the customer wants.
@@ no_guessed_cost: free is a fact about UK orders, not about every order
- IF the label tool has not run THEN NEVER state a postage cost.
@@ cost_from_tool: the customer hears the cost the tool returned, including zero
- IF the label tool has run THEN MUST state the postage cost.
@@ expiry_from_tool: a date the customer can act on, instead of "post it quickly"
- IF the label tool has run THEN MUST state the label's expiry date.
@@ lost_label: the same tool replaces a lost label, so a resend is one call
- IF the customer has lost the label THEN MUST call @[create_return_label].

$TEST uk_label
  - input:: I ordered a rain jacket and it's too big. Can I have a returns label? I'll take it to a post office.
  - expect::
    - at most 4 sentences
    - calls create_return_label
    - states the postage cost
    - states the label's expiry date
    - matches /^(?![\s\S]*24 hours)/i

$TEST international_label
  - input:: I live in Ireland and want to send back some boots. Do you have a free label?
  - expect::
    - asks which drop-off method the customer wants
    - matches /^(?![\s\S]*\d+\.\d\d)/
    - does not state a postage cost before the label tool has run

$TEST lost_label
  - input:: I had a returns label for order FH-20931 but I've lost the email.
  - expect::
    - calls create_return_label

$TEST refund
  - input:: The tent poles arrived snapped. I want a refund.
  - expect::
    - calls start_return
```

The 24-hour email, the word *free* and *quickly* are gone. The 14 days stays, as a fact Rowan can explain; each label’s own date comes from the tool.

`uk_label` is the everyday chat, and its deterministic assert, `matches /^(?![\s\S]*24 hours)/i`, fails if the old email promise ever leaks back into a reply. `international_label` is the customer in Ireland who asks for a free label. Rowan’s first reply should be the drop-off question, so the assert `matches /^(?![\s\S]*\d+\.\d\d)/` passes only when no price-shaped number such as *7.95* appears before the tool has been called. `lost_label` checks that a lost email becomes a second call to the same tool, and `refund` is the regression test for the rule that was already live.

tg check, score and test --dry - rowan.tg ✓ 8/8 rules exercised

```
$ typeglish check rowan.tg
✓ 1 file — 0 error, 0 warning, 0 info

$ typeglish score rowan.tg
rowan.tg — A (99/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 91 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   8 of 8 rule-shaped lines read · 8/8 covered by $TEST

$ typeglish test rowan.tg --dry
✓ rowan.tg  coverage: 8/8 rules exercised
  · uk_label — "I ordered a rain jacket and it's too big. Can I have a retur" (not run)
      ✓ at most 4 sentences
      ✓ matches /^(?![\s\S]*24 hours)/i
      · rubric — 3 prose expectations, judged on a live run (needs ANTHROPIC_API_KEY)
  · international_label — "I live in Ireland and want to send back some boots. Do you h" (not run)
      ✓ matches /^(?![\s\S]*\d+\.\d\d)/
      · rubric — 2 prose expectations, judged on a live run (needs ANTHROPIC_API_KEY)
  · lost_label — "I had a returns label for order FH-20931 but I've lost the e" (not run)
      · rubric — 1 prose expectation, judged on a live run (needs ANTHROPIC_API_KEY)
  · refund — "The tent poles arrived snapped. I want a refund." (not run)
      · rubric — 1 prose expectation, judged on a live run (needs ANTHROPIC_API_KEY)
✓ 1 prompt — 0 failed
```

The `matches` and sentence-count asserts run on every reply with no model judging them. The tool and wording expectations are judged on a live run.

One decision the suite leaves to the returns team: whether an international customer who sees the postage cost can still choose a refund without sending the item back. That is policy, not prompt. Once they decide it, it gets a tool description, a rule, and a test of its own.

## §5 Common questions

**How do I let my AI support agent send returns labels?**

Give it a label tool that creates the label and returns its link, its expiry date and the postage cost, and make the agent call that tool whenever a customer asks for a label. Keep the cost decision out of the prompt: the tool knows which country the order went to, and the agent does not.

**Why does my chatbot tell international customers their return is free?**

Usually because the prompt says every label is free and puts the exception in a trailing phrase such as for an international order. The model has to decide which sentence wins on each chat. Let the label tool return the cost, and ban stating any cost until the tool has run.

**Should my agent remind customers that a returns label expires?**

Give it the date instead of a reminder. A rule like remind customers to post it quickly cannot be checked, while a rule that states the label's expiry date from the tool can, and the customer gets a date they can act on.

**Can TypeGlish catch a rule that contradicts its own exception?**

Yes, once both are in a shape it can compare. A guarded NEVER beside an unguarded MUST on the same action is a logic/contradiction error, even when one says the postage cost and the other a postage cost. Two rules guarded by different conditions draw no error even when both conditions can hold, so test the case where they meet.

Field note

The rules table in `typeglish score` is the quickest way to review a pasted help page: every line it marks *invisible* is a sentence the model will read and interpret with no rule behind it, and every line with no finding at all deserves a second look for who it is speaking to. The help page itself can keep saying *free returns*. It is written for UK customers reading the returns page, and the prompt is written for every customer who opens the chat. Postage is one of several numbers that only the order knows; [Your threshold has no meter](https://typeglish.dev/blog/threshold-has-no-meter) is the same lesson for the free-delivery total.

∿ washed up Nov 8, 2026 ∿
