AKS-Lab-GitHubCopilot
AGENTS.md8 starsChanged 5 months agoMITView on GitHub
Inspired by microsoft/agent-framework/python/AGENTS.md. Read this before you write any code in this repo — whether you are a human, GitHub Copilot, or the Copilot Coding Agent. This repository implements ZavaShop, a multi-agent retail supply-chain demo. It runs on AKS (long-lived orchestrator) and Azure Container Apps (event-driven specialist agents). Agents are built with Microsoft Agent Framework (MAF) and the GitHub Copilot SDK Python provider. Treat every change as production-style: typed, tested, observable. This repo is delivered through GitHub Copilot Custom Agents.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- a2a-loopback-testsSkill
- aca-bicepSkill
- aks-helmSkill
- copilot-sdk-gpt55Skill
- maf-agent-skeletonSkill
- mcp-server-skeletonSkill
- pydantic-contractsSkill
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 9
Treat every change as production-style: typed, tested, observable.
- Very specific: line 32
Hard rule for humans: every code change must be authored by one of the six agents above.
- Very specific: line 36
Python 3.11+: only. Use modern syntax (match, | unions, Self).
- Very specific: line 42
Run uv run poe check (alias for ruff check && ruff format --check && pyright && pytest) before every commit.
- Very specific: line 46
Async-first: Every agent entrypoint is async def.
- Very specific: line 47
Prefer pydantic.BaseModel for any data crossing a process boundary (HTTP, A2A, MCP, queue).
- Very specific: line 68
Every @ai_function tool docstring must contain: a one-line summary, an Args: block, and a Returns: block.
- Distinctive: line 73
Every agent container exposes:
- Very specific: line 95
Never: commit secrets. Use Key Vault → CSI driver on AKS, and secretref on ACA.
- Very specific: line 101
Check .github/instructions/*.instructions.md for the area you are editing.
- Distinctive: line 103
Ask in the PR description — do not silently deviate.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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.
Files
AGENTS.md — House rules for AI coding agents
Inspired by
microsoft/agent-framework/python/AGENTS.md. Read this before you write any code in this repo — whether you are a human, GitHub Copilot, or the Copilot Coding Agent.
1. Project Context
This repository implements ZavaShop, a multi-agent retail supply-chain demo. It runs on AKS (long-lived orchestrator) and Azure Container Apps (event-driven specialist agents). Agents are built with Microsoft Agent Framework (MAF) and the GitHub Copilot SDK Python provider.
Treat every change as production-style: typed, tested, observable.
1.1 How we build: GitHub Copilot Custom Agents
This repo is delivered through GitHub Copilot Custom Agents. Every code change flows through one of the six agents below. Each agent owns a slice of the repo and has its own tools, skills, and refusal rules. Invoke an agent by typing /<name> in Copilot Chat.
| Phase | Agent | Owns | File |
| Requirements | requirements-analyst | specs/*.md | .github/agents/requirements-analyst.agent.md |
| MCP impl | mcp-builder | src/mcp_servers/* | .github/agents/mcp-builder.agent.md |
| Agent impl | agent-builder | src/agents/<specialist>/* | .github/agents/agent-builder.agent.md |
| Orchestration | orchestrator-architect | src/agents/orchestrator/*, src/shared/*, docker-compose.yml | .github/agents/orchestrator-architect.agent.md |
| Tests | test-author | tests/** | .github/agents/test-author.agent.md |
| Deploy | deploy-engineer | infra/**, .github/workflows/** | .github/agents/deploy-engineer.agent.md |
Workflow prompts that chain the agents live in .github/prompts/:
feature-from-issue.prompt.md— issue → spec → code → tests → PR → deploy.spec-to-code.prompt.md— drive an existing spec through code + tests.ship-it.prompt.md— roll the current SHA to ACR + ACA + AKS.
Shared, agent-agnostic knowledge lives in .github/skills/<skill>/SKILL.md (inspired by the agent-framework Python skills layout). Every agent lists which skills it must consult before writing code.
Hard rule for humans: every code change must be authored by one of the six agents above. Pick the agent whose Owns cell matches the path you are touching, and invoke it with /<name>.
2. Languages & Tooling
- Python 3.11+ only. Use modern syntax (
match,|unions,Self). - Package manager:
uv(uv sync,uv run,uv add). - Lint + format:
ruff(config inpyproject.toml). Line length 120. - Type-check:
pyrightinstrictmode forsrc/. - Tests:
pytest+pytest-asyncio. Coverage target ≥ 80% forsrc/agents/*.
Run uv run poe check (alias for ruff check && ruff format --check && pyright && pytest) before every commit.
3. Code style
- Async-first. Every agent entrypoint is
async def. Never call blocking I/O from agent code — wrap inasyncio.to_threadif you must. - Prefer
pydantic.BaseModelfor any data crossing a process boundary (HTTP, A2A, MCP, queue). - Public functions need type hints. No
Anyunless commented# noqa: ANN401 — reason. - Logging via
structlogonly. Noprint. Every agent emitsagent.name,agent.run_id,agent.span_idfields. One agent = one folder under
src/agents/<agent_name>/with this layout:src/agents/<agent_name>/ ├── __init__.py ├── agent.py # build_agent() factory returning a MAF ChatAgent ├── tools.py # @ai_function tools the agent owns ├── prompts.py # SYSTEM_PROMPT constant + few-shots ├── server.py # FastAPI / A2A server entrypoint └── tests/
4. Agent rules
- All agents (orchestrator and specialists) use the GitHub Copilot SDK provider (
GitHubCopilotChatClient) withmodel="gpt-5.5". No other model or provider is permitted in this repo. - The GitHub token used by the Copilot SDK is mounted via Workload Identity Federation (AKS) or Key Vault →
secretref(ACA). Never read it from a checked-in file. - Specialist agents communicate via A2A (HTTP) — never import each other's Python modules.
- Tools that touch external systems (DB, supplier API) live in a MCP server, not inline in the agent. Agents consume them via
MCPStreamableHTTPTool. - Every
@ai_functiontool docstring must contain: a one-line summary, anArgs:block, and aReturns:block. Copilot uses these as the model-facing description.
5. Kubernetes & ACA conventions
- Container images:
acr.azurecr.io/zavashop/<agent>:<git-sha>. No:latestin any manifest. - Every agent container exposes:
GET /healthz— liveness, returns 200 if the chat client init succeededGET /readyz— readiness, returns 200 once MCP tools are connectedPOST /invoke— A2A endpoint (PydanticInvokeRequest/InvokeResponse)
- Workload Identity for Azure auth — no client secrets in env vars. Use
DefaultAzureCredential. - AKS manifests live in
infra/aks/helm/(one Helm chart, one values file per agent). - ACA manifests live in
infra/aca/asbicepmodules. Scale rule:kedaHTTP, min 0, max 10.
6. Tests
- Unit tests mock the model with
agent_framework.testing.MockChatClient. - Integration tests run two agents over a real loopback A2A connection (
httpx.AsyncClient(transport=ASGITransport(...))). - Eval suite (
tests/evals/) uses the MAFevalsrunner against a golden dataset of supply-chain scenarios.
7. Commits & PRs
- Conventional commits (
feat:,fix:,chore(infra):…). - A PR may only touch one of
{src/agents/*, src/mcp_servers/*, infra/*, labs/*}. Cross-cutting changes need an issue first. - The GitHub Copilot Coding Agent is allowed to open PRs against
src/andtests/only — never againstinfra/without human review.
8. Secrets
- Never commit secrets. Use Key Vault → CSI driver on AKS, and
secretrefon ACA. - The only env var carrying credentials is
AZURE_CLIENT_ID(Workload Identity).
9. When in doubt
- Re-read this file.
- Check
.github/instructions/*.instructions.mdfor the area you are editing. - Run
uv run poe check. - Ask in the PR description — do not silently deviate.
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
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.

