ito_domain/tasks/mod.rs
1//! Task domain models, parsing, update helpers, and repository ports.
2//!
3//! This module implements the core logic for Ito's task tracking system, which supports
4//! two formats:
5//! - **Enhanced**: Structured markdown with waves, dependencies, and metadata.
6//! - **Checkbox**: Legacy simple checklist format.
7//!
8//! Key components:
9//! - [`TaskRepository`](crate::tasks::TaskRepository): Port for accessing task data (implemented by core).
10//! - [`parse_tasks_tracking_file`](crate::tasks::parse_tasks_tracking_file): Normalizes markdown into [`TasksParseResult`](crate::tasks::TasksParseResult).
11//! - [`compute_ready_and_blocked`](crate::tasks::compute_ready_and_blocked): Determines which tasks are actionable based on waves/deps.
12//! - [`update_enhanced_task_status`](crate::tasks::update_enhanced_task_status): Modifies markdown content to reflect status changes.
13
14mod checkbox;
15mod compute;
16mod cycle;
17mod parse;
18mod relational;
19mod repository;
20mod update;
21
22/// Compute ready vs blocked tasks for a parsed tracking file.
23pub use compute::compute_ready_and_blocked;
24/// Detect whether a `tasks.md` file is enhanced or checkbox format.
25pub use parse::detect_tasks_format;
26/// Generate the enhanced `tasks.md` template for a change.
27pub use parse::enhanced_tasks_template;
28/// Returns true when a tracking filename is safe as a single path segment.
29pub use parse::is_safe_tracking_filename;
30/// Parse task tracking markdown into a normalized representation.
31pub use parse::parse_tasks_tracking_file;
32/// Build a tasks path with fallback behavior for invalid ids.
33pub use parse::tasks_path;
34/// Build a tasks path only when the change id is a safe path segment.
35pub use parse::tasks_path_checked;
36/// Build a tracking file path when change id + filename are safe.
37pub use parse::tracking_path_checked;
38/// Repository port for loading and querying task data.
39pub use repository::TaskRepository;
40/// Update checkbox-format task status markers.
41pub use update::update_checkbox_task_status;
42/// Update enhanced-format task status and metadata.
43pub use update::update_enhanced_task_status;
44
45/// Parsed task tracking result.
46pub use parse::TasksParseResult;
47/// Parsed wave metadata from enhanced format.
48pub use parse::WaveInfo;
49/// Common task domain types.
50pub use parse::{
51 DiagnosticLevel, ProgressInfo, TaskDiagnostic, TaskItem, TaskKind, TaskStatus, TasksFormat,
52};