Automation Synthesis

Each pattern type maps to a specific automation output. The operator reviews drafts before deployment.

Pattern → Automation Mapping

PatternOutputKey Fields
ReactionAlertRuleSpeccondition (FieldAbove/FieldBelow), severity, escalation, dedup_key, tags:["tai_generated"]
SequenceGeneratedStateMachinestates: step_{i}_{label}, transitions, initial_state
CascadeGeneratedAgentConfigwatch_entity, trigger_action, target_entity, target_action, delay_ms, enabled:false

Reaction → AlertRuleSpec

Rust
// Input: Reaction pattern
// "When actual_temp > 28, operator sets setpoint to 22"
//
// Output: AlertRuleSpec
AlertRuleSpec {
    id: "tai_00000000deadbeef",
    condition: FieldAbove { field: "actual_temp", value: 28.0 },
    severity: Warning,
    escalation: [EscalationStep {
        delay_s: 0.0,
        action: LogConsole {
            message: "TAI: set_setpoint on {entity_id}"
        },
    }],
    tags: ["tai_generated"],
    enabled: true,
}

AutomationDraft

All three generators produce an AutomationDraft wrapping the config YAML, human explanation, and estimated confidence.

FieldDescription
source_pattern_idContent-addressed PatternId that produced this draft
automation_typeAlertRule, StateMachine, or ControlAgent
config_yamlGenerated YAML/JSON configuration
estimated_confidenceInherited from the source pattern (0.0–1.0)

Questions?

Reach out for help with integration, deployment, or custom domain codecs.