From a33a94e8764df188242d231d3ad0edb4cb7c8413 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:37:15 +0000 Subject: [PATCH 1/3] Initial plan From 32ebfde0fae82f61bce80bd17f9ad9df4c987977 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:46:57 +0000 Subject: [PATCH 2/3] fix: address 4 CLI consistency issues from 2026-03-18 inspection Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/efc62e0b-e484-4f41-bb83-d35212780c83 --- pkg/cli/add_command.go | 2 +- pkg/cli/audit.go | 2 +- pkg/cli/mcp_inspect.go | 2 +- pkg/cli/trial_command.go | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/cli/add_command.go b/pkg/cli/add_command.go index 1c7305c933f..6b2020526e3 100644 --- a/pkg/cli/add_command.go +++ b/pkg/cli/add_command.go @@ -74,7 +74,7 @@ Workflow specifications: The -n flag allows you to specify a custom name for the workflow file (only applies to the first workflow when adding multiple). The --dir flag allows you to specify a subdirectory under .github/workflows/ where the workflow will be added. -The --create-pull-request flag (or --pr) creates a pull request with the workflow changes. +The --create-pull-request flag creates a pull request with the workflow changes. The --force flag overwrites existing workflow files. Note: To create a new workflow from scratch, use the 'new' command instead. diff --git a/pkg/cli/audit.go b/pkg/cli/audit.go index bfe3d96d0b1..79ee1397a95 100644 --- a/pkg/cli/audit.go +++ b/pkg/cli/audit.go @@ -26,7 +26,7 @@ var auditLog = logger.New("cli:audit") // NewAuditCommand creates the audit command func NewAuditCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "audit ", + Use: "audit ", Short: "Audit a workflow run and generate a detailed report", Long: `Audit a single workflow run by downloading artifacts and logs, detecting errors, analyzing MCP tool usage, and generating a concise Markdown report suitable for AI agents. diff --git a/pkg/cli/mcp_inspect.go b/pkg/cli/mcp_inspect.go index 68b0021c55d..27eef34910d 100644 --- a/pkg/cli/mcp_inspect.go +++ b/pkg/cli/mcp_inspect.go @@ -201,7 +201,7 @@ The command will: - Start each MCP server (stdio, docker, http) - Automatically start and inspect mcp-scripts server if present - Query available tools, resources, and roots -- Validate required secrets are available +- Validate required secrets are available - Display results in formatted tables with error details`, Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/pkg/cli/trial_command.go b/pkg/cli/trial_command.go index f0c8fd3c0d9..97141023d7f 100644 --- a/pkg/cli/trial_command.go +++ b/pkg/cli/trial_command.go @@ -90,7 +90,7 @@ Workflows from different repositories: ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/daily-plan myorg/myrepo/custom-workflow Repository mode examples: - ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --repo myorg/myrepo # Run directly in myorg/myrepo (no simulation) + ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --host-repo myorg/myrepo # Run directly in myorg/myrepo (no simulation) ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --logical-repo myorg/myrepo # Simulate running against myorg/myrepo ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --clone-repo myorg/myrepo # Clone myorg/myrepo contents into host @@ -110,7 +110,7 @@ Advanced examples: 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 current repo) - --logical-repo REPO: Simulates execution against a specified repository (github.repository context points to REPO while actually running in a temporary trial repository) -- --host-repo REPO (or --repo REPO): Uses the specified repository as the host for trial execution instead of creating a temporary one +- --host-repo REPO: Uses the specified repository as the host for trial execution instead of creating a temporary one - --clone-repo REPO: Clones the specified repository's contents into the trial repository before execution (useful for testing against actual repository state) All workflows must support workflow_dispatch trigger to be used in trial mode. @@ -182,6 +182,7 @@ Trial results are saved both locally (in trials/ directory) and in the host repo cmd.Flags().String("host-repo", "", "Custom host repository slug (defaults to '/gh-aw-trial'). Use '.' for current repository") cmd.Flags().String("repo", "", "Alias for --host-repo: the repository where workflows are installed and run (note: different semantics from --repo in other commands)") + _ = cmd.Flags().MarkHidden("repo") // Hide alias to avoid semantic confusion with --repo in other commands cmd.Flags().Bool("delete-host-repo-after", false, "Delete the host repository after completion (default: keep)") cmd.Flags().Bool("force-delete-host-repo-before", false, "Force delete the host repository before creation, if it exists before creating it") cmd.Flags().BoolP("yes", "y", false, "Skip confirmation prompts") From e3e1bdc48f939c8da8f862fc0d82c0faa7ed67ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:58:54 +0000 Subject: [PATCH 3/3] fix: update argument_syntax_test to match new audit Use string Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b1098501-457c-4b27-8a81-837ee308d577 --- cmd/gh-aw/argument_syntax_test.go | 4 ++-- pkg/cli/audit.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/gh-aw/argument_syntax_test.go b/cmd/gh-aw/argument_syntax_test.go index 38d732a835f..46a53f957f5 100644 --- a/cmd/gh-aw/argument_syntax_test.go +++ b/cmd/gh-aw/argument_syntax_test.go @@ -24,9 +24,9 @@ func TestArgumentSyntaxConsistency(t *testing.T) { }{ // Commands with required arguments (using angle brackets <>) { - name: "audit command requires run-id", + name: "audit command requires run-id-or-url", command: cli.NewAuditCommand(), - expectedUse: "audit ", + expectedUse: "audit ", argsValidator: "ExactArgs(1)", shouldValidate: func(cmd *cobra.Command) error { return cmd.Args(cmd, []string{"123456"}) }, }, diff --git a/pkg/cli/audit.go b/pkg/cli/audit.go index 79ee1397a95..6fca34096f9 100644 --- a/pkg/cli/audit.go +++ b/pkg/cli/audit.go @@ -27,7 +27,7 @@ var auditLog = logger.New("cli:audit") func NewAuditCommand() *cobra.Command { cmd := &cobra.Command{ Use: "audit ", - Short: "Audit a workflow run and generate a detailed report", + Short: "Audit a workflow run given a run ID or URL and generate a detailed report", Long: `Audit a single workflow run by downloading artifacts and logs, detecting errors, analyzing MCP tool usage, and generating a concise Markdown report suitable for AI agents.