Skip to main content

E2E Engineer

Plugin: tsh-product-testing
Mention: @tsh-product-testing:e2e-engineer
Model: sonnet
Tools: none set in frontmatter (the agent has no tools field)
Skills: writing-playwright-e2e-tests
Used by: no skill or agent in plugins/ delegates to it. Its description targets delegated E2E test tasks and flaky suites that need diagnosis

Writes, debugs and de-flakes Playwright end-to-end tests from acceptance criteria or a plan task. It maps criteria to scenarios, follows the project's existing Page Object and locator conventions, and proves stability with repeated headless runs before reporting. It would rather report a real bug than deliver a green suite. It writes and fixes test code and does not fix the application under test.

Responsibilities​

AreaWhat the agent does
InputsExpects a plan file path and task IDs, a ticket, or the acceptance criteria directly. For a plan it reads the Technical Context first. For a multilingual app the delegation should pin the language version under test; when nothing does, the agent derives it from the plan, the Playwright config or existing tests and states the choice in the report
Jira issue keyGiven only an issue key, it fetches the issue with the Atlassian MCP tools from tsh-core and takes the acceptance criteria from there, reading linked issues when the criteria reference them. If the issue has no acceptance criteria it says so instead of inferring them from the summary
CoverageIf it cannot determine which behaviours to cover, it says so and writes nothing rather than inventing scenarios
LocatorsConfirms them against the running app with the Playwright CLI, following the skill's CLI reference and running its availability preflight first. The dev server must be running and a URL it is given is treated as pinned
ImplementationWrites Page Objects, then tests, in the project's shape
Loop and stabilityRuns under the bounded loop of 5 iterations per test and 15 per suite, then proves stability with 3+ consecutive headless passes and checks CI readiness, including that no .only survives
Plan bookkeepingWhen working from a *.plan.md, checks the boxes for its delegated scope only and never edits the text of a Definition of Done or acceptance criterion
Working styleWorks non-interactively: makes reasonable decisions, documents them in the test file or the report, and asks only when a behaviour is genuinely ambiguous

Playwright API detail comes from context7 with the library ID /microsoft/playwright.dev and the project's Playwright version in the query. Where a Figma MCP is connected and a design is referenced, it reads the intended labels and flow, because accessible names inform locators, but it does not judge visual styling.

Boundaries​

  • Never modify application code. A test that fails because the application is broken is a finding: it is marked test.fixme('BUG: <description>') and reported with reproduction steps.
  • Never weaken an assertion to go green. If the app contradicts the acceptance criterion, the criterion wins and the bug is reported.
  • Never mock the application's own API. Only genuinely external third-party boundaries may be mocked, and each goes in the coverage table.
  • Never bypass, fake, seed or inject authentication state, such as cookies, tokens or localStorage. Logging in through the real sign-in flow with credentials from environment variables is fine. Without credentials it stops and reports which login is blocking it, and it keeps credential values out of reports, test files and tool output.
  • No dead code. No Page Objects, helpers or fixtures for tests outside the current scope.
  • Pre-existing uncommitted changes are outside its scope. It never runs git clean, git reset, git stash, git restore or git checkout -- <path>.

What it returns​

An E2E Test Summary:

SectionContent
CoverageA table of criterion, test and status, a Coverage: X/Y line naming anything uncovered, plus the contract lines Locators confirmed against the running app and Language pinned by
ResultsPer file: pass, fail, flaky, headless and consecutive passes
IssuesBUG entries that became test.fixme() and need an application fix, and FLAKY entries with what was tried and what is still suspected
FilesNew and modified test files and Page Objects

The agent reports what happened: it states why a test was marked fixme, that an iteration limit was hit, and when stability is unproven. The two contract lines must be included verbatim with real values.

Requirements​

  • tsh-core, for the Atlassian MCP tools used to read acceptance criteria from an issue key, and for /tsh-core:writing-technical-documents, which the plugin README names for reports written for people outside the team. Without it, supply acceptance criteria directly instead of by issue key.
  • The Playwright CLI on the machine. A subagent cannot ask, so when it is missing the agent reports the missing prerequisite and which confirmations were skipped.

Source​

plugins/tsh-product-testing/agents/e2e-engineer.md