code gates

Code change rules

Rules for code, routes, components, data libraries, middleware, redirects, headers, and build behavior.

Code can change quickly, but not blindly. Every edit has a check, route, and emergency exit.

technical owner

Routes

Add route to structure, route-audit prefixes if dynamic, sitemap logic when public.

Do not create orphan pages without links and registry.

technical owner

Headers

Internal routes get no-store, no-referrer, X-Robots-Tag noindex/nofollow.

Do not index operator, analytics, handbook, experiments, or support pages.

developer

Libraries

Use typed localized structures and fallback en for unknown locale.

Do not index a {ru,en} object directly with unknown locale without fallback.

Before change

A change begins not with code, but with reason and limits.

  • Name the owner and impacted routes.
  • Understand whether this is a public page or internal noindex section.
  • Define rollback path before merge.

During change

Make changes in small batches so errors do not spread through the house like quiet smoke.

  • Do not mix payment, content, UX, and security in one shapeless commit.
  • Check routes, internal links, SEO, and noindex near the change.
  • Do not add tracking without a privacy-safe note.

After change

A change ends not when code is saved, but when it can be verified and rolled back.

  • Run typecheck, lint, tests, route audit, links, structure, and security checks.
  • Record result in the relevant pass report or decision log.
  • Name what remains unchecked and where to verify it in Vercel.

checklist

  • No unused imports.
  • No dynamic href route audit cannot understand unless prefix is allowed.
  • No environment keys committed.
  • No node_modules, .next, env files in archive.

handoff

  • Technical owner writes changed files and checks run.
  • Owner receives known build caveats and Vercel verification steps.

red flags

  • Build fails before compile success.
  • Route-audit failure ignored.
  • Security check skipped after touching headers, env, or auth.

related doors