Write technical documentation
Rover includes a specialized workflow for creating technical documentation. This guide shows you how to use the tech-writer workflow to generate developer documentation, end-user guides, tutorials, and more.
Understanding the tech-writer workflow
Section titled “Understanding the tech-writer workflow”The tech-writer workflow is specifically designed for documentation tasks. It guides the AI coding agent through a structured process:
- Context Analysis: The agent examines your codebase to understand what needs to be documented
- Outline: Creates a structured outline for the documentation
- Draft: Writes the initial documentation content
- Review: Refines the content for clarity, accuracy, and completeness
This workflow accepts different inputs than the standard software engineering workflow, allowing you to specify your target audience and preferred format.
Create documentation
Section titled “Create documentation”Use the tech-writer workflow to generate documentation for your project.
Creating technical documentation
- 1
Navigate to your project directory
Terminal window cd ~/my-project - 2
Create a documentation task using the tech-writer workflow
Terminal window rover task --workflow tech-writer -y "Document the authentication system, including how to configure OAuth providers and handle user sessions"You can also specify additional parameters:
Terminal window rover task --workflow tech-writer \--input audience="developers" \--input format="markdown" \-y "Create an API reference for the REST endpoints" - 3
Monitor the task progress
Terminal window rover logs -f 1
Workflow inputs
Section titled “Workflow inputs”The tech-writer workflow accepts the following inputs:
| Input | Description | Default |
|---|---|---|
description | What documentation you want to create | Required |
audience | Target audience (e.g., “developers”, “end users”, “administrators”) | “end users” |
format | Output format (e.g., “markdown”, “html”, “asciidoc”) | “markdown” |
You can specify inputs using the --input flag when creating the task.
Review and refine
Section titled “Review and refine”After the agent completes the documentation, review it and iterate as needed.
Review documentation
- 1
Open a shell in the task workspace to view the generated files
Terminal window rover shell 1 - 2
Review the documentation files created by the agent
Terminal window ls -lacat README.md - 3
If changes are needed, exit the shell and create an iteration
Terminal window exitrover iterate 1 "Add more examples to the authentication section and include troubleshooting steps for common errors"
Documentation best practices
Section titled “Documentation best practices”To get the best results when creating documentation with Rover:
- Be specific about scope: Clearly define what should be documented (e.g., “Document the API authentication module” rather than “Document the API”)
- Specify the audience: Different audiences need different levels of detail and technical depth
- Provide context: If documenting complex features, reference specific files or functions
- Include examples: Ask for code examples, use cases, or step-by-step tutorials
- Request structure: Specify if you want specific sections like “Overview”, “Getting Started”, “API Reference”, etc.
Common documentation tasks
Section titled “Common documentation tasks”Here are some examples of documentation tasks you can create with Rover:
API Documentation:
rover task --workflow tech-writer --input audience="developers" \ -y "Create API reference documentation for all REST endpoints in src/api/"User Guides:
rover task --workflow tech-writer --input audience="end users" \ -y "Write a user guide explaining how to configure and use the dashboard"Installation Instructions:
rover task --workflow tech-writer \ -y "Create installation and setup documentation for the project"Architecture Documentation:
rover task --workflow tech-writer --input audience="developers" \ -y "Document the system architecture, including the microservices structure and data flow"