E1 · Five IF/THEN rules
20 minStarting from padrao.md, write 5 rules in the template. Include at least one exception that calls a person.
Done when: the file has 5 rules, each with a visible condition, a specific action, and who answers.
Lesson 5 · 18 min
The pattern from the cases is still in your own words. Now it becomes an IF/THEN rule in the owner's words. It goes through three cases the owner didn't use to teach you, then it goes into a file with an owner, a date, and a version. This is the file any assistant will read later, and it's the one the company keeps.
Start the lesson
Goal: turn the pattern from the cases into IF/THEN rules, test them on 3 new cases, and save them in a file with an owner and a date.
Each rule goes through the five steps before it goes into the file.
Without validation, the assistant's first week exposes the mistake in front of the customer.
The test: can someone who doesn't know the company apply it?
The condition has to show up in what the customer wrote or in the system: "asks about price," "mentions surgery," "is the first time."
"When the customer seems serious" is not a condition: nobody can see that.
The action says what to do and, when it matters, what not to do: "ask about the insurance plan; don't send a price."
An action with two outcomes becomes two rules.
"When people ask about the price of a package, I never send a number; I ask about the insurance plan, because it changes." → IF they ask about the price of a package AND haven't said their insurance plan THEN ask about the insurance plan; do NOT send a price.
Every rule that can go wrong at a high cost points to a person: "IF they mention recent surgery THEN call the physical therapist".
In the file, each rule has someone who answers for it.
The owner approves the 3 new cases without changes, or the change is a word, not the structure.
They can already predict what the rule will do before you show it.
The rules file is plain text: any tool can read it. Replace what is between < > with your own.
# Rule test <RNN> — <date> Rule: IF <condition> THEN <action> | New case (no name) | What the rule says to do | What the owner would do | Match? | |---|---|---|---| | <case 1> | <...> | <...> | yes/no | | <case 2> | <...> | <...> | yes/no | | <case 3> | <...> | <...> | yes/no | Owner's change: <word or structure; what changed> Result: mature / back to IF/THEN
# Rules for <area> — <business> File owner: <name and role> Version: <v1> Updated on: <date> Source: cases collected with <owner> on <date>; each tested on 3 new cases. Do not keep any client's name, phone number, or health data here. ## R01 — <short name> IF: <visible condition> THEN: <action> DON'T: <what not to do, if any> Who answers: <person> Tested on: <date> (3/3) ## R02 — <short name> ... ## History - <date> v1: created with <N> rules - <date> v2: <what changed and why>
# Rules for customer service — Clínica Vila Serena (fictional) File owner: the owner (proprietor) Version: v1 Updated on: <date> ## R01 — Insurance before price IF: asks the price of a package AND hasn't said their insurance plan THEN: ask which insurance plan, or whether it's private pay DON'T: send a price before that Who answers: front desk Tested on: <date> (3/3) ## R02 — Recent surgery IF: mentions surgery in the last 6 months THEN: say the physical therapist will answer, and notify the physical therapist Who answers: physical therapist on duty Tested on: <date> (3/3, word change)
Somewhere in the company, not just on your computer: a shared folder for the business, with the owner as the file's owner. The consultant leaves; the rules stay.
How to organize this context pack (what goes in, who updates it, how often) is covered in AI Management · Resources, lesson 3. If the file cites examples of conversations, remove names and health data: the care required by LGPD (Brazil's data protection law) applies to your drafts too.
Continue with Vila Serena (fictional) from the pattern in lesson 4.
Starting from padrao.md, write 5 rules in the template. Include at least one exception that calls a person.
Done when: the file has 5 rules, each with a visible condition, a specific action, and who answers.
For each rule, write 3 new cases (fictional, different from the ones in lesson 4), with at least 1 designed to break the rule (the exception, the edge case). Ask someone else to play the owner and say what they would do in each case, without seeing the rule. Adjust any rule that fails and test again.
Done when: all 5 rules have a test table with 3 new cases, one of them an edge case, the "what the owner would do" column filled in by someone else, and the result "mature."
Build regras-vila-serena.md with the complete header and the history.
Done when: the file has owner, version, date, and history at the top, and a search for a name or phone number finds nothing.
Question 1 of 4
Which of these is a rule condition you can actually check?skill
Question 2 of 4
Why test the rule on cases that weren't used to create it?skill
Question 3 of 4
The owner hears the rule and changes one word. What does that indicate?
Question 4 of 4
Where should the rules file live?
Pick an answer. The explanation shows up after you try.