Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix B — The Two Capstones: Use Cases at a Glance

Read this when you need to explain the book’s two capstone systems to someone who won’t read the code: a product owner, an architect reviewing the design, or a team choosing which pattern to copy.

You get: the business problem, actors, use cases, a conceptual domain model and an end-to-end journey for each capstone, plus the shared pattern that lets one decision client serve both.

Capstone 1: Incident & FinTech Triage Engine (Part I, Ch 1–8)Capstone 2: SmartPlant Decision Intelligence (Part II, Ch 9–13)
DomainPayments support & fraud operationsIndustrial IoT predictive maintenance
TriggerA customer report or fraud-monitor alert (JSON)Motor telemetry crossing a meaningful band, or a heartbeat
Decision modelJev, hosted by TypeSafeKev, self-hosted open source
Typed questionsis_fraud_suspected (Noul) · urgency_rating 1–5 (Score) · dispatch_target (Choice)intervention_urgency (Choice) · operational_action (Choice) · standard_workflow (Noul) · operational_severity 1–5 (Score)
What can go wrongMoney lost to an account takeover; wrong refundEquipment damage, unplanned downtime, missed delivery
Hard boundary in codeRefunds > ₹50k need approval; manipulation never auto-routesPLC trips stay authoritative; load transfer / shutdown need an authorised human
Decision cadencePer report, seconds matterPer meaningful change, latency budget ~1 s on the edge
Fallback when the model is downKeyword rules → SecOps or manual escalation, never refundsThreshold rules → INSPECT + specialist review, never TRANSFER_LOAD
Proof of actionRe-read the ticket / case / refund recordRe-read the CMMS work order; hash-chained audit
Learning loopLabeled replay set, threshold sweepsExpert-labelled outcomes → Kev fine-tuning

B.1 One pattern, two domains

Both capstones are the same six-step loop. Only the inputs, questions and actions change, and that’s why triage.jev_client.DecisionClient and triage.resilience.CircuitBreaker serve both without modification.

The invariants every use case below inherits:

  1. Code computes, the model decides, people authorise, fresh state proves.
  2. The model only sees evidence (never instructions hidden in data) and only eligible options.
  3. Every consequential action has a deterministic floor or gate the model can’t go below.
  4. Silence is never consent and an outage never drops a case. There’s always a fallback route.
  5. Every decision is reconstructable from its trace or audit chain.

B.2 Capstone 1: Incident & FinTech Triage Engine

Problem

A payments company receives thousands of support messages and fraud-monitor alerts a day. A few are account takeovers where money is leaving now. Most are how-to questions, duplicate charges or slow screens. Manual triage takes minutes to hours, and keyword rules either flood SecOps or miss real fraud. LLM triage adds 2–8 s per message and an uncalibrated “confidence”.

Goal: every report is triaged in about 100 ms. Account takeovers reach SecOps at P1 within seconds, refunds move only through policy, and humans see only the uncertain or irreversible cases.

Actors

ActorRole in the system
CustomerSends the report (untrusted text)
Fraud monitorUpstream rules/ML that raise alerts with signals
Tier-1 agentHandles how-to and service issues
SecOps analystInvestigates suspected fraud and account takeover
Refund approverApproves refunds above the policy limit
Escalation teamHandles legal, regulatory, bereavement, manipulation and low-confidence cases
JevAnswers the typed triage questions

Use cases

Purple is the core path that always runs: triage, then verify and trace. Teal is the money path: open a refund, then approve it above ₹50k. Coral covers the risk and safety branches: fraud override, escalation, and safe degradation.

IDUse caseMain ruleBuilt in
UC-F1Triage an incoming reportOne Jev call: fraud, urgency, target + speculative questionsCh2–3
UC-F2Route suspected fraud to SecOpsis_fraud_suspected ≥ 0.85 overrides the model’s own routing; 0.50–0.85 → SecOps with confirmationCh4
UC-F3Open a refund requestRequires a posted transaction (eligibility) and ≥ 0.90 confidenceCh3–4, Ch6
UC-F4Approve refund above limitAmount band above_50k → requires_human_approval, computed in codeCh4
UC-F5Escalate manipulation / low confidencecontains_instructions_to_system ≥ 0.5 or below per-target gate → manual escalationCh4–5
UC-F6Degrade safely when Jev is unavailableCircuit breaker + keyword fallback; fallback can never move moneyCh5
UC-F7Verify outcome & write decision traceRe-read ticket/case/refund; second failure → escalateCh4, Ch6, Ch8

Conceptual model

Journey: an account takeover, end to end

Success measures

MeasureTarget direction
Time from report to SecOps P1 for confirmed takeoversSeconds, not queue minutes
Adversarial rows auto-routed to money0 (release gate, Ch5)
Share of reports auto-routed in the high bandUp, without precision dropping below target
Escalation shareStable; spikes trigger a review (Ch8 runbook)
Decision-layer cost≈ $57 per 3M reports on Jev (Ch8 estimate)

B.3 Capstone 2: SmartPlant Decision Intelligence

Problem

A production line runs motors, pumps and bearings. Threshold alarms say something is wrong but not what to do. Operators must weigh machine condition, data quality, maintenance history, spare parts, backup capacity and a high-priority order, often at 3 a.m. Telemetry can’t leave the plant network, and protective functions must never depend on software that might be down.

Goal: minimise unplanned downtime while protecting people, equipment, product quality and delivery commitments. The system turns every meaningful change in an asset’s condition into a bounded, explained recommendation that a human can trust and audit.

Actors

ActorRole in the system
Sensors / OPC UA–MQTT gatewayDeliver readings every ~10 s
PLC / SISOwns interlocks and protective trips (authoritative, outside SmartPlant)
OperatorSees recommendations; performs inspections
Shift supervisorApproves load transfer and shutdown requests (authorised role)
Maintenance technicianExecutes work orders, records findings
Reliability engineerLabels outcomes, owns limits, thresholds and the fine-tuning loop
KevAnswers the typed operational questions on the edge box

Use cases

Purple marks the core decision path (S1 → S2 → S3). Coral marks the safeguard branches (S4, S5, S6). Teal marks the learning loop (S7 → S8).

  • S1 → S5 fires when the limit is reached.
  • S2 → S4 fires on TRANSFER_LOAD or REQUEST_SHUTDOWN.
  • S2 → S6 fires on invalid data or when the breaker is open.
IDUse caseMain ruleBuilt in
UC-S1Build a trusted edge snapshotBands, trends, staleness, stuck/noisy/missing sensors computed in codeCh9
UC-S2Recommend an operational responseOne Kev call; code safety floor; production priority can’t lower itCh10
UC-S3Create / escalate a work orderOne work order per asset/action/episode; worse condition escalates itCh11
UC-S4Approve load transfer or shutdown requestNamed operator with an authorised role; silence = denial → INSPECTCh11
UC-S5Mirror a protective tripLatched mirror of the PLC; no model call; controlled-shutdown request documentedCh9, Ch11
UC-S6Fall back on bad data or Kev outageInvalid data never reaches Kev; breaker + threshold rules; never TRANSFER_LOADCh10–11
UC-S7Record outcome & expert labelsTechnician finding + engineer labels appended to the hash-chained auditCh11, Ch13
UC-S8Benchmark & fine-tune Kev10-scenario replay (rules vs LLM vs Kev); audit → kev.trainCh12–13

Conceptual model

Journey: a bearing degrades during a high-priority order

Success measures

MeasureTarget direction
Critical-case miss rate (under-escalation)0 (release gate, Ch12)
Unnecessary interventions on healthy assetsDown vs threshold alarms
Time from first abnormal zone to inspection work orderMinutes, not shifts
Fallback success when Kev is down100 % of cases still get a safe action
Audit completeness100 % of decisions reconstructable
Automation at a 5 % error budget after fine-tuningUp, per checkpoint (Ch13)

B.4 Choosing your own third use case

The capstones are templates. A new domain fits this pattern when you can answer yes to all of these:

  • The decision repeats often enough that latency and cost compound
  • The answer space can be bounded: options, yes/no, or a describable rubric
  • Exact facts (amounts, dates, counts, limits) can be computed in code first
  • There’s a safe default for when the model is unsure or unavailable
  • Consequential actions can be gated by code and, where needed, a human
  • The outcome can be verified in a system of record
  • You can collect labelled examples, including ambiguous and adversarial ones

Pick Jev when hosted latency and calibration matter most and data may leave your network. Pick Kev when data must stay on-site, you need offline operation, or you want to fine-tune on your own decisions. Either way, the client, breaker, trace and evaluation discipline are the same.