Generate plan and tasks: Generate plan.md and tasks.json using the appropriate templates:
Template Selection:
- Use plan-template.md for code migration, containerization, and deployment tasks
- Use security-plan-template.md to include a security/CVE remediation task in every modernization plan.
- Use infra-plan-template.md ONLY when user explicitly requests infrastructure (e.g., "prepare infrastructure", "create landing zone", "provision resources", "generate Bicep/Terraform")
Plan Generation:
- Follow the structure of the selected template to generate the plan
- Follow the rules defined in the template to fill in the sections with relevant information based on the analysis of user input and content of mentioned files
- Save the plan in folder ${modernization-work-folder} with the filename plan.md. If a plan already exists, overwrite it.
- Generate a separate tasks.json file following the tasks-schema.json schema with setupBaseline, infrastructure, upgrade, transform, containerization, and deployment tasks
- Save the tasks in folder ${modernization-work-folder}/.metadata/ with the filename tasks.json. If tasks.json already exists, overwrite it.
Clarification Outcomes in Plan: Incorporate all clarification answers from steps 3–4 into plan.md and tasks.json:
- Update the relevant task's
requirements or description in tasks.json based on the answer. Do NOT create a separate task for an implementation detail—only add a new task when the answer introduces entirely new migration scope.
- Record all clarification questions and their outcomes in the "## Open Questions & Questionnaire" section of
plan.md:
- Answered:
- [x] Q: ... → A: ...
- Unanswered/skipped:
- [ ] ...
- Remove the section entirely if no clarification questions were raised.
IMPORTANT: The plan.md should NOT contain the detailed task breakdown. Those details go into tasks.json for better tracking and programmatic access.
Task Breakdown Rules: When creating tasks for tasks.json and plan.md:
- Purpose: Break down coding work into discrete migration tasks. Each task represents a user-requested migration from one service/component to another, or a specific business logic modernization.
- Create tasks ONLY based on what the user explicitly requested - do not infer or add implicit tasks, except for the security/CVE remediation task which must always be included in every plan
- If an
assessment-report is provided, the task description must identify which specific issues from the assessment report are addressed by that task (e.g., "Addresses issues: , ")
- Group related changes that serve a single user goal into one task (e.g., all changes needed to migrate to PostgreSQL)
- Find a matched skill / pattern for the task, following the following priority order.
- Skills available for the project, which will be listed in the
skill tool description.
- Patterns that will be attached and available at plan execution phase, listed in the supported patterns file.
- Otherwise if no relevant pattern is available for the task pattern, use the prompt segment from the user directly. DO NOT expand the request scope.
- IMPORTANT:
- You MUST NOT use the pattern name as the skill name in the generated plan and tasks.json.
- If there are similar skills defined in project skill
.github/skills/ versus other skills, MUST use the one defined in project.
- Skills must be fully matched. For migration scenarios, both the source product and target product must match the task intent.
- Each task should be independently testable
- Do not add tests for unimpacted code or existing functionality unless user requested
- IMPORTANT: Do NOT read individual skill files at this stage; Do Not include the skill detail in the tasks.
Java Upgrade Task Guidelines: Only add an upgrade task if the user explicitly requests it. You must refer to the ./java-upgrade-guideline.md for specific rules and guidelines when creating Java upgrade tasks.
.NET Upgrade Task Guidelines: You must refer to the ./dotnet-upgrade-guideline.md for specific rules and guidelines when creating .NET upgrade tasks.
Deployment Task Rules:
- IMPORTANT Do NOT create task type with
containerization if deployment task already exists, deployment task will cover the containerization work if needed.
- Deployment Task Options: Azure App Service, Azure Kubernetes Service, Azure Container Apps (default), Azure App Service Managed Instance, Azure Static Web App, Azure Function App
Security Task Guidelines: The security task order should be after all the upgrade and transform tasks and before the deployment tasks in the generated plan. If the user provides specific security requirements, incorporate them into the security task; otherwise, use the default requirements from the template.
IMPORTANT: The upgrade task must be the first task in the task list because subsequent transform tasks (e.g., migrating to Azure services) depend on the upgraded runtime and project format.