Skip to content

Turn a service request into a plan with checked transitions

Begin Alder Field Service, a fictional repair coordinator. Turn an ambiguous repair request into explicit state, dependency checks and a bounded replanning decision.

21 MIN

By AIAgentInterviews · Updated

TL;DR: Let the model propose a plan, but let the workflow validate dependencies, authority and completion evidence. Replan when a named assumption changes; never let a revised plan erase a completed effect.

Where you are. Start Alder with the work-order state and transitions that every later component must respect.

A repair needs more than a list of steps

Alder Field Service is a fictional company that coordinates equipment repairs. A customer reports an intermittent freezer fault, asks for a technician tomorrow, and attaches a maintenance note. The coordinator must identify the equipment, find the applicable service procedure, obtain a parts quote and propose a visit. Only an authorized dispatcher can approve the booking.

A numbered list is useful to a reader but insufficient for execution. “Book tomorrow” depends on the customer's time window, technician availability and required parts. If the part is unavailable, repeating the original plan creates activity without progress.

In plain language. A dependency is a fact or completed step another step requires. A precondition must hold before an action starts. A postcondition describes what must be observed afterward. A checklist of verbs does not establish any of them.

Establish the state the plan can reference

Store the work-order identifier, authenticated customer scope, equipment record revision, open questions, evidence references and completed operation identifiers. Keep tentative model suggestions separate from verified facts. A maintenance note may suggest a part, but the equipment service record determines whether that part is applicable.

Each planned step names its required inputs, permitted tools, completion evidence and failure exit. The model may propose dependencies, while the harness rejects unknown step identifiers, cycles and steps requiring authority the run does not possess. The plan cannot introduce a new booking tool simply by naming it.

For the first fixture, inspection and policy lookup are reads. Quote selection produces a proposal. Booking is an effect behind approval. That distinction makes the plan useful for both execution and review.

Check transitions with state

A workflow transition is allowed when its preconditions hold. A model may choose among eligible investigative steps, but cannot jump from an unverified request straight to booked. This compact fixture illustrates eligibility, not a complete scheduling engine:

requires = {'inspect': set(), 'quote': {'inspect'},
            'propose_visit': {'inspect', 'quote'},
            'book': {'propose_visit', 'approved'}}
completed = {'inspect'}
def eligible(step):
    return requires[step] <= completed
print(eligible('quote'), eligible('book'))  # => True False
completed.update({'quote', 'propose_visit'})
print(eligible('book'))  # => False
completed.add('approved')
print(eligible('book'))  # => True

In the real design, approved is a validated record bound to an action, not a string the model can add to a set. Replace that fixture marker with the authority check when integrating the course project.

Replan against a changed assumption

Suppose the quote tool reports that the suggested part is unavailable. Record the failed assumption and retain the observation. A revised plan can request an alternative compatible part or ask the dispatcher to change the visit date. It cannot mark the original quote as successful to preserve the appearance of progress.

Give replanning a budget and a reason code. “New inventory evidence” is reviewable. “Try again” without a changed observation is a loop. Completed reads can remain historical evidence, while time-sensitive facts need fresh checks before use. Completed bookings remain in the operation ledger even if the new plan no longer needs them.

Choose the least flexible controller that fits

Use a fixed workflow when the sequence is already known. Allow model-directed branching where the observation genuinely determines the next investigation. Keep the booking boundary deterministic in both designs. More autonomy in investigation does not imply more authority over the customer's schedule.

The first deliverable is a state diagram with an evidence requirement on every effecting transition. Keep the original plan and its revisions so a reviewer can explain why the eventual booking differed from the customer's initial request.

Diagram
A plan becomes executable only through checks

Evidence enables transitions; prose alone does not.

Run the plan against a changed appointment

Alder's fictional repair request needs a diagnosis, a compatible part and an appointment. A proposed plan says “diagnose, order part, book technician.” Before the second step, ask what establishes compatibility. Before the third, ask whether the customer accepted the appointment and the part can arrive in time.

Write the state transitions explicitly:

Proposed actionRequired evidenceEvidence left afterward
Select partDevice identity and diagnosisCompatible part proposal
Reserve appointmentCustomer preference and availabilityReservation with expiry
Confirm bookingAccepted terms and current reservationService receipt

Now the customer changes Thursday to Friday after a reservation exists. A plan that simply rewrites “Thursday” to “Friday” loses the old reservation. Preserve its identity and disposition while creating the revised proposal. The world contains an effect that the new plan must account for.

This is where a plan becomes an executable contract. Each proposed transition is checked against current state, and completed effects remain part of history. The model can suggest a different route through the work, but it cannot declare prerequisites satisfied by listing them as completed.

What if · interview follow-ups

Change one condition

The customer changes the appointment after Alder has reserved a slot.

  1. Start here

    Can replanning delete the old reservation step from the plan?

Do this before moving on

Define Alder states and transitions for identify, inspect, quote, approve and book. Add a missing-part observation and one permitted replan. Pass when an unapproved booking is unreachable, every replan records a changed assumption, and already completed effects survive plan revision.

Review your result. Keep the original plan, changed assumption, retained effects and revised transition checks. A reviewer should see why each action is currently allowed and what proves its completion.

Go deeper

  • State graphs: separate eligible transitions from the model's proposed sequence.
  • Replanning: identify which observation invalidates a previous assumption.
  • Long-run coherence: keep completed work and outstanding commitments visible across revisions.

Key takeaways

  • A plan proposes work; transition checks permit execution.
  • Replanning needs a changed assumption and a budget.
  • A revised plan cannot erase completed business effects.

Check yourself

Answer aloud or on paper before revealing. Producing the explanation unaided is exactly what a panel listens for.

  1. 1A new plan omits a booking that already completed. Is the booking gone?

  2. 2Where should model-directed control remain in Alder?

Sign in to track which lessons you have finished.