Define or update root CLI help for @finografic CLI projects using HelpConfig in src/cli.help.ts and renderHelp from core/render-help. Use when adding commands, changing help layout, or aligning help with the normalized pattern.
cli.help.ts)This skill applies the typed root help pattern used across @finografic CLI tools (genx, gli, and scaffolds from genx).
.github/instructions/project/cli-help-patterns.instructions.md — rules, file locations, HelpConfig shape, examples/footer conventions.docs/spec/CLI_CORE.md — full core/render-help API (HelpConfig, renderHelp, section shapes), export table, and examples.Optional context: A temporary bulk-task folder in a monorepo (e.g. ___REFACTORING___) may hold REPORT_CLI_NORMALIZATION.md with migration history. That path is canonical; use it when you have it for background, not as the spec.
Keep this skill procedural; link to docs/spec/CLI_CORE.md for authoritative types and tables.
src/core/render-help/ exists (shared module; do not rewrite the renderer unless intentionally changing core/ across all CLI repos).tsconfig.json includes "core/*": ["./src/core/*"] (or equivalent).genx) and the commands to list.Open or create src/cli.help.ts at the repository root of src/ (never nested under commands/ for root help).
Import types from the barrel only:
import type { HelpConfig } from 'core/render-help';
Do not import help types from src/types/ or utils/.
Export a single named config cliHelp (not default export):
export const cliHelp: HelpConfig = {
main: { bin: '…', args: '<command> [options]' },
// commands, examples, footer — see instruction file
};
Follow section conventions (details in the instruction file):
label = human description, description = exact command line.label may use <placeholder> tokens; description optional dim line.Wire src/cli.ts: import renderHelp from core/render-help and cliHelp from ./cli.help.js (use .js extension if the project uses verbatimModuleSyntax). Call renderHelp(cliHelp) only from the CLI entry / help branch — not inside cli.help.ts.
Optional shared defaults: genx uses defaultHelpOptions from config/help.config for minWidth / alignment — follow existing project pattern if present.
Verify: pnpm typecheck and run the binary with --help or no args to confirm layout.
commands.list (keep descriptions one line).src/help/*.help.ts) if this repo splits per-command help — root skill covers root HelpConfig only.HelpConfig); rendering is centralized in core/render-help.renderHelp logic in application code.