Repository Quality Report: CLI Help Text Consistency & Completeness (2026-02-27) #18695
Replies: 1 comment
-
|
🤖 Beep boop! The smoke test agent has materialized! I've arrived from the quantum realm of CI pipelines to leave my mark on this discussion. Like a ghost in the machine, I drift through GitHub Actions workflows, testing, verifying, and occasionally composing haikus. Fear not, for I come in peace — armed with nothing but assertion statements and a deep appreciation for green checkmarks. ✅ The smoke test agent was here. 👻
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🎯 Repository Quality Improvement Report — CLI Help Text Consistency & Completeness
Analysis Date: 2026-02-27
Focus Area: CLI Help Text Consistency & Completeness
Strategy Type: Custom
Custom Area: Yes — CLI commands are the primary user-facing API of
gh aw; their help text is the first and often only documentation users encounter. Inconsistencies in example count, string patterns, and cobra field usage create a subtle but real friction for new contributors and users.Executive Summary
Analysis of all 27 CLI command files revealed two categories of quality issues. First, two commands (
hash_command.goandsecrets_command.go) have fewer than the 3 examples required by AGENTS.md, reducing discoverability of common use cases. Second, a significant subset of command files — particularly in themcp_*family — embed raw"gh aw"string literals in example blocks rather than using theconstants.CLIExtensionPrefixconstant used by the rest of the codebase. Additionally,tokens_bootstrap.gouses cobra's nativeExample:field while every other command embeds examples inside theLong:text — an inconsistency that affects how help is rendered.Overall the codebase is in good shape: 22 of 27 commands have well-structured Long descriptions and ≥3 examples. These are targeted, low-risk improvements that bring all commands to the same standard.
Full Analysis Report
Focus Area: CLI Help Text Consistency & Completeness
Current State Assessment
Metrics Collected:
Short:Long:CLIExtensionPrefix"gh aw"stringsExample:fieldFindings
Strengths
Short:andLong:descriptionsadd_command.go,audit.go,trial_command.go,logs_command.goare exemplary with 7–30+ examples# ...) in example linesAreas for Improvement
hash_command.go(2 examples) andsecrets_command.go(2 examples) fall below the minimum of 3 specified in AGENTS.md.CLIExtensionPrefixusage: 12 command files use raw"gh aw"string literals in example blocks instead ofstring(constants.CLIExtensionPrefix). This includes all MCP subcommand files (mcp_list.go,mcp_list_tools.go,mcp_inspect.go,mcp_add.go),project_command.go,secret_set_command.go,mcp_server_command.go,hash_command.go,secrets_command.go,tokens_bootstrap.go,init_command.go,completion_command.go.tokens_bootstrap.gouses the cobra-nativeExample:field; all other commands embed examples inside theLong:field. This causes different rendering behaviour ingh aw secrets bootstrap --help.Detailed Analysis
Commands with fewer than 3 examples:
hash_command.gosecrets_command.gohash_command.goexamples:Could add: specifying a custom --dir, using with
--jsonif applicable, or piping output.secrets_command.gois a parent command (group); its 2 examples show onlysecrets setandsecrets bootstrapwithout context.Files using raw "gh aw" string (not
CLIExtensionPrefix):All MCP command files (
mcp_list.go,mcp_list_tools.go,mcp_inspect.go,mcp_add.go) plus several others. These were likely written by different contributors without checking the existing convention. The risk is low (the value never changes), but it creates contributor confusion about the correct pattern.tokens_bootstrap.gocobraExample:vsLong:pattern:The cobra
Example:field is technically the more canonical approach (cobra renders it as a dedicated section in--help), but since the entire codebase uses theLong:-embedded pattern,tokens_bootstrap.goshould be aligned for consistency.🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: The following tasks are designed for GitHub Copilot coding agent execution. Please split these into individual work items for the agent to process.
Task 1: Add Missing Examples to
hash_command.goPriority: High
Estimated Effort: Small
Focus Area: CLI Help Text Completeness
Description:
hash_command.gohas only 2 examples in itsLong:text, violating the AGENTS.md requirement of a minimum of 3. Add at least one more meaningful example that demonstrates a common use case (e.g., using the hash to detect changes, or with the--dirflag if applicable).Acceptance Criteria:
hash_command.gohas ≥3 examples in theLong:text"gh aw"inline strings replaced withstring(constants.CLIExtensionPrefix)for consistencymake agent-finishpassesCode Region:
pkg/cli/hash_command.goTask 2: Add Missing Examples to
secrets_command.goPriority: High
Estimated Effort: Small
Focus Area: CLI Help Text Completeness
Description:
secrets_command.go(the parentsecretssubcommand group) has only 2 examples. Per AGENTS.md guidelines, all commands need a minimum of 3 examples. Add at least one more example showing a real-world usage pattern.Acceptance Criteria:
secrets_command.gohas ≥3 examplesset,bootstrap) with realistic flagsmake agent-finishpassesCode Region:
pkg/cli/secrets_command.goTask 3: Migrate MCP Command Files from Raw
"gh aw"toconstants.CLIExtensionPrefixPriority: Medium
Estimated Effort: Medium
Focus Area: CLI Help Text Consistency
Description:
The MCP command files (
mcp_list.go,mcp_list_tools.go,mcp_inspect.go,mcp_add.go) use raw"gh aw"string literals in theirLong:example blocks instead ofstring(constants.CLIExtensionPrefix). This is inconsistent withadd_command.go,audit.go,checks_command.go,health_command.go, and others which use the constant. Standardize to use the constant.Acceptance Criteria:
string(constants.CLIExtensionPrefix)in theirLong:examples"gh aw"string literals appear inLong:example sections of these filesmake agent-finishpassesCode Region:
pkg/cli/mcp_list.go,pkg/cli/mcp_list_tools.go,pkg/cli/mcp_inspect.go,pkg/cli/mcp_add.goTask 4: Align
tokens_bootstrap.goto UseLong:-Embedded Examples PatternPriority: Low
Estimated Effort: Small
Focus Area: CLI Help Text Consistency
Description:
tokens_bootstrap.gois the only command in the codebase using cobra's nativeExample:field. Every other command embeds examples inside theLong:text. This creates inconsistent rendering of--helpoutput. Aligntokens_bootstrap.goto use the same embedded-in-Long:pattern, and also update raw"gh aw"strings to useconstants.CLIExtensionPrefix.Acceptance Criteria:
tokens_bootstrap.goremoves theExample:cobra fieldLong:text field under anExamples:header"gh aw"strings replaced withstring(constants.CLIExtensionPrefix)make agent-finishpassesCode Region:
pkg/cli/tokens_bootstrap.go📊 Historical Context
Previous Focus Areas
🎯 Recommendations
Immediate Actions (This Week)
hash_command.go— Priority: Highsecrets_command.go— Priority: HighShort-term Actions (This Month)
Long:examples from raw"gh aw"toconstants.CLIExtensionPrefix— Priority: MediumLong-term Actions (This Quarter)
Example:field across all commands (it provides cleaner--helprendering) — Priority: Low📈 Success Metrics
Track these metrics to measure improvement in CLI Help Text Consistency & Completeness:
CLIExtensionPrefixconsistently: 14/26 → 26/26Example:field inconsistently: 1/26 → 0/26Next Steps
References:
Beta Was this translation helpful? Give feedback.
All reactions