Add workflow guidance and cross-references to CLI help text#14268
Add workflow guidance and cross-references to CLI help text#14268
Conversation
- Added "Common Workflows" section to compile, add, update, fix, and trial commands - Added "Related Commands" section with cross-references - Improved actionable guidance for next steps after command execution - Each workflow section shows typical usage sequences and next steps Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the gh aw CLI help text to provide more actionable guidance by adding “Common Workflows” and “Related Commands” cross-references to several commonly used commands.
Changes:
- Added “Common Workflows” sections showing multi-step usage sequences (e.g., fix → compile → run).
- Added “Related Commands” sections to cross-link adjacent commands for discovery and troubleshooting.
- Expanded examples/help text for
compile,add,update,fix, andtrial.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
cmd/gh-aw/main.go |
Extends compile --help output with workflow guidance and related command references. |
pkg/cli/add_command.go |
Adds workflow sequences and related commands to add help text. |
pkg/cli/fix_command.go |
Adds workflow sequences and related commands to fix help text. |
pkg/cli/trial_command.go |
Adds workflow sequences and related commands to trial help text. |
pkg/cli/update_command.go |
Adds workflow sequences and related commands to update help text. |
Comments suppressed due to low confidence (2)
pkg/cli/trial_command.go:119
- These examples also use
gh aw logs --trial, butlogshas no--trialflag. Replace with a valid logs/audit invocation so users can actually view the results of the comparison run.
# Compare multiple workflow versions
` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/workflow@v1.0 githubnext/agentics/workflow@v2.0
` + string(constants.CLIExtensionPrefix) + ` logs --trial # Compare results
pkg/cli/trial_command.go:123
- These examples also use
gh aw logs --trial, butlogshas no--trialflag. Replace with a valid logs/audit invocation for trial runs (likely using--repo/ run-id output).
# Debug workflow issues in isolation
` + string(constants.CLIExtensionPrefix) + ` trial ./my-workflow.md --clone-repo myorg/myrepo --repeat 3
` + string(constants.CLIExtensionPrefix) + ` logs --trial # Analyze trial logs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ` + string(constants.CLIExtensionPrefix) + ` update --audit # Check dependency health without updating | ||
| ` + string(constants.CLIExtensionPrefix) + ` update --dry-run # Show what would be updated without making changes`, | ||
| ` + string(constants.CLIExtensionPrefix) + ` update --dry-run # Show what would be updated without making changes | ||
|
|
There was a problem hiding this comment.
The help text suggests using --dry-run, but the command currently returns an error (--dry-run mode not yet implemented for workflow updates). This is misleading for users; either remove the --dry-run example/mention from help text for now, or implement --dry-run behavior before advertising it.
| Common Workflows: | ||
| # Quick trial of a new workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` logs --trial # View trial results | ||
|
|
There was a problem hiding this comment.
The help text uses gh aw logs --trial, but the logs command does not define a --trial flag. Update these workflow examples to use a valid invocation (e.g., gh aw logs --repo <trial-host-repo> <workflow> or direct users to gh aw audit <run-id> based on what trial outputs).
This issue also appears in the following locations of the same file:
- line 116
- line 120
| # If compilation fails, debug with hash command | ||
| ` + string(constants.CLIExtensionPrefix) + ` hash my-workflow # Check frontmatter rendering | ||
|
|
||
| # After deployment, monitor execution | ||
| ` + string(constants.CLIExtensionPrefix) + ` run my-workflow # Test run the workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` logs my-workflow # Check recent execution logs | ||
| ` + string(constants.CLIExtensionPrefix) + ` health my-workflow # View success rates | ||
|
|
||
| Related Commands: | ||
| ` + string(constants.CLIExtensionPrefix) + ` fix Apply automatic fixes before compiling | ||
| ` + string(constants.CLIExtensionPrefix) + ` hash Debug frontmatter and expression issues | ||
| ` + string(constants.CLIExtensionPrefix) + ` logs View workflow execution logs after running | ||
| ` + string(constants.CLIExtensionPrefix) + ` health Check workflow success rates and trends`, |
There was a problem hiding this comment.
The help text references gh aw hash, but the actual command name is hash-frontmatter (see pkg/cli/hash_command.go). Also, hash-frontmatter expects a workflow file path (e.g., my-workflow.md), not a workflow id. Update the example and the related-commands entry accordingly.
| ` + string(constants.CLIExtensionPrefix) + ` compile Use --fix flag for automatic fixing before compile | ||
| ` + string(constants.CLIExtensionPrefix) + ` update Automatically applies fixes after updating workflows | ||
| ` + string(constants.CLIExtensionPrefix) + ` hash Debug frontmatter issues after fixing`, |
There was a problem hiding this comment.
hash is not an actual CLI command here; the command is hash-frontmatter, and it expects a workflow file path. Update this related-command reference so it matches the real command users can run.
| ` + string(constants.CLIExtensionPrefix) + ` compile Use --fix flag for automatic fixing before compile | |
| ` + string(constants.CLIExtensionPrefix) + ` update Automatically applies fixes after updating workflows | |
| ` + string(constants.CLIExtensionPrefix) + ` hash Debug frontmatter issues after fixing`, | |
| ` + string(constants.CLIExtensionPrefix) + ` compile Use --fix flag for automatic fixing before compile | |
| ` + string(constants.CLIExtensionPrefix) + ` update Automatically applies fixes after updating workflows | |
| ` + string(constants.CLIExtensionPrefix) + ` hash-frontmatter my-workflow.yml Debug frontmatter issues after fixing`, |
| ` + string(constants.CLIExtensionPrefix) + ` run daily-plan # Test the workflow | ||
|
|
||
| # Add workflow and create PR for review | ||
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/ci-doctor --pr |
There was a problem hiding this comment.
This example uses --pr, but the add command intentionally hides --pr from help output (MarkHidden("pr")). To avoid advertising a hidden/back-compat flag, use the documented flag name (--create-pull-request) in the workflow example instead.
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/ci-doctor --pr | |
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/ci-doctor --create-pull-request |
CLI help text lacked actionable guidance for typical command sequences and error recovery patterns.
Changes
Added two sections to help text for
compile,add,update,fix, andtrialcommands:Common Workflows - Shows typical multi-command sequences:
Related Commands - Cross-references to related commands:
Example
Each command's workflows are tailored to its typical usage patterns - trial shows trial→logs→add sequences, update shows update→compile→test flows, etc.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.