# Contributor handoff — colinhacks/zod

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

# Contributor handoff — colinhacks/zod

Scanned commit 10dda3a3a4bc76ed0bf83e994de194587e489ef8 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Future agents should treat this as a performance-sensitive library with several mutually dependent execution modes, not as a conventional web application. The safest workflow is to inspect the relevant facade, core implementation, and focused tests before making the smallest possible change. Runtime correctness alone is insufficient for changes under `packages/zod/src`; memory and bundle impact are first-class acceptance criteria. Release operations, version changes, GitHub ticket workflows, and new files all have explicit repository-specific constraints.
- Read `AGENTS.md`, the relevant public facade, the corresponding core schema/check implementation, and the focused test file before editing; `CLAUDE.md` is only a symlink to the same instructions. — [AGENTS.md#L1-9](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L1-L9) [packages/zod/src/v4/classic/schemas.ts#L1-12](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/zod/src/v4/classic/schemas.ts#L1-L12) [packages/zod/src/v4/core/schemas.ts#L1-14](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/zod/src/v4/core/schemas.ts#L1-L14)
- Use Nub exclusively: install with `nub install --frozen-lockfile`, run repository TypeScript with `nub`, scripts with `nub run`, and third-party tools with `nub exec --node`. — [AGENTS.md#L5-24](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L5-L24) [package.json#L1-6](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/package.json#L1-L6)
- Start verification with the smallest relevant Vitest file or test name, then run broader tests; every bug fix or feature must include focused TypeScript test coverage for success, failure, and meaningful edges. — [AGENTS.md#L13-21](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L13-L21) [AGENTS.md#L30-39](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L30-L39) [CONTRIBUTING.md#L89-93](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/CONTRIBUTING.md#L89-L93)
- For compiler changes, run the direct compiler and differential suites plus `nub run test:compile`; compile mode is already part of the full root test command. — [AGENTS.md#L13-21](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L13-L21) [vitest.config.ts#L18-29](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/vitest.config.ts#L18-L29) [vitest.compile.config.ts#L23-30](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/vitest.compile.config.ts#L23-L30)
- Any non-trivial source change must report runtime, retained-memory, and bundle-size measurements together; core changes affect every distribution, and mini requires a separate bundle-size result. — [AGENTS.md#L46-65](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L46-L65) [packages/bench/memory/schema-footprint.ts#L1-77](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/bench/memory/schema-footprint.ts#L1-L77) [packages/treeshake/bundle-size.test.ts#L69-103](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/treeshake/bundle-size.test.ts#L69-L103)
- When changing constructor or property-placement machinery, preserve descriptors and instance shapes, then run the memory surface and dictionary-mode checks because accessor placement can cause large V8 regressions. — [AGENTS.md#L77-85](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L77-L85) [packages/zod/src/v4/core/core.ts#L51-111](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/zod/src/v4/core/core.ts#L51-L111)
- Do not add schema-type-specific branching to shared parse paths; expose capabilities structurally through internals such as `optin`, `optout`, `values`, `pattern`, or `propValues`. — [AGENTS.md#L43-47](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L43-L47) [packages/zod/src/v4/core/schemas.ts#L127-156](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/zod/src/v4/core/schemas.ts#L127-L156)
- Do not widen format validators solely because a specification permits more inputs; repository policy prioritizes observed producer/consumer compatibility, JSON Schema consistency, hot-path cost, and narrow defaults. — [AGENTS.md#L87-101](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L87-L101)
- Keep comments short, avoid consecutive prose `//` lines, add no debug logging, and run `nub run check:comments` alongside format and lint checks. — [AGENTS.md#L25-28](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L25-L28) [AGENTS.md#L40-42](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L40-L42) [scripts/check-comments.ts#L1-19](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/scripts/check-comments.ts#L1-L19) [scripts/fail-on-console.ts#L1-20](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/scripts/fail-on-console.ts#L1-L20)
- Do not bump package versions or dispatch the release workflow without explicit maintainer direction; release publication is manual and protected by an npm environment approval. — [AGENTS.md#L48-53](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L48-L53) [.github/workflows/release.yml#L3-7](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/.github/workflows/release.yml#L3-L7) [.github/workflows/release.yml#L67-73](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/.github/workflows/release.yml#L67-L73)
- For docs changes, remember that production ecosystem builds require `GITHUB_TOKEN`, content lives under `packages/docs/content`, and the build is a Next/Turbopack invocation from the docs workspace. — [CONTRIBUTING.md#L42-61](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/CONTRIBUTING.md#L42-L61) [CONTRIBUTING.md#L95-98](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/CONTRIBUTING.md#L95-L98) [packages/docs/package.json#L5-9](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/docs/package.json#L5-L9)
- Run built-package resolution and integration checks after `nub run build`; source-condition tests cannot prove CommonJS, ESM, declaration, or downstream framework compatibility. — [CONTRIBUTING.md#L74-87](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/CONTRIBUTING.md#L74-L87) [packages/integration/package.json#L15-18](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/integration/package.json#L15-L18) [packages/resolution/package.json#L18-29](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/packages/resolution/package.json#L18-L29)
- For GitHub issues or PRs, use the repository triage workflow and `gh`; contributor PR modifications belong in a worktree, and new remote branches must be pushed with an explicit refspec to avoid updating `main`. — [AGENTS.md#L48-50](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L48-L50) [AGENTS.md#L103-113](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L103-L113) [AGENTS.md#L164-183](https://github.com/colinhacks/zod/blob/10dda3a3a4bc76ed0bf83e994de194587e489ef8/AGENTS.md#L164-L183)

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)
