//! Workflow helpers — shared story/bug file operations used by HTTP and MCP handlers.
mod bug_ops;
pub(crate) mod pipeline;
mod story_ops;
mod test_results;
mod utils;

pub use bug_ops::{
    create_bug_file, create_epic_file, create_refactor_file, create_spike_file, list_bug_files,
    list_refactor_files,
};
pub use pipeline::{
    PipelineState, UpcomingStory, load_pipeline_state, load_upcoming_stories, validate_story_dirs,
};
pub use story_ops::{
    add_criterion_to_file, check_criterion_in_file, create_story_file, edit_criterion_in_file,
    remove_criterion_from_file, update_story_in_file,
};
pub use test_results::{read_test_results_from_story_file, write_test_results_to_story_file};

pub(crate) use utils::{
    create_item_in_backlog, create_section_content, next_item_number, read_story_content,
    replace_or_append_section, replace_section_content, slugify_name, story_stage,
    write_story_content,
};
