name: kdoc description: Write concise KDoc documentation for Kotlin classes and functions. Use when user wants to add KDoc to Kotlin files. Focuses on short summaries without version info or variable docs. allowed-tools:
- Read
- Edit
- Glob
- Grep
KDoc Documentation Writer
Write short, concise KDoc documentation for Kotlin files focusing on class and function summaries only.
Rules
-
Class/Interface/Object KDoc
- Single sentence describing purpose
- No
@author,@version,@since, or other metadata - No
@propertyfor class properties
-
Function KDoc
- One-liner summary of what function does
@paramonly if parameter purpose isn't obvious from name@returnonly if return value needs clarification- Skip
@throwsunless critical for API consumers
-
DO NOT Document
- Variables/properties (neither class nor local)
- Private functions (unless complex logic)
- Getters/setters
- Obvious functions (e.g.,
fun getId(): String) - Companion object members
-
Style
- Start with verb (Returns, Creates, Handles, Processes)
- No period at end of single-line KDoc
- Max 80 chars per line
- Use
/** ... */format
Examples
Class KDoc
/** Manages game session state and lifecycle */
class GameManager { ... }
/** Handles user authentication via OAuth and email */
interface AuthService { ... }
Function KDoc
/** Loads questions from remote API and caches locally */
suspend fun loadQuestions(): List<Question>
/** @param difficulty Filter questions by difficulty level */
fun getQuestionsByDifficulty(difficulty: Difficulty): List<Question>
/**
* Validates answer and updates score
* @return true if answer correct
*/
fun submitAnswer(questionId: String, answer: String): Boolean
Skip These
// NO KDoc needed
private fun calculateInternalScore(): Int
val currentScore: Int
fun getUsername(): String
companion object { const val TAG = "Game" }
Workflow
- Read target Kotlin file
- Identify public classes, interfaces, objects
- Identify public/internal functions needing docs
- Write minimal KDoc using Edit tool
- Skip variables, private members, obvious code
Generateur de Documentation API
Documentation
Genere automatiquement de la documentation API OpenAPI/Swagger.
Rédacteur Technique
Documentation
Rédige de la documentation technique claire selon les meilleurs style guides.
Rédaction de User Stories
Documentation
Génère des user stories avec critères d'acceptation clairs à partir de requirements produit. Utile pour la planification de sprint et la communication des exigences à l'équipe.