Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: azsdk-common-apiview-feedback-resolution
license: MIT
metadata:
version: "1.0.0"
distribution: shared
description: "Analyze and resolve APIView review feedback on Azure SDK PRs. **UTILITY SKILL**. USE FOR: APIView comments, API review feedback, SDK API surface changes. DO NOT USE FOR: general code review, non-APIView feedback. INVOKES: azure-sdk-mcp:azsdk_apiview_get_comments, azure-sdk-mcp:azsdk_typespec_customized_code_update."
compatibility:
requires: "azure-sdk-mcp server, SDK pull request with APIView review link"
---

# APIView Feedback Resolution

**Prerequisites:** azure-sdk-mcp server required; no CLI fallback. Without MCP, this skill cannot retrieve APIView comments or apply TypeSpec changes. Connect the `azure-sdk-mcp` server before use.

## MCP Tools

| Tool | Purpose |
|------|---------|
| `azure-sdk-mcp:azsdk_apiview_get_comments` | Get APIView comments |
| `azure-sdk-mcp:azsdk_typespec_customized_code_update` | Apply TypeSpec changes locally |
| `azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback` | Delegate to CCA pipeline |
| `azure-sdk-mcp:azsdk_run_typespec_validation` | Validate TypeSpec |
| `azure-sdk-mcp:azsdk_package_generate_code` | Regenerate SDK |

## Steps

1. **Retrieve** — Get APIView URL from SDK PR, run `azsdk_apiview_get_comments`.
2. **Categorize** — Group as Critical/Suggestions/Informational per [feedback steps](references/feedback-resolution-steps.md).
3. **Resolve** — Use `azsdk_typespec_customized_code_update` for TypeSpec changes; delegate via `azsdk_typespec_delegate_apiview_feedback` for complex cases.
4. **Validate** — Run validation, regenerate SDK, build and test.
5. **Confirm** — Verify all items addressed. If delegated, follow [post-delegation follow-up](references/feedback-resolution-steps.md#post-delegation-follow-up). Request re-review.

## Examples

- "Resolve the APIView comments on my SDK pull request"
- "What feedback did the API reviewer leave?"

## Troubleshooting

- **No comments**: Verify PR has APIView link and MCP server is connected.
- **Validation fails**: Re-run after fixing TypeSpec errors.
- **MCP unavailable**: Requires `azure-sdk-mcp` server; no CLI fallback. Connect the server and retry.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: azsdk-common-apiview-feedback-resolution-eval
description: Evaluation suite for APIView feedback resolution skill.
skill: azsdk-common-apiview-feedback-resolution
version: '1.0'
config:
model: gpt-4o
executor: mock
trials_per_task: 1
timeout_seconds: 300
parallel: false
metrics:
- name: task_completion
weight: 0.7
threshold: 0.8
description: Did the skill complete trigger and anti-trigger checks?
- name: efficiency
weight: 0.3
threshold: 0.7
description: Did the skill stay within behavior limits?
graders:
- type: text
name: no_fatal_errors
config:
regex_not_match:
- (?i)fatal error
- (?i)unhandled exception
- '(?i)panic:'
tasks:
- "tasks/*.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: azsdk-common-apiview-feedback-resolution-evals
description: Evaluations for the APIView feedback resolution skill
skill: azsdk-common-apiview-feedback-resolution
version: "1.0"
config:
model: gpt-4o
executor: mock
trials_per_task: 1
timeout_seconds: 300
parallel: false
metrics:
- name: task_completion
weight: 0.7
threshold: 0.8
description: Did the skill complete trigger and anti-trigger checks?
- name: efficiency
weight: 0.3
threshold: 0.7
description: Did the skill stay within behavior limits?
graders:
- type: text
name: no_fatal_errors
config:
regex_not_match:
- (?i)fatal error
- (?i)unhandled exception
- '(?i)panic:'
Comment on lines +21 to +27
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This eval config isn’t valid YAML: the grader list item starts at column 0 instead of being indented under graders:, and the regex_not_match values are not nested as a list under that key. Please indent the graders section so the file parses correctly.

Suggested change
- type: text
name: no_fatal_errors
config:
regex_not_match:
- (?i)fatal error
- (?i)unhandled exception
- '(?i)panic:'
- type: text
name: no_fatal_errors
config:
regex_not_match:
- (?i)fatal error
- (?i)unhandled exception
- '(?i)panic:'

Copilot uses AI. Check for mistakes.
tasks:
- "tasks/*.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
id: anti-trigger
name: anti-trigger
description: Should not trigger on unrelated prompts
inputs:
prompt: "How do I set up a new Azure Storage account?"
expected:
skill_activated: false
graders:
- type: text
name: no-apiview-advice
config:
not_contains:
- "APIView"
- "API review"
- "apiview.dev"
- "apiviewstagingtest.com"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
id: basic-trigger
name: basic-trigger
description: Should trigger on APIView feedback resolution requests
inputs:
prompt: "I have APIView comments on my SDK PR that need to be resolved. Can you help?"
expected:
skill_activated: true
graders:
- type: text
name: mentions-apiview
config:
contains:
- "APIView"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
id: url-trigger
name: url-trigger
description: Should trigger when user provides an APIView URL without explicitly saying APIView
inputs:
prompt: "I have review comments on my SDK PR from this page: https://spa.apiview.dev/review/abc123?activeApiRevisionId=def456 — can you help me resolve them?"
expected:
skill_activated: true
graders:
- type: text
name: mentions-apiview-domain
config:
contains:
- "apiview"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
skill: azsdk-common-apiview-feedback-resolution
should_trigger_prompts:
- prompt: "resolve APIView feedback on my PR"
reason: "Should activate skill"
- prompt: "fix APIView comments"
reason: "Should activate skill"
- prompt: "address API review feedback"
reason: "Should activate skill"
- prompt: "APIView shows issues with my SDK"
reason: "Should activate skill"
- prompt: "help me with APIView suggestions"
reason: "Should activate skill"
- prompt: "Help me fix these comments: https://spa.apiview.dev/review/0qw98r9qwur9q823r?activeApiRevisionId=afiq948tquajf8jq9f"
reason: "URL-only prompt without explicit APIView mention should activate skill"
- prompt: "Address this feedback: https://spa.apiview.dev/review/akldfja9qjta498tjaejg0?activeApiRevisionId=odiufa9sefighj98439"
reason: "URL-only prompt without explicit APIView mention should activate skill"
- prompt: "Resolve these comments: https://apiviewstagingtest.com/review/akldfja9qjta498tjaejg0?activeApiRevisionId=odiufa9sefighj98439"
reason: "URL-only prompt without explicit APIView mention should activate skill"
should_not_trigger_prompts:
- prompt: "deploy my Azure Function"
reason: "Unrelated to skill scope"
- prompt: "fix my pipeline build error"
reason: "Unrelated to skill scope"
- prompt: "create a new TypeSpec definition"
reason: "Unrelated to skill scope"
- prompt: "how do I release an SDK package"
reason: "Unrelated to skill scope"
- prompt: "set up Azure Storage account"
reason: "Unrelated to skill scope"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"comments": [
{
"id": "c1",
"text": "Consider renaming 'ComputeProvisioningState' to 'ProvisioningState' for consistency.",
"severity": "suggestion",
"language": "python",
"resolved": false
},
{
"id": "c2",
"text": "Missing documentation on the 'createOrUpdate' method parameters.",
"severity": "critical",
"language": "python",
"resolved": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# APIView Feedback Resolution Details

## Feedback Categories

- **Critical**: Breaking changes, security issues - must resolve
- **Suggestions**: Naming improvements, documentation - should resolve
- **Informational**: Style notes - optional

## Resolution Approaches

**If TypeSpec change needed:**

1. Run `azsdk_typespec_delegate_apiview_feedback` to create a GH issue with all actionable comments in the specs repo and assign to Copilot.

**If code-only fix needed:**

1. Apply the fix directly in the SDK repository
2. Regenerate SDK if needed

## Post-Resolution Steps

1. Run `azsdk_run_typespec_validation` to verify TypeSpec changes
2. Run `azsdk_package_generate_code` to regenerate SDK
3. Build and test the updated SDK
4. Update the SDK PR with changes
5. Re-check APIView for any new comments
6. Inform user to request re-review if needed

## Post-Delegation Follow-Up

When `azsdk_typespec_delegate_apiview_feedback` is used to delegate changes, follow these steps to close the loop with the user:

1. **Share the issue link** — Immediately share the created GitHub issue URL with the user so they can track progress.
2. **Explain the pipeline chain** — Let the user know the expected flow: GitHub issue → spec PR (created by Copilot) → SDK generation pipeline → SDK PRs → updated APIView revision.
3. **Monitor pipeline status** — Offer to check pipeline progress using `azure-sdk-mcp:azsdk_get_pipeline_status`.
4. **Track SDK PRs** — Once the spec PR is created, use `azure-sdk-mcp:azsdk_get_sdk_pull_request_link` to find the resulting SDK pull requests.
5. **Present the full link chain** — When available, share the complete chain with the user: issue → spec PR → SDK PRs → APIView revision link.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
id: apiview-basic-001
name: Retrieve and Review APIView Comments
description: |
Test that the skill retrieves APIView comments for an SDK package
and presents them organized by priority.
tags:
- basic
- happy-path
inputs:
prompt: "My Python SDK PR has APIView comments that I need to address. Can you help me retrieve and resolve them?"
expected:
output_contains:
- "APIView"
- "comment"
outcomes:
- type: tool_called
tool_name: azsdk_apiview_get_comments
behavior:
max_tool_calls: 5
max_response_time_ms: 30000
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
id: apiview-edge-001
name: APIView Requires TypeSpec Change
description: |
Test that the skill handles feedback requiring TypeSpec modifications
and triggers regeneration.
tags:
- edge-case
- typespec-change
inputs:
prompt: "An APIView reviewer says I need to rename 'ComputeProvisioningState' to 'ProvisioningState' in my SDK. This needs a TypeSpec change."
expected:
output_contains:
- "client.tsp"
- "clientName"
output_excludes:
- "cannot help"
behavior:
max_tool_calls: 5
max_response_time_ms: 30000
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
id: apiview-no-feedback-001
name: No APIView Feedback Found
description: |
Test that the skill handles the case where no APIView comments exist
and advises the user to proceed.
tags:
- basic
- no-feedback
inputs:
prompt: "Check if there are any APIView comments on my .NET SDK PR that I need to address before release."
expected:
output_contains:
- "APIView"
behavior:
max_tool_calls: 3
max_response_time_ms: 15000
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
id: apiview-negative-001
name: Should Not Trigger - Create TypeSpec Project
description: |
Test that the skill does NOT activate when user wants to create
a TypeSpec project from scratch.
tags:
- negative-test
- anti-trigger
inputs:
prompt: "I need to create a new TypeSpec project for my Azure Storage service."
expected:
output_not_contains:
- "azsdk_apiview_get_comments"
- "APIView"
56 changes: 56 additions & 0 deletions .github/skills/azsdk-common-generate-sdk-locally/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: azsdk-common-generate-sdk-locally
license: MIT
metadata:
version: "1.1.0"
distribution: shared
description: "Generate, build, and test Azure SDKs locally from TypeSpec, with automatic customization to resolve build errors and apply SDK changes. **UTILITY SKILL**. USE FOR: \"generate SDK locally\", \"build SDK\", \"run SDK tests\", \"update changelog\", \"fix SDK build errors\", \"fix breaking changes\", \"resolve SDK generation errors\", \"customize TypeSpec\", \"apply TypeSpec customization\", \"rename SDK client\", \"rename SDK model\", \"hide operation from SDK\", \"fix analyzer errors\", \"fix compilation errors\", \"resolve customization drift\", \"create subclient\", \"apply client.tsp changes\". DO NOT USE FOR: publishing to package registries, CI pipeline configuration, API design review. INVOKES: azure-sdk-mcp:azsdk_package_generate_code, azure-sdk-mcp:azsdk_package_build_code, azure-sdk-mcp:azsdk_package_run_tests, azure-sdk-mcp:azsdk_customized_code_update."
compatibility:
requires: "azure-sdk-mcp server, local azure-sdk-for-{language} clone, language build tools"
---

# Generate SDK Locally

## MCP Tools

| Tool | Purpose |
|------|---------|
| `azure-sdk-mcp:azsdk_package_generate_code` | Generate SDK from TypeSpec |
| `azure-sdk-mcp:azsdk_package_build_code` | Build package |
| `azure-sdk-mcp:azsdk_package_run_check` | Validate package |
| `azure-sdk-mcp:azsdk_package_run_tests` | Run tests |
| `azure-sdk-mcp:azsdk_customized_code_update` | Apply TypeSpec and code customizations to resolve build errors, breaking changes, or SDK modification requests (includes regeneration and build internally) |

**Prerequisites:** azure-sdk-mcp server must be running. Without MCP, use `npx tsp-client` CLI.

## Steps

1. **Verify** — Run `azure-sdk-mcp:azsdk_verify_setup` to confirm environment.
2. **Generate** — Run `azure-sdk-mcp:azsdk_package_generate_code` with `tspconfig.yaml` or `tsp-location.yaml` path.
3. **Build** — Run `azure-sdk-mcp:azsdk_package_build_code`. If the build succeeds, proceed to step 5.
4. **Customize** — If build fails, or if the user requests SDK modifications, run `azure-sdk-mcp:azsdk_customized_code_update` with the build errors or user request. The tool handles the full workflow internally: it classifies the issue, applies TypeSpec decorators and/or code patches, regenerates the SDK, and builds — all in one call. See [customization workflow](references/customization-workflow.md).
5. **Validate** — Run `azure-sdk-mcp:azsdk_package_run_check` and `azure-sdk-mcp:azsdk_package_run_tests`.
6. **Metadata** — Update metadata, changelog, and version. _(Note: For .NET data plane, skip this step — metadata, changelog, and version updates are per-commit tasks, not part of the generate/build/test workflow.)_

[SDK repos](references/sdk-repos.md)
[Customization workflow](references/customization-workflow.md)

## Examples

- "Generate the SDK locally for my TypeSpec service"
- "Build and test the Python SDK package"
- "Fix the SDK build errors on this PR"
- "The SDK generation has breaking changes, resolve them"
- "Rename FooClient to BarClient for .NET"
- "Hide the internal polling operation from the Python SDK"
- "Fix .NET analyzer errors AZC0030 and AZC0012"
- "The build is failing because a customization references a renamed property"
- "Create a subclient architecture for the Python SDK"
- "Apply TypeSpec customizations to fix compilation errors"

## Troubleshooting

- Run `azure-sdk-mcp:azsdk_verify_setup` to confirm MCP and tools.
- If build fails with type conflicts, breaking changes, analyzer errors, or customization drift, use `azure-sdk-mcp:azsdk_customized_code_update` to apply customizations.
- The customization tool uses a two-phase approach: TypeSpec decorators first (Phase A), then code repairs if needed (Phase B).
- Without MCP, use `npx tsp-client` CLI.
29 changes: 29 additions & 0 deletions .github/skills/azsdk-common-generate-sdk-locally/eval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: azsdk-common-generate-sdk-locally-eval
description: Evaluation suite for local SDK generation skill.
skill: azsdk-common-generate-sdk-locally
version: '1.0'
config:
model: gpt-4o
executor: mock
trials_per_task: 1
timeout_seconds: 600
parallel: false
metrics:
- name: task_completion
weight: 0.7
threshold: 0.8
description: Did the skill complete trigger and anti-trigger checks?
- name: efficiency
weight: 0.3
threshold: 0.7
description: Did the skill stay within behavior limits?
graders:
- type: text
name: no_fatal_errors
config:
regex_not_match:
- (?i)error occurred
- (?i)failed
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The no_fatal_errors grader forbids the word failed (case-insensitive). That’s likely to cause false failures for this skill, since normal troubleshooting guidance often includes phrases like “build failed” or “tests failed”. Consider aligning this grader with the others (e.g., only block truly fatal/unhandled error patterns) or narrowing the regexes to avoid rejecting legitimate responses.

Suggested change
- (?i)failed
- (?i)fatal error
- (?i)unhandled exception

Copilot uses AI. Check for mistakes.
- (?i)re-run the tool
tasks:
- "tasks/*.yaml"
Loading