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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! Unified Configuration Types
//!
//! This module defines the unified configuration format for Ralph,
//! consolidating all settings into a single `~/.config/ralph-workflow.toml` file.
//!
//! # Configuration Structure
//!
//! ```toml
//! [general]
//! verbosity = 2
//! interactive = true
//! isolation_mode = true
//!
//! [agents.claude]
//! cmd = "claude -p"
//! # ...
//!
//! [ccs_aliases]
//! work = "ccs work"
//! personal = "ccs personal"
//!
//! [agent_chains]
//! developer = ["ccs/work", "claude"]
//! reviewer = ["claude"]
//!
//! [agent_drains]
//! planning = "developer"
//! development = "developer"
//! review = "reviewer"
//! fix = "reviewer"
//! commit = "reviewer"
//! analysis = "developer"
//! ```
//!
//! # Module Organization
//!
//! This module is split into focused submodules:
//!
//! - [`types`]: All configuration type definitions (General, CCS, Agent configs)
//! - [`loading`]: Configuration loading and initialization logic
//! - [`merging`]: `merge_with` and `merge_with_content` implementation
//! - [`fallback_merge`]: Fallback chain merge helper functions
//! - [`helpers`]: Utility functions (path resolution, etc.)
//!
//! # Examples
//!
//! ## Loading Configuration
//!
//! ```rust
//! use ralph_workflow::config::unified::UnifiedConfig;
//!
//! // Load from default location (~/.config/ralph-workflow.toml)
//! if let Some(config) = UnifiedConfig::load_default() {
//! println!("Verbosity: {}", config.general.verbosity);
//! }
//! ```
//!
//! ## Ensuring Configuration Exists
//!
//! ```rust
//! use ralph_workflow::config::unified::{UnifiedConfig, ConfigInitResult};
//!
//! // Create config from template if it doesn't exist
//! match UnifiedConfig::ensure_config_exists() {
//! Ok(ConfigInitResult::Created) => println!("Created new config"),
//! Ok(ConfigInitResult::AlreadyExists) => println!("Config already exists"),
//! Err(e) => eprintln!("Error: {}", e),
//! }
//! # Ok::<(), std::io::Error>(())
//! ```
// Re-export all public types and functions at the module level for convenience
pub use ;
pub use ;
pub use ;
// Clippy's `large_stack_frames` lint no longer trips on the generated lib-test harness.
// The lint is no longer fired in current Rust versions, so no suppression is needed.