Skip to content

Commit 8e22ab2

Browse files
Merge remote-tracking branch 'origin/main' into dev/ad/strict-oom
2 parents df0898b + 3499785 commit 8e22ab2

155 files changed

Lines changed: 7854 additions & 5020 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,5 @@
6161
#*.PDF diff=astextplain
6262
#*.rtf diff=astextplain
6363
#*.RTF diff=astextplain
64+
65+
.github/workflows/*.lock.yml linguist-generated=true merge=ours
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
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 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
19+
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
20+
- **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
21+
- **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
22+
- **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
23+
24+
Workflows may optionally include:
25+
26+
- **Project tracking / monitoring** (GitHub Projects updates, status reporting)
27+
- **Orchestration / coordination** (one workflow assigning agents or dispatching and coordinating other workflows)
28+
29+
## Files This Applies To
30+
31+
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
32+
- Workflow lock files: `.github/workflows/*.lock.yml`
33+
- Shared components: `.github/workflows/shared/*.md`
34+
- Configuration: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/github-agentic-workflows.md
35+
36+
## Problems This Solves
37+
38+
- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions
39+
- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues
40+
- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes
41+
- **Component Design**: Create reusable shared workflow components that wrap MCP servers
42+
43+
## How to Use
44+
45+
When you interact with this agent, it will:
46+
47+
1. **Understand your intent** - Determine what kind of task you're trying to accomplish
48+
2. **Route to the right prompt** - Load the specialized prompt file for your task
49+
3. **Execute the task** - Follow the detailed instructions in the loaded prompt
50+
51+
## Available Prompts
52+
53+
### Create New Workflow
54+
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
55+
56+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/create-agentic-workflow.md
57+
58+
**Use cases**:
59+
- "Create a workflow that triages issues"
60+
- "I need a workflow to label pull requests"
61+
- "Design a weekly research automation"
62+
63+
### Update Existing Workflow
64+
**Load when**: User wants to modify, improve, or refactor an existing workflow
65+
66+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/update-agentic-workflow.md
67+
68+
**Use cases**:
69+
- "Add web-fetch tool to the issue-classifier workflow"
70+
- "Update the PR reviewer to use discussions instead of issues"
71+
- "Improve the prompt for the weekly-research workflow"
72+
73+
### Debug Workflow
74+
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
75+
76+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/debug-agentic-workflow.md
77+
78+
**Use cases**:
79+
- "Why is this workflow failing?"
80+
- "Analyze the logs for workflow X"
81+
- "Investigate missing tool calls in run #12345"
82+
83+
### Upgrade Agentic Workflows
84+
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
85+
86+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/upgrade-agentic-workflows.md
87+
88+
**Use cases**:
89+
- "Upgrade all workflows to the latest version"
90+
- "Fix deprecated fields in workflows"
91+
- "Apply breaking changes from the new release"
92+
93+
### Create a Report-Generating Workflow
94+
**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
95+
96+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/report.md
97+
98+
**Use cases**:
99+
- "Create a weekly CI health report"
100+
- "Post a daily security audit to Discussions"
101+
- "Add a status update comment to open PRs"
102+
103+
### Create Shared Agentic Workflow
104+
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
105+
106+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/create-shared-agentic-workflow.md
107+
108+
**Use cases**:
109+
- "Create a shared component for Notion integration"
110+
- "Wrap the Slack MCP server as a reusable component"
111+
- "Design a shared workflow for database queries"
112+
113+
### Fix Dependabot PRs
114+
**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`)
115+
116+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/dependabot.md
117+
118+
**Use cases**:
119+
- "Fix the open Dependabot PRs for npm dependencies"
120+
- "Bundle and close the Dependabot PRs for workflow dependencies"
121+
- "Update @playwright/test to fix the Dependabot PR"
122+
123+
### Analyze Test Coverage
124+
**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.
125+
126+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/test-coverage.md
127+
128+
**Use cases**:
129+
- "Create a workflow that comments coverage on PRs"
130+
- "Analyze coverage trends over time"
131+
- "Add a coverage gate that blocks PRs below a threshold"
132+
133+
### CLI Commands Reference
134+
**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.
135+
136+
**Reference file**: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/cli-commands.md
137+
138+
**Use cases**:
139+
- "How do I trigger workflow X on the main branch?"
140+
- "What's the MCP equivalent of `gh aw logs`?"
141+
- "I'm in Copilot Cloud — how do I compile a workflow?"
142+
- "Show me all available gh aw commands"
143+
144+
## Instructions
145+
146+
When a user interacts with you:
147+
148+
1. **Identify the task type** from the user's request
149+
2. **Load the appropriate prompt** from the GitHub repository URLs listed above
150+
3. **Follow the loaded prompt's instructions** exactly
151+
4. **If uncertain**, ask clarifying questions to determine the right prompt
152+
153+
## Quick Reference
154+
155+
```bash
156+
# Initialize repository for agentic workflows
157+
gh aw init
158+
159+
# Generate the lock file for a workflow
160+
gh aw compile [workflow-name]
161+
162+
# Trigger a workflow on demand (preferred over gh workflow run)
163+
gh aw run <workflow-name> # interactive input collection
164+
gh aw run <workflow-name> --ref main # run on a specific branch
165+
166+
# Debug workflow runs
167+
gh aw logs [workflow-name]
168+
gh aw audit <run-id>
169+
170+
# Upgrade workflows
171+
gh aw fix --write
172+
gh aw compile --validate
173+
```
174+
175+
## Key Features of gh-aw
176+
177+
- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter
178+
- **AI Engine Support**: Copilot, Claude, Codex, or custom engines
179+
- **MCP Server Integration**: Connect to Model Context Protocol servers for tools
180+
- **Safe Outputs**: Structured communication between AI and GitHub API
181+
- **Strict Mode**: Security-first validation and sandboxing
182+
- **Shared Components**: Reusable workflow building blocks
183+
- **Repo Memory**: Persistent git-backed storage for agents
184+
- **Sandboxed Execution**: All workflows run in the Agent Workflow Firewall (AWF) sandbox, enabling full `bash` and `edit` tools by default
185+
186+
## Important Notes
187+
188+
- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/github-agentic-workflows.md for complete documentation
189+
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
190+
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
191+
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
192+
- Follow security best practices: minimal permissions, explicit network access, no template injection
193+
- **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.72.1/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
194+
- **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.
195+
- **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.
196+
- **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/cli-commands.md

.github/aw/actions-lock.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v9.0.0": {
4+
"repo": "actions/github-script",
5+
"version": "v9.0.0",
6+
"sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
7+
},
8+
"github/gh-aw-actions/setup@v0.72.1": {
9+
"repo": "github/gh-aw-actions/setup",
10+
"version": "v0.72.1",
11+
"sha": "bc56a0cad2f450c562810785ef38649c04db812a"
12+
}
13+
},
14+
"containers": {
15+
"ghcr.io/github/gh-aw-firewall/agent:0.25.41": {
16+
"image": "ghcr.io/github/gh-aw-firewall/agent:0.25.41",
17+
"digest": "sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770",
18+
"pinned_image": "ghcr.io/github/gh-aw-firewall/agent:0.25.41@sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770"
19+
},
20+
"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41": {
21+
"image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41",
22+
"digest": "sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0",
23+
"pinned_image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41@sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0"
24+
},
25+
"ghcr.io/github/gh-aw-firewall/squid:0.25.41": {
26+
"image": "ghcr.io/github/gh-aw-firewall/squid:0.25.41",
27+
"digest": "sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4",
28+
"pinned_image": "ghcr.io/github/gh-aw-firewall/squid:0.25.41@sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4"
29+
}
30+
}
31+
}

.github/copilot-instructions.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This project includes several key products and libraries that facilitate SQL Ser
3434
## 🛠️ Key Features
3535
- **Connectivity to SQL Server**: Provides robust and secure connections to SQL Server databases, using various authentication methods, such as Windows Authentication, SQL Server Authentication, and Entra ID authentication, e.g. `ActiveDirectoryIntegrated`, `ActiveDirectoryPassword`, `ActiveDirectoryServicePrincipal`,`ActiveDirectoryInteractive`, `ActiveDirectoryDefault`, and `ActiveDirectoryManagedIdentity`.
3636
- **Connection Resiliency**: Implements connection resiliency features to handle transient faults and network issues, ensuring reliable database connectivity.
37-
- **TLS Encryption**: Supports secure connections using TLS protocols to encrypt data in transit. Supports TLS 1.2 and higher, ensuring secure communication with SQL Server. Supported encryption modes are:
37+
- **TLS Encryption**: Supports secure connections using TLS protocols to encrypt data in transit. Supports TLS 1.2 and higher, ensuring secure communication with SQL Server. Supported encryption modes are:
3838
- **Optional**: Encryption is used if available, but not required.
3939
- **Mandatory**: Encryption is mandatory for the connection.
4040
- **Strict**: Enforces strict TLS requirements, ensuring only secure connections are established.
@@ -50,6 +50,7 @@ This project includes several key products and libraries that facilitate SQL Ser
5050
- **Data Encryption**: Supports data encryption for secure data transmission.
5151
- **Logging and Diagnostics**: Provides event source tracing diagnostic capabilities for troubleshooting.
5252
- **Failover Support**: Handles automatic failover scenarios for high availability.
53+
- Compatibility switch: `Switch.Microsoft.Data.SqlClient.UseLegacyFailoverAlternationOnLoginSqlErrors` (default `false`) can restore legacy alternation behavior in `LoginWithFailover` for login-phase SQL errors.
5354
- **Cross-Platform Support**: Compatible with both .NET Framework and .NET Core, allowing applications to run on Windows, Linux, and macOS.
5455
- **Column Encryption AKV Provider**: Supports Azure Key Vault (AKV) provider for acquiring keys from Azure Key Vault to be used for encryption and decryption.
5556

@@ -123,7 +124,7 @@ When a new issue is created, follow these steps:
123124
- Ensure the PR passes all CI checks before merging.
124125

125126
### ✅ Closing Issues
126-
- Add a comment summarizing the fix and referencing the PR
127+
- Add a comment summarizing the fix and referencing the PR
127128

128129
### ⚙️ Automating Workflows
129130
- Auto-label PRs based on folder paths (e.g., changes in `src/Microsoft.Data.SqlClient/src/``Area\SqlClient`, changes in `tests/``Area\Testing`) and whether they add new public APIs or introduce a breaking change.
@@ -150,6 +151,14 @@ When a new issue is created, follow these steps:
150151
- Do not modify `CHANGELOG.md` unless executing a release workflow (see `release-notes` prompt).
151152
- Do not close issues without a fix or without providing a clear reason.
152153

154+
## Terminal Execution Safety
155+
- Treat any non-zero shell exit code as a failed step that requires correction before proceeding.
156+
- If a bash process exits, do not wait for more output from that process; rerun the command in a fresh terminal session.
157+
- Validate that expected command output was produced before using it as evidence for conclusions.
158+
- When terminal execution fails, surface the failure immediately and retry with a corrected command.
159+
- Avoid `set -e` in this automation workflow; use focused commands and verify each result explicitly so shell exits are observable and attributable.
160+
- Prefer short, single-purpose terminal commands over long chained scripts when debugging or gathering state.
161+
153162
## 📝 Notes
154163
- Update policies and guidelines in the `policy/` directory as needed based on trending practices and team feedback.
155164
- Regularly review and update the `doc/` directory to ensure it reflects the current state of the project.

.github/instructions/ado-pipelines.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Key parameters:
4949
- `runAlwaysEncryptedTests` — include AE test set; default `true`
5050
- `runLegacySqlTests` — include SQL Server 2016/2017 manual-test legs; default `true`
5151
- `debug` — enable debug output; default `false`
52-
- `dotnetVerbosity`MSBuild verbosity; default `normal`
52+
- `dotnetVerbosity`build verbosity; default `normal`
5353

5454
## Build Stage Order
5555

.github/instructions/architecture.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The `netcore/` and `netfx/` directories are legacy artifacts from the old dual-p
4949
- `netcore/ref/` and `netfx/ref/`**STILL ACTIVE**. Reference assemblies remain in these directories and define the public API surface for each target framework.
5050

5151
### OS Targeting with `TargetOs`
52-
The unified project uses a `TargetOs` MSBuild property to handle OS-specific compilation:
52+
The unified project uses a `TargetOs` build property to handle OS-specific compilation:
5353

5454
```xml
5555
<!-- Automatic OS detection -->

.github/instructions/features.instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ AppContext switches allow runtime behavior changes without modifying connection
246246
| `Switch.Microsoft.Data.SqlClient.EnableMultiSubnetFailoverByDefault` | `false` | Sets `MultiSubnetFailover=true` as the default for all connections |
247247
| `Switch.Microsoft.Data.SqlClient.EnableUserAgent` | varies | Controls sending user agent information to SQL Server |
248248
| `Switch.Microsoft.Data.SqlClient.IgnoreServerProvidedFailoverPartner` | `false` | Ignores failover partner information sent by the server |
249+
| `Switch.Microsoft.Data.SqlClient.UseLegacyFailoverAlternationOnLoginSqlErrors` | `false` | Restores legacy `LoginWithFailover` alternation for login-phase SQL errors when parser state is not `Closed` |
249250
| `Switch.Microsoft.Data.SqlClient.LegacyRowVersionNullBehavior` | `false` | Restores legacy null handling for rowversion columns |
250251
| `Switch.Microsoft.Data.SqlClient.LegacyVarTimeZeroScaleBehaviour` | `false` | Restores legacy zero-scale behavior for time/datetime2/datetimeoffset |
251252
| `Switch.Microsoft.Data.SqlClient.MakeReadAsyncBlocking` | `false` | Makes ReadAsync behave synchronously (legacy compat) |

0 commit comments

Comments
 (0)