domains / families / software-engineering / clean-architecture
Apply Robert C. Martin-inspired architecture rules when separating business policy from frameworks, databases, UI, or infrastructure details. Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to entities. Use when the user mentions "architecture layers", "dependency rule", "ports and adapters (hexagonal)", "onion architecture", "screaming architecture", "where should business logic go", "decouple from the database", "swap the framework without a rewrite", or "keep business rules independent". Also trigger when deciding which layer code belongs in, isolating core logic from infrastructure, defining module boundaries, or debating whether the framework should call your code or the reverse. Covers component principles, boundaries, and SOLID. For code-level quality, see clean-code. For domain modeling, see domain-driven-design.
The wondelai copy is a full, self-contained procedure with a scoring rubric, concentric-circle rules, and concrete code patterns. The ciembor copy is a thin wrapper that defers to external files (clean-architecture.mini.md and clean-architecture.md) and does not contain the actual steps. They overlap in intent but the ciembor copy lacks the material steps present in wondelai, and wondelai does not reference the ciembor mini/full split. Crowning wondelai would hide the ciembor approach of using a mini rules file first; crowning ciembor would hide the detailed procedure. Therefore combine.