Skip to content

fix(cli): fill help-text gaps for doctor, adf tidy, adf vendor, adf context - #387

Merged
stackbilt-admin merged 2 commits into
mainfrom
fix/help-text-363
Oct 18, 2026
Merged

stackbilt-admin merged 2 commits into
mainfrom
fix/help-text-363

Conversation

@stackbilt-admin

@stackbilt-admin stackbilt-admin commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Closes #363

Help-text gaps found during 2.0.0 release prep.

Root charter --help (packages/cli/src/index.ts, 271/297 cli_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.
  • The charter adf <subcommand> entry named 9 subcommands; it now names all 15 that adfCommand dispatches and points to charter adf --help.

charter adf --help (packages/cli/src/commands/adf.ts, adf_commands_loc unchanged at 1035/1041)

  • tidy: describes --source <file> (repeatable) and --print-paths (only vendor <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-run applied to status and didn't describe init or rename-legacy.
  • adf context was missing from adf --help; added (--files, --keywords, --bundle, --ai-dir).
  • compile --mode: checked against docs/cli-reference.md and adf-compile.ts; the help already matches (only compiled, with --write), so it's unchanged.
  • To stay within the ceiling, the separate fmt --explain and three sync blocks 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 every adf subcommand appears in the root help's adf entry and as charter adf <sub> in adf --help; a guard test derives the subcommand list from adfCommand's "Supported:" error, so a new subcommand without help fails the suite (that is how the missing adf context was found); pin the tidy and vendor lines.

CHANGELOG: [Unreleased] / Fixed entry added.

Verification

Review follow-up (second commit, same line count)

  • adf context usage shows that --files and/or --keywords is required (exit 2 without either).
  • adf sync --explain is shown separately; it does not read --ai-dir.
  • adf tidy --ci states that it only gates together with --dry-run.

Not addressed (nits, out of scope): doctor --mcp remains undocumented; tidy --verbose is not in the help; the guard test reads the hand-written "Supported:" string, so a new case added without updating that string would slip past it.

🤖 Generated with Claude Code

kovermier and others added 2 commits October 17, 2026 20:30
…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>
@stackbilt-admin
stackbilt-admin merged commit 6a50162 into main Oct 18, 2026
7 checks passed
@stackbilt-admin
stackbilt-admin deleted the fix/help-text-363 branch October 18, 2026 01:50
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.

help text: doctor, adf tidy --print-paths and adf vendor commands are missing or undocumented

2 participants