Customization collaboration
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
Current we can apply customization in two tool: azsdk_typepec_generate_authoring_plan and azsdk_customized_code_update.
- `azsdk_typepec_generate_authoring_plan` will consult Azure Knowledge Base to generate the typespec customization solution (e.g. use @clientName to rename model Resource to ResourceInfo for Go sdk). The agent will apply the solution to customize
- `azsdk_customized_code_update` will analyze request, and refer to https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/knowledge/customizing-client-tsp.md to customize the code (typespec customization), and also it will provide sdk code customization.
Both tools has the duplicated typespec customization. Need to collaborate two tools to provide single customization.
WorkPlan
### Task 1: Consolidate the knowledage base
Consolidate the two knowledge: https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/knowledge/customizing-client-tsp.md and the customization knowledge in Azure knowledge base)
**approach 1**: Azure knowledge base -> azsdk_customized_code_update
Tool flow:
1. azsdk_customized_code_update query Azure Knowledge Base to get all the customization decorator knowledge
2. azsdk_customized_code_update combine above knowledge with customizing-client-tsp.md as context to define the typespec customization solution
3. azsdk_customized_code_update apply the customization to update typespec
**approach 2**: customizing-client-tsp.md -> azure Knowledge Base
Integrate customizing-client-tsp.md to Azure Knowledage Base. `azsdk_typespec_generate_authoring_plan` will consult Azure Knowledge Base to generate customization solution which will reference to two knowledage source
### Task 2: Consolidate the typespec customization solution generation
Current there are two places to generate a typespec customize plan: 1. classify in `azsdk_customized_code_update` tool ; 2. `azsdk_typespec_generate_authoring_plan` tool.
We will consolidate those two
**approach 1**: use `azsdk_typespec_generate_authoring_plan` generate typespec customization plan.
`azsdk_customized_code_update` will invoke `azsdk_typespec_generate_authoring_plan` to get the typespec customization plan
Current `azsdk_typespec_generate_authoring_plan` can generate typespec customization plan with multiple input
|| input| sample prompt|
|-----------|-----------------------------|--------------------------|
|✅| typespec diff | enum -> union|
|✅| breaking change| Resolve breaking change for GO SDK: model WebPubSub was renamed to WebPubSubModel. |
|✅| customize request | customize to rename WebPubSubModel to WebPubSub|
|✅|api view feedback|API review requests: renaming model AIProjectConnectionEntraIDCredential to use "Id" (not "ID") in .NET. |
|✅|resolve linter failure/analyzer failure during sdk build| resolve .NET analyzer errors (AZC0030, AZC0012) for naming violations: model ends with "Parameters", type name "Tasks" too generic.|
Contributor guide
Research direction
Start by reading customizing-client-tsp.md and tracing the implementations of azsdk_typepec_generate_authoring_plan and azsdk_customized_code_update. Compare where each tool retrieves customization knowledge and generates plans; done means both tools use one consolidated knowledge source and one typespec customization-plan flow without duplicated generation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100