* docs(core): list @e2e-dev/core in package lists and expand its docs * docs(core): bring ja and zh core pages in line with English
18 KiB
Contributing
Contributions are welcome, no matter how large or small. Bug reports and docs fixes count as much as features.
License and contribution terms
The code is Apache-2.0 (see LICENSE). There is no CLA and
no DCO bot. Section 5 of the license covers contributions: by opening a pull
request you agree that your contribution is licensed under the same
Apache-2.0 terms as the project (inbound = outbound). Only submit work you
have the right to license that way.
Please read the code of conduct before you post.
Security issues go through SECURITY.md, not the issue
tracker.
Issues
- Questions and help requests go to Discord, not issues. Question issues are closed.
- Bug reports need a link to a public repository or sandbox that reproduces the bug, and the steps to run it. Reports without them are closed.
- Feature requests need the proposed API, its upsides, and its downsides.
Pull requests
The changes most likely to be accepted:
- Bug fixes
- Docs fixes
- Engine and platform fixes (a browser, device, or OS that misbehaves)
- Performance improvements
- Community examples: a link to your own example repository on
e2e.com/examples, added to
examples/examples.jsonasexamples/CONTRIBUTING.mddescribes
New features, and changes to the public contract below, need agreement before any code. Open a feature request with the problem and the API you have in mind, and wait for a maintainer to agree before opening a PR. A feature PR nobody agreed to will likely be closed.
If you want to work on an existing issue, comment on it first so nobody else picks it up.
A bot checks every community PR:
- The title is a conventional commit.
fix,chore,test,perf,ci,build, andrevertPRs link an existing issue:Fixes #123under## Issue.feat,docs, andrefactorPRs are exempt.- The description says what changes and why, and
## Verifiedfrom the PR template says how you checked it.
A PR that fails the check gets the needs:compliance label and a comment
listing what to fix. If it is still failing 72 hours later, it is closed.
Once a day, community PRs open for more than a month with fewer than 2
positive reactions (👍 ❤️ 🎉 🚀) and no maintainer approval are closed too.
If one was closed by mistake, say so on the PR.
Keep PRs small, and write the description yourself, briefly. Long AI-generated descriptions may be ignored. If you can't explain the change in a few lines, the PR is probably too big.
The contract
There is no separate spec document. The code is the contract, pinned in three places, and a change to any of them is a contract change:
- The emitted
packages/e2e/dist/index.d.tsanddist/engine/index.d.tsare the public API.packages/e2e/tests/types/sdk-types.tsholds compile-time assertions for the parts that are easy to loosen by accident; it runs undertypecheck. - Wire formats are the JSON Schemas in
packages/e2e/schema/(report, session, agent judgment, agent tool), each with a valid and an invalid fixture. A wire change edits the producer, the schema, and both fixtures in one review. - Security invariants are the list in
SECURITY.mdand the Gotchas section ofAGENTS.md, enforced bytests/integration/agent-policy.test.tsand the secret-ledger unit tests.
Where the docs and the code disagree, the code wins and the docs are a bug. Fix the prose when you find it stale.
Development workflow
This project is a pnpm monorepo. packages/ holds what publishes to npm,
apps/ the private apps and suites that consume the built packages:
packages/core: the published@e2e-dev/corepackage: engines, locators, agent, and replay cache without the test runner, and the engine contractpackages/e2e: the publishede2epackage (SDK, runner, CLI), built on@e2e-dev/corepackages/web: the published@e2e-dev/webbrowser enginepackages/mobile: the published@e2e-dev/mobilemobile enginepackages/decision: the decision-model executor and test filter on the publicStepExecutorandTestFiltercontractspackages/acp: the@e2e-dev/acpexecutor that runs agent steps on a coding agent over ACPapps/testbed: private dogfood suite that consumes the built packagesapps/web-benchmark: private Next.js app of hard-surface scenarios plus the e2e suites written against themapps/mobile-benchmark: private Expo app of hard mobile surfaces plus the e2e suites written against themdocs/: the documentation pagesskills/e2e/: the agent skill shipped with the package and installed bye2e initskills/create-verification-skill/: the generator of a project-localverify-<app>skill, installed withnpx skills add e2e-inc/e2e --skill create-verification-skillskills/migrate-to-e2e/: ports an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite one slice at a time, installed withnpx skills add e2e-inc/e2e --skill migrate-to-e2eplugins/e2e/: the Claude Code, Codex, Cursor, and Devin plugin of the three skills, installed from this repository as a marketplace withclaude plugin marketplace add e2e-inc/e2eorcodex plugin marketplace add e2e-inc/e2e, or copied into~/.cursor/plugins/local/for Cursor, or added in Devin from this repository with the subdirectoryplugins/e2e.dev/skills/: the skills coding agents use to work on this repo, symlinked from.claude/skills/sonpx skills add e2e-inc/e2eoffers onlyskills/*
On Windows, enable Developer Mode and clone with
git clone -c core.symlinks=true so those symlinks check out as links rather
than text files.
Install dependencies from the root:
pnpm install
Build first; nearly everything downstream consumes dist:
pnpm build
Before sending a pull request, make sure the full gate passes:
pnpm check # lint -> check:dead-code -> typecheck -> docs:check
pnpm test # unit + integration
Integration tests need Chromium:
pnpm --filter @e2e-dev/web exec playwright-core install chromium
Docs are part of the change, not a follow-up. A behavior change updates its
page under docs/ in the same review, and skills/e2e/ when the
skill describes that surface.
pnpm docs:check # check the links, anchors, examples, package manager tabs, and logos
A change that claims to be faster, or that touches the runner, the agent
loop, or an engine, gets measured against main on the benchmark suites:
pnpm bench:ab -- tests-agent/control-inventory.e2e.ts --config e2e.agent.config.ts
It prints a markdown table to paste into the PR, and lists first any test
whose behavior changed. AGENTS.md describes the output.
Commit message convention
We follow the conventional commits specification:
fix: bug fixes, e.g. fix a crash when the engine disconnects.feat: new features, e.g. add a new assertion.refactor: code refactor with no behavior change.docs: documentation changes.test: adding or updating tests.chore: tooling changes, e.g. change CI config.
Mark a breaking change with ! after the type (feat(config)!: ...). PRs are
squash-merged, so the PR title is the commit; the
writing-pr skill describes the body,
including the ## Verified section every PR carries. Coding agents open PRs
through the ship-pr skill and babysit
them until the Ready for Human Review label is on; a later push removes it.
Changesets
We use changesets to publish new versions. It handles bumping the version based on semver, writing the changelog, and creating tags and GitHub releases.
If your change affects e2e, @e2e-dev/core, @e2e-dev/web,
@e2e-dev/mobile, @e2e-dev/decision, or @e2e-dev/acp, add a changeset:
pnpm changeset
While a package is 0.x, a feature or fix is a patch. A breaking change
is a minor whose summary opens with **Breaking:**. A release a maintainer
calls (a big launch, 1.0) opens with **Release:** and may be a minor or
major. pnpm check fails on any other 0.x minor or major. e2e init writes
^0.x.y, which on 0.x takes patches only, so features as patches reach
users without a package.json edit.
Changes limited to the apps (testbed, web benchmark, mobile benchmark), docs,
or CI don't need one. Everything under apps/ is private and skipped entirely
(privatePackages: false), so none gets a version bump, a changelog, or a git
tag. Never hand-edit a package version or
CHANGELOG.md; changesets/action owns both.
Releases
The runner publishes to npmjs as e2e; engines and reporters publish under
the @e2e-dev scope. All are public packages: anyone can install them and read
the release on GitHub. After a PR with a changeset lands on main, the release
workflow opens a chore: version packages pull request that applies the
pending changesets. That PR gets no CI of its own (it is opened with
GITHUB_TOKEN), so check main is green before merging it. Merging it checks
peer ranges, builds, publishes the new versions, and creates the matching
GitHub release. A release that published e2e then lists it in the MCP
Registry (mcp-registry.yml); to retry a failed listing, run that workflow
by hand with the version. It also publishes the skills under skills/ to
ClawHub as @e2e/<skill> (clawhub.yml, with the CLAWHUB_TOKEN secret);
retry it the same way with dry-run unchecked (a dispatch only previews by
default), and with the newest version only, since an older tag would
publish older skills. @e2edev/e2e is the
runner's retired name, and the @e2edev scope is the engines' and reporters'
retired scope; both are deprecated on npm.
npm Trusted Publishing
The release workflow carries no npm token. Each package grants release.yml
publish rights through an npm trusted publisher (OIDC). Once the repository
is public, npm also attaches provenance automatically: the "built and signed
on GitHub Actions" badge on npmjs (skipped while the repository is private).
npm has no org-wide setting for this; every package is connected one by one.
The release job must stay on a GitHub-hosted runner: npm rejects OIDC
tokens from self-hosted runners, Blacksmith included.
When adding a new public package:
- Publish the first version by hand from a maintainer machine. Trusted publishers live in package settings on npmjs, so the package has to exist before one can be added.
- On npmjs.com open the package, then Settings, then Trusted Publisher:
- Publisher: GitHub Actions
- Organization:
e2e-inc, Repository:e2e - Workflow filename:
release.yml - Environment name: leave blank
- Allowed actions: check
Allow npm publish. Changesets publishes directly, not through npm's staged flow, so without it the publish is rejected. Leavenpm dist-tagunchecked.
- From then on the release workflow publishes every version. There is no
NPM_TOKENfallback: a package without this connection fails the publish step.
Release channels
latest: the current stable release. Install with no tag.next: release candidates cut frommainahead of alatestrelease. This is the build we ask reporters to confirm a fix against. Install with@next.nightly: a snapshot ofmainpublished by the release workflow every night at 03:00 UTC, and on demand by running the workflow by hand from the Actions tab. A night with nothing new onmainpublishes nothing, and a commit whosespec gateis not green fails the run instead of shipping. Install with@nightly.canary: a build ofmaincut by hand ahead of the next versioned release. Install with@canary. The quickstart installslatest.
Versioned releases publish to latest: the root release script passes no
--tag, and each publishable package carries publishConfig.tag: "latest" as
a backstop for a hand-run npm publish. next is not cut yet.
A nightly is the same snapshot release run from the nightly job in
release.yml, versioned as <next version>-nightly-<datetime> and published
with --tag nightly. A canary is the hand-run form, published from a
maintainer's machine:
GITHUB_TOKEN=<token> pnpm run canary
pnpm run canary:publish
git checkout -- packages .changeset
The first script writes a changeset that bumps every public package, versions
them as <next version>-canary-<datetime>, and builds. The second publishes
with --tag canary; it is a separate step because npm's two-factor prompt
(a hardware key, for instance) has to be answered at the terminal. Bumping all
of them together is what keeps the engines installable: their peer ranges are
rewritten to the runner's exact canary version, and init pins the engine
build it shipped with. The build has to run after versioning for that pin to
hold, and each build stamps dist/.build.json with its version; a
prepublishOnly hook in every package refuses to publish a dist whose stamp
does not match package.json, so a publish without the build step in front of
it fails instead of shipping the previous build. Nothing the scripts write is
committed.
Stability policy
What is covered
The following are the public contract. A change that breaks any of them is a breaking change and follows the rules below:
- Public types exported from
e2e,e2e/engine,@e2e-dev/core,@e2e-dev/core/agent, and@e2e-dev/core/engine, as emitted indist/index.d.tsanddist/engine/index.d.tsofe2e, anddist/core/*.d.tsanddist/engine/index.d.tsof@e2e-dev/core. Removing an export, narrowing an accepted input, widening a returned type, or changing a fixture's runtime behavior all count. - Config keys in
e2e.config.ts, their types, and their defaults. - CLI commands, flags, exit codes, and environment variables (
E2E_*). - Wire formats: the report, session, and agent protocol schemas in
packages/e2e/schema/, and the replay cache layout under.e2e/cache/. Adding an optional field is compatible; renaming, removing, or changing the meaning of one is not.
Not covered: anything under internal, @e2e-dev/core/lib/* (the modules e2e
reaches at the exact @e2e-dev/core version it depends on), the testbed, the exact text of error
messages and reporter output (error codes are covered), and the agent's
prompts and tool descriptions.
Breaking changes
- A breaking change to a covered surface ships with a deprecation first. The old form keeps working, prints a one-line warning naming the replacement, and is documented as deprecated on its reference page and in the changelog.
- The window is six months. Deprecations are batched at the start of a window; the first window opens on October 1, 2026, so removals from that batch land no earlier than April 1, 2027. The next batch is April 1, and so on, twice a year.
- Removal happens at the end of the window, in a minor release while the
packages are
0.x(semver treats0.xminors as breaking) and in a major release from1.0onward. The changeset body opens with**Breaking:**, names both the removed form and its replacement, and the PR title carries the!. - A deprecation is announced in three places when it lands: the changeset (so it reaches the changelog and the GitHub release), the reference page for the surface, and a runtime warning the first time the old form is used in a run.
- Security fixes are the exception. If keeping the old form open is itself the vulnerability, it is removed in a patch and the advisory says so.
Engine contract
@e2e-dev/core/engine (re-exported as e2e/engine) is what @e2e-dev/web and
@e2e-dev/mobile build against, and what a third-party engine builds against
too. A change to that contract bumps @e2e-dev/core, e2e, and both engines
together in one release, with a changeset for each, so an engine and a runner
from the same release always match. e2e and @e2e-dev/core are a changesets
fixed group: they always share a version, and e2e depends on that exact
@e2e-dev/core. Engines declare a peer range on @e2e-dev/core that points one way
only (engine to core, >=x <1), plus an optional one on e2e for the main
entry that adds the engine's fixture to test, and each integration (@e2e-dev/kernel, @e2e-dev/notte, @e2e-dev/lightpanda, @e2e-dev/eas, @e2e-dev/smol, @e2e-dev/testmu, @e2e-dev/browserstack, @e2e-dev/e2b, @e2e-dev/revyl) does
the same on the engines it plugs into; do not make it mutual or narrow it.
Driver nightly compatibility
nightly-agent-device.yml runs daily at 08:17 UTC, after agent-device's
usual 01:30–07:30 UTC publishing window. A manual dispatch accepts an npm
tag or version, defaulting to nightly. It resolves the version once, then
uses temporary overrides and checks the installed dependency graphs. No
lockfile update is committed.
The run calls the existing spec, web benchmark, mobile benchmark, examples,
and agent workflows with that version. This includes pnpm check, unit and
integration tests across the Node matrix, Bun and fresh-install checks,
testbed, both mobile suites on Android and iOS, every example/platform,
and the live agent and dogfood suites. It inherits the existing model key.
Hand-run OAuth and cloud-provider live checks are not CI suites and remain
manual; they need provider accounts, stored logins, or provisioned devices.
The run summary records the version, workflow results, and failed jobs. This compatibility run sends no Slack messages or PR comments. Normal workflow triggers keep their existing reporting behavior.