Skip to content

Commit ee1dda9

Browse files
committed
clean skills
1 parent 4e05503 commit ee1dda9

96 files changed

Lines changed: 929 additions & 260 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/upstream-watch.official-skills.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"name": "dotnet/skills main branch",
88
"issue_key": "official-dotnet-skills-upstream",
99
"issue_name": "Review official dotnet/skills upstream update",
10-
"notes": "Review vendir.lock.yml, sync upstreams/dotnet-skills via vendir, rerun scripts/import_external_catalog_sources.py, then regenerate catalog outputs and verify the imported official skills and agents.",
10+
"notes": "Review external-sources/vendir.lock.yml, sync external-sources/upstreams/dotnet-skills via vendir, rerun scripts/import_external_catalog_sources.py, then regenerate catalog outputs and verify the imported official skills and agents.",
1111
"skills": [
1212
"configuring-opentelemetry-dotnet",
1313
"minimal-api-file-upload",

.github/workflows/catalog-check.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,23 @@ jobs:
1717
with:
1818
python-version: "3.12"
1919

20+
- name: Install vendir
21+
run: |
22+
mkdir -p .tools
23+
curl -fsSL https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR="$PWD/.tools" bash
24+
echo "$PWD/.tools" >> "$GITHUB_PATH"
25+
2026
- name: Validate automation scripts
2127
run: python3 -m py_compile scripts/generate_catalog.py scripts/generate_catalog_definitions.py scripts/generate_agent_catalog.py scripts/generate_release_notes.py scripts/import_external_catalog_sources.py scripts/upstream_watch.py
2228

2329
- name: Validate external catalog source config
2430
run: python3 scripts/import_external_catalog_sources.py --validate-config
2531

26-
- name: Normalize vendored external sources
27-
run: python3 scripts/import_external_catalog_sources.py
32+
- name: Sync and normalize external sources
33+
run: bash scripts/sync_external_catalog_sources.sh
2834

2935
- name: Verify imported external sources are committed
30-
run: git diff --exit-code -- catalog
36+
run: git diff --exit-code -- catalog external-sources
3137

3238
- name: Validate catalog source metadata
3339
run: |

AGENTS.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ Follow official or documented agent standards where they exist; do not present a
3030
- Areas with specialized responsibilities:
3131
- `agents/`: top-level orchestration agents that sit above the skill catalog, one folder per agent
3232
- `catalog/`: canonical scanned catalog tree, including package manifests plus nested skills and package-owned agents
33-
- `catalog-sources/`: mapping files for vendir-managed external repositories that are normalized into `catalog/`
33+
- `external-sources/`: vendir transport config, pinned lockfile, checked-in upstream snapshots, and import overrides for external repositories
3434
- `cli/ManagedCode.DotnetAgents/`: publishable `dotnet-agents` installer tool for repo-owned orchestration agents
3535
- `cli/ManagedCode.Agents/`: publishable `agents` installer tool for the same repo-owned orchestration agents
3636
- `cli/ManagedCode.DotnetSkills/`: publishable `dotnet-skills` installer tool
3737
- `scripts/`: catalog generation and upstream-watch automation
38-
- `upstreams/`: vendir-managed checked-in snapshots of external source repositories
3938
- `.github/workflows/`: CI, release, and scheduled automation
4039
- Local `AGENTS.md` files currently present: none
4140

@@ -80,10 +79,12 @@ Treat explicit frustration, swearing, sarcasm, repeated rejection, or "don't do
8079
- Skill- or agent-specific manifest metadata belongs in the nearest sibling `manifest.json` next to that `SKILL.md` or `AGENT.md`, not in package-level keyed maps and not in `SKILL.md` frontmatter. For skills, keep `version`, `category`, `packages`, and `package_prefix` in that sibling manifest. Keep package `manifest.json` for package-level metadata such as title, icon, and upstream links.
8180
- Package `manifest.json` should also hold upstream source metadata for the package surface: repository URL plus docs and NuGet links when known. Catalog generators should read those links from manifests and propagate them into exported catalog data and the public site instead of hardcoding or inferring them ad hoc.
8281
- Do not hardcode catalog category lists or catalog type-directory lists as root constants in Python or C#. Derive them from the scanned catalog or a generated artifact sourced from the catalog manifests, so adding a new manifest category or catalog type does not require manual constant edits in runtime code.
83-
- External repositories that contribute skills or agents must be synced declaratively via `vendir.yml` and pinned in `vendir.lock.yml`, with checked-in snapshots under `upstreams/`. Do not copy external repositories into `catalog/` by hand.
84-
- Normalize vendir-managed upstream content into `catalog/` through a repo script and a checked-in config under `catalog-sources/`, so multiple repositories can be imported consistently.
82+
- External repositories that contribute skills or agents must live under `external-sources/`: keep vendir transport config in `external-sources/vendir.yml`, the lockfile in `external-sources/vendir.lock.yml`, and checked-in upstream snapshots under `external-sources/upstreams/`. Do not copy external repositories into `catalog/` by hand.
83+
- Normalize vendir-managed upstream content into `catalog/` through `scripts/import_external_catalog_sources.py` plus checked-in overrides under `external-sources/imports/`.
84+
- Import configs under `external-sources/imports/` are overrides-only. Auto-discover upstream plugins from vendored `plugin.json` files instead of maintaining a second manual plugin registry in local config.
8585
- Imported official upstream skills or agents may keep their upstream canonical ids instead of being renamed to fit the local `dotnet-*` convention.
8686
- If an imported official upstream skill or agent is a true duplicate of a repo-authored local entry, prefer the official upstream source and remove the local duplicate instead of keeping two copies.
87+
- Do not inject HTML provenance comments such as `Imported from ... via vendir` into generated `SKILL.md` or `AGENT.md` files. Keep imported content clean; provenance belongs in package metadata, external-source config, or importer logic, not inside the skill or agent body.
8788

8889
### Issue Workflow
8990

@@ -179,13 +180,14 @@ Other important repository files:
179180
- [`README.md`](README.md): public catalog and repository overview.
180181
- [`CONTRIBUTING.md`](CONTRIBUTING.md): contributor workflow for skills, versions, descriptions, and watch entries.
181182
- [`agents/README.md`](agents/README.md): index of repo-owned orchestration agents and layout conventions.
182-
- [`catalog-sources/*.json`](catalog-sources/): source-import mapping files that describe how vendir-managed repositories are converted into catalog packages.
183+
- [`external-sources/`](external-sources/): dedicated area for vendir transport config, vendored upstream snapshots, and import overrides.
184+
- [`external-sources/imports/*.json`](external-sources/imports/): overrides-only import policy files for vendir-managed repositories.
183185
- [`catalog/*/*/manifest.json`](catalog/): package manifests that hold package metadata and upstream links for the scanned catalog tree.
184186
- [`catalog/*/*/skills/*/manifest.json`](catalog/): sibling skill manifests that hold skill-specific metadata such as `version`, `category`, `packages`, and `package_prefix`.
185187
- [`catalog/*/*/agents/*/manifest.json`](catalog/): sibling agent manifests for agent-specific metadata when needed.
186-
- [`upstreams/`](upstreams): vendir-managed snapshots of external source repositories used by import scripts.
187-
- [`vendir.yml`](vendir.yml): declarative source-sync config for vendir-managed repositories.
188-
- [`vendir.lock.yml`](vendir.lock.yml): resolved vendir lock file with pinned upstream SHAs.
188+
- [`external-sources/upstreams/`](external-sources/upstreams/): vendir-managed snapshots of external source repositories used by import scripts.
189+
- [`external-sources/vendir.yml`](external-sources/vendir.yml): declarative source-sync config for vendir-managed repositories.
190+
- [`external-sources/vendir.lock.yml`](external-sources/vendir.lock.yml): resolved vendir lock file with pinned upstream SHAs.
189191
- [`.github/workflows/catalog-check.yml`](.github/workflows/catalog-check.yml): pull-request validation workflow for generated catalog outputs and tool smoke checks.
190192
- [`.github/workflows/publish-catalog.yml`](.github/workflows/publish-catalog.yml): unified 04:00 UTC release workflow for `catalog-v*` assets, NuGet tool publish, and GitHub Pages deployment.
191193
- [`.github/upstream-watch.json`](.github/upstream-watch.json): base upstream watch metadata file for labels and shared defaults.

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,14 @@ Do not introduce or treat a checked-in aggregate catalog JSON file as the canoni
206206

207207
External upstream repositories are handled separately:
208208

209-
- `vendir.yml` declares which repositories are synced into `upstreams/`
210-
- `vendir.lock.yml` pins the resolved upstream SHAs
211-
- `catalog-sources/*.json` describes how vendored upstream plugins are normalized into `catalog/<type>/<package>/`
209+
- `external-sources/vendir.yml` declares which repositories are synced into `external-sources/upstreams/`
210+
- `external-sources/vendir.lock.yml` pins the resolved upstream SHAs
211+
- `external-sources/imports/*.json` carries overrides-only import policy for vendored upstream plugins
212212
- `scripts/import_external_catalog_sources.py` performs the normalization step
213213

214+
Do not maintain a second manual plugin registry in local config.
215+
The importer auto-discovers upstream plugins from vendored `plugin.json` files and uses `external-sources/imports/*.json` only for local policy such as type, category, package naming, compatibility, and skill-level package trigger overrides.
216+
214217
For imported official upstream skills, keep the upstream skill or agent id unless there is a real compatibility reason to rename it.
215218

216219
Do not hand-edit the generated catalog tables.

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,14 @@ catalog/
179179
├── skills/
180180
│ └── <skill-name>/
181181
│ ├── SKILL.md
182+
│ ├── manifest.json
182183
│ ├── scripts/ # optional
183184
│ ├── references/ # optional
184185
│ └── assets/ # optional
185186
└── agents/
186187
└── <agent-name>/
187188
├── AGENT.md
189+
├── manifest.json # optional
188190
├── scripts/ # optional
189191
├── references/ # optional
190192
└── assets/ # optional
@@ -194,7 +196,25 @@ The package-level `manifest.json` is the package control plane. It carries packa
194196

195197
`SKILL.md` should stay focused on routing, workflow, deliverables, and validation. Do not put `version`, `category`, `packages`, or `package_prefix` in `SKILL.md` frontmatter.
196198

197-
External upstream repositories are vendir-managed under `upstreams/`, mapped by `catalog-sources/*.json`, and normalized into `catalog/` by `scripts/import_external_catalog_sources.py`. Official imports may keep their upstream skill ids instead of being renamed to `dotnet-*`.
199+
## External Upstream Sources
200+
201+
External upstream repositories live in the dedicated [`external-sources/`](external-sources/) area.
202+
203+
- `external-sources/vendir.yml` and `external-sources/vendir.lock.yml` handle fetch-and-pin only.
204+
- `external-sources/upstreams/` holds the checked-in vendored snapshots.
205+
- `external-sources/imports/*.json` is overrides-only local policy for type, category, package naming, compatibility, and skill-level package trigger metadata.
206+
- `scripts/import_external_catalog_sources.py` auto-discovers upstream plugins from vendored `plugin.json` files, applies the local overrides, and normalizes the result into `catalog/<type>/<package>/`.
207+
208+
Official imports may keep their upstream skill ids instead of being renamed to `dotnet-*`.
209+
210+
```mermaid
211+
flowchart LR
212+
A["external-sources/vendir.yml"] --> B["external-sources/upstreams/<repo>/"]
213+
B --> C["plugin.json auto-discovery"]
214+
D["external-sources/imports/*.json (overrides only)"] --> C
215+
C --> E["scripts/import_external_catalog_sources.py"]
216+
E --> F["catalog/<type>/<package>/"]
217+
```
198218

199219
When you refresh vendored upstream content locally, use `bash scripts/sync_external_catalog_sources.sh`.
200220

catalog/Frameworks/Official-DotNet-ASPNet/skills/configuring-opentelemetry-dotnet/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: configuring-opentelemetry-dotnet
33
description: "Configure OpenTelemetry distributed tracing, metrics, and logging in ASP.NET Core using the .NET OpenTelemetry SDK. Use when adding observability, setting up OTLP exporters, creating custom metrics/spans, or troubleshooting distributed trace correlation."
44
compatibility: "Requires an ASP.NET Core project or solution."
55
---
6-
7-
<!-- Imported from upstreams/dotnet-skills/dotnet-aspnet/skills/configuring-opentelemetry-dotnet/SKILL.md via vendir. Edit upstream or catalog-sources config, then rerun scripts/import_external_catalog_sources.py. -->
86
# Configuring OpenTelemetry in .NET
97

108
## When to Use

catalog/Frameworks/Official-DotNet-ASPNet/skills/minimal-api-file-upload/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: minimal-api-file-upload
33
description: "File upload endpoints in ASP.NET minimal APIs (.NET 8+)"
44
compatibility: "Requires an ASP.NET Core project or solution."
55
---
6-
7-
<!-- Imported from upstreams/dotnet-skills/dotnet-aspnet/skills/minimal-api-file-upload/SKILL.md via vendir. Edit upstream or catalog-sources config, then rerun scripts/import_external_catalog_sources.py. -->
86
# Implementing File Uploads in ASP.NET Core Minimal APIs
97

108
## When to Use

catalog/Frameworks/Official-DotNet-MAUI/skills/dotnet-maui-doctor/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: dotnet-maui-doctor
33
description: "Diagnoses and fixes .NET MAUI development environment issues. Validates .NET SDK, workloads, Java JDK, Android SDK, Xcode, and Windows SDK. All version requirements discovered dynamically from NuGet WorkloadDependencies.json — never hardcoded. Use when: setting up MAUI development, build errors mentioning SDK/workload/JDK/Android, \"Android SDK not found\", \"Java version\" errors, \"Xcode not found\", environment verification after updates, or any MAUI toolchain issues. Do not use for: non-MAUI .NET projects, Xamarin.Forms apps, runtime app crashes unrelated to environment setup, or app store publishing issues. Works on macOS, Windows, and Linux."
44
compatibility: "Requires a .NET MAUI project or solution."
55
---
6-
7-
<!-- Imported from upstreams/dotnet-skills/dotnet-maui/skills/dotnet-maui-doctor/SKILL.md via vendir. Edit upstream or catalog-sources config, then rerun scripts/import_external_catalog_sources.py. -->
86
# .NET MAUI Doctor
97

108
Validate and fix .NET MAUI development environments. All version requirements are discovered dynamically from NuGet APIs — never hardcode versions.

catalog/Frameworks/Official-DotNet-MAUI/skills/maui-app-lifecycle/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: maui-app-lifecycle
33
description: ".NET MAUI app lifecycle guidance — the four app states, cross-platform Window lifecycle events (Created, Activated, Deactivated, Stopped, Resumed, Destroying), platform-specific lifecycle mapping, backgrounding and resume behavior, and state-preservation patterns. USE FOR: \"app lifecycle\", \"window lifecycle events\", \"save state on background\", \"resume app\", \"OnStopped\", \"OnResumed\", \"backgrounding\", \"deactivated event\", \"ConfigureLifecycleEvents\", \"platform lifecycle hooks\". DO NOT USE FOR: navigation events (use maui-shell-navigation), dependency injection setup (use maui-dependency-injection), platform API invocation (use conditional compilation and partial classes)."
44
compatibility: "Requires a .NET MAUI project or solution."
55
---
6-
7-
<!-- Imported from upstreams/dotnet-skills/dotnet-maui/skills/maui-app-lifecycle/SKILL.md via vendir. Edit upstream or catalog-sources config, then rerun scripts/import_external_catalog_sources.py. -->
86
# .NET MAUI App Lifecycle
97

108
Handle application state transitions correctly in .NET MAUI. This skill covers the cross-platform Window lifecycle events, their platform-native mappings, and patterns for preserving state across backgrounding and resume cycles.

catalog/Frameworks/Official-DotNet-MAUI/skills/maui-collectionview/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: maui-collectionview
33
description: "Guidance for implementing CollectionView in .NET MAUI apps — data display, layouts (list & grid), selection, grouping, scrolling, empty views, templates, incremental loading, swipe actions, and pull-to-refresh. USE FOR: \"CollectionView\", \"list view\", \"grid layout\", \"data template\", \"item template\", \"grouping\", \"pull to refresh\", \"incremental loading\", \"swipe actions\", \"empty view\", \"selection mode\", \"scroll to item\", displaying scrollable data, replacing ListView. DO NOT USE FOR: simple static layouts without scrollable data (use Grid or StackLayout), map pin lists (use Microsoft.Maui.Controls.Maps), table-based data entry forms, or non-MAUI list controls."
44
compatibility: "Requires a .NET MAUI project or solution."
55
---
6-
7-
<!-- Imported from upstreams/dotnet-skills/dotnet-maui/skills/maui-collectionview/SKILL.md via vendir. Edit upstream or catalog-sources config, then rerun scripts/import_external_catalog_sources.py. -->
86
# CollectionView — .NET MAUI
97

108
`CollectionView` is the primary control for displaying scrollable lists and grids of data in .NET MAUI. It replaces `ListView` with better performance, flexible layouts, and no `ViewCell` requirement.

0 commit comments

Comments
 (0)