Skip to content

chore: modernize repository AI guidance - #2216

Merged
aaronpowell merged 2 commits into
mainfrom
ai-guidance-modernization
Oct 6, 2026
Merged

aaronpowell merged 2 commits into
mainfrom
ai-guidance-modernization

Conversation

@aaronpowell

Copy link
Copy Markdown
Member

Closes #1575

Fixes: #1575

Our AI customization had drifted: a single long copilot-instructions.md mixed universal rules with narrow task detail, a stale .chatmode.md duplicated the hosting agent, prompt files were personal work-queue helpers rather than shared workflows, and several files pointed at a tests.yml workflow that does not exist. This reorganizes everything into a layered model so each agent session loads the smallest guidance that is actually relevant.

The layering follows GitHub's documented precedence. .github/copilot-instructions.md stays the universal baseline because it has the broadest Copilot surface support, AGENTS.md adds orientation for Copilot CLI/App and non-Copilot agents without duplicating it, and .github/instructions/ holds path-scoped rules for tests/**, examples/**, **/api/*.cs, and .github/workflows/**.

Client integration guidance moved out of the agent file and into a new client-integration-authoring skill. The previous agent encoded one rigid template, which does not match reality: KurrentDB is singleton with keyed registration and health checks, DuckDB is scoped, OllamaSharp is HttpClient plus a fluent builder, and SurrealDb uses SDK-managed registration. The skill is classification-first, so it asks what shape the client actually is before authoring. Both creator agents are now thin roles that delegate to their skill.

Two fixes worth calling out:

  • CI guidance now points at the real .github/workflows/tests.yaml, which builds its matrix dynamically. Contributors no longer need to paste a static list; they just verify discovery with generate-test-list-for-workflow.sh --json.
  • copilot-setup-steps.yml previously only installed gh-aw, so cloud agent sessions started without a usable .NET toolchain. It now installs .NET 8/9/10, resolves the Aspire version from Directory.Build.props, verifies the installed CLI matches, and restores. The steps are inlined rather than reusing setup-runtimes-caching because that composite requires Docker credentials and installs the full polyglot environment, which is too broad for every session.

Repository code-graph tooling discussed in the issue is intentionally out of scope per the decision on the issue thread.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable) - N/A, no shipping code changes
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs - N/A, no API changes
  • Code follows all style conventions

Other information

No shipping code changes, so validation focused on the guidance and workflow files:

  • dotnet restore - passed
  • ./eng/testing/generate-test-list-for-workflow.sh --json - passed, confirming the dynamic matrix guidance is accurate
  • python -c "yaml.safe_load(...)" on copilot-setup-steps.yml - parsed successfully
  • Frontmatter validation across the 9 instruction/agent/skill files - passed
  • git diff --check - clean
  • Repo-wide search for tests.yml, .github/chatmodes, .github/prompts, and the removed prompt names - no remaining references

The removed my-issues and my-pull-requests prompt files were personal work-queue helpers rather than shared engineering workflows, and prompt files are deprecated for Agent Host sessions, so they were deleted rather than migrated. setup.md also picked up small accuracy fixes (.NET 10, Java 21 to match the dev container, and a stale "Aspire 9.1 fix" port-forwarding note).

Restructure Copilot and agent customization into a layered guidance model:
a concise repository baseline, path-specific instructions, reusable skills,
and thin custom agents.

- Add AGENTS.md for cross-agent repository orientation
- Trim .github/copilot-instructions.md to a concise universal baseline
- Add path-specific instructions for tests, examples, generated API
  baselines, and workflows
- Extract client integration guidance into the client-integration-authoring
  skill and reduce both creator agents to thin roles
- Remove the stale chat mode and personal prompt files
- Correct CI guidance to tests.yaml and the dynamic --json test list
- Give the Copilot cloud agent a deterministic .NET and Aspire CLI setup
- Refresh setup docs for .NET 10 and Java 21

Fixes: #1575

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 05:08
@github-actions

github-actions Bot commented Oct 1, 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/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2216

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2216"

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.

Copilot review overview

🟡 Changes recommended

The new agents grant all available tools, while the layered guidance still contains duplicated and contradictory rules.

Review effort: Balanced
Findings: 2 High severity · 2 Low severity

Open (4)
What changed in this PR

Modernizes repository AI guidance into layered instructions, focused skills, and slimmer agents while updating setup and CI documentation.

Changes:

  • Adds repository-wide and path-scoped contributor guidance.
  • Introduces client-integration authoring skills and removes legacy prompts/chat mode.
  • Updates Copilot setup tooling, runtime documentation, and dynamic test-matrix guidance.
File Description
AGENTS.md Adds cross-agent repository orientation.
.github/​copilot-instructions.md Reduces universal Copilot guidance.
.github/​instructions/​workflows.instructions.md Adds workflow-specific guidance.
.github/​instructions/​tests.instructions.md Adds test-specific guidance.
.github/​instructions/​generated-api.instructions.md Protects generated API baselines.
.github/​instructions/​examples.instructions.md Adds example-project guidance.
.github/​workflows/​copilot-setup-steps.yml Installs .NET, Aspire CLI, and dependencies.
.github/​agents/​hosting-integration-creator.agent.md Delegates hosting authoring to skills.
.github/​agents/​client-integration-creator.agent.md Delegates client authoring to its new skill.
.agents/​skills/​client-integration-authoring/​SKILL.md Defines client-integration authoring workflow.
.agents/​skills/​client-integration-authoring/​references/​patterns.md Documents supported client patterns.
.agents/​skills/​client-integration-authoring/​references/​testing-and-documentation.md Documents testing and README expectations.
.agents/​skills/​hosting-integration-authoring/​resources/​testing-and-readmes.md Corrects test-matrix guidance.
docs/​setup.md Updates runtime and port-forwarding setup.
docs/​create-integration.md Documents dynamic test discovery.
.github/​chatmodes/​New Aspire Hosting integration.chatmode.md Removes obsolete hosting chat mode.
.github/​prompts/​my-pull-requests.prompt.md Removes personal PR helper prompt.
.github/​prompts/​my-issues.prompt.md Removes personal issue helper prompt.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/agents/client-integration-creator.agent.md
Comment thread .github/agents/hosting-integration-creator.agent.md
Comment thread .agents/skills/client-integration-authoring/SKILL.md Outdated
Comment thread AGENTS.md

@Odonno Odonno 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.

Let's see how it goes.

Clarify error handling for client construction and improve documentation requirements.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@aaronpowell
aaronpowell enabled auto-merge (squash) October 6, 2026 23:37
@aaronpowell
aaronpowell merged commit 69a155d into main Oct 6, 2026
160 checks passed
@aaronpowell
aaronpowell deleted the ai-guidance-modernization branch October 6, 2026 23:42
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.Bitwarden.SecretManager 52% 38% 36 ❌
CommunityToolkit.Aspire.DuckDB.Api 99% 100% 13 ✔
CommunityToolkit.Aspire.DuckDB.NET.Data 64% 77% 28 ➖
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 36 ✔
CommunityToolkit.Aspire.Hosting.ActiveMQ 88% 48% 58 ✔
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 16% 4% 217 ❌
CommunityToolkit.Aspire.Hosting.Adminer 98% 70% 12 ✔
CommunityToolkit.Aspire.Hosting.Azure.Dapr 29% 5% 35 ❌
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 56% 46% 26 ❌
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 86% 83% 18 ✔
CommunityToolkit.Aspire.Hosting.Azure.Extensions 64% 30% 27 ➖
CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager 59% 51% 700 ❌
CommunityToolkit.Aspire.Hosting.Dapr 45% 25% 443 ❌
CommunityToolkit.Aspire.Hosting.DbGate 97% 62% 12 ✔
CommunityToolkit.Aspire.Hosting.Dbx 92% 59% 22 ✔
CommunityToolkit.Aspire.Hosting.Deno 96% 85% 24 ✔
CommunityToolkit.Aspire.Hosting.DuckDB 98% 90% 10 ✔
CommunityToolkit.Aspire.Hosting.Elasticsearch.Extensions 100% 94% 21 ✔
CommunityToolkit.Aspire.Hosting.Flagd 100% 100% 16 ✔
CommunityToolkit.Aspire.Hosting.Floci 97% 86% 400 ✔
CommunityToolkit.Aspire.Hosting.Floci.ApiService 65% 60% 67 ➖
CommunityToolkit.Aspire.Hosting.Flyway 100% 100% 3 ✔
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 80% 50% 24 ✔
CommunityToolkit.Aspire.Hosting.GoFeatureFlag.ApiService 100% 100% 3 ✔
CommunityToolkit.Aspire.Hosting.Java 87% 75% 164 ✔
CommunityToolkit.Aspire.Hosting.Java.ApiApp 63% 50% 4 ➖
CommunityToolkit.Aspire.Hosting.Java.WebApp 27% 18% 47 ❌
CommunityToolkit.Aspire.Hosting.JavaScript.Extensions 92% 83% 185 ✔
CommunityToolkit.Aspire.Hosting.K3s 76% 58% 263 ➖
CommunityToolkit.Aspire.Hosting.k6 72% 44% 13 ➖
CommunityToolkit.Aspire.Hosting.k6.ApiService 64% 67% 6 ➖
CommunityToolkit.Aspire.Hosting.Keycloak.Extensions 100% 100% 11 ✔
CommunityToolkit.Aspire.Hosting.Kind 91% 79% 530 ✔
CommunityToolkit.Aspire.Hosting.KurrentDB 97% 88% 19 ✔
CommunityToolkit.Aspire.Hosting.LavinMQ 91% 83% 18 ✔
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 16% 4% 217 ❌
CommunityToolkit.Aspire.Hosting.Listmonk 100% 100% 24 ✔
CommunityToolkit.Aspire.Hosting.Logto 73% 67% 24 ➖
CommunityToolkit.Aspire.Hosting.MailPit 92% 100% 13 ✔
CommunityToolkit.Aspire.Hosting.McpInspector 85% 60% 80 ✔
CommunityToolkit.Aspire.Hosting.McpInspector.McpServer 89% 100% 2 ✔
CommunityToolkit.Aspire.Hosting.Meilisearch 95% 80% 29 ✔
CommunityToolkit.Aspire.Hosting.Meilisearch.ApiService 80% 100% 9 ✔
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 88% 81% 18 ✔
CommunityToolkit.Aspire.Hosting.Mosquitto 97% 67% 17 ✔
CommunityToolkit.Aspire.Hosting.MySql.Extensions 94% 88% 36 ✔
CommunityToolkit.Aspire.Hosting.Ngrok 56% 43% 95 ❌
CommunityToolkit.Aspire.Hosting.Ollama 79% 67% 265 ➖
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector 79% 70% 28 ➖
CommunityToolkit.Aspire.Hosting.PapercutSmtp 100% 100% 9 ✔
CommunityToolkit.Aspire.Hosting.Perl 88% 79% 716 ✔
CommunityToolkit.Aspire.Hosting.Posta 98% 80% 78 ✔
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 91% 87% 46 ✔
CommunityToolkit.Aspire.Hosting.PowerShell 76% 59% 83 ➖
CommunityToolkit.Aspire.Hosting.Python.Extensions 46% 31% 44 ❌
CommunityToolkit.Aspire.Hosting.RavenDB 69% 49% 105 ➖
CommunityToolkit.Aspire.Hosting.RavenDB.ApiService 24% 33% 8 ❌
CommunityToolkit.Aspire.Hosting.Redis.Extensions 92% 68% 22 ✔
CommunityToolkit.Aspire.Hosting.RedPanda 99% 75% 46 ✔
CommunityToolkit.Aspire.Hosting.RedPanda.Consumer 69% 83% 10 ➖
CommunityToolkit.Aspire.Hosting.Rust 96% 90% 13 ✔
CommunityToolkit.Aspire.Hosting.RustFs 88% 66% 102 ✔
CommunityToolkit.Aspire.Hosting.SeaweedFS 88% 82% 44 ✔
CommunityToolkit.Aspire.Hosting.Sftp 91% 62% 15 ✔
CommunityToolkit.Aspire.Hosting.Sftp.ApiService 94% 100% 10 ✔
CommunityToolkit.Aspire.Hosting.Solr 100% 100% 15 ✔
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 68% 59% 137 ➖
CommunityToolkit.Aspire.Hosting.Sqlite 99% 93% 21 ✔
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 85% 79% 40 ✔
CommunityToolkit.Aspire.Hosting.Squad 94% 80% 80 ✔
CommunityToolkit.Aspire.Hosting.Squad.ApiApp 63% 16% 28 ➖
CommunityToolkit.Aspire.Hosting.StableDiffusionCpp 55% 47% 82 ❌
CommunityToolkit.Aspire.Hosting.Stripe 50% 17% 117 ❌
CommunityToolkit.Aspire.Hosting.SurrealDb 89% 74% 191 ✔
CommunityToolkit.Aspire.Hosting.SurrealDb.ApiService 52% 38% 440 ❌
CommunityToolkit.Aspire.Hosting.Umami 100% 75% 7 ✔
CommunityToolkit.Aspire.Hosting.Zitadel 97% 86% 27 ✔
CommunityToolkit.Aspire.KurrentDB 97% 95% 25 ✔
CommunityToolkit.Aspire.Logto.Client 53% 62% 38 ❌
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 22 ✔
CommunityToolkit.Aspire.Meilisearch 97% 93% 30 ✔
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 89% 85% 22 ✔
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 70% 73% 109 ➖
CommunityToolkit.Aspire.OllamaSharp 77% 74% 59 ➖
CommunityToolkit.Aspire.Posta 51% 61% 224 ❌
CommunityToolkit.Aspire.RavenDB.Client 89% 73% 67 ✔
CommunityToolkit.Aspire.SeaweedFS.Client 95% 86% 76 ✔
CommunityToolkit.Aspire.Sftp 81% 76% 38 ✔
CommunityToolkit.Aspire.Sqlite.Api 95% 93% 49 ✔
CommunityToolkit.Aspire.SurrealDb 84% 75% 30 ✔
SeaweedFS.ApiService 19% 5% 225 ❌
Summary 75% (15972 / 21203) 57% (4295 / 7518) 7918 ➖

@aaronpowell
aaronpowell deployed to azure-artifacts October 6, 2026 23:47 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
azure-artifacts — eccb4824 Deployed Oct 6, 2026 by aaronpowell via publish-azure-artifacts #4615
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.

Add repository-level code graph support for AI-assisted navigation

3 participants