pub mod analyzer;
pub mod context;
pub mod semantic;
pub mod strategies;
pub mod types;
pub use analyzer::AIAnalyzer;
pub use types::*;
use crate::validation::Violation;
use std::path::Path;
pub async fn analyze_violations_for_ai(
violations: &[Violation],
project_path: &Path,
) -> anyhow::Result<AIAnalysisReport> {
let analyzer = AIAnalyzer::new(project_path.to_path_buf());
analyzer.analyze_violations_async(violations.to_vec()).await
}
pub async fn analyze_and_generate_report(
project_path: &Path,
violations: &[Violation],
) -> anyhow::Result<()> {
let analyzer = AIAnalyzer::new(project_path.to_path_buf());
let report = analyzer
.analyze_violations_async(violations.to_vec())
.await?;
analyzer.save_analysis(&report)?;
let instructions = generate_orchestrator_instructions(&report).await?;
analyzer.save_orchestrator_instructions(&instructions)?;
Ok(())
}
pub async fn generate_orchestrator_instructions(
report: &AIAnalysisReport,
) -> anyhow::Result<AIAnalysisReport> {
println!("📝 Generated orchestrator instructions");
Ok(report.clone())
}