Best practices for documentation generation with Amazon Q Developer - Amazon Q Developer

Best practices for documentation generation with Amazon Q Developer

To improve results from documentation generation with Amazon Q, follow these best practices:

  • Amazon Q can generate documentation for any amount of code within the code project size quota, however very large repositories will take longer to generate documentation for and might be less specific. If you have a large repository, consider requesting documentation for a subset of code or a single file for more specific results.

  • The quality of documentation Amazon Q generates can be improved if your code is well-commented and organized, has good naming conventions for programming entities, and follows other standard coding conventions.

  • Amazon Q produces the highest quality documentation for code written in one or more of the supported languages. Code written in other languages might not be reflected in generated documentation, or could produce lower quality documentation. For more information on languages, see Language support for documentation generation.

  • If you want to request specific changes to a README in natural language, you can do so by choosing to update an existing README and then choosing the option to make a specific change. After Amazon Q generates documentation, you can also choose to make changes and describe what updates you want Amazon Q to make.

  • When describing the updates you want Amazon Q to make to your documentation, consider the following:

    • The description of changes should include the sections you want to modify, the content you want to add or remove, and specific issues that need correcting.

    • Changes should relate to how project functionality is reflected in the README.

    • Content you refer to should be available in your codebase.

  • Amazon Q doesn’t have access to private or internal platforms. Amazon Q also might not have knowledge of third party tools or software or specialized tooling in your code. If your code includes resources Amazon Q can’t access or isn't familiar with, that code won’t be documented. You can manually edit the README to include content Amazon Q isn’t able to generate.