Skip to content
CAI
Software that uses CAICheck a score

EranBoudjnah/CleanArchitectureGenerator

72.4

Strong · 21 September 2026

12.6k

lines of production code

Kotlin

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an IDE plugin and CLI tool that scaffolds Android projects using Clean Architecture. It generates complete, multi-layered project structures including domain, data, and presentation layers, with support for Hilt or Koin dependency injection and Compose or XML UIs. The tool also automates code quality enforcement via Ktlint and Detekt, manages Gradle build configurations, and integrates with Git for version control.

Features

Add lint and IDE inspections for ViewModel naming conventions

Introduces two new static analysis checks for ViewModel classes. The first enforces that public functions in ViewModels start with 'on' (e.g., \onLoginAction\), and the second prevents UI-specific terms (like 'Click', 'Scroll', 'Swipe') in function names, suggesting 'Action' instead. These are implemented as a Lint rule and an IDE inspection with auto-fix capabilities, supported by corresponding unit tests.

lint, plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/inspection, plugin/src/main/resources/inspectionDescriptions · high confidence

Added Android app launcher icons and Gradle wrapper scripts

The core resources now include the Android application icon assets (ic\_launcher\_background.xml, ic\_launcher\_foreground.xml, and adaptive icon XMLs) which define the app's visual identity on the home screen and in the launcher. Additionally, the standard Gradle wrapper scripts (gradlew and gradlew.bat) have been added to the resources directory, enabling the project to be built using the bundled Gradle distribution without requiring a pre-installed Gradle environment.

core/src/main/resources · medium confidence

Added Gradle file generation for Ktlint and Detekt

The GradleFileExtender class was added to generate Gradle configuration blocks for Ktlint and Detekt. This introduces support for integrating these linting and formatting tools into generated Android projects, with configuration for Ktlint version 1.7.1 and Detekt via a relative path to a detekt.yml file.

core/src/main/kotlin/com/mitteloupe/cag/core/content/gradle · high confidence

Added SymbolValidator for validating type symbols in generated code

A new SymbolValidator class has been introduced to validate type symbols used in the clean architecture generator. This component checks the syntax of type names (including generic types) and verifies their existence within the project's source directories, ensuring that referenced types are actually defined in the module. This adds a validation step to the code generation process, helping to catch invalid or missing type references early.

plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/validation · high confidence

Added utility to derive package names from directory paths

A new utility class, PackageNameDeriver, has been added to the core generation structure. It provides a method to derive a package name string from a given directory path, specifically handling paths containing 'src/main/java' or 'src/main/kotlin' to extract the corresponding package structure.

core/src/main/kotlin/com/mitteloupe/cag/core/generation/structure · high confidence

CLI now supports man page generation and installation

Users can now generate and install man pages for the CLI tool. A new Gradle task, \generateManPage\, creates the man page by executing the CLI with the \--format=man\ flag. Additionally, the \installManPage\ task installs the generated man page to the appropriate system directory (e.g., \\~/Library/Man/man1\ on macOS or \\~/.local/share/man/man1\ on Linux), handling platform-specific paths and providing instructions for permanent configuration in shell profiles.

cli · high confidence

Generated Android projects now include comprehensive layer stubs and dual DI support

The code generator now produces a complete, multi-layered project structure for each feature, including domain models, use cases, repositories, presentation models, view models, and UI components. It also generates the corresponding Gradle build scripts and dependency injection modules for both Hilt and Koin, allowing users to choose their preferred DI framework. Additionally, the generated app includes Android resource builders for the manifest, strings, themes, and Compose-specific files, while the main activity is generated with support for both Compose and traditional XML-based UIs.

core/src/main/kotlin/com/mitteloupe/cag/core/content · high confidence

Introduce Git automation capabilities

Added a new Git integration layer that enables programmatic interaction with Git repositories. Users can now initialize new Git repositories, stage specific files or all changes, and verify Git availability. The implementation includes a configurable Git binary path and a process executor to handle command-line execution, supported by corresponding unit tests.

git · high confidence

Introduced core generation infrastructure for Android projects

Added the foundational components for generating Android project templates, including a \Generator\ class that orchestrates the creation of features, data sources, and architecture modules. The update introduces a \GeneratorFactory\ to manage the creation of various content generators (e.g., \AppModuleContentGenerator\, \DataSourceFilesGenerator\) and utility classes for locating Gradle project roots, resolving namespaces, and managing file system operations. This establishes the core logic for scaffolding new features and data sources within the generated project structure.

core/src/main/kotlin/com/mitteloupe/cag/core · high confidence

Introduces new file generation and configuration utilities for project scaffolding

The core generation module now includes dedicated classes for creating and updating project configuration files. BuildSrcContentCreator generates Gradle build scripts for the buildSrc directory, while ConfigurationFileCreator writes detekt and editor configuration files. SettingsFileUpdater handles the creation and modification of Gradle settings files, including support for both Kotlin and Groovy syntax. Additionally, FileGenerator and KotlinFileCreator provide reusable logic for creating missing files and directories, and SpaceRemover offers a utility for string manipulation.

core/src/main/kotlin/com/mitteloupe/cag/core/generation · high confidence

Introduces request data classes for code generation

The core request package now includes new data classes—GenerateArchitectureRequest, GenerateFeatureRequest, GenerateProjectTemplateRequest, GenerateUseCaseRequest, and GenerateViewModelRequest—each carrying the specific configuration options (such as dependency injection, Compose, Ktlint, Detekt, and Ktor/Retrofit flags) required to generate different parts of the application architecture.

core/src/main/kotlin/com/mitteloupe/cag/core/request · high confidence

New Clean Architecture project template with customizable options

A new Clean Architecture project template is now available in the plugin, allowing users to configure the generated project structure. Users can select a dependency injection library, enable optional libraries such as Compose, Ktor, and Retrofit, and include code quality tools like Ktlint and Detekt. The template also supports initializing a Git repository and respects the IDE's specified minimum SDK version.

plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/projectwizard · high confidence

New FileCreator utility for project generation

A new FileCreator class has been added to the core generation module, providing a centralized way to create directories, text files, and binary files while ensuring they are not overwritten if they already exist. It also supports copying resource directories from the classpath, handling both standard file systems and JAR resources, which improves how the application manages generated project files.

core/src/main/kotlin/com/mitteloupe/cag/core/generation/filesystem · high confidence

New architecture module Gradle script builders

Added new Kotlin builders for generating Gradle build scripts for the core, domain, presentation, UI, and instrumentation test modules. These builders configure plugins (Kotlin, Compose, KSP), dependencies (Coroutines, testing libraries, Hilt), and code analysis tools (ktlint, detekt) for each architectural layer.

core/src/main/kotlin/com/mitteloupe/cag/core/content/architecture · high confidence

New clean architecture generation actions for features, packages, data sources, use cases, and view models

The plugin now provides dedicated menu actions to generate clean architecture components: a new feature dialog for creating features with configurable dependency injection, code quality tools (ktlint/detekt), and Compose support; a package-level architecture generator that scaffolds the base architecture module; a data source generator supporting Ktor or Retrofit; a use-case generator that validates input/output types and suggests directories; and a ViewModel generator for the presentation layer. Each action opens a corresponding dialog, handles file system operations, refreshes the IDE, and syncs Gradle.

plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator · high confidence

New settings for Git integration and dependency injection defaults

The plugin now includes a settings interface allowing users to configure the path to the Git executable, enable automatic staging of generated files to Git, and select a default dependency injection library (defaulting to Hilt). These options are managed through a new settings panel in the IDE preferences, with the configuration persisted via the IDE's component storage system.

plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/settings · high confidence

Behavioural changes

Added UI strings for Clean Architecture generator features

The plugin now includes a new resource bundle (CleanArchitectureGeneratorBundle.properties) containing all user-facing text for the Clean Architecture generator. This covers the feature, data source, use case, and ViewModel creation wizards, as well as the settings panel for configuring defaults (e.g., dependency injection, Ktlint, Detekt, Compose, Ktor, Retrofit, and Git integration). Users will see translated labels, validation messages, and descriptions for these new generation capabilities.

plugin/src/main/resources/messages · high confidence

Automated ktlint checks via pre-commit hook

A new pre-commit hook has been added to the automation directory. This hook automatically runs the ktlint check on every commit, ensuring code style compliance before changes are accepted. If violations are found, the commit is blocked and provides instructions to automatically format the code.

automation · high confidence

Automatic Git staging of generated files

The plugin now automatically stages newly created files in the project's Git repository. A new service, GitAddQueueService, collects file paths and flushes them to Git via the 'git add' command, ensuring that generated artifacts are ready to be committed without manual intervention.

plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/git · high confidence

Generator logic refactored into dedicated layer and format classes

The code generation logic has been broken down into specific, single-responsibility classes to improve maintainability. New classes have been introduced to handle distinct parts of the generation pipeline: \DomainLayerContentGenerator\, \DataLayerContentGenerator\, \DataSourceInterfaceCreator\, \DataSourceImplementationCreator\, \PresentationLayerContentGenerator\, \UiLayerContentGenerator\, and utility formatters like \ImportsOptimizer\ and \PreferredCodeStyleIdentifier\. This refactoring organizes the previously monolithic generator into a modular structure where each component handles a specific layer or formatting task.

core/src/main/kotlin/com/mitteloupe/cag/core/generation/format, core/src/main/kotlin/com/mitteloupe/cag/core/generation/layer · high confidence

Introduces IntelliJ-specific file system abstraction for code generation

The plugin now uses a new \IntelliJFileSystemBridge\ to handle file operations, wrapping IntelliJ's Virtual File System (VFS) for creating, writing, and deleting files. This change ensures that generated files are properly registered with the IDE's file system, and includes optional automatic staging of new files to Git. The \GeneratorProvider\ has been updated to initialize version catalog settings and wire the new file system bridge into the code generation pipeline.

plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/filesystem · medium confidence

Refactored architecture module generation into dedicated creators

The architecture generation logic has been refactored into specialized creators (e.g., DomainModuleCreator, PresentationModuleCreator, UiModuleCreator) to improve maintainability. This change introduces a new \ArchitectureModulesContentGenerator\ that coordinates the generation of domain, presentation, UI, and test modules, while also extracting coroutine module generation into its own generator. Users will see a more modular and maintainable codebase for generated Android architectures.

core/src/main/kotlin/com/mitteloupe/cag/core/generation/architecture · medium confidence

Refactored version catalog generation with new internal components

The version catalog generation logic has been refactored into a new set of internal classes to improve maintainability and scalability. This includes \VersionCatalogUpdater\ for managing catalog updates, \VersionCatalogContentUpdater\ for handling text manipulation, and \DependencyConfiguration\ for defining version and library requirements. The change introduces a more robust system for adding, updating, and deduplicating entries in the \libs.versions.toml\ file, ensuring that existing aliases are preserved while new dependencies are added without conflicts.

core/src/main/kotlin/com/mitteloupe/cag/core/generation/versioncatalog · medium confidence

Restructured code generation into dedicated bulk generators

The bulk generation logic has been refactored into separate, specialized generator classes for each project component: Architecture, DataSource, Feature, ProjectTemplate, and ViewModel. This change improves maintainability by separating concerns, ensuring that each generator is responsible for a specific part of the project structure, such as creating the architecture module, data source modules, or feature layers.

core/src/main/kotlin/com/mitteloupe/cag/core/generation/bulk · high confidence

Test coverage

Added FakeFileSystemBridge for testing; Added FakeFileSystemWrapper for testing file system operations; Added tests for Gradle script generation; Added tests for PackageStringToSegments; Added tests for SymbolValidator; Added tests for core generation and directory-finding components; Added tests for the Version Catalog settings panel; Added tests for the clean architecture generator's model class finder; Added tests for the core generation components.

Dependencies

Migrated to Gradle version catalog and modularized build configuration

The project has been refactored to use a Gradle version catalog (libs.versions.toml) to manage dependencies, replacing the previous inline version declarations. This change introduces a modular multi-project structure with separate build files for cli, core, git, lint, and plugin modules, each referencing shared library versions (such as Kotlin 2.2.20, ktlint 13.1.0, and shadow 8.1.1) defined in the central catalog. Additionally, the root build script now automatically installs a pre-commit git hook during evaluation, and the project name was updated to 'Clean Architecture Generator'.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 61 → 72 (+11.0)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 92 → 93 (+0.9)
  • Architecture 99 → 99 (+0.0)
  • Maturity 64 → 65 (+1.2)
  • Readiness 50 → 63 (+13.7)
  • Security 68 → 100 (+32.3)

Resolved (19)

  • Change coupling: ArchitectureInstrumentationTestGradleScriptBuilder.kt ↔ ArchitectureModulesContentGenerator.kt (core/src/main/kotlin/com/mitteloupe/cag/core/content/architecture/ArchitectureInstrumentationTestGradleScriptBuilder.kt)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (15 lines × 2) (core/src/main/kotlin/com/mitteloupe/cag/core/generation/app/AppModuleContentGenerator.kt)
  • Duplicated block (15 lines × 2) (plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/CreateUseCaseAction.kt)
  • Duplicated block (17 lines × 2) (plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/CreateDataSourceAction.kt)
  • Duplicated block (22 lines × 3) (core/src/main/kotlin/com/mitteloupe/cag/core/content/DataGradleScriptBuilder.kt)
  • Duplicated block (8 lines × 2) (core/src/main/kotlin/com/mitteloupe/cag/core/content/architecture/ArchitectureDomainGradleScriptBuilder.kt)
  • Duplicated block (9 lines × 2) (cli/src/main/kotlin/com/mitteloupe/cag/cli/FilesystemProjectModel.kt)
  • Duplicated block (9 lines × 2) (plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/CreateCleanArchitectureFeatureDialog.kt)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Test reliability not included
  • single-maintainer — knowledge-concentration (bus factor) risk

New (30)

  • Change coupling: Generator.kt ↔ DependencyConfiguration.kt (core/src/main/kotlin/com/mitteloupe/cag/core/Generator.kt)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (.github/README.md)
  • Documentation: no usage examples (.github/README.md)
  • Duplicated block (11 lines × 2) (plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/CreateCleanArchitectureFeatureDialog.kt)
  • Duplicated block (11 lines × 2) (plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/CreateUseCaseAction.kt)
  • Duplicated block (18 lines × 2) (core/src/main/kotlin/com/mitteloupe/cag/core/generation/app/AppModuleContentGenerator.kt)
  • Duplicated block (19–20 lines × 2) (plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/CreateDataSourceAction.kt)
  • Duplicated block (19–21 lines × 2) (cli/src/main/kotlin/com/mitteloupe/cag/cli/FilesystemProjectModel.kt)
  • Duplicated block (8 lines × 2) (core/src/main/kotlin/com/mitteloupe/cag/core/content/architecture/ArchitectureDomainGradleScriptBuilder.kt)
  • Duplicated block (8 lines × 2) (plugin/src/main/kotlin/com/mitteloupe/cag/cleanarchitecturegenerator/settings/versioncatalog/VersionCatalogConfigurable.kt)
  • Duplicated block (9 lines × 3) (core/src/main/kotlin/com/mitteloupe/cag/core/content/DataGradleScriptBuilder.kt)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Hotspot: cli/src/main/kotlin/com/mitteloupe/cag/cli/argument/ArgumentParser.kt (cli/src/main/kotlin/com/mitteloupe/cag/cli/argument/ArgumentParser.kt)
  • Hotspot: core/src/main/kotlin/com/mitteloupe/cag/core/generation/app/AppModuleGradleUpdater.kt (core/src/main/kotlin/com/mitteloupe/cag/core/generation/app/AppModuleGradleUpdater.kt)
  • …and 10 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

EranBoudjnah/CleanArchitectureGenerator was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e8a6cc0ca57c79d2ecd0bca7618f0afd2378ae04 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.