---
name: spring-kotlin-clean-code-convention
description: >
  Guides writing clean Spring + Kotlin code following clean code principles and conventions.
  ALWAYS activate when the user uses any of these phrases:
  "clean this up", "write this cleanly", "follow clean code", "apply conventions", "clean code", "convention", "naming", "SOLID", "refactor",
  "클린하게 짜줘", "클린하게 작성해줘", "클린 코드로", "클린코드", "컨벤션 맞게", "네이밍", "SOLID", "리팩토링".
  Covers naming, newspaper-style readability, error handling, SOLID, Kotlin idioms, and Spring layer rules.
---

# Spring Kotlin Clean Code Convention

Apply the following principles when writing or refactoring Spring + Kotlin code.
Load the relevant reference files and follow their guidelines.

## Principles

| # | Area | Reference |
|---|------|-----------|
| 1 | Naming conventions | `references/naming.md` |
| 2 | Readability (newspaper structure) | `references/readability.md` |
| 3 | Error handling | `references/error-handling.md` |
| 4 | SOLID principles | `references/solid.md` |
| 5 | Kotlin idioms | `references/kotlin-idioms.md` |
| 6 | Spring layer rules & DTO naming | `references/spring-layers.md` |

Load all 6 reference files when writing or refactoring code from scratch.
Load only the relevant ones for targeted questions (e.g., user asks only about naming → load `references/naming.md`).
