Skip to content

WhaleFlow: typed workflow IR and TraceStore state migrations #2668

@Hmbown

Description

@Hmbown

Problem

WhaleFlow needs a typed canonical IR before any authoring syntax, executor, or UI can be reliable. Starlark, generated plans, and future formats must compile into the same Rust-owned representation.

Scope

  • Add WorkflowSpec, WorkflowNode, BranchSpec, LeafSpec, BudgetSpec, PermissionSpec, ModelPolicy, PromotionPolicy.
  • Include BranchSet, Leaf, Sequence, Reduce, TeacherReview, LoopUntil, Cond, and Expand.
  • Add TraceStore migrations for workflow_runs, branch_runs, leaf_runs, control_node_runs, and teacher_candidates.
  • Add serialization/roundtrip tests.
  • No behavior change beyond data model and migrations.

Acceptance criteria

  • workflow_ir_roundtrip passes.
  • branch_result_serialization and leaf_result_serialization pass.
  • control_node_result_serialization passes.
  • Migrations follow existing state-store patterns and use SQLite WAL where appropriate.

Source: /Users/huntermbown/Downloads/CodeWhale_v0_9_0_BranchLeafTeacher_Workflows_UPDATED.md and the Claude workflow-mode observation from June 3, 2026.

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch-leafBranch-and-leaf orchestration semanticsenhancementNew feature or requestv0.9.0Targeting v0.9.0whaleflowWhaleFlow branch/leaf workflow runtime and workflow modeworkflow-runtimeWorkflow IR, executor, control flow, and replay runtime

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions