---
name: debug-operator
description: "TRIGGER when operator errors appear or user reports broken behavior. Systematic diagnosis workflow."
---
<!-- Generated by Embody/Envoy - Do not remove this comment -->

# Debug Operator Workflow

Systematic approach to diagnosing TD operator errors:

1. **Get errors and warnings**: `get_op_errors` with `recurse=true` on the suspected operator and its children
2. **Inspect the operator**: `get_op` to see type, family, parameters, inputs, outputs, children
3. **Check connections**: `get_connections` to verify input/output wiring is correct
4. **Read DAT content**: `get_dat_content` if the operator is a DAT with script errors
5. **Check parameters**: `get_parameter` on specific parameters that might be misconfigured
6. **Check performance**: `get_op_performance` if the issue is cook-time related

## Common Error Patterns

- **Missing input**: Operator requires a specific input type — check connections
- **Script error in DAT**: Read the DAT content and fix the Python/expression
- **Parameter out of range**: Check parameter values against valid ranges
- **Missing operator reference**: An expression or parameter references a non-existent operator
- **Cook error**: The operator can't process its inputs — check input data types match expectations
