writeJsDoc
Automates the creation and maintenance of JSDoc documentation for DuploJS utilities, ensuring consistent index.md structures and synchronized code examples.
Introduction
The writeJsDoc skill is a specialized utility designed for the DuploJS ecosystem to standardize documentation maintenance within the utils repository. It streamlines the lifecycle of JSDoc files located in jsDoc/{namespace}/{function}/ by enforcing a rigid, professional structure for both content and code examples. This tool ensures that every utility function has a clear, discoverable documentation path, helping developers maintain high-quality API references without manual formatting overhead.
-
Automatically manages index.md structures, mandating a specific order: function description, usage patterns (classic/curried), behavioral details, interactive examples, remarks, and mandatory @see documentation links.
-
Orchestrates the creation of example.ts files, ensuring each function has at least three didactic examples that utilize the {@include} tag, promoting code reusability and keeping documentation in sync with source changes.
-
Explicitly handles complex overload scenarios, such as predicate patterns, by requiring specific examples for both classic 'if' statements and 'pipe + when' curried compositions.
-
Validates @namespace assignment against the project configuration (scripts/index.ts) to ensure correct categorization (e.g., Array as A, DataParser as DP).
-
Utilizes pre-defined templates for index.md and example.ts to ensure uniform styling across the entire library, adhering to the project's 'good DX' and functional programming philosophy.
-
The tool expects developers to maintain documentation within the jsDoc directory, using line ranges in {@include} tags to pull specific snippet portions from example.ts files.
-
Users must ensure that example.ts files remain simple and focused, avoiding noise, and following the @scripts import pattern standard in the DuploJS utils repo.
-
When documenting predicates, the skill requires providing distinct usage examples for both the standard check and the functional pipeline integration.
-
Regular updates using this skill ensure that the generated documentation stays compliant with the latest API changes, providing accurate links to the English online documentation via @see tags.
Repository Stats
- Stars
- 13
- Forks
- 0
- Open Issues
- 0
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 11:14 PM