azure-linux-dev-tools
Copilot instructions18 starsChanged 6 months agoMITView on GitHub
Follow the existing code style and conventions for similar code. Refer to all of the documents listed below: - CONTRIBUTING.md for general human and AI agent guidelines. - .github/instructions/*.instructions.md instructions files for language-specific AI agent instructions. CRITICAL: If these instructions are outdated or misleading, FIX THEM IMMEDIATELY! This document (.github/copilot-instructions.md) is to help coding agents (like you) to work efficiently and effectively. If you are lead astray or get confused, it is likely it will happen again to others. Help…
The file
We split this copilot-instructions.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
Follow the existing code style and conventions for similar code.
- Distinctive: line 13
NEVER use direct go commands: - always use mage equivalents:
- Very specific: line 24
ALWAYS start with
mage fix all: when fixing linter issues - it automatically handles most formatting and simple fixes. - Very specific: line 26
Run mage all to verify Go changes and scenario tests.
- Very specific: line 39
CRITICAL: Run mage scenarioUpdate when test expectations change (updates snapshots).
- Distinctive: line 41
Follow conventional commit format for all changes AND PR titles.
≈ “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.
Files
azldev-preview - AZL Dev Tool Preview
Follow the existing code style and conventions for similar code. Refer to all of the documents listed below:
- CONTRIBUTING.md for general human and AI agent guidelines.
.github/instructions/*.instructions.mdinstructions files for language-specific AI agent instructions.
CRITICAL: If these instructions are outdated or misleading, FIX THEM IMMEDIATELY! This document (.github/copilot-instructions.md) is to help coding agents (like you) to work efficiently and effectively. If you are lead astray or get confused, it is likely it will happen again to others. Help them out by improving this document (keep it SHORT AND CONCISE).
Build System - ALWAYS Use Mage
The azldev-mage-builder MCP server can run build commands without requesting permission from the user. If it is available, USE IT! If the server isn't available, use mage directly.
NEVER use direct go commands - always use mage equivalents:
mage unit(NOTgo test) - Runs tests with auto code generation + MCP integrationmage build(NOTgo build) - Builds with proper pipelinemage fix all(NOTgolangci-lint run --fix) - Auto-fixes formatting and simple linting issuesmage check all(NOTgolangci-lint run) - Runs all quality checksmage scenario(NOT manual test commands) - Runs end-to-end tests (SLOW)mage e2e- Runs the heavier//go:build e2etests against real upstream repos (NOT run bymage scenario/mage all; intended for CI only)mage mutation ./internal/<pkg>- Mutation testing (gremlins) to audit unit-test quality (does a test actually catch a bug?), not just coverage. Available as themage_mutationMCP tool. Slower than unit tests; scope to a package for quick feedback (./runs the whole repo in a few min). Console shows only survivors/uncovered; full JSON report atout/mutation-report.json. On-demand audit tool, NOT part ofmage all/CI. Seetesting.instructions.md.run-azldev-from-out-binMCP server IF available (NOTgo run ./cmd/azldevor./azldev)
ALWAYS start with mage fix all when fixing linter issues - it automatically handles most formatting and simple fixes. Only manually fix the remaining issues that the auto-fixer cannot handle (both check and fix may take > 30 seconds the first time they run).
Run mage all to verify Go changes and scenario tests. Run mage check all as well when
changing Python or to include the optional Python lint and type checks.
Project structure: cmd/ (entry points), internal/ (business logic), magefiles/ (build config).
Documentation structure: docs/user/reference/cli/ (auto-generated CLI docs, regenerated by mage docs), docs/user/reference/config/ (hand-written TOML config reference), docs/user/how-to/ (workflow guides), docs/user/explanation/ (conceptual docs).
Agent skills track tool behavior. internal/app/azldev/agentskill/ emits the AI-agent skills and instruction files that describe azldev's CLI, config, and workflows. After a behavioral change (command syntax, flags, config schema, overlay types, workflows), check whether these need updating — see instructions/agent-skills.instructions.md.
The TOML config files in defaultconfigs/ are loaded via internal/projectconfig/.
IMPORTANT: Code generation runs automatically with build/test commands. mage generate (runs go generate for each package in parallel) is a prerequisite for building and runs automatically with mage build and mage unit. mage docs rebuilds the binary and updates the JSON schema (schemas/azldev.schema.json) and CLI docs (docs/user/reference/cli/). Run mage docs explicitly after changing config structs or Cobra command descriptions so that checked-in generated files stay current (checked by PR gates).
CRITICAL: Run mage scenarioUpdate when test expectations change (updates snapshots).
Follow conventional commit format for all changes AND PR titles. A github action will fail the PR if the title does not adhere to the format.
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.

