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