task_graph_mcp/config/mod.rs
1//! Unified configuration system.
2//!
3//! Consolidates configuration from three tiers with field-by-field YAML merging:
4//! 1. **Defaults** - Embedded at build time from `./config/`
5//! 2. **Project** - `$CWD/task-graph/` (with `.task-graph/` backward compat)
6//! 3. **User** - `~/.task-graph/` and environment variables
7//!
8//! ## Merge Strategy
9//! - YAML files (`config.yaml`, `prompts.yaml`): Deep merge field-by-field
10//! - Other files (skills, templates): First-found-wins from highest tier
11//!
12//! ## Environment Variables
13//! - `TASK_GRAPH_CONFIG_PATH` - Explicit config file (overrides all)
14//! - `TASK_GRAPH_DB_PATH` - Database path
15//! - `TASK_GRAPH_MEDIA_DIR` - Media directory
16//! - `TASK_GRAPH_LOG_DIR` - Log directory
17//! - `TASK_GRAPH_SKILLS_DIR` - Skills directory
18//! - `TASK_GRAPH_USER_DIR` - User config dir (default: `~/.task-graph`)
19//! - `TASK_GRAPH_PROJECT_DIR` - Project config dir (default: `./task-graph`)
20
21pub mod embedded;
22mod files;
23mod loader;
24mod merge;
25mod types;
26pub mod watcher;
27pub mod workflows;
28
29pub use files::{FileSource, ResolvedFile};
30pub use loader::{ConfigLoader, ConfigPaths, ConfigTier};
31pub use merge::deep_merge;
32pub use types::*;
33// AppConfig is re-exported via the glob above.