When making code changes, ensure all relevant documentation is updated comprehensively across different formats and locations. This includes:

  1. JSDoc comments for functions, especially internal APIs that need usage context
  2. Inline comments for complex logic sections to aid future maintainers
  3. External markdown documentation when adding new API properties or references
  4. Clear test expectations that explicitly show expected transformations

For example, when adding a new function:

/**
 * @internal
 * Handles hash-based scrolling during route transitions.
 * Should be setup in the `<Transitioner>` component.
 */
export function handleTransitionerHashScroll(router: AnyRouter) {
  // Actually fire off the `beforeLoad` callback
  const beforeLoadContext = await route.options.beforeLoad?.(beforeLoadFnContext)
}

And ensure corresponding updates to:

This comprehensive approach ensures that documentation remains synchronized with code changes and provides clear guidance for future developers.