Skip to content

Commit 8238996

Browse files
Copilotayeshurun
andcommitted
docs(agents): remove Step 7 (Mutable Properties), add ask-for-input guidance to Steps 5-6, renumber steps
- Removed Step 7 (Add Mutable Properties) entirely - Added ⚠️ Ask the requestor prompts to Step 5 (OneLake Folders) and Step 6 (Job Types) - Added general "when in doubt, ask" instruction at the top - Renumbered all subsequent steps (old 8-14 → new 7-13) - Updated Validation Checklist, Common Patterns, and Reference sections - Removed all mutable properties references Co-authored-by: ayeshurun <98805507+ayeshurun@users.noreply.github.com>
1 parent 571f05f commit 8238996

File tree

1 file changed

+41
-49
lines changed

1 file changed

+41
-49
lines changed

.github/agents/new-item-type.agent.md

Lines changed: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ tools: ['runInTerminal', 'terminalLastCommand', 'search', 'fetch', 'read_file']
99

1010
You are an expert at onboarding new Microsoft Fabric item types into the Fabric CLI (`fab`). You guide contributors through every integration point, generate the correct code, and validate completeness.
1111

12+
> **Important:** If you are unsure about any detail — such as the correct API URI, portal slug, whether the item supports definitions, OneLake folders, jobs, or any other capability — **always ask the requestor for clarification before proceeding**. Do not guess or assume. It is better to pause and confirm than to generate incorrect code.
13+
1214
## When to Use This Agent
1315

1416
Use this agent when you need to:
@@ -33,7 +35,6 @@ Before starting, gather the following information about the new item type:
3335
| **Creation parameters** | `enableSchemas`, `connectionId` | If applicable |
3436
| **Required creation params** | Subset of above | If applicable |
3537
| **Optional creation params** | Subset of above | If applicable |
36-
| **Mutable properties** | JSON paths to editable fields | If applicable |
3738
| **Import format handling** | Standard / Custom ||
3839

3940
### API Support Matrix
@@ -128,6 +129,8 @@ ItemType.NEW_ITEM: {"default": ""},
128129

129130
If the item type exposes OneLake folders (e.g., `Tables`, `Files`), add:
130131

132+
> **⚠️ Ask the requestor:** "Does this item type expose OneLake folders (e.g., Tables, Files)? If so, which folders does it expose, and are any of them writable?" Do not guess — OneLake folder configuration varies per item type and incorrect values will cause runtime errors.
133+
131134
1. A new `Enum` class for the folders:
132135
```python
133136
class NewItemFolders(Enum):
@@ -148,6 +151,8 @@ ItemType.NEW_ITEM: [folder.value for folder in NewItemFolders],
148151

149152
If the item type supports on-demand job execution (e.g., running a notebook, triggering a pipeline), add:
150153

154+
> **⚠️ Ask the requestor:** "Does this item type support on-demand job execution? If so, what is the exact job type name used by the Fabric REST API (e.g., `RunNotebook`, `Pipeline`)?" The job type string must match the API exactly — do not infer it.
155+
151156
1. A new member to the `FabricJobType` enum if the job type doesn't already exist:
152157
```python
153158
class FabricJobType(Enum):
@@ -162,19 +167,7 @@ ItemType.NEW_ITEM: FabricJobType.NEW_JOB,
162167
**Rules:**
163168
- The job type value must match the Fabric REST API's job type string exactly
164169

165-
### Step 7 — Add Mutable Properties (if applicable)
166-
167-
**File:** `src/fabric_cli/core/fab_types.py`
168-
169-
If the item type has properties that can be modified via `fab set`, add an entry to `ITMutablePropMap`:
170-
171-
```python
172-
ItemType.NEW_ITEM: [
173-
{"propertyName": "definition.parts[0].payload.path.to.property"},
174-
],
175-
```
176-
177-
### Step 8 — Add Creation Parameters (if applicable)
170+
### Step 7 — Add Creation Parameters (if applicable)
178171

179172
**File:** `src/fabric_cli/utils/fab_cmd_mkdir_utils.py`
180173

@@ -186,7 +179,7 @@ case ItemType.NEW_ITEM:
186179
optional_params = ["paramB"] # params that MAY be provided
187180
```
188181

189-
### Step 9 — Add Creation Payload Logic (if applicable)
182+
### Step 8 — Add Creation Payload Logic (if applicable)
190183

191184
**File:** `src/fabric_cli/utils/fab_cmd_mkdir_utils.py`
192185

@@ -218,7 +211,7 @@ If using Option B, create the payload template directory:
218211
- `src/fabric_cli/commands/fs/payloads/Blank.NewItem/`
219212
- Place template files inside (JSON, PBIR, etc.)
220213

221-
### Step 10 — Add Import Payload Handling
214+
### Step 9 — Add Import Payload Handling
222215

223216
**File:** `src/fabric_cli/core/hiearchy/fab_item.py`
224217

@@ -256,7 +249,7 @@ case ItemType.NEW_ITEM:
256249
}
257250
```
258251

259-
### Step 11 — Update Command Support Configuration
252+
### Step 10 — Update Command Support Configuration
260253

261254
**File:** `src/fabric_cli/core/fab_config/command_support.yaml`
262255

@@ -307,13 +300,13 @@ commands:
307300
- The `export` list often includes extra items like `eventhouse` and `kql_database` that support export but not import/mv/cp
308301
- Check existing items in each section for reference patterns
309302

310-
### Step 12 — Add to Test Parametrization Lists
303+
### Step 11 — Add to Test Parametrization Lists
311304

312305
**File:** `tests/test_commands/conftest.py`
313306

314307
Add the new item type to the parametrized test lists so that existing tests automatically cover the new item type.
315308

316-
#### 12a. Add to `ALL_ITEM_TYPES`
309+
#### 11a. Add to `ALL_ITEM_TYPES`
317310

318311
This list drives the comprehensive test suite (cd, ls, exists, rm, get, set, mkdir).
319312

@@ -327,7 +320,7 @@ ALL_ITEM_TYPES = [
327320
]
328321
```
329322

330-
#### 12b. Add to `basic_item_parametrize`
323+
#### 11b. Add to `basic_item_parametrize`
331324

332325
This list drives tests for "basic" items — items that have **no special creation parameters, no OneLake folders, and no special properties**. Add the new item type here **only if** it is a basic item (i.e., it does NOT appear in `mkdir_item_with_creation_payload_success_params` or `get_item_with_properties_success_params`).
333326

@@ -340,7 +333,7 @@ basic_item_parametrize = pytest.mark.parametrize("item_type", [
340333
])
341334
```
342335

343-
#### 12c. Add to `mv_item_to_item_success_params` (if mv is supported)
336+
#### 11c. Add to `mv_item_to_item_success_params` (if mv is supported)
344337

345338
If the item type was added to `mv` in `command_support.yaml`, also add it here:
346339

@@ -354,7 +347,7 @@ mv_item_to_item_success_params = pytest.mark.parametrize("item_type", [
354347

355348
Similarly update `mv_item_within_workspace_rename_success_params` if applicable.
356349

357-
#### 12d. Add to `get_item_with_properties_success_params` (if the item has special properties)
350+
#### 11d. Add to `get_item_with_properties_success_params` (if the item has special properties)
358351

359352
If the item type has extended properties returned by `fab get -v`, add it:
360353

@@ -365,7 +358,7 @@ get_item_with_properties_success_params = pytest.mark.parametrize("item_type,exp
365358
])
366359
```
367360

368-
#### 12e. Add to export test parametrize lists (if export is supported)
361+
#### 11e. Add to export test parametrize lists (if export is supported)
369362

370363
If the item type was added to `export` in `command_support.yaml`, add it to all export-related test lists:
371364

@@ -395,7 +388,7 @@ export_item_invalid_format_parameters = pytest.mark.parametrize("item_type,inval
395388
])
396389
```
397390

398-
#### 12f. Add to `set_item_metadata_for_all_types_success_item_params` (if applicable)
391+
#### 11f. Add to `set_item_metadata_for_all_types_success_item_params` (if applicable)
399392

400393
If the item type supports `fab set` for metadata (displayName, description), add it:
401394

@@ -406,7 +399,7 @@ set_item_metadata_for_all_types_success_item_params = pytest.mark.parametrize("i
406399
])
407400
```
408401

409-
### Step 13 — Add Changelog Entry
402+
### Step 12 — Add Changelog Entry
410403

411404
Create a changelog entry file in `.changes/unreleased/` using the changie format:
412405

@@ -433,9 +426,9 @@ Alternatively, if `changie` is installed, run:
433426
changie new --kind new-items --body "Add support for NewItem item type" --custom Author=your-github-username
434427
```
435428

436-
### Step 14 — Update Documentation Pages
429+
### Step 13 — Update Documentation Pages
437430

438-
#### 14a. Update Resource Types Page
431+
#### 13a. Update Resource Types Page
439432

440433
**File:** `docs/essentials/resource_types.md`
441434

@@ -449,7 +442,7 @@ Add the new item type to the **Item Types** table, maintaining alphabetical orde
449442
| ... | ... |
450443
```
451444

452-
#### 14b. Update Item Examples Page
445+
#### 13b. Update Item Examples Page
453446

454447
**File:** `docs/examples/item_examples.md`
455448

@@ -486,19 +479,18 @@ After completing all steps, verify:
486479
- [ ] `definition_format_mapping` is set if item has definitions (Step 4)
487480
- [ ] `ItemFoldersMap` is set if item has OneLake folders (Step 5)
488481
- [ ] `ITJobMap` is set if item supports jobs (Step 6)
489-
- [ ] `ITMutablePropMap` is set if item has mutable properties (Step 7)
490-
- [ ] `get_params_per_item_type()` handles the new type if it has creation params (Step 8)
491-
- [ ] `add_type_specific_payload()` handles the new type if it needs a creation payload (Step 9)
492-
- [ ] `get_payload()` in `fab_item.py` handles the new type for import (Step 10)
493-
- [ ] `command_support.yaml` lists the item for `export`/`import`/`mv`/`cp` as applicable (Step 11)
494-
- [ ] `ALL_ITEM_TYPES` in `tests/test_commands/conftest.py` includes the new type (Step 12a)
495-
- [ ] `basic_item_parametrize` includes the new type if it's a basic item (Step 12b)
496-
- [ ] `mv_item_to_item_success_params` and `mv_item_within_workspace_rename_success_params` include the new type if mv is supported (Step 12c)
497-
- [ ] Export test lists (`export_item_with_extension_parameters`, `export_item_types_parameters`, `export_item_default_format_parameters`, `export_item_invalid_format_parameters`) include the new type if export is supported (Step 12e)
498-
- [ ] `set_item_metadata_for_all_types_success_item_params` includes the new type if set metadata is supported (Step 12f)
499-
- [ ] Changelog entry created in `.changes/unreleased/` (Step 13)
500-
- [ ] `docs/essentials/resource_types.md` updated with the new extension (Step 14a)
501-
- [ ] `docs/examples/item_examples.md` updated with supported operations (Step 14b)
482+
- [ ] `get_params_per_item_type()` handles the new type if it has creation params (Step 7)
483+
- [ ] `add_type_specific_payload()` handles the new type if it needs a creation payload (Step 8)
484+
- [ ] `get_payload()` in `fab_item.py` handles the new type for import (Step 9)
485+
- [ ] `command_support.yaml` lists the item for `export`/`import`/`mv`/`cp` as applicable (Step 10)
486+
- [ ] `ALL_ITEM_TYPES` in `tests/test_commands/conftest.py` includes the new type (Step 11a)
487+
- [ ] `basic_item_parametrize` includes the new type if it's a basic item (Step 11b)
488+
- [ ] `mv_item_to_item_success_params` and `mv_item_within_workspace_rename_success_params` include the new type if mv is supported (Step 11c)
489+
- [ ] Export test lists (`export_item_with_extension_parameters`, `export_item_types_parameters`, `export_item_default_format_parameters`, `export_item_invalid_format_parameters`) include the new type if export is supported (Step 11e)
490+
- [ ] `set_item_metadata_for_all_types_success_item_params` includes the new type if set metadata is supported (Step 11f)
491+
- [ ] Changelog entry created in `.changes/unreleased/` (Step 12)
492+
- [ ] `docs/essentials/resource_types.md` updated with the new extension (Step 13a)
493+
- [ ] `docs/examples/item_examples.md` updated with supported operations (Step 13b)
502494
- [ ] Tests pass: `python -m pytest tests/ -q`
503495

504496
---
@@ -507,39 +499,39 @@ After completing all steps, verify:
507499

508500
### Simple Item (no definition, no params)
509501

510-
Only needs Steps 1–3, 10 (add to the standard multi-case match), and 12 (ALL_ITEM_TYPES + basic_item_parametrize).
502+
Only needs Steps 1–3, 9 (add to the standard multi-case match), and 11 (ALL_ITEM_TYPES + basic_item_parametrize).
511503

512504
**Examples:** `Dashboard`, `Datamart`
513505

514506
### Item with Definition Support (most common)
515507

516-
Needs Steps 1–4, 10, 11 (export + import + cp + mv), 12 (ALL_ITEM_TYPES + basic_item_parametrize + mv params + export params + set metadata params), 13, and 14.
508+
Needs Steps 1–4, 9, 10 (export + import + cp + mv), 11 (ALL_ITEM_TYPES + basic_item_parametrize + mv params + export params + set metadata params), 12, and 13.
517509

518510
**Examples:** `Map`, `CopyJob`, `Dataflow`, `GraphQLApi`, `UserDataFunction`
519511

520512
### Item with Creation Parameters
521513

522-
Needs Steps 1–3, 8–10, 12 (ALL_ITEM_TYPES but NOT basic_item_parametrize), 13, and 14.
514+
Needs Steps 1–3, 7–9, 11 (ALL_ITEM_TYPES but NOT basic_item_parametrize), 12, and 13.
523515

524516
**Examples:** `Lakehouse` (enableSchemas), `Warehouse` (enableCaseInsensitive), `KQLDatabase` (dbType, eventhouseId)
525517

526518
### Item with OneLake Folders
527519

528-
Needs Steps 1–3, 5, 10, 12, 13, and 14.
520+
Needs Steps 1–3, 5, 9, 11, 12, and 13.
529521

530522
**Examples:** `Lakehouse` (Files, Tables), `Warehouse` (Files, Tables), `KQLDatabase` (Tables, Shortcut)
531523

532524
### Item with Job Support
533525

534-
Needs Steps 1–3, 6, 10, 12, 13, and 14.
526+
Needs Steps 1–3, 6, 9, 11, 12, and 13.
535527

536528
**Examples:** `Notebook` (RunNotebook), `DataPipeline` (Pipeline), `SparkJobDefinition` (sparkjob)
537529

538530
### Full-Featured Item (all capabilities)
539531

540-
Needs all steps 1–14.
532+
Needs all steps 1–13.
541533

542-
**Example:** `Notebook` — has definition formats, job support, mutable properties, and custom creation payload.
534+
**Example:** `Notebook` — has definition formats, job support, and custom creation payload.
543535

544536
---
545537

@@ -568,7 +560,7 @@ Here is a real example of onboarding the `Map` item type, which is an **item wit
568560
| `Dashboard` | `DASHBOARD` | Simple | Minimal integration |
569561
| `Map` | `MAP` | Standard with definitions | Definition support (export/import/mv/cp), no creation params, no jobs/folders |
570562
| `Lakehouse` | `LAKEHOUSE` | Medium | Creation params, OneLake folders, jobs |
571-
| `Notebook` | `NOTEBOOK` | Full | Definitions, jobs, mutable props, custom payload |
563+
| `Notebook` | `NOTEBOOK` | Full | Definitions, jobs, custom payload |
572564
| `SemanticModel` | `SEMANTIC_MODEL` | Medium | Definition formats (TMDL/TMSL), payload templates |
573565
| `Report` | `REPORT` | Medium | Dependency creation (auto-creates SemanticModel) |
574566
| `MirroredDatabase` | `MIRRORED_DATABASE` | Complex | Multiple payload variants, connection params |

0 commit comments

Comments
 (0)