detect_tasks_format

Function detect_tasks_format 

Source
pub fn detect_tasks_format(contents: &str) -> TasksFormat
Expand description

Detect whether a tasks.md file is enhanced or checkbox format. Detects whether task tracking contents use the enhanced wave-based format or the legacy checkbox format.

The enhanced format is recognized by enhanced structural headings (e.g. # Tasks for: ..., ## Wave N, ### Task ...). This intentionally classifies partially-written enhanced files (missing - **Status**: lines) as enhanced so the parser can emit diagnostics.

ยงExamples

use ito_domain::tasks::{TasksFormat, detect_tasks_format};
let enhanced = "# Tasks for: 001-01\n\n## Wave 1\n\n### Task 1.1: Example\n";
assert_eq!(detect_tasks_format(enhanced), TasksFormat::Enhanced);

let checkbox = "- [ ] Task 1";
assert_eq!(detect_tasks_format(checkbox), TasksFormat::Checkbox);