Skip to content

v0.8.68 WhaleFlow: verification gates (compile, test, lint, review as post-agent hooks) #4013

Description

@Hmbown

Problem

Sub-agents self-report "done" but there is no automated verification. The Constitution (Article II) demands ground-truth verification, but today that verification is manual — the parent must poll worktree diffs, check compilation manually, and trust agent claims. With 30+ agents running in parallel, manual verification doesn't scale.

Scope

Add post-agent verification gates that run automatically after an agent completes:

  1. Compile gatecargo check -p codewhale-tui (or equivalent for non-Rust projects)
  2. Test gatecargo test -p codewhale-tui -- {{agent_specific_tests}}
  3. Lint gatecargo clippy -p codewhale-tui -- -D warnings
  4. Review gate — Spawn a reviewer agent that reads the diff and flags risks

Gate behavior

  • Pass → artifact is promoted, dependent agents can proceed
  • Fail → agent is retried with the failure output as context (up to N retries)
  • Timeout → treated as fail, retried
  • Escalate → after N retries, escalate to parent for human decision

Non-goals

  • Not replacing human code review. Gates are automated checks; human review comes later.
  • Not enforcing gates on every agent type. Scouts and explorers skip gates.

Acceptance

  • Agent completes → compile gate runs → test gate runs → lint gate runs
  • Review gate runs on diffs exceeding a configurable threshold
  • Failed agent retries with failure context appended to prompt
  • After 3 retries, failure is escalated to parent
  • Gates are configurable per agent type and per WhaleFlow node

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestv0.8.68Targeting v0.8.68whaleflowWhaleFlow branch/leaf workflow runtime and workflow mode

    Projects

    Status
    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions