Splits codeSpans, the flag and subcommand walk, the export walker and the
docs-impact entry point into small functions so fallow's audit passes, adds
scripts/cli-command-tree.test.ts (cli.ts's loader block and a citty command
described end to end), and lists docs-impact.yml among the workflows that read
the PR body on an edit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/cli-command-tree.ts loads every command module that cli.ts's
commandLoaders registers and prints the citty command tree (subcommands,
flags, aliases, value types, hidden and deprecated markers) as JSON. It reads
the real definitions, not --help text, so it sees exactly what citty parses.
scripts/check-docs-cli-references.mjs scans docs/**/*.mdx (fenced blocks with
backslash continuations, inline code, and the catalog's InstallCommand
command props) for `hyperframes ...` / `npx hyperframes ...` invocations and
resolves each one the way citty does: the first non-flag word that is not a
string flag's value names the subcommand. Unknown commands, subcommands and
flags are errors with a "did you mean"; deprecated commands and flags and
hidden flags are warnings. Placeholders (<dir>, [opts], {id}, $VAR, ...),
comments, `--`, other tools (`npx skills add heygen-com/hyperframes`,
`npm i -g hyperframes`) and the release logs are left alone. Quoted CLI
output opts out with {/* cli-references: ignore */}.
The Docs workflow runs it on docs and CLI source changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>