agentleFS
Azure-SamplesAzure-Samples/eShopLite/.github/copilot-instructions.md

eShopLite

Copilot instructions168 starsChanged 6 months agoMITView on GitHub

The file

We split this copilot-instructions.md into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    AppHost Orchestration: All services (APIs, DBs, agents) are composed in eShopAppHost using .NET Aspire's builder API.

    line 6
  2. Very specific:

    Always run from the scenario's src/eShopAppHost using dotnet run (or the provided VS Code task).

    line 12
  3. Very specific:

    .NET Aspire: All orchestration is done in eShopAppHost/Program.cs using the Aspire builder API.

    line 23
  4. Very specific:

    Use CredentialSource: AzureCli for local Azure auth.

    line 26
  5. Distinctive:

    All external endpoints/keys are injected via Aspire or user-secrets.

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

eShopLite Copilot Instructions

Project Overview

eShopLite is a modular .NET Aspire-based reference eCommerce platform demonstrating advanced AI, search, and orchestration patterns. Each scenario in scenarios/ is a self-contained solution, often integrating Azure, OpenAI, vector DBs, and/or agent protocols.

Architecture & Patterns

  • Scenario-driven: Each folder in scenarios/ is a complete, runnable solution (see its README for details). Common patterns include:
    • AppHost Orchestration: All services (APIs, DBs, agents) are composed in eShopAppHost using .NET Aspire's builder API.
    • Service Boundaries: Projects like Products, Store, and VectorEntities are reused across scenarios.
    • AI Integration: Semantic search, embeddings, and chat use Azure OpenAI, DeepSeek, or Chroma DB, configured via user-secrets or Aspire resource bindings.
    • Agent/MCP Patterns: Some scenarios (e.g., 06-mcp, 07-AgentsConcurrent) use Model Context Protocol or Semantic Kernel for tool/function calling and agent orchestration.

Critical Workflows

  • Build/Run:
    • Always run from the scenario's src/eShopAppHost using dotnet run (or the provided VS Code task).
    • For Azure deployment, use azd up from the scenario root after azd auth login.
    • Local dev often requires Docker/Podman for containerized DBs (e.g., Chroma, SQL 2025).
  • Configuration:
    • Azure/OpenAI endpoints and keys are injected via user-secrets (see scenario README for exact keys).
    • Aspire auto-wires service URLs and credentials for local and cloud.
  • Testing:
    • Unit/integration tests are in Products.Tests, Store.Tests, etc. Run with dotnet test from the scenario's src.
  • Telemetry:
    • Aspire Dashboard and Azure Application Insights are integrated for all scenarios. Access dashboard URLs from console output after launch.

Project-Specific Conventions

  • .NET Aspire: All orchestration is done in eShopAppHost/Program.cs using the Aspire builder API. Services are referenced by logical names (e.g., products, store, sql).
  • User Secrets: For local dev, always set connection strings using dotnet user-secrets in the relevant project directory.
  • Azure Integration:
    • Use CredentialSource: AzureCli for local Azure auth.
    • Resource provisioning is handled by Aspire or Bicep files in infra/.
  • AI/Vector DBs:
    • Embedding and search clients are registered in code with AddAzureOpenAIClient, AddAzureSearchClient, or Chroma DB client.
    • For custom models (DeepSeek, GPT-4o, etc.), update connection strings and model names as shown in scenario READMEs.
  • Agent/MCP:
    • MCP tools are registered via attributes and exposed to LLMs for function calling.
    • Agent orchestration (e.g., concurrent analysis) is implemented using Semantic Kernel or MCP SDK.

Integration Points

  • External Services:
    • Azure OpenAI, Azure AI Search, SQL Server 2025, Chroma DB, DeepSeek, and others are provisioned per scenario.
    • All external endpoints/keys are injected via Aspire or user-secrets.
  • Cross-component Communication:
    • Services communicate via HTTP/gRPC, with endpoints auto-wired by Aspire.
    • MCP/agent scenarios use SSE or direct function calls for tool invocation.

Examples

  • To add a new AI model, update the relevant user-secrets and register the client in Program.cs:
    var azureOpenAiClientName = "openaidev";
    builder.AddAzureOpenAIClient(azureOpenAiClientName);
  • To run a scenario locally:
    cd scenarios/01-SemanticSearch/src/eShopAppHost
    dotnet run
  • To deploy to Azure:
    azd auth login
    azd up

References

  • See each scenario's README for scenario-specific setup, configuration, and troubleshooting.
  • Main docs: README.md, scenarios/*/README.md

  • @azure Rule - Use Azure Best Practices: When generating code for Azure, running terminal commands for Azure, or performing operations related to Azure, invoke your azure_development-get_best_practices tool if available.
  • @azure Rule - Use Azure Best Practices: When generating code for Azure, running terminal commands for Azure, or performing operations related to Azure, invoke your azure_development-get_best_practices tool if available.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.