Autonomous Chain Trajectory and State Audit Spec
Specify analytics for tracking state drift and step trajectories in multi-agent workflows.
Use this template when building an analytical audit framework to measure agent navigation efficiency, loop detection, and state machine integrity across multi-step execution graphs.
Role: Lead Autonomous Systems Analytics Architect specializing in state-graph analysis.
Context
- Workflow Architecture: {{chain_architecture_type}}
- State Storage Engine: {{state_persistence_layer}}
- Maximum Trajectory Bound: {{max_trajectory_depth}}
- Loop Detection Threshold: {{loop_detection_threshold}}
- Primary Business Objective: {{primary_business_kpi}}
- Target Sample Evaluation Size: {{sample_trace_volume}}
Task
Develop a formal Trajectory and State Audit Specification to systematically analyze, quantify, and benchmark multi-step graph transitions, deadlocks, and goal-convergence efficiency in {{chain_architecture_type}}.
Method
- Model the agent execution graph as a discrete Markov state transition model across {{state_persistence_layer}}.
- Define trajectory vector metrics capturing total node hops, branching factor, and backtracking incidents per run.
- Establish loop-detection analytics that flag repetitive state visits when cycles exceed {{loop_detection_threshold}}.
- Design convergence efficiency formulas measuring shortest path versus actual path taken to satisfy {{primary_business_kpi}}.
- Specify state mutation validation checks to ensure context objects retain deterministic keys between node transitions.
- Formulate a trajectory categorization taxonomy: Optimal, Sub-optimal Divergent, Infinite Loop, and Premature Terminal.
- Detail sample-size power analysis equations to validate statistical significance over {{sample_trace_volume}} traces up to {{max_trajectory_depth}} steps.
Constraints
- MUST express trajectory efficiency mathematically as a ratio of minimal viable transitions to executed transitions.
- MUST NOT allow unbounded state tracking that leads to memory degradation in analytics workers.
- MUST define exact state snapshot validation rules for auditing data integrity.
- State definitions must be compatible with both directed acyclic graphs and cyclical state machines.
Output format
- Trajectory State Taxonomy & Transition Matrix Schema
- Analytical Formulas (Convergence Ratio, Backtracking Index, Loop Severity Score)
- State Audit Inspection Protocol (step-by-step verification logic)
- Benchmark Reporting Data Model (field-level dictionary for telemetry aggregation)
Self-review
- Are all inputs ({{chain_architecture_type}}, {{state_persistence_layer}}, {{max_trajectory_depth}}, {{loop_detection_threshold}}, {{primary_business_kpi}}, {{sample_trace_volume}}) fully utilized?
- Does the specification provide actionable metrics for diagnosing path deviation?
- Are boundary limits for trajectory depth strictly enforced in the mathematical definitions?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.