Trigger: Use when "run QA", "validate stories", "ui review", "parallel QA". Multi-page story validation with parallel browser agents and pass/fail report.
Workflow
-
DISCOVER — Glob for all story files in STORIES_DIR. Parse each story file to extract name, URL, and ordered workflow steps.
-
SETUP — Create the output directory structure: OUTPUT_DIR/ with per-story subdirs and summary-report.md.
-
SPAWN — For each discovered story, spawn a browser-qa-agent using the Task tool in parallel. The meta-prompt to each sub-agent includes: target URL, output directory, step-by-step instructions to perform the action, take a screenshot, and record PASS or FAIL. Run all story agents in parallel — launch them all in a single message with multiple Task tool calls.
-
COLLECT — After all agents complete, collect their results. Each agent returns overall PASS/FAIL status, step-by-step results, and screenshot file paths.
-
REPORT — Compile all results into a unified report with: date, stories tested, passed count, failed count, per-story results table, failed story details with screenshots.
-
CLEANUP — Confirm all browser sessions are closed. Report the final summary to the user. If any stories failed, suggest next steps.
Key Principles
- Parallel execution — All stories run simultaneously via separate agents
- Meta-prompt engineering — You teach each sub-agent HOW to validate by embedding the story details into a structured prompt
- Fail loudly — Every failure gets detailed reporting with screenshots
- Hands-off — Once spawned, agents work autonomously and report back via task results