Review and improve Java code using comprehensive type design principles that apply typography concepts to code structure and organization for maximum clarity and maintainability.
Prerequisites: Run ./mvnw compile or mvn compile before applying any change. If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition.
Core areas: Clear type hierarchies (nested static classes, logical structure), consistent naming conventions (domain-driven patterns, uniform interface/implementation naming), strategic whitespace for readability, type-safe wrappers (value objects replacing primitive obsession, EmailAddress, Money), generic type parameters (flexible reusable types, bounded parameters), domain-specific fluent interfaces (builder pa...
型設計品質のために Java コードをレビュー、改善、またはリファクタリングする必要がある場合に使用します。これには、明確な型階層の確立、一貫した命名規則の適用、ドメイン固有の値オブジェクトに対する原始的なこだわりの排除、ジェネリック型パラメーターの活用、型安全なラッパーの作成、流暢なインターフェイスの設計、適切な精度の数値型 (財務計算の BigDecimal) の確保、インターフェイスとメソッド シグネチャの調整による型のコントラストの改善などが含まれます。 Skills-for-Java プロジェクトの一部 ソース: jabrena/cursor-rules-java。