Rule Placement Audit
Where is each hard rule actually enforced?
5 placements · 4 statuses · 1 worked example · entries stay in this browser
Built by Sunil Mathew, co-authored with Claude
A list of the rules your agent must never break (for example user no-go lists, allergens, spending limits, regions you can't serve), and a rough sketch of how one request travels through your system, from the user's input to the answer they see.
For each rule, mark where it is enforced: in code before the model sees the inputs, in the prompt, in code after the model answers, or nowhere. Flag every rule enforced only in the prompt or nowhere, and note the filter or check it needs.
A one-page map of your agent's hard rules and where each one is enforced, with the prompt-only and unenforced rules flagged as the first to move into code.
One row per rule. Tick only what you can point at.
Your entries stay in this browser. Nothing is sent to us.
Every rule, grouped by where it is enforced.
Add a rule, or load the worked example.
Not enforced 0 rules
Move these into code first.
None.
Prompt only 0 rules
Move these into code first.
None.
Model only 0 rules
Move these into code first.
None.
Enforced in code 0 rules
None.
Before you move on
How the ticks become one status.
The rule exists in a document or in somebody’s head. Nothing in the system reads it.
The model reads the rule and usually follows it. Some of the time it does not, and nothing notices.
A second model reads the step and usually catches the break. It is graded on the same distribution as the first one, and the same inputs fool both.
Code either runs or it does not. If the rule is broken, the check itself has a bug, which is a bug you can find.
A rule written in the prompt is one input among many. The model weighs it against the user’s message, the retrieved data and everything else in the context. Most of the time it complies. Some of the time it does not, and nothing in the system notices. A critic model checking the step is the same thing twice: a second weighing, with the same blind spots.
Code does not weigh. There are two places to put a rule in code. A filter before the model removes what the model must never choose before it sees the inputs: if the blocked restaurants are not in the candidate list, the model cannot recommend one. A check after the model tests the answer or the action against the rule before it reaches the user or runs. When more than one agent can act, put the check at the tool or data boundary, so it holds whichever agent asked.
A restaurant-picking app with three agents
A planner agent reads the request, a recommender agent picks restaurants, and a booking agent reserves a table and pays a deposit. All three can call the same booking and payment tools.
| # | Rule | Who set it | Agents | Enforced | Status | If broken | Fix to add | Owner |
|---|---|---|---|---|---|---|---|---|
| 01 | User's no-go restaurant list | User | One agent | In the prompt | Prompt only | Agent recommends a restaurant the user blocked | Both | Recommendations team |
| 02 | Never suggest a dish containing a declared allergen | User | More than one | In the prompt; By another model | Model only | A user with a nut allergy is sent to a satay place; the critic model passed it | Both | Recommendations team |
| 03 | Deposit per booking never above ₹2,000 without a human approval | Business | More than one | In code, after the model | Enforced in code | A ₹12,000 deposit goes out for a party of twenty; the planner agent called the payment tool directly | Enforce at the tool or data boundary | Payments team |
| 04 | No bookings for venues outside the licensed delivery region | Legal or regulatory | Not sure | — | Not enforced | A reservation is made across the state line, where the product is not licensed | Enforce at the tool or data boundary | — |
- 01 The prompt is something the model weighs. Add a filter before the model, a check after it, or both.
- 02 A critic or guardrail model is a second opinion, not a guarantee. Keep it, and add a check in code.
- 02 More than one agent can act on this rule and it is not enforced at the tool or data boundary. A check inside one agent does not cover the others.
- 03 More than one agent can act on this rule and it is not enforced at the tool or data boundary. A check inside one agent does not cover the others.
- 04 Nothing enforces this rule. Start here.
- 04 List which agents can act on this rule. A rule enforced in one agent is not enforced in the ones you have not listed.
The rules only one person knew about are the ones to worry about.
- 01 List the rules before anyone opens the code.
Ask each person to write down the rules the agent must never break. The union of the lists is the sheet. The rules only one person knew about are the ones to worry about.
- 02 Trace one request, and tick what you can point at.
For each rule, follow one request from input to answer and tick a placement only when someone can name the file, the prompt line or the tool setting that enforces it. A placement nobody can point at is not ticked.
- 03 Fill "What happens if it is broken" in one sentence each.
That sentence is what decides the order of the fixes. A rule with a refund in it goes before a rule with a tone in it.
- 04 Give every flagged rule an owner and a fix, then print the map.
The map is the artefact. The prompt-only and model-only rows at the top are the first pull requests.
The model was not at fault. The rule was in the wrong place.
The map is the easy half. What it cannot do on its own is settle the row where one person says the check is in code and another says it is in a prompt that a code path reads. That row is the one to open the repository for.
Published 17 September 2026 · free to use and to pass on