Documentation and Content Creation Workflow
Generate and maintain documentation and technical content with AI assistance
Use Ada CLI to create and update documentation, from API references to beginner tutorials. Documents that should be written from the code go to agents with ada agents start "<task>", which work in the active workspace. Drafting, outlining, and rewriting happen in ada chat, which is interactive: start it, then type the prompts shown below.
Run the commands on this page from the repository root with a workspace selected:
ada workspaces init
ada workspaces select --id <workspace-id>
API Documentation#
Generate reference documentation from the code:
# Full API reference
ada agents start "Generate complete API documentation for the routes under src/api and write it to docs/api"
# OpenAPI specification
ada agents start "Generate an OpenAPI 3.0 specification from the Express routes under src/routes and write it to docs/openapi.yaml"
# Request examples
ada agents start "Add curl examples for every user API endpoint to docs/api/users.md"
Track the agents while they run:
ada agents list
ada agents status <agent-id>
README Creation#
ada agents start "Write README.md covering installation, usage, features, and contributing, based on the code in this repository"
To refine one section at a time, run ada chat, paste the current README, and ask:
- "Write a Quick Start section with copy-paste commands."
- "Write an installation section covering npm, yarn, and pnpm."
- "Generate a troubleshooting section for the most common setup errors."
Tutorial Writing#
Outline in chat, then have an agent write the draft.
-
Run
ada chatand ask: "Create a tutorial outline for 'Building a REST API with Express and Prisma'." -
Hand the outline to an agent:
ada agents start "Write a beginner tutorial for building a REST API with Express and Prisma, following this outline: project setup, schema, routes, validation, testing. Write it to tutorials/getting-started.md" -
Back in chat, paste sections of the draft and ask which steps need screenshots or more explanation.
For code walkthroughs, point agents at the code:
ada agents start "Write an annotated walkthrough of src/auth-service.ts to docs/walkthroughs/auth-service.md"
ada agents start "Write a best practices guide based on the patterns under src/ to docs/best-practices.md"
Architecture Documentation#
# System overview
ada agents start "Write ARCHITECTURE.md explaining the system design and the purpose and interactions of each major component under src/"
# Data flow descriptions
ada agents start "Describe the data flow for user registration, API request handling, and background jobs in docs/data-flow.md"
Architecture decision records need the reasoning behind a choice, which lives with your team rather than in the code. Draft them in ada chat: describe the decision and the alternatives, then ask "Write an architecture decision record for choosing Prisma over TypeORM."
Code Comments and JSDoc#
ada agents start "Add JSDoc comments to every exported function in src/utils.ts"
ada agents start "Add comments explaining the algorithm and its edge cases in src/sort-algorithm.ts"
ada agents start "Document the types in src/types.ts with usage examples"
User and Admin Guides#
In ada chat, describe the feature and ask:
- "Write a user guide for the dashboard feature."
- "Generate an FAQ from these support questions." (paste the questions)
- "Create an administrator guide for managing users and permissions."
For configuration references, generate from the source of truth:
ada agents start "Document every configuration option defined under src/config, with defaults and examples, in docs/configuration.md"
Documentation Maintenance#
# Find outdated content
ada agents start "Compare README.md with the current code and list statements that are no longer accurate"
# Find gaps
ada agents start "List public APIs under src/api that have no documentation in docs/"
# Check style consistency
ada agents start "Review the files under docs/ for inconsistent terminology and heading style, and write the findings to docs-review.md"
Blog Posts and Case Studies#
Outline and draft in ada chat:
- "Create an outline for a blog post: 'Building a Scalable API with Node.js and Prisma'."
- "Write a lessons-learned section based on these notes." (paste the notes)
To pull material from the code:
ada agents start "Write a technical blog post draft explaining the API architecture under src/api to blog/api-architecture.md"
A Documentation Sprint#
Track a multi-day documentation effort as a parent task with subtasks:
# Create the parent task and note its ID
ada tasks submit "Documentation sprint" --tag docs
# Queue each piece of work under it
ada tasks submit "Audit current documentation and list the gaps by user impact" --parent <task-id> --tag docs
ada tasks submit "Generate the API reference in docs/api-reference.md" --parent <task-id> --tag docs
ada tasks submit "Write the getting started tutorial in docs/getting-started.md" --parent <task-id> --tag docs
ada tasks submit "Write ARCHITECTURE.md" --parent <task-id> --tag docs
ada tasks submit "Review all documentation for consistency" --parent <task-id> --tag docs
# Follow progress
ada tasks tree <task-id>
ada tasks list --tag docs
ada tasks monitor <subtask-id> --follow
Writing Style#
In ada chat, paste a section and ask:
- "Simplify the technical jargon in this section."
- "Rewrite this for non-native English speakers."
- "Add definitions for the technical terms."
- "Suggest diagrams or screenshots that would help here."
Related Workflows#
- Hackathon Workflow - Create docs for hackathon projects
- Learning Workflow - Document what you learn
- Common Workflows - Maintain docs during development