src/skills/x-internal-review-developer-java/SKILL.md
Java-specific developer review: dynamically loads versioned patterns based on detected Java + Spring Boot version.
npx skillsauth add edercnj/claude-environment x-internal-review-developer-javaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
🔒 INTERNAL SKILL Invoked only by
x-review-developer. Not intended for direct user invocation.
Perform a Java-specific developer review by dynamically loading versioned patterns.md files for the detected Java/Spring Boot version. The checklist and scoring thresholds are derived entirely from those pattern files — no hardcoded criteria.
Activated by x-review-developer when java is detected in the tech context.
Step 0a — Read architecture plan for Technology Versions:
ARCH_FILE=$(ls .aikittools/features/*/plans/arch-story-*.md 2>/dev/null | head -1)
if [ -n "$ARCH_FILE" ]; then
grep -A 30 "## Technology Versions" "$ARCH_FILE" | head -40
fi
Extract java version and springBoot version from the ## Technology Versions table.
Step 0b — Map version to pattern directory:
| Detected | Directory key | Pattern path |
|----------|--------------|--------------|
| Java 25.x | 25 | src/patterns/backend/languages/java/25/ |
| Java 21.x | 21 | src/patterns/backend/languages/java/21/ |
| Java 11.x | 11 | src/patterns/backend/languages/java/11/ |
| Unsupported Java versions | 21 | src/patterns/backend/languages/java/21/ |
| Spring Boot 3.x | 3.x | src/patterns/backend/languages/java/frameworks/spring/3.x/ |
| Unsupported Spring Boot versions | 3.x | src/patterns/backend/languages/java/frameworks/spring/3.x/ |
| Not detected | 21 (fallback) | src/patterns/backend/languages/java/21/ (default stable baseline) |
Step 0c — Load pattern files:
# Normalize effective directories
JAVA_DIR="${JAVA_VERSION:-21}"
SPRING_DIR="${SPRING_VERSION:-3.x}"
if [ "$JAVA_DIR" = "fallback" ]; then JAVA_DIR="21"; fi
if [ "$SPRING_DIR" = "fallback" ]; then SPRING_DIR="3.x"; fi
# Java version patterns
JAVA_PATTERNS="src/patterns/backend/languages/java/${JAVA_DIR}/patterns.md"
cat "$JAVA_PATTERNS" 2>/dev/null || echo "WARN: Java patterns.md not found for version dir $JAVA_DIR"
# Spring Boot version patterns (if Spring Boot detected)
if [ -n "$SPRING_VERSION" ]; then
SPRING_PATTERNS="src/patterns/backend/languages/java/frameworks/spring/${SPRING_DIR}/patterns.md"
cat "$SPRING_PATTERNS" 2>/dev/null
fi
Extract from patterns.md:
Total maximum score: XX pts line (mandatory — used to calculate GO/NO-GO threshold)Step 0d — Calculate thresholds:
MAX_SCORE = sum of all GP-NN point values (or value on "Total maximum score:" line)
GO_THRESHOLD = MAX_SCORE * 0.80
GO_WITH_RESERVATIONS_THRESHOLD = MAX_SCORE * 0.65
git diff --name-only HEAD~1..HEAD 2>/dev/null || git diff --name-only --cached
Resolve canonical review packs:
Skill(skill: "x-internal-select-context-packs",
args: "--phase review --capabilities java,security,qa,architecture")
Read all required assets; read recommended only when relevant to changed Java scope.
Agent(
subagent_type: "java-developer",
description: "Dynamic Java developer review for {target} (Java {JAVA_VERSION} + Spring {SPRING_VERSION})",
prompt: "Perform a Java developer review for: {target}.
Run `git diff HEAD~1..HEAD` to get the diff.
## Dynamic Evaluation Criteria
You MUST evaluate the code exclusively against the patterns loaded below.
Do NOT use hardcoded criteria — score only the GP/BP items explicitly listed.
### Patterns (Java {JAVA_VERSION}) — evaluate GP-NN and BP-NN from the same file:
{FULL CONTENT OF java/{JAVA_VERSION}/patterns.md}
{IF Spring Boot detected:}
### Patterns (Spring Boot {SPRING_VERSION}) — evaluate GP-NN and BP-NN from the same file:
{FULL CONTENT OF java/frameworks/spring/{SPRING_VERSION}/patterns.md}
## Scoring Instructions
1. For each GP-NN item: award the declared points if the pattern is observed; 0 if absent; partial if partially applied.
2. For each BP-NN item: deduct the declared penalty points if the anti-pattern is found.
3. Final score = Σ(GP points awarded) − Σ(BP penalties applied). Floor at 0.
4. Max score = {MAX_SCORE} pts (from patterns.md declarations).
5. GO/NO-GO decision:
- GO: score ≥ {GO_THRESHOLD} pts AND zero CRITICAL bad patterns found
- GO-WITH-RESERVATIONS: score ≥ {GO_WITH_RESERVATIONS_THRESHOLD} pts AND no CRITICAL bad patterns
- NO-GO: score < {GO_WITH_RESERVATIONS_THRESHOLD} pts OR any CRITICAL bad pattern found
## Output Format
ENGINEER: Developer-Java
STORY: {target}
JAVA_VERSION: {JAVA_VERSION}
SPRING_VERSION: {SPRING_VERSION or 'N/A'}
SCORE: XX/{MAX_SCORE}
PERCENTAGE: XX%
STATUS: GO | GO-WITH-RESERVATIONS | NO-GO
---
GOOD_PATTERNS_APPLIED:
- [GP-NN] Pattern name (+X pts) | Evidence: {brief concrete observation}
BAD_PATTERNS_FOUND:
- [BP-NN] Anti-pattern name (-X pts) [CRITICALITY] -- file:line -- Fix: {suggestion}
MISSING_PATTERNS_PATTERNS:
- [GP-NN] Pattern name (0 pts) -- What to add: {guidance}
SUMMARY:
{2-3 sentence summary of overall code quality and top priority fixes}
"
)
.aikittools/features/feature-XXXX/reviews/review-developer-java-story-XXXX-YYYY.md
Convenções de erro/degradação transversais a review/audit (empty input, RULE-012 template fallback, falha de specialist, build/test override, idempotência) vivem em
_shared/error-handling-review.md. As linhas abaixo são específicas desta skill.
| Scenario | Action |
|----------|--------|
| No Java files in diff | Report INFO: no Java changes in scope |
| Pattern files not found for detected version | Warn and fall back to highest available version |
| Total maximum score: line missing from patterns.md | Sum all GP-NN point values from the table |
| Coverage tool not configured | Warn and note in report |
| Agent returns invalid output | Mark specialist FAILED, score 0 |
development
Documentation freshness gate: validates 6 dimensions (readme, api, adr, etc.) per PR.
testing
Conditional dep-policy gate: CVEs, licenses, versions, freshness; SARIF + report.
documentation
Incrementally updates the service or system architecture document; never regenerative.
development
Scans code and git history for leaked credentials, API keys, and tokens; SARIF output.