Repeatable intake checks
Five controls expose missing fields, duplicate requests, invalid ages, unknown categories and overdue work.
Automation & applied AI · Portfolio project
A repeatable workflow for incoming requests: catch intake issues, prepare the right owner queues and use AI to draft the review brief.
A shared inbox can become a manual sorting exercise: identify incomplete or duplicate requests, decide who owns each item and chase work that has waited too long. This project makes those steps repeatable and gives an AI reviewer structured evidence for a first review draft.
Five controls expose missing fields, duplicate requests, invalid ages, unknown categories and overdue work.
Eligible requests become a proposed queue for Service Desk, Finance or Operations, with overdue follow-ups clearly flagged.
The AI drafts observations and next steps from the control evidence. A person reviews the brief and approves any action.
Choose an inbox and run the workflow. Both scenarios are invented. The corrected example is a separate fixture, not an automatic repair of the exception data. Changing a selection clears the previous results.
One row per intended request. Age is whole elapsed hours at a fixed snapshot of 30 September 2026, 12:00 UTC; weekends and working hours are not adjusted.
| Row | Demo identifier | Subject | Age (hours) | Category |
|---|
| Control | Result | Observed | Evidence & follow-up |
|---|
The same JavaScript engine runs in the browser and the command-line runner. It checks the intake, excludes every row in a duplicate group, builds a routing plan for eligible requests and identifies items older than the chosen threshold. The route rules are explicit: access requests go to Service Desk, billing to Finance and general requests to Operations.
An unresolved intake issue blocks release of the batch. Eligible routes remain visible as diagnostic proposals. A threshold breach calls for review; it does not prove urgency. Nothing in this demonstration sends a message, creates an external task or silently changes the source.
The AI step turns the exception register into a short review brief: what needs attention, what the evidence establishes and what follow-up to request. It receives aggregate counts, queue totals, the snapshot and control results. Request subjects, identifiers and row references are excluded.
The public page runs locally in your browser and does not call an AI provider. The worked example below is AI-authored text prepared for the default scenario; it is not a saved API response. The downloadable runner implements the live AI step separately.
Every flagged control must appear exactly once in the AI output, with its observed count unchanged. Unknown controls, missing findings, refusals and incomplete responses fail the AI step. These checks constrain the structure and cited counts; a person still needs to assess the narrative and approve any action. AI cannot change the control results or release the batch.
Download the source and tests Inspect the control engine
Extract the source bundle and run these commands from its root with Node.js 22 or later. The workflow and tests use built-in Node modules, with no package installation or external service required.
For a fresh AI draft, provide an API key through your local environment and choose a model that supports structured outputs. Keep the key outside the website, source files and shell history. The explicit --ai flag sends the synthetic aggregate evidence to OpenAI and can incur API charges.
The runner prints the routing plan, control evidence, its SHA-256 fingerprint and any AI draft as JSON. It requests store: false, imposes a request timeout and leaves any accepted draft awaiting human review. Without --ai, it makes no external request. The integration follows the official Responses API structured-output documentation.
The exception fixture contains 14 incoming rows: 8 are eligible for a draft routing plan and 6 are excluded. All five controls flag an issue at the default 24-hour threshold. The corrected fixture contains 12 eligible requests, split four per queue, with no overdue requests at that threshold.
This is a working prototype for workflow automation and a bounded AI handoff. It does not claim production deployment or measured time savings. It uses small synthetic batches and supplied categories rather than classifying unstructured emails. A production extension would need an approved inbox integration, business-calendar rules, access controls, broader tests and human approval before creating or sending work.