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
//! Cascade engine for propagating mutations through dependent code.
//!
//! This module provides a generalized system for tracking mutation impacts
//! and automatically generating necessary follow-up changes.
//!
//! # Overview
//!
//! When a mutation is applied (e.g., renaming a symbol, adding a field),
//! it can have cascading effects throughout the codebase. The cascade engine:
//!
//! 1. **Analyzes** the impact of a mutation
//! 2. **Plans** the necessary cascade changes
//! 3. **Executes** the changes in the correct order
//!
//! # Example
//!
//! ```rust,ignore
//! use ryo_analysis::cascade::{CascadeEngine, CascadeStrategy};
//!
//! // Create an engine
//! let engine = CascadeEngine::new(&graph, ®istry)
//! .with_strategy(CascadeStrategy::safe());
//!
//! // Create a mutation spec
//! let rename = RenameSpec::new(path, "NewName");
//!
//! // Analyze impacts
//! let analysis = engine.analyze(&rename);
//! println!("Affected files: {}", analysis.affected_file_count());
//!
//! // Generate a plan
//! let plan = engine.plan(&rename);
//!
//! // Dry run first
//! let dry_result = engine.execute(plan.clone(), true);
//!
//! // Then execute for real
//! let result = engine.execute(plan, false);
//! ```
//!
//! # Impact Levels
//!
//! Mutations are classified by their impact level:
//!
//! - **Local**: Changes only affect the same file
//! - **Reference**: Changes affect references from other files
//! - **Structural**: Changes affect type structure (fields, variants)
//! - **Semantic**: Changes affect type behavior (derives, visibility)
//!
//! # Strategies
//!
//! The cascade engine supports different strategies for handling various situations:
//!
//! - `CascadeStrategy::default()` - Balanced approach
//! - `CascadeStrategy::safe()` - Prioritize data protection
//! - `CascadeStrategy::aggressive()` - Prioritize automation
//! - `CascadeStrategy::interactive()` - Prompt for decisions
// === Analyzer ===
pub use CascadeAnalyzer;
// === Spec ===
pub use ;
// === Impact ===
pub use ;
// === Strategy ===
pub use CascadeStrategy;