|
| 1 | +--- |
| 2 | +name: winget-removal |
| 3 | +description: Use AI Agents to remove a group of WinGet Manifests in batch |
| 4 | +--- |
| 5 | + |
| 6 | +# winget-removal |
| 7 | + |
| 8 | +Instructions for the agent to follow when this skill is activated. |
| 9 | + |
| 10 | +## When to use |
| 11 | + |
| 12 | +When user ask for removing a (group of) WinGet manifests, the skill should be automatically called for performing the batch removal. |
| 13 | + |
| 14 | +## Prerequisites |
| 15 | + |
| 16 | +1. Make sure if `winget.exe` is installed on user's device. |
| 17 | +2. Since this repository is huge and full of tiny YAML files, _Sparse Checkout_ feature of Git might enabled. Detect this by checking Git repository-level and global-level settings. |
| 18 | +3. If the _Sparse Checkout_ is enabled. Make sure manifest files are available under `manifests` folder (maybe stored in recursive sub-folders) before invoking the removal script. |
| 19 | + - If those manifests are already available on disk, **DO NOT EDIT** sparse checkout folder list. |
| 20 | + - If those manifests aren't available to you, you're permitted to edit `.git/info/sparse-checkout` folder list relative to the repository root folder. |
| 21 | + - After any changes of the list, perform `git sparse-checkout reapply` to apply the changes. |
| 22 | + |
| 23 | +## Instructions |
| 24 | + |
| 25 | +1. Inspect package identifier of package name from user's prompt, as `<keyword>` here. |
| 26 | +3. Get all available versions via `winget.exe search -s winget <keyword>` |
| 27 | + - If user explicitly say it's a package identifier, first try adding `--id` switch before `<keyword>` for searching. |
| 28 | + - For above sub-rules failed, or you get an empty response, try without adding extra switches. |
| 29 | + - If searched package identifier **ISN'T EXACTLY MATCH** what was been inferred by user, pause and ask for user's clarification. |
| 30 | +4. Check which version(s) user want to remove. |
| 31 | + 1. If he/she didn't explicitly mentioned, pause here and ask for clear instructions. **DO NOT ACT WITHOUT KNOWING EXPLICITLY VERSION RANGE!** |
| 32 | + 2. If user provide a fuzzy natural language "version range", try map it to exact array of versions. |
| 33 | +5. Invoke `Remove-Package.ps1` for actual removal. |
| 34 | + - The PowerShell script is stored at `./templates/Remove-Package.ps1`, **relative to this Markdown file**. |
| 35 | + - Pass `-PackageIdentifier` string for telling with package to remove. |
| 36 | + - Pass `-Versions` array for telling exact versions to remove. |
| 37 | + - Pass `-IssueId` integer to link the pull request to a known issue. |
| 38 | + - Pass `-Assistant` with AI agent specific attribution. |
| 39 | + |
| 40 | +## AI agent specific attribution guidelines |
| 41 | + |
| 42 | +> ### Attribution |
| 43 | +> |
| 44 | +> When AI tools contribute to the repository, proper attribution helps track the evolving role of AI in the manifest maintenance process. Contributions should include an `Assisted-by` tag in the following format: |
| 45 | +> |
| 46 | +> ```txt |
| 47 | +> Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2] |
| 48 | +> ``` |
| 49 | +> |
| 50 | +> Where: |
| 51 | +> |
| 52 | +> - `AGENT_NAME` is the name of the AI tool or framework |
| 53 | +> - `MODEL_VERSION` is the specific model version used |
| 54 | +> - `[TOOL1] [TOOL2]` are optional specialized analysis tools used (e.g., `Komac`, `Sundry`, `WinGetCreate`, `YamlCreate`) |
| 55 | +> |
| 56 | +> Basic tools (`git`, editors) **SHOULD NOT** be listed. |
0 commit comments