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::validate_weave;
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;
pub use scud_weave as weave;

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.

Structs§

ActiveLock
An active mutex lock held by an agent.
BThread
A behavioral thread — a named, prioritized set of coordination rules.
Coordinator
The b-thread coordinator.
Event
A coordination event representing an action by an agent.
EventLog
Manages the events.jsonl file.
EventPattern
A pattern for matching events in b-thread rules.
GlobPattern
A glob pattern for matching file paths and targets.
NodeAnnotation
Node annotation from extended @nodes (role=, scope=).
PartitionDef
A partition definition for deterministic work sharding.
Role
An agent role with scope constraints.
TimestampedEvent
An event with a timestamp, as stored in events.jsonl.
WeaveEdge
A behavioral edge between two nodes.

Enums§

BThreadRule
Rule types for b-thread coordination.
Decision
The coordinator’s decision for a proposed event.
EventKind
The kind of event being coordinated.
WeaveEdgeType
Type of behavioral edge.