WorkflowOrchestrator

Struct WorkflowOrchestrator 

Source
pub struct WorkflowOrchestrator { /* private fields */ }
Expand description

Orchestrates spec-driven development workflows

Manages the relationship between specs and implementation tasks, enabling spec-to-task linking, task completion tracking, and acceptance criteria validation.

Implementations§

Source§

impl WorkflowOrchestrator

Source

pub fn new() -> Self

Create a new workflow orchestrator

Link a task to acceptance criteria from requirements

Establishes explicit links between implementation tasks and acceptance criteria from the requirements document. This enables traceability and validation.

§Arguments
  • task_id - The task identifier
  • requirement_ids - IDs of requirements this task addresses
§Returns

Ok if linking succeeds, Err if task or requirement IDs are invalid

Source

pub fn get_task_requirements(&self, task_id: &str) -> Vec<String>

Get all requirements linked to a task

§Arguments
  • task_id - The task identifier
§Returns

A vector of requirement IDs linked to this task

Source

pub fn get_requirement_tasks(&self, requirement_id: &str) -> Vec<String>

Get all tasks linked to a requirement

§Arguments
  • requirement_id - The requirement identifier
§Returns

A vector of task IDs linked to this requirement

Source

pub fn update_task_status( &mut self, task_id: String, status: TaskStatus, ) -> Result<(), SpecError>

Update task completion status

Tracks the progress of implementation tasks through their lifecycle.

§Arguments
  • task_id - The task identifier
  • status - The new task status
§Returns

Ok if update succeeds, Err if task is not found

Source

pub fn get_task_status(&self, task_id: &str) -> TaskStatus

Get task completion status

§Arguments
  • task_id - The task identifier
§Returns

The current status of the task, or NotStarted if not found

Source

pub fn validate_task_traceability(&self, spec: &Spec) -> Result<(), SpecError>

Validate that all tasks have explicit links to acceptance criteria

Ensures spec-to-task traceability by verifying that every task has explicit links to at least one requirement.

§Arguments
  • spec - The specification to validate
§Returns

Ok if all tasks are properly linked, Err with list of unlinked tasks

Source

pub fn validate_acceptance_criteria_coverage( &self, spec: &Spec, ) -> Result<(), SpecError>

Validate that all acceptance criteria are addressed by tasks

Ensures that every acceptance criterion from requirements has at least one task linked to it.

§Arguments
  • spec - The specification to validate
§Returns

Ok if all acceptance criteria are addressed, Err with list of unaddressed criteria

Source

pub fn get_completed_tasks(&self) -> Vec<String>

Get all tasks that are complete

§Returns

A vector of task IDs that have been marked as complete

Source

pub fn get_in_progress_tasks(&self) -> Vec<String>

Get all tasks that are in progress

§Returns

A vector of task IDs that are currently in progress

Source

pub fn get_not_started_tasks(&self) -> Vec<String>

Get all tasks that have not been started

§Returns

A vector of task IDs that have not been started

Source

pub fn get_completion_percentage(&self) -> f64

Get overall workflow completion percentage

Calculates the percentage of tasks that have been completed.

§Returns

A percentage (0-100) of completed tasks, or 0 if no tasks exist

Source

pub fn get_all_linked_requirements(&self) -> HashSet<String>

Get all linked requirement IDs across all tasks

§Returns

A set of all requirement IDs that have task links

Source

pub fn get_all_linked_tasks(&self) -> HashSet<String>

Get all linked task IDs

§Returns

A set of all task IDs that have requirement links

Source

pub fn reset(&mut self)

Clear all links and reset the orchestrator

Trait Implementations§

Source§

impl Clone for WorkflowOrchestrator

Source§

fn clone(&self) -> WorkflowOrchestrator

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WorkflowOrchestrator

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WorkflowOrchestrator

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more