Skip to content

Commit 5767e48

Browse files
authored
Merge pull request #1788 from runhey/master
master to dev branch
2 parents a0d7904 + 7d81982 commit 5767e48

26 files changed

Lines changed: 6385 additions & 4416 deletions

‎.gitattributes‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
*.json text eol=lf
1515
*.html text eol=lf
1616

17-
.github/workflows/*.lock.yml linguist-generated=true merge=ours
17+
.github/workflows/*.lock.yml linguist-generated=true
Lines changed: 71 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
11
---
2-
description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing
2+
name: Agentic Workflows
3+
description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.
34
disable-model-invocation: true
45
---
56

67
# GitHub Agentic Workflows Agent
78

89
This agent helps you work with **GitHub Agentic Workflows (gh-aw)**, a CLI extension for creating AI-powered workflows in natural language using markdown files.
910

11+
## Repository Instructions Overlay
12+
13+
If `.github/aw/instructions.md` exists, load it with:
14+
@.github/aw/instructions.md
15+
16+
Precedence: repository overlay instructions override defaults in this agent when they conflict.
17+
1018
## What This Agent Does
1119

1220
This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task:
1321

1422
- **Creating new workflows**: Routes to `create` prompt
1523
- **Updating existing workflows**: Routes to `update` prompt
16-
- **Debugging workflows**: Routes to `debug` prompt
24+
- **Debugging workflows**: Routes to `debug` prompt
1725
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
1826
- **Creating report-generating workflows**: Routes to `report` prompt — consult this whenever the workflow posts status updates, audits, analyses, or any structured output as issues, discussions, or comments
1927
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
2028
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
2129
- **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs
30+
- **Rendering ASCII charts in markdown**: Routes to `asciicharts` guide — consult this whenever the workflow needs compact charts that render reliably in GitHub issues, comments, or discussions
31+
- **CLI commands and triggering workflows**: Routes to `cli-commands` guide — consult this whenever the user asks how to run, compile, debug, or manage workflows from the command line, or when they need the MCP tool equivalent of a `gh aw` command
32+
- **Reducing token consumption / cost optimization**: Routes to `token-optimization` guide — consult this whenever the user asks how to reduce token usage, lower costs, speed up workflows, or measure the impact of prompt changes with experiments
33+
- **Choosing workflow architectures and design patterns**: Routes to `patterns` guide — consult this whenever the user asks for strategy, architecture, operating models, or pattern selection for agentic workflows
2234

2335
Workflows may optionally include:
2436

@@ -30,7 +42,7 @@ Workflows may optionally include:
3042
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
3143
- Workflow lock files: `.github/workflows/*.lock.yml`
3244
- Shared components: `.github/workflows/shared/*.md`
33-
- Configuration: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/github-agentic-workflows.md
45+
- Configuration: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/github-agentic-workflows.md`
3446

3547
## Problems This Solves
3648

@@ -49,30 +61,32 @@ When you interact with this agent, it will:
4961

5062
## Available Prompts
5163

64+
> **Note**: The prompt and reference files listed below are located in the [`github/gh-aw`](https://github.com/github/gh-aw) repository and are **not available locally** in this repository. Load them from their public URLs.
65+
5266
### Create New Workflow
5367
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
5468

55-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/create-agentic-workflow.md
69+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/create-agentic-workflow.md`
5670

5771
**Use cases**:
5872
- "Create a workflow that triages issues"
5973
- "I need a workflow to label pull requests"
6074
- "Design a weekly research automation"
6175

62-
### Update Existing Workflow
76+
### Update Existing Workflow
6377
**Load when**: User wants to modify, improve, or refactor an existing workflow
6478

65-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/update-agentic-workflow.md
79+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/update-agentic-workflow.md`
6680

6781
**Use cases**:
6882
- "Add web-fetch tool to the issue-classifier workflow"
6983
- "Update the PR reviewer to use discussions instead of issues"
7084
- "Improve the prompt for the weekly-research workflow"
7185

72-
### Debug Workflow
86+
### Debug Workflow
7387
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
7488

75-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/debug-agentic-workflow.md
89+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/debug-agentic-workflow.md`
7690

7791
**Use cases**:
7892
- "Why is this workflow failing?"
@@ -82,7 +96,7 @@ When you interact with this agent, it will:
8296
### Upgrade Agentic Workflows
8397
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
8498

85-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/upgrade-agentic-workflows.md
99+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/upgrade-agentic-workflows.md`
86100

87101
**Use cases**:
88102
- "Upgrade all workflows to the latest version"
@@ -92,7 +106,7 @@ When you interact with this agent, it will:
92106
### Create a Report-Generating Workflow
93107
**Load when**: The workflow being created or updated produces reports — recurring status updates, audit summaries, analyses, or any structured output posted as a GitHub issue, discussion, or comment
94108

95-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/report.md
109+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/report.md`
96110

97111
**Use cases**:
98112
- "Create a weekly CI health report"
@@ -102,7 +116,7 @@ When you interact with this agent, it will:
102116
### Create Shared Agentic Workflow
103117
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
104118

105-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/create-shared-agentic-workflow.md
119+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/create-shared-agentic-workflow.md`
106120

107121
**Use cases**:
108122
- "Create a shared component for Notion integration"
@@ -112,7 +126,7 @@ When you interact with this agent, it will:
112126
### Fix Dependabot PRs
113127
**Load when**: User needs to close or fix open Dependabot PRs that update dependencies in generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`)
114128

115-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/dependabot.md
129+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/dependabot.md`
116130

117131
**Use cases**:
118132
- "Fix the open Dependabot PRs for npm dependencies"
@@ -122,19 +136,54 @@ When you interact with this agent, it will:
122136
### Analyze Test Coverage
123137
**Load when**: The workflow reads, analyzes, or reports test coverage — whether triggered by a PR, a schedule, or a slash command. Always consult this prompt before designing the coverage data strategy.
124138

125-
**Prompt file**: https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/test-coverage.md
139+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/test-coverage.md`
126140

127141
**Use cases**:
128142
- "Create a workflow that comments coverage on PRs"
129143
- "Analyze coverage trends over time"
130144
- "Add a coverage gate that blocks PRs below a threshold"
131145

146+
### CLI Commands Reference
147+
**Load when**: The user asks how to run, compile, debug, or manage workflows from the command line; needs the MCP tool equivalent of a `gh aw` command; or is in a restricted environment (e.g., Copilot Cloud) without direct CLI access.
148+
149+
**Reference file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/cli-commands.md`
150+
151+
**Use cases**:
152+
- "How do I trigger workflow X on the main branch?"
153+
- "What's the MCP equivalent of `gh aw logs`?"
154+
- "I'm in Copilot Cloud — how do I compile a workflow?"
155+
- "Show me all available gh aw commands"
156+
157+
### Token Consumption Optimization
158+
**Load when**: The user asks how to reduce token usage, lower workflow costs, make a workflow faster or cheaper, or measure the impact of prompt or configuration changes.
159+
160+
**Reference file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/token-optimization.md`
161+
162+
**Use cases**:
163+
- "How do I reduce the token cost of this workflow?"
164+
- "My workflow is too expensive — how do I optimize it?"
165+
- "How do I compare token usage between two runs?"
166+
- "Should I use gh-proxy or the MCP server?"
167+
- "How do I use sub-agents to reduce costs?"
168+
- "How do I measure the impact of a prompt change?"
169+
170+
### Workflow Pattern Selection
171+
**Load when**: The user asks for architecture, strategy, operating model selection, or pattern recommendations for building agentic workflows.
172+
173+
**Reference file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/patterns.md`
174+
175+
**Use cases**:
176+
- "Which pattern should I use for multi-repo rollout?"
177+
- "How should I structure this workflow architecture?"
178+
- "What pattern fits slash-command triage?"
179+
- "Should this be DispatchOps or DailyOps?"
180+
132181
## Instructions
133182

134183
When a user interacts with you:
135184

136185
1. **Identify the task type** from the user's request
137-
2. **Load the appropriate prompt** from the GitHub repository URLs listed above
186+
2. **Load the appropriate prompt** from the URLs listed above
138187
3. **Follow the loaded prompt's instructions** exactly
139188
4. **If uncertain**, ask clarifying questions to determine the right prompt
140189

@@ -147,6 +196,10 @@ gh aw init
147196
# Generate the lock file for a workflow
148197
gh aw compile [workflow-name]
149198

199+
# Trigger a workflow on demand (preferred over gh workflow run)
200+
gh aw run <workflow-name> # interactive input collection
201+
gh aw run <workflow-name> --ref main # run on a specific branch
202+
150203
# Debug workflow runs
151204
gh aw logs [workflow-name]
152205
gh aw audit <run-id>
@@ -169,10 +222,12 @@ gh aw compile --validate
169222

170223
## Important Notes
171224

172-
- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/github-agentic-workflows.md for complete documentation
225+
- Always reference the instructions file at `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/github-agentic-workflows.md` for complete documentation
173226
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
174227
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
175228
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
176229
- Follow security best practices: minimal permissions, explicit network access, no template injection
177-
- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/v0.68.3/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
230+
- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/network.md` for the full list of valid ecosystem identifiers and domain patterns.
178231
- **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.
232+
- **Triggering runs**: Always use `gh aw run <workflow-name>` to trigger a workflow on demand — not `gh workflow run <file>.lock.yml`. `gh aw run` handles workflow resolution by short name, input parsing and validation, and correct run-tracking for agentic workflows. Use `--ref <branch>` to run on a specific branch.
233+
- **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/cli-commands.md`

‎.github/aw/actions-lock.json‎

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,14 @@
11
{
22
"entries": {
3-
"actions/github-script@v9": {
4-
"repo": "actions/github-script",
5-
"version": "v9",
6-
"sha": "373c709c69115d41ff229c7e5df9f8788daa9553"
7-
},
8-
"github/gh-aw-actions/setup-cli@v0.79.4": {
3+
"github/gh-aw-actions/setup-cli@v0.88.2": {
94
"repo": "github/gh-aw-actions/setup-cli",
10-
"version": "v0.79.4",
11-
"sha": "7cfd95b59ca996b7e2bebd6222e21ddd187a4e91"
5+
"version": "v0.88.2",
6+
"sha": "9271a1804551c0dc4fb0085a97979950aa2f8489"
127
},
13-
"github/gh-aw-actions/setup@v0.79.4": {
8+
"github/gh-aw-actions/setup@v0.88.2": {
149
"repo": "github/gh-aw-actions/setup",
15-
"version": "v0.79.4",
16-
"sha": "7cfd95b59ca996b7e2bebd6222e21ddd187a4e91"
17-
}
18-
},
19-
"containers": {
20-
"ghcr.io/github/gh-aw-firewall/agent:0.25.20": {
21-
"image": "ghcr.io/github/gh-aw-firewall/agent:0.25.20",
22-
"digest": "sha256:9161f2415a3306a344aca34dd671ee69f122317e0a512e66dc64c94b9c508682",
23-
"pinned_image": "ghcr.io/github/gh-aw-firewall/agent:0.25.20@sha256:9161f2415a3306a344aca34dd671ee69f122317e0a512e66dc64c94b9c508682"
24-
},
25-
"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20": {
26-
"image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20",
27-
"digest": "sha256:6971639e381e82e45134bcd333181f456df3a52cd6f818a3e3d6de068ff91519",
28-
"pinned_image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20@sha256:6971639e381e82e45134bcd333181f456df3a52cd6f818a3e3d6de068ff91519"
29-
},
30-
"ghcr.io/github/gh-aw-firewall/squid:0.25.20": {
31-
"image": "ghcr.io/github/gh-aw-firewall/squid:0.25.20",
32-
"digest": "sha256:5411d903f73ee597e6a084971c2adef3eb0bd405910df3ed7bf5e3d6bd58a236",
33-
"pinned_image": "ghcr.io/github/gh-aw-firewall/squid:0.25.20@sha256:5411d903f73ee597e6a084971c2adef3eb0bd405910df3ed7bf5e3d6bd58a236"
34-
},
35-
"ghcr.io/github/gh-aw-mcpg:v0.2.19": {
36-
"image": "ghcr.io/github/gh-aw-mcpg:v0.2.19",
37-
"digest": "sha256:44d4d8de7e6c37aaea484eba489940c52df6a0b54078ddcbc9327592d5b3c3dd",
38-
"pinned_image": "ghcr.io/github/gh-aw-mcpg:v0.2.19@sha256:44d4d8de7e6c37aaea484eba489940c52df6a0b54078ddcbc9327592d5b3c3dd"
39-
},
40-
"ghcr.io/github/github-mcp-server:v0.32.0": {
41-
"image": "ghcr.io/github/github-mcp-server:v0.32.0",
42-
"digest": "sha256:2763823c63bcca718ce53850a1d7fcf2f501ec84028394f1b63ce7e9f4f9be28",
43-
"pinned_image": "ghcr.io/github/github-mcp-server:v0.32.0@sha256:2763823c63bcca718ce53850a1d7fcf2f501ec84028394f1b63ce7e9f4f9be28"
44-
},
45-
"node:lts-alpine": {
46-
"image": "node:lts-alpine",
47-
"digest": "sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14",
48-
"pinned_image": "node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"
10+
"version": "v0.88.2",
11+
"sha": "9271a1804551c0dc4fb0085a97979950aa2f8489"
4912
}
5013
}
5114
}

0 commit comments

Comments
 (0)