# Contributor handoff — evanw/esbuild

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

# Contributor handoff — evanw/esbuild

Scanned commit f6058f8364fe7ab91ca57a83e02577ed74c9cae4 (2026-08-09). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Start with the architecture doc, the Makefile, and the three public edges (CLI, pkg/api, lib service protocol). Keep Go 1.13, the single dependency pin, and the path/filepath ban. Do not hand-edit published npm trees. Version changes are a release. Parser and linker edits need snapshot and JS API tests, and cached ASTs must stay immutable.
- Read order for a pipeline change is docs/architecture.md, docs/development.md, internal/bundler/bundler.go (ScanBundle, parseFile, Compile), internal/linker/linker.go (Link), internal/js_parser/js_parser.go (Parse and appendPart), and pkg/api/api_impl.go (contextImpl, rebuildImpl, transformImpl). — [docs/architecture.md#L54-L78](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/architecture.md#L54-L78) [docs/development.md#L5-L17](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/development.md#L5-L17) [internal/bundler/bundler.go#L1371](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/bundler/bundler.go#L1371) [internal/linker/linker.go#L227](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/linker/linker.go#L227) [pkg/api/api_impl.go#L901](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/api_impl.go#L901)
- Safe local checks are make or go build ./cmd/esbuild, then make test-go or go test ./internal/... ./pkg/.... Snapshot updates are UPDATE_SNAPSHOTS=1 and must be reviewed. JS API changes also need node scripts/js-api-tests.js and node scripts/plugin-tests.js after scripts/esbuild.js has built the package under test. — [docs/development.md#L9-L17](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/development.md#L9-L17) [Makefile#L16-L27](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/Makefile#L16-L27) [Makefile#L123-L128](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/Makefile#L123-L128) [internal/bundler_tests/bundler_test.go#L5-L7](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/bundler_tests/bundler_test.go#L5-L7)
- Do not change the go version line or the golang.org/x/sys pin in go.mod. Do not import path/filepath. Do not enable cgo. Release binaries are built with the go.version compiler via the Makefile GO_COMPILER wrapper, not whatever go is first on PATH. — [go.mod#L3-L10](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/go.mod#L3-L10) [Makefile#L8-L14](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/Makefile#L8-L14) [Makefile#L85-L87](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/Makefile#L85-L87) [Makefile#L59-L83](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/Makefile#L59-L83)
- A release is version.txt (number only), a matching ## header in CHANGELOG.md, then make platform-all committed so every package.json matches, then a push to main. publish.yml fails if git status is dirty after its own platform-all, and it refuses an empty changelog section. — [RUNBOOK.md#L6-L24](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/RUNBOOK.md#L6-L24) [docs/development.md#L19-L25](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/development.md#L19-L25) [.github/workflows/publish.yml#L54-L72](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/.github/workflows/publish.yml#L54-L72)
- The JS service and the Go service are one protocol. Changing a command, flag name, or packet field requires edits in lib/shared/stdio_protocol.ts, lib/shared/common.ts, and cmd/esbuild/service.go together. The first stdout bytes of the service are the version string, and the host passes that same version as --service=. — [lib/shared/stdio_protocol.ts#L1-L21](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/lib/shared/stdio_protocol.ts#L1-L21) [cmd/esbuild/service.go#L106-L107](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/service.go#L106-L107) [cmd/esbuild/main.go#L200-L213](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/main.go#L200-L213)
- Cache and linker invariants are unchecked by the type system. cache.go says ASTs are shared across builds and must be immutable, and options that affect parsing must be in the cache key. Architecture docs say cross-build data must stay immutable for watch mode. — [internal/cache/cache.go#L10-L32](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/cache/cache.go#L10-L32) [docs/architecture.md#L50-L52](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/architecture.md#L50-L52)
- Symbol identity is a ref into a per-file symbol array, merged across files by Link chains. FollowSymbols or FollowAllSymbols must be used before printing. Renaming or cloning symbols without following links will emit the wrong identifier. — [docs/architecture.md#L82-L88](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/architecture.md#L82-L88) [docs/architecture.md#L211-L215](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/architecture.md#L211-L215) [internal/linker/linker.go#L345-L349](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/linker/linker.go#L345-L349)
- Code splitting only works for the esm format. Moving an assignment to a module-local binding into a different chunk than its declaration is a known correctness hazard documented in architecture.md. — [pkg/api/api_impl.go#L1445-L1447](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/api_impl.go#L1445-L1447) [docs/architecture.md#L347-L379](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/architecture.md#L347-L379)
- Watch mode stops when stdin closes unless --watch=forever. The dev server also stops when stdin closes. WASM cannot serve. Do not replace the poller with a cgo file watcher; watcher.go explains why cgo is rejected. — [cmd/esbuild/main.go#L220-L236](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/main.go#L220-L236) [cmd/esbuild/main.go#L333-L366](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/main.go#L333-L366) [pkg/api/watcher.go#L1-L10](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/watcher.go#L1-L10) [cmd/esbuild/main_wasm.go#L27-L29](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/main_wasm.go#L27-L29)
- Large files an agent will fight: internal/js_parser/js_parser.go, internal/linker/linker.go, internal/bundler/bundler.go, and the css_parser declaration files. Prefer a new test in internal/bundler_tests or scripts/js-api-tests.js over a drive-by refactor. (inferred) — [internal/js_parser/js_parser.go#L17815](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/js_parser/js_parser.go#L17815) [internal/linker/linker.go#L227](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/linker/linker.go#L227) [internal/bundler/bundler.go#L1371](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/bundler/bundler.go#L1371)
- npm/esbuild/lib and the platform bin/ directories are build outputs of scripts/esbuild.js. make publish-all deletes and restores npm/ from git before publishing. Editing generated install.js in the published tree without changing lib/npm/node-install.ts will be overwritten. — [Makefile#L445-L447](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/Makefile#L445-L447) [lib/npm/node-install.ts#L1-L16](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/lib/npm/node-install.ts#L1-L16) [docs/development.md#L19-L25](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/development.md#L19-L25)
- There is no product web UI in this repo. scripts/try.html is a manual WASM playground served by esbuild --servedir=.. Do not treat the React dependency in scripts/package.json as application code. — [docs/development.md#L27-L33](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/docs/development.md#L27-L33) [scripts/package.json#L2-L10](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/scripts/package.json#L2-L10)

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)
