Expand description
Typed Workflow IR and validation for CodeWhale.
This crate deliberately stops at the Rust-owned IR boundary. Runtime tool exposure, worktree application, replay, and model execution are layered on top only after their cancellation and evidence semantics are proven.
Structs§
- Branch
Candidate - Branch
Result - Branch
Spec - Branch
Tournament - Budget
Spec - Completion
Request - Completion
Response - Cond
Spec - Control
Node Result - Elevation
Options - Options that refine elevation assessment beyond the IR itself.
- Expand
Spec - Fleet
Role Map - Named fleet roster: role name → AgentProfile id.
- Gate
Spec - One gate node in a Workflow definition.
- Gate
Status Line - Handoff
Artifact - Lane-scoped handoff artifact produced by a role for the next role.
- Lane
Gate Board - In-memory (and serializable) gate + handoff store for one lane.
- Leaf
Result - Leaf
Spec - Loop
Until Spec - Mock
Leaf Outcome - Mock
Model Provider - Mock
Workflow Executor - Model
Capabilities - Model
Policy - Named
Fleet - Parsed named fleet file.
- Pareto
Frontier - Permission
Spec - Phase
- Phase
Plan - Promotion
Gate - Promotion
Gate Decision - Promotion
Policy - Provider
Model - Provider
Registry - Reduce
Spec - Replay
Control Record - Replay
Leaf Record - Replay
Options - Resolved
Model - Resolved
Workflow Agent - Result of resolving a workflow step against a fleet roster.
- Sequence
Spec - Student
Replay Metrics - Student
Replay Result - Student
Replay Test Result - Task
- Teacher
Candidate - Teacher
Review Report - Teacher
Review Spec - Workflow
Config - Workflow
Execution - Workflow
Fleet Limits - Workflow
Fleet Shape - Workflow
Memo Usage - Workflow
Plan - Workflow
Plan Elevation - Summary of why a Workflow plan needs (or does not need) elevated approval.
- Workflow
Replay Executor - Workflow
Replay Trace - Workflow
Spec - Workflow
Usage
Enums§
- Agent
Type - Control
Node Kind - Failure
Policy - Fleet
Role Resolve Error - Gate
Error - Gate
Kind - Kind of verification / review gate.
- GateOn
- When a gate fires relative to role lifecycle.
- Gate
OnFail - Policy when a gate fails.
- Gate
Outcome - Outcome reported by a verifier/reviewer/human for a gate evaluation.
- Gate
State - Live state of one gate within a lane.
- Isolation
Mode - Javascript
Workflow Error - Json
Repair Error - Model
Policy Error - Model
Provider Error - Model
Role - Model
Selection Source - Named
Fleet Error - Plan
Risk Hint - Coarse risk classification from the structured plan
riskfield. - Promotion
Strategy - Task
Mode - Teacher
Candidate Kind - Teacher
Candidate Status - Workflow
Execution Error - Workflow
Fleet Limit Error - Workflow
Node - Workflow
Replay Error - Workflow
RunStatus - Workflow
Validation Error
Constants§
- DEFAULT_
FLEET_ WORKFLOW_ MAX_ AGENTS - Default hard ceiling on total agents a Fleet-shaped Workflow plan may launch. Matches the imperative VM lifetime cap (1_000 agents per run).
- DEFAULT_
FLEET_ WORKFLOW_ MAX_ DEPTH - DEFAULT_
HIGH_ BUDGET_ THRESHOLD - Default soft token budget from product config (
[workflow].default_token_budget). Plans requesting more than this are treated as high-budget. - STOPSHIP_
REQUIRED_ ROLES - Required roles for the stopship dogfood fleet (#4178).
Traits§
Functions§
- assess_
plan_ risk_ string - Lightweight assessment from a planner
riskstring alone (before IR lower). - assess_
workflow_ elevation - Assess elevation for a compiled
WorkflowSpec. - compile_
javascript_ workflow - compile_
typescript_ workflow - compute_
leaf_ input_ hash - leaf_
is_ write_ capable - A leaf is write-capable when it can mutate the workspace.
- leaf_
wants_ worktree - Effective worktree flag for a leaf given whether it is being lowered inside a parallel branch.
- load_
named_ fleet - Load fleet by name from search paths (first hit wins).
- load_
named_ fleet_ file - normalize_
file_ scope_ root - Normalize the suffix-glob spelling accepted by declarative workflow
file_scopeinto the concrete directory root enforced at runtime. - normalize_
token - Normalize a role/profile token: trim, lowercase. Returns
Noneif empty or if the token contains whitespace / quotes / backticks /=. - parse_
json_ with_ repair - parse_
named_ fleet - Parse a fleet TOML document.
- repair_
json_ text_ once - resolve_
workflow_ agent - Resolve step identity from optional
role+ optional explicitprofileagainst a fleet role map. - scopes_
overlap - stopship_
gate_ pipeline - Canonical stopship-style gate pipeline (scout → implementer → reviewer → verifier → release_lead).
- teacher_
candidates_ from_ execution - validate_
role_ token - Validate a role token the same way leaf profiles are validated.