Skip to content

Commit 5fc836e

Browse files
Mossakaclaude
andauthored
chore: update gh aw (#387)
* chore: update gh aw Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> * fix(ci-doctor): remove unauthorized expressions and fix permissions - Remove github.event.workflow_run.name and head_branch (not in allowed list) - Add issues: read permission required by github toolset - Recompile all workflows Note: release.md still fails due to gh-aw bug #11378 (template injection validator incorrectly flags env: blocks due to YAML serialization order) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cd1eb82 commit 5fc836e

23 files changed

Lines changed: 6837 additions & 9090 deletions
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing
3+
infer: false
4+
---
5+
6+
# GitHub Agentic Workflows Agent
7+
8+
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.
9+
10+
## What This Agent Does
11+
12+
This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task:
13+
14+
- **Creating new workflows**: Routes to `create` prompt
15+
- **Updating existing workflows**: Routes to `update` prompt
16+
- **Debugging workflows**: Routes to `debug` prompt
17+
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
18+
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
19+
20+
## Files This Applies To
21+
22+
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
23+
- Workflow lock files: `.github/workflows/*.lock.yml`
24+
- Shared components: `.github/workflows/shared/*.md`
25+
- Configuration: `.github/aw/github-agentic-workflows.md`
26+
27+
## Problems This Solves
28+
29+
- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions
30+
- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues
31+
- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes
32+
- **Component Design**: Create reusable shared workflow components that wrap MCP servers
33+
34+
## How to Use
35+
36+
When you interact with this agent, it will:
37+
38+
1. **Understand your intent** - Determine what kind of task you're trying to accomplish
39+
2. **Route to the right prompt** - Load the specialized prompt file for your task
40+
3. **Execute the task** - Follow the detailed instructions in the loaded prompt
41+
42+
## Available Prompts
43+
44+
### Create New Workflow
45+
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
46+
47+
**Prompt file**: `.github/aw/create-agentic-workflow.md`
48+
49+
**Use cases**:
50+
- "Create a workflow that triages issues"
51+
- "I need a workflow to label pull requests"
52+
- "Design a weekly research automation"
53+
54+
### Update Existing Workflow
55+
**Load when**: User wants to modify, improve, or refactor an existing workflow
56+
57+
**Prompt file**: `.github/aw/update-agentic-workflow.md`
58+
59+
**Use cases**:
60+
- "Add web-fetch tool to the issue-classifier workflow"
61+
- "Update the PR reviewer to use discussions instead of issues"
62+
- "Improve the prompt for the weekly-research workflow"
63+
64+
### Debug Workflow
65+
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
66+
67+
**Prompt file**: `.github/aw/debug-agentic-workflow.md`
68+
69+
**Use cases**:
70+
- "Why is this workflow failing?"
71+
- "Analyze the logs for workflow X"
72+
- "Investigate missing tool calls in run #12345"
73+
74+
### Upgrade Agentic Workflows
75+
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
76+
77+
**Prompt file**: `.github/aw/upgrade-agentic-workflows.md`
78+
79+
**Use cases**:
80+
- "Upgrade all workflows to the latest version"
81+
- "Fix deprecated fields in workflows"
82+
- "Apply breaking changes from the new release"
83+
84+
### Create Shared Agentic Workflow
85+
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
86+
87+
**Prompt file**: `.github/aw/create-shared-agentic-workflow.md`
88+
89+
**Use cases**:
90+
- "Create a shared component for Notion integration"
91+
- "Wrap the Slack MCP server as a reusable component"
92+
- "Design a shared workflow for database queries"
93+
94+
## Instructions
95+
96+
When a user interacts with you:
97+
98+
1. **Identify the task type** from the user's request
99+
2. **Load the appropriate prompt** using `.github/aw/<prompt-name>.md`
100+
3. **Follow the loaded prompt's instructions** exactly
101+
4. **If uncertain**, ask clarifying questions to determine the right prompt
102+
103+
## Quick Reference
104+
105+
```bash
106+
# Initialize repository for agentic workflows
107+
gh aw init
108+
109+
# Create a new workflow
110+
gh aw new <workflow-name>
111+
112+
# Compile workflows
113+
gh aw compile [workflow-name]
114+
115+
# Debug workflow runs
116+
gh aw logs [workflow-name]
117+
gh aw audit <run-id>
118+
119+
# Upgrade workflows
120+
gh aw fix --write
121+
gh aw compile --validate
122+
```
123+
124+
## Key Features of gh-aw
125+
126+
- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter
127+
- **AI Engine Support**: Copilot, Claude, Codex, or custom engines
128+
- **MCP Server Integration**: Connect to Model Context Protocol servers for tools
129+
- **Safe Outputs**: Structured communication between AI and GitHub API
130+
- **Strict Mode**: Security-first validation and sandboxing
131+
- **Shared Components**: Reusable workflow building blocks
132+
- **Repo Memory**: Persistent git-backed storage for agents
133+
134+
## Important Notes
135+
136+
- Always reference the instructions file at `.github/aw/github-agentic-workflows.md` for complete documentation
137+
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
138+
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
139+
- Follow security best practices: minimal permissions, explicit network access, no template injection

.github/aw/actions-lock.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"entries": {
3+
"actions/checkout@v4": {
4+
"repo": "actions/checkout",
5+
"version": "v4",
6+
"sha": "34e114876b0b11c390a56381ad16ebd13914f8d5"
7+
},
8+
"actions/github-script@v8": {
9+
"repo": "actions/github-script",
10+
"version": "v8",
11+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
12+
},
13+
"actions/setup-node@v4": {
14+
"repo": "actions/setup-node",
15+
"version": "v4",
16+
"sha": "49933ea5288caeca8642d1e84afbd3f7d6820020"
17+
},
18+
"actions/upload-artifact@v4": {
19+
"repo": "actions/upload-artifact",
20+
"version": "v4",
21+
"sha": "ea165f8d65b6e75b540449e92b4886f43607fa02"
22+
},
23+
"docker/build-push-action@v5": {
24+
"repo": "docker/build-push-action",
25+
"version": "v5",
26+
"sha": "ca052bb54ab0790a636c9b5f226502c73d547a25"
27+
},
28+
"docker/login-action@v3": {
29+
"repo": "docker/login-action",
30+
"version": "v3",
31+
"sha": "5e57cd118135c172c3672efd75eb46360885c0ef"
32+
},
33+
"docker/setup-buildx-action@v3": {
34+
"repo": "docker/setup-buildx-action",
35+
"version": "v3",
36+
"sha": "8d2750c68a42422c14e847fe6c8ac0403b4cbd6f"
37+
},
38+
"githubnext/gh-aw/actions/setup@v0.37.3": {
39+
"repo": "githubnext/gh-aw/actions/setup",
40+
"version": "v0.37.3",
41+
"sha": "55503f44aef44813947980f65655a67b5ed8702f"
42+
},
43+
"softprops/action-gh-release@v1": {
44+
"repo": "softprops/action-gh-release",
45+
"version": "v1",
46+
"sha": "26994186c0ac3ef5cae75ac16aa32e8153525f77"
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)