Smart Documentation: How to Use AI for Better Project Writing

Cover of the article on How to use AI in documentation. The image shows a young black man wearing glasses and an orange shirt. He is standing in front of computer monitors in an office environment.
Discover how to use AI for technical documentation using StackSpot AI's Quick Commands feature.

You might be wondering: how to use AI for documentation? After all, when you’re facing a project with little to no documentation, writing high-quality material can feel like a major hurdle.

Good documentation brings together a collection of documents that define your project’s functional and technical requirements. Ensuring these requirements are clear and well-structured is key to the success of any project.

In this article, you’ll get a quick overview of requirements engineering, some handy tips for writing clear requirements, and a glimpse at how AI can assist in crafting quality project documentation.

But What Exactly is a Requirement?

According to the CPRE Glossary, a requirement is defined as:

  • A need identified by stakeholders
  • A capability or property a system must possess
  • A documented representation of a need, capability, or property.

In short, well-defined requirements are critical for smooth, clear, high-quality development and testing—with minimal rework down the line.

And Where Does StackSpot Come Into Play?

StackSpot AI offers a variety of AI-powered tools that integrate with large language models (LLM), including the powerful Quick Commands feature.

I used StackSpot AI’s Quick Commands to generate project documentation directly from reading a requirement—covering everything from user stories and acceptance criteria to test scenarios and test plans. 

What is a Quick Command?

According to StackSpot’s official documentation, Quick Commands are “predefined instructions that can be sent to large language (LLM) to perform specific actions. They provide quick and efficient ways to contextualize the LLM.

In practice, a Quick Command automates prompts and web requests to get better responses and faster. You can select a part of your code and choose an action that meets your needs. This feature is designed to make coding easier, more intuitive, and much more efficient.

Check out the full step-by-step guide on how to create a Quick Command here:

The platform already provides a set of ready-to-use Quick Commands for your IDE, and it also lets you create your own. I built one called create-quality-documentation-based-on-requirement.

Here’s a quick breakdown of the prompts I designed for it:

Prompts

Each prompt is built with clear, specific instructions and Knowledge Sources to ensure they handle both initial inputs and responses from other prompts effectively:

create-user-story

This prompt creates user stories by analyzing the provided requirement. It answers using the “Who,” “what,” and “why” format and highlights the business value whenever possible.

acceptance-criteria-prompt

This one sets up a structured process for generating acceptance criteria, making sure all crucial aspects of the requirement are covered—essential for writing solid, complete test scenarios.

test-prompt-scenarios

Using the Gherkin language, this prompt develops test scenarios based on the requirements and acceptance criteria. It includes success cases, error cases, edge cases, boundary conditions, alternative flows, and considerations for security, performance, and usability.

create-test-plan

This prompt builds a comprehensive test plan, referencing ISOs 25010 and 29199 and the CTFL 4.0 Syllabus. It outlines purpose, scope, references, glossary, items to be tested, test approach, test cases, resources, risks and contingencies, metrics and reports, responsibilities, and approvals.

How to Use AI for Documentation: How Does it Work in Practice?

Starting from a basic input (data entry), the Quick Command chains together prompts that interact with the LLM, generating optimized outputs for each subsequent step.

So, by simply providing your project requirements, you trigger the following workflow:

The image shows a Quick Command workflow on the StackSpot platform. The flow is structured on a dark background with elements connected by blue lines.Main elements of the flow:Start: Represented by a green start block at the top left.User Story Creation (cria-user-story): A block containing text that guides the creation of user stories from the reading of requirements.Creation of Acceptance Criteria (criteriosdeaceite): A block that instructs the definition of acceptance criteria based on the selected requirements.Test Plan Creation (cria-plano-de-testes): Defines the need for a test plan based on the analyzed requirements.Creating Test Scenarios (test-scenarios): Block that guides the writing of test scenarios using the user stories and acceptance criteria.Finish: Blue final block on the right, indicating completion of the flow.Other details:In the top right corner, there are two buttons: “Try” and “Finish”, suggesting options to test or complete the flow.On the left-hand side, there is a vertical panel with icons, possibly representing configuration or navigation options.Each block is labeled “StackSpot CodeGen”, indicating that the tool may be automating code generation or documentation.The structure suggests a standardized flow for creating software quality documentation and requirements-based testing.

The Requirement to be Read

Here’s an example of the set of requirements the Quick Command processes:

IDREQUIREMENTS
1Neck strap: assist in pen recovery in case of fall.
2Writing angle: supports a minimum of 10º and a maximum of 170º to ensure ergonomic writing.
3Ink: suitable for rough, smooth, damp, and wet surfaces.
4Writing capability: supports surface roughness grades from N1 to N11 according to ABNT NBR 6405-1985.
5Writing temperature range: operates on surfaces between -5ºC and +70ºC.
6Pen tip: made of refractory material that remains chemically and physically stable at high temperatures.
7Pen tip and ink: highly resistant to thermal shock, allowing seamless writing between surfaces with 40ºC temperature difference.
8Pen tip: designed for low thermal conductivity.
9Dual-color pen: offers light and dark options.
10Non-perforating tips: designed to reduce the risk of serious injury to human skin in cased of accidental falls.
11Refillable ink system.
12Low-viscosity ink: prevents staining of advertising paper and ensures precise markings.
13Water-resistant ink: not soluble in water.
14Kerosene-soluble ink.
15Removable parts: enables replacement, reloading, and/or repair.
16Components with low thermal expansion: ensures stability of fittings between -5ºC and +50ºC.
17Shock-resistant fittings: withstand falls from heights of up to 20 meters.
18Accessory: integrated laser ruler/square for precise and agile markings.
19Telescopic extension arm: extends up to 80 centimeters to increase marking reach.
20Maximum marking width: 20 millimeters.
21Non-slip pen body for better grip.
22Pen weight: 20 grams.
23Pen tip material: excellent ink absorption and transfer with light force of 1*10^-3 kgf.

The image shows a Quick Command workflow on the StackSpot platform. The flow is structured on a dark background with elements connected by blue lines.Main elements of the flow:Start: Represented by a green start block at the top left.User Story Creation (cria-user-story): A block containing text that guides the creation of user stories from the reading of requirements.Creation of Acceptance Criteria (criteriosdeaceite): A block that instructs the definition of acceptance criteria based on the selected requirements.Test Plan Creation (cria-plano-de-testes): Defines the need for a test plan based on the analyzed requirements.Creating Test Scenarios (test-scenarios): Block that guides the writing of test scenarios using the user stories and acceptance criteria.Finish: Blue final block on the right, indicating completion of the flow.Other details:In the top right corner, there are two buttons: “Try” and “Finish”, suggesting options to test or complete the flow.On the left-hand side, there is a vertical panel with icons, possibly representing configuration or navigation options.Each block is labeled “StackSpot CodeGen”, indicating that the tool may be automating code generation or documentation.The structure suggests a standardized flow for creating software quality documentation and requirements-based testing.

Seeing the Quick Command In Action

At this stage, you can see the Quick Command in action, following through each of the prompts we outlined earlier:

The image shows the execution of Quick Command on the StackSpot platformWorkflow diagram (left side): Contains text boxes with instructions in Portuguese, such as “cria-user-story” and “criteriosdeaceite”.Quick Command section (right-hand side): Has a black background with white text, displaying snippets of technical text or code. At the bottom right of this section is the “Execute” button.The image goes through each of the prompts that make up Quick Command as they are executed.

And here’s the final result:

The image shows the execution of Quick Command on the StackSpot platformWorkflow diagram (left side): Contains text boxes with instructions in Portuguese, such as “cria-user-story” and “criteriosdeaceite”.Quick Command section (right-hand side): Has a black background with white text, displaying snippets of technical text or code. At the bottom right of this section is the “Execute” button.The image goes through each of the prompts that make up Quick Command as they are executed.

Wrapping Up 

The goal of this article on how to use AI for documentation was to show you that using StackSpot AI can significantly improve the quality of your processes and projects. With the right prompt structure, you can consistently deliver high-value outputs—even when documentation is initially scarce.

Starting with a simple requirement read, you can generate user stories, define acceptance criteria, create test scenarios, and ultimately write a complete test plan.

Now that you understand the importance of well-defined requirements for a project’s success and have seen how this Quick Command works, why not create your own to boost your project delivery quality?

Consume innovation,
begin transformation

Subscribe to our newsletter to stay updated
on the latest best practices for leveraging
technology to drive business impact

Related posts