Document all public APIs and significant internal functions with comprehensive JSDoc comments that include accurate descriptions, parameter and return types, and any notable side effects. Follow standard JSDoc format conventions consistently across the codebase.

When documenting functions:

Maintain consistent formatting across all JSDoc comments. This improves code readability, makes API documentation generation more effective, and helps new developers understand the codebase more quickly.