What agents should know before contributing
TanStack/router
🤖 A client-first, server-capable, fully type-safe router and full-stack framework for the web (React and more).
Read by Bluet from 3 files written for agents and 300 merged pull requests on 2026-09-25. Not reviewed by the maintainers.
Rules its files tell agents (10)
- AGENTS.md
mustNever create UI/router reactivity on the server, including development/tests.
Never create UI/router reactivity on the server, including development/tests. Branch before reactive setup; use direct reads and core non-reactive stores. Required transport listeners are allowed only with request-scoped lifetimes and cleanup.
- AGENTS.md
mustrouter.isServer directly in each branch condition for dead-code elimination; negate the whole expression for c…
Keep isServer ?? router.isServer directly in each branch condition for dead-code elimination; negate the whole expression for client branches. Never extract it into a variable (e.g. const serverRendering = isServer ?? router.isServer) or helper. Without a router, inline isServer ?? typeof window === 'undefined' (or the existing document check). Keep the constant first and use ??, never ||.
- AGENTS.md
mustNever manually edit pnpm-lock.yaml or any routeTree.gen.ts.
Never manually edit pnpm-lock.yaml or any routeTree.gen.ts. Regenerate the lockfile with pnpm install --no-frozen-lockfile after intentional dependency changes; regenerate route trees through app builds/dev servers or the generator fixture harness.
- AGENTS.md
mustNever implement a workaround in this repository unless the user explicitly authorizes it.
For suspected dependency issues, verify the upstream root cause, then propose an upstream fix to the user, including for other @tanstack/* packages. Never implement a workaround in this repository unless the user explicitly authorizes it.
- CONTRIBUTING.md
shouldDo not mass-submit unrelated or low-quality AI-generated pull requests.
Do not mass-submit unrelated or low-quality AI-generated pull requests. We treat that behavior as spam and may close the pull requests, block the contributor, and report the GitHub account.
- CONTRIBUTING.md
shouldCreate it with pnpm changeset; documentation, CI, examples, and development-only changes do not require one.
Every change that affects a published package must include a changeset. Create it with pnpm changeset; documentation, CI, examples, and development-only changes do not require one.
- CONTRIBUTING.md
shouldDo not paste LLM output verbatim into the codebase or a contribution.
Do not paste LLM output verbatim into the codebase or a contribution. Treat generated text and code as a draft: check its claims, adapt it to the repository, and remove anything you cannot justify. Issues or pull requests that appear to contain unreviewed LLM output may be closed without further review.
- AGENTS.md
shouldFor a ~20-second startup/graph stall, stop, run pnpm nx reset, and retry once, then escalate. Do not apply tha…
Run one Nx command at a time. For a ~20-second startup/graph stall, stop, run pnpm nx reset, and retry once, then escalate. Do not apply that timeout to running tests.
- AGENTS.md
shouldDo not change stores, delete dependencies/lockfiles, use --force/--ignore-scripts, or weaken workspace trust/b…
For sandbox-blocked registry/store access, escalate the same command; report the blocker if unavailable. Do not change stores, delete dependencies/lockfiles, use --force/--ignore-scripts, or weaken workspace trust/build policies to bypass it.
- AGENTS.md
shouldDo not manufacture bugs by mutating internals.
Start bug fixes with a failing regression test that uses only public APIs to reproduce and assert user- or developer-visible behavior. Do not manufacture bugs by mutating internals. Establish whether real usage can reach the failing state before adding runtime handling; simplify handling of states proven unreachable.
Decisions its pull requests settled (20)
- #7858complete lane match loader rewrite
- #7880address lane loader regressions
- #7883final-review regressions, changeset, and byte recovery
- #7926Simplify loader flight and render acknowledgement ownership
- #7952bail out of Link re-renders when href and active state are unchanged
- #7992retain mounted UI during revalidation
- #8027make the global loading boundary opt-in and server/client-symmetric
- #8055avoid Suspense above root documents
- #8110skip impossible state sharing
- #8080adopt Solid 2's useHead registry for head management
- #8213native SSR match transfer, hydration-claiming boot, provider-owned dispatch
- #8222share settle chain between superseded navigation waiters
- #8149document U+0130 affix limitation
- #8264handle blockers consistently across history traversal
- #8364skip symbol enumeration for plain replaceEqualDeep inputs
- #8259reduce navigation promise chains
- #8382stop structurally sharing search and state in buildLocation
- #8370reuse location-independent Link destinations
- #8390keep the location cache client-only and slim Link SSR
- #8405memoize Link and forward refs without an effect