Documentation21 categories
Which of these comments should exist?
A file dense with comments that mostly narrate the code.
Review the comments in the code below. Judge each one, not the code. Sort every comment into: - **Keep**: explains why, records a non-obvious constraint, warns about a trap, cites an issue or spec - **Delete**: restates the code, states the obvious, is decorative, or is a section banner where a function would be clearer - **Wrong**: no longer matches what the code does. Quote both and say which one to trust - **Rewrite**: the point is worth making but the comment buries it. Give the replacement Then list the places with no comment that need one: a magic number with an origin, a workaround for an external bug, a deliberate deviation from the obvious approach, an ordering that matters. Be strict. Most comments in most files should be deleted. Code:
Making it yours
- Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
- Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
- If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.
Editing and auditing docs. Finding what is stale or undocumented, cutting what the code already says, rewriting for the reader.
Related prompts
Explain this for a non-technical readerWriting for support, sales, or a stakeholder who needs the shape not the detail.Audit these docs for what is no longer trueDocumentation that was written once and never checked against the code again.Turn an internal spec into user-facing docsThe feature shipped and the only writing about it is the design doc.Does this comment earn its place?A comment you are not sure is worth the line it occupies.What is undocumented here?Code whose real behaviour has drifted past its documentation.Name this sectionA heading nobody will ever find by searching.
Keep this one
Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.
Add to your browser โ free