Skip to content
Peter C. Bennett
← Back to selected work

PUBLIC REFERENCE IMPLEMENTATION · SYNTHETIC WORKLOAD

A claims workflow where the model has a defined job.

CaseFlow is a reference implementation for case resolution. It shows how bounded model tasks can assist review while software and people keep control of the outcome.

CONTEXT
Public reference implementation for claims resolution, built on a synthetic workload.
ROLE
Sole designer and implementer. Architecture, graph, evaluation suite, and service layer.
THE DECISION
No model output becomes workflow state until it passes schema validation, policy checks, and, for consequential actions, human approval.
THE RESULT
A 21-node workflow with 4 bounded AI tasks, 3 human-review gates, and a 30-case / 11-metric regression suite that runs in CI.
THE SOURCE
Public repository you can read and run; the README states the system's own limits.
Technical illustration of a document held at a raised checkpoint barrier under an examining lens, a wall separating earlier model work from the recorded archive ahead
The control boundary this page keeps returning to: work produced by the model side of the wall waits at the barrier until a person approves it.
21workflow graph nodes
4bounded AI tasks
3human review gates
30 × 11regression cases and metrics

THE PROBLEM IT ANSWERS

Most agentic demos stop where a real workflow begins.

Claims resolution is a good test case for controlled AI. The work has real consequences, the evidence is messy, and a wrong answer that looks confident is worse than no answer. If a model can misroute a case, misquote a policy, or trigger an irreversible action without approval, the demo is not telling you the part that matters.

CaseFlow exists to make the uncomfortable part visible. It is not a product and it was not built for a customer. It is a working argument: that a model can do useful reasoning inside a workflow while software and people keep the authority over what becomes true.

THE CONTROL BOUNDARY

Models reason over evidence; they do not decide the case.

The graph types every node by what it is allowed to do. Deterministic nodes own evidence handling, state transitions, retries, and tool execution. Model-backed nodes do four bounded tasks with typed outputs, the places where flexible judgment is worth the variance. Human gates sit where a consequential decision needs a person.

A model output has to survive schema validation and policy checks before it can move the workflow. Retry loops are hard-capped. Irreversible actions cannot execute without an approval recorded in state.

Human reviewers can inspect the reasoning trail and correct the result. Every state change stays explicit and auditable, so the question a reviewer asks, why did the system do this?, has an answer in the workflow's own state history rather than in a log somebody has to reconstruct.

WHAT THE PROOF LOOKS LIKE

Five scripted scenarios probe the failure modes that matter.

The repository ships scenario proofs rather than screenshots: a happy path, a low-confidence case that must not quietly proceed, a consequential action that must wait for approval, a failure-recovery path that must stay idempotent, and a stale-knowledge case that must exclude what should not be retrieved.

Behind those sits a deterministic regression suite, 30 cases across 11 metrics, enforced in CI with explicit thresholds. Routing correctness, citation correctness, and irreversible-action approval sit at 100% thresholds, because a 94% score on "did it ask a human first" is a finding, not a pass.

DELIVERY DISCIPLINE

Built for the engineer who inherits it.

It runs credential-free by default on in-memory and SQLite profiles. A local Postgres 17 + pgvector profile runs under Docker Compose with a digest-pinned image bound to localhost. Live OpenAI and Anthropic adapters exist behind an explicit opt-in; the live smoke tests are shipped but unexecuted, because no credentials were supplied, and the README says so.

Tooling is strict by choice: uv-locked dependencies, Ruff, mypy strict, pytest, pip-audit, detect-secrets, and a GitHub Actions pipeline covering packaging, architecture-boundary tests, an 85% coverage floor, evaluation, and security. A FastAPI service with a server-rendered HTML/HTMX console makes the workflow inspectable without a frontend build.

The README publishes a "production boundary" section listing what is deliberately absent: no auth, CSRF, or tenant isolation; no async queues or workers; no durable remote approval ledger; no managed migrations, HA, or failover; no live-model evaluation; no deployment or rollback automation; no load or soak testing.

WHAT IT SHOWS AND LEAVES OUT

The architecture judgment it covers, at its actual size.

What CaseFlow demonstrates: agentic architecture judgment, deterministic control boundaries, typed interfaces, human-authority gating, and evaluation rigor, all readable in public code.

What it does not demonstrate: AWS services, a React/TypeScript frontend, or live production traffic. Those capabilities are evidenced in the other case studies; they are not claimed through this repository. The other public artifact, Local Workspace MCP, applies the same boundary-first thinking to AI tool access.

Read the source on GitHub (opens in a new tab)

Read the résumé