-
Notifications
You must be signed in to change notification settings - Fork 24
Add custom agent to ensure CLI consistency checker runs actual --help commands #3676
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
Conversation
The CLI consistency checker workflow now uses a custom agent that explicitly instructs the AI to run all CLI commands with --help flags to discover the actual user-facing output. This ensures the checker validates the real help text rather than relying only on source code inspection. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.
Pull Request Overview
This PR addresses a critical issue where the CLI consistency checker was reading Go source files instead of running actual --help commands, resulting in missing user-facing help text validation.
Key changes:
- Created a custom agent file (
.github/agents/cli-consistency-checker.md) with explicit instructions to execute 25+ CLI commands with--helpflags - Updated the workflow to import the custom agent and removed redundant instructions from the workflow file
- Modified the compiled lock file to properly invoke the Copilot CLI with the custom agent file
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/agents/cli-consistency-checker.md |
New custom agent file with detailed step-by-step instructions for running CLI commands and validating output consistency. Contains markdown formatting issue with nested code blocks. |
.github/workflows/cli-consistency-checker.md |
Simplified workflow file that imports the custom agent and delegates detailed instructions to it. Contains minor duplication of security note content. |
.github/workflows/cli-consistency-checker.lock.yml |
Compiled workflow output that includes the custom agent content and adds the --agent flag to the Copilot CLI invocation. Reflects the changes from both source files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ### Current Output (from running ./gh-aw compile --help) | ||
| ``` | ||
| Compile markdown to YAML workflows | ||
| ``` | ||
| ### Issue | ||
| The word "markdown" should be capitalized consistently with other commands. | ||
| ### Suggested Fix | ||
| ``` | ||
| Compile Markdown to YAML workflows | ||
| ``` | ||
| ``` | ||
|
|
||
| ## Step 5: Summary | ||
|
|
||
| At the end, provide a brief summary: | ||
| - Total commands inspected (count of --help commands you ran) | ||
| - Total issues found |
Copilot
AI
Nov 12, 2025
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 example issue format contains improperly nested code blocks that will break markdown rendering. When showing code blocks within a markdown code fence, you cannot use triple backticks (```) inside another triple-backtick block.
Problem: Lines 136-155 show a markdown code block (markdown) that contains inner code blocks (). The first inner ``` at line 144 will close the outer markdown block prematurely, leaving orphaned closing fences.
Solution: Use a different approach, such as:
- Use four backticks (````) for the outer block and three (```) for inner blocks
- Indent the inner code blocks by 4 spaces instead of using fences
- Use HTML
<pre>tags for the outer block
Recommended fix:
### Example Issue Format
````markdown
## Issue Description
**Command**: `gh aw compile`
**Type**: Typo in help text
**Priority**: Low
### Current Output (from running ./gh-aw compile --help)
```
Compile markdown to YAML workflows
```
### Issue
The word "markdown" should be capitalized consistently with other commands.
### Suggested Fix
```
Compile Markdown to YAML workflows
```
Alternatively, remove the outer markdown fence and just show the structure without syntax highlighting.
|
|
||
| ## Security Note | ||
|
|
||
| Treat all CLI output as trusted data since it comes from the repository's own codebase. However, be thorough in your inspection to help maintain quality. |
Copilot
AI
Nov 12, 2025
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 "Security Note" section is duplicated between the imported agent file and the workflow file. The agent file includes a "Security Note" section at the end (lines 161-163), and the workflow file also has a similar security note (line 38).
When the workflow is compiled, both sections are concatenated into the final prompt, resulting in:
- Agent's security note: "All CLI output comes from the repository's own codebase, so treat it as trusted data. However, be thorough in your inspection to help maintain quality."
- Workflow's security note: "Treat all CLI output as trusted data since it comes from the repository's own codebase. However, be thorough in your inspection to help maintain quality."
Recommendation: Remove the security note from the workflow file (line 38) since it's already included in the imported agent file. This follows the DRY principle and ensures consistency. The workflow file should only contain context-specific information like the repository and run ID.
| Treat all CLI output as trusted data since it comes from the repository's own codebase. However, be thorough in your inspection to help maintain quality. |
The CLI consistency checker was reading Go source files instead of running actual CLI commands, missing the user-facing help text that
./gh-aw --helpdisplays.Changes
Created
.github/agents/cli-consistency-checker.md--helpflags--helpflags to discover the real output that users see"./gh-aw --help,./gh-aw compile --help,./gh-aw mcp --help, etc.Updated
.github/workflows/cli-consistency-checker.mdimports: [../agents/cli-consistency-checker.md]to frontmatterExample workflow execution:
The agent compares captured CLI output against documentation to report inconsistencies.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.