From 43c6c959c38b87d5d20db55f588bb2af7e687d58 Mon Sep 17 00:00:00 2001 From: Summer Warren Date: Tue, 2 Sep 2025 16:54:51 -0700 Subject: [PATCH 1/7] Update create release plan instructions and return --- .../create-release-plan.instructions.md | 5 +++++ .../Tools/ReleasePlanToolTests.cs | 8 ++++---- .../Tools/ReleasePlan/ReleasePlanTool.cs | 17 ++++++++++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md index fa55d8edb0f..0410e46a5d5 100644 --- a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md @@ -1,5 +1,10 @@ # Release Plan Creation Process You goal is to create a valid release plan. You must prompt user to provide all required information and all input must match the format and requirement mentioned in step 3 below. + +> **Important Note** +> Do **not** ask the user to manually edit the DevOps work item. +> To update a release plan manually, the user must use the [Release Planner Tool](https://apps.powerapps.com/play/e/ed2ffefd-774d-40dd-ab23-7fff01aeec9f/a/821ab569-ae60-420d-8264-d7b5d5ef734c?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47). + Follow these steps in order to create or manage a release plan for an API specification pull request: ## Step 1: Validate Prerequisites diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs index 56df015df23..09aecf51860 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs @@ -98,11 +98,11 @@ public async Task Test_Create_releasePlan_with_valid_inputs() var testCodeFilePath = "TypeSpecTestData/specification/testcontoso/Contoso.Management"; var releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01", "https://github.com/Azure/azure-rest-api-specs/pull/35446", "beta", isTestReleasePlan: true); Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem")); + Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01-preview", "https://github.com/Azure/azure-rest-api-specs/pull/35446", "beta", isTestReleasePlan: true); Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem")); + Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); } [Test] @@ -136,7 +136,7 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_true_cre // Assert Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem")); + Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); // Verify the environment helper was called environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once); @@ -173,7 +173,7 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_false_re // Assert Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem")); + Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); // Verify the environment helper was called environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once); diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs index a5198eeb96b..66d03c3eb08 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs @@ -272,7 +272,22 @@ public async Task CreateReleasePlan(string typeSpecProjectPath, string t } else { - return output.Format(workItem); + if (workItem.Id is int workItemId) + { + releasePlan.WorkItemId = workItemId; + } + + if (workItem.Fields.TryGetValue("Custom.ReleasePlanId", out var value) && value is int releasePlanId) + { + releasePlan.ReleasePlanId = releasePlanId; + } + + if (workItem.Fields.TryGetValue("Custom.ReleasePlanLink", out value) && value is string releasePlanLink) + { + releasePlan.ReleasePlanLink = releasePlanLink; + } + + return output.Format(releasePlan); } } catch (Exception ex) From ee15036a20e1e89b21d719e4757bd5480ff2caea Mon Sep 17 00:00:00 2001 From: Summer Date: Fri, 5 Sep 2025 10:00:41 -0700 Subject: [PATCH 2/7] Update eng/common/instructions/azsdk-tools/create-release-plan.instructions.md Co-authored-by: Mariana Rios Flores --- .../azsdk-tools/create-release-plan.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md index 0410e46a5d5..0e4e60c2c11 100644 --- a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md @@ -3,7 +3,7 @@ You goal is to create a valid release plan. You must prompt user to provide all > **Important Note** > Do **not** ask the user to manually edit the DevOps work item. -> To update a release plan manually, the user must use the [Release Planner Tool](https://apps.powerapps.com/play/e/ed2ffefd-774d-40dd-ab23-7fff01aeec9f/a/821ab569-ae60-420d-8264-d7b5d5ef734c?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47). +> To update a release plan manually, the user must use the [Release Planner Tool](https://aka.ms/sdk-release-planner). Follow these steps in order to create or manage a release plan for an API specification pull request: From a725bdd321f21854432d66d7dac8817e6c3cea51 Mon Sep 17 00:00:00 2001 From: Summer Warren Date: Fri, 5 Sep 2025 10:50:55 -0700 Subject: [PATCH 3/7] Return Release Plan Details --- .../create-release-plan.instructions.md | 3 ++ .../Tools/ReleasePlanToolTests.cs | 8 +-- .../Models/ReleasePlanDetails.cs | 50 ++++++++++++++++++- .../Tools/ReleasePlan/ReleasePlanTool.cs | 2 +- 4 files changed, 57 insertions(+), 6 deletions(-) diff --git a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md index 0e4e60c2c11..02a825c9274 100644 --- a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md @@ -4,6 +4,9 @@ You goal is to create a valid release plan. You must prompt user to provide all > **Important Note** > Do **not** ask the user to manually edit the DevOps work item. > To update a release plan manually, the user must use the [Release Planner Tool](https://aka.ms/sdk-release-planner). +> When referring to a release plan in conversation with a user: +> - Always include both the **Release Plan Link** and **Release Plan ID** for clarity. +> - If the reference is intended for use by the LLM (e.g., for internal logic), use the **Release Plan Work Item ID** instead. Follow these steps in order to create or manage a release plan for an API specification pull request: diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs index 09aecf51860..73f4df2dd74 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs @@ -98,11 +98,11 @@ public async Task Test_Create_releasePlan_with_valid_inputs() var testCodeFilePath = "TypeSpecTestData/specification/testcontoso/Contoso.Management"; var releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01", "https://github.com/Azure/azure-rest-api-specs/pull/35446", "beta", isTestReleasePlan: true); Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); + Assert.True(releaseplan.Contains("ReleasePlanDetails")); releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01-preview", "https://github.com/Azure/azure-rest-api-specs/pull/35446", "beta", isTestReleasePlan: true); Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); + Assert.True(releaseplan.Contains("ReleasePlanDetails")); } [Test] @@ -136,7 +136,7 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_true_cre // Assert Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); + Assert.True(releaseplan.Contains("ReleasePlanDetails")); // Verify the environment helper was called environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once); @@ -173,7 +173,7 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_false_re // Assert Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("Azure.Sdk.Tools.Cli.Models.ReleasePlanDetails")); + Assert.True(releaseplan.Contains("ReleasePlanDetails")); // Verify the environment helper was called environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once); diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs index 7396833cde0..5f03d01f5f0 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs @@ -33,6 +33,46 @@ public class ReleasePlanDetails public string SDKLanguages { get; set; } = string.Empty; public bool IsSpecApproved { get; set; } = false; public int ApiSpecWorkItemId { get; set; } = 0; + public override string ToString() + { + var sdkInfoFormatted = SDKInfo != null && SDKInfo.Any() + ? string.Join("\n ", SDKInfo.Select(s => s.ToString())) + : "None"; + + var specPullRequestsFormatted = SpecPullRequests != null && SpecPullRequests.Any() + ? string.Join(", ", SpecPullRequests) + : "None"; + + return $@"ReleasePlanDetails: + WorkItemId: {WorkItemId} + WorkItemUrl: {WorkItemUrl} + WorkItemHtmlUrl: {WorkItemHtmlUrl} + ServiceTreeId: {ServiceTreeId} + ProductTreeId: {ProductTreeId} + ProductName: {ProductName} + Title: {Title} + Description: {Description} + Owner: {Owner} + Status: {Status} + SpecPullRequests: [{specPullRequestsFormatted}] + SDKReleaseMonth: {SDKReleaseMonth} + IsManagementPlane: {IsManagementPlane} + IsDataPlane: {IsDataPlane} + SpecAPIVersion: {SpecAPIVersion} + SpecType: {SpecType} + ReleasePlanLink: {ReleasePlanLink} + IsTestReleasePlan: {IsTestReleasePlan} + ReleasePlanId: {ReleasePlanId} + SDKReleaseType: {SDKReleaseType} + SDKInfo: + {sdkInfoFormatted} + ReleasePlanSubmittedByEmail: {ReleasePlanSubmittedByEmail} + IsCreatedByAgent: {IsCreatedByAgent} + ActiveSpecPullRequest: {ActiveSpecPullRequest} + SDKLanguages: {SDKLanguages} + IsSpecApproved: {IsSpecApproved} + ApiSpecWorkItemId: {ApiSpecWorkItemId}"; + } public Microsoft.VisualStudio.Services.WebApi.Patch.Json.JsonPatchDocument GetPatchDocument() { @@ -132,7 +172,15 @@ public class SDKInfo { public string Language { get; set; } = string.Empty; public string GenerationPipelineUrl { get; set; } = string.Empty; - public string SdkPullRequestUrl { get; set; } = string.Empty; + public string SdkPullRequestUrl { get; set; } = string.Empty; public string PackageName { get; set; } = string.Empty; + public override string ToString() + { + return $@"SDKInfo: + Language: {Language} + GenerationPipelineUrl: {GenerationPipelineUrl} + SdkPullRequestUrl: {SdkPullRequestUrl} + PackageName: {PackageName}"; + } } } diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs index 66d03c3eb08..3bfc51289d4 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs @@ -215,7 +215,7 @@ Please create a pull request in the public Azure/azure-rest-api-specs repository } } - [McpServerTool(Name = "azsdk_create_release_plan"), Description("Create Release Plan work item.")] + [McpServerTool(Name = "azsdk_create_release_plan"), Description("Create Release Plan")] public async Task CreateReleasePlan(string typeSpecProjectPath, string targetReleaseMonthYear, string serviceTreeId, string productTreeId, string specApiVersion, string specPullRequestUrl, string sdkReleaseType, string userEmail = "", bool isTestReleasePlan = false) { try From 8bb48c26e62cf12b7007e23cf40f94932f107bc4 Mon Sep 17 00:00:00 2001 From: Summer Date: Wed, 10 Sep 2025 11:00:34 -0700 Subject: [PATCH 4/7] Update eng/common/instructions/azsdk-tools/create-release-plan.instructions.md Co-authored-by: Ben Broderick Phillips --- .../azsdk-tools/create-release-plan.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md index 02a825c9274..5a8e035aad9 100644 --- a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md @@ -1,5 +1,5 @@ # Release Plan Creation Process -You goal is to create a valid release plan. You must prompt user to provide all required information and all input must match the format and requirement mentioned in step 3 below. +Your goal is to create a valid release plan. You must prompt user to provide all required information and all input must match the format and requirement mentioned in step 3 below. > **Important Note** > Do **not** ask the user to manually edit the DevOps work item. From dfabf7fe2a9e2ed084732e48b7a3859f809c5d25 Mon Sep 17 00:00:00 2001 From: Summer Warren Date: Wed, 10 Sep 2025 11:35:17 -0700 Subject: [PATCH 5/7] Remove toString method in ReleasePlanDetails --- .../Tools/ReleasePlanToolTests.cs | 35 ++++++++++---- .../Models/ReleasePlanDetails.cs | 48 ------------------- .../Tools/ReleasePlan/ReleasePlanTool.cs | 2 +- 3 files changed, 28 insertions(+), 57 deletions(-) diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs index 1bdbf17b994..da042922656 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/ReleasePlanToolTests.cs @@ -4,6 +4,9 @@ using Azure.Sdk.Tools.Cli.Tests.Mocks.Services; using Azure.Sdk.Tools.Cli.Tests.TestHelpers; using Azure.Sdk.Tools.Cli.Tools.ReleasePlan; +using Azure.Sdk.Tools.Cli.Tools.Example; +using System.Text.Json; +using Azure.Sdk.Tools.Cli.Models; namespace Azure.Sdk.Tools.Cli.Tests.Tools { @@ -97,12 +100,22 @@ public async Task Test_Create_releasePlan_with_valid_inputs() { var testCodeFilePath = "TypeSpecTestData/specification/testcontoso/Contoso.Management"; var releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01", "https://github.com/Azure/azure-rest-api-specs/pull/35446", "beta", isTestReleasePlan: true); - Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("ReleasePlanDetails")); + + var releaseplanObj = JsonSerializer.Deserialize(releaseplan); + Assert.IsNotNull(releaseplanObj); + Assert.IsNotNull(releaseplanObj.WorkItemId); + Assert.IsNotNull(releaseplanObj.ReleasePlanId); + Assert.IsNotNull(releaseplanObj.ReleasePlanLink); + releaseplan = await releasePlanTool.CreateReleasePlan(testCodeFilePath, "July 2025", "12345678-1234-5678-9012-123456789012", "12345678-1234-5678-9012-123456789012", "2025-01-01-preview", "https://github.com/Azure/azure-rest-api-specs-pr/pull/35446", "beta", isTestReleasePlan: true); - Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("ReleasePlanDetails")); + + releaseplanObj = JsonSerializer.Deserialize(releaseplan); + Assert.IsNotNull(releaseplanObj); + Assert.IsNotNull(releaseplanObj.WorkItemId); + Assert.IsNotNull(releaseplanObj.ReleasePlanId); + Assert.IsNotNull(releaseplanObj.ReleasePlanLink); + } [Test] @@ -135,8 +148,11 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_true_cre isTestReleasePlan: false); // This should be overridden to true by environment variable // Assert - Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("ReleasePlanDetails")); + var releaseplanObj = JsonSerializer.Deserialize(releaseplan); + Assert.IsNotNull(releaseplanObj); + Assert.IsNotNull(releaseplanObj.WorkItemId); + Assert.IsNotNull(releaseplanObj.ReleasePlanId); + Assert.IsNotNull(releaseplanObj.ReleasePlanLink); // Verify the environment helper was called environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once); @@ -172,8 +188,11 @@ public async Task Test_Create_releasePlan_with_AZSDKTOOLS_AGENT_TESTING_false_re isTestReleasePlan: false); // Assert - Assert.IsNotNull(releaseplan); - Assert.True(releaseplan.Contains("ReleasePlanDetails")); + var releaseplanObj = JsonSerializer.Deserialize(releaseplan); + Assert.IsNotNull(releaseplanObj); + Assert.IsNotNull(releaseplanObj.WorkItemId); + Assert.IsNotNull(releaseplanObj.ReleasePlanId); + Assert.IsNotNull(releaseplanObj.ReleasePlanLink); // Verify the environment helper was called environmentHelperMock.Verify(x => x.GetBooleanVariable("AZSDKTOOLS_AGENT_TESTING", false), Times.Once); diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs index 5f03d01f5f0..58004c7bce7 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/ReleasePlanDetails.cs @@ -33,46 +33,6 @@ public class ReleasePlanDetails public string SDKLanguages { get; set; } = string.Empty; public bool IsSpecApproved { get; set; } = false; public int ApiSpecWorkItemId { get; set; } = 0; - public override string ToString() - { - var sdkInfoFormatted = SDKInfo != null && SDKInfo.Any() - ? string.Join("\n ", SDKInfo.Select(s => s.ToString())) - : "None"; - - var specPullRequestsFormatted = SpecPullRequests != null && SpecPullRequests.Any() - ? string.Join(", ", SpecPullRequests) - : "None"; - - return $@"ReleasePlanDetails: - WorkItemId: {WorkItemId} - WorkItemUrl: {WorkItemUrl} - WorkItemHtmlUrl: {WorkItemHtmlUrl} - ServiceTreeId: {ServiceTreeId} - ProductTreeId: {ProductTreeId} - ProductName: {ProductName} - Title: {Title} - Description: {Description} - Owner: {Owner} - Status: {Status} - SpecPullRequests: [{specPullRequestsFormatted}] - SDKReleaseMonth: {SDKReleaseMonth} - IsManagementPlane: {IsManagementPlane} - IsDataPlane: {IsDataPlane} - SpecAPIVersion: {SpecAPIVersion} - SpecType: {SpecType} - ReleasePlanLink: {ReleasePlanLink} - IsTestReleasePlan: {IsTestReleasePlan} - ReleasePlanId: {ReleasePlanId} - SDKReleaseType: {SDKReleaseType} - SDKInfo: - {sdkInfoFormatted} - ReleasePlanSubmittedByEmail: {ReleasePlanSubmittedByEmail} - IsCreatedByAgent: {IsCreatedByAgent} - ActiveSpecPullRequest: {ActiveSpecPullRequest} - SDKLanguages: {SDKLanguages} - IsSpecApproved: {IsSpecApproved} - ApiSpecWorkItemId: {ApiSpecWorkItemId}"; - } public Microsoft.VisualStudio.Services.WebApi.Patch.Json.JsonPatchDocument GetPatchDocument() { @@ -174,13 +134,5 @@ public class SDKInfo public string GenerationPipelineUrl { get; set; } = string.Empty; public string SdkPullRequestUrl { get; set; } = string.Empty; public string PackageName { get; set; } = string.Empty; - public override string ToString() - { - return $@"SDKInfo: - Language: {Language} - GenerationPipelineUrl: {GenerationPipelineUrl} - SdkPullRequestUrl: {SdkPullRequestUrl} - PackageName: {PackageName}"; - } } } diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs index 037719bf42a..b96cd2a8919 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs @@ -296,7 +296,7 @@ public async Task CreateReleasePlan(string typeSpecProjectPath, string t releasePlan.ReleasePlanLink = releasePlanLink; } - return output.Format(releasePlan); + return JsonSerializer.Serialize(releasePlan, new JsonSerializerOptions { WriteIndented = true }); } } catch (Exception ex) From 6455a5f642a55ee59469d5c0220aa7cb5a238b3e Mon Sep 17 00:00:00 2001 From: Summer Warren Date: Wed, 10 Sep 2025 14:49:20 -0700 Subject: [PATCH 6/7] Add more specific rules for release plan creation --- .../azsdk-tools/create-release-plan.instructions.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md index 5a8e035aad9..c93c85a9186 100644 --- a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md @@ -4,9 +4,7 @@ Your goal is to create a valid release plan. You must prompt user to provide all > **Important Note** > Do **not** ask the user to manually edit the DevOps work item. > To update a release plan manually, the user must use the [Release Planner Tool](https://aka.ms/sdk-release-planner). -> When referring to a release plan in conversation with a user: -> - Always include both the **Release Plan Link** and **Release Plan ID** for clarity. -> - If the reference is intended for use by the LLM (e.g., for internal logic), use the **Release Plan Work Item ID** instead. +> When summarizing or displaying release plan details, do not mention or display the work item link/URL, or any direct reference to Azure DevOps work item resources. Only provide relevant release plan details like **Release Plan Link** and **Release Plan ID**. Follow these steps in order to create or manage a release plan for an API specification pull request: From a7c9aec1c61ee2d3a309adf7ae93f98e792db5ef Mon Sep 17 00:00:00 2001 From: Summer Warren Date: Mon, 15 Sep 2025 10:19:15 -0700 Subject: [PATCH 7/7] Add Better instructions --- .../azsdk-tools/create-release-plan.instructions.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md index c93c85a9186..6cf05521925 100644 --- a/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md +++ b/eng/common/instructions/azsdk-tools/create-release-plan.instructions.md @@ -1,11 +1,10 @@ +> **Important Note for LLM** +> Backend processes may use Azure DevOps work item data as needed. However, do **not** mention or display the work item link/URL, or any reference to Azure DevOps work item resources directly in conversation with the user. +> All manual updates to an existing release plan must be made through the [Release Planner Tool](https://aka.ms/sdk-release-planner) to ensure proper tracking and validation. +> Only provide release plan details such as **Release Plan Link** and **Release Plan ID** to the user + # Release Plan Creation Process Your goal is to create a valid release plan. You must prompt user to provide all required information and all input must match the format and requirement mentioned in step 3 below. - -> **Important Note** -> Do **not** ask the user to manually edit the DevOps work item. -> To update a release plan manually, the user must use the [Release Planner Tool](https://aka.ms/sdk-release-planner). -> When summarizing or displaying release plan details, do not mention or display the work item link/URL, or any direct reference to Azure DevOps work item resources. Only provide relevant release plan details like **Release Plan Link** and **Release Plan ID**. - Follow these steps in order to create or manage a release plan for an API specification pull request: ## Step 1: Validate Prerequisites