agentleFS
ella79ella79/agentic-playwright-suite/docs/agents.md

agentic-playwright-suite

AGENTS.md8 starsChanged 2 months agoMITView on GitHub

.claude/ holds five agents, three skills, two MCP server registrations and the slash commands that connect them. They were used to build and audit this suite, not written as decoration. Planner, generator and healer are generated rather than hand written. npx playwright init-agents --loop=claude produces definitions matched to the installed Playwright version, carrying the exact tool names and call protocol of its authoring MCP server. Each then gains a project rules section, because the official definitions know nothing about this…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,691 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository4 other files it gives its agents.

The file

We split this agents.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Page object first: If a locator it needs does not exist, it goes into the page object before it is used.

    line 61
  2. Very specific:

    Heal: If a case fails, the healer establishes the cause before changing anything, and classifies it: application changed, test raced the …

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

The Agent Workflow

.claude/ holds five agents, three skills, two MCP server registrations and the slash commands that connect them. They were used to build and audit this suite, not written as decoration.

Planner, generator and healer are generated rather than hand written. npx playwright init-agents --loop=claude produces definitions matched to the installed Playwright version, carrying the exact tool names and call protocol of its authoring MCP server. Each then gains a project rules section, because the official definitions know nothing about this codebase: the generator's own example writes page.click(...) directly, which this repository does not allow. Manager and reviewer are hand written, since the official set has no equivalent.

AgentResponsibilitySource
playwright-test-managerScope, the caps, the gates, and the whole cyclehand written
playwright-test-plannerLive exploration, then a written planinit-agents
playwright-test-generatorOne case at a time, from an existing planinit-agents
playwright-test-reviewerRead only convention audithand written
playwright-test-healerRoot cause diagnosis of failuresinit-agents
CommandEffect
/coverageThe manager audits plans against implementations and proposes the next move
/plan <area>The planner explores the live site and writes a plan
/implement <case>The generator implements exactly that case
/review [files]The reviewer audits against the checklist
/heal <case>The healer diagnoses before touching anything
/cycle <area>The manager runs the whole loop
/baseline [case]The manager triages a failing visual case before any baseline changes
/triage [run]The manager separates an infrastructure failure from a test failure

Two MCP servers are registered in .mcp.json. playwright-test (npx playwright run-test-mcp-server) is the authoring server the generated agents use. It reads playwright.config.ts, so an agent inherits the base URL, the data-qa test id attribute and the viewport instead of being told them twice, and it exposes generation tools that a general browser server does not have. @playwright/mcp stays registered for exploration outside test authoring.

Both servers run from pinned local installs rather than npx -y ...@latest. An unpinned launcher resolves and executes a package on every start with no lockfile behind it, which is the documented supply-chain risk for MCP servers, and it also hides version changes from Renovate. @playwright/mcp is a dependency like any other; the authoring server ships inside @playwright/test.

The skills are enforced rather than suggested. Four rules from .claude/skills/playwright-pageobject-testing/SKILL.md, namely no hard waits, no skipped tests, no forced clicks and every test must assert, are configured as ESLint errors scoped to spec files. A violation fails static-checks before any test runs, because a standard that lives only in prose is a standard that erodes.

The Loop

The agents are not five ways to ask for a test. They are one chain, and each link hands the next something narrower than it received.

  1. Explore. The planner opens the application through MCP and reads the accessibility tree, so the locators that end up in code were seen rather than guessed.
  2. Plan. It writes the area's plan into specs/test-plans/, with the cases, the states worth covering, and an explicit list of what it is leaving out.
  3. Implement one case. The generator takes a single case from that plan, walks it in the browser, and writes the spec, whose // spec: header points back at the plan that justifies it.
  4. Page object first. If a locator it needs does not exist, it goes into the page object before it is used. The generated agent's own example writes page.click(...) directly, which is exactly why the project rules section overrides it.
  5. Review. The reviewer audits the result against the coding standard and reports. It cannot edit, so it cannot quietly fix what it should be reporting.
  6. Heal. If a case fails, the healer establishes the cause before changing anything, and classifies it: application changed, test raced the UI, state left by another test, third party noise, or a genuine defect, which is parked with test.fixme() rather than repaired.

The manager runs that chain for one area, decides which area is next, and owns the caps. Its workflows cover the cases a suite actually meets: a coverage request against a full cap, a new functional or visual case, a failing baseline, a red pipeline, an existing case that is wrong, a plan implemented only in part, and a health check. Skills are not chosen by the agents: they are the standards each step is measured against.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.