scud-task-core 1.67.0

Core library for SCUD task management
Documentation

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());