agentleFS
seontechnologiesseontechnologies/playwright-utils/AGENTS.md

playwright-utils

AGENTS.md111 starsChanged 15 months agoApache-2.0View on GitHub

Core TypeScript utilities live in src/, grouped by feature folders such as api-request, intercept-network-call, and log. Build outputs land in dist/; regenerate them via npm run build instead of editing. Docs stay in docs/, and Playwright specs, fixtures, and config live in playwright/. The sample-app/{backend,frontend} workspace powers demo flows, scripts/ holds automation helpers, and transient outputs (playwright-report/, test-results/, har-files/) should remain untracked. Source targets Node 18+, so use 2-space indentation, trailing commas, and ES module syntax. Prefer named exports and…

  • Reads credentials

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

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Never commit .env values or Playwright storage states.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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

Repository Guidelines

Project Structure & Module Organization

Core TypeScript utilities live in src/, grouped by feature folders such as api-request, intercept-network-call, and log. Build outputs land in dist/; regenerate them via npm run build instead of editing. Docs stay in docs/, and Playwright specs, fixtures, and config live in playwright/. The sample-app/{backend,frontend} workspace powers demo flows, scripts/ holds automation helpers, and transient outputs (playwright-report/, test-results/, har-files/) should remain untracked.

Build, Test, and Development Commands

  • npm run build: clean + emit CJS, ESM, and type outputs into dist/.
  • npm run validate: parallel type-check, lint, unit tests, and formatting to catch regressions fast.
  • npm run test: executes sample-app backend Jest suite and frontend Vitest suite.
  • npm run test:pw / npm run test:pw-ui: run Playwright specs headless or in UI mode against TEST_ENV=local.
  • npm run test:pw:burn-in: repeats flaky suites (PW_BURN_IN=true) before promoting changes.
  • npm run start:sample-app: boots backend + frontend so local playwright runs hit real services.

Coding Style & Naming Conventions

Source targets Node 18+, so use 2-space indentation, trailing commas, and ES module syntax. Prefer named exports and keep file names kebab-case to satisfy eslint-plugin-filenames. Run npm run fix:format (Prettier + ESLint) before pushing, and store fixtures beside their modules (for example src/api-request/fixtures.ts).

Testing Guidelines

Author unit or component tests beside the code they verify, mirroring the *.spec.ts naming pattern in sample-app. Integration flows belong in playwright/tests; tag cases that hit external services and capture HTML reporter output when failures occur. Run npm run validate plus the needed Playwright command before every PR, and use npm run test:pw:burn-in for flaky or high-traffic fixtures.

Commit & Pull Request Guidelines

Use Conventional Commit prefixes (feat:, fix:, docs:, chore:) with subjects ≤72 characters and keep each commit focused. Include updated HAR/log assets whenever behavior shifts. PRs must link an issue, summarize the change, list validation steps, and attach screenshots or console output for UI/test updates; rerun npm run validate after rebases and note any skipped checks.

Security & Configuration Tips

Never commit .env values or Playwright storage states; rely on TEST_ENV and document defaults in docs/. Run setup-playwright-browsers after fresh installs for consistent binaries. Dry-run releases with npm run publish:local before tagging to confirm artifacts and registry scopes.

Download now (ZIP)

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 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 repositoryOne other file it gives its agents.

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.