What problem does it solve? Agent builders routinely over-engineer control flow, reaching for graph frameworks like LangGraph when a simple loop would suffice, or under-engineering and relying on prompts for guarantees only structure can provide. This Skill gives a disciplined decision procedure for choosing the right topology and enforcing it structurally. ## Core Features & Use Cases - Decision procedure: A three-step test that defaults to a bare loop and only escalates to a state machine or graph when a declared constraint (ordering, mandatory step, human gate, compensating action) demands it. - Structural guarantees: Patterns for making critical steps unreachable except through required predecessors, plus topology tests using all_simple_paths that run without a model. - Node contracts and sagas: Specifications for node pre/postconditions, explicit channel reducers, idempotency keys, and compensating actions for side effects. - Serializable topology: Requirements that graphs be versioned, content-addressed data with machine-checkable invariants, plus a T0–T4 promotion ladder from plain tool to protocolled subgraph. - Use Case: When designing an order-fulfillment agent, use this Skill to determine that charging a card requires a graph with a human approval gate and saga compensators, while a simple research task stays a bare loop. ## Quick Start Ask the agent to review your planned agent control flow and decide whether it should be a loop, a state machine, or a graph, with the required invariants listed.