Library
The Christensen Engine Has No Twin — But It Has Relatives in Surprising Places · 12 of 12

Key Principle

Six recurring state machine patterns appeared across multiple products: guard-condition-gated transitions, the dialogue stack (LIFO), process calling, conversation repair, confirmation loops, and mandatory waypoints. Together, they form the structural vocabulary for building deterministic conversational assessment systems.

Why This Matters

Without these patterns, state machines handle only the happy path. Real conversations involve digressions, misclassifications, incomplete data, and users who game the system. These patterns address the structural complexity that emerges when a deterministic system must handle non-deterministic human input at scale.

Good Examples

Guard-Condition-Gated Transitions: State transitions require specific conditions to pass before proceeding. Origin's 138-check EVAL gateway and Limbic's eligibility checks are implementations. The pattern ensures every user receives the same assessment rigor regardless of conversational path. (pp. 2, 4, 5) Guards should be pure synchronous functions: isValidId: ({ event }) => /^\d{4}$/.test(event.id). (p. 5, chunk 004)

The Dialogue Stack (LIFO) (Rasa): Use a stack, not a single state pointer. New flows push on top; completed flows pop and previous flows resume. "Digressions are free." (p. 4, chunk 004) Without this, handling digressions requires complex per-state logic for every possible interruption.

Process Calling (Rasa): A Process is "a long-running, stateful, deterministic workflow that persists across multiple conversational turns. The LLM invokes the process, then collaborates with it." (p. 3, chunk 004) Fundamentally different from atomic tool calling — tool calling is stateless and single-turn.

Conversation Repair (Rasa): ~15 meta-handlers — correction, cancellation, resume-after-digression, clarification, chitchat, human handoff, cannot-handle, skip-question — as a system that can interrupt any active state. (pp. 3-4, chunk 004) Without this, every state must independently handle edge cases.

Confirmation Loops (Woebot): "It sounds like there's a couple of things here, feeling low and problems with relationships, is that true?" (p. 3, chunk 003) Dedicated CONFIRM_CLASSIFICATION states loop back to re-classify if the user says no. Prevents compounding errors from silent misclassification.

Mandatory Waypoints (Perspective AI): Required nodes in the state graph that must be visited, with adaptive edges between them. Fix destinations while freeing the path. The same engine handles different assessment types through configuration, not code. (p. 2, chunk 005)

Counterpoints

  • Backward Loop Explosion: Backward feedback loops create infinite cycles when users repeatedly fail quality thresholds. Every backward transition needs a maximum-attempts guard: isUnderMaxAttempts: ({ context }) => context.attempts < 3. After max attempts, force-advance to a fallback state. (p. 4, chunk 005)

  • Guard Misfire Recovery: Guard conditions depending on LLM classification will misfire. Build retry logic into guard evaluations. When confidence is low, use confirmation loops. Design fallback transitions for every guard condition. (pp. 3-4, chunk 005)

  • Phase Transition Quality Gates: Buildpad's phase transitions triggered on completion rather than quality. Users advanced with shallow input, producing an illusion of rigor. "Your state machine should define what 'done' means for each state as a measurable guard condition, not just 'user submitted something.'" (p. 1, chunk 005)

Key Quotes

"Digressions are free." (p. 4, chunk 004) — Rasa, on the dialogue stack

"it leads the conversation, not me." (p. 1, chunk 005) — User praise for guided assessment

"Alex can only score candidates on topics covered in the interview" (p. 2, chunk 005) — Architectural constraint preventing unsupported scoring

Rules of Thumb

  • Use a stack for conversation state, not a single pointer.
  • Build conversation repair as a parallel meta-system, not per-state logic.
  • Every backward transition gets a max-attempts guard.
  • Phase transitions should trigger on quality metrics, not mere completion.
  • Confirmation loops catch errors at the point of origin — cheap insurance against compounding.
  • Score only what you assessed — never generate scores without evidence.

Related References