Skip to content

Commit f52b703

Browse files
authored
[Agentic Workflow]: Add ci-doctor workflow (openvinotoolkit#3379)
<!-- Keep your pull requests (PRs) as atomic as possible. That increases the likelihood that an individual PR won't be stuck because of adjacent problems, merge conflicts, or code review. Your merged PR is going to appear in the automatically generated release notes on GitHub. So the clearer the title the better. --> ## Description <!-- Please include a summary of the change. Also include relevant motivation and context. --> **Short agentic workflows introduction** GH Agentic workflows documentation: https://github.github.com/gh-aw/introduction/overview/ Workflow added with use of `gh aw` cli tool: https://github.com/github/gh-aw `ci-doctor.md` have 2 parts: 1. [frontmatter](https://github.github.com/gh-aw/reference/glossary/#frontmatter) - YAML settings controlling when the workflow runs, permissions, and available tools 2. Free form body with human language instructions - model prompt Each time frontmatter changed workflow .md file should be recompiled. The produced file is `.lock.yaml` - GitHub Actions workflow file. **Permissions** The copilot stage has `read-all` permissions - cannot change repository recourses. Workflow writes are implemented with [safe-outputs](https://github.github.com/gh-aw/reference/safe-outputs/). Model generated actions which then processed by separate permission-controlled jobs. This guarantees only specified write actions can be performed. **The follow-ups** 1. Workflow has only manual trigger for testing. Need to uncomment trigger on failed workflow trigger once testing complete 2. I will add prompt to investigate OV related issues. And ask agent to create a PR with OV version fix automatically. ## Checklist: - [x] This PR follows [GenAI Contributing guidelines](https://github.com/openvinotoolkit/openvino.genai?tab=contributing-ov-file#contributing). <!-- Always follow them. If there are deviations, explain what and why. --> - [NA] Tests have been updated or added to cover the new code. <!-- Specify exactly which tests were added or updated. If the change isn't maintenance related, update the tests at https://github.com/openvinotoolkit/openvino.genai/tree/master/tests or explain in the description why the tests don't need an update. --> - [ ] This PR fully addresses the ticket. <!--- If not, explain clearly what is covered and what is not. If follow-up pull requests are needed, specify in the description. --> - [NA] I have made corresponding changes to the documentation. <!-- Run github.com/\<username>/openvino.genai/actions/workflows/deploy_gh_pages.yml on your fork with your branch as a parameter to deploy a test version with the updated content. Replace this comment with the link to the built docs. If the documentation is updated in a separate PR, clearly specify it. -->
1 parent dfc26d1 commit f52b703

File tree

6 files changed

+1636
-0
lines changed

6 files changed

+1636
-0
lines changed

.gitattributes

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

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.46.5": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.46.5",
11+
"sha": "5a79466d65414632d47c7869b27170ade5b9404e"
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)