agentleFS
MicrosoftKnown publishermicrosoft/moc-sdk-for-go/.github/copilot-instructions.md

moc-sdk-for-go

Copilot instructions19 starsChanged 10 months agoApache-2.0View on GitHub

This file contains instructions for GitHub Copilot agents working on this repository. CRITICAL: Before marking a Pull Request as ready for review, you MUST: The following status checks must be green before marking PR as ready for review: For automated PRs (e.g., dependency updates, Go version updates): - The PR may be created in draft mode by default - Before converting to ready for review, verify: - All builds complete successfully - All tests pass - No new linting errors…

The file

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

11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CRITICAL: Before marking a Pull Request as ready for review, you MUST:

    line 7
  2. Distinctive:

    Check that Azure Pipelines build is successful

    line 10
  3. Distinctive:

    Verify CodeQL security scanning passes

    line 11
  4. Distinctive:

    Ensure all linting checks pass

    line 12
  5. Distinctive:

    After pushing changes, wait for all CI/CD workflows to complete

    line 29
  6. Distinctive:

    All code must pass golangci-lint checks

    line 36
  7. Distinctive:

    Review pipeline logs: if checks fail to understand the root cause

    line 56
  8. Distinctive:

    Fix all build and test failures: before requesting review

    line 57
  9. Distinctive:

    Before converting to ready for review, verify:

    line 82
  10. Distinctive:

    All builds complete successfully

    line 83
  11. Distinctive:

    No new linting errors are introduced

    line 85

≈ “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 Instructions for moc-sdk-for-go

This file contains instructions for GitHub Copilot agents working on this repository.

Pull Request Status Checks

CRITICAL: Before marking a Pull Request as ready for review, you MUST:

  1. Verify all status checks are passing (green)
    • Check that Azure Pipelines build is successful
    • Verify CodeQL security scanning passes
    • Ensure all linting checks pass
    • Confirm all unit tests pass
  2. Run local validation before pushing changes
    # Run the full build, format, and test suite
    make
    
    # Or run individual checks:
    make vendor      # Update dependencies
    make format      # Format code
    make build       # Build all packages and wrapper
    make unittest    # Run unit tests
    make golangci-lint  # Run linting
  3. Monitor CI/CD pipeline results
    • After pushing changes, wait for all CI/CD workflows to complete
    • Review any failures in Azure Pipelines or GitHub Actions
    • Fix any issues before requesting review
  4. Key build requirements
    • This project requires Go (version specified in go.mod)
    • Windows builds require mingw-w64 for cross-compilation
    • All code must pass golangci-lint checks
    • Unit tests must pass for ./pkg/client/... and ./services/security/...

Status Check Sources

The following status checks must be green before marking PR as ready for review:

Azure Pipelines

  • Build Job: Compiles all packages including Windows DLL wrapper
  • Lint Job: Runs golangci-lint with .golangci.yml configuration
  • Static Analysis: Security and code quality checks

GitHub Actions

  • CodeQL Analysis: Security vulnerability scanning for Go code
  • CLA Check: Contributor License Agreement verification

Development Guidelines

  1. Never mark a PR as ready for review if any status checks are failing
  2. Always run local tests before pushing to catch issues early
  3. Review pipeline logs if checks fail to understand the root cause
  4. Fix all build and test failures before requesting review
  5. Ensure code is properly formatted using make format

Common Commands

# Full build and test (recommended before pushing)
make

# Individual operations
make vendor          # Update Go modules
make format          # Format Go code with gofmt
make build           # Build all packages
make test            # Run all tests
make unittest        # Run unit tests only
make golangci-lint   # Run linter

# Clean build artifacts
make clean

Notes for Automated PRs

For automated PRs (e.g., dependency updates, Go version updates):

  • The PR may be created in draft mode by default
  • Before converting to ready for review, verify:
    • All builds complete successfully
    • All tests pass
    • No new linting errors are introduced
    • The changes are minimal and focused

Repository-Specific Requirements

  • Uses Go modules (GO111MODULE=on)
  • Private repos require GOPRIVATE=github.com/microsoft
  • Cross-compiles for Windows using mingw-w64
  • Generates SBOM (Software Bill of Materials) as part of build
  • Follows Microsoft Open Source Code of Conduct

Remember: Green status checks are mandatory before PR approval. No exceptions.

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.