monofield / e2e
AGENTS.md4 starsChanged 6 months agoApache-2.0View on GitHub
Follow the root AGENTS.md first. This package owns user-level end-to-end smoke tests and Playwright UI automation only. For the current coverage posture, recent hardening work, grouped-run status, and known intentional gaps, see docs/testing/e2e-coverage/status.md.
- Reads credentials
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,773 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 repository168 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apps/AGENTS.mdAGENTS.md
- design-templates/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- plugins/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- od-contributeSkill
- 8-bit-orbit-video-templateSkill
- ad-creativeSkill
- after-hours-editorial-templateSkill
- agent-browserSkill
- ai-music-albumSkill
- algorithmic-artSkill
- apple-higSkill
- article-magazineSkill
- artifacts-builderSkill
- brainstormingSkill
- brand-extractSkill
- brand-guidelinesSkill
- brandkitSkill
- industrial-brutalist-uiSkill
- canvas-designSkill
- card-twitterSkill
- card-xiaohongshuSkill
- color-expertSkill
- competitive-ads-extractorSkill
- copywritingSkill
- creative-directorSkill
- d3-visualizationSkill
- data-reportSkill
- deck-guizang-editorialSkill
- deck-open-slide-canvasSkill
- deck-swiss-internationalSkill
- design-briefSkill
- design-consultationSkill
- design-mdSkill
- design-reviewSkill
- digits-fintech-swiss-templateSkill
- doc-kami-parchmentSkill
- docSkill
- docxSkill
- domain-name-brainstormerSkill
- ecommerce-image-workflowSkill
- editorial-burgundy-principles-templateSkill
- emilkowalski-motionSkill
- enhance-promptSkill
- export-download-debuggingSkill
- fal-3dSkill
- fal-generateSkill
- fal-image-editSkill
- fal-kling-o3Skill
- fal-lip-syncSkill
- fal-realtimeSkill
- fal-restoreSkill
- fal-trainSkill
- fal-tryonSkill
- fal-upscaleSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
Follow the root AGENTS.md first.
- Very specific: line 28
Start from specs/: define orthogonal long-form core capabilities first, then let supporting tests/ and lib/ grow from those chains.
- Very specific: line 32
Treat tests/ as maintainable support material, not permanent coverage inventory.
- Distinctive: line 33
Keep new non-UI e2e smoke chains pure inspect by default.
- Distinctive: line 35
Every atomic suite must run in an isolated namespace.
- Very specific: line 40
Prefer directory hierarchy over long file names.
- Distinctive: line 50
Run commands from this directory:
- Distinctive: line 67
Use a specific file path when validating a single case.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
e2e/AGENTS.md
Follow the root AGENTS.md first. This package owns user-level end-to-end smoke tests and Playwright UI automation only.
For the current coverage posture, recent hardening work, grouped-run status, and known intentional gaps, see docs/testing/e2e-coverage/status.md.
Directory layout
specs/: highest-ROI, long-running core business capability regressions suitable for PR or release gating. Each spec should describe one nearly orthogonal product capability chain, such as main dialog generation, Pet, Orbit, or packaged runtime. Keep this layer small and expand it only when a core capability deserves always-on signal.tests/: broader user-level end-to-end coverage and local hotspot checks that intentionally span app/package/resource boundaries. Prefer adding tests here when a repeated or high-risk local capability naturally falls out of a core spec. Do not build a speculative coverage matrix before the core spec needs it.ui/: flat Playwright UI automation test files only. Keep helpers, resources, and non-Playwright harnesses out of this directory.resources/: declarative resources for e2e suites, such as Playwright UI scenario lists.lib/fake-agents.ts: shared fake local agent CLI harness used by UI and pure-inspect daemon specs.lib/timeouts.ts: CI-scaled timeout constants (T.short,T.medium,T.long,T.xlong). Import as{ T }from@/timeouts. Use these instead of hardcoded millisecond values in UI tests.lib/tools-dev/: framework-neutral tools-dev runtime lifecycle. It owns namespace/path construction, port reservation,tools-dev ... --jsonexecution, status/log/check reads, URL construction, and start/stop semantics. It must not import Vitest or Playwright.lib/playwright/suite.ts: Playwright-only suite assembly. It provides the worker-scoped tools-dev fixture, dynamicbaseURL, and failure attachments. UI tests importtest/expectfrom@/playwright/suite.lib/vitest/suite.ts: Vitest-only suite assembly. It composes the neutral tools-dev runtime with report creation, scratch preservation, and Vitest assertions for non-UI smoke suites.lib/playwright/mock-factory.ts: shared Playwright mock helpers.applyStandardMocks(page)seeds localStorage and intercepts/api/agentsand/api/app-configwith standard daemon/mock-agent fixtures. Use inbeforeEachfor tests that do not need a custom agent or protocol setup.lib/vitest/: Vitest-specific atomic helpers only. Helpers describe actions such as mock servers, HTTP calls, and reports; tools-dev lifecycle belongs inlib/tools-dev/and is only composed throughlib/vitest/suite.ts.lib/vitest/report.ts: the report boundary. Specs save curated output throughreport.save(<relpath>, <blob>)orreport.json(<relpath>, value); release workflows should consume only the final report path, not its internal file layout.createSmokeSuite(...).with.*: suite-owned lifecycle composition from@/vitest/suite. Prefer this shape for namespace-bound resources such assuite.with.toolsDev(...)so specs keep business workflow code in the foreground.- Temporary e2e Vitest env/PATH mutations, AMR fake endpoint URLs, and packaged smoke default namespaces belong behind
@/vitest/suitehelpers such assuite.with.env(...),suite.with.pathEntry(...),suite.amr, andresolvePackagedSmokeNamespace(...). Do not hand-roll save/restore blocks or fixed localhost ports in individual specs. lib/playwright/: Playwright-specific fixtures, resource accessors, route helpers, and UI actions.scripts/playwright.ts: Playwright auxiliary subcommands such as artifact cleanup; it must not wrapplaywright test.
Spec and test model
- Start from
specs/: define orthogonal long-form core capabilities first, then let supportingtests/andlib/grow from those chains. specs/should read as business/system workflows, for exampledialog/main.spec.ts,orbit/run.spec.ts, orpet/main.spec.ts.tests/should pin reusable local hotspots, such astools-dev/inspect.test.ts, provider mocks, report lifecycle, artifact file shape, or namespace cleanup.- High-confidence infrastructure checks may be added to
tests/before a full core spec exists, but most tests should be extracted only after a spec proves the local hotspot matters. - Treat
tests/as maintainable support material, not permanent coverage inventory. Merge, split, shrink, or delete tests as product capabilities evolve. - Keep new non-UI e2e smoke chains pure inspect by default. Do not use Playwright for these chains; use daemon/web APIs, sidecar IPC, tools-dev/tools-pack inspect, logs, reports, and screenshots when available.
- External service dependencies must use temporary server-level mocks. Do not rely on real API keys, real provider accounts, or UI-level route patching for core e2e smoke.
- Every atomic suite must run in an isolated namespace. Successful suites should keep only curated reports and high-value artifacts, then clean process/runtime scratch. Failed suites should preserve runtime scratch, logs, mock requests, screenshots, and report pointers for diagnosis.
Naming and tools
specs/files must be*.spec.ts;tests/files must be*.test.ts.- Prefer directory hierarchy over long file names. Basenames should normally be three words or fewer, such as
main.spec.ts,run.spec.ts,inspect.test.ts, orreport.test.ts. ui/files must be flat*.test.tsPlaywright tests. Do not add subdirectories, TSX, Vitest, jsdom, Testing Library, or React harness tests underui/.ui/tests must import runtime-boundtest/expectfrom@/playwright/suite; use@playwright/testonly for type imports or low-level helper modules that do not own test lifecycle.- E2E Vitest tests use Node APIs; do not add JSX/TSX, jsdom, or browser-component tests under
specs/ortests/. - Web component/runtime tests belong in
apps/web/tests/, note2e/ui/. - E2E tests may validate cross-app/resource consistency, but must not treat one app's private implementation as a shared helper for another app. Keep test-only helpers local to
e2e/lib/or promote reusable logic to a pure package such aspackages/contracts. - E2E imports may use
@/*forlib/*; keep this alias local to the e2e package.
Commands
Run commands from this directory:
pnpm test specs/mac.spec.ts
pnpm test tests/tools-dev/inspect.test.ts
pnpm test specs
pnpm test tests
pnpm test:p0
pnpm test:p0p1
pnpm test:ui:p0
pnpm test:ui:p0p1
pnpm typecheck
pnpm exec tsx scripts/playwright.ts clean
pnpm exec playwright test -c playwright.config.ts --list
pnpm exec playwright test -c playwright.config.tsUse a specific file path when validating a single case. Do not add root e2e aliases or extra package scripts for individual cases.
Case-level priority tags use test-name prefixes: [P0], [P1], [P2].
Playwright UI runs use one tools-dev daemon/web/data root per Playwright worker. The single-worker fallback is --workers=1 (or OD_PLAYWRIGHT_WORKERS=1); do not reintroduce a shared daemon/web runtime mode.
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.

