/// case study 025
AI / ML
Project 025

Strata Enquiry Triage

A single-file Python CLI that turns an inbound client enquiry into a triaged, actionable record: Claude picks from a closed six-category enum, self-rates confidence, scores urgency (legal/safety/financial deadlines surface first), drafts a polite Australian-English reply under a no-invented-facts rule, and recommends a routing action — every output a draft a human reviews before sending. Output is a typed dataclass with PII-aware flags; three layers of error handling map API failures to distinct exit codes. A browser-based live demo shares its system prompt with the CLI, and a CI drift-guard fails the build if the two fall out of lock-step.

Strata Enquiry Triage — screenshot
19 pytest + 14 node
Tests
Closed 6-value enum
Categories
Draft-not-send
Posture
AI / ML
Category
The Problem

What Wasn't Working

Strata firms get a high volume of inbound emails across shared inboxes, and the office manager spends the first 90 minutes of every morning reading and sorting them — in a workflow where send-without-review is not on the table.

The Solution

How I Fixed It

Strict JSON-output prompting with a closed category enum, self-rated confidence, urgency scoring so tribunal-bound complaints surface first, and a polite AU-English draft reply — a structured queue staff can scan, edit, and send.

Stack

Technologies Used

Python 3.10+
Anthropic SDK
Claude Sonnet 4.5
pytest
GitHub Actions
Results

Key Outcomes

Typed dataclass output that plugs into Laravel jobs, n8n, IMAP listeners, or Zapier
Distinct non-zero exit codes per API failure class for orchestrator retry logic
Live no-backend browser demo on GitHub Pages (user-supplied key, localStorage only)
CI drift-guard fails the build if the Python and JS prompts diverge

Want something like this?

Let's build it. I ship fast and I ship clean.