You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f934651
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .github/agents/agentic-workflows.md
+55-14Lines changed: 55 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,20 @@ disable-model-invocation: true
8
8
9
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
10
11
+
For debugging, incident, health, and failure-related optimization requests, first
12
+
load `.github/aw/debug-bootstrap.md` from the guidance repository/ref and follow
13
+
its intent routing, even when the CLI is installed. This takes precedence over
14
+
generic update, upgrade, or optimization routes. Preserve that guidance ref for
15
+
all debugging links and public raw fallbacks; URLs showing `main` below are
16
+
defaults only when no guidance revision is supplied. Reuse already-loaded guides.
17
+
The intent index is `.github/aw/debug-scenarios.md`; load only the selected
18
+
specialized route, not every debugging reference.
19
+
11
20
## Repository Instructions Overlay
12
21
13
-
If `.github/aw/instructions.md` exists, load it with:
14
-
@.github/aw/instructions.md
22
+
Load the target repository's `.github/aw/instructions.md`, if present.
23
+
Use `@.github/aw/instructions.md` only in a matching checkout; do not substitute
24
+
a guidance-repository overlay.
15
25
16
26
Precedence: repository overlay instructions override defaults in this agent when they conflict.
17
27
@@ -21,7 +31,8 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
21
31
22
32
-**Creating new workflows**: Routes to `create` prompt
23
33
-**Updating existing workflows**: Routes to `update` prompt
24
-
-**Debugging workflows**: Routes to `debug` prompt
34
+
-**Diagnosis, patching, and active debugging**: Routes to `debug-agentic-workflow` for the local-first strategy, evidence triage and live gates
35
+
-**Repository-wide debugging or run analysis**: Routes to `analyzing-runs` for existing-run failure clustering before selecting a workflow; supplied run/failure scope takes precedence
25
36
-**Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
26
37
-**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
38
-**Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
@@ -31,6 +42,8 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
31
42
-**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
43
-**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
44
-**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
45
+
-**Git-backed work queues**: Routes to `work-queue` instructions for producers, dispatchers, workers, observers, deployment and recovery
@@ -61,7 +75,9 @@ When you interact with this agent, it will:
61
75
62
76
## Available Prompts
63
77
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.
78
+
> **Note**: The prompt and reference files below are from [`github/gh-aw`](https://github.com/github/gh-aw). Use a local guidance checkout only when its repository/ref matches the requested guidance; otherwise load their public URLs at the resolved guidance ref.
79
+
80
+
If GitHub API, `gh api`, or GitHub MCP downloads return HTTP 403 (including a token SAML-authorized for a different organization), do not retry with the same token. Fetch the public file without authentication from `https://raw.githubusercontent.com/github/gh-aw/main/<path>` instead, preserving its repository-relative path (including `.github/`). For example: `curl --fail --silent --show-error --location 'https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/create-agentic-workflow.md'`. Use the same fallback for referenced instructions and `SKILL.md` files; never send an Authorization header or token to the raw URL. If the public download fails, report that error rather than proceeding without the required instructions. This fallback is for public `github/gh-aw` content only, not private or enterprise repositories.
65
81
66
82
### Create New Workflow
67
83
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
@@ -83,16 +99,32 @@ When you interact with this agent, it will:
83
99
- "Update the PR reviewer to use discussions instead of issues"
84
100
- "Improve the prompt for the weekly-research workflow"
85
101
86
-
### Debug Workflow
102
+
### Diagnose, Patch, or Debug a Workflow
87
103
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
Also load it after the primary create/update/debug/upgrade prompt whenever a
220
+
workflow uses `tools.work-queue`. Load linked developer docs and specifications
221
+
only when needed; do not substitute lightweight WorkQueueOps backlog guidance
222
+
for the Git-backed protocol.
223
+
183
224
When a user interacts with you:
184
225
185
226
1.**Identify the task type** from the user's request
@@ -196,13 +237,13 @@ gh aw init
196
237
# Generate the lock file for a workflow
197
238
gh aw compile [workflow-name]
198
239
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
240
+
# Only where permitted and human-validated under debug-agentic-workflow.md:
241
+
gh aw run <workflow-name> --ref REVIEWED_REF
202
242
203
243
# Debug workflow runs
204
-
gh aw logs [workflow-name]
205
-
gh aw audit <run-id>
244
+
gh aw logs [workflow-name] --repo HOST/OWNER/REPO
245
+
gh aw audit <run-url># preserve host/repository and any job/step scope
246
+
gh aw compile <workflow-name> --dry-run # first test of workflow changes
206
247
207
248
# Upgrade workflows
208
249
gh aw fix --write
@@ -222,12 +263,12 @@ gh aw compile --validate
222
263
223
264
## Important Notes
224
265
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
266
+
-For complete documentation, load `.github/aw/github-agentic-workflows.md`from the resolved guidance repository/ref.
267
+
- Use gh-aw MCP tools only when exposed and authorized; otherwise use available CLI, cached evidence or static source through the CLI/MCP reference.
227
268
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
228
269
-**Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
229
270
- Follow security best practices: minimal permissions, explicit network access, no template injection
230
271
-**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
272
-**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.
273
+
-**Triggering runs**: Only where permitted and human-validated under `debug-agentic-workflow.md`, prefer `gh aw run <workflow-name>`over `gh workflow run <file>.lock.yml` for workflow resolution, input validation and run-tracking. Use the reviewed remote ref; explicit no-dispatch rules override user requests.
233
274
-**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`
0 commit comments