diff --git a/crates/adapters/mermaid/src/mermaid_renderer.rs b/crates/adapters/mermaid/src/mermaid_renderer.rs index 96bc0ce..32368bf 100644 --- a/crates/adapters/mermaid/src/mermaid_renderer.rs +++ b/crates/adapters/mermaid/src/mermaid_renderer.rs @@ -236,7 +236,10 @@ impl DiagramRenderer for MermaidRenderer { let content = if cross_deps.is_empty() { base } else { - let src_id = format!("{}_module", module.as_str().to_lowercase().replace('-', "_")); + let src_id = format!( + "{}_module", + module.as_str().to_lowercase().replace('-', "_") + ); let mut extra = format!( " class {src_id}[\"{}\"] {{\n <>\n }}\n", module.as_str() @@ -250,7 +253,11 @@ impl DiagramRenderer for MermaidRenderer { " class {dep_id}[\"{}\"] {{\n <>\n }}\n", dep_mod.as_str() )); - let label = if *count == 1 { "1 dep".to_string() } else { format!("{count} deps") }; + let label = if *count == 1 { + "1 dep".to_string() + } else { + format!("{count} deps") + }; extra.push_str(&format!(" {src_id} --> {dep_id} : {label}\n")); } format!("{base}\n{extra}") diff --git a/crates/adapters/tree-sitter/src/extraction_context.rs b/crates/adapters/tree-sitter/src/extraction_context.rs index 0f2582f..2f571fa 100644 --- a/crates/adapters/tree-sitter/src/extraction_context.rs +++ b/crates/adapters/tree-sitter/src/extraction_context.rs @@ -36,7 +36,8 @@ impl ExtractionContext { } pub fn add_relationship(&mut self, rel: Relationship) { - self.relationships.push(rel.with_source_file(self.file_path.clone())); + self.relationships + .push(rel.with_source_file(self.file_path.clone())); } pub fn add_warning(&mut self, file_path: FilePath, line: usize, message: &str) { @@ -51,6 +52,10 @@ impl ExtractionContext { /// Consumes the context and returns the completed `AnalysisResult`. pub fn into_result(self) -> Result { - Ok(AnalysisResult::new(self.elements, self.relationships, self.warnings)) + Ok(AnalysisResult::new( + self.elements, + self.relationships, + self.warnings, + )) } } diff --git a/crates/adapters/tree-sitter/src/python/mod.rs b/crates/adapters/tree-sitter/src/python/mod.rs index c26520e..b9a1806 100644 --- a/crates/adapters/tree-sitter/src/python/mod.rs +++ b/crates/adapters/tree-sitter/src/python/mod.rs @@ -303,7 +303,12 @@ fn extract_python_params(params_node: &Node, source: &str) -> String { parts.join(", ") } -fn collect_constructor_params(body: &Node, source: &str, class_name: &str, ctx: &mut ExtractionContext) { +fn collect_constructor_params( + body: &Node, + source: &str, + class_name: &str, + ctx: &mut ExtractionContext, +) { let mut cursor = body.walk(); for child in body.children(&mut cursor) { if child.kind() != "function_definition" { @@ -342,7 +347,12 @@ fn collect_typed_fields(body: &Node, source: &str, class_name: &str, ctx: &mut E collect_typed_fields_recursive(body, source, class_name, ctx); } -fn collect_typed_fields_recursive(node: &Node, source: &str, class_name: &str, ctx: &mut ExtractionContext) { +fn collect_typed_fields_recursive( + node: &Node, + source: &str, + class_name: &str, + ctx: &mut ExtractionContext, +) { let mut cursor = node.walk(); for child in node.children(&mut cursor) { if (child.kind() == "assignment" || child.kind() == "typed_assignment") diff --git a/crates/adapters/tree-sitter/src/rust/mod.rs b/crates/adapters/tree-sitter/src/rust/mod.rs index 01cd478..276c9c7 100644 --- a/crates/adapters/tree-sitter/src/rust/mod.rs +++ b/crates/adapters/tree-sitter/src/rust/mod.rs @@ -1,9 +1,38 @@ use tree_sitter::{Node, Parser}; const RUST_PRIMITIVES: &[&str] = &[ - "bool", "char", "str", "String", "u8", "u16", "u32", "u64", "u128", "usize", "i8", "i16", - "i32", "i64", "i128", "isize", "f32", "f64", "Vec", "Option", "Result", "Box", "Rc", "Arc", - "HashMap", "HashSet", "BTreeMap", "BTreeSet", "PhantomData", "Pin", "Cow", "Self", + "bool", + "char", + "str", + "String", + "u8", + "u16", + "u32", + "u64", + "u128", + "usize", + "i8", + "i16", + "i32", + "i64", + "i128", + "isize", + "f32", + "f64", + "Vec", + "Option", + "Result", + "Box", + "Rc", + "Arc", + "HashMap", + "HashSet", + "BTreeMap", + "BTreeSet", + "PhantomData", + "Pin", + "Cow", + "Self", ]; use archlens_domain::{ @@ -143,8 +172,12 @@ fn extract_fields(node: &Node, source: &str) -> Vec { let mut cursor = body.walk(); for child in body.children(&mut cursor) { if child.kind() == "field_declaration" { - let name = child.child_by_field_name("name").map(|n| &source[n.byte_range()]); - let ty = child.child_by_field_name("type").map(|n| extract_base_type(&n, source)); + let name = child + .child_by_field_name("name") + .map(|n| &source[n.byte_range()]); + let ty = child + .child_by_field_name("type") + .map(|n| extract_base_type(&n, source)); if let (Some(name), Some(ty)) = (name, ty) { fields.push(format!("{name}: {ty}")); } @@ -174,7 +207,11 @@ fn extract_methods(root: &Node, source: &str, type_name: &str) -> Vec { && let Some(name_node) = item.child_by_field_name("name") { let fn_name = &source[name_node.byte_range()]; - let vis = if detect_visibility(&item, source) == Visibility::Public { "+" } else { "-" }; + let vis = if detect_visibility(&item, source) == Visibility::Public { + "+" + } else { + "-" + }; let params = extract_fn_params(&item, source); let ret = extract_fn_return(&item, source); let sig = if ret.is_empty() { @@ -258,7 +295,11 @@ fn collect_use_imports(node: &Node, source: &str, ctx: &mut ExtractionContext) { } if let Some(arg) = child.child_by_field_name("argument") { let text = &source[arg.byte_range()]; - let path = text.split('{').next().unwrap_or(text).trim_end_matches("::"); + let path = text + .split('{') + .next() + .unwrap_or(text) + .trim_end_matches("::"); if (path.starts_with("crate::") || path.starts_with("super::")) && let Ok(rel) = Relationship::new(&file_name, path, RelationshipKind::Import) diff --git a/crates/application/src/queries/analyze_codebase.rs b/crates/application/src/queries/analyze_codebase.rs index 77528af..fddcbf3 100644 --- a/crates/application/src/queries/analyze_codebase.rs +++ b/crates/application/src/queries/analyze_codebase.rs @@ -56,7 +56,11 @@ where el }) .collect(); - (elements, result.relationships().to_vec(), result.warnings().to_vec()) + ( + elements, + result.relationships().to_vec(), + result.warnings().to_vec(), + ) } Err(err) => { let mut warnings = Vec::new(); diff --git a/crates/application/src/use_cases/generate_diagram.rs b/crates/application/src/use_cases/generate_diagram.rs index 0dc3041..5bf8e3a 100644 --- a/crates/application/src/use_cases/generate_diagram.rs +++ b/crates/application/src/use_cases/generate_diagram.rs @@ -1,8 +1,7 @@ use std::path::PathBuf; use archlens_domain::{ - BoundaryRule, DomainError, NormalizedGraph, RenderedFile, RenderOutput, - check_boundary_rules, + BoundaryRule, DomainError, NormalizedGraph, RenderOutput, RenderedFile, check_boundary_rules, ports::DiagramRenderer, }; @@ -72,9 +71,7 @@ pub fn write_split( output_dir: &Option, ext: &str, ) -> Result<(), DomainError> { - let dir = output_dir - .clone() - .unwrap_or_else(|| PathBuf::from(".")); + let dir = output_dir.clone().unwrap_or_else(|| PathBuf::from(".")); let overview = renderer.render(graph.as_graph())?; let overview_file = RenderedFile::new( @@ -89,7 +86,11 @@ pub fn write_split( let module_output = renderer.render_for_module(&subgraph, &module, &cross_deps)?; let module_file = RenderedFile::new( &format!("{}.{ext}", module.as_str().to_lowercase()), - module_output.files().first().map(|f| f.content()).unwrap_or(""), + module_output + .files() + .first() + .map(|f| f.content()) + .unwrap_or(""), )?; write_file_to_dir(&dir, module_file)?; } @@ -99,10 +100,8 @@ pub fn write_split( fn write_file_to_dir(dir: &PathBuf, file: RenderedFile) -> Result<(), DomainError> { let path = dir.join(file.name()); - std::fs::create_dir_all(dir) - .map_err(|e| DomainError::IoError(e.to_string()))?; - std::fs::write(&path, file.content()) - .map_err(|e| DomainError::IoError(e.to_string()))?; + std::fs::create_dir_all(dir).map_err(|e| DomainError::IoError(e.to_string()))?; + std::fs::write(&path, file.content()).map_err(|e| DomainError::IoError(e.to_string()))?; Ok(()) } @@ -111,11 +110,9 @@ fn write_to_output(rendered: RenderOutput, output: &Option) -> Result<( match output { Some(path) => { if let Some(parent) = path.parent() { - std::fs::create_dir_all(parent) - .map_err(|e| DomainError::IoError(e.to_string()))?; + std::fs::create_dir_all(parent).map_err(|e| DomainError::IoError(e.to_string()))?; } - std::fs::write(path, content) - .map_err(|e| DomainError::IoError(e.to_string())) + std::fs::write(path, content).map_err(|e| DomainError::IoError(e.to_string())) } None => { print!("{content}"); diff --git a/crates/domain/src/aggregates/code_graph.rs b/crates/domain/src/aggregates/code_graph.rs index f013c29..13bcefd 100644 --- a/crates/domain/src/aggregates/code_graph.rs +++ b/crates/domain/src/aggregates/code_graph.rs @@ -298,8 +298,11 @@ impl CodeGraph { crate_to_module.insert(element.name().to_string(), module); } - let graph_modules: HashSet = - self.modules().iter().map(|m| m.as_str().to_string()).collect(); + let graph_modules: HashSet = self + .modules() + .iter() + .map(|m| m.as_str().to_string()) + .collect(); for rel in project_graph.relationships() { let src_module = crate_to_module.get(rel.source()); @@ -308,8 +311,7 @@ impl CodeGraph { && src != tgt && graph_modules.contains(src) && graph_modules.contains(tgt) - && let Ok(edge) = - Relationship::new(src, tgt, RelationshipKind::Composition) + && let Ok(edge) = Relationship::new(src, tgt, RelationshipKind::Composition) { self.add_relationship(edge); } diff --git a/crates/domain/src/aggregates/normalized_graph.rs b/crates/domain/src/aggregates/normalized_graph.rs index dff5943..1fb435b 100644 --- a/crates/domain/src/aggregates/normalized_graph.rs +++ b/crates/domain/src/aggregates/normalized_graph.rs @@ -44,9 +44,7 @@ impl NormalizedGraph { self.0.modules() } - pub fn elements_by_module( - &self, - ) -> (HashMap>, Vec<&CodeElement>) { + pub fn elements_by_module(&self) -> (HashMap>, Vec<&CodeElement>) { self.0.elements_by_module() } diff --git a/crates/domain/src/lib.rs b/crates/domain/src/lib.rs index 98db5ad..c2e3304 100644 --- a/crates/domain/src/lib.rs +++ b/crates/domain/src/lib.rs @@ -13,6 +13,6 @@ pub use value_objects::graph::{CodeElementKind, RelationshipKind, Visibility}; pub use value_objects::output::{DiagramLevel, OutputConfig, RenderOutput, RenderedFile}; pub use value_objects::rules::{BoundaryRule, RuleKind, RuleViolation, check_boundary_rules}; pub use value_objects::source::{ - FilePath, Language, ModuleAssignment, ModuleName, SourceFile, - normalize_cargo_package, normalize_python_package, + FilePath, Language, ModuleAssignment, ModuleName, SourceFile, normalize_cargo_package, + normalize_python_package, }; diff --git a/crates/domain/tests/code_graph_tests.rs b/crates/domain/tests/code_graph_tests.rs index 7346b55..3ea9c44 100644 --- a/crates/domain/tests/code_graph_tests.rs +++ b/crates/domain/tests/code_graph_tests.rs @@ -353,5 +353,8 @@ fn module_edges_excludes_intra_module_relationships() { let graph = graph.qualify(); let edges = graph.module_edges(); - assert!(edges.is_empty(), "intra-module relationships should not produce edges"); + assert!( + edges.is_empty(), + "intra-module relationships should not produce edges" + ); } diff --git a/crates/domain/tests/policy_tests.rs b/crates/domain/tests/policy_tests.rs index a6f3923..a7261fa 100644 --- a/crates/domain/tests/policy_tests.rs +++ b/crates/domain/tests/policy_tests.rs @@ -89,7 +89,12 @@ fn merge_project_edges_ignores_crates_with_no_matching_module() { .unwrap(), ); project_graph.add_relationship( - Relationship::new("external-lib", "myapp-domain", RelationshipKind::Composition).unwrap(), + Relationship::new( + "external-lib", + "myapp-domain", + RelationshipKind::Composition, + ) + .unwrap(), ); graph.merge_project_edges(&project_graph); diff --git a/crates/presentation/src/lib.rs b/crates/presentation/src/lib.rs index bf5ea55..20495f3 100644 --- a/crates/presentation/src/lib.rs +++ b/crates/presentation/src/lib.rs @@ -43,13 +43,15 @@ pub fn run(args: Cli) -> Result<()> { let renderer = create_renderer(&args.format, level, !args.no_weights)?; if args.check { - let existing_path = args.output.as_ref() - .ok_or_else(|| anyhow::anyhow!("--check requires --output to specify the file to check against"))?; + let existing_path = args.output.as_ref().ok_or_else(|| { + anyhow::anyhow!("--check requires --output to specify the file to check against") + })?; let up_to_date = CheckFreshness { graph: &graph, renderer: &*renderer, existing_path: std::path::Path::new(existing_path), - }.execute()?; + } + .execute()?; if up_to_date { println!("Architecture diagram is up to date."); } else { @@ -60,8 +62,14 @@ pub fn run(args: Cli) -> Result<()> { } let (raw_allow, raw_deny) = config_loader.load_rules(); - let allow: Vec = raw_allow.iter().filter_map(|s| BoundaryRule::parse(s)).collect(); - let deny: Vec = raw_deny.iter().filter_map(|s| BoundaryRule::parse(s)).collect(); + let allow: Vec = raw_allow + .iter() + .filter_map(|s| BoundaryRule::parse(s)) + .collect(); + let deny: Vec = raw_deny + .iter() + .filter_map(|s| BoundaryRule::parse(s)) + .collect(); let output_dir = args.output.as_ref().map(std::path::PathBuf::from); let use_case = GenerateDiagram { @@ -76,7 +84,10 @@ pub fn run(args: Cli) -> Result<()> { let violations = use_case.check_violations_only(); if args.strict && !violations.is_empty() { - bail!("{} boundary rule violation(s) in strict mode", violations.len()); + bail!( + "{} boundary rule violation(s) in strict mode", + violations.len() + ); } use_case.execute()?; @@ -135,10 +146,18 @@ fn build_graph(args: &Cli, level: DiagramLevel) -> Result { if !result.warnings().is_empty() { for warning in result.warnings() { - eprintln!("WARNING: {}:{} {}", warning.file_path().as_str(), warning.line(), warning.message()); + eprintln!( + "WARNING: {}:{} {}", + warning.file_path().as_str(), + warning.line(), + warning.message() + ); } if args.strict { - bail!("analysis produced {} warning(s) in strict mode", result.warnings().len()); + bail!( + "analysis produced {} warning(s) in strict mode", + result.warnings().len() + ); } } @@ -165,7 +184,9 @@ fn create_renderer( show_weights: bool, ) -> Result> { match format { - "mermaid" => Ok(Box::new(MermaidRenderer::with_level(level).with_weights(show_weights))), + "mermaid" => Ok(Box::new( + MermaidRenderer::with_level(level).with_weights(show_weights), + )), "ascii" => Ok(Box::new(AsciiRenderer::new())), "d2" => Ok(Box::new(D2Renderer::with_level(level))), "html" => Ok(Box::new(HtmlRenderer::new())), @@ -193,7 +214,8 @@ fn run_diff(args: &Cli, existing_path: &std::path::Path) -> Result<()> { graph: &graph, renderer: &*renderer, existing_path, - }.execute()?; + } + .execute()?; if diff.is_empty() { println!("No changes detected."); @@ -206,7 +228,11 @@ fn run_diff(args: &Cli, existing_path: &std::path::Path) -> Result<()> { for line in &diff.added { println!("{line}"); } - println!("\n{} added, {} removed", diff.added.len(), diff.removed.len()); + println!( + "\n{} added, {} removed", + diff.added.len(), + diff.removed.len() + ); std::process::exit(1); } @@ -286,7 +312,10 @@ fn get_changed_files( .map_err(|e| anyhow::anyhow!("git not found: {e}"))?; if !output.status.success() { - bail!("git diff failed: {}", String::from_utf8_lossy(&output.stderr)); + bail!( + "git diff failed: {}", + String::from_utf8_lossy(&output.stderr) + ); } let files = String::from_utf8_lossy(&output.stdout) @@ -324,8 +353,14 @@ fn run_watch(args: Cli) -> Result<()> { } let (raw_allow, raw_deny) = config_loader.load_rules(); - let allow: Vec = raw_allow.iter().filter_map(|s| BoundaryRule::parse(s)).collect(); - let deny: Vec = raw_deny.iter().filter_map(|s| BoundaryRule::parse(s)).collect(); + let allow: Vec = raw_allow + .iter() + .filter_map(|s| BoundaryRule::parse(s)) + .collect(); + let deny: Vec = raw_deny + .iter() + .filter_map(|s| BoundaryRule::parse(s)) + .collect(); if !allow.is_empty() || !deny.is_empty() { let use_case = GenerateDiagram { graph, @@ -343,7 +378,10 @@ fn run_watch(args: Cli) -> Result<()> { Ok(()) }; - eprintln!("Watching {} for changes (Ctrl+C to stop)...", args.path.display()); + eprintln!( + "Watching {} for changes (Ctrl+C to stop)...", + args.path.display() + ); if let Err(e) = run_once(&args) { eprintln!("Error: {e}"); } else { @@ -351,14 +389,18 @@ fn run_watch(args: Cli) -> Result<()> { } let (tx, rx) = mpsc::channel(); - let mut watcher = recommended_watcher(move |res| { let _ = tx.send(res); })?; + let mut watcher = recommended_watcher(move |res| { + let _ = tx.send(res); + })?; watcher.watch(&args.path, RecursiveMode::Recursive)?; let mut last_run = Instant::now(); loop { match rx.recv() { Ok(_) => { - if last_run.elapsed() < debounce { continue; } + if last_run.elapsed() < debounce { + continue; + } last_run = Instant::now(); eprintln!("Change detected, regenerating..."); if let Err(e) = run_once(&args) { @@ -367,7 +409,10 @@ fn run_watch(args: Cli) -> Result<()> { eprintln!("Diagram updated."); } } - Err(e) => { eprintln!("Watch error: {e}"); break; } + Err(e) => { + eprintln!("Watch error: {e}"); + break; + } } } Ok(()) diff --git a/docs/arch/ascii/module.txt b/docs/arch/ascii/module.txt deleted file mode 100644 index 39ac5c6..0000000 --- a/docs/arch/ascii/module.txt +++ /dev/null @@ -1,144 +0,0 @@ -╔══════════════════════════════════════╗ -║ Architecture Overview ║ -╠══════════════════════════════════════╣ -║ Elements: 61 Modules: 4 ║ -║ Relationships: 59 ║ -╚══════════════════════════════════════╝ - -┌─ Adapters (30 types) -│ -│ ├── [str] AsciiRenderer -│ ├── [str] D2Renderer -│ ├── [str] CargoWorkspaceAnalyzer -│ ├── [str] WorkspaceToml -│ ├── [str] WorkspaceSection -│ ├── [str] MemberToml -│ ├── [str] PackageSection -│ ├── [str] PythonProjectAnalyzer -│ ├── [str] ProjectSection -│ ├── [str] PoetrySection -│ ├── [str] ToolSection -│ ├── [str] PyprojectToml -│ ├── [str] StdoutOutputWriter -│ ├── [str] FileOutputWriter -│ ├── [enm] OutputPath -│ ├── [str] MermaidRenderer -│ ├── [trt] LanguageExtractor -│ ├── [str] TreeSitterAnalyzer -│ ├── [str] RustExtractor -│ ├── [str] PythonExtractor -│ ├── [str] WalkdirDiscovery -│ ├── [str] HtmlRenderer -│ ├── [str] GraphData -│ ├── [str] NodeData -│ ├── [str] EdgeData -│ ├── [str] RawRules -│ ├── [str] RawConfig -│ ├── [str] RawAnalysis -│ ├── [str] RawOutput -│ └── [str] TomlConfigLoader -└─── - -┌─ Application (2 types) -│ -│ ├── [str] AnalyzeCodebase -│ └── [str] AnalyzeCodebaseResult -└─── - -┌─ Domain (27 types) -│ -│ ├── [str] Relationship -│ ├── [str] CodeElement -│ ├── [enm] DomainError -│ ├── [trt] DiagramRenderer -│ ├── [trt] SourceAnalyzer -│ ├── [trt] ConfigLoader -│ ├── [trt] FileDiscovery -│ ├── [trt] ProjectAnalyzer -│ ├── [trt] OutputWriter -│ ├── [str] AnalysisResult -│ ├── [str] AnalysisConfig -│ ├── [str] AnalysisWarning -│ ├── [enm] CodeElementKind -│ ├── [enm] RelationshipKind -│ ├── [enm] Visibility -│ ├── [enm] DiagramLevel -│ ├── [str] OutputConfig -│ ├── [str] RenderedFile -│ ├── [str] RenderOutput -│ ├── [str] ModuleName -│ ├── [enm] Language -│ ├── [str] SourceFile -│ ├── [str] FilePath -│ ├── [enm] RuleKind -│ ├── [str] RuleViolation -│ ├── [str] BoundaryRule -│ └── [str] CodeGraph -└─── - -┌─ Presentation (2 types) -│ -│ ├── [str] Cli -│ └── [enm] Command -└─── - -── Relationships ── - Adapters::AsciiRenderer ─[extends]─> Domain::DiagramRenderer - Adapters::D2Renderer ─[has]─> Domain::DiagramLevel - Adapters::D2Renderer ─[extends]─> Domain::DiagramRenderer - Adapters::CargoWorkspaceAnalyzer ─[extends]─> Domain::ProjectAnalyzer - Adapters::ToolSection ─[has]─> Adapters::PoetrySection - Adapters::PyprojectToml ─[has]─> Adapters::ToolSection - Adapters::PythonProjectAnalyzer ─[extends]─> Domain::ProjectAnalyzer - Adapters::StdoutOutputWriter ─[extends]─> Domain::OutputWriter - Adapters::FileOutputWriter ─[has]─> Adapters::OutputPath - Adapters::FileOutputWriter ─[extends]─> Domain::OutputWriter - Adapters::MermaidRenderer ─[has]─> Domain::DiagramLevel - Adapters::MermaidRenderer ─[extends]─> Domain::DiagramRenderer - Adapters::TreeSitterAnalyzer ─[has]─> Adapters::RustExtractor - Adapters::TreeSitterAnalyzer ─[has]─> Adapters::PythonExtractor - Adapters::TreeSitterAnalyzer ─[extends]─> Domain::SourceAnalyzer - Adapters::RustExtractor ─[extends]─> Adapters::LanguageExtractor - Adapters::PythonExtractor ─[extends]─> Adapters::LanguageExtractor - Adapters::WalkdirDiscovery ─[extends]─> Domain::FileDiscovery - Adapters::HtmlRenderer ─[extends]─> Domain::DiagramRenderer - Adapters::RawConfig ─[has]─> Adapters::RawAnalysis - Adapters::RawConfig ─[has]─> Adapters::RawOutput - Adapters::RawConfig ─[has]─> Adapters::RawRules - Adapters::TomlConfigLoader ─[has]─> Adapters::RawConfig - Adapters::TomlConfigLoader ─[extends]─> Domain::ConfigLoader - Application::AnalyzeCodebaseResult ─[has]─> Domain::CodeGraph - Domain::Relationship ─[has]─> Domain::RelationshipKind - Domain::CodeElement ─[has]─> Domain::CodeElementKind - Domain::CodeElement ─[has]─> Domain::FilePath - Domain::CodeElement ─[has]─> Domain::Visibility - Domain::AnalysisConfig ─[has]─> Domain::DiagramLevel - Domain::AnalysisWarning ─[has]─> Domain::FilePath - Domain::SourceFile ─[has]─> Domain::FilePath - Domain::SourceFile ─[has]─> Domain::Language - Domain::RuleViolation ─[has]─> Domain::RuleKind - Application ─[has]─> Domain - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Domain - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Adapters - Presentation ─[has]─> Application - Presentation ─[has]─> Adapters - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain - Adapters ─[has]─> Domain \ No newline at end of file diff --git a/docs/arch/ascii/project.txt b/docs/arch/ascii/project.txt deleted file mode 100644 index 95782ba..0000000 --- a/docs/arch/ascii/project.txt +++ /dev/null @@ -1,54 +0,0 @@ -╔══════════════════════════════════════╗ -║ Architecture Overview ║ -╠══════════════════════════════════════╣ -║ Elements: 14 Modules: 1 ║ -║ Relationships: 25 ║ -╚══════════════════════════════════════╝ - -┌─ (ungrouped) -│ [prj] archlens-domain -│ [prj] archlens-application -│ [prj] archlens -└─── - -┌─ Adapters (11 types) -│ -│ ├── [prj] archlens-tree-sitter -│ ├── [prj] archlens-walkdir -│ ├── [prj] archlens-mermaid -│ ├── [prj] archlens-ascii -│ ├── [prj] archlens-file-writer -│ ├── [prj] archlens-stdout-writer -│ ├── [prj] archlens-toml-config -│ ├── [prj] archlens-cargo-workspace -│ ├── [prj] archlens-python-project -│ ├── [prj] archlens-d2 -│ └── [prj] archlens-html -└─── - -── Relationships ── - archlens-application ─[has]─> archlens-domain - archlens ─[has]─> archlens-tree-sitter - archlens ─[has]─> archlens-ascii - archlens ─[has]─> archlens-stdout-writer - archlens ─[has]─> archlens-application - archlens ─[has]─> archlens-walkdir - archlens ─[has]─> archlens-d2 - archlens ─[has]─> archlens-html - archlens ─[has]─> archlens-mermaid - archlens ─[has]─> archlens-file-writer - archlens ─[has]─> archlens-domain - archlens ─[has]─> archlens-cargo-workspace - archlens ─[has]─> archlens-toml-config - archlens ─[has]─> archlens-python-project - archlens-tree-sitter ─[has]─> archlens-domain - archlens-walkdir ─[has]─> archlens-domain - archlens-mermaid ─[has]─> archlens-domain - archlens-ascii ─[has]─> archlens-domain - archlens-file-writer ─[has]─> archlens-domain - archlens-stdout-writer ─[has]─> archlens-domain - archlens-toml-config ─[has]─> archlens-domain - archlens-cargo-workspace ─[has]─> archlens-domain - archlens-python-project ─[has]─> archlens-domain - archlens-d2 ─[has]─> archlens-domain - archlens-html ─[has]─> archlens-domain \ No newline at end of file diff --git a/docs/arch/d2/module.d2 b/docs/arch/d2/module.d2 deleted file mode 100644 index df293a3..0000000 --- a/docs/arch/d2/module.d2 +++ /dev/null @@ -1,9 +0,0 @@ -Presentation: Presentation -Application: Application -Adapters: Adapters -Domain: Domain -Adapters -> Domain -Application -> Domain -Presentation -> Adapters -Presentation -> Domain -Presentation -> Application \ No newline at end of file diff --git a/docs/arch/d2/module.svg b/docs/arch/d2/module.svg deleted file mode 100644 index d116c64..0000000 --- a/docs/arch/d2/module.svg +++ /dev/null @@ -1,95 +0,0 @@ -AdaptersDomainApplicationPresentation - - - diff --git a/docs/arch/d2/project.d2 b/docs/arch/d2/project.d2 deleted file mode 100644 index 840013f..0000000 --- a/docs/arch/d2/project.d2 +++ /dev/null @@ -1,41 +0,0 @@ -Adapters: { - archlens_tree_sitter: archlens-tree-sitter - archlens_walkdir: archlens-walkdir - archlens_mermaid: archlens-mermaid - archlens_ascii: archlens-ascii - archlens_file_writer: archlens-file-writer - archlens_stdout_writer: archlens-stdout-writer - archlens_toml_config: archlens-toml-config - archlens_cargo_workspace: archlens-cargo-workspace - archlens_python_project: archlens-python-project - archlens_d2: archlens-d2 - archlens_html: archlens-html -} -archlens_domain: archlens-domain -archlens_application: archlens-application -archlens: archlens -archlens_application -> archlens_domain -archlens -> archlens_walkdir -archlens -> archlens_mermaid -archlens -> archlens_html -archlens -> archlens_domain -archlens -> archlens_d2 -archlens -> archlens_file_writer -archlens -> archlens_toml_config -archlens -> archlens_application -archlens -> archlens_tree_sitter -archlens -> archlens_python_project -archlens -> archlens_cargo_workspace -archlens -> archlens_stdout_writer -archlens -> archlens_ascii -archlens_tree_sitter -> archlens_domain -archlens_walkdir -> archlens_domain -archlens_mermaid -> archlens_domain -archlens_ascii -> archlens_domain -archlens_file_writer -> archlens_domain -archlens_stdout_writer -> archlens_domain -archlens_toml_config -> archlens_domain -archlens_cargo_workspace -> archlens_domain -archlens_python_project -> archlens_domain -archlens_d2 -> archlens_domain -archlens_html -> archlens_domain \ No newline at end of file diff --git a/docs/arch/d2/project.svg b/docs/arch/d2/project.svg deleted file mode 100644 index f29cae4..0000000 --- a/docs/arch/d2/project.svg +++ /dev/null @@ -1,102 +0,0 @@ -Adaptersarchlens-domainarchlens-applicationarchlensarchlens_file_writerarchlens_mermaidarchlens_htmlarchlens_python_projectarchlens_walkdirarchlens_asciiarchlens_toml_configarchlens_stdout_writerarchlens_d2archlens_tree_sitterarchlens_cargo_workspacearchlens-tree-sitterarchlens-walkdirarchlens-mermaidarchlens-asciiarchlens-file-writerarchlens-stdout-writerarchlens-toml-configarchlens-cargo-workspacearchlens-python-projectarchlens-d2archlens-html - - - diff --git a/docs/arch/d2/type.d2 b/docs/arch/d2/type.d2 deleted file mode 100644 index 574a0de..0000000 --- a/docs/arch/d2/type.d2 +++ /dev/null @@ -1,448 +0,0 @@ -Domain: { - Relationship: { - shape: class - source: String - target: String - kind: RelationshipKind - source_file: Option - new() - with_source_file() - source() - target() - kind() - source_file() - } - CodeElement: { - shape: class - name: String - qualified_name: Option - kind: CodeElementKind - file_path: FilePath - line: usize - visibility: Visibility - module: Option - generics: Vec - attributes: Vec - fields: Vec - methods: Vec - new() - with_visibility() - with_module() - with_generics() - with_attributes() - with_qualified_name() - name() - qualified_name() - kind() - file_path() - line() - visibility() - module() - generics() - attributes() - with_fields() - with_methods() - fields() - methods() - } - DomainError: { - shape: class - } - DiagramRenderer: { - shape: class - } - SourceAnalyzer: { - shape: class - } - ConfigLoader: { - shape: class - } - FileDiscovery: { - shape: class - } - ProjectAnalyzer: { - shape: class - } - OutputWriter: { - shape: class - } - AnalysisResult: { - shape: class - elements: Vec - relationships: Vec - warnings: Vec - new() - empty() - elements() - relationships() - warnings() - } - AnalysisConfig: { - shape: class - excludes: Vec - level: DiagramLevel - module_mappings: HashMap - scope: Option - include_tests: bool - changed_files: Option - with_excludes() - with_level() - with_module_mappings() - excludes() - level() - with_scope() - module_mappings() - scope() - with_include_tests() - include_tests() - with_changed_files() - changed_files() - } - AnalysisWarning: { - shape: class - file_path: FilePath - line: usize - message: String - new() - file_path() - line() - message() - } - CodeElementKind: { - shape: class - } - RelationshipKind: { - shape: class - } - Visibility: { - shape: class - } - DiagramLevel: { - shape: class - } - OutputConfig: { - shape: class - split_by_module: bool - output_path: Option - with_split_by_module() - with_output_path() - split_by_module() - output_path() - } - RenderedFile: { - shape: class - name: String - content: String - new() - name() - content() - } - RenderOutput: { - shape: class - files: Vec - new() - single() - files() - } - ModuleName: { - shape: class - new() - from_path() - from_directory_group() - capitalize() - as_str() - } - Language: { - shape: class - name() - } - SourceFile: { - shape: class - path: FilePath - language: Language - new() - path() - language() - } - FilePath: { - shape: class - new() - as_str() - } - RuleKind: { - shape: class - } - RuleViolation: { - shape: class - source_module: String - target_module: String - kind: RuleKind - new() - source_module() - target_module() - kind() - message() - } - BoundaryRule: { - shape: class - source: String - target: String - parse() - source() - target() - matches() - } - CodeGraph: { - shape: class - elements: Vec - relationships: Vec - new() - add_element() - add_relationship() - elements() - relationships() - modules() - elements_by_module() - resolve_relationships() - filter_external_imports() - qualify() - cross_module_deps_for() - subgraph_by_module() - } -} -Adapters: { - AsciiRenderer: { - shape: class - new() - format_kind() - } - D2Renderer: { - shape: class - level: DiagramLevel - new() - with_level() - } - CargoWorkspaceAnalyzer: { - shape: class - new() - } - WorkspaceToml: { - shape: class - workspace: Option - } - WorkspaceSection: { - shape: class - members: Vec - } - MemberToml: { - shape: class - package: Option - dependencies: HashMap - } - PackageSection: { - shape: class - name: String - } - PythonProjectAnalyzer: { - shape: class - new() - } - ProjectSection: { - shape: class - name: Option - dependencies: Vec - } - PoetrySection: { - shape: class - name: Option - dependencies: HashMap - } - ToolSection: { - shape: class - poetry: PoetrySection - } - PyprojectToml: { - shape: class - project: Option - tool: ToolSection - } - StdoutOutputWriter: { - shape: class - new() - } - FileOutputWriter: { - shape: class - output_path: OutputPath - new() - single_file() - } - OutputPath: { - shape: class - } - MermaidRenderer: { - shape: class - level: DiagramLevel - show_weights: bool - new() - with_level() - with_weights() - display_name() - format_element_name() - format_visibility() - render_class_diagram() - push_class_lines() - render_module_flowchart() - render_project_flowchart() - sanitize_id() - } - LanguageExtractor: { - shape: class - } - TreeSitterAnalyzer: { - shape: class - rust: RustExtractor - python: PythonExtractor - new() - extractor_for() - } - RustExtractor: { - shape: class - } - PythonExtractor: { - shape: class - } - WalkdirDiscovery: { - shape: class - new() - detect_language() - is_test_file() - is_excluded() - } - HtmlRenderer: { - shape: class - new() - } - GraphData: { - shape: class - nodes: Vec - edges: Vec - } - NodeData: { - shape: class - id: String - label: String - module: String - kind: String - fields: Vec - methods: Vec - } - EdgeData: { - shape: class - source: String - target: String - kind: String - } - RawRules: { - shape: class - allow: Vec - deny: Vec - } - RawConfig: { - shape: class - analysis: RawAnalysis - output: RawOutput - modules: HashMap - rules: RawRules - } - RawAnalysis: { - shape: class - exclude: Vec - level: Option - } - RawOutput: { - shape: class - format: Option - path: Option - split_by_module: bool - } - TomlConfigLoader: { - shape: class - raw: RawConfig - from_path() - parse_level() - } -} -Application: { - AnalyzeCodebase: { - shape: class - file_discovery: F - source_analyzer: S - new() - execute() - } - AnalyzeCodebaseResult: { - shape: class - graph: CodeGraph - warnings: Vec - graph() - warnings() - } -} -Presentation: { - Cli: { - shape: class - command: Option - path: PathBuf - level: String - format: String - output: Option - config: Option - scope: Option - exclude: Vec - include_tests: bool - no_weights: bool - watch: bool - since: Option - split_by_module: bool - strict: bool - check: bool - verbose: u8 - } - Command: { - shape: class - } -} -Adapters_AsciiRenderer -> Domain_DiagramRenderer: {style.stroke-dash: 0} -Adapters_D2Renderer -> Domain_DiagramLevel -Adapters_D2Renderer -> Domain_DiagramRenderer: {style.stroke-dash: 0} -Adapters_CargoWorkspaceAnalyzer -> Domain_ProjectAnalyzer: {style.stroke-dash: 0} -Adapters_ToolSection -> Adapters_PoetrySection -Adapters_PyprojectToml -> Adapters_ToolSection -Adapters_PythonProjectAnalyzer -> Domain_ProjectAnalyzer: {style.stroke-dash: 0} -Adapters_StdoutOutputWriter -> Domain_OutputWriter: {style.stroke-dash: 0} -Adapters_FileOutputWriter -> Adapters_OutputPath -Adapters_FileOutputWriter -> Domain_OutputWriter: {style.stroke-dash: 0} -Adapters_MermaidRenderer -> Domain_DiagramLevel -Adapters_MermaidRenderer -> Domain_DiagramRenderer: {style.stroke-dash: 0} -Adapters_TreeSitterAnalyzer -> Adapters_RustExtractor -Adapters_TreeSitterAnalyzer -> Adapters_PythonExtractor -Adapters_TreeSitterAnalyzer -> Domain_SourceAnalyzer: {style.stroke-dash: 0} -Adapters_RustExtractor -> Adapters_LanguageExtractor: {style.stroke-dash: 0} -Adapters_PythonExtractor -> Adapters_LanguageExtractor: {style.stroke-dash: 0} -Adapters_WalkdirDiscovery -> Domain_FileDiscovery: {style.stroke-dash: 0} -Adapters_HtmlRenderer -> Domain_DiagramRenderer: {style.stroke-dash: 0} -Adapters_RawConfig -> Adapters_RawAnalysis -Adapters_RawConfig -> Adapters_RawOutput -Adapters_RawConfig -> Adapters_RawRules -Adapters_TomlConfigLoader -> Adapters_RawConfig -Adapters_TomlConfigLoader -> Domain_ConfigLoader: {style.stroke-dash: 0} -Application_AnalyzeCodebaseResult -> Domain_CodeGraph -Domain_Relationship -> Domain_RelationshipKind -Domain_CodeElement -> Domain_CodeElementKind -Domain_CodeElement -> Domain_FilePath -Domain_CodeElement -> Domain_Visibility -Domain_AnalysisConfig -> Domain_DiagramLevel -Domain_AnalysisWarning -> Domain_FilePath -Domain_SourceFile -> Domain_FilePath -Domain_SourceFile -> Domain_Language -Domain_RuleViolation -> Domain_RuleKind \ No newline at end of file diff --git a/docs/arch/d2/type.svg b/docs/arch/d2/type.svg deleted file mode 100644 index 197f394..0000000 --- a/docs/arch/d2/type.svg +++ /dev/null @@ -1,109 +0,0 @@ -DomainAdaptersApplicationPresentationAdapters_AsciiRendererDomain_DiagramRendererAdapters_D2RendererDomain_DiagramLevelAdapters_CargoWorkspaceAnalyzerDomain_ProjectAnalyzerAdapters_ToolSectionAdapters_PoetrySectionAdapters_PyprojectTomlAdapters_PythonProjectAnalyzerAdapters_StdoutOutputWriterDomain_OutputWriterAdapters_FileOutputWriterAdapters_OutputPathAdapters_MermaidRendererAdapters_TreeSitterAnalyzerAdapters_RustExtractorAdapters_PythonExtractorDomain_SourceAnalyzerAdapters_LanguageExtractorAdapters_WalkdirDiscoveryDomain_FileDiscoveryAdapters_HtmlRendererAdapters_RawConfigAdapters_RawAnalysisAdapters_RawOutputAdapters_RawRulesAdapters_TomlConfigLoaderDomain_ConfigLoaderApplication_AnalyzeCodebaseResultDomain_CodeGraphDomain_RelationshipDomain_RelationshipKindDomain_CodeElementDomain_CodeElementKindDomain_FilePathDomain_VisibilityDomain_AnalysisConfigDomain_AnalysisWarningDomain_SourceFileDomain_LanguageDomain_RuleViolationDomain_RuleKindRelationship+sourceString+targetString+kindRelationshipKind+source_fileOption+new()void+with_source_file()void+source()void+target()void+kind()void+source_file()voidCodeElement+nameString+qualified_nameOption+kindCodeElementKind+file_pathFilePath+lineusize+visibilityVisibility+moduleOption+genericsVec+attributesVec+fieldsVec+methodsVec+new()void+with_visibility()void+with_module()void+with_generics()void+with_attributes()void+with_qualified_name()void+name()void+qualified_name()void+kind()void+file_path()void+line()void+visibility()void+module()void+generics()void+attributes()void+with_fields()void+with_methods()void+fields()void+methods()voidDomainErrorDiagramRendererSourceAnalyzerConfigLoaderFileDiscoveryProjectAnalyzerOutputWriterAnalysisResult+elementsVec+relationshipsVec+warningsVec+new()void+empty()void+elements()void+relationships()void+warnings()voidAnalysisConfig+excludesVec+levelDiagramLevel+module_mappingsHashMap+scopeOption+include_testsbool+changed_filesOption+with_excludes()void+with_level()void+with_module_mappings()void+excludes()void+level()void+with_scope()void+module_mappings()void+scope()void+with_include_tests()void+include_tests()void+with_changed_files()void+changed_files()voidAnalysisWarning+file_pathFilePath+lineusize+messageString+new()void+file_path()void+line()void+message()voidCodeElementKindRelationshipKindVisibilityDiagramLevelOutputConfig+split_by_modulebool+output_pathOption+with_split_by_module()void+with_output_path()void+split_by_module()void+output_path()voidRenderedFile+nameString+contentString+new()void+name()void+content()voidRenderOutput+filesVec+new()void+single()void+files()voidModuleName+new()void+from_path()void+from_directory_group()void+capitalize()void+as_str()voidLanguage+name()voidSourceFile+pathFilePath+languageLanguage+new()void+path()void+language()voidFilePath+new()void+as_str()voidRuleKindRuleViolation+source_moduleString+target_moduleString+kindRuleKind+new()void+source_module()void+target_module()void+kind()void+message()voidBoundaryRule+sourceString+targetString+parse()void+source()void+target()void+matches()voidCodeGraph+elementsVec+relationshipsVec+new()void+add_element()void+add_relationship()void+elements()void+relationships()void+modules()void+elements_by_module()void+resolve_relationships()void+filter_external_imports()void+qualify()void+cross_module_deps_for()void+subgraph_by_module()voidAsciiRenderer+new()void+format_kind()voidD2Renderer+levelDiagramLevel+new()void+with_level()voidCargoWorkspaceAnalyzer+new()voidWorkspaceToml+workspaceOptionWorkspaceSection+membersVecMemberToml+packageOption+dependenciesHashMapPackageSection+nameStringPythonProjectAnalyzer+new()voidProjectSection+nameOption+dependenciesVecPoetrySection+nameOption+dependenciesHashMapToolSection+poetryPoetrySectionPyprojectToml+projectOption+toolToolSectionStdoutOutputWriter+new()voidFileOutputWriter+output_pathOutputPath+new()void+single_file()voidOutputPathMermaidRenderer+levelDiagramLevel+show_weightsbool+new()void+with_level()void+with_weights()void+display_name()void+format_element_name()void+format_visibility()void+render_class_diagram()void+push_class_lines()void+render_module_flowchart()void+render_project_flowchart()void+sanitize_id()voidLanguageExtractorTreeSitterAnalyzer+rustRustExtractor+pythonPythonExtractor+new()void+extractor_for()voidRustExtractorPythonExtractorWalkdirDiscovery+new()void+detect_language()void+is_test_file()void+is_excluded()voidHtmlRenderer+new()voidGraphData+nodesVec+edgesVecString+idString+moduleString+kindString+fieldsVec+methodsVecEdgeData+sourceString+targetString+kindStringRawRules+allowVec+denyVecRawConfig+analysisRawAnalysis+outputRawOutput+modulesHashMap+rulesRawRulesRawAnalysis+excludeVec+levelOptionRawOutput+formatOption+pathOption+split_by_moduleboolTomlConfigLoader+rawRawConfig+from_path()void+parse_level()voidAnalyzeCodebase+file_discoveryF+source_analyzerS+new()void+execute()voidAnalyzeCodebaseResult+graphCodeGraph+warningsVec+graph()void+warnings()voidCli+commandOption+pathPathBuf+levelString+formatString+outputOption+configOption+scopeOption+excludeVec+include_testsbool+no_weightsbool+watchbool+sinceOption+split_by_modulebool+strictbool+checkbool+verboseu8Command - - - diff --git a/docs/arch/html/archlens.html b/docs/arch/html/archlens.html deleted file mode 100644 index bd53287..0000000 --- a/docs/arch/html/archlens.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - -Architecture Diagram - - - - -
- - - \ No newline at end of file diff --git a/docs/arch/lucy/lucy.html b/docs/arch/lucy/lucy.html deleted file mode 100644 index e702ea2..0000000 --- a/docs/arch/lucy/lucy.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - -Architecture Diagram - - - - -
- - - \ No newline at end of file diff --git a/docs/arch/lucy/module/aiss_worker.mmd b/docs/arch/lucy/module/aiss_worker.mmd deleted file mode 100644 index 2f18ff2..0000000 --- a/docs/arch/lucy/module/aiss_worker.mmd +++ /dev/null @@ -1,9 +0,0 @@ -graph TD - Aiss_worker[Aiss_worker] - class aiss_worker_module["Aiss_worker"] { - <> - } - class commons_module["Commons"] { - <> - } - aiss_worker_module --> commons_module : 1 dep \ No newline at end of file diff --git a/docs/arch/lucy/module/api.mmd b/docs/arch/lucy/module/api.mmd deleted file mode 100644 index fa42809..0000000 --- a/docs/arch/lucy/module/api.mmd +++ /dev/null @@ -1,9 +0,0 @@ -graph TD - Api[Api] - class api_module["Api"] { - <> - } - class commons_module["Commons"] { - <> - } - api_module --> commons_module : 3 deps \ No newline at end of file diff --git a/docs/arch/lucy/module/commons.mmd b/docs/arch/lucy/module/commons.mmd deleted file mode 100644 index caf93f1..0000000 --- a/docs/arch/lucy/module/commons.mmd +++ /dev/null @@ -1,2 +0,0 @@ -graph TD - Commons[Commons] \ No newline at end of file diff --git a/docs/arch/lucy/module/overview.mmd b/docs/arch/lucy/module/overview.mmd deleted file mode 100644 index 4bd40ab..0000000 --- a/docs/arch/lucy/module/overview.mmd +++ /dev/null @@ -1,10 +0,0 @@ -graph TD - Aiss_worker[Aiss_worker] - Api[Api] - Worker[Worker] - Commons[Commons] - Worker -->|1 dep| Api - Aiss_worker -->|7 deps| Commons - Aiss_worker -->|1 dep| Api - Api -->|23 deps| Commons - Worker -->|12 deps| Commons \ No newline at end of file diff --git a/docs/arch/lucy/module/worker.mmd b/docs/arch/lucy/module/worker.mmd deleted file mode 100644 index 6baf981..0000000 --- a/docs/arch/lucy/module/worker.mmd +++ /dev/null @@ -1,9 +0,0 @@ -graph TD - Worker[Worker] - class worker_module["Worker"] { - <> - } - class commons_module["Commons"] { - <> - } - worker_module --> commons_module : 2 deps \ No newline at end of file diff --git a/docs/arch/lucy/project.mmd b/docs/arch/lucy/project.mmd deleted file mode 100644 index e7321ee..0000000 --- a/docs/arch/lucy/project.mmd +++ /dev/null @@ -1,8 +0,0 @@ -graph TD - aiss_worker[aiss-worker] - commons[commons] - worker[worker] - api[api] - aiss_worker --> commons - worker --> commons - api --> commons \ No newline at end of file diff --git a/docs/arch/mermaid/module.mmd b/docs/arch/mermaid/module.mmd deleted file mode 100644 index b8d67cd..0000000 --- a/docs/arch/mermaid/module.mmd +++ /dev/null @@ -1,10 +0,0 @@ -graph TD - Adapters[Adapters] - Presentation[Presentation] - Application[Application] - Domain[Domain] - Presentation -->|1 dep| Application - Application -->|2 deps| Domain - Presentation -->|11 deps| Adapters - Presentation -->|1 dep| Domain - Adapters -->|24 deps| Domain \ No newline at end of file diff --git a/docs/arch/mermaid/project.mmd b/docs/arch/mermaid/project.mmd deleted file mode 100644 index 33def04..0000000 --- a/docs/arch/mermaid/project.mmd +++ /dev/null @@ -1,42 +0,0 @@ -graph TD - archlens_domain[archlens-domain] - archlens_application[archlens-application] - archlens[archlens] - subgraph Adapters - archlens_tree_sitter[archlens-tree-sitter] - archlens_walkdir[archlens-walkdir] - archlens_mermaid[archlens-mermaid] - archlens_ascii[archlens-ascii] - archlens_file_writer[archlens-file-writer] - archlens_stdout_writer[archlens-stdout-writer] - archlens_toml_config[archlens-toml-config] - archlens_cargo_workspace[archlens-cargo-workspace] - archlens_python_project[archlens-python-project] - archlens_d2[archlens-d2] - archlens_html[archlens-html] - end - archlens_application --> archlens_domain - archlens --> archlens_file_writer - archlens --> archlens_domain - archlens --> archlens_cargo_workspace - archlens --> archlens_d2 - archlens --> archlens_html - archlens --> archlens_mermaid - archlens --> archlens_toml_config - archlens --> archlens_python_project - archlens --> archlens_ascii - archlens --> archlens_tree_sitter - archlens --> archlens_application - archlens --> archlens_walkdir - archlens --> archlens_stdout_writer - archlens_tree_sitter --> archlens_domain - archlens_walkdir --> archlens_domain - archlens_mermaid --> archlens_domain - archlens_ascii --> archlens_domain - archlens_file_writer --> archlens_domain - archlens_stdout_writer --> archlens_domain - archlens_toml_config --> archlens_domain - archlens_cargo_workspace --> archlens_domain - archlens_python_project --> archlens_domain - archlens_d2 --> archlens_domain - archlens_html --> archlens_domain \ No newline at end of file diff --git a/docs/arch/mermaid/type/adapters.mmd b/docs/arch/mermaid/type/adapters.mmd deleted file mode 100644 index d52d978..0000000 --- a/docs/arch/mermaid/type/adapters.mmd +++ /dev/null @@ -1,137 +0,0 @@ -classDiagram - namespace Adapters { - class AsciiRenderer - class D2Renderer - class CargoWorkspaceAnalyzer - class WorkspaceToml - class WorkspaceSection - class MemberToml - class PackageSection - class PythonProjectAnalyzer - class ProjectSection - class PoetrySection - class ToolSection - class PyprojectToml - class StdoutOutputWriter - class FileOutputWriter - class OutputPath - class MermaidRenderer - class LanguageExtractor - class TreeSitterAnalyzer - class RustExtractor - class PythonExtractor - class WalkdirDiscovery - class HtmlRenderer - class GraphData - class NodeData - class EdgeData - class RawRules - class RawConfig - class RawAnalysis - class RawOutput - class TomlConfigLoader - } - AsciiRenderer : +new() -] Self - AsciiRenderer : -format_kind(element CodeElement) -] static str - D2Renderer : level DiagramLevel - D2Renderer : +new() -] Self - D2Renderer : +with_level(level DiagramLevel) -] Self - CargoWorkspaceAnalyzer : +new() -] Self - <> WorkspaceToml - WorkspaceToml : workspace Option - <> WorkspaceSection - WorkspaceSection : members Vec - <> MemberToml - MemberToml : package Option - MemberToml : dependencies HashMap - <> PackageSection - PackageSection : name String - PythonProjectAnalyzer : +new() -] Self - <> ProjectSection - ProjectSection : name Option - ProjectSection : dependencies Vec - <> PoetrySection - PoetrySection : name Option - PoetrySection : dependencies HashMap - <> ToolSection - ToolSection : poetry PoetrySection - <> PyprojectToml - PyprojectToml : project Option - PyprojectToml : tool ToolSection - StdoutOutputWriter : +new() -] Self - FileOutputWriter : output_path OutputPath - FileOutputWriter : +new(output_dir PathBuf) -] Self - FileOutputWriter : +single_file(path PathBuf) -] Self - <> OutputPath - MermaidRenderer : level DiagramLevel - MermaidRenderer : show_weights bool - MermaidRenderer : +new() -] Self - MermaidRenderer : +with_level(level DiagramLevel) -] Self - MermaidRenderer : +with_weights(show bool) -] Self - MermaidRenderer : -display_name(qualified str) -] str - MermaidRenderer : -format_element_name(element CodeElement) -] String - MermaidRenderer : -format_visibility(visibility Visibility) -] static str - MermaidRenderer : -render_class_diagram(graph CodeGraph) -] String - MermaidRenderer : -push_class_lines(lines mut Vec[String], deferred mut Vec[String], element CodeElement, indent str, in_namespace bool) - MermaidRenderer : -render_module_flowchart(graph CodeGraph) -] String - MermaidRenderer : -render_project_flowchart(graph CodeGraph) -] String - MermaidRenderer : -sanitize_id(name str) -] String - TreeSitterAnalyzer : rust RustExtractor - TreeSitterAnalyzer : python PythonExtractor - TreeSitterAnalyzer : +new() -] Self - TreeSitterAnalyzer : -extractor_for(language Language) -] Option[dyn LanguageExtractor] - WalkdirDiscovery : +new() -] Self - WalkdirDiscovery : -detect_language(path Path) -] Option[Language] - WalkdirDiscovery : -is_test_file(path Path, language Language) -] bool - WalkdirDiscovery : -is_excluded(path Path, root Path, excludes [String]) -] bool - HtmlRenderer : +new() -] Self - <> GraphData - GraphData : nodes Vec - GraphData : edges Vec - <> NodeData - NodeData : id String - NodeData : label String - NodeData : module String - NodeData : kind String - NodeData : fields Vec - NodeData : methods Vec - <> EdgeData - EdgeData : source String - EdgeData : target String - EdgeData : kind String - <> RawRules - RawRules : allow Vec - RawRules : deny Vec - <> RawConfig - RawConfig : analysis RawAnalysis - RawConfig : output RawOutput - RawConfig : modules HashMap - RawConfig : rules RawRules - <> RawAnalysis - RawAnalysis : exclude Vec - RawAnalysis : level Option - <> RawOutput - RawOutput : format Option - RawOutput : path Option - RawOutput : split_by_module bool - TomlConfigLoader : raw RawConfig - TomlConfigLoader : +from_path(path Path) -] Result[Self, DomainError] - TomlConfigLoader : -parse_level(level Option[String]) -] DiagramLevel - ToolSection --> PoetrySection - PyprojectToml --> ToolSection - FileOutputWriter --> OutputPath - TreeSitterAnalyzer --> RustExtractor - TreeSitterAnalyzer --> PythonExtractor - RustExtractor <|-- LanguageExtractor - PythonExtractor <|-- LanguageExtractor - RawConfig --> RawAnalysis - RawConfig --> RawOutput - RawConfig --> RawRules - TomlConfigLoader --> RawConfig - class adapters_module["Adapters"] { - <> - } - class domain_module["Domain"] { - <> - } - adapters_module --> domain_module : 13 deps \ No newline at end of file diff --git a/docs/arch/mermaid/type/application.mmd b/docs/arch/mermaid/type/application.mmd deleted file mode 100644 index cb503f6..0000000 --- a/docs/arch/mermaid/type/application.mmd +++ /dev/null @@ -1,20 +0,0 @@ -classDiagram - namespace Application { - class AnalyzeCodebase - class AnalyzeCodebaseResult - } - AnalyzeCodebase : file_discovery F - AnalyzeCodebase : source_analyzer S - AnalyzeCodebase : +new(file_discovery F, source_analyzer S) -] Self - AnalyzeCodebase : +execute(root Path, config AnalysisConfig) -] Result[AnalyzeCodebaseResult, DomainError] - AnalyzeCodebaseResult : graph CodeGraph - AnalyzeCodebaseResult : warnings Vec - AnalyzeCodebaseResult : +graph() -] CodeGraph - AnalyzeCodebaseResult : +warnings() -] [AnalysisWarning] - class application_module["Application"] { - <> - } - class domain_module["Domain"] { - <> - } - application_module --> domain_module : 1 dep \ No newline at end of file diff --git a/docs/arch/mermaid/type/domain.mmd b/docs/arch/mermaid/type/domain.mmd deleted file mode 100644 index aa61177..0000000 --- a/docs/arch/mermaid/type/domain.mmd +++ /dev/null @@ -1,168 +0,0 @@ -classDiagram - namespace Domain { - class Relationship - class CodeElement - class DomainError - class DiagramRenderer - class SourceAnalyzer - class ConfigLoader - class FileDiscovery - class ProjectAnalyzer - class OutputWriter - class AnalysisResult - class AnalysisConfig - class AnalysisWarning - class CodeElementKind - class RelationshipKind - class Visibility - class DiagramLevel - class OutputConfig - class RenderedFile - class RenderOutput - class ModuleName - class Language - class SourceFile - class FilePath - class RuleKind - class RuleViolation - class BoundaryRule - class CodeGraph - } - Relationship : source String - Relationship : target String - Relationship : kind RelationshipKind - Relationship : source_file Option - Relationship : +new(source str, target str, kind RelationshipKind) -] Result[Self, DomainError] - Relationship : +with_source_file(file FilePath) -] Self - Relationship : +source() -] str - Relationship : +target() -] str - Relationship : +kind() -] RelationshipKind - Relationship : +source_file() -] Option[FilePath] - CodeElement : name String - CodeElement : qualified_name Option - CodeElement : kind CodeElementKind - CodeElement : file_path FilePath - CodeElement : line usize - CodeElement : visibility Visibility - CodeElement : module Option - CodeElement : generics Vec - CodeElement : attributes Vec - CodeElement : fields Vec - CodeElement : methods Vec - CodeElement : +new(name str, kind CodeElementKind, file_path FilePath, line usize) -] Result[Self, DomainError] - CodeElement : +with_visibility(visibility Visibility) -] Self - CodeElement : +with_module(module ModuleName) -] Self - CodeElement : +with_generics(generics Vec[String]) -] Self - CodeElement : +with_attributes(attributes Vec[String]) -] Self - CodeElement : +with_qualified_name(qn String) -] Self - CodeElement : +name() -] str - CodeElement : +qualified_name() -] str - CodeElement : +kind() -] CodeElementKind - CodeElement : +file_path() -] FilePath - CodeElement : +line() -] usize - CodeElement : +visibility() -] Visibility - CodeElement : +module() -] Option[ModuleName] - CodeElement : +generics() -] [String] - CodeElement : +attributes() -] [String] - CodeElement : +with_fields(fields Vec[String]) -] Self - CodeElement : +with_methods(methods Vec[String]) -] Self - CodeElement : +fields() -] [String] - CodeElement : +methods() -] [String] - AnalysisResult : elements Vec - AnalysisResult : relationships Vec - AnalysisResult : warnings Vec - AnalysisResult : +new(elements Vec[CodeElement], relationships Vec[Relationship], warnings Vec[AnalysisWarning]) -] Self - AnalysisResult : +empty() -] Self - AnalysisResult : +elements() -] [CodeElement] - AnalysisResult : +relationships() -] [Relationship] - AnalysisResult : +warnings() -] [AnalysisWarning] - AnalysisConfig : excludes Vec - AnalysisConfig : level DiagramLevel - AnalysisConfig : module_mappings HashMap - AnalysisConfig : scope Option - AnalysisConfig : include_tests bool - AnalysisConfig : changed_files Option - AnalysisConfig : +with_excludes(excludes Vec[String]) -] Self - AnalysisConfig : +with_level(level DiagramLevel) -] Self - AnalysisConfig : +with_module_mappings(mappings HashMap[String, String]) -] Self - AnalysisConfig : +excludes() -] [String] - AnalysisConfig : +level() -] DiagramLevel - AnalysisConfig : +with_scope(scope String) -] Self - AnalysisConfig : +module_mappings() -] HashMap[String, String] - AnalysisConfig : +scope() -] Option[str] - AnalysisConfig : +with_include_tests(include bool) -] Self - AnalysisConfig : +include_tests() -] bool - AnalysisConfig : +with_changed_files(files HashSet[String]) -] Self - AnalysisConfig : +changed_files() -] Option[HashSet[String]] - AnalysisWarning : file_path FilePath - AnalysisWarning : line usize - AnalysisWarning : message String - AnalysisWarning : +new(file_path FilePath, line usize, message str) -] Result[Self, DomainError] - AnalysisWarning : +file_path() -] FilePath - AnalysisWarning : +line() -] usize - AnalysisWarning : +message() -] str - OutputConfig : split_by_module bool - OutputConfig : output_path Option - OutputConfig : +with_split_by_module(split bool) -] Self - OutputConfig : +with_output_path(path String) -] Self - OutputConfig : +split_by_module() -] bool - OutputConfig : +output_path() -] Option[str] - RenderedFile : name String - RenderedFile : content String - RenderedFile : +new(name str, content str) -] Result[Self, DomainError] - RenderedFile : +name() -] str - RenderedFile : +content() -] str - RenderOutput : files Vec - RenderOutput : +new(files Vec[RenderedFile]) -] Self - RenderOutput : +single(file RenderedFile) -] Self - RenderOutput : +files() -] [RenderedFile] - ModuleName : +new(value str) -] Result[Self, DomainError] - ModuleName : +from_path(file_path str, root Path, module_mappings HashMap[String, String]) -] Option[Self] - ModuleName : +from_directory_group(member_path str) -] Option[Self] - ModuleName : +capitalize(s str) -] String - ModuleName : +as_str() -] str - Language : +name() -] static str - SourceFile : path FilePath - SourceFile : language Language - SourceFile : +new(path FilePath, language Language) -] Self - SourceFile : +path() -] FilePath - SourceFile : +language() -] Language - FilePath : +new(value str) -] Result[Self, DomainError] - FilePath : +as_str() -] str - RuleViolation : source_module String - RuleViolation : target_module String - RuleViolation : kind RuleKind - RuleViolation : +new(source_module str, target_module str, kind RuleKind) -] Self - RuleViolation : +source_module() -] str - RuleViolation : +target_module() -] str - RuleViolation : +kind() -] RuleKind - RuleViolation : +message() -] String - BoundaryRule : source String - BoundaryRule : target String - BoundaryRule : +parse(s str) -] Option[Self] - BoundaryRule : +source() -] str - BoundaryRule : +target() -] str - BoundaryRule : +matches(src_module str, tgt_module str) -] bool - CodeGraph : elements Vec - CodeGraph : relationships Vec - CodeGraph : +new() -] Self - CodeGraph : +add_element(element CodeElement) - CodeGraph : +add_relationship(relationship Relationship) - CodeGraph : +elements() -] [CodeElement] - CodeGraph : +relationships() -] [Relationship] - CodeGraph : +modules() -] Vec[ModuleName] - CodeGraph : +elements_by_module() -] (HashMap[String, Vec[CodeElement]], Vec[CodeElement]) - CodeGraph : +resolve_relationships() -] CodeGraph - CodeGraph : +filter_external_imports(known_modules HashSet[String]) -] CodeGraph - CodeGraph : +qualify() -] CodeGraph - CodeGraph : +cross_module_deps_for(module ModuleName) -] Vec[(ModuleName, usize)] - CodeGraph : +subgraph_by_module(module ModuleName) -] CodeGraph - Relationship --> RelationshipKind - CodeElement --> CodeElementKind - CodeElement --> FilePath - CodeElement --> Visibility - AnalysisConfig --> DiagramLevel - AnalysisWarning --> FilePath - SourceFile --> FilePath - SourceFile --> Language - RuleViolation --> RuleKind \ No newline at end of file diff --git a/docs/arch/mermaid/type/overview.mmd b/docs/arch/mermaid/type/overview.mmd deleted file mode 100644 index 33525d8..0000000 --- a/docs/arch/mermaid/type/overview.mmd +++ /dev/null @@ -1,343 +0,0 @@ -classDiagram - namespace Presentation { - class Cli - class Command - } - namespace Application { - class AnalyzeCodebase - class AnalyzeCodebaseResult - } - namespace Adapters { - class AsciiRenderer - class D2Renderer - class CargoWorkspaceAnalyzer - class WorkspaceToml - class WorkspaceSection - class MemberToml - class PackageSection - class PythonProjectAnalyzer - class ProjectSection - class PoetrySection - class ToolSection - class PyprojectToml - class StdoutOutputWriter - class FileOutputWriter - class OutputPath - class MermaidRenderer - class LanguageExtractor - class TreeSitterAnalyzer - class RustExtractor - class PythonExtractor - class WalkdirDiscovery - class HtmlRenderer - class GraphData - class NodeData - class EdgeData - class RawRules - class RawConfig - class RawAnalysis - class RawOutput - class TomlConfigLoader - } - namespace Domain { - class Relationship - class CodeElement - class DomainError - class DiagramRenderer - class SourceAnalyzer - class ConfigLoader - class FileDiscovery - class ProjectAnalyzer - class OutputWriter - class AnalysisResult - class AnalysisConfig - class AnalysisWarning - class CodeElementKind - class RelationshipKind - class Visibility - class DiagramLevel - class OutputConfig - class RenderedFile - class RenderOutput - class ModuleName - class Language - class SourceFile - class FilePath - class RuleKind - class RuleViolation - class BoundaryRule - class CodeGraph - } - Cli : command Option - Cli : path PathBuf - Cli : level String - Cli : format String - Cli : output Option - Cli : config Option - Cli : scope Option - Cli : exclude Vec - Cli : include_tests bool - Cli : no_weights bool - Cli : watch bool - Cli : since Option - Cli : split_by_module bool - Cli : strict bool - Cli : check bool - Cli : verbose u8 - AnalyzeCodebase : file_discovery F - AnalyzeCodebase : source_analyzer S - AnalyzeCodebase : +new(file_discovery F, source_analyzer S) -] Self - AnalyzeCodebase : +execute(root Path, config AnalysisConfig) -] Result[AnalyzeCodebaseResult, DomainError] - AnalyzeCodebaseResult : graph CodeGraph - AnalyzeCodebaseResult : warnings Vec - AnalyzeCodebaseResult : +graph() -] CodeGraph - AnalyzeCodebaseResult : +warnings() -] [AnalysisWarning] - AsciiRenderer : +new() -] Self - AsciiRenderer : -format_kind(element CodeElement) -] static str - D2Renderer : level DiagramLevel - D2Renderer : +new() -] Self - D2Renderer : +with_level(level DiagramLevel) -] Self - CargoWorkspaceAnalyzer : +new() -] Self - <> WorkspaceToml - WorkspaceToml : workspace Option - <> WorkspaceSection - WorkspaceSection : members Vec - <> MemberToml - MemberToml : package Option - MemberToml : dependencies HashMap - <> PackageSection - PackageSection : name String - PythonProjectAnalyzer : +new() -] Self - <> ProjectSection - ProjectSection : name Option - ProjectSection : dependencies Vec - <> PoetrySection - PoetrySection : name Option - PoetrySection : dependencies HashMap - <> ToolSection - ToolSection : poetry PoetrySection - <> PyprojectToml - PyprojectToml : project Option - PyprojectToml : tool ToolSection - StdoutOutputWriter : +new() -] Self - FileOutputWriter : output_path OutputPath - FileOutputWriter : +new(output_dir PathBuf) -] Self - FileOutputWriter : +single_file(path PathBuf) -] Self - <> OutputPath - MermaidRenderer : level DiagramLevel - MermaidRenderer : show_weights bool - MermaidRenderer : +new() -] Self - MermaidRenderer : +with_level(level DiagramLevel) -] Self - MermaidRenderer : +with_weights(show bool) -] Self - MermaidRenderer : -display_name(qualified str) -] str - MermaidRenderer : -format_element_name(element CodeElement) -] String - MermaidRenderer : -format_visibility(visibility Visibility) -] static str - MermaidRenderer : -render_class_diagram(graph CodeGraph) -] String - MermaidRenderer : -push_class_lines(lines mut Vec[String], deferred mut Vec[String], element CodeElement, indent str, in_namespace bool) - MermaidRenderer : -render_module_flowchart(graph CodeGraph) -] String - MermaidRenderer : -render_project_flowchart(graph CodeGraph) -] String - MermaidRenderer : -sanitize_id(name str) -] String - TreeSitterAnalyzer : rust RustExtractor - TreeSitterAnalyzer : python PythonExtractor - TreeSitterAnalyzer : +new() -] Self - TreeSitterAnalyzer : -extractor_for(language Language) -] Option[dyn LanguageExtractor] - WalkdirDiscovery : +new() -] Self - WalkdirDiscovery : -detect_language(path Path) -] Option[Language] - WalkdirDiscovery : -is_test_file(path Path, language Language) -] bool - WalkdirDiscovery : -is_excluded(path Path, root Path, excludes [String]) -] bool - HtmlRenderer : +new() -] Self - <> GraphData - GraphData : nodes Vec - GraphData : edges Vec - <> NodeData - NodeData : id String - NodeData : label String - NodeData : module String - NodeData : kind String - NodeData : fields Vec - NodeData : methods Vec - <> EdgeData - EdgeData : source String - EdgeData : target String - EdgeData : kind String - <> RawRules - RawRules : allow Vec - RawRules : deny Vec - <> RawConfig - RawConfig : analysis RawAnalysis - RawConfig : output RawOutput - RawConfig : modules HashMap - RawConfig : rules RawRules - <> RawAnalysis - RawAnalysis : exclude Vec - RawAnalysis : level Option - <> RawOutput - RawOutput : format Option - RawOutput : path Option - RawOutput : split_by_module bool - TomlConfigLoader : raw RawConfig - TomlConfigLoader : +from_path(path Path) -] Result[Self, DomainError] - TomlConfigLoader : -parse_level(level Option[String]) -] DiagramLevel - Relationship : source String - Relationship : target String - Relationship : kind RelationshipKind - Relationship : source_file Option - Relationship : +new(source str, target str, kind RelationshipKind) -] Result[Self, DomainError] - Relationship : +with_source_file(file FilePath) -] Self - Relationship : +source() -] str - Relationship : +target() -] str - Relationship : +kind() -] RelationshipKind - Relationship : +source_file() -] Option[FilePath] - CodeElement : name String - CodeElement : qualified_name Option - CodeElement : kind CodeElementKind - CodeElement : file_path FilePath - CodeElement : line usize - CodeElement : visibility Visibility - CodeElement : module Option - CodeElement : generics Vec - CodeElement : attributes Vec - CodeElement : fields Vec - CodeElement : methods Vec - CodeElement : +new(name str, kind CodeElementKind, file_path FilePath, line usize) -] Result[Self, DomainError] - CodeElement : +with_visibility(visibility Visibility) -] Self - CodeElement : +with_module(module ModuleName) -] Self - CodeElement : +with_generics(generics Vec[String]) -] Self - CodeElement : +with_attributes(attributes Vec[String]) -] Self - CodeElement : +with_qualified_name(qn String) -] Self - CodeElement : +name() -] str - CodeElement : +qualified_name() -] str - CodeElement : +kind() -] CodeElementKind - CodeElement : +file_path() -] FilePath - CodeElement : +line() -] usize - CodeElement : +visibility() -] Visibility - CodeElement : +module() -] Option[ModuleName] - CodeElement : +generics() -] [String] - CodeElement : +attributes() -] [String] - CodeElement : +with_fields(fields Vec[String]) -] Self - CodeElement : +with_methods(methods Vec[String]) -] Self - CodeElement : +fields() -] [String] - CodeElement : +methods() -] [String] - AnalysisResult : elements Vec - AnalysisResult : relationships Vec - AnalysisResult : warnings Vec - AnalysisResult : +new(elements Vec[CodeElement], relationships Vec[Relationship], warnings Vec[AnalysisWarning]) -] Self - AnalysisResult : +empty() -] Self - AnalysisResult : +elements() -] [CodeElement] - AnalysisResult : +relationships() -] [Relationship] - AnalysisResult : +warnings() -] [AnalysisWarning] - AnalysisConfig : excludes Vec - AnalysisConfig : level DiagramLevel - AnalysisConfig : module_mappings HashMap - AnalysisConfig : scope Option - AnalysisConfig : include_tests bool - AnalysisConfig : changed_files Option - AnalysisConfig : +with_excludes(excludes Vec[String]) -] Self - AnalysisConfig : +with_level(level DiagramLevel) -] Self - AnalysisConfig : +with_module_mappings(mappings HashMap[String, String]) -] Self - AnalysisConfig : +excludes() -] [String] - AnalysisConfig : +level() -] DiagramLevel - AnalysisConfig : +with_scope(scope String) -] Self - AnalysisConfig : +module_mappings() -] HashMap[String, String] - AnalysisConfig : +scope() -] Option[str] - AnalysisConfig : +with_include_tests(include bool) -] Self - AnalysisConfig : +include_tests() -] bool - AnalysisConfig : +with_changed_files(files HashSet[String]) -] Self - AnalysisConfig : +changed_files() -] Option[HashSet[String]] - AnalysisWarning : file_path FilePath - AnalysisWarning : line usize - AnalysisWarning : message String - AnalysisWarning : +new(file_path FilePath, line usize, message str) -] Result[Self, DomainError] - AnalysisWarning : +file_path() -] FilePath - AnalysisWarning : +line() -] usize - AnalysisWarning : +message() -] str - OutputConfig : split_by_module bool - OutputConfig : output_path Option - OutputConfig : +with_split_by_module(split bool) -] Self - OutputConfig : +with_output_path(path String) -] Self - OutputConfig : +split_by_module() -] bool - OutputConfig : +output_path() -] Option[str] - RenderedFile : name String - RenderedFile : content String - RenderedFile : +new(name str, content str) -] Result[Self, DomainError] - RenderedFile : +name() -] str - RenderedFile : +content() -] str - RenderOutput : files Vec - RenderOutput : +new(files Vec[RenderedFile]) -] Self - RenderOutput : +single(file RenderedFile) -] Self - RenderOutput : +files() -] [RenderedFile] - ModuleName : +new(value str) -] Result[Self, DomainError] - ModuleName : +from_path(file_path str, root Path, module_mappings HashMap[String, String]) -] Option[Self] - ModuleName : +from_directory_group(member_path str) -] Option[Self] - ModuleName : +capitalize(s str) -] String - ModuleName : +as_str() -] str - Language : +name() -] static str - SourceFile : path FilePath - SourceFile : language Language - SourceFile : +new(path FilePath, language Language) -] Self - SourceFile : +path() -] FilePath - SourceFile : +language() -] Language - FilePath : +new(value str) -] Result[Self, DomainError] - FilePath : +as_str() -] str - RuleViolation : source_module String - RuleViolation : target_module String - RuleViolation : kind RuleKind - RuleViolation : +new(source_module str, target_module str, kind RuleKind) -] Self - RuleViolation : +source_module() -] str - RuleViolation : +target_module() -] str - RuleViolation : +kind() -] RuleKind - RuleViolation : +message() -] String - BoundaryRule : source String - BoundaryRule : target String - BoundaryRule : +parse(s str) -] Option[Self] - BoundaryRule : +source() -] str - BoundaryRule : +target() -] str - BoundaryRule : +matches(src_module str, tgt_module str) -] bool - CodeGraph : elements Vec - CodeGraph : relationships Vec - CodeGraph : +new() -] Self - CodeGraph : +add_element(element CodeElement) - CodeGraph : +add_relationship(relationship Relationship) - CodeGraph : +elements() -] [CodeElement] - CodeGraph : +relationships() -] [Relationship] - CodeGraph : +modules() -] Vec[ModuleName] - CodeGraph : +elements_by_module() -] (HashMap[String, Vec[CodeElement]], Vec[CodeElement]) - CodeGraph : +resolve_relationships() -] CodeGraph - CodeGraph : +filter_external_imports(known_modules HashSet[String]) -] CodeGraph - CodeGraph : +qualify() -] CodeGraph - CodeGraph : +cross_module_deps_for(module ModuleName) -] Vec[(ModuleName, usize)] - CodeGraph : +subgraph_by_module(module ModuleName) -] CodeGraph - AsciiRenderer <|-- DiagramRenderer - D2Renderer --> DiagramLevel - D2Renderer <|-- DiagramRenderer - CargoWorkspaceAnalyzer <|-- ProjectAnalyzer - ToolSection --> PoetrySection - PyprojectToml --> ToolSection - PythonProjectAnalyzer <|-- ProjectAnalyzer - StdoutOutputWriter <|-- OutputWriter - FileOutputWriter --> OutputPath - FileOutputWriter <|-- OutputWriter - MermaidRenderer --> DiagramLevel - MermaidRenderer <|-- DiagramRenderer - TreeSitterAnalyzer --> RustExtractor - TreeSitterAnalyzer --> PythonExtractor - TreeSitterAnalyzer <|-- SourceAnalyzer - RustExtractor <|-- LanguageExtractor - PythonExtractor <|-- LanguageExtractor - WalkdirDiscovery <|-- FileDiscovery - HtmlRenderer <|-- DiagramRenderer - RawConfig --> RawAnalysis - RawConfig --> RawOutput - RawConfig --> RawRules - TomlConfigLoader --> RawConfig - TomlConfigLoader <|-- ConfigLoader - AnalyzeCodebaseResult --> CodeGraph - Relationship --> RelationshipKind - CodeElement --> CodeElementKind - CodeElement --> FilePath - CodeElement --> Visibility - AnalysisConfig --> DiagramLevel - AnalysisWarning --> FilePath - SourceFile --> FilePath - SourceFile --> Language - RuleViolation --> RuleKind \ No newline at end of file diff --git a/docs/arch/mermaid/type/presentation.mmd b/docs/arch/mermaid/type/presentation.mmd deleted file mode 100644 index 567b924..0000000 --- a/docs/arch/mermaid/type/presentation.mmd +++ /dev/null @@ -1,21 +0,0 @@ -classDiagram - namespace Presentation { - class Cli - class Command - } - Cli : command Option - Cli : path PathBuf - Cli : level String - Cli : format String - Cli : output Option - Cli : config Option - Cli : scope Option - Cli : exclude Vec - Cli : include_tests bool - Cli : no_weights bool - Cli : watch bool - Cli : since Option - Cli : split_by_module bool - Cli : strict bool - Cli : check bool - Cli : verbose u8 \ No newline at end of file