Skip to content

Commit fdcb796

Browse files
Merge branch 'main' into user/jameslim/aci-azmi-api-2026-05-01
2 parents 28895ae + ed068e4 commit fdcb796

1,464 files changed

Lines changed: 127750 additions & 2469 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/skills/azure-typespec-author/SKILL.md

Lines changed: 36 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ license: MIT
44
metadata:
55
version: "1.0.0"
66
description: "Authors and modifies Azure TypeSpec (.tsp) API specifications. USE FOR: any TypeSpec/tsp change — api versions (add, bump, preview, stable, promote), resources, operations, models, properties, decorators, visibility, constraints, breaking changes, LRO, suppressions, operationId, spread model. Covers ARM resource-manager and data-plane services. DO NOT USE FOR: SDK generation, releasing SDK packages, or single MCP tool calls. INVOKES: azure-sdk-mcp:azsdk_typespec_generate_authoring_plan, azure-sdk-mcp:azsdk_run_typespec_validation."
7-
compatibility:
8-
requires: "azure-sdk-mcp server with azsdk_typespec_generate_authoring_plan and azsdk_run_typespec_validation tools"
7+
compatibility: "azure-sdk-mcp server with azsdk_typespec_generate_authoring_plan and azsdk_run_typespec_validation tools"
98
---
109

1110
# Azure TypeSpec Author
@@ -19,6 +18,16 @@ compatibility:
1918

2019
**Prerequisite:** `azure-sdk-mcp` server must be running.
2120

21+
# When to invoke the azure-typespec-author skill
22+
23+
The `azure-typespec-author` skill **must** be invoked immediately in all modes (including plan mode) for any task that involves creating and modifying TypeSpec (`.tsp`) files except for `client.tsp` under the specification directory in this repository. This includes but is not limited to:
24+
25+
- Adding, bumping, or promoting API versions (preview, stable)
26+
- Adding or modifying resources, operations, models, properties, or decorators
27+
- Changing visibility, constraints, breaking changes, LRO patterns, or suppressions
28+
- Defining or updating operationId, spread models, or extension resources
29+
- Converting Swagger to TypeSpec (post-conversion edits)
30+
2231
## Constraints
2332

2433
- **Always follow the full workflow** — even seemingly simple changes (e.g. adding a default value) can require complex versioning decorator changes. Never skip steps.
@@ -28,96 +37,54 @@ compatibility:
2837
- **Always cite references** — provide links that justify the approach.
2938
- **Follow the authoring plan exactly** — code changes in Step 4 MUST follow the authoring plan generated in Step 3. Do not deviate by referring to existing code patterns in the TypeSpec project; the authoring plan is the single source of truth for what to change.
3039

31-
---
32-
3340
## Workflow
3441

35-
> Classify → Intake → Plan → Apply → Validate
36-
37-
### Progress Checklist
38-
39-
Copy and update as you progress:
42+
> Analyze → Intake → Plan → Apply → Validate → Output reference links
4043
41-
- [ ] Step 1: Analyzed project & classified as: \_\_\_
42-
- [ ] Step 2: Collected intake inputs
43-
- [ ] Step 3: Retrieved authoring plan
44-
- [ ] Step 4: Applied changes
45-
- [ ] Step 5: Validated with TypeSpec validation and `tsp compile .`
44+
- [ ] Step 1 — Analyze project
45+
- [ ] Step 2 — Intake
46+
- [ ] Step 3 — Build authoring plan
47+
- [ ] Step 4 — Apply changes
48+
- [ ] Step 5 — Validate
49+
- [ ] Step 6 — Output reference links
4650

47-
### Step 1: Analyze & Classify
51+
### Step 1: Analyze Project
4852

49-
Follow [analyze project & classify task](references/analyze-project-and-classify-task.md).
50-
51-
Classify as exactly one:
52-
53-
| Task Type | When | `azsdk_typespec_generate_authoring_plan` |
54-
| ------------------------- | --------------------------------------------------------------------------------- | ---------------------------------------- |
55-
| **API Version Evolution** | Adding a new preview or stable API version to an existing ARM service. (ARM only) | **MUST NOT** call |
56-
| **General Authoring** | Any other `.tsp` change (resources, operations, models, properties, etc.) | **MUST** call |
57-
58-
State your classification explicitly before proceeding.
59-
60-
---
53+
See [analyze-project.md](references/analyze-project.md).
6154

6255
### Step 2: Intake
6356

64-
Collect inputs needed for the change. Branch by task type:
65-
66-
- **API Version Evolution** → Follow [API version evolution reference — Step 2](references/api-version-evolution.md#step-2-intake).
67-
- **General Authoring** → Follow [intake guide](references/general-authoring-intake.md).
57+
See [intake.md](references/intake.md).
6858

69-
---
59+
### Step 3: Build Authoring Plan
7060

71-
### Step 3: Retrieve Authoring Plan
72-
73-
Check your classification from Step 1, then branch:
74-
75-
- **API Version Evolution** → Follow [API version evolution reference — Step 3](references/api-version-evolution.md#step-3-retrieve-authoring-plan). **MUST NOT** call `azsdk_typespec_generate_authoring_plan`.
76-
- **General Authoring****MUST** invoke `azure-sdk-mcp:azsdk_typespec_generate_authoring_plan` with:
77-
78-
| Parameter | Value |
79-
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
80-
| `request` | User request (verbatim) |
81-
| `additionalInformation` | All content gathered from Steps 1–2 (intake analysis, user answers, relevant `.tsp` code read from the project), **including any case-specific Defaults noted in Step 2.2** |
82-
| `typeSpecProjectRootPath` | TypeSpec project root path |
83-
84-
Do not proceed without an authoring plan from this tool.
85-
86-
---
61+
See [authoring-plan.md](references/authoring-plan.md).
8762

8863
### Step 4: Apply Changes
8964

90-
Confirm uncertainties with the user, then make minimal `.tsp` edits.
91-
92-
- **API Version Evolution** → Apply the plan from Step 3.
93-
- **General Authoring** → Apply the authoring plan from Step 3.
94-
95-
---
65+
Make minimal `.tsp` edits following the plan from Step 3. Confirm uncertainties with the user first.
9666

9767
### Step 5: Validate
9868

99-
See [validation guide](references/validation.md) for sub-steps. You must run TypeSpec validation (5.1), `tsp compile .` (5.2), and example verification (5.3, API Version Evolution only).
69+
See [validation.md](references/validation.md). Run 5.1 (TypeSpec validation) and 5.2 (`tsp compile .`) always; 5.3 (example verification) for API version evolution only.
10070

101-
---
71+
### Step 6: Output Reference Links
72+
73+
Output all referenced document URLs from Step 3. This gives the user direct links to the documentation that informed the changes.
10274

10375
## Reference Files
10476

105-
| File | Purpose |
106-
| --------------------------------------------------------------------------------------- | ----------------------------------------- |
107-
| [analyze-project-and-classify-task.md](references/analyze-project-and-classify-task.md) | Step 1: project analysis + classification |
108-
| [api-version-evolution.md](references/api-version-evolution.md) | Steps 2–4 for API Version Evolution tasks |
109-
| [general-authoring-intake.md](references/general-authoring-intake.md) | Step 2 for General Authoring tasks |
110-
| [agentic-search.md](references/agentic-search.md) | Procedure for fetching external docs |
111-
| [validation.md](references/validation.md) | Step 5: validation sub-steps |
77+
| File | Purpose |
78+
| --------------------------------------------------------------------- | ------------------------------------------- |
79+
| [analyze-project.md](references/analyze-project.md) | Step 1: project analysis |
80+
| [intake.md](references/intake.md) | Step 2: general + case-specific intake |
81+
| [authoring-plan.md](references/authoring-plan.md) | Step 3: build authoring plan (Option A + B) |
82+
| [agentic-search.md](references/agentic-search.md) | Procedure: fetch URLs → extract guidance |
83+
| [reference-document-links.md](references/reference-document-links.md) | Catalog of external guide URLs |
84+
| [validation.md](references/validation.md) | Step 5: validate → compile → verify |
11285

11386
## Examples
11487

11588
- "Add a new preview API version 2026-01-01-preview for widget resource manager"
116-
- "Bump to stable version 2026-01-01 for Microsoft.Widget"
11789
- "Add an ARM resource named Asset with CRUD operations"
11890
- "Add a new property to the Widget model"
119-
120-
## Troubleshooting
121-
122-
- **TypeSpec validation fails** — display all errors, provide fix suggestions, re-run validation.
123-
- **API Version Evolution** — use the versioning guide URLs in the [version evolution reference](references/api-version-evolution.md); do not call the authoring plan tool.
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Agentic Search
22

3-
Procedure for fetching external documentation and extracting actionable guidance.
4-
53
## Input
64

7-
A set of document URLs to fetch (provided by the caller).
5+
- **Step 1 result** — project analysis output from [analyze-project.md](analyze-project.md): service type, existing API versions, latest version, intent, target resource/interface, and constraints.
6+
- **User request** — the user's stated goal for this session.
87

98
## Procedure
109

11-
1. **Fetch documents**use `web_fetch` to download each URL. Extract the page content as markdown.
12-
2. **Search content**read the downloaded content and identify instructions, code examples, and patterns relevant to the current task.
13-
3. **Build authoring plan**synthesize the extracted content into a concrete authoring plan grounded in the fetched material.
14-
15-
> Do not proceed without an authoring plan grounded in the fetched reference material.
10+
1. **Select URLs**read [reference-document-links.md](reference-document-links.md). Select only the URLs relevant to the user's request and Step 1 result. If unsure, select all.
11+
2. **Fetch**`web_fetch` each selected URL. Extract content as markdown.
12+
3. **Search**find content matching a query derived from the user's request and Step 1 result. Choose the most effective local search tool available.
13+
4. **Iterate** — if initial results are insufficient, refine the query or fetch additional pages/URLs until the information satisfies the query.
14+
5. **Return** — provide the extracted guidance to the caller.

.github/skills/azure-typespec-author/references/analyze-project-and-classify-task.md

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Analyze Project
2+
3+
Collect the inputs below from the TypeSpec project. Ask **up to 6 concise questions** for any that are missing.
4+
5+
| # | Input | Example |
6+
| --- | --------------------------- | ---------------------------------------------------------------- |
7+
| 1 | TypeSpec project root | `/specification/widget/resource-manager/Microsoft.Widget/Widget` |
8+
| 2 | Path to `tspconfig.yaml` | `<spec-root>/tspconfig.yaml` |
9+
| 3 | Service type | ARM / data-plane |
10+
| 4 | Existing API versions | `2024-01-01 (stable)`, `2024-06-01-preview` |
11+
| 5 | Latest API version | Most recent entry in the `Versions` enum |
12+
| 6 | Current working API version | The version being added or modified this session |
13+
| 7 | Intent | add / modify / fix |
14+
| 8 | Target resource/interface | Resource or operation name (if known) |
15+
| 9 | Constraints | Breaking-change limits, naming rules, emitter targets, etc. |
16+
17+
## Output
18+
19+
Display the results before proceeding to Step 2:
20+
21+
```
22+
TypeSpec project root: /path/to/project
23+
tspconfig.yaml: /path/to/project/tspconfig.yaml
24+
Service Type: ARM/Dataplane
25+
API Versions: 2024-01-01 (stable), 2024-06-01-preview (preview)
26+
Latest Version: 2024-06-01-preview
27+
Working Version: [TBD]
28+
Intent: [add/modify/fix]
29+
Target: [resource/operation if known]
30+
Constraints: [if any]
31+
```

.github/skills/azure-typespec-author/references/api-version-evolution.md

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Build Authoring Plan
2+
3+
> Prerequisite: Steps 1 (Analyze Project) and 2 (Intake) must be complete.
4+
5+
## 3.1 General (All Cases)
6+
7+
Use **both** tools to build an authoring plan, if the retrieved results have conflict, rely on agentic search.
8+
9+
1. **MCP Tool** — call `azsdk_typespec_generate_authoring_plan` with:
10+
- `request`: user request (verbatim)
11+
- `additionalInformation`: all context from Steps 1–2
12+
- `typeSpecProjectRootPath`: project root path
13+
14+
2. **Agentic Search** — run [agentic search](agentic-search.md) with URLs from [reference-document-links.md](reference-document-links.md) and a query from the user's request. Synthesize extracted content into a concrete plan.
15+
16+
---
17+
18+
## 3.2 Case-Specific Authoring Plan
19+
20+
### Case 3 — API Version Evolution
21+
22+
> **Must** use Agentic Search (option 2 above) to build the plan — do not call the MCP tool.
23+
24+
1. Copy `.json` files from latest version's `examples/` into new version's `examples/`. Update `api-version` in each file. Delete old version's example folder if old version is no longer existed.
25+
2. Update `readme.md`.

0 commit comments

Comments
 (0)