docs: fix CLI reference drift, add ARCH-016 subcommand coverage rule#305
Merged
Conversation
The CLI reference docs drifted from the actual commands after `adr import` and `adr sync` shipped without documentation updates. The `upgrade` docs also inaccurately described the upgrade mechanism as npm-only. Fixes: - adr.mdx (EN + pt-br): add `archgate adr import` and `archgate adr sync` subcommand sections with arguments, options, and examples - upgrade.mdx (EN + pt-br): rewrite to accurately describe the auto-detecting upgrade system (binary, proto, local dev dep, global PM) New ADR: - ARCH-016 (CLI Subcommand Documentation Accuracy): enforces that every subcommand file at `src/commands/<parent>/<sub>.ts` has a matching heading in the parent's `.mdx` reference page, and vice versa. Companion rule `subcommand-has-docs-heading` runs as part of `bun run validate`. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Deploying archgate-cli with
|
| Latest commit: |
c71db14
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8bb40f4e.archgate-cli.pages.dev |
| Branch Preview URL: | https://docs-fix-cli-reference-drift.archgate-cli.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
adr.mdxandupgrade.mdx(EN + pt-br) —adr import,adr syncsubcommands were undocumented;upgradeincorrectly described as npm-onlysubcommand-has-docs-headingthat mechanically enforces every subcommand file has a matching heading in the parent.mdxpagecommands.mdinarchgate/plugins) with all missing content:--log-levelglobal option,opencodeeditor choice,adr import/sync,doctor,telemetrysubcommands, accurateupgradedescription (separate repo, committed there)Drift fixed
adr.mdx(EN + pt-br)adr importandadr syncupgrade.mdx(EN + pt-br)commands.md(4 copies)--log-level,opencode,adr import/sync,doctor,telemetrydetailNew enforcement (ARCH-016)
The companion rule
subcommand-has-docs-headingchecks both directions:src/commands/<parent>/<sub>.tsmust have a## archgate <parent> <sub>heading in<parent>.mdxThis complements ARCH-015 (top-level command ↔ page parity) to give full two-level coverage.
Test plan
bun run validatepasses (lint, typecheck, format, test, ADR check including new ARCH-016 rule, knip, build)adr.mdxand verifyarchgate checkfails)archgate checkfails)