You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Expert in Azure API specifications who suggests hero scenarios — end-to-end developer workflows grounded in TypeSpec definitions that seed SDK samples, docs, and tests
3
+
tools: ["read", "search", "bash"]
4
+
---
5
+
6
+
# Hero Scenarios Agent
7
+
8
+
Before starting any work, read the detailed guidelines from
9
+
`.github/prompts/hero-scenarios-guidelines.md` and follow them precisely.
This directory contains lease files that establish a time-limited design discussion period for Resource Providers (RPs) in the Azure REST API specifications repository. ARM leases provide a structured timeframe for Product Managers (PMs) and RP owners to collaborate on API design, review specifications.
6
+
7
+
**Important**: Only Product Managers (PMs) are authorized to add lease.yaml files to this directory. Lease files should be added after conducting office hours discussions with RP owners. The reviewer field should contain the GitHub alias of a PM who has reviewed and approved the lease.
8
+
9
+
## Code Owners and Contribution Guidelines
10
+
11
+
This directory is intended to be governed via CODEOWNERS to ensure proper governance:
12
+
13
+
-**Product Managers (PMs)**: Can add and modify `lease.yaml` files after office hours discussions with RP owners
14
+
-**Engineers**: Can enhance and improve the validation workflow and related automation
15
+
-**Approvals**: All changes should be reviewed and approved by designated code owners (PMs and engineers listed in CODEOWNERS, when configured)
16
+
17
+
**Adding New PMs**: To grant a new PM access to add lease files, they should be added to the CODEOWNERS file for the `.github/arm-leases/` directory path when CODEOWNERS protection is configured.
18
+
19
+
## Lease File Structure
20
+
21
+
Each lease must be placed in the following directory structure:
reviewer: "@evanhissey"# GitHub alias of the approving reviewer
43
+
```
44
+
45
+
### Copy-Paste Template
46
+
47
+
Create a file at `.github/arm-leases/<orgName>/<rpNamespace>/<serviceName>(optional)/lease.yaml` with the following content (replace the placeholder values):
48
+
49
+
```yaml
50
+
lease:
51
+
resource-provider: <rpNamespace>
52
+
startdate: <YYYY-MM-DD>
53
+
duration: P180D
54
+
reviewer: "@your-github-alias"
55
+
```
56
+
57
+
## Validation Rules
58
+
59
+
All lease files are automatically validated with the following requirements:
60
+
61
+
### 1. File Location
62
+
63
+
- Only `lease.yaml` files are allowed in the `.github/arm-leases/` directory
64
+
- Must follow the folder structure: `<orgName>/<rpNamespace>/[<serviceName> (optional)]/lease.yaml`
65
+
66
+
### 2. Resource Provider Name
67
+
68
+
- Must match the `<rpNamespace>` folder name exactly
69
+
- Example: If folder is `Microsoft.TestRP`, then `resource-provider` must be `Microsoft.TestRP`
70
+
71
+
### 3. Start Date
72
+
73
+
- Must be in ISO 8601 format: `YYYY-MM-DD`
74
+
- Must be a valid calendar date
75
+
76
+
### 4. Duration
77
+
78
+
- Required field that cannot be empty
79
+
- Must be a valid ISO 8601 duration (e.g., `P180D`, `P90D`, `P5M`)
80
+
- **Maximum duration is 180 days**
81
+
- Supports day-based (`P90D`), month-based (`P5M`), and combined formats
82
+
83
+
### 5. Reviewer
84
+
85
+
- Required field that cannot be empty
86
+
- Must be a GitHub alias starting with `@` (e.g., `@githubUsername`)
87
+
88
+
## Troubleshooting
89
+
90
+
If your PR check **"ARM Lease Validation"** is failing, review the error messages in the check output and fix the issues in your `lease.yaml` file. Common causes include:
91
+
92
+
- **Invalid folder structure**: Ensure the path follows `<orgName>/<rpNamespace>/[<serviceName>]/lease.yaml` with lowercase org name
93
+
- **Resource provider mismatch**: The `resource-provider` value must match the `<rpNamespace>` folder name exactly
94
+
- **Past start date**: The `startdate` must be a valid date in `YYYY-MM-DD` format
95
+
- **Invalid duration**: Use a valid ISO 8601 duration that does not exceed 180 days (e.g., `P180D`, `P90D`, `P5M`)
96
+
- **Missing or empty fields**: All fields (`resource-provider`, `startdate`, `duration`, `reviewer`) are required
97
+
- **Disallowed files**: Only `lease.yaml` and `README.md` files are permitted in `.github/arm-leases/`
Refer to [new-typespec-project.instructions.md](./instructions/typespec-project.instructions.md) for detailed steps on:
4
-
- how to create a new TypeSpec project.
5
-
- converting a specification from swagger to typespec
6
-
- troubleshooting tsp compile errors
13
+
14
+
- how to create a new TypeSpec project.
15
+
- converting a specification from swagger to typespec
16
+
- troubleshooting tsp compile errors
7
17
8
18
# Adding Language Emitters to Existing TypeSpec Projects
9
19
10
20
Refer to [language-emitter.instructions.md](./instructions/language-emitter.instructions.md) for detailed steps on how to add language emitters to an existing `tspconfig.yaml` file in a TypeSpec project.
11
21
22
+
# When to invoke the azure-typespec-author skill
23
+
24
+
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:
25
+
26
+
- Adding, bumping, or promoting API versions (preview, stable)
27
+
- Adding or modifying resources, operations, models, properties, or decorators
28
+
- Changing visibility, constraints, breaking changes, LRO patterns, or suppressions
29
+
- Defining or updating operationId, spread models, or extension resources
30
+
- Converting Swagger to TypeSpec (post-conversion edits)
31
+
32
+
**If you are unsure whether a user request involves TypeSpec authoring, ask the user to confirm before proceeding.** For example, if the request mentions API changes, versioning, resource definitions, or spec modifications but does not explicitly mention TypeSpec, prompt the user:
33
+
34
+
> "This request may involve TypeSpec specification changes. Would you like me to use the azure-typespec-author skill to help with this?"
35
+
36
+
If the user confirms, invoke the `azure-typespec-author` skill immediately. Do **not** build typespec authoring related plan or attempt to make `.tsp` file changes without invoking this skill first.
37
+
38
+
**Do NOT use this skill for:** SDK generation, releasing SDK packages, `client.tsp` or code customization, or standalone MCP tool calls that do not involve editing `.tsp` files.
39
+
12
40
# SDK generation from TypeSpec
13
41
14
42
You must use Azure SDK MCP server to generate SDK from TypeSpec.
Follow [armapi-review.instructions.md](./instructions/armapi-review.instructions.md) and [openapi-review.instructions.md](./instructions/openapi-review.instructions.md) for instructions to review ARM API specifications. Github Code review agent must prioritize these instructions over any other instruction files while performing code reviews.
60
+
Follow [armapi-review.instructions.md](./instructions/armapi-review.instructions.md) and [openapi-review.instructions.md](./instructions/openapi-review.instructions.md) for instructions to review ARM API specifications. GitHub Code review agent must prioritize these instructions over any other instruction files while performing code reviews.
61
+
62
+
Cross-cutting review rules (secret detection, property mutability, naming conventions, enum best practices, provisioning state, tracked resource lifecycle) are in the shared [azure-api-review skill](./skills/azure-api-review/SKILL.md). These are referenced by the instruction files and should not be duplicated elsewhere.
33
63
34
64
# GitHub Actions Development
35
65
36
66
Follow [github-actions.instructions.md](./instructions/github-actions.instructions.md) for instructions on developing and maintaining GitHub Actions code in this repository. This includes workflows, composite actions, and shared utilities.
0 commit comments