Read coding style before changing code, and test accounts for authenticated local/stage/production testing.
- Effect v4 internally, ordinary values and Promises at public SDK /
appsauthor boundaries. Derive author callback types from native contracts; compose Effects directly inside the library. - Product-owned authorization. Core SDK ownership is a lookup primitive, not permission enforcement. Share capabilities and UI views without forcing hosted organizations into local or adding
isCloudflags. - Migrations must keep the app online. Cloud migrations run before the replacement server deploys; a failed deploy does not roll back SQL. Add schema first, deploy code that uses it, drop obsolete fields in a later release. Never drop/rename a required column before replacement deploys, never add a maintenance Worker, never reset data or relabel a schema version. Verify fresh setup, retained data, repeat runs, and rollback on real adapters (storage).
- All tests live in
e2e/and drive a real server through HTTP, MCP, CLI, or browser. Unit tests are banned everywhere else (scripts/check-no-unit-tests.ts). - Two exceptions only: Go host
go testinapps/hosted/self-host/nativeand the 7 Rust collectorcargo testfiles inpackages/telemetry/collector/tests/. - Locally, run only named scenarios for code you changed (
--test-name '<title>'). Never run a full suite locally; CI runs full suites. - Snapshots (
toMatchInlineSnapshot) are assertions — update only intentionally with--update-snapshots --test-name '<title>'. - Never add retries, longer deadlines, or skips to paper over flakes; fix the race. Delete scenarios that no longer guard real user/API behavior.
- Public
UsefulSoftwareCo/executorbranchv2is overwritten fromexecutor-nextmainon export. Never merge, push to, or open PRs directly againstv2. - To land an external contributor's
v2PR so GitHub marks it merged: port it into a draftexecutor-nextPR with a commit body linePublic-PR: UsefulSoftwareCo/executor#<number> <full head sha>. Keep the SHA current if the contributor pushes updates.
- Workspace: keep
~/agent-workspace/executor-nextclean onmain. Do all work in a rift workspace on a named branch; runbun run workspace:checkbefore starting and--taskin the rift. - Before pushing: run
bun run formatandbun run pr:check(--description <file>before opening the PR). - Every PR description requires one fenced
```e2eblock listinge2e/tests/*.spec.tsfiles for callers of changed code,none(docs/notes/skills only),all: <reason>(harness/toolchain/lockfile/workflows only), orskip(lower stack layers only). Ready PRs touching files outsidee2e/narrowing.tsrun the full suite. - Stacks: land stacks only via
gh stack merge <top PR> --yes --squashafter checking all layers are in one stack onmain. Never bypass themainruleset (--admin, API bypass). Never run CI checks on macOS runners. - Release notes: for changes users of Cloud, the CLI, desktop, or self-host would notice, add
Release-note: Feature|Improvement|Fix: <plain sentence>in a commit message body (PR titles are never published; see RELEASING.md). A note goes to every product its change reaches;bun run pr:checkprints who and the note's hash, and an entry with that hash inscripts/releases/note-audiences.tschanges it. - Generated / patched files: never edit
node_modulesdirectly (usebun patch <pkg>). Never read/editpackages/apps/protocols/*.jsondirectly (runbun run apps:protocols/--write; see apps publishing). After editing anypackage.json, runbun installand commitbun.lock. - Cloud Worker size:
+50 KBupload or static-import growth failssiteunless justified in a fenced```worker-growthblock (<worker> +<bytes>: <why>). Never raise budgets inworker-build.tsto fit a change. - CI triage: compare unrelated failures against
gh run list -w CI -b main -L 3. Rerun failed jobs at most once withgh run rerun <run-id> --failed(never rerun all jobs after a failure — it deletes attempt evidence). Wait withci-wait, never sleep loops.
| Rule | Enforcer |
|---|---|
Format, lint, executor/* Oxlint rules |
bun run check (.oxlintrc.jsonc, scripts/oxlint-plugin.ts) |
| Types & Effect diagnostics | bun run typecheck (tsc-rs) |
No unit tests outside e2e/ |
scripts/check-no-unit-tests.ts |
| E2E import boundary | e2e/check-boundary.ts |
| Dependency patches & exact versions | bun run patches:check, bun run versions:check |
bun.lock & packages/apps version bump |
bun run pr:check, bun run lockfile:check |
| Host protocols, telemetry, API errors, auth rate limit, storage versions | bun run check (scripts/check.ts) |
PR e2e block, stack skip, Release-note: lines |
bun run pr:check (e2e/ci-selection.ts) |
| Cloud Worker upload size budgets | bun run hosted:cloud:worker-sizes |
| Docs/marketing broken links | bun run site:links |
| GitHub Actions workflow syntax | actionlint |