Generating documentation with Amazon Q Developer - Amazon Q Developer

Generating documentation with Amazon Q Developer

Amazon Q Developer helps you understand your code and keep documentation up to date by generating READMEs for your code.

Amazon Q can produce new documentation and update existing documentation in your codebase. By analyzing your project, code objects, and dependencies within your codebase, Amazon Q can document complex coding concepts and update documentation based on new code changes.

To generate documents, you open a project or workspace in your IDE and enter /doc in the chat. After you choose the type of documentation update you want to work on, Amazon Q will analyze your code, generate documentation, and provide a diff with the changes it made. You can accept the proposed changes, or provide feedback with additional changes you want Amazon Q to make.

For information on supported IDEs for this feature, see Supported IDEs. For information on supported languages, see Language support for documentation generation.

Use cases

Amazon Q can perform the following tasks from the chat panel in the IDE.

  • Create new documentation – Amazon Q can create new READMEs for your project based on the code in the selected folder. If you already have a README and choose to create a new README, Amazon Q will overwrite your existing README, not update it. You still have the option to review the new content before Amazon Q overwrites your original README.

  • Make specific updates – You can describe the changes you’d like Amazon Q to make to your README in natural language. You can do so by updating an existing README and then choosing the option to make a specific change. After Amazon Q generates documentation, you have the option to describe additional changes you want it to make. You can request updates like adding a section, removing an existing section, or elaborating on an existing section.

  • Review new code and suggest documentation updates – After you make code changes, Amazon Q can review the new code and suggest associated updates to your README.

Supported file types

Amazon Q reviews your source code and configuration files, including but not limited to the following files types, when generating documentation:

  • .template files

  • requirements.txt

  • package.json

  • tsconfig.json

  • Dockerfile

  • .git/config

  • LICENSE

  • LICENSE.md

  • CONTRIBUTING

  • CONTRIBUTING.md

Amazon Q filters out files or folders defined in a .gitignore file. If you want to exclude any files or folders from being reviewed for documentation generation, you can include them in a .gitignore file in your project or workspace.

Quotas

Documentation generation with Amazon Q maintains the following quotas:

  • Existing README size – The maximum size of an existing README that Amazon Q can review to update documentation. If the README exceeds this quota, Amazon Q isn’t able to update the existing documentation.

  • Code project size – The maximum size of the project or workspace that Amazon Q can use to generate documentation.

    Even if you choose a smaller folder to generate documentation for, the parent project or workspace must be within this quota.

  • Document generations per task – The number of times Amazon Q can generate new documentation for a given task, including the initial document generation.

Amazon Q Developer Agent for software development Quotas
Resource Quota
Existing README size 15 KB
Code project size

200 MB uncompressed

50 MB compressed

Document generations per task 3