5
documentation
{{task}}
{{context}}
{{#each requirements}} {{this}} {{/each}}
{{documentation_style}}
{{target_audience}}
{{format_standards}}
{{integration_requirements}}
Documentation should answer "why", not just "what"
Include examples for complex functionality
Keep documentation up-to-date with code
Use clear, concise language
Assume reader has basic knowledge
API/Function Documentation
Documentation for public interfaces
{{doc_format}} (inline comments or docstrings)
YES
Usage Examples
Practical examples showing how to use the code
Code examples with explanations
YES
Architecture Overview
High-level design and component interactions
Markdown with diagrams
Conditional
README Updates
Project-level documentation updates
Markdown
Conditional
Before documenting:

1. UNDERSTAND THE AUDIENCE: - Who will read this documentation? - What is their expertise level? - What do they need to know? - What questions will they have?

2. IDENTIFY WHAT TO DOCUMENT: - What are the public interfaces? - What is complex or non-obvious? - What decisions were made? - What are the common use cases? - What are the edge cases?

3. STRUCTURE THE DOCUMENTATION: - Overview/Introduction - Installation/Setup (if applicable) - Quick Start/Basic Usage - Advanced Usage - API Reference - Examples - Troubleshooting/FAQ

4. WRITE EFFECTIVE EXAMPLES: - Show real-world usage - Start simple, get complex - Explain what each example does - Include expected outputs - Handle error cases

5. MAINTAIN CLARITY: - Use simple, direct language - Avoid jargon where possible - Explain necessary jargon - Use consistent terminology - Provide context

DOCUMENTATION BEST PRACTICES: - Document "why", not just "what" - Keep it concise but complete - Use active voice - Provide concrete examples - Update documentation with code changes - Get feedback from users

{{#if existing_code}} Code to be documented {{existing_code}} {{/if}}

{{#if example}} Desired documentation style {{example}} {{/if}}

Purpose
What does this code do and why does it exist?
YES
Usage
How to use this code with examples
YES
Parameters/Arguments
What inputs does it accept and what are their types?
For functions/methods
Return Values
What does it return and what is the type?
For functions/methods
Exceptions/Errors
What errors can occur and how to handle them
If applicable
Examples
Concrete usage examples with explanations
YES
Notes
Important caveats, limitations, or special considerations
Conditional
Documentation explains "why" not just "what"
Examples are practical and realistic
Examples show common use cases
Complex functionality has examples
Parameters are documented with types
Return values are documented
Errors/exceptions are documented
Language is clear and concise
Terminology is consistent
Documentation is up-to-date with code
Target audience is appropriate