agentleFS
MicrosoftKnown publishermicrosoft/azure-pipelines-agent/.github/copilot-instructions.md

azure-pipelines-agent

Copilot instructions1.9k starsChanged 3 months agoMITView on GitHub

This repository contains the Azure Pipelines Agent, a cross-platform build and release agent written in C# for .NET Core. When working with this codebase, follow these guidelines and use the provided development tools. All commands should be run from the src/ directory: Follow the .NET Foundation coding guidelines:

  • Installs packages
  • Commits and pushes

Trending

Quiet this year.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/azure-pipelines-agent repository that our weekly crawl found: only 12 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about microsoft/azure-pipelines-agent

The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 12

Talked about on GitHub (12 times).

On GitHub · 12

7 more on GitHub

The file

Show its rules and text

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

16 rules. About 0 are common, 10 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    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. Very specific:

    Source Code: All source code is in the src/ directory

    line 7
  2. Very specific:

    Build Scripts: Use src/dev.sh (Linux/macOS) or src/dev.cmd (Windows)

    line 8
  3. Very specific:

    All commands should be run from the src/ directory:

    line 26
  4. Distinctive:

    Add custom test filters as the 5th parameter:

    line 98
  5. Distinctive:

    Run the agent with debug mode:

    line 106
  6. Distinctive:

    Follow the .NET Foundation coding guidelines:

    line 134
  7. Distinctive:

    Use PascalCase for public members

    line 136
  8. Distinctive:

    Use camelCase for private fields

    line 137
  9. Distinctive:

    Keep methods focused and small

    line 139
  10. Very specific:

    Create/modify source files in appropriate src/ subdirectories

    line 145
  11. Very specific:

    Add unit tests in src/Test/

    line 146
  12. Distinctive:

    Update documentation if needed

    line 148
  13. Very specific:

    Missing dependencies: Run ./dev.sh layout to restore

    line 152
  14. Distinctive:

    Test failures: Check platform-specific test filters

    line 153
  15. Distinctive:

    Always run layout first: when starting development

    line 170
  16. Distinctive:

    Run tests: before committing to catch regressions

    line 172

≈ “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 Azure Pipelines Agent

This repository contains the Azure Pipelines Agent, a cross-platform build and release agent written in C# for .NET Core. When working with this codebase, follow these guidelines and use the provided development tools.

Project Structure

  • Source Code: All source code is in the src/ directory
  • Build Scripts: Use src/dev.sh (Linux/macOS) or src/dev.cmd (Windows)
  • Agent Layout: Built agent is placed in {root}/{runtime_id}/_layout
  • Documentation: Available in docs/ directory

Development Workflow

Initial Setup

# Clone and navigate to source
git clone https://github.com/microsoft/azure-pipelines-agent
cd ./src

# First time setup - creates full agent layout
./dev.sh layout

Build Commands

All commands should be run from the src/ directory:

Linux/macOS

./dev.sh {command} [target_framework] [build_config] [runtime_id] [test_filters]

Windows

dev {command} [target_framework] [build_config] [runtime_id] [test_filters]

Available Commands

CommandShortDescription
layoutlCreate full agent layout in {root}/{runtime_id}/_layout (run first time)
buildbBuild everything and update agent layout folder
testtBuild agent binaries and run unit tests for current platform
testl0l0Run L0 (unit) tests only
testl1l1Run L1 (integration) tests only
packagepCreate distribution packages
hashGenerate hash files
reportGenerate test reports
lintRun code linting
lint-verifyVerify linting rules

Normal Development Flow

# 1. Initial layout (first time only)
./dev.sh layout

# 2. Make code changes
# ... edit files ...

# 3. Build and test
./dev.sh build
./dev.sh test

# 4. Commit changes
git add .
git commit -m "Your changes"
git push

Project Details

Technology Stack

  • Language: C# (.NET Core)
  • Target Framework: net10.0 (default), net8.0 supported
  • Platforms: Windows (x64, x86, ARM64), macOS (x64, ARM64), Linux (x64, ARM)
  • Build System: MSBuild with custom scripts

Key Components

  • Agent.Listener: Main agent listener service
  • Agent.Worker: Task execution worker
  • Agent.PluginHost: Plugin hosting environment
  • Agent.Plugins: Built-in plugins
  • Agent.Sdk: SDK for agent development

Dependencies

  • .NET SDK: Automatically downloaded if not present
  • Git: Required for development (Git for Windows on Windows)
  • Node.js: For certain pipeline tasks

Testing

Test Types

  • L0 Tests: Unit tests (./dev.sh testl0)
  • L1 Tests: Integration tests (./dev.sh testl1)

Test Filters

Add custom test filters as the 5th parameter:

./dev.sh test net6.0 Debug osx-arm64 "TestCategory=YourCategory"

Debugging

Debug Mode

Run the agent with debug mode:

./config.sh --debug
./run.sh --debug

Environment Variables for Debugging

  • VSTSAGENT_DEBUG_TASK: Debug specific tasks by ID or name+version

Build Configurations

Available Configurations

  • Debug: Development builds with debug symbols
  • Release: Production builds optimized for performance

Runtime IDs

Common runtime identifiers:

  • win-x64, win-x86, win-arm64
  • osx-x64, osx-arm64
  • linux-x64, linux-arm, linux-arm64
  • rhel.6-x64

Package Types

  • agent (default): Full agent package
  • pipelines-agent: Pipelines-specific package (excludes Node 6/10)

Code Style

Follow the .NET Foundation coding guidelines:

  • Use PascalCase for public members
  • Use camelCase for private fields
  • Use meaningful names
  • Keep methods focused and small
  • Include XML documentation for public APIs

Common Tasks

Adding New Features

  1. Create/modify source files in appropriate src/ subdirectories
  2. Add unit tests in src/Test/
  3. Build and test: ./dev.sh build && ./dev.sh test
  4. Update documentation if needed

Troubleshooting Build Issues

  • "unzip not found": Install unzip (sudo apt install unzip on WSL)
  • Missing dependencies: Run ./dev.sh layout to restore
  • Test failures: Check platform-specific test filters

Working with Agent Layout

The built agent in _layout/ can be used for:

  • Local testing and debugging
  • Manual agent installation
  • Testing pipeline integration

To configure and run the built agent:

cd {root}/{runtime_id}/_layout
./config.sh
./run.sh

Best Practices

  1. Always run layout first when starting development
  2. Build before testing to ensure latest changes are included
  3. Run tests before committing to catch regressions
  4. Use appropriate runtime ID for your target platform
  5. Follow the normal dev flow for consistent results

Additional Resources

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.