agentleFS
Lee-DongwookLee-Dongwook/E2E-Self-Heal/AGENTS.md

E2E-Self-Heal

AGENTS.md9 starsChanged 5 months agoMITView on GitHub

This Python 3.13 CLI package heals broken Playwright E2E selectors. Core code lives in app/: cli.py is the entry point, graph.py wires the LangGraph flow, nodes/ contains repair-loop nodes, preprocess/ extracts context from logs and diffs, verify/ checks selectors, and prompts/ holds LLM prompts. Tests live in tests/ with test_*.py files. Docs are in docs/, CI/action examples are in ci/ and action.yml, and examples/ is a runnable Playwright fixture. Use uv and the Makefile targets: For the demo, run cd…

  • Reads credentials
  • Installs packages
  • 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 32,671 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

4 rules. About 0 are common, 0 are distinctive, and 4 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.

  • 4

    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:

    Use uv and the Makefile targets:

    line 14
  2. Very specific:

    Follow ruff with a 100-character line length and Python 3.13 syntax.

    line 28
  3. Very specific:

    Use pytest; tests are collected only from tests/ per pyproject.toml.

    line 35
  4. Very specific:

    Never commit .env or API keys.

    line 50

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

This Python 3.13 CLI package heals broken Playwright E2E selectors. Core code lives in app/: cli.py is the entry point, graph.py wires the LangGraph flow, nodes/ contains repair-loop nodes, preprocess/ extracts context from logs and diffs, verify/ checks selectors, and prompts/ holds LLM prompts. Tests live in tests/ with test_*.py files. Docs are in docs/, CI/action examples are in ci/ and action.yml, and examples/ is a runnable Playwright fixture.

Build, Test, and Development Commands

Use uv and the Makefile targets:

  • make install installs runtime and dev dependencies with uv sync --extra dev.
  • make lint runs ruff check ..
  • make format applies ruff format ..
  • make typecheck runs pyright.
  • make check runs linting plus type checking.
  • make test runs pytest.
  • make run ARGS="tests/example.spec.ts --log playwright.log" invokes e2e-healer.

For the demo, run cd examples && npm install && npx playwright install chromium.

Coding Style & Naming Conventions

Follow ruff with a 100-character line length and Python 3.13 syntax. Use typed signatures, top-level imports, lowercase_underscore filenames, and Pydantic models or TypedDict for structured data. Use structlog event names with kwargs, not f-string messages. Use rich for CLI output and tenacity for retries.

Testing Guidelines

Use pytest; tests are collected only from tests/ per pyproject.toml. Name files test_<module>.py and test behavior near the module boundary. Add tests for changes to parsing, graph routing, schemas, patching, selector verification, or CLI behavior. Run make test before opening a PR, and run make check for lint and types.

Commit & Pull Request Guidelines

Recent commits use short conventional-style subjects such as fix: ..., feat: ..., docs: ..., ci: ..., and release: .... Keep commits focused and imperative. PRs should describe the change, list verification (make check, make test, demo steps), link issues when available, and include screenshots or logs for visible CLI, CI, or demo behavior.

Security & Agent-Specific Notes

Never commit .env or API keys; use .env.example for configuration names. Preserve the core guardrail: patch generation may fix selectors and wait conditions only, never assertions, test intent, or business logic. Keep repair logic in the CLI core; CI wrappers should only orchestrate calls to e2e-healer. For sandbox boundaries, follow docs/sandbox.md: read logs, diffs, snapshots, and source context; write only the failing test target and known temporary artifacts unless the user explicitly requests broader access.

Codex Workflow

Repository-specific Codex defaults and the short verification checklist live in .codex/. Before making a change, inspect the relevant module and nearby tests. Keep the change scoped, run the smallest relevant test first, then run make check and make test when the environment permits. Report any checks not run and why.

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.