What problem does it solve?
This Skill solves the pervasive issue of software systems tightly coupled to specific frameworks (such as Spring Boot, Django, or Rails), where business logic is scattered across controllers, repositories, and infrastructure layers. This coupling makes codebases hard to test, difficult to modify, and impossible to swap underlying technologies (like databases or delivery mechanisms) without rewriting core business rules.
Core Features & Use Cases
- Strict Layer Separation: Defines four distinct layers (Entities, Use Cases, Interface Adapters, Frameworks & Drivers) with clear boundaries for what belongs in each, ensuring business logic stays isolated from infrastructure.
- Dependency Rule Enforcement: Provides concrete patterns and code examples (in Java, Kotlin, and Python) to ensure source code dependencies only point inward, so inner layers have zero knowledge of outer frameworks or tools.
- Anti-Pattern Detection & Testing Guidance: Includes checklists for common pitfalls (like anemic domain models or framework leakage into entities) and layer-specific testing strategies to ensure core business logic is fully unit-testable with no external dependencies.
- Use Case Example: Ideal for long-lived order management, payroll, or customer management systems that need to support multiple delivery interfaces (REST API, CLI, message consumers) without duplicating business rules.
Quick Start
Use the clean-architecture skill to restructure your existing e-commerce order service so that all order total calculation and submission validation rules live in the domain layer, with no framework dependencies in core order entities.