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/prompts/agentic-merge-upstream.prompt.md
+22-15Lines changed: 22 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,18 @@ All scripts write/read a `.merge-env` file (git-ignored) to share state (branch
31
31
1. Run `./.github/scripts/upstream-sync/merge-upstream-start.sh` (creates branch, clones upstream, shows summary)
32
32
2. Run `./.github/scripts/upstream-sync/merge-upstream-diff.sh` (analyze changes)
33
33
3. Update README with minimum CLI version requirement
34
-
4. Port changes to Java SDK (commit as you go)
35
-
5. Run `./.github/scripts/build/format-and-test.sh` frequently while porting
36
-
6. Update documentation
37
-
7. Run `./.github/scripts/upstream-sync/merge-upstream-finish.sh` (final test + push)
38
-
8. Finalize Pull Request (see note below about coding agent vs. manual workflow)
34
+
4. Identify upstream changes to port
35
+
5. Apply changes to Java SDK (commit as you go)
36
+
6. Port/adjust tests from upstream changes
37
+
7. Run `./.github/scripts/build/format-and-test.sh` frequently while porting
38
+
8. Build the package
39
+
9. Update documentation (**required for every user-facing upstream change**)
40
+
10. Run `./.github/scripts/upstream-sync/merge-upstream-finish.sh` (final test + push) and finalize Pull Request (see note below about coding agent vs. manual workflow)
41
+
11. Perform final review before handing off
39
42
40
43
---
41
44
42
-
## Steps 1-2: Initialize and Analyze
45
+
## Step 1: Initialize Upstream Sync
43
46
44
47
Run the start script to create a branch, update the CLI, clone the upstream repo, and see a summary of new commits:
45
48
@@ -53,7 +56,9 @@ This writes a `.merge-env` file used by the other scripts. It outputs:
53
56
- The upstream dir path
54
57
- A short log of upstream commits since `.lastmerge`
55
58
56
-
Then run the diff script for a detailed breakdown by area:
59
+
## Step 2: Analyze Upstream Changes
60
+
61
+
Run the diff script for a detailed breakdown by area:
57
62
58
63
```bash
59
64
./.github/scripts/upstream-sync/merge-upstream-diff.sh # stat only
@@ -104,7 +109,7 @@ For each change in the upstream diff, determine:
104
109
105
110
> **⚠️ Important:** When adding new documentation pages, always update `src/site/site.xml` to include them in the navigation menu.
106
111
107
-
## Step 7: Apply Changes to Java SDK
112
+
## Step 5: Apply Changes to Java SDK
108
113
109
114
When porting changes:
110
115
@@ -168,7 +173,7 @@ Follow the existing Java SDK patterns:
168
173
-**Match the style of surrounding code** - Consistency with existing code is more important than upstream patterns
169
174
-**Prefer existing abstractions** - If the Java SDK already solves a problem differently than .NET, keep the Java approach
170
175
171
-
## Step 7.5: Port Tests
176
+
## Step 6: Port Tests
172
177
173
178
After porting implementation changes, **always check for new or updated tests** in the upstream repository:
174
179
@@ -215,7 +220,7 @@ If tests fail with errors like `TypeError: Cannot read properties of undefined`,
215
220
216
221
Commit tests separately or together with their corresponding implementation changes.
217
222
218
-
## Step 8: Format and Run Tests
223
+
## Step 7: Format and Run Tests
219
224
220
225
After applying changes, use the convenience script:
221
226
@@ -246,7 +251,7 @@ Or for quicker iteration during porting:
246
251
-**Null handling**: Add null checks where C# had nullable types
247
252
-**JSON serialization**: Verify Jackson annotations are correct
248
253
249
-
## Step 9: Build the Package
254
+
## Step 8: Build the Package
250
255
251
256
Once tests pass, build the complete package:
252
257
@@ -259,9 +264,11 @@ Verify:
259
264
- No warnings (if possible)
260
265
- JAR file is generated in `target/`
261
266
262
-
## Step 10: Update Documentation
267
+
## Step 9: Update Documentation
263
268
264
269
**Documentation is critical for new features.** Every new feature ported from upstream must be documented before the merge is complete.
270
+
Review and complete this documentation checklist before proceeding to Step 10.
271
+
If you determine no docs changes are needed, document that decision and rationale in the PR body under a clear heading (for example, `Documentation Impact`).
265
272
266
273
### Documentation Checklist
267
274
@@ -316,7 +323,7 @@ Ensure consistency across all documentation files:
316
323
- Code examples should use the same patterns and be tested
317
324
- Links to Javadoc should use correct paths (`apidocs/...`)
318
325
319
-
## Steps 11-12: Finish, Push, and Finalize Pull Request
326
+
## Step 10: Finish, Push, and Finalize Pull Request
320
327
321
328
Run the finish script which updates `.lastmerge`, runs a final build, and pushes the branch:
322
329
@@ -378,7 +385,7 @@ Ports changes from the official Copilot SDK ([github/copilot-sdk](https://github
378
385
- Code formatted with Spotless
379
386
```
380
387
381
-
## Step 13: Final Review
388
+
## Step 11: Final Review
382
389
383
390
Before finishing:
384
391
@@ -411,6 +418,7 @@ Before finishing:
411
418
-[ ]`src/site/markdown/documentation.md` updated for new basic usage
412
419
-[ ]`src/site/markdown/advanced.md` updated for new advanced features
413
420
-[ ] Javadoc added/updated for new public APIs
421
+
-[ ] If no documentation files were changed for user-facing upstream changes, PR body explicitly explains why documentation changes were not needed
414
422
-[ ]`src/site/site.xml` updated if new documentation pages were added
415
423
-[ ]`.lastmerge` file updated with new commit hash
416
424
-[ ] Branch pushed to remote
@@ -429,4 +437,3 @@ Before finishing:
429
437
- Uses JUnit 5 for testing
430
438
-**Java SDK design decisions take precedence over upstream patterns**
431
439
-**Adapt upstream changes to fit Java idioms, not the other way around**
0 commit comments