Skip to content

Commit b9d21d7

Browse files
Mossakaclaude
andauthored
chore: upgrade gh-aw workflows to v0.42.0 and fix strict mode violations (#552)
- Run `gh aw upgrade` to update agent files, action pins, and recompile all workflows - Fix issue-monster.md: replace write permissions with read (safe-outputs handles writes) - Update 10 GitHub Actions to latest versions (setup v0.42.7, checkout v4.3.1, etc.) - Run post-processing to use local awf build in CI smoke/build-test workflows - Add recompile-workflows skill for consistent future workflow regeneration Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8976c66 commit b9d21d7

16 files changed

Lines changed: 371 additions & 100 deletions
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: recompile-workflows
3+
description: Regenerate and post-process all agentic workflows. Use when gh-aw is updated, workflow .md files change, or when asked to recompile/regenerate workflows.
4+
allowed-tools: Bash(gh:*), Bash(npx:*), Read, Glob, Edit
5+
---
6+
7+
# Recompile Agentic Workflows
8+
9+
Use this skill when you need to regenerate all agentic workflow lock files and apply post-processing.
10+
11+
## IMPORTANT: Post-processing is required after EVERY lock file change
12+
13+
Any time `.lock.yml` files are regenerated — whether via `gh aw compile`, `gh aw upgrade`, or any other gh-aw command — you MUST run the post-processing script afterward. This is not optional.
14+
15+
## Steps
16+
17+
### 1. Compile or upgrade workflows
18+
19+
Use whichever command is appropriate:
20+
21+
```bash
22+
# Full upgrade (updates agents, actions, codemods, then compiles)
23+
gh aw upgrade
24+
25+
# Just recompile (when only .md workflow files changed)
26+
gh aw compile
27+
```
28+
29+
If any workflow fails to compile (e.g., strict mode violations like `contents: write`), fix the `.md` source file and re-run.
30+
31+
### 2. Run post-processing script (ALWAYS)
32+
33+
**This step MUST run every time lock files are regenerated, regardless of how they were generated.**
34+
35+
The post-processing script replaces the "Install awf binary" step in smoke and build-test workflows with local build+install steps, so CI tests the repo's own code instead of a released binary.
36+
37+
```bash
38+
npx ts-node scripts/ci/postprocess-smoke-workflows.ts
39+
```
40+
41+
This updates these lock files:
42+
- `smoke-copilot.lock.yml`
43+
- `smoke-claude.lock.yml`
44+
- `smoke-chroot.lock.yml`
45+
- `build-test-node.lock.yml`
46+
- `build-test-go.lock.yml`
47+
- `build-test-rust.lock.yml`
48+
- `build-test-java.lock.yml`
49+
- `build-test-cpp.lock.yml`
50+
- `build-test-deno.lock.yml`
51+
- `build-test-bun.lock.yml`
52+
53+
## Common Issues
54+
55+
### Strict mode violations
56+
Newer gh-aw versions enforce strict mode which disallows write permissions like `contents: write`, `issues: write`, etc. Workflows should use `safe-outputs` for write operations and only request `read` permissions.
57+
58+
### Discussion category warnings
59+
Warnings about "General" vs "general" discussion category casing are non-blocking.
60+
61+
## Verification
62+
63+
After both steps, run `git diff --stat` to review all changed files. Expect changes in:
64+
- `.github/agents/` - Updated agent files
65+
- `.github/aw/actions-lock.json` - Updated action pins
66+
- `.github/workflows/*.lock.yml` - Regenerated lock files
67+
- `.github/workflows/*.md` - If codemods applied fixes

.github/agents/agentic-workflows.agent.md

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
1717
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
1818
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
1919

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+
2025
## Files This Applies To
2126

2227
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
2328
- Workflow lock files: `.github/workflows/*.lock.yml`
2429
- Shared components: `.github/workflows/shared/*.md`
25-
- Configuration: `.github/aw/github-agentic-workflows.md`
30+
- Configuration: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/github-agentic-workflows.md
2631

2732
## Problems This Solves
2833

@@ -44,7 +49,7 @@ When you interact with this agent, it will:
4449
### Create New Workflow
4550
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
4651

47-
**Prompt file**: `.github/aw/create-agentic-workflow.md`
52+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/create-agentic-workflow.md
4853

4954
**Use cases**:
5055
- "Create a workflow that triages issues"
@@ -54,7 +59,7 @@ When you interact with this agent, it will:
5459
### Update Existing Workflow
5560
**Load when**: User wants to modify, improve, or refactor an existing workflow
5661

57-
**Prompt file**: `.github/aw/update-agentic-workflow.md`
62+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/update-agentic-workflow.md
5863

5964
**Use cases**:
6065
- "Add web-fetch tool to the issue-classifier workflow"
@@ -64,7 +69,7 @@ When you interact with this agent, it will:
6469
### Debug Workflow
6570
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
6671

67-
**Prompt file**: `.github/aw/debug-agentic-workflow.md`
72+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/debug-agentic-workflow.md
6873

6974
**Use cases**:
7075
- "Why is this workflow failing?"
@@ -74,7 +79,7 @@ When you interact with this agent, it will:
7479
### Upgrade Agentic Workflows
7580
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
7681

77-
**Prompt file**: `.github/aw/upgrade-agentic-workflows.md`
82+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/upgrade-agentic-workflows.md
7883

7984
**Use cases**:
8085
- "Upgrade all workflows to the latest version"
@@ -84,19 +89,43 @@ When you interact with this agent, it will:
8489
### Create Shared Agentic Workflow
8590
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
8691

87-
**Prompt file**: `.github/aw/create-shared-agentic-workflow.md`
92+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/create-shared-agentic-workflow.md
8893

8994
**Use cases**:
9095
- "Create a shared component for Notion integration"
9196
- "Wrap the Slack MCP server as a reusable component"
9297
- "Design a shared workflow for database queries"
9398

99+
### Orchestration and Delegation
100+
101+
**Load when**: Creating or updating workflows that coordinate multiple agents or dispatch work to other workflows
102+
103+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/orchestration.md
104+
105+
**Use cases**:
106+
- Assigning work to AI coding agents
107+
- Dispatching specialized worker workflows
108+
- Using correlation IDs for tracking
109+
- Orchestration design patterns
110+
111+
### GitHub Projects Integration
112+
113+
**Load when**: Creating or updating workflows that manage GitHub Projects v2
114+
115+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/projects.md
116+
117+
**Use cases**:
118+
- Tracking items and fields with update-project
119+
- Posting periodic run summaries
120+
- Creating new projects
121+
- Projects v2 authentication and configuration
122+
94123
## Instructions
95124

96125
When a user interacts with you:
97126

98127
1. **Identify the task type** from the user's request
99-
2. **Load the appropriate prompt** using `.github/aw/<prompt-name>.md`
128+
2. **Load the appropriate prompt** from the GitHub repository URLs listed above
100129
3. **Follow the loaded prompt's instructions** exactly
101130
4. **If uncertain**, ask clarifying questions to determine the right prompt
102131

@@ -106,9 +135,6 @@ When a user interacts with you:
106135
# Initialize repository for agentic workflows
107136
gh aw init
108137

109-
# Create a new workflow
110-
gh aw new <workflow-name>
111-
112138
# Compile workflows
113139
gh aw compile [workflow-name]
114140

@@ -133,7 +159,7 @@ gh aw compile --validate
133159

134160
## Important Notes
135161

136-
- Always reference the instructions file at `.github/aw/github-agentic-workflows.md` for complete documentation
162+
- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.42.0/.github/aw/github-agentic-workflows.md for complete documentation
137163
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
138164
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
139165
- Follow security best practices: minimal permissions, explicit network access, no template injection

.github/aw/actions-lock.json

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,50 @@
11
{
22
"entries": {
3-
"actions/checkout@v4": {
3+
"actions/checkout@v4.3.1": {
44
"repo": "actions/checkout",
5-
"version": "v4",
5+
"version": "v4.3.1",
66
"sha": "34e114876b0b11c390a56381ad16ebd13914f8d5"
77
},
88
"actions/github-script@v8": {
99
"repo": "actions/github-script",
1010
"version": "v8",
1111
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
1212
},
13-
"actions/setup-node@v4": {
13+
"actions/setup-node@v4.4.0": {
1414
"repo": "actions/setup-node",
15-
"version": "v4",
15+
"version": "v4.4.0",
1616
"sha": "49933ea5288caeca8642d1e84afbd3f7d6820020"
1717
},
18-
"actions/upload-artifact@v4": {
18+
"actions/upload-artifact@v4.6.2": {
1919
"repo": "actions/upload-artifact",
20-
"version": "v4",
20+
"version": "v4.6.2",
2121
"sha": "ea165f8d65b6e75b540449e92b4886f43607fa02"
2222
},
23-
"docker/build-push-action@v5": {
23+
"docker/build-push-action@v5.4.0": {
2424
"repo": "docker/build-push-action",
25-
"version": "v5",
25+
"version": "v5.4.0",
2626
"sha": "ca052bb54ab0790a636c9b5f226502c73d547a25"
2727
},
28-
"docker/login-action@v3": {
28+
"docker/login-action@v3.7.0": {
2929
"repo": "docker/login-action",
30-
"version": "v3",
31-
"sha": "5e57cd118135c172c3672efd75eb46360885c0ef"
30+
"version": "v3.7.0",
31+
"sha": "c94ce9fb468520275223c153574b00df6fe4bcc9"
3232
},
33-
"docker/setup-buildx-action@v3": {
33+
"docker/setup-buildx-action@v3.12.0": {
3434
"repo": "docker/setup-buildx-action",
35-
"version": "v3",
35+
"version": "v3.12.0",
3636
"sha": "8d2750c68a42422c14e847fe6c8ac0403b4cbd6f"
3737
},
38-
"github/gh-aw/actions/setup@v0.37.3": {
39-
"repo": "github/gh-aw/actions/setup",
40-
"version": "v0.37.3",
41-
"sha": "55503f44aef44813947980f65655a67b5ed8702f"
42-
},
43-
"github/gh-aw/actions/setup@v0.38.1": {
44-
"repo": "github/gh-aw/actions/setup",
45-
"version": "v0.38.1",
46-
"sha": "98493c96da3fb6a59dc232e32a7b990a4c4e8969"
47-
},
48-
"github/gh-aw/actions/setup@v0.40.0": {
49-
"repo": "github/gh-aw/actions/setup",
50-
"version": "v0.40.0",
51-
"sha": "76d37d925abd44fee97379206f105b74b91a285b"
52-
},
5338
"github/gh-aw/actions/setup@v0.42.0": {
5439
"repo": "github/gh-aw/actions/setup",
5540
"version": "v0.42.0",
5641
"sha": "a7134347103ecf66b4bd422c3e9ce6466d400c02"
5742
},
43+
"github/gh-aw/actions/setup@v0.42.7": {
44+
"repo": "github/gh-aw/actions/setup",
45+
"version": "v0.42.7",
46+
"sha": "b16be66a3f0089b92ad39c580f42421b7104a849"
47+
},
5848
"softprops/action-gh-release@v1": {
5949
"repo": "softprops/action-gh-release",
6050
"version": "v1",

.github/workflows/agentics-maintenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ name: Agentic Maintenance
3333

3434
on:
3535
schedule:
36-
- cron: "37 0 * * *" # Daily (based on minimum expires: 30 days)
36+
- cron: "37 0 * * *" # Daily (based on minimum expires: 7 days)
3737
workflow_dispatch:
3838

3939
permissions: {}

.github/workflows/build-test-bun.lock.yml

Lines changed: 25 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/build-test-cpp.lock.yml

Lines changed: 25 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/build-test-deno.lock.yml

Lines changed: 25 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)