StoicBuilder

HandbookVII the BasilicaBusiness rules and edge cases

VIIthe Basilica, Build the right thing

Business rules and edge cases

1 min readUpdated 28 November

In plain words

Business rules are the policies your app must enforce, like refund limits or who can cancel, and edge cases are the unusual situations where those rules get tested.

Where you see it

The café owner says "ten stamps, free coffee". Then you ask whether a large counts as one stamp or two, whether stamps expire, and what happens when someone buys four coffees for friends. Each answer is a rule the agent must code, and each question you skip is a guess it makes for you.

Notion pageagent
Loyalty rulesR1: one stamp per drink bought, any sizeR2: at most 4 stamps per visitR3: stamps expire 12 months after the first oneR4: a free drink earns no stampEdge: drink refunded? Remove its stamp.Edge: two cards on one phone number? Not allowed.
Numbered rules can be quoted in prompts and tests: "check R2".

What goes wrong

  1. Rules the agent made up

    When you don't say, the agent picks something that looks reasonable. Stamps that never expire is a business decision, made without you.

  2. One rule in three places

    The refund limit appears in three files and one still says 30 days. Ask for each rule to live in one place, with a name.

  3. Testing only the normal case

    Ten coffees for ten people works. Ten on one card in one visit, a refund, a purchase at midnight: those are where the money leaks.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Find every business rule this feature depends on, such as limits, time windows and who may do what, and list them numbered in plain English. Mark each one as something I told you or something you assumed.

Quick check

Sign in to earn +10 XP for it

QuickBite gives 10% off a customer's first order. Which edge case do you need to decide?

Got a prompt that touches business rules and edge cases?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.