Part A · How DMA AI works
A.4The rule engine
Built in the POC- No.
- A.4
- Relates to DMA's book
- Decision Book p.7, p.8
- Part
- A · the foundation
What this part does · Decision Book p.7, p.8
DMA's book lets the AI act on its own by default, inside DMA-approved guardrails, and hands a deal to Josh on seven defined conditions: a new deal-size tier, non-standard terms, a payment problem, a request for a person, low confidence, a refund or cancellation, or no approved precedent.
Why DMA needs it: The limits are only real if code enforces them. A rule the AI is merely asked to follow can be talked around; a rule checked in code can't.
How we do it
- Before any consequential action (a CRM change, an email, a booking, a price, a handoff), the tool asks the rule engine. It answers ALLOW, HOLD (a person must decide) or DENY, with the reasons, and the answer is logged.
- The rules are DMA's settings, in plain words on the Rules page: which CRM fields the AI may write and how, which actions each worker may take, the email send limits, automatic pauses on bounces or complaints, the claims check, and the seven escalation triggers with who handles each.
- Every rule is versioned. Changing one takes two people: one proposes it (and can test it against recent real decisions first), a different person approves it, and only then does it become active. Any version can be restored.
- Escalations go to the person on DMA's roster for that trigger, with a backup and a response time. The AI stops on that thread until a person takes it.
The flow
It plays on its own while it's on screen; hover or use the controls to pause or step through.
An action is about to happen
A tool is called: create a lead, send an email, hand a chat to a person.
- AI
- Stored data
- Routing
- Screen
- Person
- Rule in code
Where the data goes
The same six stages on every page. Nothing reaches Nutshell except through the write gate.
- 1A tool call
Source
Any consequential action from any worker.
- 2Sync
Copies Nutshell changes into the bridge database
Nutshell changes can re-trigger rules (for example a field changed by a person).
- 3Bridge database
A copy of the CRM data, plus what the AI works out
Holds the rules and their versions, and every decision.
- 4AI
Claude models, only through DMA's own gateway
The AI doesn't decide whether it may act; the engine does.
- 5Write gate
The only way back into Nutshell: checked, approved when needed, sent once
The write gate asks the engine again before anything is written.
- 6Nutshell
The system of record
Only allowed, approved changes reach it.
The tables behind it
Drawn from the POC's database catalogue: structure only, no data.
PK primary keyFK reference the database enforces (solid line)ID reference kept by id (dashed line)
| Table | What it holds | Columns |
|---|---|---|
| ctrl.policy_rules | DMA's rules, one row per version: what it says, who proposed it and who approved it. | 21 |
| ctrl.decision_log | Every decision: allow, hold or refuse, the reasons and the trigger. | 28 |
| ctrl.escalations | Cases handed to a person: the trigger, who has it, and the deadline. | 33 |
| ctrl.roster | Who takes each escalation trigger, the backup and the response time. | 10 |
How the tables connect (7)
| Column | Points to | Kept by |
|---|---|---|
| ctrl.policy_rules.approval_id | ctrl.approvals | The application (by id) |
| ctrl.decision_log.agent_version_id | agent.agent_versions | The application (by id) |
| ctrl.decision_log.run_id | agent.runs | The application (by id) |
| ctrl.decision_log.conversation_id | conv.conversations | The application (by id) |
| ctrl.escalations.conversation_id | conv.conversations | The application (by id) |
| ctrl.escalations.run_id | agent.runs | The application (by id) |
| ctrl.escalations.decision_id | ctrl.decision_log | The application (by id) |
Worked example
Synthetic demo data: every name, business and number is made up.
A visitor asks for a person: the rule engine at work
What you see
1.DMA's rules, in plain words
The Rules page shows every active rule as a sentence, with search.

What happens in the system
- Bridge database
ctrl.policy_rulesEach rule is a version with its author and approver; only the active version is used.
Right-hand values come from a real run of the POC on September 25, 2026 (trace tr_muh5to4nxpbl16icb50m, tr_muh5to7f1f7s5ex202akt…). Rows marked “sample” are illustrative.
The rules active in the prototype, by kind, and what they cover.
DMA's rules today
| Kind of rule | Active | What it decides |
|---|---|---|
| CRM field permissions | 26 | For each Nutshell field: may the AI write it, on its own or only with approval, and only if nobody changed it since |
| Escalation triggers | 9 | DMA's seven triggers, plus a hostile message and a legal threat, each with its person and urgency |
| Action allowlists | 7 | Which actions each tool server may take, and at what autonomy |
| Automatic pauses | 2 | Pause sending when bounces or complaints pass a threshold |
| Send limits | 1 | Daily email cap, per-inbox limits, sending hours, the undo window |
| Claims check | 1 | No prices, promises or unsourced numbers in anything the AI writes |
| Classification, approval links | 2 | How incoming text is classified; how one-tap email approval links behave |
One rule, as a person reads it (escalation trigger 4)
- Rule
- The prospect asks for a person
- Decision
- HOLD: the AI stops on this threadRegardless of the deal's stage or value, as DMA's book says.
- Goes to
- Josh, with a backup if he doesn't respond in time
- Changing it
- Proposed by one person, approved by another, then active
In the running POC

1 / 5Rules: DMA's settings, each as a plain sentence.
- 1Search the rules.
- 2One rule, its kind and status.
Dashboard · Govern → Rules. Captured from the running POC on September 25, 2026; synthetic data.
See it live
Opens the exact screen in the running POC, in a new tab.
| Open | Where | What to try |
|---|---|---|
| Rules | DMA AI dashboard | Every rule in plain words, its version and history. |
| Escalation roster | DMA AI dashboard | Who takes each trigger, and the backup. |
| Escalations | DMA AI dashboard | Open cases, their briefs and deadlines. |
Status
Built in the POC. This capability runs in the POC today, on synthetic data, end to end.