Skip to content

Commit 4d91040

Browse files
Copilotpelikhan
andauthored
docs: sharpen workflow-authoring guidance for PR scoping, backend compatibility checks, and coverage fallback networking (#39622)
* Initial plan * docs: refine persona-driven workflow creation guidance Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
1 parent 96acd10 commit 4d91040

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

.github/aw/create-agentic-workflow.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,19 @@ Use [workflow-patterns.md](workflow-patterns.md) for trigger-selection guidance.
8585

8686
Compact scenario examples:
8787

88-
- **Schema review on PRs**: trigger `pull_request`, read via `github` (`gh-proxy`), publish findings with `add-comment`, call `noop` when schema is unchanged.
88+
- **Schema/API review on PRs**: trigger `pull_request` with `paths:` scoped to backend contract files (for example `db/migrate/**`, `migrations/**`, `schema/**`, `openapi/**`, `api/**`), read via `github` (`gh-proxy`), publish findings with `add-comment`, call `noop` when contracts are unchanged.
8989
- **Visual regression on UI changes**: trigger `pull_request`, use `playwright` + `cache-memory`, keep writes in `add-comment`, call `noop` when UI paths are unchanged.
9090
- **Deployment incident triage**: use `deployment_status` for external provider failures and `workflow_run` for GitHub Actions failures, publish incident reports via `create-issue`, call `noop` when a failure self-recovers or is duplicate noise.
9191
- **Product/stakeholder digest**: use fuzzy `schedule` plus optional `workflow_dispatch`, publish digest with `create-issue`, call `noop` when there are no updates in the date window.
9292

93+
### 2a. Backend review compact guidance
94+
95+
For backend-focused PR automation (schema migrations and API compatibility):
96+
97+
- scope `pull_request.paths` to backend contract indicators instead of whole-repo review
98+
- instruct the agent to classify changes as additive, backward-compatible, or breaking, then report only actionable risks
99+
- include explicit `noop` criteria when no migration/API contract files changed
100+
93101
### 3. Keep permissions read-only
94102

95103
The main agent job must stay read-only.
@@ -269,7 +277,7 @@ Before finalizing any newly generated workflow, verify:
269277

270278
Before finalizing any newly generated workflow, verify:
271279

272-
- [ ] **Paths scope**: include `paths:`/`paths-ignore:` when the automation should ignore unrelated files
280+
- [ ] **Paths scope**: include `paths:`/`paths-ignore:` when the automation should ignore unrelated files (for backend reviews, include migration/schema/API contract globs)
273281
- [ ] **Labels scope**: define required labels (for example `label_command` names or PR/issue label filters) when label-based routing is expected
274282
- [ ] **Workflow-name scope**: for `workflow_run`, explicitly name target workflows and conclusions to avoid accidental matches
275283
- [ ] **Date-window scope**: for reporting/triage, state the exact window (for example `last 24h`, `since previous run`, `current week`)

.github/aw/test-coverage.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ safe-outputs:
4545
4646
Use **only when** no prior CI artifact exists or CI doesn't upload coverage. Supported commands:
4747
48+
- infer the repository ecosystem from project files before running fallback coverage
49+
- configure `network.allowed` to include `defaults` plus the inferred ecosystem(s) (for example `node`, `python`, `go`)
50+
- never run fallback coverage with `network: defaults` alone
51+
52+
Example fallback network config:
53+
54+
```yaml
55+
network:
56+
allowed:
57+
- defaults
58+
- node
59+
```
60+
4861
| Language | Command |
4962
|---|---|
5063
| Node.js | `npx jest --coverage --coverageReporters=json-summary` |

0 commit comments

Comments
 (0)