Skip to content

fix(cli): resolve 32 CLI consistency issues (2026-07-01)#42832

Open
Copilot wants to merge 6 commits into
mainfrom
copilot/cli-consistency-h-1-h-2-fixes
Open

fix(cli): resolve 32 CLI consistency issues (2026-07-01)#42832
Copilot wants to merge 6 commits into
mainfrom
copilot/cli-consistency-h-1-h-2-fixes

Conversation

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Automated CLI consistency inspection identified 32 issues across help text, flag naming, and docs/CLI mismatches. Fixes span 29 files touching flag definitions, command descriptions, and documentation.

High severity

  • --disable-codemod--no-codemod — sole --disable-X flag in a codebase that uses --no-X everywhere else (fix, upgrade)
  • add-wizard flag parity — added --append, --force/-f, --name/-n, --no-security-scanner to match add/deploy
  • mcp list-tools description — was missing the "find workflows using a server" use-case; parent mcp described it, subcommand didn't
  • Markdown capitalisation — 6+ lowercase markdown instances in flag prose across add, add-wizard, deploy, trial, hash
  • completion docsbash/zsh/fish/powershell listed as subcommands; they're ValidArgs positional values; only install/uninstall are real subcommands

Medium severity

  • .lock.yml files — standardised from bare "lock files" in deploy, update, upgrade
  • Brand namesGitHub Projects V2 (was singular), Kanban (was lowercase) in project
  • --repo style in deploy — prose format aligned to parenthetical ([HOST/]owner/repo format) used by all other commands
  • --dir in lint — "Directory to scan for *.lock.yml files" → "Workflow directory" (standard form)
  • run --push docs — removed incorrect claim about requiring a clean working directory
  • Grammar/article fixes in forecast, --append description, --dry-run/--yes wording in trial

Low severity

  • Missing articles (a/the), missing commas, in batchin bulk, workflow(s)workflows, current repocurrent repository, prereleasepre-release in upgrade example
  • --output in outcomes now shows (default: ".github/aw/logs")
  • Unified --create-pull-request and --auto-merge-prs descriptions across add/update/upgrade/run/trial

Generated by 👨‍🍳 PR Sous Chef · 8.66 AIC · ⌖ 21.3 AIC · ⊞ 6.4K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CLI documentation and flag naming inconsistencies fix(cli): resolve 32 CLI consistency issues (2026-07-01) Jul 1, 2026
Copilot AI requested a review from pelikhan July 1, 2026 20:44
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Nice work on this CLI consistency sweep, @Copilot! 🎉 The systematic triage of 32 issues across flag naming, help text, capitalisation, and docs/CLI mismatches — all backed by a clear severity breakdown — is exactly what a polish PR should look like.

The diff touches 29 files and updates the corresponding test files alongside each command change, so coverage tracks the changes cleanly. The description is thorough and well-structured, making it easy for reviewers to understand the rationale for every fix.

This looks ready for review. Nothing blocking here — just awaiting @pelikhan's sign-off! 🚀

Generated by ✅ Contribution Check · 107.8 AIC · ⌖ 14.7 AIC · ⊞ 6.3K ·

@pelikhan pelikhan marked this pull request as ready for review July 1, 2026 21:45
Copilot AI review requested due to automatic review settings July 1, 2026 21:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies a broad set of CLI consistency fixes across gh aw, aligning flag naming, help text wording, and documentation with the actual command behavior and established conventions in the codebase.

Changes:

  • Renamed --disable-codemod to --no-codemod and updated related help text/tests/docs.
  • Added missing flag parity to add-wizard (--name/-n, --force/-f, --append, --no-security-scanner) and wired these through the interactive flow.
  • Standardized help text and docs wording (e.g., “.lock.yml files”, “Markdown”, completion docs subcommand vs positional args, run --push docs).
Show a summary per file
File Description
pkg/cli/upgrade_command.go Updates upgrade help text and renames codemod flag to --no-codemod.
pkg/cli/upgrade_command_test.go Updates tests for --no-codemod and wording tweaks.
pkg/cli/update_command.go Standardizes help strings (Markdown, redirect wording, .lock.yml wording, PR wording).
pkg/cli/update_command_test.go Updates security scanner flag help text expectation (“Markdown”).
pkg/cli/trial_command.go Improves trial help text and standardizes several flag descriptions (yes/dry-run/append/security scanner).
pkg/cli/project_command.go Standardizes “GitHub Projects V2” naming and “Kanban” capitalization.
pkg/cli/project_command_test.go Updates assertions for updated project command phrasing.
pkg/cli/outcomes_command.go Adjusts --output help text to show the default logs directory.
pkg/cli/mcp_list_tools.go Expands mcp list-tools description to include “find workflows using a server” use-case.
pkg/cli/mcp_list_tools_test.go Updates tests to match revised mcp list-tools short description.
pkg/cli/logs_command.go Minor grammar fix (“By default, …”).
pkg/cli/lint_command.go Updates --dir wording to the standard “Workflow directory”.
pkg/cli/init_command.go Minor grammar/article wording fixes in init help text.
pkg/cli/init_command_test.go Updates assertion for “current repository” wording.
pkg/cli/health_command.go Minor wording improvement (“over a time period”).
pkg/cli/hash_command.go Standardizes “Markdown” capitalization in help text.
pkg/cli/forecast_command.go Minor grammar improvement (“recently completed”).
pkg/cli/flags_test.go Updates “force” wording in stubbed command help text.
pkg/cli/fix_command.go Renames codemod flag to --no-codemod and updates retrieval.
pkg/cli/fix_command_test.go Updates test name and assertion for the new --no-codemod flag.
pkg/cli/env_command.go Standardizes “in bulk” wording.
pkg/cli/deploy_command.go Standardizes .lock.yml wording, repo flag prose, Markdown capitalization, and append wording.
pkg/cli/add_wizard_command.go Adds flag parity (--name, --force, --append, --no-security-scanner) and wires them into the interactive add config.
pkg/cli/add_wizard_command_test.go Updates engine list wording and adds a test for --name multi-workflow rejection.
pkg/cli/add_interactive_orchestrator.go Extends AddInteractiveConfig to carry new add-wizard options.
pkg/cli/add_interactive_git.go Propagates add-wizard options into AddResolvedWorkflows options used for PR creation.
pkg/cli/add_command.go Standardizes “Markdown” capitalization and append wording; keeps hidden security-scanner alias.
docs/src/content/docs/setup/cli.md Updates CLI docs for run --push, completion shell values vs subcommands, and codemod flag rename.
cmd/gh-aw/main.go Standardizes several command flag help strings (force/auto-merge-prs/dry-run/approve punctuation).

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 29/29 changed files
  • Comments generated: 7
  • Review effort level: Low

Comment thread pkg/cli/fix_command.go
verbose, _ := cmd.Flags().GetBool("verbose")
dir, _ := cmd.Flags().GetString("dir")
disabledCodemods, _ := cmd.Flags().GetStringSlice("disable-codemod")
disabledCodemods, _ := cmd.Flags().GetStringSlice("no-codemod")
Comment thread pkg/cli/fix_command.go
auditFlag, _ := cmd.Flags().GetBool("audit")
jsonOutput, _ := cmd.Flags().GetBool("json")
disabledCodemods, _ := cmd.Flags().GetStringSlice("disable-codemod")
disabledCodemods, _ := cmd.Flags().GetStringSlice("no-codemod")
Comment thread pkg/cli/upgrade_command.go
Comment thread pkg/cli/outcomes_command.go Outdated
Comment thread docs/src/content/docs/setup/cli.md Outdated
### The `--push` Flag

`gh aw run --push` stages all changes, commits them, and pushes before dispatching the workflow. It requires a clean working directory.
`gh aw run --push` stages workflow files only (including transitive imports), commits them, and pushes before dispatching the workflow. It does not require a clean working directory.
Comment thread cmd/gh-aw/main.go Outdated
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer failed during the skills-based review.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (132 new lines in pkg/cli/) but does not have a linked Architecture Decision Record (ADR).

📄 Draft ADR committed: docs/adr/42832-cli-flag-naming-convention-no-x-and-wizard-parity.md — review and complete it before merging.

🔒 This PR cannot merge until an ADR is linked in the PR body.

📋 What to do next
  1. Review the draft ADR committed to your branch — it was generated from the PR diff
  2. Complete the missing sections — add context the AI couldn't infer, refine the decision rationale, and list real alternatives you considered
  3. Commit the finalized ADR to docs/adr/ on your branch
  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-42832: CLI Flag Naming Convention

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

❓ Why ADRs Matter

"AI made me procrastinate on key design decisions. Because refactoring was cheap, I could always say 'I'll deal with this later.' Deferring decisions corroded my ability to think clearly."

ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you.

📋 Michael Nygard ADR Format Reference

An ADR must contain these four sections to be considered complete:

  • Context — What is the problem? What forces are at play?
  • Decision — What did you decide? Why?
  • Alternatives Considered — What else could have been done?
  • Consequences — What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ as Markdown files numbered by PR number (e.g., 42832-cli-flag-naming-convention-no-x-and-wizard-parity.md for PR #42832).

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · 66.3 AIC · ⌖ 11.8 AIC · ⊞ 8.4K ·
Comment /review to run again

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

🔶 Test Quality Score: 44/100 — Needs improvement

Analyzed 8 test(s): 3 design, 5 implementation, 0 violation(s).

📊 Metrics (8 tests)
Metric Value
Analyzed 8 (Go: 8, JS: 0)
✅ Design 3 (37.5%)
⚠️ Implementation 5 (62.5%)
Edge/error coverage 1 (12.5%)
Duplicate clusters 1
Inflation No
🚨 Violations 0
Test File Classification Issues
TestAddWizardCommand_NameFlagRejectsMultipleWorkflows (NEW) add_wizard_command_test.go:28 ✅ design_test
TestAddWizardCommandMentionsCrush add_wizard_command_test.go:12 ⚠️ implementation_test Exact string match only
TestNewFixCommand_HasNoCodemodFlag fix_command_test.go:519 ✅ design_test
flags_test.go stub update flags_test.go:268 ⚠️ implementation_test Wording-only update
TestNewInitCommand (codespaces flag) init_command_test.go:92 ⚠️ implementation_test Exact wording assertion
TestNewMCPListToolsSubcommand mcp_list_tools_test.go:328 ⚠️ implementation_test Exact string match
TestNewProjectNewCommand project_command_test.go:22 ⚠️ implementation_test Exact string match
TestUpgradeCommandHelpTextConsistency upgrade_command_test.go:12 ✅ design_test
⚠️ Flagged Tests (5)

TestAddWizardCommandMentionsCrush (add_wizard_command_test.go:12) — implementation_test. Updated from "Copilot, Claude, Codex, Gemini, or Crush" to lowercase. Asserts a literal substring of the long help text; does not verify all engines are listed—just exact casing. Any formatting change breaks the test without catching a real regression.

TestNewInitCommand (codespaces flag) (init_command_test.go:92) — implementation_test. Changed "repo" to "repository" — a cosmetic wording assertion. Enforces exact substring rather than the semantic requirement (flag must mention the current-repository scope).

TestNewMCPListToolsSubcommand (mcp_list_tools_test.go:328) — implementation_test. Asserts exact equality of cmd.Short string. Every copy-edit triggers a false failure without protecting behavior.

TestNewProjectNewCommand (project_command_test.go:22) — implementation_test. Changed "GitHub Project V2" to "GitHub Projects V2". Exact marketing-name assertion; registers every copy change as a test failure rather than catching functional regressions.

TestNewUpdateCommand_HasDisableSecurityScannerFlag (update_command_test.go:88) — implementation_test. Changed "markdown" to "Markdown" (capitalisation). Tests exact help string; does not verify flag behaviour or default value.

Recommendation: convert literal-string assertions to assert.Contains checks on a key semantic fragment so cosmetic copy changes don't trigger failures while real behavioral regressions still do.

Verdict

Failed. 62.5% implementation tests (threshold: 30%). The majority of changed tests are wording-lock assertions that update exact help strings rather than enforcing behavioral contracts. One new test (TestAddWizardCommand_NameFlagRejectsMultipleWorkflows) genuinely adds behavioral value. Consider converting string-equality assertions to assert.Contains checks on semantic key phrases.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🧪 Test quality analysis by Test Quality Sentinel · 47.9 AIC · ⌖ 22.7 AIC · ⊞ 6.8K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Test Quality Sentinel: 44/100. 62.5% implementation tests (threshold: 30%). The majority of changed tests update exact string literals for help text rather than enforcing behavioral contracts. Review flagged tests in the comment above.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REQUEST_CHANGES — blocking issues present

The existing inline comments (breaking --disable-codemod rename, vague --dry-run text, incorrect --push docs, --output default mismatch) are unresolved and sufficient to block merge on their own. New findings added this pass:

Additional issues found

High — test coverage gaps for new add-wizard flags (add_wizard_command_test.go): Three of the four flags added in this PR (--force, --append, --no-security-scanner) have zero tests. A flag-name typo in RunE silently zeros the value with no compile or runtime error.

High — fragile --output default in outcomes_command.go: Uses addOutputFlag(cmd, "") + a manual Lookup("output").Usage mutation instead of addOutputFlag(cmd, defaultLogsOutputDir) — the pattern every other output command uses. Cobra's DefValue remains "", so tab-completion and programmatic inspection report the wrong default. Fix is one line.

Medium — TestShortFlagConsistency not updated for add-wizard: New -f/--force and -n/--name shorthands were not added to the existing shorthand consistency test table.

🔎 Code quality review by PR Code Quality Reviewer · 128.9 AIC · ⌖ 9.96 AIC · ⊞ 1.6K
Comment /review to run again

err := cmd.Execute()
require.Error(t, err)
assert.EqualError(t, err, "--name flag cannot be used when adding multiple workflows at once")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three of the four new flags have zero test coverage: --force, --append, and --no-security-scanner are added to add-wizard but only --name is tested — and only for its error path.

💡 Why this matters

The flag reads in RunE use cmd.Flags().GetBool / GetString, but a typo in the flag name string would silently return the zero value with no compile or runtime error. The AddInteractiveConfig fields Force, AppendText, and DisableSecurityScanner are only populated via those reads — if the reads are wrong the flags are silently ignored.

Add flag-presence and type tests analogous to TestNewFixCommand_HasNoCodemodFlag:

func TestAddWizardCommand_HasForceFlag(t *testing.T) {
    cmd := NewAddWizardCommand(func(string) error { return nil })
    flag := cmd.Flags().Lookup("force")
    require.NotNil(t, flag)
    assert.Equal(t, "bool", flag.Value.Type())
    shortFlag := cmd.Flags().ShorthandLookup("f")
    require.NotNil(t, shortFlag, "-f shorthand should be registered")
}

Same pattern for --append (string) and --no-security-scanner (bool).

Comment thread pkg/cli/outcomes_command.go Outdated
addJSONFlag(cmd)
addRepoFlag(cmd)
addOutputFlag(cmd, "")
cmd.Flags().Lookup("output").Usage = "Output directory for generated files (default: \".github/aw/logs\")"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong pattern for default: fragile manual Usage override instead of consistent addOutputFlag call.

Every other command that has an --output flag calls addOutputFlag(cmd, defaultLogsOutputDir) so cobra's own default machinery is correct:

  • logs_command.go:359: addOutputFlag(logsCmd, defaultLogsOutputDir)
  • audit.go:109: addOutputFlag(cmd, defaultLogsOutputDir)
  • view_command.go:101: addOutputFlag(cmd, defaultLogsOutputDir)

This PR instead calls addOutputFlag(cmd, "") and then mutates the Usage string in-place. The cobra flag's DefValue remains "", so shell completions, programmatic flag inspection, and --help rendered by cobra's default formatter will report an empty string as the default while the usage prose says (default: ".github/aw/logs").

💡 Fix

Replace both lines with the same pattern used by every other output command:

addOutputFlag(cmd, defaultLogsOutputDir)

This makes cobra's default correct, keeps the help consistent with sibling commands, and stops the hint from silently going stale if defaultLogsOutputDir is ever renamed.

Comment thread pkg/cli/flags_test.go
func createNewCommandStub() *cobra.Command {
cmd := &cobra.Command{Use: "new"}
cmd.Flags().BoolP("force", "f", false, "Overwrite existing files")
cmd.Flags().BoolP("force", "f", false, "Overwrite existing workflow files")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestShortFlagConsistency was not updated for add-wizard's new -f/--force and -n/--name shorthands.

The test currently checks -f for new, add, update, and compile (lines 39–68), and -n for deploy and add, but add-wizard is not in either list despite this PR adding both shorthands to it.

💡 Suggested additions

Add cases to the -f and -n blocks in TestShortFlagConsistency:

// in the -f block
{
    name:         "add-wizard command has -f for --force",
    shortFlag:    "f",
    longFlag:     "force",
    commandSetup: func() *cobra.Command { return NewAddWizardCommand(func(string) error { return nil }) },
    description:  "add-wizard should have force short flag",
},
// in the -n block
{
    name:         "add-wizard command has -n for --name",
    shortFlag:    "n",
    longFlag:     "name",
    commandSetup: func() *cobra.Command { return NewAddWizardCommand(func(string) error { return nil }) },
    description:  "add-wizard should have name short flag",
},

This is the exact purpose of this test — catching shorthand regressions across commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: fix(cli): resolve 32 CLI consistency issues (2026-07-01)

The vast majority of changes are clean and correct — the help-text standardisations, Markdown capitalisation, article fixes, .lock.yml wording, add-wizard flag parity, and documentation clarifications are all well-executed and follow the established codebase conventions.

One blocking correctness issue must be resolved before merge.


🔴 Breaking change: --disable-codemod removed without a hidden backward-compat alias

Every other flag rename in this repository keeps the old name registered as a hidden alias so that existing scripts continue to work silently. Examples in this very PR:

New name Hidden alias kept
--no-security-scanner --disable-security-scanner
--no-release-bump --disable-release-bump
--no-secret --skip-secret
--no-codemod --disable-codemod ❌ missing

Without the alias, any CI workflow or developer script that uses gh aw fix --disable-codemod foo or gh aw upgrade --disable-codemod foo will break immediately with unknown flag: --disable-codemod.

See inline comments on pkg/cli/fix_command.go (line 85) and pkg/cli/upgrade_command.go (line 156) for the exact pattern to follow.


🟡 Minor issues (non-blocking)

  • cmd/gh-aw/main.go line 432: The --dry-run example comment still says # Validate without actually running after the flag description was changed to Preview

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 96.8 AIC · ⌖ 6.96 AIC · ⊞ 4.9K

Comments that could not be inline-anchored

pkg/cli/fix_command.go:85

Missing backward-compat hidden alias — breaking change.

Every other flag rename in this codebase keeps the old name as a hidden alias to avoid breaking existing scripts. For example, --disable-security-scanner, --disable-release-bump, and --skip-secret all use this pattern:

cmd.Flags().StringSlice(&quot;no-codemod&quot;, nil, &quot;Disable specific codemod IDs during the fix step (repeatable)&quot;)
cmd.Flags().StringSlice(&quot;disable-codemod&quot;, nil, &quot;Disable specific codemod IDs during the fix step</details>

<details><summary>pkg/cli/upgrade_command.go:156</summary>

Same issue as `fix_command.go`: `--disable-codemod` is removed without a hidden backward-compat alias.

Add the hidden alias to match every other rename in this codebase:

```go
cmd.Flags().StringSlice(&quot;no-codemod&quot;, nil, &quot;Disable specific codemod IDs during the fix step (repeatable)&quot;)
cmd.Flags().StringSlice(&quot;disable-codemod&quot;, nil, &quot;Disable specific codemod IDs during the fix step (repeatable)&quot;)
_ = cmd.Flags().MarkHidden(&quot;disable-codemod&quot;)

And mirror the fix in the GetStringSlice call a…

cmd/gh-aw/main.go:432

Stale inline comment — the flag description was changed from "Validate without actually triggering execution" to "Preview execution without applying any changes", but this example comment still says # Validate without actually running.

Update to match:

gh aw run daily-perf-improver --dry-run  # Preview execution without applying any changes

@copilot please address this.

pkg/cli/lint_command.go:75

The previous description &quot;Directory to scan for *.lock.yml files when no arguments are provided&quot; carried a behavior-important qualifier: --dir is only used when no positional arguments are given (the command accepts [lock-file-or-directory]...). The new &quot;Workflow directory&quot; is correct for visual consistency but silently drops this behavioral hint for users who mix --dir with positional args.

Consider: &quot;Workflow directory (used when no arguments are provided)&quot; as a middle-ground…

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Applied /diagnosing-bugs, /tdd, and /codebase-design across 29 changed files.

Two blocking issues require changes before merge:

  1. --disable-codemod removed without backward-compat alias (fix_command.go line 85 and upgrade_command.go line 156) — this is a breaking change. Every analogous rename in this codebase keeps the old flag as a hidden alias (--disable-security-scanner, --skip-secret, --disable-release-bump). The same pattern must be applied here to avoid silently breaking existing scripts.

  2. run --dry-run description loses important semantics (cmd/gh-aw/main.go lines 793 & 432) — the new text matches trial --dry-run verbatim and omits that no GitHub Actions dispatch occurs. The example comment on line 432 also still uses the old phrasing.

Non-blocking: add-wizard new flags (--name, --force, --append, --no-security-scanner) lack individual presence tests.

Positive highlights: great breadth, accurate --push doc fix, completion subcommand accuracy fix, and --disable-security-scanner hidden-alias pattern correctly applied in add-wizard. 🎉

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 146.3 AIC · ⌖ 7.06 AIC · ⊞ 6.6K ·
Comment /matt to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 146.3 AIC · ⌖ 7.06 AIC · ⊞ 6.6K
Comment /matt to run again

Comments that could not be inline-anchored

pkg/cli/fix_command.go:85

[/diagnosing-bugs] Breaking change: --disable-codemod was removed entirely without a backward-compat hidden alias, unlike --disable-security-scanner which is kept as a hidden alias in every command that uses it. Existing CI scripts using gh aw fix --disable-codemod=rule-id will silently fail with an unknown-flag error after this rename.

<details>
<summary>💡 Suggested fix — mirror the --disable-security-scanner pattern</summary>

cmd.Flags().StringSlice(&quot;no-codemod&quot;, nil, &quot;Di</details>

<details><summary>pkg/cli/upgrade_command.go:156</summary>

**[/diagnosing-bugs]** Same backward-compat gap as `fix_command.go`: `--disable-codemod` is removed with no hidden alias in `upgrade` either. Scripts using `gh aw upgrade --disable-codemod=rule-id` will break silently.

&lt;details&gt;
&lt;summary&gt;💡 Apply the same fix here&lt;/summary&gt;

```go
cmd.Flags().StringSlice(&quot;no-codemod&quot;, nil, &quot;Disable specific codemod IDs during the fix step (repeatable)&quot;)
cmd.Flags().StringSlice(&quot;disable-codemod&quot;, nil, &quot;Disable specific codemod IDs during the fix step (repeatabl…

</details>

<details><summary>pkg/cli/add_wizard_command_test.go:26</summary>

**[/tdd]** The new `--name`, `--force`, `--append`, and `--no-security-scanner` flags added to `add-wizard` each have no dedicated test covering their presence and basic wiringonly the mutual-exclusion guard for `--name` is tested.

&lt;details&gt;
&lt;summary&gt;💡 Suggested additions&lt;/summary&gt;

```go
func TestAddWizardCommand_HasFlagParity(t *testing.T) {
    cmd := NewAddWizardCommand(func(string) error { return nil })
    require.NotNil(t, cmd)

    for _, flagName := range []string{&quot;name&quot;, &quot;force&quot;,…

</details>

<details><summary>cmd/gh-aw/main.go:793</summary>

**[/codebase-design]** `run --dry-run` changed from *&quot;Validate workflow without actually triggering execution on GitHub Actions&quot;* to *&quot;Preview execution without applying any changes&quot;* — the new wording is identical to `trial --dry-run` and loses the important detail that it suppresses actual GitHub Actions dispatch. Callers reading the help text may not realise this flag prevents the workflow from ever reaching GitHub.

&lt;details&gt;
&lt;summary&gt;💡 Suggested wording&lt;/summary&gt;

```go
&quot;Preview workflow …

</details>

<details><summary>pkg/cli/add_wizard_command.go:75</summary>

**[/diagnosing-bugs]** `disableSecurityScannerLegacy` is read from `&quot;disable-security-scanner&quot;` but that flag is also declared as a **full visible flag** on the wizard command (line 141) rather than a hidden alias. This means `--disable-security-scanner` will appear in `--help` output for `add-wizard` even though the PR intent is to make it undocumented. The flag should be marked hidden immediately after declaration, matching the pattern used in every other command.

&lt;details&gt;
&lt;summary&gt;💡 One-l…

</details>

<details><summary>cmd/gh-aw/main.go:432</summary>

**[/codebase-design]** The inline example comment on line 432 still reads `# Validate without actually running` but the flag description on line 793 was updated to `Preview execution without applying any changes`. These two phrases now describe the same flag differently, which creates noise for users scanning the help output.

&lt;details&gt;
&lt;summary&gt;💡 Suggested change&lt;/summary&gt;

```go
gh aw run daily-perf-improver --dry-run  # Preview without dispatching to GitHub Actions

Keeping both the exa…

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Triage — §28558548389

Field Value
Category chore
Risk 🟡 Medium
Score 50 / 100
Priority Medium
Recommended Action 👥 batch_review

Score breakdown: Impact 30 · Urgency 15 · Quality 5

Rationale: 30-file CLI consistency pass (flag naming, help text, flag parity). High user-facing value but currently blocked by CHANGES_REQUESTED reviews citing a breaking --disable-codemod removal and test coverage gaps for new add-wizard flags. Agent should resolve the blocking inline comments before this is ready for human review.

Generated by 🔧 PR Triage Agent · 52.1 AIC · ⌖ 8.26 AIC · ⊞ 1.6K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once the branch is up to date.

Generated by 👨‍🍳 PR Sous Chef · 8.66 AIC · ⌖ 21.3 AIC · ⊞ 6.4K ·

…utcomes default, dry-run text, push docs

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once the branch is up to date.

...

All unresolved review threads addressed in commit fix(cli): address review feedback - hidden --disable-codemod alias, outcomes default, dry-run text, push docs:

  • --disable-codemod backward compat (fix, upgrade): Added a hidden --disable-codemod StringSlice alias whose values are merged into --no-codemod, matching the --disable-release-bump/--disable-security-scanner pattern used by update.
  • outcomes --output default: Changed addOutputFlag(cmd, "") + manual .Usage override to addOutputFlag(cmd, defaultLogsOutputDir), so Cobra/pflag renders the default consistently ((default: ".github/aw/logs")).
  • --dry-run wording: Reverted to the original precise text: "Validate workflow without actually triggering execution on GitHub Actions".
  • run --push staged-files constraint: Docs now note that --push aborts when there are already staged files not part of the workflow set.

Local validation: make fmt, make lint, make test-unit, make agent-report-progress all pass. CI will need a human re-trigger to confirm.

Copilot AI requested a review from gh-aw-bot July 2, 2026 02:32
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, resolve the open review feedback, and rerun checks once the branch is ready. Unresolved review threads: github-actions[bot] #42832 (comment); github-actions[bot] #42832 (comment); github-actions[bot] #42832 (comment); Copilot #42832 (comment); Copilot #42832 (comment).

Generated by 👨‍🍳 PR Sous Chef · 26.9 AIC · ⌖ 10.6 AIC · ⊞ 6.4K ·

…ecurity-scanner and update TestShortFlagConsistency

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, resolve the open review feedback, and rerun checks once the branch is ready. Unresolved review threads: github-actions[bot] https://github.com/github/gh-aw...

Addressed all open threads in commit test(cli): add flag coverage for add-wizard --force, --append, --no-security-scanner and update TestShortFlagConsistency:

  • add_wizard_command_test.go (r3509861672): Added TestAddWizardCommand_HasForceFlag, TestAddWizardCommand_HasAppendFlag, and TestAddWizardCommand_HasNoSecurityScannerFlag — covering type, presence, and -f shorthand for the three new flags.
  • flags_test.go (r3509861678): Added add-wizard to the -f/--force block in TestShortFlagConsistency, added a new -n/--name block covering add, deploy, and add-wizard.
  • The outcomes_command.go (r3509861674) and docs/cli.md/cmd/gh-aw/main.go threads were already resolved by the previous commit.

Local: make agent-report-progress passes (lint + all unit tests green).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cli-consistency] CLI Consistency Issues - 2026-07-01

4 participants