← back to the TailTracker brief
TailTracker · System diagrams

When the model
earns its place.

● BUILT & TESTED · PRE-DEPLOYMENT

A full shelter-management system for a no-kill shelter, built solo and pro bono. Claude is woven in only where judgment helps — and deliberately kept out of everything deterministic. Four diagrams on the line between the two.

01 / 04 — THE CONTRAST

Same clock,
opposite engines.

A shelter runs on shifts, so some work is genuinely periodic — and the honest tool for periodic work is a clock. Two of the scheduled jobs fire from one token-protected endpoint, then split completely: the briefings fan out across the staff roster and ask Claude to write each one; the 4AM triage sweep runs six pure-SQL checks and emails the morning exception report. Same trigger, opposite engines — one leans on the model, the other never touches it.

PROBABILISTIC · AI BRIEFINGS DETERMINISTIC · 4AM TRIAGE SCHEDULED cron.php token-protected hypervisor cron ?briefings06·12·18:00 ?triage04:00 FAN-OUT15 briefingsadmin+sys fold in per role ×15 ASSEMBLEcontextgaps·vet·events THE MODELClaude Haiku4.5 STOREbriefings CONSUMEDhome embednext login · collapsed resilience · AI fails → last good briefing kept, never blank 6 PARALLEL SQL CHECKS · no model stale care · no log 24h+ vet reqs · emrg/urgent >4h incidents · open >2h foster returns · due ≤3d zero-stock inventory certs expiring · ≤30d TALLYwarningscount REPORTemail → managementMailer::alert() · triage.log all clear ✓ N exceptions ⚠ Claude / AI — probabilistic pure SQL — deterministic exception / alert
02 / 04 — THE HEARTBEAT

Scan. Log. Next.

The thing the whole app is built around. A staff member scans a kennel's QR, the animal's care card loads, they log an action, and chain straight into the next kennel. The loop is entirely deterministic — except one amber detour: speak the note, and Claude turns speech into a pre-filled form for a human to confirm.

model proposes · human confirms ↻ next animal — chain straight in, no back-out QR SCANScan kennelscan.php · no typing LOADCare cardzone·status·flags·last care CONFIRMReview & loghuman confirms SUBMITSave the logside-effects ↓ VOICEWeb Speechtranscribe AI · 1 TOUCHPOINTClaude Haikuaction·notes·supplies MANUALTap formstructured entry pre-fill SIDE-EFFECTS · auto care_logs row inventory − · consumption rec photo (optional) the one AI touchpoint — voice deterministic loop & writes
03 / 04 — THE ARCHITECTURE

Every model call,
one door.

Every call to a model goes through one method. Ai::call() is a single, provider-pluggable chokepoint — swap Anthropic for OpenAI or Gemini from settings, or mock it entirely in demo mode. Six AI touchpoints funnel through it — briefings, voice-to-care-log, social captions, lost-and-found matching, exceptions ranking, and clinical summaries. The deterministic features — length-of-stay math, hold-release prediction, the 4AM triage sweep, and the vet hub's Animals to Watch ranking — are deliberately routed around it.

6 LIVE · 1 PLANNED Role briefings Clinical summary · handoff Voice → care log Social caption · Vision Lost & Found match Exceptions ranking Impact / outbreak · planned Ai::call() single chokepoint provider-pluggable mockable in demo_mode reads llm_provider → Anthropic · Claude Haiku 4.5● LIVE OpenAI · gpt-4o-minipluggable Geminipluggable MySQL68 tables DETERMINISTIC · NO MODEL CALL LOS mediansDB math · daily refresh Hold predictionregex → ~30 protocols → date 4AM triage6 SQL checks → email routed around the valve → → Ai::call() · the model bypass · deterministic pluggable / inactive
04 / 04 — THE SYSTEM OF RECORD

Intake to outcome.

Every animal's journey is a state machine advanced only by code, never a model. Strays clear a mandatory hold, holds estimate their own release, and every legal outcome is void-only: a reversal returns the animal to the floor, but the record is never deleted. The shelter's system of record is deterministic by design — so this whole diagram is steel. No amber anywhere.

● 0 MODEL CALLS · SYSTEM OF RECORD INTAKE OUTCOMES Stray Owner Surrender Transfer In Confiscation Born in Care Found Other Confiscation → cruelty case · trips seized flag (legal hold) INTAKEIntake7 types stray → hold IN CARE Stray Holdmandatory hold clock Medical Hold⏱ est. release Behavioral Hold⏱ est. release ⚠ overdue Availablepublic adoption portal Fosterfoster_return_date owner reclaims from any care state returned / voided → Available · record preserved Reclaimed ✓stray-hold payoff Adopted ✓the goal ↳ 30-day check-in queue Transferred ✓live release · partner Deceasedsomber terminal LENGTH-OF-STAY · median math · refreshed daily · no model on track approaching median past median HOLD FORECAST · est. release free-text reason → regex → AVMA protocol → midpoint parvo → 21–28d kennel cough / URI → 10–14d ringworm → 42–56d TPLO / cruciate → 56–84d heartworm slow-kill → 120–180d TX 10-day bite quarantine → 10d · statute THE PAPER TRAIL · three void-only records the animal's status flips only when its record commits — a void is a state change, never a deleted row adoption_record pending completed returned voided transfer_record pending approved received voided reclaim_record open approved released denied voided voided / returned / denied → animal back to Available · floor restored, record never deleted deterministic transition void / recovery somber