@@ -282,12 +282,60 @@ Verify:
282282
283283## Step 10: Update Documentation
284284
285- Review and update documentation as needed:
285+ ** Documentation is critical for new features. ** Every new feature ported from upstream must be documented before the merge is complete.
286286
287- 1 . ** README.md** : Update if there are new features or API changes
288- 2 . ** src/site/markdown/documentation.md** : Update detailed documentation
289- 3 . ** Javadoc** : Add/update Javadoc comments for new/changed public APIs
290- 4 . ** CHANGELOG** : (if exists) Add entry for the changes
287+ ### Documentation Checklist
288+
289+ For each new feature or significant change:
290+
291+ 1 . ** README.md** : Update the main README if there are user-facing changes
292+ 2 . ** src/site/markdown/index.md** : Update if requirements or quick start examples change
293+ 3 . ** src/site/markdown/documentation.md** : Add sections for new basic usage patterns
294+ 4 . ** src/site/markdown/advanced.md** : Add sections for new advanced features (tools, handlers, configurations)
295+ 5 . ** src/site/markdown/mcp.md** : Update if MCP-related changes are made
296+ 6 . ** Javadoc** : Add/update Javadoc comments for all new/changed public APIs
297+ 7 . ** src/site/site.xml** : Update if new documentation pages were added
298+
299+ ### Documentation Requirements for New Features
300+
301+ When adding a new feature, ensure the documentation includes:
302+
303+ - ** What it does** : Clear explanation of the feature's purpose
304+ - ** How to use it** : Code example showing typical usage
305+ - ** API reference** : Link to relevant Javadoc
306+ - ** Configuration options** : All available settings/properties
307+
308+ ### Example: Documenting a New Handler
309+
310+ If a new handler (like ` UserInputHandler ` , ` PermissionHandler ` ) is added, create a section in ` advanced.md ` :
311+
312+ ``` markdown
313+ ## Feature Name
314+
315+ Brief description of what the feature does.
316+
317+ \`\`\` java
318+ var session = client.createSession(
319+ new SessionConfig()
320+ .setOnFeatureRequest((request, invocation) -> {
321+ // Handle the request
322+ return CompletableFuture.completedFuture(result);
323+ })
324+ ).get();
325+ \`\`\`
326+
327+ Explain the request/response objects and their properties.
328+
329+ See [ FeatureHandler] ( apidocs/com/github/copilot/sdk/json/FeatureHandler.html ) Javadoc for more details.
330+ ```
331+
332+ ### Verify Documentation Consistency
333+
334+ Ensure consistency across all documentation files:
335+
336+ - Requirements section should match in ` README.md ` and ` src/site/markdown/index.md `
337+ - Code examples should use the same patterns and be tested
338+ - Links to Javadoc should use correct paths (` apidocs/... ` )
291339
292340## Step 11: Update Last Merge Reference
293341
@@ -347,7 +395,12 @@ Before finishing:
347395- [ ] Changes committed incrementally with descriptive messages
348396- [ ] ` mvn test ` passes
349397- [ ] ` mvn package ` builds successfully
350- - [ ] Documentation updated
398+ - [ ] ** Documentation updated for new features:**
399+ - [ ] ` README.md ` updated if user-facing changes
400+ - [ ] ` src/site/markdown/index.md ` updated if requirements changed
401+ - [ ] ` src/site/markdown/documentation.md ` updated for new basic usage
402+ - [ ] ` src/site/markdown/advanced.md ` updated for new advanced features
403+ - [ ] Javadoc added/updated for new public APIs
351404- [ ] ` src/site/site.xml ` updated if new documentation pages were added
352405- [ ] ` .lastmerge ` file updated with new commit hash
353406- [ ] Branch pushed to remote
0 commit comments