Skip to main content

Crate scud_task_core

Crate scud_task_core 

Source
Expand description

§SCUD Core - Shared Types for SCUD Task Management

This crate provides the core data types and utilities shared between SCUD CLI and Descartes GUI applications.

§Features

  • Task types: Task, TaskStatus, Priority
  • Phase management: Phase, PhaseStats, IdFormat
  • SCG format: Token-efficient text format for task graphs
  • Wave computation: Parallel execution wave calculation
  • Storage: File-based task persistence with locking

§Example

use scud_core::{Task, Phase, compute_waves};

// Create a phase with tasks
let mut phase = Phase::new("my-feature".to_string());

let task1 = Task::new(
    "1".to_string(),
    "Implement feature".to_string(),
    "Add the new functionality".to_string(),
);

let mut task2 = Task::new(
    "2".to_string(),
    "Write tests".to_string(),
    "Add test coverage".to_string(),
);
task2.dependencies = vec!["1".to_string()];

phase.add_task(task1);
phase.add_task(task2);

// Find tasks ready to work on
if let Some(next) = phase.find_next_task() {
    println!("Ready: {}", next.title);
}

// Compute parallel execution waves
let task_refs: Vec<&Task> = phase.tasks.iter().collect();
let result = compute_waves(&task_refs);
println!("Waves: {}", result.waves.len());

Re-exports§

pub use models::IdFormat;
pub use models::Phase;
pub use models::PhaseStats;
pub use models::Priority;
pub use models::Task;
pub use models::TaskStatus;
pub use formats::natural_sort_ids;
pub use formats::parse_scg;
pub use formats::serialize_scg;
pub use formats::Format;
pub use waves::compute_waves;
pub use waves::detect_id_collisions;
pub use waves::Wave;
pub use waves::WaveResult;
pub use storage::Storage;

Modules§

formats
Task graph serialization formats.
models
Core data models for tasks and phases.
publisher
Event publishing system using ZMQ.
storage
File-based task storage with locking.
waves
Wave computation for parallel task execution.