Builds a QA test plan from requirements documents. Use when the user says "document qa", "create test plan", "qa plan", or provides a requirement ID (FEAT-XXX, CHORE-XXX, BUG-XXX) for QA planning.
Build a comprehensive QA test plan from requirements documents. The test plan maps every acceptance criterion, functional requirement, and root cause to verification entries, ensuring complete coverage before QA execution begins.
requirements/features/, requirements/chores/, and requirements/bugs/ for a matching document (e.g., FEAT-008 matches FEAT-008-skill-argument-hints.md). If no match is found, inform the user and fall back to interactive selection.This skill uses a state file to prevent its stop hook from interfering with other skills.
At the start of this skill, create the state file using the Write tool:
Write tool: path=".sdlc/qa/.documenting-active", content=""
This signals to the stop hook that documenting-qa is the active skill. The stop hook handles cleanup automatically — it removes the state file when it detects successful completion and exits 0. In orchestrated workflows where the stop hook may not fire, the orchestrator cleans up the state file after this skill returns.
This skill does not include Bash in its allowed tools. Do NOT use Bash commands (including echo) for output formatting, status messages, or any other purpose. Use direct text output in your response instead. All communication with the user should be through your response text, not through shell commands.
The user provides a requirement ID in one of these formats:
FEAT-XXX — Feature requirementCHORE-XXX — Chore/maintenance taskBUG-XXX — Bug reportIf no ID is provided, ask the user for one.
Parse the requirement ID to determine the type and locate source documents:
| ID Prefix | Type | Requirements Directory | Additional Documents |
|---|---|---|---|
FEAT- | Feature | requirements/features/ | requirements/implementation/ (if exists) |
CHORE- | Chore | requirements/chores/ | — |
BUG- | Bug | requirements/bugs/ | — |
Search for files matching the pattern {PREFIX}-{NNN}*.md in the appropriate directory. Error clearly if no matching document is found — include the expected path in the error message.
For FEAT- IDs, also search requirements/implementation/ for a matching implementation plan. If found, load it as an additional source document. If not found, note the absence but proceed with the feature requirements document alone.
Read the source document(s) and extract all verifiable items:
Use the template from assets/test-plan-template.md to build the test plan.
For each extracted item from Step 2, create a test plan entry in the appropriate section:
After populating all sections, check off (- [x]) each item in the template's ## Plan Completeness Checklist that has been satisfied. Items should be checked as the plan is built — do not leave them unchecked for later.
Delegate plan completeness verification to the qa-verifier subagent:
qa-verifier subagentIf the subagent identifies gaps:
After each verification round, attempt to finish. The Stop hook will evaluate your last message to determine if the plan is truly complete. If gaps remain, it will block and feed the missing items back to you. Continue adding missing items and re-verifying until the hook allows completion.
Important: State the verification results clearly in your message when attempting to finish — the Stop hook uses pattern matching on your last message to assess completeness. Mention the test plan file path (e.g., QA-plan-FEAT-003) and confirm that the plan is complete/verified/saved.
This verification loop involves multiple API calls: the main conversation and the qa-verifier subagent (Sonnet). To reduce cumulative API pressure:
The qa-verifier subagent may fail due to transient API errors (e.g., "service overloaded"). When this occurs:
qa/test-plans/QA-plan-{id}.md
{id} is the full ID: e.g., FEAT-003, BUG-001qa/test-plans/QA-plan-FEAT-003.mdqa/test-plans/ directory if it doesn't existexecuting-qaBefore finishing, verify:
| Task | Recommended Approach |
|---|---|
| Document requirements first | Use documenting-features, documenting-chores, or documenting-bugs |
| Review requirements | Use reviewing-requirements |
| Build QA test plan | Use this skill (documenting-qa) |
| Reconcile after QA plan creation | Use reviewing-requirements — test-plan reconciliation mode (optional but recommended) |
| Create implementation plan | Use creating-implementation-plans |
| Implement the plan | Use implementing-plan-phases |
| Execute chore or bug fix | Use executing-chores or executing-bug-fixes |
| Reconcile after PR review | Use reviewing-requirements — code-review reconciliation mode (optional but recommended) |
| Execute QA verification | Use executing-qa (requires test plan from this skill) |
| Merge PR and reset to main | Use finalizing-workflow |