spring-kotlin-code-review

작성자: kotlin

Kotlin + Spring 변경 사항에서 동작 회귀, 트랜잭션 및 프록시 버그, API 및 직렬화 오류, 지속성 위험, 보안 문제 등을 검토합니다.

npx skills add https://github.com/kotlin/kotlin-backend-agent-skills --skill spring-kotlin-code-review

Spring Kotlin Code Review

Source mapping: Tier 1 critical skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-21).

Mission

Review changes the way a strong Kotlin plus Spring teammate would review them: behavior first, risk first, evidence first. Optimize for catching bugs, regressions, and missing tests, not for polishing style.

Read In This Order

  • Diff or changed files.
  • Related tests.
  • Configuration or build file changes.
  • Impacted controllers, services, repositories, security config, and migrations.
  • Project conventions from project-context-ingestion if available.

Review Dimensions

Check every relevant change for:

  • transaction boundaries and rollback behavior
  • proxy compatibility and self-invocation traps
  • bean wiring and configuration safety
  • API contract, validation, and serialization correctness
  • JPA or repository correctness and performance
  • security exposure and authorization drift
  • concurrency, retries, and idempotency risks
  • observability regressions
  • test adequacy and missing failure-path coverage
  • Kotlin-specific problems such as !!, unsafe platform types, and misuse of lateinit

Output Contract

Return findings first and order them by severity. Use this structure:

  • Findings: each finding should name the risk, explain the consequence, and point to the relevant file and line when available.
  • Open questions or assumptions: only where uncertainty changes the review outcome.
  • Summary: only after findings, and only briefly.

If no material findings exist, say so explicitly and still note residual risk or testing gaps.

What Counts As A Real Finding

  • A correctness bug.
  • A production-risking design choice.
  • A likely regression.
  • A security or data-consistency hole.
  • Missing coverage for a meaningful failure path.

Minor style suggestions are secondary and should never drown out real risk.

Review Heuristics

  • Prefer a smaller number of well-supported findings over a long list of weak suspicions.
  • Tie every finding to behavior, not only to taste.
  • Verify whether the repository's existing conventions intentionally justify an unusual pattern before flagging it.
  • Distinguish must fix concerns from consider improving concerns.

Advanced Review Checklist

  • Check deploy-order safety. A code change, config change, and migration may each be correct alone but unsafe in rolling deployment order.
  • Check backward compatibility of JSON contracts, event schemas, database writes, and feature flags. Additive changes are safer than semantic changes hidden behind the same shape.
  • Check cache invalidation, deduplication, retry semantics, and idempotency whenever writes or integrations change.
  • Check whether observability changed with the behavior. A new critical path without metrics, logs, or trace propagation is a real operational regression.
  • Check whether new repository queries need supporting indexes or whether an innocuous loop creates N+1 behavior.
  • Check whether any new async, scheduled, or concurrent path changes transaction scope, MDC propagation, or security context.
  • Check build and dependency changes for BOM drift, plugin mismatches, or silent classpath changes.
  • Check what was removed, not only what was added. Missing validation, logging, or authorization is often the real regression.

Expert Heuristics

  • Read the change as a workflow, not as isolated files. Many Spring bugs live in the seam between controller, service, repository, and config.
  • If a finding depends on an assumption, state the assumption and the fastest way to confirm it.
  • Prefer findings that are expensive for the team to rediscover in production.
  • Use style comments only when they prevent future correctness bugs or materially improve maintainability.

Guardrails

  • Do not nitpick naming or formatting when the change contains higher-severity risk.
  • Do not invent risks without code evidence.
  • Do not praise or summarize before surfacing findings.
  • Do not ignore missing tests just because the code "looks straightforward."
  • Do not apply generic Java advice without checking Kotlin and Spring specifics.

Quality Bar

A good run of this skill gives the author a short list of concrete, high-signal risks to address. A bad run reads like a generic lint pass and misses the transactional, proxy, security, or persistence behavior that actually matters.

kotlin의 다른 스킬

ci-cd-containerization-advisor
kotlin
재현 가능한 빌드, 이미지 및 배포 파이프라인을 설계합니다. Kotlin 및 Spring 애플리케이션을 대상으로 하며, CI 검증, 계층형 컨테이너, 롤아웃 안전성 등을 포함합니다.
official
configuration-properties-profiles-kotlin-safe
kotlin
Design and diagnose Spring configuration, profiles, and `@ConfigurationProperties` binding for Kotlin applications. Use when property binding fails,…
official
dependency-conflict-resolver
kotlin
Diagnose and resolve Gradle and Spring classpath conflicts, version drift, and binary incompatibilities in Kotlin applications. Use when `NoSuchMethodError`,…
official
domain-decomposition-api-design-advisor
kotlin
구현을 시작하기 전에 비즈니스 범위를 경계 컨텍스트, 모듈 또는 서비스 경계, 워크플로우, API 계약으로 분해합니다. 새로운 것을 설계할 때 사용하세요.
official
error-model-validation-architect
kotlin
Kotlin과 Spring 서비스를 위한 일관된 API 검증 및 오류 처리 동작을 설계하고 구현합니다. 오류 페이로드를 정의하거나 프레임워크를 매핑할 때 사용합니다.
official
gradle-kotlin-dsl-doctor
kotlin
Generate, debug, and repair Kotlin + Spring Gradle builds with minimal, compatible changes. Use when `build.gradle.kts` or `settings.gradle.kts` is failing,…
official
integration-resilience-engineer
kotlin
탄력적인 HTTP, 메시징, 예약 통합을 Kotlin 및 Spring 서비스용으로 설계하며 명시적인 타임아웃 예산, 재시도, 멱등성, 서킷 브레이커를 포함합니다.
official
jackson-kotlin-serialization-specialist
kotlin
Kotlin과 Jackson을 사용하는 Spring 애플리케이션에서 JSON 직렬화 및 역직렬화 동작을 진단하고 설계합니다. DTO 역직렬화 실패 시, 기본값…
official