Documentation Best Practices
- Start every function with a one-line summary.
- Document parameters, defaults, optional values, and return types.
- Use JSDoc tags: `@param`, `@returns`, `@example`, `@throws`, `@deprecated`.
- Prefer runnable examples over long explanations.
- Describe async behavior and side effects explicitly.
- Keep documentation close to the source and generate it consistently.