Test Loop Skill
[!IMPORTANT]
Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile).
Optional args: slug=, ticket=<id/url>, mode=interactive|autonomous|channel, channel=, auto_continue=true|false, profile=business|hybrid|technical.
Instructions
When the user asks to perform this workflow, execute the following steps:
Test Loop Workflow
Goal: Turn approved ACs into an executable, traced E2E suite, and classify any failure as a repair or a real bug instead of leaving it to manual triage.
Steps
- Load scope:
slug, operator_profile (carried, not re-inferred), AC-*, SRS lanes, build/app target, matched testing skills for the target stack.
- Plan:
- Run
specialist-test-planner to produce test_plan_path and selector_gaps
(the specialist's PLAN: becomes this workflow's test_plan_path;
SELECTOR_GAPS: becomes selector_gaps).
- BLOCKED (no stable
AC-* trace) if no stable AC-* trace exists; route to plan-feature/design-solution.
- Prepare selectors (Phase P1, not yet implemented):
- Run
specialist-testid-inserter on selector_gaps; stop for approval when production files change in interactive mode.
- Generate (Phase P1, not yet implemented):
- One scenario per
specialist-integration-test-generator call, seed-first, using the MCP/tool matching the scenario's lane.
- Run and heal (Phase P3, not yet implemented):
- Run once; per failure, run
specialist-test-healer. HEALED requires 3 green reruns. REAL_BUG_DO_NOT_HEAL routes to dev-fix. QUARANTINE_CANDIDATE routes to quality-engineering-flaky-triage with a ticket.
- Handoff:
- Route to
verify-work with the generated suite and any unresolved real_bugs[].
Runtime Contract
- Use after
implement-feature reaches GREEN, or whenever ACs have E2E/mobile lanes without executable coverage.
- Required inputs: slug, stable
AC-* trace, a runnable build/app target.
- Return BLOCKED (no build target or AC trace) only when the build target cannot be established or
AC-* is missing.
Handoff Payload
slug, operator_profile, test_plan_path, generated_tests[], heal_verdicts[], flake_quarantine[], selector_gaps_remaining[], real_bugs[], outcome report, next workflow.
Blocking Questions
- Ask max 3 at a time with a recommended default and 2-3 options.
Output Template
# Test Loop Report: [Name]
## Scope
## Plan
## Generated Tests
## Heal Verdicts
## Real Bugs Found
## Outcome Report
feature_status: implemented | partially_implemented | blocked
requirement_trace: BRD-OBJ-* -> REQ-* -> AC-* -> SRS-* -> evidence
completed_evidence: []; missing_evidence: []; decision_needed: []; recommended_next_workflow: verify-work | dev-fix
## Next Workflow
verify-work | dev-fix
## Cost Report
Call `get_session_cost(workflow="test-loop")` before final handoff.
1---2name: test-loop3description: Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile).4---5# Test Loop Skill
6
7> [!IMPORTANT]
8> Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile).
9
10Optional args: slug=<feature>, ticket=<id/url>, mode=interactive|autonomous|channel, channel=<id>, auto_continue=true|false, profile=business|hybrid|technical.
11
12## Instructions
13
14When the user asks to perform this workflow, execute the following steps:
15
16
17# Test Loop Workflow
18
19Goal: Turn approved ACs into an executable, traced E2E suite, and classify any failure as a repair or a real bug instead of leaving it to manual triage.
20
21## Steps
221. Load scope:
23 - `slug`, `operator_profile` (carried, not re-inferred), `AC-*`, SRS lanes, build/app target, matched testing skills for the target stack.
242. Plan:
25 - Run `specialist-test-planner` to produce `test_plan_path` and `selector_gaps`
26 (the specialist's `PLAN:` becomes this workflow's `test_plan_path`;
27 `SELECTOR_GAPS:` becomes `selector_gaps`).
28 - BLOCKED (no stable `AC-*` trace) if no stable `AC-*` trace exists; route to `plan-feature`/`design-solution`.
293. Prepare selectors (Phase P1, not yet implemented):
30 - Run `specialist-testid-inserter` on `selector_gaps`; stop for approval when production files change in interactive mode.
314. Generate (Phase P1, not yet implemented):
32 - One scenario per `specialist-integration-test-generator` call, seed-first, using the MCP/tool matching the scenario's lane.
335. Run and heal (Phase P3, not yet implemented):
34 - Run once; per failure, run `specialist-test-healer`. `HEALED` requires 3 green reruns. `REAL_BUG_DO_NOT_HEAL` routes to `dev-fix`. `QUARANTINE_CANDIDATE` routes to `quality-engineering-flaky-triage` with a ticket.
356. Handoff:
36 - Route to `verify-work` with the generated suite and any unresolved `real_bugs[]`.
37
38## Runtime Contract
39- Use after `implement-feature` reaches GREEN, or whenever ACs have E2E/mobile lanes without executable coverage.
40- Required inputs: slug, stable `AC-*` trace, a runnable build/app target.
41- Return BLOCKED (no build target or AC trace) only when the build target cannot be established or `AC-*` is missing.
42## Handoff Payload
43- `slug`, `operator_profile`, `test_plan_path`, `generated_tests[]`, `heal_verdicts[]`, `flake_quarantine[]`, `selector_gaps_remaining[]`, `real_bugs[]`, outcome report, next workflow.
44## Blocking Questions
45- Ask max 3 at a time with a recommended default and 2-3 options.
46## Output Template
47```md
48# Test Loop Report: [Name]
49## Scope
50## Plan
51## Generated Tests
52## Heal Verdicts
53## Real Bugs Found
54## Outcome Report
55feature_status: implemented | partially_implemented | blocked
56requirement_trace: BRD-OBJ-* -> REQ-* -> AC-* -> SRS-* -> evidence
57completed_evidence: []; missing_evidence: []; decision_needed: []; recommended_next_workflow: verify-work | dev-fix
58## Next Workflow
59verify-work | dev-fix
60## Cost Report
61Call `get_session_cost(workflow="test-loop")` before final handoff.
62```
63