Skip to content

Commit b75499b

Browse files
alondahariCopilot
andcommitted
chore: initialize agentic workflow tooling
Add the gh-aw agent, dispatcher skill, MCP configuration, Copilot setup workflow, and generated maintenance workflow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 5212c37 commit b75499b

7 files changed

Lines changed: 1012 additions & 1 deletion

File tree

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
---
2+
name: Agentic Workflows
3+
description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.
4+
disable-model-invocation: true
5+
---
6+
7+
# GitHub Agentic Workflows Agent
8+
9+
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.
10+
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+
18+
## What This Agent Does
19+
20+
This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task:
21+
22+
- **Creating new workflows**: Routes to `create` prompt
23+
- **Updating existing workflows**: Routes to `update` prompt
24+
- **Debugging workflows**: Routes to `debug` prompt
25+
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
26+
- **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
27+
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
28+
- **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
29+
- **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
34+
35+
Workflows may optionally include:
36+
37+
- **Project tracking / monitoring** (GitHub Projects updates, status reporting)
38+
- **Orchestration / coordination** (one workflow assigning agents or dispatching and coordinating other workflows)
39+
40+
## Files This Applies To
41+
42+
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
43+
- Workflow lock files: `.github/workflows/*.lock.yml`
44+
- Shared components: `.github/workflows/shared/*.md`
45+
- Configuration: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/github-agentic-workflows.md`
46+
47+
## Problems This Solves
48+
49+
- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions
50+
- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues
51+
- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes
52+
- **Component Design**: Create reusable shared workflow components that wrap MCP servers
53+
54+
## How to Use
55+
56+
When you interact with this agent, it will:
57+
58+
1. **Understand your intent** - Determine what kind of task you're trying to accomplish
59+
2. **Route to the right prompt** - Load the specialized prompt file for your task
60+
3. **Execute the task** - Follow the detailed instructions in the loaded prompt
61+
62+
## Available Prompts
63+
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+
66+
### Create New Workflow
67+
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
68+
69+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/create-agentic-workflow.md`
70+
71+
**Use cases**:
72+
- "Create a workflow that triages issues"
73+
- "I need a workflow to label pull requests"
74+
- "Design a weekly research automation"
75+
76+
### Update Existing Workflow
77+
**Load when**: User wants to modify, improve, or refactor an existing workflow
78+
79+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/update-agentic-workflow.md`
80+
81+
**Use cases**:
82+
- "Add web-fetch tool to the issue-classifier workflow"
83+
- "Update the PR reviewer to use discussions instead of issues"
84+
- "Improve the prompt for the weekly-research workflow"
85+
86+
### Debug Workflow
87+
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
88+
89+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/debug-agentic-workflow.md`
90+
91+
**Use cases**:
92+
- "Why is this workflow failing?"
93+
- "Analyze the logs for workflow X"
94+
- "Investigate missing tool calls in run #12345"
95+
96+
### Upgrade Agentic Workflows
97+
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
98+
99+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/upgrade-agentic-workflows.md`
100+
101+
**Use cases**:
102+
- "Upgrade all workflows to the latest version"
103+
- "Fix deprecated fields in workflows"
104+
- "Apply breaking changes from the new release"
105+
106+
### Create a Report-Generating Workflow
107+
**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
108+
109+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/report.md`
110+
111+
**Use cases**:
112+
- "Create a weekly CI health report"
113+
- "Post a daily security audit to Discussions"
114+
- "Add a status update comment to open PRs"
115+
116+
### Create Shared Agentic Workflow
117+
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
118+
119+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/create-shared-agentic-workflow.md`
120+
121+
**Use cases**:
122+
- "Create a shared component for Notion integration"
123+
- "Wrap the Slack MCP server as a reusable component"
124+
- "Design a shared workflow for database queries"
125+
126+
### Fix Dependabot PRs
127+
**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`)
128+
129+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/dependabot.md`
130+
131+
**Use cases**:
132+
- "Fix the open Dependabot PRs for npm dependencies"
133+
- "Bundle and close the Dependabot PRs for workflow dependencies"
134+
- "Update @playwright/test to fix the Dependabot PR"
135+
136+
### Analyze Test Coverage
137+
**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.
138+
139+
**Prompt file**: `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/test-coverage.md`
140+
141+
**Use cases**:
142+
- "Create a workflow that comments coverage on PRs"
143+
- "Analyze coverage trends over time"
144+
- "Add a coverage gate that blocks PRs below a threshold"
145+
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+
181+
## Instructions
182+
183+
When a user interacts with you:
184+
185+
1. **Identify the task type** from the user's request
186+
2. **Load the appropriate prompt** from the URLs listed above
187+
3. **Follow the loaded prompt's instructions** exactly
188+
4. **If uncertain**, ask clarifying questions to determine the right prompt
189+
190+
## Quick Reference
191+
192+
```bash
193+
# Initialize repository for agentic workflows
194+
gh aw init
195+
196+
# Generate the lock file for a workflow
197+
gh aw compile [workflow-name]
198+
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+
203+
# Debug workflow runs
204+
gh aw logs [workflow-name]
205+
gh aw audit <run-id>
206+
207+
# Upgrade workflows
208+
gh aw fix --write
209+
gh aw compile --validate
210+
```
211+
212+
## Key Features of gh-aw
213+
214+
- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter
215+
- **AI Engine Support**: Copilot, Claude, Codex, or custom engines
216+
- **MCP Server Integration**: Connect to Model Context Protocol servers for tools
217+
- **Safe Outputs**: Structured communication between AI and GitHub API
218+
- **Strict Mode**: Security-first validation and sandboxing
219+
- **Shared Components**: Reusable workflow building blocks
220+
- **Repo Memory**: Persistent git-backed storage for agents
221+
- **Sandboxed Execution**: All workflows run in the Agent Workflow Firewall (AWF) sandbox, enabling full `bash` and `edit` tools by default
222+
223+
## Important Notes
224+
225+
- Always reference the instructions file at `https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/github-agentic-workflows.md` for complete documentation
226+
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
227+
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
228+
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
229+
- Follow security best practices: minimal permissions, explicit network access, no template injection
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.
231+
- **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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"entries": {
3+
"github/gh-aw-actions/setup-cli@v0.83.1": {
4+
"repo": "github/gh-aw-actions/setup-cli",
5+
"version": "v0.83.1",
6+
"sha": "8bdba8075360648fe6802302a5b4e016361dc6ac"
7+
},
38
"github/gh-aw-actions/setup@v0.83.1": {
49
"repo": "github/gh-aw-actions/setup",
510
"version": "v0.83.1",

.github/mcp.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"mcpServers": {
3+
"github-agentic-workflows": {
4+
"type": "local",
5+
"command": "gh",
6+
"args": [
7+
"aw",
8+
"mcp-server"
9+
],
10+
"tools": [
11+
"compile",
12+
"audit",
13+
"logs",
14+
"inspect",
15+
"status",
16+
"audit-diff"
17+
]
18+
}
19+
}
20+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
name: agentic-workflows
3+
description: Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
4+
---
5+
6+
# Agentic Workflows Router
7+
8+
Use this skill when a user asks to design, create, update, debug, or upgrade GitHub Agentic Workflows in this repository.
9+
10+
This skill is a dispatcher: identify the task type, load the matching workflow prompt/skill file, and follow it directly. Keep responses concise and ask a clarifying question if the correct prompt is unclear.
11+
12+
Repository overlay (optional):
13+
- If `.github/aw/instructions.md` exists, load it with `@.github/aw/instructions.md` after loading the matched prompt/skill.
14+
- Precedence: repository overlay instructions override upstream defaults when they conflict.
15+
16+
Read only the files you need:
17+
Load these files from `github/gh-aw` (they are not available locally).
18+
- `.github/aw/action-container-substitutions.md`
19+
- `.github/aw/agentic-chat.md`
20+
- `.github/aw/agentic-workflows-mcp.md`
21+
- `.github/aw/asciicharts.md`
22+
- `.github/aw/campaign.md`
23+
- `.github/aw/charts-trending.md`
24+
- `.github/aw/charts.md`
25+
- `.github/aw/cli-commands.md`
26+
- `.github/aw/configure-agentic-engine.md`
27+
- `.github/aw/context.md`
28+
- `.github/aw/create-agentic-workflow-trigger-details.md`
29+
- `.github/aw/create-agentic-workflow.md`
30+
- `.github/aw/create-shared-agentic-workflow.md`
31+
- `.github/aw/debug-agentic-workflow.md`
32+
- `.github/aw/dependabot.md`
33+
- `.github/aw/deployment-status.md`
34+
- `.github/aw/designer.md`
35+
- `.github/aw/evals.md`
36+
- `.github/aw/experiments.md`
37+
- `.github/aw/github-agentic-workflows.md`
38+
- `.github/aw/github-mcp-server.md`
39+
- `.github/aw/instructions.md`
40+
- `.github/aw/llms.md`
41+
- `.github/aw/loop.md`
42+
- `.github/aw/lsp.md`
43+
- `.github/aw/mcp-clis.md`
44+
- `.github/aw/memory-stateful-patterns.md`
45+
- `.github/aw/memory.md`
46+
- `.github/aw/messages.md`
47+
- `.github/aw/multi-agent-research.md`
48+
- `.github/aw/network.md`
49+
- `.github/aw/optimize-agentic-workflow.md`
50+
- `.github/aw/patterns.md`
51+
- `.github/aw/pr-reviewer.md`
52+
- `.github/aw/report.md`
53+
- `.github/aw/reuse.md`
54+
- `.github/aw/safe-outputs-automation.md`
55+
- `.github/aw/safe-outputs-content.md`
56+
- `.github/aw/safe-outputs-management.md`
57+
- `.github/aw/safe-outputs-runtime.md`
58+
- `.github/aw/safe-outputs.md`
59+
- `.github/aw/serena-tool.md`
60+
- `.github/aw/shared-safe-jobs.md`
61+
- `.github/aw/skills.md`
62+
- `.github/aw/subagents.md`
63+
- `.github/aw/syntax-agentic.md`
64+
- `.github/aw/syntax-core.md`
65+
- `.github/aw/syntax-tools-imports.md`
66+
- `.github/aw/syntax.md`
67+
- `.github/aw/test-coverage.md`
68+
- `.github/aw/test-expression.md`
69+
- `.github/aw/token-optimization.md`
70+
- `.github/aw/triggers.md`
71+
- `.github/aw/update-agentic-workflow.md`
72+
- `.github/aw/upgrade-agentic-workflows.md`
73+
- `.github/aw/visual-regression.md`
74+
- `.github/aw/workflow-constraints.md`
75+
- `.github/aw/workflow-editing.md`
76+
- `.github/aw/workflow-patterns.md`
77+
78+
After loading the matching workflow prompt or skill, follow it directly:
79+
- Design workflows from scratch via interview: `.github/aw/designer.md`
80+
- Create new workflows: `.github/aw/create-agentic-workflow.md`
81+
- Configure or add declarative engines: `.github/aw/configure-agentic-engine.md`
82+
- Update existing workflows: `.github/aw/update-agentic-workflow.md`
83+
- Debug, audit, or investigate workflows: `.github/aw/debug-agentic-workflow.md`
84+
- Upgrade workflows and fix deprecations: `.github/aw/upgrade-agentic-workflows.md`
85+
- Create shared components or MCP wrappers: `.github/aw/create-shared-agentic-workflow.md`
86+
- Create report-generating workflows: `.github/aw/report.md`
87+
- Fix Dependabot manifest PRs: `.github/aw/dependabot.md`
88+
- Analyze coverage workflows: `.github/aw/test-coverage.md`
89+
- Render compact markdown charts: `.github/aw/asciicharts.md`
90+
- Map CLI commands to MCP usage: `.github/aw/cli-commands.md`
91+
- Choose workflow architecture and patterns: `.github/aw/patterns.md`
92+
- Optimize token usage and cost: `.github/aw/token-optimization.md`
93+
- Design long-running multi-agent research workflows: `.github/aw/multi-agent-research.md`
94+
95+
When the task involves OTEL, OTLP, traces, observability backends, or telemetry-driven analysis, also read and follow `skills/otel-queries/SKILL.md` after loading the matching workflow prompt or skill.

0 commit comments

Comments
 (0)