java-architecture-review

Analyze Java project package structure, dependency direction, and architectural layering for violations.

Updated Apr 20, 2020
One-click install
npx skills add https://github.com/UnterrainerInformatik/java-rdb-utils --skill java-architecture-review-unterrainerinformatik
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: java-architecture-review
Source: https://github.com/UnterrainerInformatik/java-rdb-utils/tree/main/.agents/skills/java-architecture-review
Command: npx skills add https://github.com/UnterrainerInformatik/java-rdb-utils --skill java-architecture-review-unterrainerinformatik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Java codebases often drift into architectural decay: god packages, framework imports leaking into the domain layer, circular dependencies, and unclear module boundaries. This Skill performs a macro-level architecture review so you can detect these violations before they make refactoring painful. ## Core Features & Use Cases - Package Structure Analysis: Evaluates whether the project uses package-by-layer, package-by-feature, or hexagonal organization and flags god packages and util dumping grounds. - Dependency Direction Checks: Verifies that dependencies point inward (adapters → application → domain) and that the domain has zero framework imports like Spring or JPA. - Anti-Pattern Detection: Identifies big balls of mud, anemic domain models, circular dependencies, and leaky abstractions, then reports findings with severity-ranked recommendations. - Use Case: Before a major refactoring, ask for an architecture review to get a prioritized table of violations such as a domain entity importing JPA annotations, with concrete fixes for each. ## Quick Start Review the architecture of this Java project and check whether it follows clean architecture principles.

Frequently Asked Questions about java-architecture-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review the architecture of a Java project?▼

Start by mapping the package structure with find commands, then check whether the organization follows package-by-layer, package-by-feature, or hexagonal style. Next verify dependency direction: the domain layer must have zero framework imports, and adapters may depend on the domain but never the reverse.

What is the difference between package-by-layer and package-by-feature?▼

Package-by-layer groups classes by technical role (controller, service, repository), which scatters related code and scales poorly. Package-by-feature groups all classes for one business capability together, making boundaries clearer and features easier to extract into modules.

How do I check if my domain layer depends on Spring or JPA?▼

Search the domain package for framework imports using grep for patterns like 'import org.springframework' or 'import javax.persistence'. Any match means the domain is coupled to infrastructure; fix it by defining pure port interfaces in the domain and implementing them in adapter packages.

What are common Java architecture anti-patterns to look for?▼

The main ones are the big ball of mud (one package with 100+ classes), util dumping grounds, anemic domain models where entities hold only getters and setters, circular package dependencies, and framework annotations polluting domain objects.

When should I use hexagonal architecture instead of package-by-feature?▼

Hexagonal architecture fits complex domains where testability and framework independence matter most, since it isolates pure business logic behind ports and adapters. For simpler applications, package-by-feature delivers clear boundaries with less structural ceremony.