What problem does it solve?
Java projects often drift from universal style expectations because naming, formatting, and dependency strategies differ from common defaults, so this skill clarifies the Java conventions required by the workflow-driven SpecPowers process.
Core Features & Use Cases
- Language-specific overrides: enumerates naming, file organization, formatting, and exception-handling rules that supersede the base directions and explains why each Java convention matters; use it when reviewing or extending Java code to ensure compliance.
- Modern type and dependency guidance: recommends records, sealed hierarchies, judicious
var usage, correct Optional handling, final-by-default immutability, and constructor-based dependency injection so new features stay idiomatic and testable.
- Safety, testing, and cleanup practices: defines JUnit 5/Mockito testing strategies, try-with-resources cleanup, SQL injection prevention, and a set of red flags plus iron laws that keep Java code reliable under the SpecPowers workflow.
Quick Start
Ask the agent to apply the rules-java guidelines to your current Java files and highlight any departures from the documented conventions.