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
Save these diff URLs — you will need them for the PR/issue body in Step 7.
128
+
113
129
### 0b. Check for feedback loops
114
130
115
131
Check the `sender.login` field from the event payload (extracted in Step 0a). If the sender login is `github-actions[bot]`, this edit was made by the `agentic-wiki-writer` workflow (which commits as `github-actions[bot]`). Call the `noop` safe-output with "Wiki edit was made by github-actions[bot] — skipping to prevent feedback loop with agentic-wiki-writer" and **stop**.
@@ -132,13 +148,29 @@ If this directory does not exist or is empty, run `echo "FATAL: wiki not pre-clo
132
148
133
149
Do NOT attempt to clone the wiki yourself — `GITHUB_TOKEN` is not available in the sandbox.
134
150
135
-
### 1b. Read changed pages
151
+
### 1b. Get wiki diffs
152
+
153
+
For each changed page, get the actual diff content from the wiki clone. Run `git log` and `git diff` in `/tmp/gh-aw/wiki/` to extract what changed:
154
+
155
+
```bash
156
+
cd /tmp/gh-aw/wiki && git show --format="%H %s" --stat {sha}
157
+
```
158
+
159
+
```bash
160
+
cd /tmp/gh-aw/wiki && git diff {sha}~1 {sha} -- "*.md"
161
+
```
162
+
163
+
If the page was newly created (`action` is `"created"`), the parent commit may not contain the file, so use `git show {sha} -- {Page-Name}.md` instead.
164
+
165
+
Save the diff output for each page — you will include it (or a summary of it) in the PR/issue body in Step 7.
166
+
167
+
### 1c. Read changed pages
136
168
137
169
Read **each changed wiki page** identified in the event payload (Step 0a) from `/tmp/gh-aw/wiki/`. The files are named `Page-Name.md` (title with spaces replaced by hyphens).
138
170
139
171
**Focus on the specific pages from the event.** These are the pages that triggered this run. Read each one carefully — these are your primary input.
140
172
141
-
### 1c. Read surrounding pages for context
173
+
### 1d. Read surrounding pages for context
142
174
143
175
Read other wiki pages that might provide context — especially the Home page and any pages that link to or from the changed pages. This helps you understand the broader documentation context.
144
176
@@ -259,13 +291,24 @@ Keep it under 70 characters. Examples:
259
291
260
292
### PR body
261
293
262
-
Structure the body as follows:
294
+
Structure the body as follows. The wiki change that triggered the work MUST be the most prominent part — a reviewer should immediately see what wiki edit inspired this code change.
263
295
264
296
```markdown
265
-
## Wiki Changes
297
+
## Wiki Change
298
+
299
+
**[Page Name](html_url)** — [view diff](diff_url)
266
300
267
-
This PR implements code changes based on edits to the following wiki pages:
<Include the wiki diff here. If the diff is small (under ~40 lines), show it in full inside a diff code block. If it is large, write a concise summary of the key changes (what was added, removed, or modified) and link to the full diff.>
302
+
303
+
<details><summary>Wiki diff</summary>
304
+
305
+
```diff
306
+
<the actual diff output from git diff>
307
+
```
308
+
309
+
</details>
310
+
311
+
<For multiple pages, repeat the above block for each page.>
269
312
270
313
## Implementation Summary
271
314
@@ -286,6 +329,12 @@ This PR implements code changes based on edits to the following wiki pages:
286
329
-[ ]`bunx tsc --noEmit` passes
287
330
```
288
331
332
+
**Small vs large diffs:**
333
+
-**Small diffs (under ~40 lines):** Show the full diff directly in the body (not inside a `<details>` block) so reviewers see it immediately.
334
+
-**Large diffs (40+ lines):** Write a 2-4 sentence summary of the functional changes above the fold, then put the full diff inside a `<details>` block.
335
+
336
+
This same structure applies if the safe-output falls back to creating an issue instead of a PR (e.g., due to protected files). The issue body should use the identical format so the wiki diff is always front and center.
337
+
289
338
## Step 8: Update memory
290
339
291
340
After creating the PR (or after deciding on noop), update memory files in MEMORY_DIR.
0 commit comments