Repository navigation
fix(cli): fill help-text gaps for doctor, adf tidy, adf vendor, adf context - #387
Merged
Merged
Conversation
…ontext (#363) - Root --help: doctor line lists --ci and --format, plus the hook-only --staged/--tidy-skipped; the adf entry names all 15 subcommands. - adf --help: describe tidy --source and --print-paths; one line per adf vendor subcommand with its flags; add the missing adf context entry. Merged the fmt/sync --explain blocks and rewrapped a few descriptions so adf.ts stays under its LOC ceiling (net -1 line). - cli-reference: document doctor --format json. - Tests pin the new help lines and check that the adf subcommand list in both helps matches adfCommand's dispatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adf context needs --files or --keywords; sync --explain takes no --ai-dir; tidy --ci only gates with --dry-run. Same line count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #363
Help-text gaps found during 2.0.0 release prep.
Root
charter --help(packages/cli/src/index.ts, 271/297cli_entry_loc)charter doctor [--adf-only] [--ci] [--format text|json], with--ci(exit 1 on any WARN; doctor has no FAIL status) and--format json, plus the pre-commit-hook-only--staged [--tidy-skipped "<files>"]marked as such.charter adf <subcommand>entry named 9 subcommands; it now names all 15 thatadfCommanddispatches and points tocharter adf --help.charter adf --help(packages/cli/src/commands/adf.ts,adf_commands_locunchanged at 1035/1041)tidy: describes--source <file>(repeatable) and--print-paths(onlyvendor <path>/module <path>lines, dry-run aware, not with--format json), matching docs/cli-reference.md.vendor: one line per subcommand with its flags:status [--all],set <file> <mode> [--dry-run],init [--dry-run],restore <file> [--dry-run],rename-legacy [--dry-run]. The old one-line usage implied--dry-runapplied tostatusand didn't describeinitorrename-legacy.adf contextwas missing fromadf --help; added (--files,--keywords,--bundle,--ai-dir).compile --mode: checked against docs/cli-reference.md and adf-compile.ts; the help already matches (onlycompiled, with--write), so it's unchanged.fmt --explainand threesyncblocks were merged into their usage entries, and a few long descriptions were rewrapped (no content dropped).docs/cli-reference.md: doctor's flag list now includes
--format json.Tests (
help-routing.test.ts): pin the new doctor line and hook-only flags; assert everyadfsubcommand appears in the root help's adf entry and ascharter adf <sub>inadf --help; a guard test derives the subcommand list fromadfCommand's "Supported:" error, so a new subcommand without help fails the suite (that is how the missingadf contextwas found); pin the tidy and vendor lines.CHANGELOG:
[Unreleased]/ Fixed entry added.Verification
pnpm run build; full vitest suite run serially: 1763 passed, only the 3 known Windows-only failures (bootstrap bootstrap: phases 6/7 collect warnings without printing them; absoluteAiDirArg misses Windows paths on POSIX #307, context-refresh, serve-context).Review follow-up (second commit, same line count)
adf contextusage shows that--filesand/or--keywordsis required (exit 2 without either).adf sync --explainis shown separately; it does not read--ai-dir.adf tidy --cistates that it only gates together with--dry-run.Not addressed (nits, out of scope):
doctor --mcpremains undocumented;tidy --verboseis not in the help; the guard test reads the hand-written "Supported:" string, so a newcaseadded without updating that string would slip past it.🤖 Generated with Claude Code