agentleFS
MicrosoftKnown publishermicrosoft/MicroHack/03-Azure/01-04-AI/08_Predictive_Maintenance/.github/copilot-instructions.md

MicroHack / 08_Predictive_Maintenance

Copilot instructions220 starsChanged 7 days agoMITView on GitHub

This repo is used for a workshop/exercise. If such folders exist in the workspace, treat them as off-limits. This workshop must work reliably with smaller models (e.g., GPT-5-mini). Follow these constraints: Add brief comments explaining C#-specific idioms: - ?? and ??= operators (null coalescing) - Primary constructors - await using (like Python's async with)

The file

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

11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Use the Foundry Agents SDK pattern (Azure.AI.Projects + Microsoft.Agents.AI), not direct ChatCompletions.

    line 10
  2. Distinctive:

    If such folders exist in the workspace, treat them as off-limits.

    line 20
  3. Distinctive:

    Ask clarifying questions only when required.

    line 23
  4. Distinctive:

    Prefer small, verifiable changes.

    line 25
  5. Distinctive:

    Prefer producing a small number of complete files per request (1-3) over partial snippets

    line 32
  6. Distinctive:

    Keep responses structured: What you will change, Files, How to run/verify

    line 33
  7. Distinctive:

    Avoid optional extras unless explicitly requested (no extra abstractions, no extra models)

    line 34
  8. Distinctive:

    When uncertain, state assumptions explicitly and proceed with a safe default

    line 35
  9. Distinctive:

    Always use these exact NuGet package versions:

    line 38
  10. Very specific:

    Use the hardcoded mappings from .github/agents/agentplanning.agent.md - implement as in-memory dictionaries in FaultMappingService.

    line 59
  11. Distinctive:

    Add brief comments explaining C#-specific idioms:

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 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

Copilot custom instructions (workshop mode)

This repo is used for a workshop/exercise.

Key goal

Help the developer build the solution from context and instructions, not by copying an existing completed implementation.

Source of truth

  • For Challenge 3 (Repair Planner), follow the agent guidance in .github/agents/agentplanning.agent.md.
  • Use the Foundry Agents SDK pattern (Azure.AI.Projects + Microsoft.Agents.AI), not direct ChatCompletions.

Do not use solution code as a template

Unless the user explicitly asks to reveal or compare with a solution, do not open, reference, or reuse code from any folder intended to contain completed answers, for example:

  • walkthrough/**/RepairPlanner/**
  • walkthrough/**
  • **/*solution*/**
  • **/*Solution*/**
  • **/reference/**

If such folders exist in the workspace, treat them as off-limits.

How to proceed instead

  • Ask clarifying questions only when required.
  • Implement incrementally in the exercise project.
  • Prefer small, verifiable changes; keep logging helpful.

Smaller-model friendly (CRITICAL)

This workshop must work reliably with smaller models (e.g., GPT-5-mini). Follow these constraints:

Output constraints

  • Prefer producing a small number of complete files per request (1-3) over partial snippets
  • Keep responses structured: What you will change, Files, How to run/verify
  • Avoid optional extras unless explicitly requested (no extra abstractions, no extra models)
  • When uncertain, state assumptions explicitly and proceed with a safe default

Pinned versions (Challenge 3)

Always use these exact NuGet package versions:

  • Azure.AI.Projects → 2.1.0-beta.4
  • Azure.Identity → 1.21.0
  • Microsoft.Agents.AI → 1.20.0
  • Microsoft.Agents.AI.Foundry → 1.20.0-preview.260831.1
  • Microsoft.Extensions.AI → 10.9.0
  • Microsoft.Extensions.AI.Abstractions → 10.9.0
  • Microsoft.Azure.Cosmos → 3.63.0
  • Microsoft.Extensions.DependencyInjection → 10.0.12
  • Microsoft.Extensions.Logging → 10.0.12
  • Microsoft.Extensions.Logging.Console → 10.0.12
  • Newtonsoft.Json → 13.0.4

Environment variables (Challenge 3)

  • AZURE_AI_PROJECT_ENDPOINT
  • MODEL_DEPLOYMENT_NAME
  • COSMOS_ENDPOINT
  • COSMOS_KEY
  • COSMOS_DATABASE_NAME

Fault→skills/parts mappings

Use the hardcoded mappings from .github/agents/agentplanning.agent.md - implement as in-memory dictionaries in FaultMappingService.

Code style for Python developers

Add brief comments explaining C#-specific idioms:

  • ?? and ??= operators (null coalescing)
  • Primary constructors
  • await using (like Python's async with)

What NOT to do

  • ❌ Don't use Azure.AI.Inference / ChatCompletionsClient - use Foundry Agents SDK
  • ❌ Don't generate partial code snippets - generate complete files
  • ❌ Don't add extra abstractions not in the spec
  • ❌ Don't use different package versions than specified

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.