refactor: separate workflow IR and domain contracts (#2537)