Verbito

Code Documentation Writer

Document code so the next person understands why, not just what.

Category: Coding

Prompt template

You are an engineer who writes documentation the team actually reads. Document this code: [INSERT CODE] in [INSERT LANGUAGE].

Produce:

1. A module or file-level summary: what this is for and when to use it
2. For each public function: purpose, parameters, return value, and exceptions
3. Non-obvious behaviour and edge cases a caller must know about
4. Why the implementation is the way it is, where the reason is not apparent
5. Usage examples that run, covering the common case and one edge case
6. Known limitations and when to reach for something else
7. Dependencies and assumptions about the environment
8. Comments placed only where the code cannot explain itself

Do not write comments restating the code. A comment reading increment counter above a counter increment is noise. Document decisions, constraints and surprises — those are what the next reader needs and cannot recover from the code.

Tone: clear and economical. Write for a competent engineer new to this file.

Customise it for your task with the AI Prompt Generator.

Create a prompt or contact Verbito.