Skip to content

Commit 33bea43

Browse files
Copilotbrunoborges
andcommitted
Restructure upstream merge prompt steps and enforce docs update gate
Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
1 parent ecc0fed commit 33bea43

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.github/prompts/agentic-merge-upstream.prompt.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ All scripts write/read a `.merge-env` file (git-ignored) to share state (branch
3131
1. Run `./.github/scripts/upstream-sync/merge-upstream-start.sh` (creates branch, clones upstream, shows summary)
3232
2. Run `./.github/scripts/upstream-sync/merge-upstream-diff.sh` (analyze changes)
3333
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)
41+
11. Finalize Pull Request (see note below about coding agent vs. manual workflow)
42+
12. Perform final review before handing off
3943

4044
---
4145

@@ -104,7 +108,7 @@ For each change in the upstream diff, determine:
104108

105109
> **⚠️ Important:** When adding new documentation pages, always update `src/site/site.xml` to include them in the navigation menu.
106110
107-
## Step 7: Apply Changes to Java SDK
111+
## Step 5: Apply Changes to Java SDK
108112

109113
When porting changes:
110114

@@ -168,7 +172,7 @@ Follow the existing Java SDK patterns:
168172
- **Match the style of surrounding code** - Consistency with existing code is more important than upstream patterns
169173
- **Prefer existing abstractions** - If the Java SDK already solves a problem differently than .NET, keep the Java approach
170174

171-
## Step 7.5: Port Tests
175+
## Step 6: Port Tests
172176

173177
After porting implementation changes, **always check for new or updated tests** in the upstream repository:
174178

@@ -215,7 +219,7 @@ If tests fail with errors like `TypeError: Cannot read properties of undefined`,
215219

216220
Commit tests separately or together with their corresponding implementation changes.
217221

218-
## Step 8: Format and Run Tests
222+
## Step 7: Format and Run Tests
219223

220224
After applying changes, use the convenience script:
221225

@@ -246,7 +250,7 @@ Or for quicker iteration during porting:
246250
- **Null handling**: Add null checks where C# had nullable types
247251
- **JSON serialization**: Verify Jackson annotations are correct
248252

249-
## Step 9: Build the Package
253+
## Step 8: Build the Package
250254

251255
Once tests pass, build the complete package:
252256

@@ -259,9 +263,11 @@ Verify:
259263
- No warnings (if possible)
260264
- JAR file is generated in `target/`
261265

262-
## Step 10: Update Documentation
266+
## Step 9: Update Documentation
263267

264268
**Documentation is critical for new features.** Every new feature ported from upstream must be documented before the merge is complete.
269+
Do not proceed to the finish/push step until this documentation checklist is complete.
270+
If you determine no docs changes are needed, explicitly document that decision and rationale in the PR body.
265271

266272
### Documentation Checklist
267273

@@ -316,7 +322,7 @@ Ensure consistency across all documentation files:
316322
- Code examples should use the same patterns and be tested
317323
- Links to Javadoc should use correct paths (`apidocs/...`)
318324

319-
## Steps 11-12: Finish, Push, and Finalize Pull Request
325+
## Steps 10-11: Finish, Push, and Finalize Pull Request
320326

321327
Run the finish script which updates `.lastmerge`, runs a final build, and pushes the branch:
322328

@@ -378,7 +384,7 @@ Ports changes from the official Copilot SDK ([github/copilot-sdk](https://github
378384
- Code formatted with Spotless
379385
```
380386

381-
## Step 13: Final Review
387+
## Step 12: Final Review
382388

383389
Before finishing:
384390

@@ -411,6 +417,7 @@ Before finishing:
411417
- [ ] `src/site/markdown/documentation.md` updated for new basic usage
412418
- [ ] `src/site/markdown/advanced.md` updated for new advanced features
413419
- [ ] Javadoc added/updated for new public APIs
420+
- [ ] If no documentation files were changed, PR body explicitly explains why documentation changes were not needed
414421
- [ ] `src/site/site.xml` updated if new documentation pages were added
415422
- [ ] `.lastmerge` file updated with new commit hash
416423
- [ ] Branch pushed to remote
@@ -429,4 +436,3 @@ Before finishing:
429436
- Uses JUnit 5 for testing
430437
- **Java SDK design decisions take precedence over upstream patterns**
431438
- **Adapt upstream changes to fit Java idioms, not the other way around**
432-

0 commit comments

Comments
 (0)