diff --git a/docs/architecture/module.mmd b/docs/architecture/module.mmd index 757f903..f53b810 100644 --- a/docs/architecture/module.mmd +++ b/docs/architecture/module.mmd @@ -1,10 +1,10 @@ graph TD - Presentation[Presentation] Domain[Domain] + Presentation[Presentation] Adapters[Adapters] Application[Application] + Adapters -->|24 deps| Domain Application -->|2 deps| Domain Presentation -->|11 deps| Adapters - Presentation -->|1 dep| Domain Presentation -->|1 dep| Application - Adapters -->|24 deps| Domain \ No newline at end of file + Presentation -->|1 dep| Domain \ No newline at end of file diff --git a/docs/architecture/project.mmd b/docs/architecture/project.mmd index 05c83b8..3143b37 100644 --- a/docs/architecture/project.mmd +++ b/docs/architecture/project.mmd @@ -16,19 +16,19 @@ graph TD archlens_html[archlens-html] end archlens_application --> archlens_domain - archlens --> archlens_tree_sitter - archlens --> archlens_application - archlens --> archlens_d2 - archlens --> archlens_toml_config - archlens --> archlens_domain archlens --> archlens_html - archlens --> archlens_ascii - archlens --> archlens_file_writer - archlens --> archlens_cargo_workspace - archlens --> archlens_stdout_writer - archlens --> archlens_python_project archlens --> archlens_walkdir + archlens --> archlens_domain + archlens --> archlens_stdout_writer + archlens --> archlens_cargo_workspace + archlens --> archlens_application + archlens --> archlens_toml_config + archlens --> archlens_d2 archlens --> archlens_mermaid + archlens --> archlens_file_writer + archlens --> archlens_tree_sitter + archlens --> archlens_ascii + archlens --> archlens_python_project archlens_tree_sitter --> archlens_domain archlens_walkdir --> archlens_domain archlens_mermaid --> archlens_domain diff --git a/docs/architecture/type/domain.mmd b/docs/architecture/type/domain.mmd index 865b88f..2d0148f 100644 --- a/docs/architecture/type/domain.mmd +++ b/docs/architecture/type/domain.mmd @@ -157,6 +157,7 @@ classDiagram CodeGraph : +qualify() -] CodeGraph CodeGraph : +cross_module_deps_for(module ModuleName) -] Vec[(ModuleName, usize)] CodeGraph : +subgraph_by_module(module ModuleName) -] CodeGraph + CodeGraph : +module_edges() -] HashMap[(String, String), usize] SourceFile --> FilePath SourceFile --> Language RuleViolation --> RuleKind diff --git a/docs/architecture/type/overview.mmd b/docs/architecture/type/overview.mmd index 8c71e82..c3ea537 100644 --- a/docs/architecture/type/overview.mmd +++ b/docs/architecture/type/overview.mmd @@ -1,8 +1,4 @@ classDiagram - namespace Presentation { - class Cli - class Command - } namespace Adapters { class MermaidRenderer class AsciiRenderer @@ -35,10 +31,6 @@ classDiagram class MemberToml class PackageSection } - namespace Application { - class AnalyzeCodebase - class AnalyzeCodebaseResult - } namespace Domain { class OutputConfig class DiagramLevel @@ -68,22 +60,14 @@ classDiagram class CodeGraph class DomainError } - 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 + namespace Presentation { + class Cli + class Command + } + namespace Application { + class AnalyzeCodebase + class AnalyzeCodebaseResult + } MermaidRenderer : level DiagramLevel MermaidRenderer : show_weights bool MermaidRenderer : +new() -] Self @@ -170,14 +154,6 @@ classDiagram MemberToml : dependencies HashMap <> PackageSection PackageSection : name String - 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] OutputConfig : split_by_module bool OutputConfig : output_path Option OutputConfig : +with_split_by_module(split bool) -] Self @@ -307,6 +283,31 @@ classDiagram CodeGraph : +qualify() -] CodeGraph CodeGraph : +cross_module_deps_for(module ModuleName) -] Vec[(ModuleName, usize)] CodeGraph : +subgraph_by_module(module ModuleName) -] CodeGraph + CodeGraph : +module_edges() -] HashMap[(String, String), usize] + 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] SourceFile --> FilePath SourceFile --> Language RuleViolation --> RuleKind