plugins/reqstool/skills/reqstool/add-req/SKILL.md
Add a new requirement to the system-level requirements.yml and update the relevant subproject filter. Use when the user wants to add a new requirement.
npx skillsauth add reqstool/reqstool-ai reqstool:add-reqInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Add a new requirement to the system and update subproject filters.
Input: Description of the requirement. Optionally: module name, position (after which ID), significance, categories.
Configuration
Read .reqstool-ai.yaml — see reqstool-conventions.md for field reference.
For reqstool fundamentals (imports, filters, implementations), see reqstool-overview.md in the reqstool-conventions skill references.
Steps
Read config
Read .reqstool-ai.yaml. Build a mapping of module names to their paths and prefixes.
Gather requirement details
If not provided in the input, use AskUserQuestion to collect:
shall, should, or may (default: shall)[functional-suitability])Valid categories: functional-suitability, performance-efficiency, compatibility,
interaction-capability, reliability, security, maintainability, flexibility, safety
Determine the next ID
Read <system.path>/requirements.yml and find existing IDs with the module's req_prefix.
For top-level requirements: Find the highest existing ID and increment by 1.
Format: 4-digit zero-padded (e.g., CORE_0010, CLI_0004).
For child requirements (when a parent ID is provided): Use dot notation.
Find the highest existing child number for that parent and increment by 1.
Format: <PARENT_ID>.N (e.g., CLI_0004.1, CLI_0004.2).
See reqstool-decomposition-conventions.md (in the reqstool-conventions skill references) for when and how to decompose.
Add the requirement to system-level file
Insert the new requirement into <system.path>/requirements.yml at the specified position
(or at the end of the relevant group). Use the revision from config.
Format for top-level requirements:
- id: <ID>
title: <title>
significance: <significance>
description: <description>
categories: [<categories>]
revision: <revision>
Format for child requirements (includes references linking to parent):
- id: <PARENT_ID>.N
title: <title>
significance: <significance>
description: <description>
references:
requirement_ids: ["<PARENT_ID>"]
categories: [<categories>]
revision: <revision>
Update the subproject filter
Add the new requirement ID to the filters.<urn>.requirement_ids.includes list in the
relevant module's <module.path>/requirements.yml.
Verify the new requirement is tracked
get_requirement_status(<new_req_id>) on the reqstool MCP server and confirm the requirement is returned.reqstool status local -p <module.path> and confirm the new requirement appears.Report
Show the user:
@Requirements annotation to the implementation method/function (see reqstool-annotation-conventions.md for language-specific syntax)."/reqstool:add-svc to create a verification case for this requirement."Guardrails
<system.path>/requirements.yml (SSOT)tools
Install the openspecui reqstool hook into this project. Writes openspec/openspecui.hooks.ts so openspecui enriches all OpenSpec documents (spec, changes, and archived) with reqstool requirement/SVC titles and descriptions at read time.
tools
Run reqstool traceability status on the local filesystem. Use when the user wants to check requirement coverage, missing implementations, or test status.
tools
Create or update .reqstool-ai.yaml configuration for a project. Use when the user wants to initialize or reconfigure reqstool-ai settings.
tools
Add a new Software Verification Case (SVC) to the system-level SVCs file and update the relevant subproject filter. Use when the user wants to add a test scenario for a requirement.