.agents/skills/coding/SKILL.md
Use this skill for maintainer-facing Java implementation work in Micronaut repositories. Do not default to end-user application shortcuts.
Deliver minimal, source-backed Java changes that preserve framework quality: binary compatibility, JSpecify null-safety, reflection-free behavior, and full Gradle verification (check, docs, and compatibility checks when API-facing).
Should trigger:
src/main/java and keep API compatibility."Should not trigger:
japiCmp).var for local inference), but only when supported by the repository toolchain/target level.org.jspecify.annotations; use JSpecify for new or modified nullability contracts.package-info.java with @NullMarked and import org.jspecify.annotations.NullMarked; when touching an existing package without @NullMarked, add it unless the local code has an explicit exception.org.jspecify.annotations.Nullable for nullable values, including nullable parameters, return values, fields, array/component positions such as String @Nullable [], nullable collection elements such as List<@Nullable T>, and nullable type bounds such as <T extends @Nullable Object>.io.micronaut.core.annotation.Nullable or jakarta.annotation.Nullable unless the task is specifically a nullability migration and compatibility impact has been checked.jakarta.inject APIs for DI, not javax.inject.@ConfigurationProperties over scattered @Value usage.https://semver.org/) before implementation.src/main/docs/guide with migration notes, and update toc.yml when adding new guide sections.@io.micronaut.core.annotation.Internal.@io.micronaut.core.annotation.Experimental and avoid presenting them as stable contracts.@io.micronaut.core.annotation.UsedByGeneratedCode; preserve those signatures unless the generated-code callers are updated in the same change../gradlew for all Gradle execution.gradle/libs.versions.toml) instead of hard-coded dependency versions.api, implementation, compileOnly, runtimeOnly) based on API exposure../gradlew projects and prefer canonical micronaut-* project names.First confirm canonical verification tasks from CONTRIBUTING.md and existing CI/build files, then run the repository equivalents from root.
Common sequence in Micronaut repositories:
./gradlew :<module>:compileTestJava
# If module includes Groovy tests:
./gradlew :<module>:compileTestGroovy
./gradlew :<module>:test --tests 'pkg.ClassTest'
./gradlew :<module>:test
# If repository documents cM alias/checkstyle aggregate task:
./gradlew -q cM
./gradlew -q spotlessCheck
./gradlew check
./gradlew docs
For API-affecting changes, also run if configured in the repository:
./gradlew japiCmp
If Spotless fails, run ./gradlew -q spotlessApply and re-run spotlessCheck.
javax.inject usage.When finishing implementation work, report:
SKILL.md frontmatter is valid and name matches directory (coding).@NullMarked, @Nullable), DI, and reflection-free guidance.@Internal, @Experimental, @UsedByGeneratedCode, and compatibility checks.src/main/docs/guide are updated with migration notes.check, and docs.CONTRIBUTING.mdMAINTAINING.md.agents/skills/gradle/SKILL.md.agents/skills/docs/SKILL.md.agents/skills/skill-creator/references/spec-checklist.md