name: autospec-playwright description: Use when you want to run disciplined no-mock Playwright UI-test authoring (Stage 2A) for a project. Detects the .autospec/test.yml authoring blocks, invokes autospec-test Stage 2A, and prints the coverage report.
autospec-playwright — Disciplined Playwright Authoring Dispatcher
Thin dispatcher for the autospec-test Stage 2A disciplined-authoring pipeline.
Reads .autospec/test.yml authoring and reset blocks, invokes Stage 2A, and
prints the e2e coverage report from e2e/.autospec/coverage.json. Carries NO
machinery of its own — all logic lives in autospec-test.
Self-update mode
Decide this purely from the request text the harness handed you. Do NOT
shell out (no grep, sed, [[ =~ ]], command substitution, etc.) to
test the user's free-form request — passing it through a shell is what
historically tripped harness permission engines. Read the request, normalize
it in your reasoning (collapse whitespace, trim, lowercase), and if the result is
exactly update, this skill enters self-update mode and does NOT run the
normal pipeline.
- Detect harness by checking which install path exists for this skill:
- Claude Code:
~/.claude/skills/autospec-playwright/SKILL.md - OpenCode:
~/.config/opencode/agent/autospec-playwright.md - Codex CLI:
~/.codex/prompts/autospec-playwright.md
- Claude Code:
- Re-install from
mainby piping the canonical installer:
Run this one-liner once; it refreshes all autospec skills across all harnesses.curl -fsSL https://raw.githubusercontent.com/berlinguyinca/autospec/main/bootstrap.sh | bash -s -- --skill all --harness all --update - Show the diff between the prior installed file(s) and the freshly fetched copy.
- Stop. Do not enter any pipeline phase. Print the upgrade summary and return to the user.
If no install path is detected, print Self-update: no installed copy of autospec-playwright found; run install.sh first. and exit.
Model tier
Model tier: TIER_B for all dispatch work (thin dispatcher; no design decisions).
Required capabilities & harness adapter
This workflow assumes a small set of capabilities. Map each one to your harness's actual tool.
| Capability | Claude Code | OpenCode | Codex CLI | Fallback if missing |
|---|---|---|---|---|
| Read-only codebase research | Agent (subagent_type=Explore) |
task agent in read-only mode |
shell grep |
Do the search in-thread |
| Foreground delegation | Agent (subagent_type=general-purpose) |
nested task agent |
spawn nested CLI session | Do the work in-thread |
| Ask the user a question | AskUserQuestion |
inline prompt | inline prompt | Ask in response and wait |
| Subagent model tier | Model tier: TIER_B for all dispatch work |
top task model + medium reasoning | top GPT + reasoning_effort=medium | Honor per-phase tier mapping |
| Subagent dispatch policy | per AGENTS.md decision matrix | per AGENTS.md decision matrix | per AGENTS.md decision matrix | inline with main-session token cost |
Harness detection
Detect your harness by checking available tools before any phase:
Claude Code — the
Agenttool with asubagent_typeparameter is available.TIER_A=opus+ultrathinkTIER_B=sonnet
OpenCode — a
tasktool with model/tier configuration is available (nosubagent_type).TIER_A= top-tier task model + high reasoningTIER_B= smaller-tier task model + medium reasoning
Codex CLI — neither
Agentnor a configurabletasktool is available.TIER_A= current top GPT model +reasoning_effort=highTIER_B=gpt-5.1-codex-spark+reasoning_effort=medium
Fallback rule: If TIER_B is not available (quota, capacity, or authorization failure),
silently retry with TIER_A. Never ask the user.
Invocation
/autospec-playwright [--dry-run]
--dry-run— print what would be done; do not invoke Stage 2A.
Dispatcher flow
Locate config. Read
.autospec/test.ymlvialoadAuthoringConfig()fromskills/autospec-test/scripts/authoring-config.mjs. If the file is missing ore2e.authoring.enabledis false, print:autospec-playwright: e2e.authoring.enabled is false (or .autospec/test.yml missing). Set e2e.authoring.enabled: true to enable Stage 2A authoring.and exit 0.
Invoke Stage 2A. Call
autospec-testStage 2A — disciplined authoring — passing the resolvedspec_dir,helpers_dir,route_clusters,coverage_target_pct, andfanout_maxfrom the authoring config. Stage 2A is owned byskills/autospec-test/scripts/stage2a-orchestrator.mjs; this dispatcher does NOT duplicate any of its logic.Print coverage report. After Stage 2A completes, read
e2e/.autospec/coverage.json(shape:{total, covered, pct}) and print:autospec-playwright coverage: covered=<covered>/<total> (<pct>%)If the file is absent, print
autospec-playwright: coverage.json not found — Stage 2A may not have run.Exit code. Exit 0 on success, 1 on Stage 2A failure.
Out of scope
- Stage 2A machinery (owned by
autospec-testissue #996). - Reset-endpoint generation (owned by
autospec-testissue #997). - Loop classification (owned by
autospec-testissue #998). - Any Playwright spec file authoring directly — this dispatcher wires; it does not author.