Skip to content

docs(cli): document every command, and check it in CI - #5938

Merged
ukimsanov merged 6 commits into
mainfrom
docs/media-use-and-usage
Oct 22, 2026
Merged

ukimsanov merged 6 commits into
mainfrom
docs/media-use-and-usage

Conversation

@ukimsanov

@ukimsanov ukimsanov commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What

Every CLI command is documented, and CI keeps it that way.

  • New sections: media-use (9 subcommands) and usage. Both are visible commands the skills tell agents to run, and the docs had nothing on them.
  • "Find your command" now lists media-use, usage, models, clean and events. The last three had sections but weren't in the finder.
  • scripts/check-docs-cli-commands.mjs (~20 lines), run in the docs workflow. It fails when a command in cli.ts's commandLoaders is missing from "Find your command". The workflow now also runs when packages/cli/src/cli.ts changes.
  • AGENTS.md / CLAUDE.md: a PR that changes a CLI command, flag or user-visible behavior updates docs/ in the same PR.

Why

Commands shipped without docs (media-use, usage) and nobody noticed. Agents read these pages, so a missing command means an agent can't find it. The check covers the direction that actually drifted. An earlier, larger proposal (#5933) checked every flag shown in the docs against the CLI, but it found 0 errors in today's docs.

How

Every documented media-use/usage flag and subcommand was run from source, except the network-dependent resolve types (bgm, image, icon, logo, voice, video), which were checked against the code.

Found while running them, not fixed here, to be reported to the media-use owner: from/reuse/params subcommands reject their value; the short flags -t/-i/-e and --source are rejected; media-use resolve --help has no descriptions; root --help doesn't list media-use, usage, figma or events; and guides/authentication.mdx gives the wrong SFX order. The docs page uses only the forms that work.

Test plan

  • node scripts/check-docs-cli-commands.mjs: all 49 commands listed. On main's cli.mdx it fails with media-use, usage, models, clean, events.
  • mint validate; mint broken-links --check-redirects clean
  • lefthook, commitlint

Both command groups are registered and visible but had no section in the CLI reference.

- media-use: subcommands, resolve flags, the per-type source order, where files land,
  which sources need a HeyGen sign-in or can cost money, and telemetry.
- usage: flags, the known and unknown result shapes, which logins it reads, and that it
  sends no telemetry.
- Add both to the "Find your command" table.

The from, reuse, and params subcommands cannot take their value in this release, so the
page points to the working resolve --from, --reuse, and --params forms instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Oct 22, 2026, 6:33 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

The bugs go to the media-use owner instead of living in the docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A ~20-line check fails the docs workflow when a CLI command is missing
from "Find your command". On main it finds media-use, usage, models,
clean and events. AGENTS.md and CLAUDE.md ask agents to ship docs with
the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ukimsanov ukimsanov changed the title docs(cli): document media-use and usage docs(cli): document every command, and check it in CI Oct 20, 2026
@ukimsanov
ukimsanov marked this pull request as ready for review October 21, 2026 23:23
Copilot AI balanced review requested due to automatic review settings October 21, 2026 23:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The finder now covers all 49 top-level command loaders, and .github/workflows/docs.yml triggers when either the loader map or checker changes. I executed scripts/check-docs-cli-commands.mjs: current docs pass; deleting the media-use finder entry or adding a synthetic undocumented command each fails.

I checked the added media-use/usage sections against the exact-head command implementations and relevant engine/credential paths. The examples use resolve --from/--reuse rather than the known broken positional variants. Usage’s read-only credential paths, fixed provider endpoints, redirect refusal and telemetry/update-check exclusions agree with the documentation. No actual credentials were read and no paid/media-provider calls were made.

Limitations: the checker establishes finder membership, not that every linked section remains semantically complete; it does not execute examples. No full Mintlify build, complete CLI suite or end-to-end media resolution was run. The pre-existing CLI manual outside the changed sections was not revalidated command by command.

Verdict: COMMENT
Reasoning: No blocking mismatch found in the new documentation or command-finder check. Approval needs James’s go or a trusted stamper’s request.
— hf-review

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval at exact head 7db6b1bdf59de8f804b41fefd3d61f1e2d76d3d3, unchanged since my code review. James directly authorized approval in the originating Slack thread; no new code findings were added in the refreshed review/comment history.

New media-use/usage documentation agrees with the inspected implementations. The finder check covers all 49 command loaders and fails on an omitted entry or synthetic undocumented command.

Validation and limits: Checker and source controls; no full docs build, media-provider call or complete CLI suite. Finder membership does not certify semantic completeness of every section.

Verdict: APPROVE
Reasoning: The reviewed code remains clear under the stated scope and collection contract; earlier blocking findings are resolved where applicable. No merge, deployment or publication performed by me.
— hf-review

@ukimsanov
ukimsanov enabled auto-merge October 22, 2026 17:34
@ukimsanov
ukimsanov added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 1b1a576 Oct 22, 2026
62 of 65 checks passed
@ukimsanov
ukimsanov deleted the docs/media-use-and-usage branch October 22, 2026 19:01

This branch was successfully deployed

1 active deployment
staging - docs — a97f0eed Deployed Oct 22, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants