agentleFS
MicrosoftKnown publishermicrosoft/azure-linux-dev-tools/.github/copilot-instructions.md

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
  1. Distinctive:

    Follow the existing code style and conventions for similar code.

    line 3
  2. Distinctive:

    NEVER use direct go commands: - always use mage equivalents:

    line 13
  3. Very specific:

    ALWAYS start with mage fix all: when fixing linter issues - it automatically handles most formatting and simple fixes.

    line 24
  4. Very specific:

    Run mage all to verify Go changes and scenario tests.

    line 26
  5. Very specific:

    CRITICAL: Run mage scenarioUpdate when test expectations change (updates snapshots).

    line 39
  6. Distinctive:

    Follow conventional commit format for all changes AND PR titles.

    line 41

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

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.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 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 (NOT go test) - Runs tests with auto code generation + MCP integration
  • mage build (NOT go build) - Builds with proper pipeline
  • mage fix all (NOT golangci-lint run --fix) - Auto-fixes formatting and simple linting issues
  • mage check all (NOT golangci-lint run) - Runs all quality checks
  • mage scenario (NOT manual test commands) - Runs end-to-end tests (SLOW)
  • mage e2e - Runs the heavier //go:build e2e tests against real upstream repos (NOT run by mage 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 the mage_mutation MCP 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 at out/mutation-report.json. On-demand audit tool, NOT part of mage all/CI. See testing.instructions.md.
  • run-azldev-from-out-bin MCP server IF available (NOT go run ./cmd/azldev or ./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.

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.