-
Notifications
You must be signed in to change notification settings - Fork 306
Add workflow guidance and cross-references to CLI help text #14268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -54,6 +54,28 @@ Examples: | |||||
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/*@v1.0.0 | ||||||
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/ci-doctor --dir shared # Add to .github/workflows/shared/ | ||||||
|
|
||||||
| Common Workflows: | ||||||
| # Add and immediately run a workflow | ||||||
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/daily-plan | ||||||
| ` + 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 | ||||||
|
||||||
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/ci-doctor --pr | |
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/ci-doctor --create-pull-request |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -68,7 +68,28 @@ Examples: | |||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix my-workflow # Check specific workflow | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix my-workflow --write # Fix specific workflow | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix --dir custom/workflows # Fix workflows in custom directory | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix --list-codemods # List available codemods`, | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix --list-codemods # List available codemods | ||||||||||||||
|
|
||||||||||||||
| Common Workflows: | ||||||||||||||
| # Check for issues before compiling | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix # Dry-run to see what needs fixing | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix --write # Apply all fixes | ||||||||||||||
|
|
||||||||||||||
| # Fix and compile workflow | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix my-workflow --write | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` compile my-workflow # Recompile after fixing | ||||||||||||||
|
|
||||||||||||||
| # Quick fix-compile-test cycle | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` compile --fix my-workflow # Fix and compile in one step | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` run my-workflow # Test the fixed workflow | ||||||||||||||
|
|
||||||||||||||
| # Discover available fixes | ||||||||||||||
| ` + string(constants.CLIExtensionPrefix) + ` fix --list-codemods # See all available codemods | ||||||||||||||
|
|
||||||||||||||
| Related Commands: | ||||||||||||||
| ` + 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`, | ||||||||||||||
|
Comment on lines
+90
to
+92
|
||||||||||||||
| ` + 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`, |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,6 +104,23 @@ Advanced examples: | |
| ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --host-repo . # Use current repo as host | ||
| ` + string(constants.CLIExtensionPrefix) + ` trial ./local-workflow.md --clone-repo upstream/repo --repeat 2 | ||
|
|
||
| Common Workflows: | ||
| # Quick trial of a new workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` logs --trial # View trial results | ||
|
|
||
|
Comment on lines
+107
to
+111
|
||
| # Test workflow before adding to production | ||
| ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --logical-repo myorg/myrepo | ||
| ` + string(constants.CLIExtensionPrefix) + ` add githubnext/agentics/my-workflow # Add after successful trial | ||
|
|
||
| # 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 | ||
|
|
||
| # 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 | ||
|
|
||
| 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) | ||
|
|
@@ -112,7 +129,12 @@ Repository modes: | |
|
|
||
| All workflows must support workflow_dispatch trigger to be used in trial mode. | ||
| The host repository will be created as private and kept by default unless --delete-host-repo-after is specified. | ||
| Trial results are saved both locally (in trials/ directory) and in the host repository for future reference.`, | ||
| Trial results are saved both locally (in trials/ directory) and in the host repository for future reference. | ||
|
|
||
| Related Commands: | ||
| ` + string(constants.CLIExtensionPrefix) + ` logs View trial execution logs and outputs | ||
| ` + string(constants.CLIExtensionPrefix) + ` add Add workflow to production after successful trial | ||
| ` + string(constants.CLIExtensionPrefix) + ` audit Debug workflow execution with detailed analysis`, | ||
| Args: cobra.MinimumNArgs(1), | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| workflowSpecs := args | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,29 @@ Examples: | |
| ` + string(constants.CLIExtensionPrefix) + ` update --force # Force update even if no changes | ||
| ` + string(constants.CLIExtensionPrefix) + ` update --dir custom/workflows # Update workflows in custom directory | ||
| ` + 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 | ||
|
|
||
|
Comment on lines
62
to
+64
|
||
| Common Workflows: | ||
| # Regular update and sync workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` update # Update all workflows and actions | ||
| ` + string(constants.CLIExtensionPrefix) + ` compile # Recompile after updates | ||
|
|
||
| # Update with PR for review | ||
| ` + string(constants.CLIExtensionPrefix) + ` update --pr # Create PR with all updates | ||
|
|
||
| # Check for updates without applying | ||
| ` + string(constants.CLIExtensionPrefix) + ` update --audit # View dependency health report | ||
|
|
||
| # Update and test specific workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` update my-workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` compile my-workflow | ||
| ` + string(constants.CLIExtensionPrefix) + ` run my-workflow # Test the updated workflow | ||
|
|
||
| Related Commands: | ||
| ` + string(constants.CLIExtensionPrefix) + ` compile Recompile workflows after updating | ||
| ` + string(constants.CLIExtensionPrefix) + ` fix Apply automatic fixes to updated workflows | ||
| ` + string(constants.CLIExtensionPrefix) + ` logs Check workflow logs after updating | ||
| ` + string(constants.CLIExtensionPrefix) + ` health Monitor workflow health post-update`, | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| majorFlag, _ := cmd.Flags().GetBool("major") | ||
| forceFlag, _ := cmd.Flags().GetBool("force") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The help text references
gh aw hash, but the actual command name ishash-frontmatter(seepkg/cli/hash_command.go). Also,hash-frontmatterexpects a workflow file path (e.g.,my-workflow.md), not a workflow id. Update the example and the related-commands entry accordingly.