agentleFS
gravity-uigravity-ui/markdown-editor/demo/AGENTS.md

markdown-editor / demo

AGENTS.md428 starsChanged 2 years agoMITView on GitHub

Visual (Playwright) tests of all packages live here. The root AGENTS.md applies as well. Always run visual tests in Docker. Never run them locally. Before each visual test run, start the Podman machine: First-time setup (install Podman, init, configure resources) — see docs/how-to-add-visual-test.md#setup. For more details on filtering and updating snapshots see docs/how-to-add-visual-test.md. These run visual tests outside Docker and produce unreliable results.

  • 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 33,315 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 repository3 other files it gives its agents.

The file

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

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before each visual test run, start the Podman machine:

    line 9

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

AGENTS.md — demo

Visual (Playwright) tests of all packages live here. The root AGENTS.md applies as well.

Always run visual tests in Docker. Never run them locally.

Prerequisites

Before each visual test run, start the Podman machine:

podman machine start

First-time setup (install Podman, init, configure resources) — see docs/how-to-add-visual-test.md#setup.

Commands

TaskCommand
Run visual (Playwright) testspnpm run playwright:docker (in demo/)
Run specific testpnpm run playwright:docker --grep 'Test name'
Update all snapshotspnpm run playwright:docker:update
Update specific snapshotpnpm run playwright:docker:update --grep 'Test name'
Update only failed snapshotspnpm run playwright:docker:update --last-failed
Clear test cachepnpm run playwright:docker:clear
Show test reportpnpm run playwright:docker:report
Run from rootnx playwright:docker @markdown-editor/demo

For more details on filtering and updating snapshots see docs/how-to-add-visual-test.md.

Never use

  • playwright (local)
  • playwright:watch
  • playwright:headed

These run visual tests outside Docker and produce unreliable results.

Screenshots

  • A screenshot of editor content includes the toolbar.
  • The viewport width and height fit the content, without empty space around it.
  • A popup is captured in the real editor, in the test that opens it. A popup component mounted on its own misses changes in how the editor renders it.
  • Each mode gets its own test(), without for loops. The test name carries the tag of the mode it checks, @wysiwyg or @markup; a test that switches modes carries both. The tag is part of the screenshot file name, so renaming a test renames its screenshots.
  • Locators and actions for a block live in its class, not in the test file. A block of packages/editor has its class in demo/tests/playwright/core/editor.ts; a block of an extension package has its class and fixture in demo/tests/playwright/core/extensions/<block>.ts.

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.