//! Configuration management for behavior trees
//!
//! This module provides utilities for loading and validating behavior tree configurations
//! with support for environment-specific overrides.
//!
//! # Configuration Hierarchy
//!
//! Behavior configurations follow a three-tier hierarchy:
//!
//! 1. **Template** (`behaviors/{name}.json`) - Base behavior definition
//! 2. **Common** (`configs/common/behaviors/{name}.json`) - Shared overrides
//! 3. **Environment** (`configs/{env}/behaviors/{name}.json`) - Environment-specific overrides
//!
//! # Example Structure
//!
//! ```text
//! my-robot/
//! ├── behaviors/
//! │   └── idle_wander.json          # Base template
//! └── configs/
//!     ├── dev/
//!     │   └── behaviors/
//!     │       └── idle_wander.json  # Dev overrides (faster tick rate)
//!     ├── production/
//!     │   └── behaviors/
//!     │       └── idle_wander.json  # Production overrides (conservative)
//!     └── common/
//!         └── behaviors/
//!             └── idle_wander.json  # Shared overrides
//! ```
//!
//! # Usage
//!
//! ```rust,ignore
//! use mecha10_behavior_runtime::config::{load_behavior_config, validate_behavior_config};
//! use std::path::Path;
//!
//! // Load with environment-specific overrides
//! let config = load_behavior_config(
//!     "idle_wander",
//!     Path::new("/path/to/project"),
//!     "dev"
//! ).await?;
//!
//! // Validate before loading
//! let registry = NodeRegistry::new();
//! let result = validate_behavior_config(&config, &registry)?;
//! if !result.valid {
//!     for error in result.errors {
//!         eprintln!("Validation error: {}", error);
//!     }
//! }
//! ```

mod loader;
mod types;
mod validator;

pub use loader::{detect_project_root, get_current_environment, load_behavior_config};
pub use types::{BehaviorConfig, CompositionConfig, NodeConfig, NodeReference, ParallelPolicyConfig};
pub use validator::{validate_behavior_config, ValidationResult};
