Skip to content

Commit b2e95ec

Browse files
raych1Copilot
authored andcommitted
Update local SDK workflow instructions with commit checkpoints
Add commit checkpoint steps (Step 3 and Step 7) to prompt users to commit generated and final changes during the local SDK workflow. Reorder steps and clarify the high-level overview presentation as a MUST action. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ae7cf5f commit b2e95ec

1 file changed

Lines changed: 48 additions & 10 deletions

File tree

eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Help the user generate and build SDKs locally from TypeSpec API specifications u
88
High level steps involved:
99
1. Generate SDK locally
1010
2. Build / Compile SDK locally
11-
3. Run package checks
12-
4. Run package tests
13-
5. Update change log, metadata and version
11+
3. Commit generated changes checkpoint
12+
4. Run package checks
13+
5. Run package tests
14+
6. Update change log, metadata and version
15+
7. Commit final changes checkpoint
1416

1517
---
1618

@@ -21,7 +23,7 @@ High level steps involved:
2123
**Goal**: Ensure the user understands the overall SDK generation and build process before starting.
2224
**Actions**:
2325

24-
- Present the high-level steps involved in generating and building SDK locally:
26+
- **MUST** present the high-level steps involved in generating and building SDK locally:
2527
1. Select target language
2628
2. Verify SDK repository
2729
3. Validate repository path
@@ -30,7 +32,11 @@ High level steps involved:
3032
6. Generate SDK using `azsdk_package_generate_code` MCP tool
3133
7. Identify SDK project path
3234
8. Build/Compile SDK using `azsdk_package_build_code` MCP tool
33-
- Ask the user to confirm readiness to proceed.
35+
9. Commit generated changes checkpoint
36+
10. Run package checks
37+
11. Run package tests
38+
12. Update change log, metadata and version
39+
13. Commit final changes checkpoint
3440

3541
---
3642

@@ -132,26 +138,58 @@ High level steps involved:
132138

133139
---
134140

135-
### Step 3: Run package validation
141+
### Step 3: Stage checkpoint — Commit generated changes
142+
143+
**Goal**: Prompt the user to commit the changes produced by the generation and build steps before proceeding to validation and testing.
144+
**Actions**:
145+
146+
- **MUST** inform the user that SDK generation and build have completed successfully.
147+
- **MUST** prompt the user to decide if they want to commit the changes now. Do NOT skip this prompt.
148+
- If the user chooses to commit:
149+
- Check if the user is on the `main` branch. If so, prompt: *"You are currently on the main branch. Please create a new branch using `git checkout -b <branch-name>` before proceeding."* Suggest a reasonable default branch name based on the generation context (e.g., `sdk/<service-name>/<package-name>`) and provide the exact `git checkout -b <branch-name>` command for the user to run. Allow the user to provide a preferred branch name instead. Wait for user confirmation before continuing.
150+
- Run `git add <modified-files>` to stage the changed files.
151+
- Prompt the user for a commit message.
152+
- Run `git commit -m "<user-provided-message>"`.
153+
- If the user chooses to skip, acknowledge and proceed to the next step.
154+
155+
---
156+
157+
### Step 4: Run package validation
136158

137159
**Actions**:
138160

139161
- Run `azsdk_package_run_check` MCP tool to validate the generated SDK package in the identified project directory.
140162

141163
---
142164

143-
### Step 4: Run package tests
165+
### Step 5: Run package tests
144166

145167
**Actions**:
146168

147169
- Run `azsdk_package_run_tests` MCP tool to run tests on the generated SDK package in the identified project directory.
148170

149171
---
150172

151-
### Step 5: Update change log, metadata and version
173+
### Step 6: Update change log, metadata and version
152174

153175
**Actions**:
154176

155-
- Run `azsdk_package_update_metadata` MCP tool to update metadata in the identified project directory.
156177
- Run `azsdk_package_update_changelog_content` MCP tool to update change log in the identified project directory.
157-
- Run `azsdk_package_update_version` MCP tool to update version in the identified project directory.
178+
- Run `azsdk_package_update_metadata` MCP tool to update metadata in the identified project directory.
179+
- Run `azsdk_package_update_version` MCP tool to update version in the identified project directory.
180+
181+
---
182+
183+
### Step 7: Stage checkpoint — Commit final changes
184+
185+
**Goal**: Prompt the user to commit the final set of changes after all updates are complete.
186+
**Actions**:
187+
188+
- **MUST** inform the user that changelog, metadata, and version updates are complete.
189+
- **MUST** prompt the user to decide if they want to commit the changes now. Do NOT skip this prompt.
190+
- If the user chooses to commit:
191+
- Check if the user is on the `main` branch. If so, prompt: *"You are currently on the main branch. Please create a new branch using `git checkout -b <branch-name>` before proceeding."* Suggest a reasonable default branch name based on the generation context (e.g., `sdk/<service-name>/<package-name>`) and provide the exact `git checkout -b <branch-name>` command for the user to run. Allow the user to provide a preferred branch name instead. Wait for user confirmation before continuing.
192+
- Run `git add <modified-files>` to stage the changed files.
193+
- Prompt the user for a commit message.
194+
- Run `git commit -m "<user-provided-message>"`.
195+
- If the user chooses to skip, acknowledge and proceed.

0 commit comments

Comments
 (0)