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
Copy file name to clipboardExpand all lines: .github/agents/ci-cleaner.agent.md
+49-20Lines changed: 49 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,14 +128,31 @@ make test-js
128
128
129
129
**Success criteria**: All JavaScript tests pass
130
130
131
-
### 5. Recompile All Workflows
131
+
### 5. Recompile All Workflows (Only When Necessary)
132
132
133
-
Recompile all workflow markdown files to YAML lock files:
133
+
`make recompile` regenerates ALL `.lock.yml` files. Running it when no `.md` workflow files changed produces 40–100 unchanged diffs and triggers an E003 "PR too large" error.
134
+
135
+
**Before running recompile**, check whether any workflow `.md` files were modified:
-**If the output is empty** (no workflow `.md` files changed) → **SKIP this step entirely**. Do not run `make recompile`.
142
+
-**If workflow `.md` files are listed** → Run the recompile:
134
143
135
144
```bash
136
145
make recompile
137
146
```
138
147
148
+
After recompile, immediately verify the file count:
149
+
150
+
```bash
151
+
git diff --name-only | wc -l
152
+
```
153
+
154
+
**If more than 50 files changed**: This indicates a deeper issue (e.g., binary version mismatch or template changes). Do **not** create a PR with 50+ changed files. Call `noop` with: "Recompile generated {count} files (>50 limit). Possible cause: binary version mismatch / template changes. Manual investigation required."
155
+
139
156
This command:
140
157
1. Syncs templates from `.github` to `pkg/cli/templates`
141
158
2. Rebuilds the `gh-aw` binary
@@ -148,7 +165,7 @@ This command:
148
165
3. Fix issues in the workflow frontmatter or content
149
166
4. Re-run `make recompile`
150
167
151
-
**Success criteria**: All workflows compile successfully without errors
168
+
**Success criteria**: All workflows compile successfully without errors; total changed file count ≤ 50
152
169
153
170
## Mandatory Exit Protocol
154
171
@@ -170,6 +187,16 @@ This command:
170
187
171
188
This is a strict requirement — **every session must produce a safe output**.
172
189
190
+
## ⚠️ ABSOLUTE FINAL RULE (cannot be skipped)
191
+
192
+
Before your response ends — no matter what happened — you MUST call one of:
193
+
-`create_pull_request` if you changed any files
194
+
-`noop` if you changed nothing
195
+
196
+
**If you are about to end your response without having called a safe-output tool, call `noop` RIGHT NOW** with whatever message describes the situation.
197
+
198
+
There are no exceptions to this rule.
199
+
173
200
## Workflow & Best Practices
174
201
175
202
### Execution Order
@@ -191,6 +218,18 @@ When fixing issues:
191
218
3.**Verify the fix** before moving to the next issue
192
219
4.**Commit progress** after completing each major step
193
220
221
+
### File-Count Guard Before PR Creation
222
+
223
+
Before committing and calling `create_pull_request`, **always** verify how many files you are about to include:
224
+
225
+
```bash
226
+
git add -A
227
+
git diff --cached --name-only | wc -l
228
+
```
229
+
230
+
-**If the count is ≤ 80**: Proceed normally with `git commit` and `create_pull_request`.
231
+
-**If the count is > 80**: Too many files — this will exceed the PR size limit. Call `noop` with an explanation of what caused the large diff instead of creating an oversized PR.
232
+
194
233
### Common Issues
195
234
196
235
#### Go Linting Issues
@@ -227,30 +266,20 @@ The repository uses a Makefile for all build/test/lint operations. Key commands:
227
266
-`make test` - Run all Go tests including integration (~30s)
228
267
-`make test-js` - Run JavaScript tests
229
268
-`make test-all` - Run both Go and JavaScript tests
230
-
-`make recompile` - Recompile all workflows
231
-
-`make agent-finish` - Run complete validation (use this for final check)
269
+
-`make recompile` - Recompile all workflows (only if .md files changed)
**⚠️ Do NOT run `make deps-dev` or `make agent-finish`** — deps are already installed by the workflow setup steps, and `make agent-finish` takes 10–15 minutes. Only run targeted commands (`make fmt`, `make lint`, `make test-unit`, `make recompile` (only if .md files changed)) as needed.
232
273
233
274
### Final Validation
234
275
235
-
Before completing your work, optionally run the full validation suite:
276
+
Only run targeted validations, not the full suite:
236
277
237
278
```bash
238
-
make agent-finish
279
+
make fmt && make lint && make test-unit
239
280
```
240
281
241
-
**WARNING**: This command takes ~10-15 minutes and runs:
0 commit comments