
Qcsd Refinement Swarm
- 84 installs
- 433 repo stars
- Updated August 4, 2026
- proffesor-for-testing/agentic-qe
qcsd-refinement-swarm is a Claude Code skill for ai & agent building.
About
qcsd-refinement-swarm is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- qcsd-refinement-swarm
- AI & Agent Building
- AI-coding skill
Qcsd Refinement Swarm by the numbers
- 84 all-time installs (skills.sh)
- +3 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #5,078 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill qcsd-refinement-swarmAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 84 |
|---|---|
| repo stars | ★ 433 |
| Last updated | August 4, 2026 |
| Repository | proffesor-for-testing/agentic-qe ↗ |
How do I helps with ai & agent building tasks.?
Helps with ai & agent building tasks.
Who is it for?
Best when you're working on ai & agent building and need structured help with qcsd refinement swarm.
Skip if: Teams with no ai & agent building needs, or anyone wanting a generic chat assistant without this specific workflow.
When should I use this skill?
When you need to helps with ai & agent building tasks., or when qcsd-refinement-swarm is a claude code skill for ai & agent building.
What you get
Structured output aligned to qcsd-refinement-swarm: qcsd-refinement-swarm, AI & Agent Building.
Files
QCSD Refinement Swarm v1.0
Shift-left quality engineering swarm for Sprint Refinement sessions.
---
Overview
The Refinement Swarm takes user stories that passed Ideation and prepares them for Sprint commitment using SFDIPOT product factors, BDD scenarios, and INVEST validation. It renders a READY / CONDITIONAL / NOT-READY decision.
QCSD Phase Positioning
| Phase | Swarm | Decision | When |
|---|---|---|---|
| Ideation | qcsd-ideation-swarm | GO / CONDITIONAL / NO-GO | PI/Sprint Planning |
| Refinement | qcsd-refinement-swarm | READY / CONDITIONAL / NOT-READY | Sprint Refinement |
| Development | qcsd-development-swarm | SHIP / CONDITIONAL / HOLD | During Sprint |
| Verification | qcsd-cicd-swarm | RELEASE / REMEDIATE / BLOCK | Pre-Release / CI-CD |
| Production | qcsd-production-swarm | HEALTHY / DEGRADED / CRITICAL | Post-Release |
Parameters
STORY_CONTENT: User story with acceptance criteria (required)OUTPUT_FOLDER: Where to save reports (default:${PROJECT_ROOT}/Agentic QCSD/refinement/)
---
ENFORCEMENT RULES - READ FIRST
| Rule | Enforcement |
|---|---|
| E1 | MUST spawn ALL THREE core agents in Step 2. |
| E2 | MUST put all parallel Task calls in a SINGLE message. |
| E3 | MUST STOP and WAIT after each batch. |
| E4 | MUST spawn conditional agents if flags are TRUE. |
| E5 | MUST apply READY/CONDITIONAL/NOT-READY logic exactly. |
| E6 | MUST generate the full report structure. |
| E7 | Each agent MUST read its reference files before analysis. |
| E8 | MUST apply qe-test-idea-rewriter transformation in Step 8. |
| E9 | MUST execute Step 7 learning persistence. |
---
Step Execution Protocol
Execute steps sequentially by reading each step file with the Read tool.
Steps
1. Flag Detection -- steps/01-flag-detection.md -- Analyze story content, evaluate all 7 flags 2. Core Agents -- steps/02-core-agents.md -- Spawn qe-product-factors-assessor, qe-bdd-generator, qe-requirements-validator 3. Batch 1 Results -- steps/03-batch1-results.md -- Wait and extract metrics 4. Conditional Agents -- steps/04-conditional-agents.md -- Spawn flagged agents 5. Decision Synthesis -- steps/05-decision-synthesis.md -- Apply READY/CONDITIONAL/NOT-READY logic 6. Report Generation -- steps/06-report-generation.md -- Generate refinement report 7. Learning Persistence -- steps/07-learning-persistence.md -- Store findings to memory 8. Transformation -- steps/08-transformation.md -- Run test idea rewriter on all test ideas 9. Final Output -- steps/09-final-output.md -- Display completion summary
Execution Instructions
1. Use the Read tool to load the current step file 2. Execute the step's instructions completely 3. Verify all success criteria are met 4. Pass output as context to next step 5. If a step fails, halt and report
Resume Support
To resume from a specific step: specify --from-step N.
---
Agent Inventory
| Agent | Type | Domain | Batch |
|---|---|---|---|
| qe-product-factors-assessor | Core | requirements-validation | 1 |
| qe-bdd-generator | Core | requirements-validation | 1 |
| qe-requirements-validator | Core | requirements-validation | 1 |
| qe-contract-validator | Conditional (HAS_API) | contract-testing | 2 |
| qe-impact-analyzer | Conditional (HAS_REFACTORING) | code-intelligence | 2 |
| qe-dependency-mapper | Conditional (HAS_DEPENDENCIES) | code-intelligence | 2 |
| qe-middleware-validator | Conditional (HAS_MIDDLEWARE) | enterprise-integration | 2 |
| qe-odata-contract-tester | Conditional (HAS_SAP_INTEGRATION) | enterprise-integration | 2 |
| qe-sod-analyzer | Conditional (HAS_AUTHORIZATION) | enterprise-integration | 2 |
| qe-test-idea-rewriter | Transformation (always) | test-generation | 3 |
Total: 10 agents (3 core + 6 conditional + 1 transformation)
---
Key Principle
Refinement quality determines sprint success. This swarm ensures stories are testable, complete, and ready for development commitment.
skill: qcsd-refinement-swarm
version: 1.0.0
description: >
Evaluation suite for QCSD refinement swarm orchestration.
Tests SFDIPOT product factor analysis, BDD generation, agent coordination, and cross-domain analysis.
models_to_test:
- claude-sonnet-4-6 # Primary (high accuracy expected)
- claude-haiku-4-5 # Fast model (minimum quality floor)
mcp_integration:
enabled: true
namespace: skill-validation
query_patterns: true
track_outcomes: true
store_patterns: true
target_agents:
- qe-learning-coordinator
- qe-queen-coordinator
learning:
store_success_patterns: true
pattern_ttl_days: 90
result_format:
json_output: true
include_timing: true
include_token_usage: true
setup:
required_tools:
- jq
test_cases:
- id: tc001_sfdipot_analysis
description: "Perform SFDIPOT product factor analysis"
category: sfdipot
priority: critical
input:
story_description: "Build user authentication system with OAuth2"
project_type: "web_application"
expected_output:
must_contain:
- "structure"
- "function"
- "data"
validation:
schema_check: true
keyword_match_threshold: 0.8
- id: tc002_bdd_generation
description: "Generate BDD scenarios from story"
category: bdd
priority: critical
input:
story: "Payment processing system"
has_security: true
has_api: true
expected_output:
must_contain:
- "Given"
- "When"
- "Then"
validation:
schema_check: true
- id: tc003_domain_flag_detection
description: "Detect HAS_API, HAS_REFACTORING, HAS_DEPENDENCIES flags"
category: flags
priority: high
input:
content: "Refactor the REST API endpoint to decouple the upstream dependency"
analyze_flags: true
expected_output:
must_contain:
- "HAS_API"
- "HAS_REFACTORING"
- "HAS_DEPENDENCIES"
validation:
schema_check: true
- id: tc004_agent_coordination
description: "Coordinate multi-agent refinement swarm execution"
category: orchestration
priority: high
input:
domain_flags:
HAS_API: true
HAS_REFACTORING: true
HAS_DEPENDENCIES: false
expected_output:
must_contain:
- "agent"
- "coordinate"
validation:
schema_check: true
- id: tc005_comprehensive_analysis
description: "Execute comprehensive QCSD refinement analysis"
category: analysis
priority: medium
input:
story: "Mobile app with payment integration and user profiles"
include_all_domains: true
expected_output:
must_contain:
- "analysis"
- "domain"
validation:
schema_check: true
success_criteria:
pass_rate: 0.9
critical_pass_rate: 1.0
avg_reasoning_quality: 0.75
max_execution_time_ms: 300000
metadata:
author: "qe-qcsd-orchestrator"
created: "2026-02-02"
coverage_target: >
QCSD refinement swarm with 5 test cases covering SFDIPOT analysis,
BDD generation, domain flag detection, agent coordination, and comprehensive analysis.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://agentic-qe.dev/schemas/qcsd-refinement-swarm-output.json",
"title": "QCSD Refinement Swarm Output Schema",
"description": "Schema for QCSD refinement swarm output. Includes SFDIPOT analysis, BDD scenarios, requirements validation, and multi-agent reports.",
"type": "object",
"required": ["skillName", "version", "timestamp", "status", "trustTier", "output"],
"properties": {
"skillName": {
"type": "string",
"const": "qcsd-refinement-swarm",
"description": "Must be 'qcsd-refinement-swarm'"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9]+)?$"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"enum": ["success", "partial", "failed", "skipped"]
},
"trustTier": {
"type": "integer",
"const": 3
},
"output": {
"type": "object",
"required": ["summary", "sfdipotFactors", "bddScenarios", "requirements", "testIdeas"],
"properties": {
"summary": {
"type": "string",
"minLength": 100,
"maxLength": 3000
},
"recommendation": {
"type": "string",
"enum": ["READY", "CONDITIONAL", "NOT-READY"],
"description": "Overall refinement recommendation"
},
"sfdipotFactors": {
"$ref": "#/$defs/sfdipotAnalysis"
},
"bddScenarios": {
"$ref": "#/$defs/bddScenariosCollection"
},
"requirements": {
"$ref": "#/$defs/requirementsValidation"
},
"testIdeas": {
"$ref": "#/$defs/testIdeasCollection"
},
"agentReports": {
"$ref": "#/$defs/agentReports"
},
"flagDetection": {
"$ref": "#/$defs/flagDetection"
},
"conditionalAnalysis": {
"$ref": "#/$defs/conditionalAnalysis"
},
"executiveSummary": {
"$ref": "#/$defs/executiveSummary"
},
"artifacts": {
"type": "array",
"items": {
"$ref": "#/$defs/artifact"
},
"maxItems": 20
}
}
},
"metadata": {
"$ref": "#/$defs/metadata"
},
"validation": {
"$ref": "#/$defs/validationResult"
},
"learning": {
"$ref": "#/$defs/learningData"
}
},
"$defs": {
"sfdipotAnalysis": {
"type": "object",
"required": ["factors"],
"properties": {
"sfdipotVersion": {
"type": "string",
"default": "1.0"
},
"factors": {
"type": "array",
"items": {
"$ref": "#/$defs/sfdipotFactor"
},
"minItems": 5,
"maxItems": 7,
"description": "SFDIPOT heuristic factors analyzed"
},
"overallScore": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"clarifyingQuestions": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"sfdipotFactor": {
"type": "object",
"required": ["name", "priority"],
"properties": {
"name": {
"type": "string",
"enum": ["Structure", "Function", "Data", "Interfaces", "Platform", "Operations", "Time"]
},
"priority": {
"type": "string",
"enum": ["P0", "P1", "P2", "P3"]
},
"weight": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"relevanceScore": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"subcategories": {
"type": "array",
"items": {
"$ref": "#/$defs/subcategoryItem"
}
},
"testIdeas": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subcategoryItem": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"relevance": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"testIdeas": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"bddScenariosCollection": {
"type": "object",
"required": ["features"],
"properties": {
"totalScenarios": {
"type": "integer",
"minimum": 0
},
"features": {
"type": "array",
"items": {
"$ref": "#/$defs/bddFeature"
},
"minItems": 1,
"maxItems": 20
},
"coverage": {
"type": "object",
"properties": {
"happyPath": {
"type": "integer",
"minimum": 0
},
"errorPath": {
"type": "integer",
"minimum": 0
},
"boundary": {
"type": "integer",
"minimum": 0
},
"security": {
"type": "integer",
"minimum": 0
}
}
}
}
},
"bddFeature": {
"type": "object",
"required": ["name", "scenarios"],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"scenarios": {
"type": "array",
"items": {
"$ref": "#/$defs/bddScenario"
},
"minItems": 1,
"maxItems": 50
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"bddScenario": {
"type": "object",
"required": ["name", "given", "when", "then"],
"properties": {
"name": {
"type": "string",
"minLength": 5
},
"given": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"when": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"then": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"examples": {
"type": "array",
"items": {
"type": "object"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"enum": ["happy_path", "error", "boundary", "security"]
}
}
},
"requirementsValidation": {
"type": "object",
"required": ["investScore"],
"properties": {
"investScore": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"completeness": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"gaps": {
"type": "array",
"items": {
"type": "string"
}
},
"valid": {
"type": "boolean"
},
"criteria": {
"type": "array",
"items": {
"$ref": "#/$defs/investCriterion"
}
}
}
},
"investCriterion": {
"type": "object",
"properties": {
"name": {
"type": "string",
"enum": ["Independent", "Negotiable", "Valuable", "Estimable", "Small", "Testable"]
},
"score": {
"type": "integer",
"minimum": 0,
"maximum": 10
},
"evidence": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"testIdeasCollection": {
"type": "object",
"required": ["ideas"],
"properties": {
"total": {
"type": "integer",
"minimum": 0
},
"ideas": {
"type": "array",
"items": {
"$ref": "#/$defs/testIdea"
},
"minItems": 5,
"maxItems": 100
},
"byCategory": {
"type": "object",
"properties": {
"functional": {
"type": "integer"
},
"nonfunctional": {
"type": "integer"
},
"exploratory": {
"type": "integer"
},
"regression": {
"type": "integer"
}
}
}
}
},
"testIdea": {
"type": "object",
"required": ["id", "title", "type"],
"properties": {
"id": {
"type": "string",
"pattern": "^TI-\\d{3}$"
},
"title": {
"type": "string",
"minLength": 10
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["functional", "nonfunctional", "exploratory", "regression", "security", "accessibility", "performance"]
},
"priority": {
"type": "string",
"enum": ["critical", "high", "medium", "low"]
},
"linkedRisks": {
"type": "array",
"items": {
"type": "string"
}
},
"linkedCriteria": {
"type": "array",
"items": {
"type": "string"
}
},
"automation": {
"type": "string",
"enum": ["automated", "manual", "hybrid"]
}
}
},
"agentReports": {
"type": "object",
"required": ["coreAgents"],
"properties": {
"coreAgents": {
"type": "array",
"items": {
"$ref": "#/$defs/agentReport"
},
"minItems": 3,
"maxItems": 3,
"description": "Must have exactly 3 core agents"
},
"conditionalAgents": {
"type": "array",
"items": {
"$ref": "#/$defs/agentReport"
},
"maxItems": 3
},
"transformationAgents": {
"type": "array",
"items": {
"$ref": "#/$defs/agentReport"
},
"maxItems": 1
},
"totalAgents": {
"type": "integer",
"minimum": 3,
"maximum": 7
}
}
},
"agentReport": {
"type": "object",
"required": ["agentId", "domain", "status"],
"properties": {
"agentId": {
"type": "string",
"pattern": "^qe-[a-z][a-z0-9-]*$"
},
"domain": {
"type": "string",
"enum": [
"requirements-validation", "contract-testing", "code-intelligence", "test-generation"
]
},
"status": {
"type": "string",
"enum": ["completed", "partial", "failed", "skipped"]
},
"reportPath": {
"type": "string"
},
"executionTimeMs": {
"type": "integer",
"minimum": 0
},
"findingsCount": {
"type": "integer",
"minimum": 0
}
}
},
"flagDetection": {
"type": "object",
"required": ["HAS_API", "HAS_REFACTORING", "HAS_DEPENDENCIES", "HAS_SECURITY"],
"properties": {
"HAS_API": {
"type": "boolean"
},
"HAS_REFACTORING": {
"type": "boolean"
},
"HAS_DEPENDENCIES": {
"type": "boolean"
},
"HAS_SECURITY": {
"type": "boolean"
},
"evidence": {
"type": "object",
"properties": {
"api": {
"type": "array",
"items": {
"type": "string"
}
},
"refactoring": {
"type": "array",
"items": {
"type": "string"
}
},
"dependencies": {
"type": "array",
"items": {
"type": "string"
}
},
"security": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"conditionalAnalysis": {
"type": "object",
"properties": {
"contracts": {
"$ref": "#/$defs/contractValidation"
},
"impact": {
"$ref": "#/$defs/impactAnalysis"
},
"dependencies": {
"$ref": "#/$defs/dependencyAnalysis"
}
}
},
"contractValidation": {
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"breakingChanges": {
"type": "array",
"items": {
"type": "string"
}
},
"recommendations": {
"type": "array",
"items": {
"type": "string"
}
},
"consumerDriven": {
"type": "boolean"
}
}
},
"impactAnalysis": {
"type": "object",
"properties": {
"blastRadius": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"affectedServices": {
"type": "array",
"items": {
"type": "string"
}
},
"testSelection": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"dependencyAnalysis": {
"type": "object",
"properties": {
"couplingScore": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"afferentCoupling": {
"type": "integer",
"minimum": 0
},
"efferentCoupling": {
"type": "integer",
"minimum": 0
},
"instabilityIndex": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"circularDeps": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"executiveSummary": {
"type": "object",
"required": ["recommendation"],
"properties": {
"recommendation": {
"type": "string",
"enum": ["READY", "CONDITIONAL", "NOT-READY"]
},
"rationale": {
"type": "string",
"minLength": 50
},
"metrics": {
"type": "object",
"properties": {
"sfdipotCoverage": {
"type": "integer",
"minimum": 0,
"maximum": 7
},
"bddScenarioCount": {
"type": "integer",
"minimum": 0
},
"investCompleteness": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"criticalGaps": {
"type": "integer",
"minimum": 0
}
}
},
"blockers": {
"type": "array",
"items": {
"type": "string"
}
},
"immediateActions": {
"type": "array",
"items": {
"type": "string"
}
},
"developmentActions": {
"type": "array",
"items": {
"type": "string"
}
},
"preReleaseActions": {
"type": "array",
"items": {
"type": "string"
}
},
"followUpRecommendations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"skill": {
"type": "string"
},
"reason": {
"type": "string"
}
}
}
}
}
},
"artifact": {
"type": "object",
"required": ["type", "path"],
"properties": {
"type": {
"type": "string",
"enum": ["report", "sfdipot-analysis", "bdd-scenarios", "requirements-validation", "test-ideas", "executive-summary"]
},
"path": {
"type": "string",
"maxLength": 500
},
"format": {
"type": "string",
"enum": ["html", "md", "json", "feature"]
},
"description": {
"type": "string"
}
}
},
"metadata": {
"type": "object",
"properties": {
"executionTimeMs": {
"type": "integer",
"minimum": 0
},
"agentId": {
"type": "string",
"pattern": "^qe-[a-z][a-z0-9-]*$"
},
"targetUrl": {
"type": "string"
},
"epicId": {
"type": "string"
},
"storyId": {
"type": "string"
},
"fetchMethod": {
"type": "string",
"enum": ["playwright", "webfetch", "websearch-fallback"]
},
"sourcePhase": {
"type": "string",
"enum": ["refinement", "sprint-planning", "mid-sprint"],
"description": "The SDLC phase that triggered this refinement"
}
}
},
"validationResult": {
"type": "object",
"properties": {
"schemaValid": {
"type": "boolean"
},
"contentValid": {
"type": "boolean"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"learningData": {
"type": "object",
"properties": {
"patternsDetected": {
"type": "array",
"items": {
"type": "string"
}
},
"reward": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"refinementPatterns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pattern": {
"type": "string"
},
"recommendation": {
"type": "string"
},
"outcome": {
"type": "string"
}
}
}
}
}
}
}
}
{
"skillName": "qcsd-refinement-swarm",
"skillVersion": "1.0.0",
"requiredTools": [
"jq"
],
"optionalTools": [],
"schemaPath": "schemas/output.json",
"requiredFields": [
"skillName",
"status",
"output"
],
"requiredNonEmptyFields": [],
"mustContainTerms": [],
"mustNotContainTerms": [],
"enumValidations": {
".status": [
"success",
"partial",
"failed",
"skipped"
]
}
}
Step 1: Analyze Story Content (Flag Detection)
Prerequisites
- Refinement swarm skill invoked
- User story / acceptance criteria provided
- OUTPUT_FOLDER determined
Instructions
MANDATORY: Complete this analysis before Step 2.
Step 0: Retrieve Ideation Phase Signals (Cross-Phase Consumption)
Before analyzing story content, retrieve the most recent Ideation phase signals from memory.
MCP Method (preferred):
aqe memory search --pattern "qcsd-ideation-*" --namespace "qcsd-ideation" --limit 1 --jsonCLI Fallback:
npx --no-install ruflo memory search --query "qcsd-ideation" --namespace qcsd-ideation --limit 1Step 1: Scan Story Content and Detect Flags
Scan the user story, acceptance criteria, and any referenced specifications to SET these flags. Do not skip any flag.
Flag Detection (Check ALL SEVEN)
HAS_API = FALSE
Set TRUE if story mentions ANY of: API, endpoint, REST, GraphQL, gRPC,
webhook, contract, consumer, provider, OpenAPI, Swagger, request/response,
HTTP method, payload, schema, backward compatibility
HAS_REFACTORING = FALSE
Set TRUE if story mentions ANY of: refactor, restructure, rewrite,
migrate, replace, consolidate, extract, decompose, simplify, optimize,
technical debt, legacy, modernize, upgrade
HAS_DEPENDENCIES = FALSE
Set TRUE if story mentions ANY of: dependency, library, package, version,
upgrade, third-party, external service, integration, SDK, plugin,
framework update, breaking change, compatibility
HAS_SECURITY = FALSE
Set TRUE if story mentions ANY of: authentication, authorization, encryption,
token, OAuth, JWT, RBAC, security, vulnerability, OWASP, input validation,
sanitization, XSS, CSRF, injection, secrets, credentials
HAS_MIDDLEWARE = FALSE
Set TRUE if story mentions ANY of: middleware, ESB, message broker, MQ,
Kafka, RabbitMQ, integration bus, API gateway, message queue, pub/sub,
event bus, service bus, ActiveMQ, NATS, Redis Streams
HAS_SAP_INTEGRATION = FALSE
Set TRUE if story mentions ANY of: SAP, OData, RFC, BAPI, IDoc,
S/4HANA, EWM, ECC, ABAP, CDS view, Fiori, SAP Cloud Integration,
SAP PI/PO, SAP Gateway, SAP connector
HAS_AUTHORIZATION = FALSE
Set TRUE if story mentions ANY of: SoD, segregation of duties,
role conflict, authorization object, T-code, user role,
access control matrix, GRC, RBAC policy, permission matrix,
privilege escalation, role assignmentMANDATORY: Output Flag Detection Results
You MUST output flag detection results in a structured format showing each flag value with evidence before proceeding.
Success Criteria
- [ ] Ideation phase signals retrieved (or documented as unavailable)
- [ ] All SEVEN flags evaluated with evidence
- [ ] Flag detection results output
- [ ] Expected agent count calculated (3 core + conditional count + 1 transformation)
Output
Provide: All flag values with evidence, expected agent count, Ideation baseline data.
Navigation
- On success: proceed to Step 2 by reading
steps/02-core-agents.md - On failure: halt and report which flags could not be evaluated
Step 2: Spawn Core Agents (Parallel Batch 1)
Prerequisites
- Step 1 (Flag Detection) completed
- User story content available
- OUTPUT_FOLDER determined
Instructions
CRITICAL: Spawn ALL THREE core agents in ONE message
| Agent | Domain | Role |
|---|---|---|
| qe-product-factors-assessor | requirements-validation | SFDIPOT (7 factors, 37 subcategories) analysis |
| qe-bdd-generator | requirements-validation | BDD Gherkin scenario generation |
| qe-requirements-validator | requirements-validation | INVEST validation and testability scoring |
Agent 1: Product Factors Assessor
Analyze the story using SFDIPOT product factors (Structure, Function, Data, Interface, Platform, Operations, Time). Must read the SFDIPOT reference material first. Save to: ${OUTPUT_FOLDER}/02-product-factors.md
Agent 2: BDD Generator
Generate comprehensive BDD Gherkin scenarios from the story acceptance criteria. Must produce Given/When/Then scenarios covering happy paths, edge cases, and negative cases. Save to: ${OUTPUT_FOLDER}/03-bdd-scenarios.md
Agent 3: Requirements Validator
Validate the story against INVEST criteria (Independent, Negotiable, Valuable, Estimable, Small, Testable). Assess testability scoring and acceptance criteria completeness. Save to: ${OUTPUT_FOLDER}/04-requirements-validation.md
Post-Spawn Confirmation
Tell the user all 3 core agents are running and WAIT.
Success Criteria
- [ ] All THREE agents spawned in ONE message
- [ ] Each agent has complete story content
- [ ] Post-spawn confirmation sent
Output
Confirmation that 3 agents are running in background.
Navigation
- On success: proceed to Step 3 by reading
steps/03-batch1-results.md - On failure: respawn missing agents
Step 3: Wait for Batch 1 & Extract Results
Prerequisites
- Step 2: All 3 core agents spawned
Instructions
WAIT for all three agents to complete. Do NOT proceed early.
Extract from each agent:
From qe-product-factors-assessor:
- SFDIPOT factor scores and priorities
- Key quality risks identified
- Product factor coverage assessment
From qe-bdd-generator:
- Number of BDD scenarios generated
- Coverage of acceptance criteria
- Edge cases and negative scenarios
From qe-requirements-validator:
- INVEST validation score
- Testability score
- Acceptance criteria completeness percentage
- Missing requirements identified
Output Metrics Summary Box with all extracted values.
Success Criteria
- [ ] All three agents returned results
- [ ] All metrics extracted
- [ ] Summary box output with actual values
Output
Complete Batch 1 metrics for use in subsequent steps.
Navigation
- On success: proceed to Step 4 by reading
steps/04-conditional-agents.md - On failure: retry failed agents
Step 4: Spawn Conditional Agents (Parallel Batch 2)
Prerequisites
- Step 3 completed with core metrics
- Flag values from Step 1
Instructions
IF A FLAG IS TRUE, YOU MUST SPAWN THAT AGENT
| Flag | Agent | Domain | Output File |
|---|---|---|---|
| HAS_API | qe-contract-validator | contract-testing | 05-contract-validation.md |
| HAS_REFACTORING | qe-impact-analyzer | code-intelligence | 06-impact-analysis.md |
| HAS_DEPENDENCIES | qe-dependency-mapper | code-intelligence | 07-dependency-analysis.md |
| HAS_SECURITY | (handled by core) | - | - |
| HAS_MIDDLEWARE | qe-middleware-validator | enterprise-integration | 08-middleware-validation.md |
| HAS_SAP_INTEGRATION | qe-odata-contract-tester | enterprise-integration | 09-odata-contracts.md |
| HAS_AUTHORIZATION | qe-sod-analyzer | enterprise-integration | 10-sod-analysis.md |
If ALL flags are FALSE, skip to Step 5.
Otherwise, spawn all applicable agents in ONE message and WAIT for completion.
Success Criteria
- [ ] All flagged agents spawned (or skipped if no flags)
- [ ] Agent count validation passed
- [ ] All conditional agents completed
Output
Conditional agent scores for decision logic.
Navigation
- On success: proceed to Step 5 by reading
steps/05-decision-synthesis.md - On failure: spawn missing agents
Step 5: Synthesize Results & Determine Recommendation
Prerequisites
- Core and conditional agent results available
Instructions
Apply READY/CONDITIONAL/NOT-READY decision logic EXACTLY
Derive metrics from agent outputs and apply the decision tree:
NOT-READY conditions (ANY triggers NOT-READY):
- Testability score < 40%
- INVEST validation fails on 3+ criteria
- Critical SFDIPOT gaps in Structure or Function
- Missing acceptance criteria for core functionality
- Contract validation failures on existing APIs (if applicable)
READY conditions (ALL required for READY):
- Testability score >= 70%
- INVEST validation passes on 5+ criteria
- All SFDIPOT factors assessed with no critical gaps
- BDD scenarios cover all acceptance criteria
- No unresolved blocking issues from conditional agents
Default: CONDITIONAL
Record decision with full metrics and rationale.
If CONDITIONAL, list specific conditions that must be met. If NOT-READY, list specific blockers with remediation steps.
Success Criteria
- [ ] All metrics derived from actual agent outputs
- [ ] Decision logic applied exactly
- [ ] FINAL RECOMMENDATION: READY / CONDITIONAL / NOT-READY
Output
Recommendation, metrics, rationale, and improvement actions.
Navigation
- On success: proceed to Step 6 by reading
steps/06-report-generation.md - On failure: resolve missing metrics
Step 6: Generate Refinement Report
Prerequisites
- Step 5 completed with FINAL RECOMMENDATION
- All agent reports available
Instructions
Generate the complete Refinement Report and save to ${OUTPUT_FOLDER}/01-executive-summary.md.
The report MUST include: 1. Executive Summary with recommendation and key metrics 2. SFDIPOT Product Factors Analysis (from qe-product-factors-assessor) 3. BDD Scenarios (from qe-bdd-generator) 4. Requirements Validation (from qe-requirements-validator) 5. Conditional Analysis sections (for each conditional agent that ran) 6. Recommended Actions (P0/P1/P2 prioritized) 7. Test Strategy Summary
Report Validation Checklist
+-- Executive Summary is complete with all metrics
+-- Recommendation matches decision logic
+-- SFDIPOT section covers all 7 factors
+-- BDD section includes all generated scenarios
+-- Requirements section includes INVEST scores
+-- Conditional sections present for all spawned agents
+-- Actions are specific and actionable
+-- Report saved to output folderSuccess Criteria
- [ ] Complete report with all sections
- [ ] Report saved to correct path
Output
Confirmation that report is saved.
Navigation
- On success: proceed to Step 7 by reading
steps/07-learning-persistence.md - On failure: complete missing sections
Step 7: Store Learnings & Persist State
Prerequisites
- Step 6 completed
- All metrics and flags available
Instructions
ENFORCEMENT: ALWAYS RUN. NOT OPTIONAL.
Store refinement findings to memory for cross-phase feedback:
Step 1: Store to memory
aqe memory store \
--key "qcsd-refinement-${storyId}-${Date.now()}" \
--namespace "qcsd-refinement" \
--value '{...}' \
--jsonStep 2: Share learnings
aqe memory share \
--from "qcsd-refinement-swarm" \
--to "qe-test-idea-rewriter" \
--domain "refinement-test-patterns" \
--content '{...}' --jsonStep 3: Save persistence record
Save to ${OUTPUT_FOLDER}/11-learning-persistence.json with complete metrics, flags, and cross-phase signals.
Fallback: CLI commands if MCP unavailable.
Success Criteria
- [ ] Memory store executed with actual values
- [ ] Learning persistence JSON saved
- [ ] Cross-phase signals documented
Output
Confirmation of persistence.
Navigation
- On success: proceed to Step 8 by reading
steps/08-transformation.md - On failure: retry persistence
Step 8: Apply Test Idea Rewriter (Transformation)
Prerequisites
- Step 7 completed
- BDD scenarios from Step 2 available
- All test ideas collected from all agents
Instructions
ENFORCEMENT: ALWAYS RUN qe-test-idea-rewriter
Spawn qe-test-idea-rewriter to transform ALL test ideas from passive descriptions into active, exploratory test charters.
This agent must: 1. Read all BDD scenarios from qe-bdd-generator output 2. Read all test suggestions from other agents 3. Transform each passive test idea ("Verify X works") into an active charter 4. Apply the Session-Based Test Management (SBTM) charter format 5. Prioritize test ideas by risk and SFDIPOT factor weights
Save output to: ${OUTPUT_FOLDER}/12-rewritten-test-ideas.md
WAIT for the agent to complete.
Success Criteria
- [ ] qe-test-idea-rewriter spawned and completed
- [ ] All test ideas transformed
- [ ] Output saved to correct path
Output
Transformed test ideas for final report.
Navigation
- On success: proceed to Step 9 by reading
steps/09-final-output.md - On failure: retry the transformation agent
Step 9: Final Output & Completion Summary
Prerequisites
- All steps (1-8) completed
Instructions
Display the completion summary:
+---------------------------------------------------------------------+
| QCSD REFINEMENT SWARM COMPLETE |
+---------------------------------------------------------------------+
| |
| Story Assessed: [Story ID/Title] |
| Reports Generated: [count] |
| Output Folder: ${OUTPUT_FOLDER} |
| |
| REFINEMENT SCORES: |
| +-- Testability Score: __% |
| +-- INVEST Score: __/6 |
| +-- SFDIPOT Coverage: __% |
| +-- BDD Scenarios: __ generated |
| +-- Test Ideas Rewritten: __ |
| |
| RECOMMENDATION: [READY / CONDITIONAL / NOT-READY] |
| REASON: [1-2 sentence rationale] |
| |
| DELIVERABLES: |
| +-- 01-executive-summary.md |
| +-- 02-product-factors.md |
| +-- 03-bdd-scenarios.md |
| +-- 04-requirements-validation.md |
| [conditional reports as applicable] |
| +-- 11-learning-persistence.json |
| +-- 12-rewritten-test-ideas.md |
| |
+---------------------------------------------------------------------+Success Criteria
- [ ] Completion summary displayed
- [ ] All deliverables listed
Navigation
- This is the terminal step.
Related skills
FAQ
What does qcsd-refinement-swarm do?
qcsd-refinement-swarm is a Claude Code skill for ai & agent building.
When should I use qcsd-refinement-swarm?
When you need to helps with ai & agent building tasks., or when qcsd-refinement-swarm is a claude code skill for ai & agent building.
What are the main capabilities?
qcsd-refinement-swarm; AI & Agent Building; AI-coding skill.