Re-point resolveWorkflowOptionalSteps to scan v2 optional-group nodes instead
of the legacy ir.optionalSteps declaration, and seed a new task's
enabledWorkflowSteps from each group's defaultOn (materializeDefault/Explicit
WorkflowSteps). Preserves the ResolvedWorkflowOptionalStep shape so the create/
edit toggle surfaces keep working (templateId now carries the group node id).
Legacy optionalSteps type/field left in place for U7. Exports the new config
type + resolveDefaultOnOptionalGroupIds helper.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>