1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! `bears` — a file-based task tracker for AI agent workflows.
//!
//! Tasks are markdown files with YAML frontmatter in a `.bears/` directory.
//! This crate is the core library behind the `bea` CLI, MCP server, and TUI; it
//! is published so that an independent application can drive a bears repository
//! directly instead of shelling out to the binary.
//!
//! # Layering
//!
//! - [`store`] parses and writes the `.bears/` directory, including the archive.
//! - [`task`] defines [`Task`](task::Task) and the frontmatter format.
//! - [`graph`] computes the dependency graph, readiness, and effective priority.
//! - [`service`] is the business logic layer — create, update, reparent, archive,
//! epic progress and auto-close. Most callers want this.
//! - [`scaffold`] writes coding-agent integration files (`CLAUDE.md`, skills, MCP config).
//!
//! There is no cache and no daemon: [`store::load_all`] re-reads the whole
//! directory, and mutating functions take the resulting map by reference.
//!
//! # Example
//!
//! ```no_run
//! use bears::{service, store};
//!
//! # async fn run() -> bears::error::Result<()> {
//! let base = std::path::Path::new(".");
//! let tasks = store::load_all(base).await?;
//!
//! for task in service::list_ready(&tasks, None, None, None) {
//! println!("{} {} {}", task.id, task.priority, task.title);
//! }
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;