docs(cli): auto-derive command group copy#11939
Conversation
|
This pull request is part of a Mergify stack:
|
Merge Protections🔴 2 of 6 protections blocking · waiting on 👀 reviews
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
This PR improves the CLI reference pages by precomputing an outward-facing command-group description (editorial → schema about → generated fallback), reworking group ordering so newly synced commands land with capability groups ahead of the maintenance tail, and adjusting tests to guard against stale editorial-map entries.
Changes:
- Add
CliGroup.descriptionderived via a newgroupDescription()helper (editorial → schema → generated fallback). - Update CLI index + group pages to render/use
group.description, and add a build-time warning for groups still using fallback copy. - Update grouping tests to detect orphaned editorial entries and add dedicated tests for
groupDescription()fallback tiers.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/pages/cli/index.astro | Uses precomputed group descriptions, logs a warning for groups missing editorial copy, and mutes maintenance groups via MAINTENANCE_GROUPS. |
| src/pages/cli/[group].astro | Uses group.description as the page meta description. |
| src/components/CliReference/cli-schema.ts | Adds CliGroup.description, introduces groupDescription() and MAINTENANCE_GROUPS, and tweaks ordering to keep maintenance groups at the end. |
| src/components/CliReference/cli-schema.test.ts | Replaces “must have editorial entry” assertions with stale-entry checks, and adds fallback behavior tests for groupDescription(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
groupDescription resolves a group's outward-facing copy as the editorial entry, then the schema `about`, then a generated sentence; groupTopLevel exposes it as a precomputed CliGroup.description. A command synced into cli-schema.json renders non-blank without a hand-written entry, and sorts among the capabilities ahead of the MAINTENANCE_GROUPS tail. The grouping test now guards against editorial entries orphaned by a renamed or dropped command rather than requiring an entry per command, and a build-time warning lists groups still on fallback copy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Change-Id: I3e5bccdcd1033d4bb51f383cddcd76c22c5b8947
5543d48 to
f44358b
Compare
Revision history
|
groupDescription resolves a group's outward-facing copy as the editorial entry,
then the schema
about, then a generated sentence; groupTopLevel exposes it as aprecomputed CliGroup.description. A command synced into cli-schema.json renders
non-blank without a hand-written entry, and sorts among the capabilities ahead of
the MAINTENANCE_GROUPS tail.
The grouping test now guards against editorial entries orphaned by a renamed or
dropped command rather than requiring an entry per command, and a build-time
warning lists groups still on fallback copy.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com