Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GitHub Copilot modernization - Copilot CLI Plugin

[![Listed in Awesome Copilot](https://img.shields.io/badge/Listed_in-Awesome_Copilot-blue?logo=github)](https://awesome-copilot.github.com/plugins/#file=plugins%2Fgithub-copilot-modernization)

Autonomous application modernization using multi-agent orchestration for [GitHub Copilot CLI](https://github.com/github/copilot-cli).

## Overview
Expand Down
2 changes: 1 addition & 1 deletion plugins/github-copilot-modernization/.mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"command": "npx",
"args": [
"-y",
"@microsoft/github-copilot-app-modernization-mcp-server@1.21.0",
"@microsoft/github-copilot-app-modernization-mcp-server@1.22.0",
"--callerType",
"github-copilot-modernization-plugin"
],
Expand Down
2 changes: 2 additions & 0 deletions plugins/github-copilot-modernization/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GitHub Copilot modernization - Copilot CLI Plugin

[![Listed in Awesome Copilot](https://img.shields.io/badge/Listed_in-Awesome_Copilot-blue?logo=github)](https://awesome-copilot.github.com/plugins/#file=plugins%2Fgithub-copilot-modernization)

Autonomous application modernization using multi-agent orchestration for [GitHub Copilot CLI](https://github.com/github/copilot-cli).

## Overview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ You coordinate the assessment phase by detecting the project language, invoking
- `enableContainerization`: boolean
- `targetOS`: Array of `windows` | `linux`
- `minimumCveSeverity`: `low` | `medium` | `high` | `critical`
- `cveScanScope`: `direct` | `all`

## Language Detection

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ tools:
- appmod-consistency-validation
- appmod-create-migration-summary
- appmod-fetch-knowledgebase
- appmod-get-vscode-config
- appmod-preview-markdown
- appmod-run-task
- appmod-search-file
Expand Down Expand Up @@ -142,24 +141,12 @@ Use #appmod-version-control with action 'commitChanges' and commitMessage "Code
⚠️ **CRITICAL INSTRUCTIONS FOR VERSION CONTROL SETUP**:
* You MUST execute these steps BEFORE starting any code migration tasks
* **Branch handling (delegation-aware)**:
- **IF a `BRANCH` value was provided in the delegation prompt** (e.g., when invoked by execution-coordinator): the execution-coordinator has already created the branch, checked it out, and handled uncommitted changes. You are already on `<BRANCH>`. Do NOT run `git checkout`, `git switch`, or any direct git command. Do NOT call `#appmod-version-control` with action `stashChanges`, `createBranch`, or `checkForUncommittedChanges`. You MAY call `#appmod-version-control` with action `checkStatus` only to record the current branch into the progress file — do not switch branches based on the result.
- **IF a `BRANCH` value was provided in the delegation prompt** (e.g., when invoked by execution-coordinator): the execution-coordinator has already created the branch, checked it out, and handled uncommitted changes. You are already on `<BRANCH>` — use `<BRANCH>` directly when recording the current branch in the progress file. Do not create, switch, or query branches yourself, and do not run direct `git` commands. Only call `#appmod-version-control` later for the final-commit step (`checkForUncommittedChanges` + `commitChanges`). Skip the rest of this section.
- **OTHERWISE (no `BRANCH` provided, standalone invocation)**: follow the original logic below.
* Use #appmod-version-control to check if version control system is available:
- Check status with action 'checkStatus' in workspace directory: {{workspacePath}}
- ⚠️ **MANDATORY**: Check for existing uncommitted changes before creating any new branch:
* Use #appmod-version-control with action 'checkForUncommittedChanges' in workspace directory: {{workspacePath}}
* ⚠️ **CRITICAL**: IF uncommitted changes exist, you MUST handle them according to the 'uncommittedChangesAction' retrieved during plan generation BEFORE proceeding to branch creation:
- If the policy is 'Always Stash': You MUST use #appmod-version-control with action 'stashChanges' and stashMessage "Auto-stash: Save uncommitted changes before migration" in workspace directory: {{workspacePath}}
- If the policy is 'Always Commit': You MUST use #appmod-version-control with action 'commitChanges' and commitMessage "Auto-commit: Save uncommitted changes before migration" in workspace directory: {{workspacePath}}
- If the policy is 'Always Discard': You MUST use #appmod-version-control with action 'discardChanges' in workspace directory: {{workspacePath}}
- If the policy is 'Always Ask': You MUST inform the user about the uncommitted changes and ask how they would like to proceed, providing these options: stash, commit, or discard. Wait for the user's response before taking any action.
* ⚠️ **VERIFICATION REQUIRED**: After handling uncommitted changes, you MUST use #appmod-version-control with action 'checkForUncommittedChanges' to verify that the working directory is clean in workspace directory: {{workspacePath}} before proceeding to branch creation
* IF no uncommitted changes exist: proceed directly to branch creation
- ⚠️ **ONLY AFTER handling uncommitted changes**: Use #appmod-version-control with action 'createBranch' and branchName "{{targetBranch}}" in workspace directory: {{workspacePath}}
- Verify branch creation was successful before proceeding
- You MUST check the previous branch and the new branch in the general section of progress file.
* If NO version control system detected (as indicated by the response from #appmod-version-control):
- Note "No version control detected" and proceed with direct migration on workspace directory: {{workspacePath}}
* Call #appmod-version-control with action 'prepareBranch', branchName '{{targetBranch}}' in workspace directory: {{workspacePath}}. This single call handles any uncommitted changes and creates the branch.
* Handle the tool response:
* If `success=false` and `details.versionControlAvailable=false`: note "No version control detected" in the progress file and proceed with direct migration on workspace directory: {{workspacePath}}.
* Otherwise verify branch creation was successful and record the previous and new branch in the general section of the progress file.

## Core Principles

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ tools:
- appmod-consistency-validation
- appmod-create-migration-summary
- appmod-fetch-knowledgebase
- appmod-get-vscode-config
- appmod-preview-markdown
- appmod-run-task
- appmod-search-file
Expand All @@ -47,7 +46,6 @@ tools:
- appmod-mcp-server/appmod-consistency-validation
- appmod-mcp-server/appmod-create-migration-summary
- appmod-mcp-server/appmod-fetch-knowledgebase
- appmod-mcp-server/appmod-get-vscode-config
- appmod-mcp-server/appmod-preview-markdown
- appmod-mcp-server/appmod-run-task
- appmod-mcp-server/appmod-search-file
Expand Down Expand Up @@ -161,7 +159,6 @@ Use the response to fill in the placeholders below throughout this workflow:
* USE - #appmod-consistency-validation to validate code consistency after migration and ensure behavior equivalence
* USE - #appmod-completeness-validation to validate migration completeness by systematically discovering ALL unchanged items across ALL KB patterns before fixing them - NO EXCEPTIONS for perceived "unused" or "intentional" files
* You MUST use tool #appmod-validate-cves-for-java to validate and fix introduced CVEs
* You MUST use tool #appmod-get-vscode-config to retrieve extension configuration settings

## Subagent Usage Instructions
* You MUST use #agent tool to delegate complex, multi-step tasks that require deep analysis and systematic execution
Expand Down Expand Up @@ -229,24 +226,12 @@ Use the response to fill in the placeholders below throughout this workflow:
⚠️ **CRITICAL INSTRUCTIONS FOR VERSION CONTROL SETUP**:
* You MUST execute these steps BEFORE starting any code migration tasks
* **Branch handling (delegation-aware)**:
- **IF a `BRANCH` value was provided in the delegation prompt** (e.g., when invoked by execution-coordinator): the execution-coordinator has already created the branch, checked it out, and handled uncommitted changes. You are already on `<BRANCH>`. Do NOT run `git checkout`, `git switch`, or any direct git command. Do NOT call `#appmod-version-control` with action `stashChanges`, `createBranch`, or `checkForUncommittedChanges`. You MAY call `#appmod-version-control` with action `checkStatus` only to record the current branch into the progress file — do not switch branches based on the result.
- **IF a `BRANCH` value was provided in the delegation prompt** (e.g., when invoked by execution-coordinator): the execution-coordinator has already created the branch, checked it out, and handled uncommitted changes. You are already on `<BRANCH>` — use `<BRANCH>` directly when recording the current branch in the progress file. Do not create, switch, or query branches yourself, and do not run direct `git` commands. Only call `#appmod-version-control` later for the final-commit step (`checkForUncommittedChanges` + `commitChanges`). Skip the rest of this section.
- **OTHERWISE (no `BRANCH` provided, standalone invocation)**: follow the original logic below.
* Use #appmod-version-control to check if version control system is available:
- Check status with action 'checkStatus' in workspace directory: {{workspacePath}}
- ⚠️ **MANDATORY**: Check for existing uncommitted changes before creating any new branch:
* Use #appmod-version-control with action 'checkForUncommittedChanges' in workspace directory: {{workspacePath}}
* ⚠️ **CRITICAL**: IF uncommitted changes exist, you MUST handle them according to the 'uncommittedChangesAction' retrieved during plan generation BEFORE proceeding to branch creation:
- If the policy is 'Always Stash': You MUST use #appmod-version-control with action 'stashChanges' and stashMessage "Auto-stash: Save uncommitted changes before migration" in workspace directory: {{workspacePath}}
- If the policy is 'Always Commit': You MUST use #appmod-version-control with action 'commitChanges' and commitMessage "Auto-commit: Save uncommitted changes before migration" in workspace directory: {{workspacePath}}
- If the policy is 'Always Discard': You MUST use #appmod-version-control with action 'discardChanges' in workspace directory: {{workspacePath}}
- If the policy is 'Always Ask': You MUST inform the user about the uncommitted changes and ask how they would like to proceed, providing these options: stash, commit, or discard. Wait for the user's response before taking any action.
* ⚠️ **VERIFICATION REQUIRED**: After handling uncommitted changes, you MUST use #appmod-version-control with action 'checkForUncommittedChanges' to verify that the working directory is clean in workspace directory: {{workspacePath}} before proceeding to branch creation
* IF no uncommitted changes exist: proceed directly to branch creation
- ⚠️ **ONLY AFTER handling uncommitted changes**: Use #appmod-version-control with action 'createBranch' and branchName "{{targetBranch}}" in workspace directory: {{workspacePath}}
- Verify branch creation was successful before proceeding
- You MUST check the previous branch and the new branch in the general section of progress file.
* If NO version control system detected (as indicated by the response from #appmod-version-control):
- Note "No version control detected" and proceed with direct migration on workspace directory: {{workspacePath}}
* Call #appmod-version-control with action 'prepareBranch', branchName '{{targetBranch}}' in workspace directory: {{workspacePath}}. This single call handles any uncommitted changes and creates the branch.
* Handle the tool response:
* If `success=false` and `details.versionControlAvailable=false`: note "No version control detected" in the progress file and proceed with direct migration on workspace directory: {{workspacePath}}.
* Otherwise verify branch creation was successful and record the previous and new branch in the general section of the progress file.

## General Execution Instructions

Expand Down Expand Up @@ -317,13 +302,11 @@ Generate a comprehensive migration plan with the following requirements:
- If kbId is provided ({{kbId}}): Use #appmod-fetch-knowledgebase with kbId to get the knowledge base. **IMPORTANT**: Use the **entire** content returned directly from the tool response — do **NOT** truncate or compress any part of the returned content. If the content is saved in a temporary file, read the file to **EOF** — do **NOT** stop before reaching the end.
- If taskId is provided ({{taskId}}): Use #appmod-fetch-knowledgebase with taskId to get task references. **IMPORTANT**: Use the **entire** content returned directly from the tool response — do **NOT** truncate or compress any part of the returned content. If the content is saved in a temporary file, read the file to **EOF** — do **NOT** stop before reaching the end.
- If only scenario is provided ({{scenario}}): Use #appmod-search-knowledgebase to search for relevant knowledge base
* You MUST use tool #appmod-get-vscode-config to get the configuration for key 'uncommittedChangesAction' (this will be used in the Version Control Setup step)
* Search for source code files by the patterns if given with migration session ID **{{sessionId}}**
* ⚠️ **Source Technology Verification**: After searching for source code files, verify that the source technology exists in the workspace. If you cannot find ANY evidence of the source technology in the search results (no relevant dependencies, imports, or configuration files), inform the user: "⚠️ **WARNING**: The source technology [technology name] was not found in the workspace. This migration task is not applicable to this project. Proceeding directly to Final Summary." Do NOT proceed with plan generation. You MUST jump to the Final Summary step and report the preconditionCheck result with status 'no-source-technology'.
* Generate the migration plan, including:
- Migration Session ID: **{{sessionId}}**
- Time of this plan creation ({{timestamp}})
- Uncommitted Changes Policy: [The policy value retrieved from #appmod-get-vscode-config]
- Target branch name: `{{targetBranch}}` (will be used during version control setup after plan confirmation)
- Programming Language of this project
- Matching the project language, if not, show a warning with "Project language mismatch: the migration task was initiated for {{language}}, but detected is [detected language] "
Expand Down
Loading
Loading