Skip to content

Commit b8976d7

Browse files
authored
Merge pull request #168 from copilot-community-sdk/copilot/fix-documentation-structure
[WIP] Fix documentation structure for agentic merge workflow
2 parents 96e102f + b01482f commit b8976d7

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

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

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ 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) and finalize Pull Request (see note below about coding agent vs. manual workflow)
41+
11. Perform final review before handing off
3942

4043
---
4144

42-
## Steps 1-2: Initialize and Analyze
45+
## Step 1: Initialize Upstream Sync
4346

4447
Run the start script to create a branch, update the CLI, clone the upstream repo, and see a summary of new commits:
4548

@@ -53,7 +56,9 @@ This writes a `.merge-env` file used by the other scripts. It outputs:
5356
- The upstream dir path
5457
- A short log of upstream commits since `.lastmerge`
5558

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:
5762

5863
```bash
5964
./.github/scripts/upstream-sync/merge-upstream-diff.sh # stat only
@@ -104,7 +109,7 @@ For each change in the upstream diff, determine:
104109

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

109114
When porting changes:
110115

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

171-
## Step 7.5: Port Tests
176+
## Step 6: Port Tests
172177

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

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

216221
Commit tests separately or together with their corresponding implementation changes.
217222

218-
## Step 8: Format and Run Tests
223+
## Step 7: Format and Run Tests
219224

220225
After applying changes, use the convenience script:
221226

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

249-
## Step 9: Build the Package
254+
## Step 8: Build the Package
250255

251256
Once tests pass, build the complete package:
252257

@@ -259,9 +264,11 @@ Verify:
259264
- No warnings (if possible)
260265
- JAR file is generated in `target/`
261266

262-
## Step 10: Update Documentation
267+
## Step 9: Update Documentation
263268

264269
**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`).
265272

266273
### Documentation Checklist
267274

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

319-
## Steps 11-12: Finish, Push, and Finalize Pull Request
326+
## Step 10: Finish, Push, and Finalize Pull Request
320327

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

@@ -378,7 +385,7 @@ Ports changes from the official Copilot SDK ([github/copilot-sdk](https://github
378385
- Code formatted with Spotless
379386
```
380387

381-
## Step 13: Final Review
388+
## Step 11: Final Review
382389

383390
Before finishing:
384391

@@ -411,6 +418,7 @@ Before finishing:
411418
- [ ] `src/site/markdown/documentation.md` updated for new basic usage
412419
- [ ] `src/site/markdown/advanced.md` updated for new advanced features
413420
- [ ] 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
414422
- [ ] `src/site/site.xml` updated if new documentation pages were added
415423
- [ ] `.lastmerge` file updated with new commit hash
416424
- [ ] Branch pushed to remote
@@ -429,4 +437,3 @@ Before finishing:
429437
- Uses JUnit 5 for testing
430438
- **Java SDK design decisions take precedence over upstream patterns**
431439
- **Adapt upstream changes to fit Java idioms, not the other way around**
432-

0 commit comments

Comments
 (0)