From 58504e8cca285ed7992b68e93cdd2cdec955fd59 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 14:52:18 +0000 Subject: [PATCH 1/3] Initial plan From 83665b011e02d860da5df3db5de72d8603352c3a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 15:10:30 +0000 Subject: [PATCH 2/3] fix: resolve CLI consistency issues from 2026-07-22 inspection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - A-1: Update engine lists (add-wizard, completion) from 4 to 7 engines - A-3: Fix inconsistent verb form in fix command (Write → Writes) - A-4: Remove scare-quotes around 'simulated' in trial command - A-6: Fix inconsistent casing in init flags (Agentic Workflows → agentic-workflows) - A-7: Standardize --artifacts default description style (audit.go) - A-8: Fix mixed noun/verb list in deploy command Long description - A-9: Fix dangling participle in mcp-server command Long description - B-2: Fix misleading --no-release-bump flag description - B-4: Clarify compile --force only applies when --dependabot is set - B-5: Add note that deploy always creates a PR - C-2: Update secrets bootstrap --engine list to all 7 engines in docs - C-3: Add health --days valid values (7, 30, 90) to docs - C-8: Add --evals to audit options list in docs - D-4: Fix bare numeric ID audit example to include --repo - D-5: Improve --cache-before example comments in docs - D-7: Improve init --engine claude example comment Closes #47332 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- cmd/gh-aw/main.go | 2 +- docs/src/content/docs/setup/cli.md | 12 +++++++----- pkg/cli/add_wizard_command.go | 2 +- pkg/cli/audit.go | 4 ++-- pkg/cli/completion_command.go | 2 +- pkg/cli/deploy_command.go | 4 ++-- pkg/cli/fix_command.go | 2 +- pkg/cli/init_command.go | 4 ++-- pkg/cli/mcp_server_command.go | 3 +-- pkg/cli/trial_command.go | 2 +- pkg/cli/update_command.go | 4 ++-- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/cmd/gh-aw/main.go b/cmd/gh-aw/main.go index 3a77cccfe2d..e34649c1c7f 100644 --- a/cmd/gh-aw/main.go +++ b/cmd/gh-aw/main.go @@ -737,7 +737,7 @@ Use "` + string(constants.CLIExtensionPrefix) + ` help all" to show help for all compileCmd.Flags().Bool("use-samples", false, "Hidden: replace the agentic 'Execute coding agent' step with a deterministic driver that replays the workflow's safe-outputs `samples` frontmatter entries through the safe-outputs MCP server. Used to make end-to-end tests deterministic.") _ = compileCmd.Flags().MarkHidden("use-samples") compileCmd.Flags().Bool("dependabot", false, "Generate dependency manifests (package.json, requirements.txt, go.mod) and Dependabot config when dependencies are detected") - compileCmd.Flags().BoolP("force", "f", false, "Force overwrite of existing dependency files (e.g., dependabot.yml)") + compileCmd.Flags().BoolP("force", "f", false, "Force overwrite of existing dependency files (only applies when --dependabot is set; e.g., dependabot.yml)") compileCmd.Flags().Bool("refresh-stop-time", false, "Force regeneration of stop-after times instead of preserving existing values from lock files") compileCmd.Flags().Bool("force-refresh-action-pins", false, "Force refresh of action pins by clearing the cache and resolving all action SHAs from GitHub API") compileCmd.Flags().Bool("allow-action-refs", false, "Allow unresolved action refs and emit warnings instead of failing validation") diff --git a/docs/src/content/docs/setup/cli.md b/docs/src/content/docs/setup/cli.md index f3740c87667..8f78be161a5 100644 --- a/docs/src/content/docs/setup/cli.md +++ b/docs/src/content/docs/setup/cli.md @@ -263,7 +263,7 @@ gh aw secrets bootstrap --engine copilot # Check only Copilot se gh aw secrets bootstrap --non-interactive # Display missing secrets without prompting ``` -**Options:** `--engine` (copilot, claude, codex, gemini), `--non-interactive`, `--repo` +**Options:** `--engine` (copilot, claude, codex, gemini, antigravity, opencode, pi), `--non-interactive`, `--repo` See [Authentication](/gh-aw/reference/auth/) for details. @@ -480,9 +480,9 @@ gh aw logs "ci failure doctor" # Case-insensitive display name **`--cache-before` flag (cache cleanup):** Deletes cached run folders in the output directory whose run creation date is older than the specified cutoff. Accepts the same date/time delta formats as `--start-date` and `--end-date` (e.g. `-1d`, `-1w`, `-1mo`) as well as absolute dates (`YYYY-MM-DD`). Cleanup runs before the download step to free disk space first; failures are non-fatal and logged as warnings. The previous `--after` spelling is kept as a hidden, deprecated alias. ```bash wrap -gh aw logs --cache-before -1w # Clean folders older than 1 week, then download latest runs -gh aw logs --cache-before -30d # Clean folders older than 30 days -gh aw logs --cache-before 2024-01-01 # Clean folders from before a specific date +gh aw logs --cache-before -1w # Evict local cache older than 1 week, then proceed with normal run download +gh aw logs --cache-before -30d # Evict local cache entries older than 30 days +gh aw logs --cache-before 2024-01-01 # Evict local cache entries from before a specific date gh aw logs my-workflow --cache-before -1mo -c 20 # Clean up, then download 20 runs of a specific workflow ``` @@ -532,7 +532,7 @@ echo -e "1234567890\n9876543210" | gh aw audit --stdin # diff mode: first is b cat run-ids.txt | gh aw audit --stdin --repo owner/repo ``` -**Options:** `--artifacts`, `--experiment`, `--format`, `--json/-j`, `--output/-o`, `--parse`, `--repo/-r`, `--stdin`, `--variant` +**Options:** `--artifacts`, `--evals`, `--experiment`, `--format`, `--json/-j`, `--output/-o`, `--parse`, `--repo/-r`, `--stdin`, `--variant` The `--repo` flag accepts `owner/repo` format and is required when passing a bare numeric run ID without a full URL, allowing the command to locate the correct repository. @@ -612,6 +612,8 @@ gh aw health issue-monster --days 90 # 90-day metrics for workflow **Options:** `--days`, `--threshold`, `--repo/-r`, `--json/-j` +The `--days` flag accepts 7, 30, or 90 (default: 7). Other values produce an error. + Shows success/failure rates, trend indicators (↑ improving, → stable, ↓ degrading), execution duration, token usage, costs, and warnings when success rate drops below threshold. #### `checks` diff --git a/pkg/cli/add_wizard_command.go b/pkg/cli/add_wizard_command.go index f3ddaabaab1..7e1830a18dd 100644 --- a/pkg/cli/add_wizard_command.go +++ b/pkg/cli/add_wizard_command.go @@ -19,7 +19,7 @@ func NewAddWizardCommand(validateEngine func(string) error) *cobra.Command { Long: `Interactively add one or more agentic workflows with guided setup. This command walks you through: - - Selecting an AI engine (Copilot, Claude, Codex, or Gemini) + - Selecting an AI engine (Copilot, Claude, Codex, Gemini, Antigravity, OpenCode, or Pi) - Configuring API keys and secrets - Creating a pull request with the workflow - Optionally running the workflow immediately diff --git a/pkg/cli/audit.go b/pkg/cli/audit.go index 927c0f60b5b..cb4ac298816 100644 --- a/pkg/cli/audit.go +++ b/pkg/cli/audit.go @@ -59,7 +59,7 @@ When a job URL is provided (single-run mode only): - If no step number, finds and extracts the first failing step's output - Saves job logs to the output directory` -var auditCommandExample = ` ` + string(constants.CLIExtensionPrefix) + ` audit 1234567890 # Audit run with ID 1234567890 +var auditCommandExample = ` ` + string(constants.CLIExtensionPrefix) + ` audit 1234567890 --repo owner/repo # Audit with bare run ID (--repo required) ` + string(constants.CLIExtensionPrefix) + ` audit https://github.com/owner/repo/actions/runs/1234567890 # Audit from run URL ` + string(constants.CLIExtensionPrefix) + ` audit https://github.com/owner/repo/actions/runs/1234567890/job/9876543210 # Audit job and extract first failing step ` + string(constants.CLIExtensionPrefix) + ` audit https://github.com/owner/repo/actions/runs/1234567890/job/9876543210#step:7:1 # Extract step 7 output @@ -108,7 +108,7 @@ func registerAuditCommandFlags(cmd *cobra.Command) { addRepoFlag(cmd) cmd.Flags().Bool("parse", false, "Run JavaScript parsers on agent logs and firewall logs, writing Markdown to log.md and firewall.md") cmd.Flags().String("format", "pretty", "Diff output format for multi-run mode: pretty, markdown") - cmd.Flags().StringSlice("artifacts", nil, "Artifact sets to download (default: all, because auditing requires comprehensive artifacts for analysis). Valid sets: "+strings.Join(ValidArtifactSetNames(), ", ")) + cmd.Flags().StringSlice("artifacts", nil, "Artifact sets to download (default: all — comprehensive artifacts required for analysis). Valid sets: "+strings.Join(ValidArtifactSetNames(), ", ")) cmd.Flags().Bool("stdin", false, "Read workflow run IDs or URLs from stdin (one per line) instead of positional arguments") cmd.Flags().String("experiment", "", "Filter to runs that include this experiment name") cmd.Flags().String("variant", "", "Filter to runs with a specific variant value (requires --experiment)") diff --git a/pkg/cli/completion_command.go b/pkg/cli/completion_command.go index 2eaee013bbc..20e7dbe8459 100644 --- a/pkg/cli/completion_command.go +++ b/pkg/cli/completion_command.go @@ -20,7 +20,7 @@ func NewCompletionCommand() *cobra.Command { Tab completion provides: - Command name completion (add, compile, run, etc.) - Workflow name completion for commands that accept workflow arguments -- Engine name completion for --engine flag (copilot, claude, codex, gemini) +- Engine name completion for --engine flag (copilot, claude, codex, gemini, antigravity, opencode, pi) - Directory path completion for --dir flag - Helpful descriptions for workflows when available diff --git a/pkg/cli/deploy_command.go b/pkg/cli/deploy_command.go index 45729215aed..1cfa77b1ece 100644 --- a/pkg/cli/deploy_command.go +++ b/pkg/cli/deploy_command.go @@ -28,9 +28,9 @@ func NewDeployCommand(validateEngine func(string) error) *cobra.Command { cmd := &cobra.Command{ Use: "deploy ...", Short: "Deploy agentic workflows to a target repository using a pull request", - Long: `Deploy one or more workflows to a target repository by combining clone, update, add, compile, and pull request creation. + Long: `Deploy one or more workflows to a target repository by cloning the target repository, updating existing workflows, adding specified workflows, compiling lock files, and opening a pull request. -The command clones the target repository, updates existing workflows from source, adds the specified workflows, recompiles lock files with purge enabled, and opens a pull request.`, +The command clones the target repository, updates existing workflows from source, adds the specified workflows, recompiles lock files with purge enabled, and opens a pull request. This command always creates a pull request; the --create-pull-request flag is not needed.`, Example: ` ` + string(constants.CLIExtensionPrefix) + ` deploy githubnext/agentics/ci-doctor --repo owner/repo ` + string(constants.CLIExtensionPrefix) + ` deploy githubnext/agentics/repo-assist githubnext/agentics/ci-doctor --repo owner/repo --force ` + string(constants.CLIExtensionPrefix) + ` deploy ./my-workflow.md --repo owner/repo diff --git a/pkg/cli/fix_command.go b/pkg/cli/fix_command.go index f69f8d3d9b2..093afe68824 100644 --- a/pkg/cli/fix_command.go +++ b/pkg/cli/fix_command.go @@ -53,7 +53,7 @@ The command will: Without --write (dry-run mode), no files are modified. With --write, the command performs all steps and additionally: - 4. Write updated files back to disk. + 4. Writes updated files back to disk. 5. Delete deprecated .github/aw/schemas/agentic-workflow.json file if it exists. 6. Delete old template files from previous versions if present. 7. Delete old workflow-specific .agent.md files from .github/agents/ if present. diff --git a/pkg/cli/init_command.go b/pkg/cli/init_command.go index fe8531211ab..cc863b03bea 100644 --- a/pkg/cli/init_command.go +++ b/pkg/cli/init_command.go @@ -63,7 +63,7 @@ After running this command, you can: - Create new workflows from scratch with: ` + string(constants.CLIExtensionPrefix) + ` new `, Example: ` ` + string(constants.CLIExtensionPrefix) + ` init # Initialize repository with defaults ` + string(constants.CLIExtensionPrefix) + ` init -v # Initialize with verbose output - ` + string(constants.CLIExtensionPrefix) + ` init --engine claude # Skip Copilot-specific artifacts + ` + string(constants.CLIExtensionPrefix) + ` init --engine claude # Use Claude engine — skips Copilot MCP/skill files ` + string(constants.CLIExtensionPrefix) + ` init --no-mcp # Skip MCP configuration ` + string(constants.CLIExtensionPrefix) + ` init --no-skill # Skip dispatcher skill creation ` + string(constants.CLIExtensionPrefix) + ` init --no-agent # Skip custom agent creation @@ -143,7 +143,7 @@ After running this command, you can: addEngineFlag(cmd) cmd.Flags().Bool("no-mcp", false, "Skip configuring gh-aw MCP server integration for GitHub Copilot Agent") cmd.Flags().Bool("no-skill", false, "Skip creating the agentic-workflows dispatcher skill") - cmd.Flags().Bool("no-agent", false, "Skip creating the Agentic Workflows custom agent") + cmd.Flags().Bool("no-agent", false, "Skip creating the agentic-workflows custom agent") cmd.Flags().String("codespaces", "", "Create devcontainer.json for GitHub Codespaces with agentic workflow support. Specify comma-separated repository names in the same organization (e.g., repo1,repo2), or use without a value for the current repo only") // Allow --codespaces without a value (e.g. "gh aw init --codespaces"). // pflag treats NoOptDefVal="" as "flag requires a value", so we use a single space as diff --git a/pkg/cli/mcp_server_command.go b/pkg/cli/mcp_server_command.go index d712aa38aba..8ba7f191dea 100644 --- a/pkg/cli/mcp_server_command.go +++ b/pkg/cli/mcp_server_command.go @@ -22,8 +22,7 @@ func NewMCPServerCommand() *cobra.Command { Short: "Run an MCP (Model Context Protocol) server exposing gh aw commands as tools", Long: `Run an MCP server that exposes gh aw CLI commands as MCP tools. -This command starts an MCP server that wraps the gh aw CLI, spawning subprocess -calls for each tool invocation. This design ensures that GitHub tokens and other +This command starts an MCP server that wraps the gh aw CLI. It spawns a subprocess for each tool invocation to ensure that GitHub tokens and other secrets are not shared with the MCP server process itself. The server provides the following tools: diff --git a/pkg/cli/trial_command.go b/pkg/cli/trial_command.go index 334a852aa41..43faf587486 100644 --- a/pkg/cli/trial_command.go +++ b/pkg/cli/trial_command.go @@ -16,7 +16,7 @@ func NewTrialCommand(validateEngine func(string) error) *cobra.Command { This command creates a temporary private repository in your GitHub account, installs the specified workflows from their source repositories, and runs them in "trial mode" to capture safe outputs without -making actual changes to the "simulated" host repository. +making actual changes to the simulated host repository. Repository modes: - Default mode (no flags): Creates a temporary trial repository and simulates execution as if running against the current repository (github.repository context points to the current repository) diff --git a/pkg/cli/update_command.go b/pkg/cli/update_command.go index c6e7800f7ad..a1b459c5fa8 100644 --- a/pkg/cli/update_command.go +++ b/pkg/cli/update_command.go @@ -172,8 +172,8 @@ Note: In GitHub Enterprise repos, shorthand source specs resolve on your enterpr cmd.Flags().Bool("no-stop-after", false, "Remove any stop-after field from the workflow") cmd.Flags().String("stop-after", "", "Override stop-after value in the workflow (e.g., '+48h', '2025-12-31 23:59:59')") cmd.Flags().Bool("no-merge", false, "Override local changes with upstream version instead of merging") - cmd.Flags().Bool("no-release-bump", false, "Disable automatic major version bumps for all actions (only core actions/* are force-updated)") - cmd.Flags().Bool("disable-release-bump", false, "Disable automatic major version bumps for all actions (only core actions/* are force-updated)") + cmd.Flags().Bool("no-release-bump", false, "Restrict automatic major version bumps to core actions/* only (non-core actions are left as-is)") + cmd.Flags().Bool("disable-release-bump", false, "Restrict automatic major version bumps to core actions/* only (non-core actions are left as-is)") _ = cmd.Flags().MarkDeprecated("disable-release-bump", "use --no-release-bump instead") cmd.Flags().Bool("no-security-scanner", false, "Skip security scanning of workflow markdown content") cmd.Flags().Bool("disable-security-scanner", false, "Skip security scanning of workflow markdown content") From b2f8dfb685f2ddfb8186ebfb461e5fa6935075d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 15:49:07 +0000 Subject: [PATCH 3/3] fix: repair add-wizard engine test and cache-before docs example Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- docs/src/content/docs/setup/cli.md | 2 +- pkg/cli/add_wizard_command_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/content/docs/setup/cli.md b/docs/src/content/docs/setup/cli.md index 8f78be161a5..d805e2e61e7 100644 --- a/docs/src/content/docs/setup/cli.md +++ b/docs/src/content/docs/setup/cli.md @@ -483,7 +483,7 @@ gh aw logs "ci failure doctor" # Case-insensitive display name gh aw logs --cache-before -1w # Evict local cache older than 1 week, then proceed with normal run download gh aw logs --cache-before -30d # Evict local cache entries older than 30 days gh aw logs --cache-before 2024-01-01 # Evict local cache entries from before a specific date -gh aw logs my-workflow --cache-before -1mo -c 20 # Clean up, then download 20 runs of a specific workflow +gh aw logs my-workflow --cache-before -1mo -c 20 # Evict local cache older than 1 month, then download 20 runs of a specific workflow ``` Only directories matching the `run-{ID}` naming pattern inside the output directory are considered. The run's creation timestamp is read from `run_summary.json` inside each folder; if that file is absent (e.g., incomplete download), the directory's modification time is used as a fallback. diff --git a/pkg/cli/add_wizard_command_test.go b/pkg/cli/add_wizard_command_test.go index cee868a272f..40849a54565 100644 --- a/pkg/cli/add_wizard_command_test.go +++ b/pkg/cli/add_wizard_command_test.go @@ -12,7 +12,7 @@ import ( func TestAddWizardCommandMentionsEngines(t *testing.T) { cmd := NewAddWizardCommand(func(string) error { return nil }) require.NotNil(t, cmd, "Add wizard command should be created") - assert.Contains(t, cmd.Long, "Copilot, Claude, Codex, or Gemini", "Add wizard help should mention all interactive engine options") + assert.Contains(t, cmd.Long, "Copilot, Claude, Codex, Gemini, Antigravity, OpenCode, or Pi", "Add wizard help should mention all interactive engine options") } func TestAddWizardCommand_UsesStandardThreePartWorkflowSpecWording(t *testing.T) {