# Contributor handoff — sveltejs/svelte

> Canonical page: https://codevetter.com/unpack/svelte/agent-handoff

# Contributor handoff — sveltejs/svelte

Scanned commit 636eaaaa6f064b55072e7d192bb76dc9d8c4516e (2026-09-18). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Read `AGENTS.md`, `CONTRIBUTING.md`, and `.github/PULL_REQUEST_TEMPLATE.md` first — the repo's own agent guide makes the PR template mandatory and forbids submitting without a full test run. The dominant convention is `snake_case` internally, `camelCase` publicly; the dominant workflow is add a fixture directory, not a new test file. The two hard edit boundaries are generated files (types, error/warning modules, generated docs) and the compiler/runtime import firewall. Expect long feedback loops: the full suite covers ~3,400 fixtures across 4 variants, so filter aggressively while iterating and only run the full suite before opening a PR.
- `AGENTS.md` is explicit that `CONTRIBUTING.md` must also be read, that `PULL_REQUEST_TEMPLATE.md` must be read and filled out correctly for any PR, and that PRs must not be submitted without running the full test suite. — [AGENTS.md](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/AGENTS.md) [.github/PULL_REQUEST_TEMPLATE.md](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/.github/PULL_REQUEST_TEMPLATE.md)
- Naming convention is enforced, not advisory: `snake_case` for internal variables and methods, `camelCase` for public ones, backed by the `lube/svelte-naming-convention` ESLint rule set to `error` with `fixSameNames: true`. — [CONTRIBUTING.md#L136-140](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/CONTRIBUTING.md#L136-L140) [eslint.config.js#L49-56](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/eslint.config.js#L49-L56)
- Never hand-edit `packages/svelte/types/index.d.ts`, `src/compiler/errors.js`, or the four `warnings.js` modules — they are generated by `pnpm generate` and CI fails the `Lint` job if `git status` is dirty after `pnpm build`. — [packages/svelte/package.json](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/package.json) [.github/workflows/ci.yml#L88-96](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/.github/workflows/ci.yml#L88-L96) [CONTRIBUTING.md#L142-146](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/CONTRIBUTING.md#L142-L146)
- Never import from `../compiler/` or `#compiler` inside `packages/svelte/src/**` outside `src/compiler/**` — the custom `no_compiler_imports` rule string-searches the file text and rejects even JSDoc type references. — [eslint.config.js#L4-40](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/eslint.config.js#L4-L40) [eslint.config.js#L78-86](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/eslint.config.js#L78-L86)
- Adding a test means creating a directory under `packages/svelte/tests/<suite>/samples/`, optionally with a `_config.js` default-exporting the config object — `for_each_dir` in `suite.ts` discovers it automatically, so no test file is edited. — [packages/svelte/tests/suite.ts#L76-104](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/tests/suite.ts#L76-L104) [CONTRIBUTING.md#L88-94](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/CONTRIBUTING.md#L88-L94)
- Files prefixed with `_` inside a sample directory are excluded from compilation by `compile_directory`, which is how `_config.js` coexists with the component files it tests. — [packages/svelte/tests/helpers.js#L76-78](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/tests/helpers.js#L76-L78)
- A sample directory containing only `_output` or `_actual.json` is treated as leftover from another branch and silently skipped — so a suite that appears to pass may simply not have run. — [packages/svelte/tests/suite.ts#L74-90](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/tests/suite.ts#L74-L90)
- Tests require Chromium to be installed first (`pnpm playwright install chromium`) or the `runtime-browser` and custom-elements suites will fail to launch. — [CONTRIBUTING.md#L96-100](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/CONTRIBUTING.md#L96-L100) [.github/workflows/ci.yml#L40-44](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/.github/workflows/ci.yml#L40-L44)
- Iterate with `pnpm test <suite>`, `pnpm test <suite> -t <name>`, or `FILTER=<name> pnpm test <suite>`; snapshot suites are regenerated with `UPDATE_SNAPSHOTS=true pnpm test`. — [CONTRIBUTING.md#L100-122](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/CONTRIBUTING.md#L100-L122) [packages/svelte/tests/suite.ts#L10-25](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/tests/suite.ts#L10-L25)
- Typechecking is a three-project run inside `packages/svelte`: `tsc --project tsconfig.runtime.json && tsc && cd ./tests/types && tsc` — the `tests/types` project exists purely to typecheck public API ergonomics (`actions.ts`, `snippet.ts`, `store.ts`, `bindings.svelte`, …). — [packages/svelte/package.json](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/package.json) [packages/svelte/tests/types/tsconfig.json](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/tests/types/tsconfig.json)
- Any change under `packages/svelte/src` requires a changeset (`npx changeset`) per the PR template; the root `changeset:version` script also runs `pnpm -r generate:version` so `src/version.js` stays in sync. — [.github/PULL_REQUEST_TEMPLATE.md](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/.github/PULL_REQUEST_TEMPLATE.md) [package.json](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/package.json) [packages/svelte/scripts/generate-version.js](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/scripts/generate-version.js)
- For performance work, use the `performance-investigation` skill: run `pnpm bench:compare main <branch>`, read `benchmarking/compare/.results/report.txt`, then diff the per-benchmark `.md` CPU-profile summaries, and re-run `pnpm test runtime-runes` afterward. — [.agents/skills/performance-investigation/SKILL.md](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/.agents/skills/performance-investigation/SKILL.md) [package.json](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/package.json)
- Files to read first for the compiler: `src/compiler/index.js`, `phases/1-parse/index.js`, `phases/2-analyze/index.js`, `phases/3-transform/index.js`, `phases/scope.js`, `phases/bindings.js`. — [packages/svelte/src/compiler/index.js](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/src/compiler/index.js) [packages/svelte/src/compiler/phases/scope.js](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/src/compiler/phases/scope.js) [packages/svelte/src/compiler/phases/bindings.js](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/src/compiler/phases/bindings.js)
- Files to read first for the runtime: `internal/client/constants.js` (the flag vocabulary, which nothing else makes sense without), `internal/client/runtime.js`, `reactivity/{sources,deriveds,effects,batch}.js`, `internal/client/render.js`, `internal/client/proxy.js`. — [packages/svelte/src/internal/client/constants.js](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/src/internal/client/constants.js) [packages/svelte/src/internal/client/runtime.js](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/src/internal/client/runtime.js) [packages/svelte/src/internal/client/reactivity/batch.js](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/src/internal/client/reactivity/batch.js)
- Known trap: `tests/README.md` is a stale migration-era document listing 'TODOs' and 'tests not copied over yet' from the Svelte 4→5 rewrite; treat it as historical context rather than current guidance. (inferred) — [packages/svelte/tests/README.md](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/packages/svelte/tests/README.md)
- Known trap: `pnpm-workspace.yaml` sets `minimumReleaseAge: 2880` and `blockExoticSubdeps: true`, so adding a freshly-published third-party dependency will be rejected unless it is on the `minimumReleaseAgeExclude` list. — [pnpm-workspace.yaml](https://github.com/sveltejs/svelte/blob/636eaaaa6f064b55072e7d192bb76dc9d8c4516e/pnpm-workspace.yaml)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
