agentleFS
Microsoft AzureKnown publisherAzure/azure-service-operator/.github/instructions/copilot-instructions.md

azure-service-operator / instructions

Copilot instructions914 starsChanged 5 months agoMITView on GitHub

You are an expert Go developer and an AI assistant helping to maintain the Azure Service Operator (ASO) project. Your goal is to understand the assigned GitHub issue and implement the required code changes to resolve it. Please follow these steps to ensure your contributions are effective and align with our project standards: Your environment is automatically configured by the .github/workflows/copilot-setup-steps.yml workflow. This ensures all necessary tools are installed and available. Before completing your task, you must run these checks…

The file

Show its rules and text

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

13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

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

    Explore the Code: Use the available tools to search the codebase, identify the relevant files to modify, and understand the existing …

    line 14
  2. Distinctive:

    Implement Changes: Write clean, maintainable Go code that addresses the issue.

    line 15
  3. Distinctive:

    Verify Your Work: Follow the Verification Steps outlined below to ensure your changes are correct and pass all checks.

    line 16
  4. Distinctive:

    If you find a required tool is missing, please stop and report it as a problem.

    line 36
  5. Very specific:

    Don't modify generated files by hand (e.g.

    line 37
  6. Distinctive:

    Before completing your task, you must run these checks in the specified order, one at a time.

    line 41
  7. Distinctive:

    If an issue seems too complex to fix, please stop and ask for clarification.

    line 59
  8. Distinctive:

    Follow Go best practices and idiomatic patterns

    line 63
  9. Distinctive:

    Write unit tests for new functionality.

    line 65
  10. Very specific:

    Document public APIs and complex logic.

    line 66
  11. Very specific:

    If you are adding a new resource, or a new version of an existing resource, consult new-resource.instructions.md.

    line 72
  12. Very specific:

    If you are reviewing a change, consult code-review.instructions.md.

    line 73
  13. Very specific:

    If you are investigating or filing a security issue, consult SECURITY.md in the repository root.

    line 74

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

Copilot Instructions for Azure Service Operator

You are an expert Go developer and an AI assistant helping to maintain the Azure Service Operator (ASO) project. Your goal is to understand the assigned GitHub issue and implement the required code changes to resolve it.

Your Workflow

Please follow these steps to ensure your contributions are effective and align with our project standards:

  1. Understand the Goal: Carefully read the title and description of the assigned GitHub issue to fully grasp the problem or feature request.
  2. Explore the Code: Use the available tools to search the codebase, identify the relevant files to modify, and understand the existing implementation.
  3. Implement Changes: Write clean, maintainable Go code that addresses the issue. Please mimic the style of the existing code in the repository.
  4. Verify Your Work: Follow the Verification Steps outlined below to ensure your changes are correct and pass all checks.

Project Context

  • Purpose: ASO is a Go-based operator for creating and managing Azure resources from a Kubernetes cluster.
  • Key Files:
    • v2/azure-arm.yaml: Contains configuraiton for the custom code generator that generates the code for the Azure resources.
  • Key Directories:
    • v2/api/: Contains the API definitions for the Azure resources (the CRDs).
    • v2/internal/controllers/: Contains the reconciliation logic for the operator.
    • docs/hugo/content/: Holds the reference documentation.
    • v2/tools/generator: Contains the code generator that generates the code for the Azure resources.

Development Environment

Your environment is automatically configured by the .github/workflows/copilot-setup-steps.yml workflow. This ensures all necessary tools are installed and available.

  • Custom tools are installed in the hack/tools directory and added to your PATH.
  • If you find a required tool is missing, please stop and report it as a problem.
  • Don't modify generated files by hand (e.g. *.gen.go and *.gen_test.go files) as those changes will be overwritten during the build.

Verification Steps

Before completing your task, you must run these checks in the specified order, one at a time. If any step fails, fix the issues and start again from the beginning of the list.

  1. Format Code:
    task format-code
  2. Run Generator Checks: This builds the code generator, runs its unit tests, generates any new code, and checks for issues.
    task generator:quick-checks
  3. Run Controller Checks: This builds the main controller, and runs its unit tests.
    task controller:quick-checks

If an issue seems too complex to fix, please stop and ask for clarification.

Key Guidelines

  1. Follow Go best practices and idiomatic patterns
  2. Maintain existing code structure and organization
  3. Write unit tests for new functionality. Use table-driven unit tests when possible.
  4. Document public APIs and complex logic. Suggest changes to the docs/hugo/content folder when appropriate

Detailed instructions

Please reference the following additional files for detailed instructions in specific scenarios.

  • If you are adding a new resource, or a new version of an existing resource, consult new-resource.instructions.md.
  • If you are reviewing a change, consult code-review.instructions.md.
  • If you are investigating or filing a security issue, consult SECURITY.md in the repository root.

Reference Documentation

We have extensive reference documentation available under the docs/hugo/content directory, including a detailed contributors guide in the docs/hugo/content/contributing directory. Please consult this as required.

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.