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§
- Active
Lock - 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.
- Event
Log - Manages the events.jsonl file.
- Event
Pattern - A pattern for matching events in b-thread rules.
- Glob
Pattern - A glob pattern for matching file paths and targets.
- Node
Annotation - Node annotation from extended @nodes (role=, scope=).
- Partition
Def - A partition definition for deterministic work sharding.
- Role
- An agent role with scope constraints.
- Timestamped
Event - An event with a timestamp, as stored in events.jsonl.
- Weave
Edge - A behavioral edge between two nodes.
Enums§
- BThread
Rule - Rule types for b-thread coordination.
- Decision
- The coordinator’s decision for a proposed event.
- Event
Kind - The kind of event being coordinated.
- Weave
Edge Type - Type of behavioral edge.