Skip to content

[cli-consistency] CLI Consistency Issues - 2026-11-17 #78749

Done

Description

@github-actions

Static inspection of the gh aw CLI help output (all-help.txt plus per-command help files, deduplicated) against docs/src/content/docs/setup/cli.md and the command source. Found 3 high, 4 medium, and 4 low findings. Items marked "confirmed" were checked in source or docs. The audit runtime behavior was not executed.

Summary and severity breakdown

Severity Count Theme
High 3 Docs advertise a flag that does not exist; help promises a requirement the code does not enforce
Medium 4 Docs omit real flags; --timeout type split across commands
Low 4 Flag type and description drift

High

1. project new documents a -l short flag that does not exist (confirmed)

  • Affected: project new
  • Docs (cli.md, project new section): --link/-l
  • Source (pkg/cli/project_command.go:108): cmd.Flags().String("link", "", "Repository to link project to (format: owner/repo)"). No short form.
  • Expected: docs and code agree. Either drop -l from the docs or add "l" to the flag definition.
  • Priority: high. Users copying the documented short flag get an unknown-flag error.

2. audit help says --repo is required for bare run IDs, but nothing enforces it (partially confirmed)

  • Affected: audit
  • Help (pkg/cli/audit_command.go:46): "--repo required" for bare run IDs.
  • Source: applyAuditRepoFlag (audit_command.go ~286–296) returns nil when --repo is empty (if repoFlag == "" || components.Owner != ""). No parse-time error is raised. ParseRunURLExtended returns a numeric ID with empty Owner and Repo, and nothing checks for them.
  • Not verified: whether AuditWorkflowRun with empty owner fails later or silently falls back to the current repository. Confirm at runtime.
  • Expected: either enforce --repo with a clear error, or change the help to match the actual fallback behavior.
  • Priority: high. Either the help is wrong or a required-argument check is missing.

3. --timeout docs omit two commands, and the type is split (confirmed)

  • Affected: connector, logs episode, plus the timeout table in cli.md (~lines 31–37)
  • Help: --timeout is int minutes for forecast, logs, trial, and duration for audit, health, connector (default 20s), and logs episode (default 5m0s).
  • Docs: the table covers the split but omits connector and logs episode.
  • Expected: the table lists every command with its type, unit, and default.
  • Priority: high for the omission. Users cannot tell whether --timeout 10 means minutes or seconds for connector.

Medium

4. logs docs omit --retained (confirmed)

  • Affected: logs. Source: pkg/cli/logs_outcomes.go:58, read at logs_command.go:211.
  • Docs: cli.md has 0 mentions of --retained. The logs Options list (~line 784) omits it.
  • Expected: add the flag to the Options list.

5. Undocumented work-queue flags (confirmed)

  • Affected: work-queue subcommands
  • Confirmed 0 mentions in cli.md for: --pool, --claim-id, --epoch, --max-claims, --worker-profile, --before-claim, --obsolete, --from-config. Also undocumented: --max-dispatches, --offset, --priority, --run-id, --execution-ref, --expires-at.
  • Some are covered inside the per-subcommand table (for example dispatch-next --max-bytes), so this is partial coverage, not a complete gap.
  • Expected: list each flag in the subcommand table with its meaning, or link to the reference page.

6. --timeout type is inconsistent across commands

  • int (minutes): forecast, logs, trial (default 30)
  • duration: audit, health (default 2m0s), connector, logs episode
  • Expected: one convention. The reference docs should at least state the unit per command. Changing the type is a breaking change and should be handled separately.

7. --claim-id and --work-id value types differ between work-queue subcommands

  • Some subcommands define them as string, others as strings (array).
  • Expected: consistent types for the same concept, or a documented reason for the difference.
Lower-priority findings (low severity)

8. --name short-flag inconsistency

  • add and deploy define --name/-n. work-queue control --name has no short form and takes a different meaning (a credential generation name).
  • Likely intentional. Low priority, but worth a note in the docs.

9. --grant type differs

  • compile --grant is bool. connector --grant is stringArray.
  • Expected: confirm the difference is intentional and documented.

10. Description wording drift

  • --repo: three variants: "Target repository (owner/repo format)" (23 uses), "Target repository ([HOST/]owner/repo format). Defaults to current repository" (21), "owner/repo format only; GHES host prefixes are not supported" (env, doctor). The variation is partly intentional.
  • --output: "Output directory for generated files" (audit, logs), "Directory for compact artifacts" (logs episode), "Write session text to a file" (sessions download).
  • --dry-run: compile's description is a long multi-clause sentence, unlike the rest.
  • Expected: shared phrasing for shared flags.

11. Unverified: audit and graders Options lists may not match their commands

  • cli.md (~line 1001) lists --adoption-dir under audit, which audit does not define. The same list omits many real audit flags (--adoption, --delivery, --evals, --experiment, --group, --models, --no-baseline, --parse, --runtime, --search, --search-limit, --stdin, --timeout, --variant), though some are covered in prose.
  • The graders Options list (~line 1092) includes --episodes, --delivery, --adoption, and --adoption-dir. graders run defines only --additional-grader, --logs-dir, and --repo.
  • These may be heading-attribution artifacts of the inspection script. Confirm against cli.md before fixing.

Inspection metadata

  • Date: 2026-11-17
  • Commands inspected: about 45 top-level commands and their subcommands, from all-help.txt and about 373 per-command help files. Many of those files are duplicates of the root help (byte-identical copies) or error text from argument-less invocations, so they were deduplicated first.
  • Method: static analysis. Flag names, types, defaults, and descriptions were compared across commands. Help-example flags were checked against each subcommand's definitions. Docs Options lists were compared against help. Items were spot-checked in pkg/cli/*.go.
  • Not done: runtime invocation of audit without --repo, and a dictionary-based typo scan (no spell checker is installed in this environment). No typos were confirmed.

Suggested priority order

  1. Fix the project new -l doc/code mismatch (finding 1).
  2. Decide on the audit --repo behavior and make the help match (finding 2).
  3. Complete the --timeout table and the logs --retained entry (findings 3 and 4).
  4. Document the work-queue flags (finding 5).
  5. Consider unifying --timeout and the --claim-id types in a follow-up (findings 6 and 7).
  6. Clean up the low-priority items if time allows.

Generated by ✅ CLI Consistency Checker · copilot · routed: haiku55 xhigh · ~10 AIC · ⌖ ~1 AIC · ⊞ 3.4K · ◷

  • expires on Nov 19, 2026, 5:36 AM UTC-08:00

Activity

  1. added
    documentation
    cookie
    on Nov 17, 2026
  2. github-actions commented on Nov 17, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, Copilot will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt50 · ~1 AIC · ⌖ ~1 AIC · ⊞ 11.3K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

automationclicookiedocumentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions