← ClaudeAtlas

javadoc-stylelisted

The javadoc style for a Java project - what earns a comment and what never does, where a type, method or constructor gets one and where nothing goes at all, and the formatting rules. Load it before writing or rewriting javadoc, and whenever judging whether an existing comment is worth its place. The procedure for auditing existing javadoc against the code it describes is the separate `javadoc-refactor` skill.
dmitriy-iliyov/claude-skills · ★ 0 · Code & Development · score 72
Install: claude install-skill dmitriy-iliyov/claude-skills
# Javadoc style House rules for javadoc in `src/main`. A comment that breaks one of them is either wrong, or a reason to change the rule here deliberately. Code, javadoc and message text are written in English. ## What a comment is for Javadoc says what the signature cannot: **the contract, the meaning of `null`, the invariant behind a value** and - rarely - **the reason for a decision**. Restating the name of a method is worse than writing nothing. The norm is two or three sentences; a second paragraph has to be earned. A reason earns its place only where the code without it reads as a **mistake or as unfinished work**. That is the whole test. "Publishing happens after the transaction commits, because until then the operation does not exist" passes it - the ordering looks arbitrary until you know. "A record rather than a class because that is all it is" does not. ## What never goes in The middle ones are what creep in while the code is being written; the last is what creeps in while it is being tested. **1. The name, spelled out.** `getTtl()` returning "the ttl" documents nothing. **2. A defence of an absence.** Why the type has no further parameter, why a method was not added, why an alternative nobody proposed was not chosen - none of it belongs in the doc: ```java // no * The declared type of the result is not among the components on purpose. It travels on Operation but * stops here: it belongs to the call site, which every entry that reads a result back alre