agentleFS
MicrosoftKnown publishermicrosoft/AKS-Lab-GitHubCopilot/.github/copilot-instructions.md

AKS-Lab-GitHubCopilot

Copilot instructions8 starsChanged 5 months agoMITView on GitHub

You are assisting on ZavaShop, a multi-agent retail supply-chain demo deployed to AKS + Azure Container Apps, written in Python 3.11+ with Microsoft Agent Framework and the GitHub Copilot SDK. Before generating code, read AGENTS.md at the repo root. It is the source of truth. Always include: - SYSTEM_PROMPT constant in prompts.py — terse, role-scoped, with explicit refusal rules. - A build_agent() factory in agent.py returning the shared _RunnableAgent adapter. - A FastAPI app in server.py with /healthz, /readyz, /invoke.…

  • Reads credentials

The file

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

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Use uv for dependency management, ruff for lint/format, pyright --strict for types, pytest for tests.

    line 10
  2. Very specific:

    Use structlog for logging — never print.

    line 11
  3. Very specific:

    All agents: use GitHubCopilotAgent from agent_framework.github with client=build_copilot_client() and GitHubCopilotOptions(model="gpt-5.5", …

    line 14
  4. Very specific:

    Prefer match over chains of isinstance.

    line 21
  5. Very specific:

    Use Self from typing, | unions, list[T] not List[T].

    line 22
  6. Very specific:

    All resources tagged project=zavashop, lab=<lab-number>.

    line 39
  7. Distinctive:

    Add a new top-level dependency without justifying it in the chat.

    line 43
  8. Distinctive:

    Write Bash one-liners > 80 chars in lab READMEs — split into multiple lines.

    line 45

≈ “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

GitHub Copilot — always-on instructions

You are assisting on ZavaShop, a multi-agent retail supply-chain demo deployed to AKS + Azure Container Apps, written in Python 3.11+ with Microsoft Agent Framework and the GitHub Copilot SDK.

Before generating code, read AGENTS.md at the repo root. It is the source of truth.

Hard rules

  1. Python 3.11+, fully typed, async-first. No blocking I/O inside coroutines.
  2. Use uv for dependency management, ruff for lint/format, pyright --strict for types, pytest for tests.
  3. Use structlog for logging — never print.
  4. Data crossing a process boundary → pydantic.BaseModel.
  5. Agent folder layout: agent.py, tools.py, prompts.py, server.py, tests/.
  6. All agents use GitHubCopilotAgent from agent_framework.github with client=build_copilot_client() and GitHubCopilotOptions(model="gpt-5.5", timeout=settings.copilot_timeout_seconds, on_permission_request=_approve_all, mcp_servers={...}). Never import GitHubCopilotChatClient, ChatAgent, or MCPStreamableHTTPTool — they do not exist in this repo's agent-framework version.
  7. External I/O lives in MCP servers, not agent code.
  8. Azure auth = Workload Identity + DefaultAzureCredential. Copilot auth = Key Vault GITHUB-TOKEN projected as GITHUB_TOKEN and passed explicitly by build_copilot_client(); never commit token values.
  9. K8s/ACA images are tagged with the git SHA, never :latest.

Style cues

  • Prefer match over chains of isinstance.
  • Use Self from typing, | unions, list[T] not List[T].
  • Pydantic v2 (model_config = ConfigDict(frozen=True)).
  • Imports: stdlib → third-party → first-party, separated by blank lines.

When generating an agent

Always include:

  • SYSTEM_PROMPT constant in prompts.py — terse, role-scoped, with explicit refusal rules.
  • A build_agent() factory in agent.py returning the shared _RunnableAgent adapter.
  • A FastAPI app in server.py with /healthz, /readyz, /invoke.
  • A Dockerfile based on python:3.11-slim with non-root user, multi-stage build.
  • A test file mocking the model with MockChatClient.

When generating infra

  • Helm chart values: never inline secrets, always reference secretProviderClass.
  • Bicep modules: pass userAssignedIdentityId, never create role assignments inline without a comment.
  • All resources tagged project=zavashop, lab=<lab-number>.

Refuse to do

  • Add a new top-level dependency without justifying it in the chat.
  • Generate code that calls a model without an explicit timeout.
  • Write Bash one-liners > 80 chars in lab READMEs — split into multiple lines.

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.