YARDMASTER: Trinity Agent Logic

Deliverable S8/S9: ReAct Framework & Context Engineering

Part 1: Agent Logic Map (The "Hold or Fold" Gate)

A rookie panics and reroutes immediately. A veteran knows that moving work introduces massive friction. YARDMASTER's AI agent replicates veteran restraint before executing with machine speed.

Step 1: Incident Trigger (Observation)
Telemetry Alert: Buckeye Plant admix bottle ruptured.
Active Job: Continuous pour at Palo Verde 4.
Step 2: The Restraint Loop (Context Retrieval)
Action: Query Expected Time To Repair (TTR).
Action: Query Time To Cold Joint (TTCJ) at active site.
Data: Tech ETA is 60m. Total TTR = 75m. Fleet buys 45m of pour time. TTCJ = 45m.
Step 3: The Decision Matrix (Reasoning)
If TTR < TTCJ → HOLD (Absorb delay, avoid inertia penalty)
If TTR >= TTCJ → FOLD (Cold joint guaranteed. Reroute.)
75m (TTR) > 45m (TTCJ) = FOLD. Proceed to execution.
Step 4: The Execution Loop (Action)
Scan: Identify Jackrabbit Plant (14 miles).
Verify: Run Triple-Gate (Material, Washout, Labor).
Constrain: Map hyper-local vectors (Hassayampa blocked).
Output: Generate Dispatcher UI Payload (+11m Total Delay, Approve/Decline).

Part 2: Why Context Changes Everything

Standard logistics AI treats delivery routing as a geometry problem: find the shortest path between Point A and Point B. But concrete dispatch is not a geometry problem; it is a time-physics problem governed by chemical reactions and operational inertia.

When a plant goes down during a continuous pour, the instinct of generic routing software is to immediately re-optimize the board and shift the origin point. But veteran dispatchers know a fundamental truth of the industry: you do not move work if you do not have to. The "inertia penalty" of rerouting—washing out drums, deadheading trucks, and spinning up unmanned plants—introduces massive secondary risks. The first question a veteran asks isn't "Where do we go?" but "How long are we down?"

This is YARDMASTER’s operational moat. By engineering this specific context into the AI's reasoning loop, YARDMASTER calculates the Time To Repair (TTR) against the Time To Cold Joint (TTCJ). It possesses the operational restraint to "hold" when a fix is imminent, and the calculation speed to "fold" and reroute the entire fleet in milliseconds when the math dictates a structural failure.

Context changes everything because it shifts the AI from a blind navigation tool into an operational copilot. It doesn't just route trucks around traffic; it prevents $50,000 ruined slabs by understanding the gritty reality and inertia of the material it is hauling.