Automatically detect and fix documentation inconsistencies, outdated examples, and missing @file headers in the u-he-preset-randomizer project...
This skill proactively identifies documentation issues and suggests fixes for the u-he-preset-randomizer project.
Automatically trigger this skill when:
u-he-preset-randomizer - CLI tool and MCP server for u-he synth preset generation:
src/cli.ts) - Main command-line toolsrc/mcp-server.ts) - Model Context Protocol server for AI assistantsVerify examples use correct flags:
--synth - Synth name (e.g., Diva, Hive)--amount - Number of presets to generate--randomness - Percentage (0-100) for randomization--preset - Base preset name or ? for random--merge - Preset names to merge (can be multiple)--pattern - Glob pattern for preset filtering--folder - Filter by folder path--category - Filter by category--author - Filter by author--favorites - Filter by .uhe-fav file--stable - Use stable randomization mode--binary - Include binary section (⚠️ may cause crashes)--dictionary - Use dictionary for random names--custom-folder - Custom u-he installation path--debug - Enable debug loggingVerify MCP_SERVER.md examples match src/mcp-server.ts:
list_synths - Detect available synthsselect_synth - Load preset library (with optional pattern)get_current_synth - Get active synth infolist_presets - List with paginationsearch_presets - Fuzzy searchfilter_presets - Filter by category/author/favorites/patternexplain_preset - Get preset detailsget_categories, get_authors, get_favorites_files - Metadata helpersgenerate_random_presets - Generate from distributionsrandomize_presets - Create variationsmerge_presets - Blend multiple presetsget_synth_context - Get synth reference docsAll TypeScript files must have @file headers:
/**
* @file Brief description of module's purpose.
*/
Exported functions need JSDoc (if not obvious from types):
/**
* Function description explaining what it does.
*
* @param paramName - Parameter description
* @returns What the function returns
* @throws {Error} When it throws errors
*/
export function myFunction(paramName: string): ReturnType { ... }
Key files to document:
src/index.ts - Public API exportssrc/parser.ts - Preset parsing/serialization (public API)src/cli.ts - CLI entry pointsrc/mcp-server.ts - MCP serversrc/generatePresets.ts - Main generation functionsrc/*.ts files1. Small issues (typos, outdated examples, missing headers):
npm run lint && npm run typecheck2. Medium issues (multiple outdated sections, missing documentation):
3. Major issues (significant inconsistencies, large gaps):
/documentation@file Headers:
// Entry points
/**
* @file CLI entry point for u-he preset randomizer tool.
* Handles argument parsing, interactive mode, and orchestration.
*/
// Core modules
/**
* @file Preset parser and serializer for u-he preset files.
* Provides functions to read, parse, and write .h2p preset files.
*/
// Utilities
/**
* @file Utility functions for preset validation.
*/
JSDoc for Public Functions:
/**
* Parses a u-he preset file into a structured object.
*
* @param fileString - The content of the preset file
* @param filePath - Path to the file (for error messages)
* @param binary - Whether to include binary section
* @returns Parsed preset object with metadata and parameters
*/
export function parseUhePreset(
fileString: string,
filePath: string,
binary: boolean,
): Preset { ... }
Avoid redundant JSDoc:
// ❌ Don't document what's obvious from types
/**
* Gets the preset name
* @param preset - The preset
* @returns The name
*/
function getName(preset: Preset): string { ... }
// ✅ Let TypeScript speak for simple functions
function getName(preset: Preset): string { ... }
After any documentation changes:
npm run lint # Biome linting (must pass)
npm run typecheck # TypeScript type checking (must pass)
npm run test:unit # Unit tests (must pass)
Optional build check:
npm run build:dist # Production build (for major changes)
Never modify:
Always ask before:
Auto-fix these safely:
For comprehensive reviews, this skill guides the user to use:
/documentation
Which performs: