Skip to content

Warn about local Aspire skills in aspire doctor - #21783

Merged
Ella Hathaway (ellahathaway) merged 7 commits into
mainfrom
ellahathaway-maintain-agent-registrations-e62
Nov 5, 2026
Merged

Ella Hathaway (ellahathaway) merged 7 commits into
mainfrom
ellahathaway-maintain-agent-registrations-e62

Conversation

@ellahathaway

@ellahathaway Ella Hathaway (ellahathaway) commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Static Aspire skill files can take precedence over skills supplied by agent plugins. aspire doctor now points out those files and suggests deleting them, then running aspire agent init --skills aspire.

The check uses the same discovery as aspire agent init and checks both project and global locations. It only reports what it finds: it does not delete files, create backups, change registrations, or install skills.

Both output formats share the same warning message and files list, using workspace-relative and ~/ paths with absolute fallback outside both roots. JSON keeps metadata.workspaceRoot as context. There is no separate details field or repeated file list for this warning.

Related to #19726. Depends on #21769.

Examples

Terminal warning, from the output regression snapshot:

AppHost
  🚨 Local Aspire skill files may override plugin skills
       Delete these files, then run 'aspire agent init --skills aspire'.
       Files:
         .agents/skills/aspire/SKILL.md
         ~/.agents/skills/aspire/SKILL.md

The matching JSON check, with an example workspace root:

{
  "category": "apphost",
  "name": "aspire-skill-sources",
  "status": "warning",
  "message": "Local Aspire skill files may override plugin skills",
  "fix": "Delete these files, then run 'aspire agent init --skills aspire'.",
  "files": [
    ".agents/skills/aspire/SKILL.md",
    "~/.agents/skills/aspire/SKILL.md"
  ],
  "metadata": {
    "workspaceRoot": "C:\\Users\\dev\\src\\my-app"
  }
}

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21783

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21783"

@github-actions

This comment has been minimized.

@ellahathaway Ella Hathaway (ellahathaway) added this to the 17.0 milestone Nov 5, 2026
@github-actions

This comment has been minimized.

Base automatically changed from ellahathaway-plugin-setup-feedback to main November 5, 2026 16:53
Report project and global static skill copies without modifying them. Reuse agent-init wording and display paths, and keep structured JSON paths separate from terminal details.

Co-authored-by: Copilot App <[email protected]>
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The tests explicitly register AspireSkillsCheck and omit a packaged-CLI scenario from a repository subdirectory, leaving production registration and repository-root skill discovery unverified.

1 open issue
1 file not reviewed
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file
What changed in this PR

Adds a read-only aspire doctor warning for static Aspire skill files that may override agent plugin skills, reusing discovery from aspire agent init.

Changes:

  • Detects project and global skill files and provides cleanup guidance.
  • Adds shared file lists to terminal and JSON output, with consistent path formatting.
  • Adds focused tests, output snapshots, and localization resources.
File Description
tests/​Aspire.Cli.Tests/​Utils/​CliTestHelper.cs Registers the check in shared test services.
tests/​Aspire.Cli.Tests/​Utils/​AspireSkillsCheckTests.cs Tests discovery, inspection failures, cancellation, and file preservation.
tests/​Aspire.Cli.Tests/​Snapshots/​DoctorCommandTests.DoctorCommand_Json_IncludesStaticSkillsGuidance.verified.json Captures the JSON warning contract.
tests/​Aspire.Cli.Tests/​Snapshots/​DoctorCommandTests.DoctorCommand_HumanReadable_IncludesStaticSkillsGuidance.verified.txt Captures terminal warning output.
tests/​Aspire.Cli.Tests/​Commands/​DoctorCommandTests.cs Tests warning output in both formats.
tests/​Aspire.Cli.Tests/​Agents/​AgentPathTests.cs Tests workspace, home, and absolute display paths.
src/​Aspire.Cli/​Utils/​EnvironmentChecker/​EnvironmentCheckResult.cs Adds an optional structured file list.
src/​Aspire.Cli/​Utils/​EnvironmentChecker/​AspireSkillsCheck.cs Implements read-only skill discovery and warnings.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.zh-Hant.xlf Updates Traditional Chinese localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.zh-Hans.xlf Updates Simplified Chinese localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.tr.xlf Updates Turkish localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.ru.xlf Updates Russian localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.pt-BR.xlf Updates Brazilian Portuguese localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.pl.xlf Updates Polish localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.ko.xlf Updates Korean localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.ja.xlf Updates Japanese localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.it.xlf Updates Italian localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.fr.xlf Updates French localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.es.xlf Updates Spanish localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.de.xlf Updates German localization entries.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.cs.xlf Updates Czech localization entries.
src/​Aspire.Cli/​Resources/​DoctorCommandStrings.resx Adds warning strings and shortens migration guidance.
src/​Aspire.Cli/​Resources/​DoctorCommandStrings.Designer.cs Synchronizes resource accessors and documentation.
src/​Aspire.Cli/​Program.cs Registers the new environment check.
src/​Aspire.Cli/​Commands/​DoctorCommand.cs Renders associated file lists in terminal output.
src/​Aspire.Cli/​Commands/​AgentInitCommand.cs Uses the shared path-display helper.
src/​Aspire.Cli/​Agents/​AgentPath.cs Centralizes workspace-relative and home-relative path formatting.

Review effort: Balanced

@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Existing tests bypass production registration and Git-root discovery, leaving the new doctor warning without packaged-CLI end-to-end coverage for terminal and JSON output.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Add doctor E2E coverage for static skill warnings

src/​Aspire.Cli/​Program.cs:686

The new doctor snapshots manually register AspireSkillsCheck, so they would still pass if this production registration were missing. The updated E2E scenario only runs agent init; no packaged-CLI test exercises the new doctor warning. Please add a doctor E2E scenario with project-local and global static skills that verifies both terminal and JSON output, including the shared file list and unchanged files.

2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

Cover Git-root discovery from a nested directory, text and JSON output, display paths, and preservation of local and global skill files.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: b0dbbde1-69ad-48f0-acf6-9b8a33672808
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the read-only static-skill warning added to aspire doctor.

No open issues 🎉

1 resolved since last review
2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

Replace duplicate output snapshots with targeted warning, path, and JSON assertions. Existing unit snapshots retain formatting coverage.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: b0dbbde1-69ad-48f0-acf6-9b8a33672808
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review reports no active issues with the read-only static-skill warning change.

No open issues 🎉

2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Tests selector

3 / 101 PR test projects · 4 PR jobs, from 44 changed files.

Selected PR test projects (3 / 101)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests, Infrastructure.Tests

Selected PR jobs (4)

cli-starter-validation, extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

📦 affected project Aspire.Cli
→ 1 test: Aspire.Cli.EndToEnd.Tests

🔧 src/Aspire.Cli/Resources/AgentCommandStrings.resx (changed source)
→ 1 directly: Infrastructure.Tests

🔧 src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs (changed source)
→ 1 via the project graph: Aspire.Cli.EndToEnd.Tests

🔧 src/Aspire.Cli/Resources/DoctorCommandStrings.resx (changed source)
→ 1 directly: Infrastructure.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/AgentCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/DoctorCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.Tests/Agents/AgentPathTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/DoctorCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Snapshots/DoctorCommandTests.DoctorCommand_HumanReadable_IncludesStaticSkillsGuidance.verified.txt (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Snapshots/DoctorCommandTests.DoctorCommand_Json_IncludesStaticSkillsGuidance.verified.json (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Utils/AspireSkillsCheckTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Utils/CliTestHelper.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Cli
extension-e2e • src/Aspire.Cli/Agents/AgentPath.cs, src/Aspire.Cli/Commands/AgentInitCommand.cs, src/Aspire.Cli/Commands/DoctorCommand.cs, src/Aspire.Cli/Program.cs, src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs, src/Aspire.Cli/Resources/AgentCommandStrings.resx, src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs, src/Aspire.Cli/Resources/DoctorCommandStrings.resx, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.cs.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.de.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.es.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.fr.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.it.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.ja.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.ko.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.pl.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.pt-BR.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.ru.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.tr.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.zh-Hans.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.zh-Hant.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.cs.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.de.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.es.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.fr.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.it.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.ja.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.ko.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.pl.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.pt-BR.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.ru.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.tr.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.zh-Hans.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.zh-Hant.xlf, src/Aspire.Cli/Utils/EnvironmentChecker/AspireSkillsCheck.cs, src/Aspire.Cli/Utils/EnvironmentChecker/EnvironmentCheckResult.cs
• affected project Aspire.Cli
polyglot affected project Aspire.Cli
typescript-api-compat affected project Aspire.Cli

Selection computed for commit 33bc425.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the read-only static-skill warning change.

No open issues 🎉

2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@ellahathaway
Ella Hathaway (ellahathaway) merged commit 543b840 into main Nov 5, 2026
425 of 432 checks passed
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #2063

Generated by PR Documentation Check · copilot · auto · 26.8 AIC · ⌖ 1.25 AIC · ⊞ 7.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#2063 targeting release/17.0.

Documented the new aspire-skill-sources warning in aspire doctor (table and JSON output) in aspire-doctor.mdx. Signals: cli_command_file_changed (DoctorCommand.cs, AgentInitCommand.cs), cli_resource_strings_changed (DoctorCommandStrings.resx), pr_body_has_cli_flag_mention (aspire agent init --skills aspire).

Note

This draft PR needs human review before merging.

David Pine (IEvangelist) pushed a commit to microsoft/aspire.dev that referenced this pull request Nov 17, 2026
## Summary

<!-- Describe what this pull request changes and why. -->

Documents the `aspire doctor` warning for static Aspire skill copies
from microsoft/aspire#21783, updated for the cleanup behavior in
microsoft/aspire#22080.

- Show the warning in the Environment category and describe opt-in
removal through `aspire agent init`.
- Update the table and JSON examples to use the new messages and
`details` field.

The CLI change is being backported to `release/17.0`. Related agent
initialization documentation: #2146.

## Third-party links and affiliations

<!--
List any third-party links added or changed by this pull request and
disclose any
material affiliation with the linked organizations, such as employment,
sponsorship, or ownership. Write "None" if this pull request doesn't add
or
change third-party links.
-->

None.

## Validation

<!-- List the checks you ran or explain why validation isn't needed. -->

- `git diff --check HEAD^ HEAD`: passed.
- Compared the table and JSON examples with the upstream CLI test
snapshots: matched.
- Local site preview not run: Bun and frontend dependencies are not
installed.

> Generated by [PR Documentation
Check](https://github.com/microsoft/aspire/actions/runs/42115248845) for
#21783 · copilot · auto · 26.8 AIC · ⌖ 1.25 AIC · ⊞ 7.4K ·
[◷](https://github.com/search?q=repo%3Amicrosoft%2Faspire.dev+%22gh-aw-workflow-id%3A+pr-docs-check%22&type=pullrequests)

<!-- gh-aw-agentic-workflow: PR Documentation Check, engine: copilot,
model: auto, id: 42115248845, workflow_id: pr-docs-check, run:
https://github.com/microsoft/aspire/actions/runs/42115248845 -->

<!-- gh-aw-workflow-id: pr-docs-check -->
<!-- gh-aw-workflow-call-id: microsoft/aspire/pr-docs-check -->

---------

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Ella Hathaway <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants