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
//! Advanced change detection and classification
//!
//! This module provides intelligent file change classification with a layered architecture:
//!
//! - **Layer 1: `classify`** - Pure file classification by path (fast, no I/O)
//! - `ChangeKind`: Source, Test, Example, BuildScript, Config, Documentation, Other
//!
//! - **Layer 2: `workspace::change_analyzer`** - Graph + cargo aware impact analysis
//! - `ImpactReport`: Direct crates, transitive dependents, rebuild requirements
//! - Proc-macro detection via cached workspace state
//!
//! - **Layer 3: `presentation`** - User-configurable presentation choices
//! - `ChangeClassification`: docs-only, rebuild-all, custom categories
//! - Driven by `ChangeDetectionConfig` from rail.toml
//!
//! # Usage
//!
//! ```text
//! // Layer 1: Quick file classification
//! let kind = classify_file(path);
//!
//! // Layer 2: Full impact analysis (requires workspace context)
//! let impact = ChangeImpact::new(&ctx).analyze_changes("main", None)?;
//!
//! // Layer 3: Presentation classification
//! let classifier = ChangeClassifier::new(&config.change_detection);
//! let classification = classifier.classify(&changed_files);
//! ```
// Layer 1: File classification types
pub use ;
// Layer 3: Presentation classification
pub use ;