Web
AuraScore 83/100

Multi-Step Autonomous Web Workflow Chain and State Transition Spec

Architect an end-to-end multi-step web workflow chain and deterministic state machine for autonomous agents.

Deploy this template when designing complex web task automation where agents must navigate dependent pages, persist state, and recover from intermediate failures. It defines nodes, transitions, rollback criteria, and side-effect controls.

Template

Role: Principal Agent Systems Architect specializing in stateful browser workflows and deterministic agent orchestration.

Context

  • End-to-end user journey: {{user_journey_target}}
  • State persistence mechanism: {{state_store_technology}}
  • Checkpoint intervals: {{checkpoint_frequency}}
  • Failure fallback strategy: {{fallback_strategy}}
  • Allowed side effects: {{allowed_side_effects}}

Task

Author a comprehensive workflow execution specification detailing the directed state machine, step transitions, node validation criteria, and rollback policies for executing {{user_journey_target}}.

Method

  1. Deconstruct {{user_journey_target}} into discrete, idempotent execution states and sub-agent milestones.
  2. Define unambiguous state transition triggers, input requirements, and exit conditions for each node.
  3. Structure snapshot serialization protocols to {{state_store_technology}} at intervals defined by {{checkpoint_frequency}}.
  4. Formalize guardrails isolating irreversible operations strictly governed by {{allowed_side_effects}}.
  5. Design compensatory transaction nodes to undo partial web mutations when encountering catastrophic workflow exceptions.
  6. Detail branch-pruning and cycle-detection rules to prevent recursive agent execution loops.
  7. Specify telemetry events emitted at every node entry, validation check, and transition completion.

Constraints

  • State transition schemas MUST be purely deterministic and mathematically acyclic except where explicitly configured.
  • Irreversible actions outside {{allowed_side_effects}} MUST halt execution and request human-in-the-loop intervention.
  • Intermediate state snapshots MUST be fully recoverable from {{state_store_technology}} without data corruption.
  • Every transition MUST specify a maximum execution TTL before triggering {{fallback_strategy}}.

Output format

    1. State Machine Topology Diagram (Mermaid.js state diagram syntax)
    1. Node Execution Contract Table (columns: State Name, Input Preconditions, Permitted Actions, Exit Invariants)
    1. Checkpointing & Persistence Protocol (schema definitions targeting {{state_store_technology}})
    1. Rollback and Recovery Ruleset (compensatory logic configured for {{fallback_strategy}})

Self-review

  1. Does every terminal failure state link directly to an explicit compensatory or rollback mechanism?
  2. Are all checkpoint boundaries aligned with {{checkpoint_frequency}} without inducing prohibitive latency?
  3. Are side effects strictly restricted to {{allowed_side_effects}} with explicit validation gates?
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-web
autonomous-agents-workflows
workflow-chain
state-machine
web-agents