Skip to main content

libbrat_workflow/
lib.rs

1//! Workflow template system for brat.
2//!
3//! This crate provides YAML-based workflow templates that can be expanded
4//! into Grite convoys and tasks. Workflows are stored in `.brat/workflows/`
5//! and can be either:
6//!
7//! - **Sequential workflows** (`type: workflow`): Steps execute in order based on dependencies
8//! - **Parallel convoys** (`type: convoy`): Legs execute in parallel with optional synthesis
9//!
10//! # Example
11//!
12//! ```yaml
13//! # .brat/workflows/code-review.yaml
14//! name: code-review
15//! version: 1
16//! type: convoy
17//!
18//! inputs:
19//!   pr:
20//!     description: "Pull request number"
21//!     required: true
22//!
23//! legs:
24//!   - id: correctness
25//!     title: "Correctness Review"
26//!     body: "Review for logic errors..."
27//!
28//!   - id: performance
29//!     title: "Performance Review"
30//!     body: "Review for performance issues..."
31//!
32//! synthesis:
33//!   title: "Review Synthesis"
34//!   body: "Combine findings..."
35//! ```
36
37mod error;
38mod executor;
39mod parser;
40mod schema;
41
42pub use error::WorkflowError;
43pub use executor::{WorkflowExecutor, WorkflowInstance};
44pub use parser::WorkflowParser;
45pub use schema::{
46    InputSpec, LegSpec, StepSpec, SynthesisSpec, WorkflowTemplate, WorkflowType,
47};