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.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- demo/CLAUDE.mdCLAUDE.md
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
- Distinctive: line 9
Before each visual test run, start the Podman machine:
≈ “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.
Files
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 startFirst-time setup (install Podman, init, configure resources) — see
docs/how-to-add-visual-test.md#setup.
Commands
| Task | Command |
| Run visual (Playwright) tests | pnpm run playwright:docker (in demo/) |
| Run specific test | pnpm run playwright:docker --grep 'Test name' |
| Update all snapshots | pnpm run playwright:docker:update |
| Update specific snapshot | pnpm run playwright:docker:update --grep 'Test name' |
| Update only failed snapshots | pnpm run playwright:docker:update --last-failed |
| Clear test cache | pnpm run playwright:docker:clear |
| Show test report | pnpm run playwright:docker:report |
| Run from root | nx 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:watchplaywright: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(), withoutforloops. The test name carries the tag of the mode it checks,@wysiwygor@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/editorhas its class indemo/tests/playwright/core/editor.ts; a block of an extension package has its class and fixture indemo/tests/playwright/core/extensions/<block>.ts.
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
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.

