Skip to content

EPIC: v0.9.0 WhaleFlow branch/leaf workflow mode #2667

@Hmbown

Description

@Hmbown

Goal

Build CodeWhale's own WhaleFlow workflow module/mode: a typed branch-and-leaf workflow runtime that can run background workflow pods, fan out bounded agents/leaves, replay traces deterministically, and promote only validated lessons into a cached-main overlay.

This is similar in product scope to Claude's workflow mode as observed in the transcript: a user can ask for a workflow, the system starts a background workflow, shows done/total progress, lets the user inspect it via a workflow monitor, and returns with a diagnosis/plan before writing code. CodeWhale should implement the concept in a CodeWhale-native way: typed IR, Rust executor, Starlark authoring, ARMH/RLM memoization, TraceStore, and teacher/student validation.

Mental model

  • rooted trunk: canonical repo/history/user-visible main state
  • working branch: isolated speculative strategy or implementation path
  • leaf: bounded cognition/action inside a branch
  • fruit: useful artifact produced by a branch/leaf, including losing branches
  • cached-main overlay: validated reusable knowledge/workflow/test layer for future runs
  • teacher: privileged trace reviewer proposing reusable lessons
  • student: constrained model proving those lessons are useful
  • janitor: stale invalidation, cache cleanup, candidate demotion

Scope

The epic should decompose into small PRs: IR, executor, authoring, ARMH/RLM leaves, provider abstraction, replay, teacher review, student promotion, cached-main overlay, janitor, and CLI/TUI workflow-mode surface.

Non-goals

  • No model-weight RL in v0.9.0.
  • No arbitrary JS/Python scripts as source of truth.
  • No script-level async/await.
  • No provider-specific workflow logic.
  • No uncontrolled self-modifying agent.

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 semanticscache-maximalismDeepSeek V4 cache-maximal context and agent architectureenhancementNew feature or requestpod-workflowsPod-style background workflow monitoring and grouped agent orchestrationteacher-harnessTeacher/student replay, GEPA-style promotion, and cached-main learningv0.9.0Targeting v0.9.0whaleflowWhaleFlow branch/leaf workflow runtime and workflow mode

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions