0 added, 1 removed. Audit A to A.
---
name: qa-strategy
parent_agent: risk-evaluator-qa-strategy-agent
type: skill
description: Use this skill to translate the calculated risk into a technical test strategy and generate the final deliverables for the Orchestrator. Use it when previous skill provides the risk score and justification.
license: Apache-2.0
compatibility: CLI agents(Clude, Antigravity, Wrappy) and IDE Agents (Cursor IDE, ANTIGRAVITY IDE, VsCode, Windsurf, etc)
metadata:
author: Leticia Perez Gainza
version: 1.0.0
---
# Skill: `qa-strategy`
**Goal:** Define the optimal testing roadmap for the analyzed requirement, ensuring that the QA effort is aligned with the risk and project standards. Finalize the workflow by consolidating the report and the output JSON.
## Inputs (From Skill `risk-evaluator`)
1. **Risk Metadata (In-Memory JSON):** The exact JSON object generated by Skill 1 containing `risk_metadata` and `justification`.
2. **BDD/NFR Analysis:** The content of the `agents/bdd-validation-analyst-agent/outputs/bdd_validation_{RF_ID}_{timestamp}.md` file.
3. **QA Standards:** `reference/qa_strategy_standards.md`.
## **Internal Process:**
The skill operates under a 5-stage validation process:
1. **Input Validation**
2. **Strategy QA Mapping**
3. **Automation Determination**
4. **Final Artifacts Consolidation**
5. **Self-Validation (Quality Verification)**
Finally **Handoff to `orchestrator`**
### 1. Input Validation
**Handoff Validation**
Validates contract compliance of the previous skill `risk-evaluator` , you must validate that in the body payload are included the next keys and values:
- `risk_metadata` including `rf_id`, `risk_score` and `severity_level`
- `justification` including `business_impact`, `technical_justification` and `standard_reference`, optional can include `technical_debt_risk` an other extended field from skill `risk-evaluator`
**Rule**: The key-values mentionated above are mandatory, which can impact in the quality of the output of this skill, it must be validated before proceeding to the next stage.
**Conditional validation**:
- If the **Internal Handoff** validation is successful, the agent MUST proceed to the next validation stage.
- If the **Internal Handoff** validation fails or is missing, the agent MUST abort the process and inform to the Orchestrator the validation status and the reason of the failure, return example:
```json
{
"status": "failed",
"reason": "Skill 'risk-evaluator' handoff or its outputs are missing.",
"failure_details": "The risk_metadata key is missing in the handoff payload."
}
```
**Preservation rule**
In the handoff payload you will receive the outputs of the skill `risk-evaluator`. These outputs are immutable and must be preserved exactly as received. You must not modify, reinterpret, or transform this data in any way. You must include this data in the final JSON payload exactly as provided by the `risk-evaluator` skill within the `"report_path_agent_risk_evaluator"` key, by adding:
- The history-record generated: `agents/risk-evaluator-qa-strategy-agent/outputs/history-records/history_{RF_ID}_{timestamp}.json`
- The JSON `assets/strategy_schema.json` used for validation.
- The logs record updated: `agents/risk-evaluator-qa-strategy-agent/skills/risk-evaluator/assets/logs/risk.jsonl`
### 2. Strategic QA Mapping (`Mapping Strategy`)**
- Cross-reference the `raw_score` and `severity_level` from Skill 1 `risk-evaluator` with the "Test Level Selection" table in the standard `qa_strategy_standards.md`.
- Review the NFRs extracted by Agent A `bdd-validation-analyst-agent` (in the markdown file). If there are Security, Performance, or Accessibility tags, add those test levels to the final list, even if the base risk is low.
### 3. Automation Determination
- Evaluate whether the functionality should be automated based on section 3 of the QA standard. Set the `automation_candidate` flag to `true` or `false`.
### 4. Final Artifacts Consolidation
You will generate 2 Output Artifacts:
1. **Final Markdown Artifact Generation**
- Use the `assets/risk_evaluator_qa_strategy_template.md` file as a template to generate the final report, including:
- The Risk Matrix Analysis with its respective score and justification from the **Skill 1** and the Recommended QA Strategy with the suggestions of test levels and automation recomendation from **Skill 2**.
- The computer resource usage for the complete processing executed, included the processing done by **Skill 1**. Extract the data from tool-calls memory and log system. Include:
- Input Tokens
- Output Tokens
- Total Tokens
- Processing Time
- Tools Called
- Total RAM Used
- You must storage this report in `agents/risk-evaluator-qa-strategy-agent/outputs/risk-evaluator-qa-strategies/` folder as `risk_evaluator_qa_strategy_{RF_ID}_{timestamp}.md`
2. **JSON Generation**
- Create the final structured payload used for the `orchestrator` for handoff process, according to the `assets/strategy_schema.json` schema
- You must storage a backup of this JSON in `agents/risk-evaluator-qa-strategy-agent/outputs/strategy-payloads/` folder as `strategy_{RF_ID}_{timestamp}.json`
### 5. Self-Validation (Quality Verification):
- [ ] Verify that the mandatory fields: `risk_metadata`, `justification`, `test_levels`, and `automation_candidate` are correctly populated.
- [ ] Verify that the test levels and automation recommendations are consistent with the QA standards.
- [ ] Verify that the computer resource usage is correct.
- [ ] Verify that the JSON payload matches the schema.
- [ ] Verify that the handoff payload contains the following keys: `risk_metadata`, `justification`, `test_levels`, `automation_candidate` and the paths to the artifacts generated by the `bdd-validation-analyst-agent`, the skill `risk-evaluator` and the final reports generated by this skill.
- [ ] Verify if the `strategy_{RF_ID}_{timestamp}.json` file was generated and stored in the `agents/risk-evaluator-qa-strategy-agent/outputs/strategy-payloads/` following the naming convention .
- [ ] Verify if the final artifact `risk_evaluator_qa_strategy_{RF_ID}_{timestamp}.md` file was generated and stored in the `agents/risk-evaluator-qa-strategy-agent/outputs/risk-evaluator-qa-strategies/` following the naming convention.
---
## Constraints: Mandatory
|**Type**| **Rule**|
| --- | --- |
-
| **Must** |**Contract Compliance**: Validate contract compliance of the previous skill `risk-evaluator`, you must validate that in the body payload are included the next keys and values: `risk_metadata`, `justification`. |
| **Must** | **Data Mapping Preservation**: Inject into the final JSON payload, the exact `risk_metadata` and `justification` objects (which include `business_impact` and `technical_debt_risk`) passed from Skill 1 without modification or omission.|
| **Must** | follow strictly the reference `reference/qa_strategy_standards.md` to perform the test strategy process. |
|**Must**| **Risk mapping to qa strategy standards** You must map the `raw_score` and `severity_level` from Skill 1 `risk-evaluator` with the "Test Level Selection" table in the standard `qa_strategy_standards.md`.|
|**Must**| **Generate Final Artifacts** The generated JSON must include the paths to the artifacts generated by the `bdd-validation-analyst-agent`, the skill `risk-evaluator` and the final reports generated by this skill.|
|**Must**| **Output Consistency** The generated JSON must exactly match the `requirement_id` (RF_ID) processed by the previous agents. |
| **Must** | **Handoff Compliance** The final JSON payload must strictly comply with the schema defined in `assets/strategy_schema.json`. |
|**Must**| **Artifact Naming Compliance** The generated JSON and artifacts must comply with the naming convention: `{artifact_name}_{RF_ID}_{timestamp}.json/md`, all the artifacts generated should have the same timestamp.|
| **Must**| **Notify if Success**: Upon finishing, it must notify the Orchestrator that the requirement's lifecycle has successfully concluded.|
| **Must**| **Notify if Fail**: If the skill fails to validate any contract or internal requirement, it MUST abort the process and immediately notify the Orchestrator with a JSON payload containing the specific error reason.|
|**Won't**| **No Functional Alteration** The skill is forbidden to modify the report generated by `bdd-validation-analyst-agent`. It can only add new information in its own final report.|
|**Won't**| Execute any analysis out of the scope of test strategy generation.|
|**Won't**| **Hallucination Restriction** avoid generate tests strategy with high risk when the risk score are medium or low.<br>Avoid invent new risk if it was not identified by `risk-evaluator` skill, this is out of your scope |
|**Won't**| **No Specific Implementation Details Recommendation** Do not recommend tools or frameworks to execute the test strategy, neither test cases details, test data, this is out of your scope |
---
## Output
### Final Reports
You will generate and deliver 2 Output Artifacts:
1. **Final Markdown Artifact**: `risk_evaluator_qa_strategy_{RF_ID}_{timestamp}.md`
2. **JSON Generation**: `strategy_{RF_ID}_{timestamp}.json`
### Final Handoff
The skill emits the final payload to the Orchestrator so it can close the process. The JSON payload must strictly comply with the schema defined in `assets/strategy_schema.json`.
### Exact Output JSON Schema Contract:
```json
{
"requirement_id": "{RF_ID}",
"user_story": "{user_story}",
"business_priority": "{business_priority}",
"report_path_agent_bdd_validation": ["agents/bdd-validation-analyst-agent/outputs/bdd_validation_{RF_ID}_{timestamp}.md"],
"report_path_agent_risk_evaluator": [
"agents/risk-evaluator-qa-strategy-agent/outputs/risk-evaluator-qa-strategies/risk_evaluator_qa_strategy_{RF_ID}_{timestamp}.md",
"agents/risk-evaluator-qa-strategy-agent/outputs/strategy-payloads/strategy_{RF_ID}_{timestamp}.json",
"agents/risk-evaluator-qa-strategy-agent/outputs/history-records/history_{RF_ID}.json",
"agents/risk-evaluator-qa-strategy-agent/skills/risk-evaluator/assets/logs/risk.jsonl",
"agents/risk-evaluator-qa-strategy-agent/skills/risk-evaluator/assets/logs/risk.jsonl"
],
"status": "COMPLETED",
"next_ation": "orchestrator_artifacts_validation"
}
```