Real checks decide whether an AI-read invoice, lead or agent task may become a record. Try to break them.
AI proposes. Rules check. A person decides.
This console demonstrates the pattern behind my automation work on made-up data. Every check on these pages is real code running in your browser. The model step is pre-recorded, so the checks and the decisions are what you test.
Watch the pattern run
A document travels from a source to a record. A clean one passes every gate. A held one stops at a person and goes back through the same gates. Every step writes one audit log entry with an ID, a time and who decided.
Want to see how it is built before you try it?
A five minute path
What is real here, and what is simulated
Runs in this page
- Every check: required fields, line math, totals, duplicates, approved vendors, source codes and the risk policy.
- The one-rescan rule, and the saved rule that comes out of it.
- Person decisions that re-run the same checks and are logged.
- The agent task states, with undo for medium risk and a written reason for high risk.
- An audit log with an ID and a time for every event.
Simulated
- The model read. Fixed results stand in for a model reading a PDF.
- The email send. Approving a draft adds it to a simulated outbox.
- The system of record. Records live in this page and clear on reload.
- Agent execution. Approved tasks change nothing outside this page.
My real builds are described on the portfolio page.
The three workflows
Seen enough?
The portfolio page shows what runs daily at work and what was built and tested. I am happy to walk through any of this on a short call: ralphneeley@gmail.com.
Inbox
Select an invoice
Saved rules
Approved vendors (fictional)
Why it is built this way
- The order
- Catch, Read, Check, Rescan once, then Create or Hold, then Read back. Each stage has one owner, shown in the bar above.
- Checks are rules
- A rule gives the same answer every time and can say exactly why. A model asked to double check can agree with its own mistake.
- One rescan, then a person
- A second read with the failure named can fix a misread number. If it does not, a person should look. Duplicates and unapproved vendors never rescan, because a second read cannot fix them.
- Hold, never fix
- A silent fix turns a read error into bad data that looks fine. The held item keeps the evidence, and a person changes it on the record.
- Read back after create
- A create can succeed and the record still be wrong or missing. The read back compares the stored record with the document.
- Where the complexity is
- Five checks with three different failure paths, a saved rule that carries one fix forward, person edits that re-run the same checks, and a duplicate key that is checked before and after.
Leads
Select a lead
Attribution by source code
Routing table
Simulated outbox
Why it is built this way
- Attribution first
- The source code is checked before anything else is drafted. A lead that cannot be tied to a campaign cannot be routed, so it is held.
- Duplicates ignore case
- Emails are lowercased before comparing, so the same person typed two ways is still one lead.
- A person maps new codes
- A new code is a business decision about who owns it. The page lets a person add the route, logs it, and re-runs the checks.
- Approval needs a clean draft
- A draft with an empty body or an unfilled field cannot be approved. Approval adds one line to the outbox and nothing else.
Proposed tasks
Select a task
Risk policy
| Risk | What the gate requires | Undo |
|---|---|---|
| low | Approve or reject. A note is optional. | Not needed |
| medium | Approve or reject. A note is optional. | Available after approval |
| high | A written reason of five characters or more, then a second click to confirm. | None, which is why the gate is strict |
Task states
The highlighted state is the selected task. Counts show every task in each state.
Decision log
Why it is built this way
- Risk sets the friction
- A draft that sends nothing should take one click. A deletion with no undo should make a person say why. One policy table sets both.
- Undo beats asking twice
- Medium risk tasks run on one approval and can be undone. High risk tasks cannot be undone, so they ask for a reason and a confirm instead.
- Impossible states stay impossible
- A rejected task cannot run. An undone task cannot be undone again. Only a proposed task can be decided.
- Every decision is logged
- Each approve, reject, confirm and undo gets an audit ID, a time and a reason where one was needed.
Release slices
The new app replaces the old one a slice at a time. Slices start read only. Only S3 and S6 can change data, and only behind the switch.
Gates before any write
A write needs the switch on and an open window. Both are checked before the sheet is read.
Leads tab
Row 1 holds the headersTwo rows share one email on purpose. The key must match exactly one row.
Write one cell
Run a write to see each check
Append one row
Undo
Write log
One line per attempt that touched a rowThe send gate
Endpoints that never break the page
Self-test
Why it is built this way
- Strangler, not rewrite
- The new app uses the same sheet and replaces the old app one slice at a time. Reads go first because they cannot hurt anything. If a slice is wrong, the old app is still there.
- Off unless proven on
- A switch that is missing counts as off. A write power is turned on by a person, one slice at a time, and can be turned off again.
- Stay out of the old app's way
- The old app runs its own jobs at set times. The new app keeps out of those windows so two writers never meet on one row.
- Find the row by its key, every time
- A row number from an earlier read can be wrong by now. The key is looked up just before the write, checked again, then the one cell is written and read back.
- Refuse what is unclear
- No match, two matches, a value outside the list, a repeated key: each one is a refusal with a plain reason, never a guess.
- Every power can be undone, except one
- Undo restores only what the new app wrote and only where the cell still holds it. Appended rows are never removed. Sending is the exception, which is why it stays locked off.
- Say what is not built yet
- A function that has not moved answers with a message, so the page shows a reason instead of failing. A self-test proves each of these gates still holds.
The pattern behind all three workflows
This is a diagram of the pattern, not a screenshot of a system. The model never decides whether a record is created. Rules and people do.
What fails loudly
| Problem | Caught by | What happens |
|---|---|---|
| A required field is missing | Rule | One rescan, then hold. A person can enter the value. |
| Line math is wrong | Rule | One rescan, then hold. Nothing is recalculated for the person. |
| Total does not match the lines | Rule | One rescan, then hold. |
| Same vendor and invoice number again | Rule | Hold at once. A person discards it. |
| Vendor is not approved | Rule | Hold at once. A person can approve the vendor, on the record. |
| Lead has no known source code | Rule | Hold. A person adds the route. |
| Draft is empty or unfilled | Rule | Approval is blocked with the reason. |
| High risk task with no reason | Rule | Decision is blocked until a reason is written. |
| Record saved but wrong | System | The read back compares each field with the document. |
Principles
- One owner per step. Each stage in every view is tagged System, Model, Rule or Person. No step has two owners.
- The model reads and drafts. It does not decide. Creating a record, routing a lead and running a task are rule and person decisions.
- Failure keeps its evidence. A held item keeps the document, both reads and every check result.
- People act on the record. Every person decision re-runs the same checks and gets an audit entry.
- Nothing is fixed silently. A value changes only by a rescan that is logged, or by a person who is logged.
Decisions and what each one costs
| Decision | Why | What it costs |
|---|---|---|
| Rules check the model's work | Same answer every time, with a stated reason. | Every new document type needs its rules written. |
| One rescan, then a person | A second read with the failure named can fix a misread. Past that, a person should look. | Some fixable items reach a person. |
| Hold instead of auto-correct | Bad data that looks fine is worse than a queue. | A person has to clear the queue. |
| Read back after create | A successful create call does not prove the record is right. | One extra read per record. |
| Risk tiers on agent tasks | Friction should match the damage a task can do. | Someone has to classify each new task type. |
| An audit entry for every event | A question about what happened has a one place answer. | The log grows and needs a retention rule. |
What this page does not show
- A live model. Reads and drafts are recorded results.
- Real PDFs, real email, a real system of record or real agent tools.
- Volume. It handles a few dozen made-up cases, not thousands.
- Authentication, retries, rate limits and two people editing at once.
This page demonstrates the logic and the controls. It does not claim to demonstrate scale.
Why this console looks the way it does
I built a CRM app with a grouped sidebar, a 60 pixel top bar, stat cards, status chips, left-border alerts, skeleton loading and switchable themes. This console reuses that design language so the demos feel like the tools I build. Only the design language is reused. No company data, names, logos or screenshots appear here.
| In my CRM app | In this console |
|---|---|
| Navy sidebar with grouped sections and a left accent on the current view | The same sidebar. Groups are Overview, Workflows and System. |
| White top bar, 60 pixels high, with a soft shadow | The same top bar. It carries the view title, a one line purpose and the theme choice. |
| Stat cards at the top of a view | Stat cards show the live count of received, created, held and learned. |
| Rounded filter chips and status chips | Status chips on every queue row. Filter chips on the audit log. |
| Alerts with a colored left border | Info, warning, success and error alerts use the same border pattern. |
| Skeleton shimmer while data loads | Shown while a pre-recorded model read is in progress during a batch. It is still when your system asks for reduced motion. |
| Switchable themes through a data attribute | Navy, Light and Midnight. Midnight follows your system setting by default. |
| Monospace for data | Monospace for IDs, rules, payloads and code. |
How much logic is in this page
These counts come from the page's own code at load time, not from a written claim.
How the work was reviewed
Ten AI reviewer roles reviewed the console through six lenses. All reviewers are AI roles, not licensed professionals. Their job was to find what a hiring manager, an engineer or a user would trip on.
Every event from every view
Every approve, reject, rescan and edit in every view is listed here with an ID, a time and who decided.
| ID | Time | View | Who | Event |
|---|
No events yet. Run the invoice batch or make a decision in any view and the events appear here.