Skip to content

drafael/coding-harness / skills/java-coder

java-coder

Unverified

Mandatory for every task in a Java codebase, including planning, implementation, debugging, refactoring, review, testing, Maven or Gradle build and dependency changes, performance or security analysis, and Java-related documentation. Detect Java projects from pom.xml, Gradle files, gradlew, or .java sources. Load before inspecting or changing the repository even when the user does not explicitly mention Java. Covers Java 21+, Spring Boot, Swing/EDT, code style, testing, security, and desktop UI.

FileKindSize
README.mdmarkdown868 B
SKILL.mdskill md13.2 KB
references/apache-commons-lang3.mdmarkdown6.2 KB
references/desktop-apps.mdmarkdown20.0 KB
references/functional-composition.mdmarkdown4.3 KB
references/lombok.mdmarkdown2.7 KB
references/spring-boot-rules.mdmarkdown1.4 KB

references/lombok.md

View on GitHub
# Lombok

If **Lombok** is already on the classpath, use it heavily and actively across the codebase to eliminate boilerplate. Do **not** add it as a new dependency — only leverage it when already present.

- Use it to reduce boilerplate, **not** to hide design — keep the intent visible
- **Constructors** — prefer `@RequiredArgsConstructor` on Spring components and any class with `final` dependencies instead of writing constructors by hand
- **Builders** — apply `@Builder` for complex object construction (especially test data); add it to any DTO with more than 3 fields
- **Logging** — use `@Slf4j` for loggers; `System.out.println()` is never acceptable in production code
- **JPA entities** — on `@Data` entities, always pair with `@NoArgsConstructor` and `@AllArgsConstructor`
- **Sensitive fields** — add `@ToString.Exclude` to `password`, `ssn`, `apiKey`, `clientSecret`, `secretKey`, and similar to prevent accidental logging

**Null-safety in public APIs** — when Lombok is on the classpath, `@NonNull` on the parameter is the **only** acceptable way to enforce non-null for non-`String` reference parameters. It fails fast with a meaningful `NullPointerException` at the call site, without polluting the method body:

```java
// ✅ Correct
public User register(@NonNull Role role, @NonNull Address address) { ... }
public void apply(@NonNull ApplyAction applyAction) { ... }

// ❌ Wrong — never do this for non-String reference parameters
public void apply(ApplyAction applyAction) {
    Validate.notNull(applyAction, "applyAction must not be null"); // ❌ use @NonNull instead
    ...
}
```

- Apply `@NonNull` to **every** non-`String` reference parameter in public API methods — no exceptions, regardless of project conventions you see elsewhere
- `@NonNull` **replaces** `Validate.notNull` for parameter null-checks; never use both, and never fall back to `Validate.notNull` when `@NonNull` is applicable
- **Lombok unavailable?** If `lombok` is not on the classpath, `@NonNull` is off the table — use `Validate.notNull(param, "param must not be null")` as the required fallback for non-`String` reference parameter null-checks at public API entry points. Do **not** add Lombok as a new dependency to unlock `@NonNull`
- **Exception — `String` parameters**: prefer `Validate.notBlank(param, "param should not be blank")` from Apache Commons Lang over `@NonNull`, since blank strings are almost always as invalid as `null`
- `Validate.notNull` remains valid **only** for null-checks that cannot be expressed at the parameter site — e.g., a nested field (`Validate.notNull(request.getPayload(), ...)`) or the result of a lookup
- Do not mix `@NonNull` with redundant manual null-checks in the same method
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 464kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 464kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 464kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 192kUpdated Claude CodeCodexVerifiedInstall