BuildXL
Copilot instructions1k starsChanged 3 months agoMITView on GitHub
BuildXL is a distributed, cached, incremental build engine. Frontends construct a pip graph, then the scheduler executes it. Pips declare inputs and outputs, and sandboxed file-access monitoring enforces those declarations. Build correctness and caching are content-based rather than timestamp-based. Important concepts: - A pip is a node in the build DAG, such as a process, copy, write, service, or IPC operation. - Frontends include DScript, MSBuild, JavaScript, Ninja, NuGet, and Download. - Qualifiers parameterize builds, commonly by configuration and platform.…
Trending
Quiet since September.thin dataabout the whole repository
Who's talking about microsoft/BuildXL
- A Hacker News story“Microsoft Build Accelerator – open-source build engine for large systems”Hacker News · Apr 30, 2019 · 154 points
- A Hacker News story“Microsoft Build Accelerator”Hacker News · Dec 14, 2018 · 3 points
- A Hacker News story“BuildXL Sandboxing”Hacker News · Nov 6, 2025 · 1 points
- A Hacker News story“Microsoft Build Accelerator”Hacker News · Sep 5, 2019 · 1 points
- Iviesever/msvc-quick-build“test: validate real MSVC service ownership before cancellation integration”GitHub · Sep 8, 2026
The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 7
Talked about on Hacker News and GitHub (7 times).
On Hacker News · 4
- Apr 30, 2019Microsoft Build Accelerator – open-source build engine for large systems154 points · 41 comments
- Dec 14, 2018Microsoft Build Accelerator3 points
- Nov 6, 2025BuildXL Sandboxing1 point
- Sep 5, 2019Microsoft Build Accelerator1 point
On GitHub · 3
- Sep 8, 2026test: validate real MSVC service ownership before cancellation integration — Iviesever/msvc-quick-build0 reactions · 2 comments
- Aug 5, 2023[link.exe /INTEGRITYCHECK] fix -- ":NO" suffix doesn't work, so update the docs — glenn-slayden/cpp-docs0 reactions · 1 comment
- Apr 8, 2022Clarify FILE_RENAME_INFO properties — MicrosoftDocs/sdk-api0 reactions · 1 comment
The file
We split this copilot-instructions.md into the rules it gives an agent
12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Very specific: line 52
Follow nearby .dsc patterns rather than assuming TypeScript syntax.
- Very specific: line 60
When adding a source file, check whether its project uses a glob or an explicit file list.
- Very specific: line 73
Run builds from the repository root.
- Distinctive: line 103
Use the smallest relevant validation first:
- Distinctive: line 113
Use a Release qualifier when validating performance-sensitive changes.
- Very specific: line 126
Follow .editorconfig and nearby code.
- Distinctive: line 133
Always use braces for control statements.
- Very specific: line 134
Use var when the type is apparent from the right-hand side.
- Distinctive: line 137
Every new C# file starts with:
- Distinctive: line 147
Do not amend, rebase, force-push, or otherwise rewrite history unless the user explicitly requests it.
- Distinctive: line 149
Do not push unless the user explicitly requests it.
- Very specific: line 154
Place parallel worktrees under the sibling ../BuildXL.Internal.worktrees/<feature> directory.
≈ “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
Copilot Instructions for BuildXL
BuildXL context
BuildXL is a distributed, cached, incremental build engine. Frontends construct a pip graph, then the scheduler executes it. Pips declare inputs and outputs, and sandboxed file-access monitoring enforces those declarations. Build correctness and caching are content-based rather than timestamp-based.
Important concepts:
- A pip is a node in the build DAG, such as a process, copy, write, service, or IPC operation.
- Frontends include DScript, MSBuild, JavaScript, Ninja, NuGet, and Download.
- Qualifiers parameterize builds, commonly by configuration and platform.
- Sealed directories declare directory contents in advance so directory dependencies can be cached safely.
Primary references:
- Developer guide
- Core concepts
- DScript guide
- Module system
Build definitions and DScript
.dsc files define the build and are the source of truth. .csproj and .sln
files are generated for IDE support; never edit them. Generate them with
bxl -vs, bxl -vs -cache, or bxl -vsall.
DScript is TypeScript-derived but is not TypeScript:
- Top-level values can only be
constdeclarations or functions and are therefore immutable.letvalues are allowed inside functions;varvalues are disallowed. - The
qualifierkeyword exposes build parametrization. exportmakes values accessible to other specs under the same module;@@publicmakes an export visible to other modules.- Dependencies are declared with
importorimportFrom.
DScript path literals are typed:
f`path/to/file.cs` // File
d`path/to/directory` // Directory
p`path/to/output` // Output path
a`name` // Path atom
r`relative/path` // Relative pathFollow nearby .dsc patterns rather than assuming TypeScript syntax. Common
source patterns are:
const recursiveSources = globR(d`.`, "*.cs");
const directFiles = [f`First.cs`, f`Second.cs`];When adding a source file, check whether its project uses a glob or an explicit
file list. Add the file to the .dsc list when needed. Do not update a generated
project.
Modules use module.config.bm or module.config.dsc. Module names are globally
unique and normally hierarchical. Respect allowedDependencies; add imports
rather than bypassing the module dependency graph.
BuildXL sandbox correctness depends on observing inputs and outputs. Unobserved file accesses can fail a build or make it uncacheable.
Building and testing
Run builds from the repository root. On Windows, invoke the batch file through
cmd /c "call ..." and pass /server- so agents do not leave a BuildXL server
running:
cmd /c "call bxl.cmd -minimal /server-"
cmd /c "call bxl.cmd Test.BuildXL.Utilities.Collections.dsc /server-"
cmd /c "call bxl.cmd Test.BuildXL.Utilities.Collections.dsc -TestClass Test.BuildXL.Utilities.Collections.BitSetTests /server-"
cmd /c "call bxl.cmd Test.BuildXL.Utilities.Collections.dsc -TestMethod Test.BuildXL.Utilities.Collections.BitSetTests.RoundToValidBitCount /server-"
cmd /c "call bxl.cmd /q:ReleaseNet10 /server-"On Linux, use ./bxl.sh. Microsoft internal developers need --internal for
internal dependencies; external contributors must omit it. The first run may
require sudo.
./bxl.sh --internal --minimal /server-
./bxl.sh --internal --test-class Test.BuildXL.Utilities.Collections.BitSetTests /server-
./bxl.sh --internal --test-method Test.BuildXL.Utilities.Collections.BitSetTests.RoundToValidBitCount /server-The first build may restore the LKG and credential provider, so allow at least
five minutes. Build output ends with Build Succeeded or Build FAILED. On
failure, use the printed log directory and inspect BuildXL.err for the
authoritative errors.
-TestClass and -TestMethod succeed when they match no tests. Verify the fully
qualified name exists and confirm the expected tests actually ran.
Use the smallest relevant validation first:
cmd /c "call bxl.cmd <target-test-project>.dsc /server-"
cmd /c "call bxl.cmd -minimal /server-"
cmd /c "call bxl.cmd /server-"The standard build and test suite is slow. RunCheckInTests.cmd performs
multiple configurations and fingerprint checks and is normally left to PR CI.
Use a Release qualifier when validating performance-sensitive changes.
Manually invoked benchmarks should remain BuildXLSdk.test projects, with the
entire test run gated by skipTestRun and an Environment.getFlag build
parameter. This keeps benchmarks compiled but prevents automation from
scheduling them. Run the utilities benchmarks with:
cmd /c "call bxl.cmd Test.BuildXL.Utilities.Benchmarks.dsc /p:[Sdk.BuildXL]runBenchmarks=1 /q:ReleaseNet10 /server-"Code conventions
Follow .editorconfig and nearby code. In C#:
- Private instance, static, and thread-static fields use
m_,s_, andt_prefixes respectively. - Constants and public members use PascalCase; parameters and locals use camelCase.
- Method and test names use PascalCase without underscores.
- Always use braces for control statements.
- Use
varwhen the type is apparent from the right-hand side; use an explicit type for built-ins or when the type is not obvious.
Every new C# file starts with:
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.Git
- Name branches
dev/[username]/[short-kebab-case-description]. - Do not amend, rebase, force-push, or otherwise rewrite history unless the user explicitly requests it. Add a new commit instead.
- Do not push unless the user explicitly requests it. Make local commits only when instructed by the user.
Worktrees
Place parallel worktrees under the sibling
../BuildXL.Internal.worktrees/<feature> directory. Worktrees share the main
worktree's Out\Cache, so builds can reuse cache entries.
On Windows, bxl.cmd wraps the build with RunInSubst.exe, which serializes
access via .SubstLock: start the build normally (bxl.cmd -minimal /server-,
with no extra flags) and let it queue behind the worktree currently using the
drive. A queued build may appear hung — that is expected; wait it out or ask the
user, do not "fix" it.
On Windows, never run the subst command yourself, for any drive letter, for
any reason. Do not remap, unmap, or create a subst drive; do not pass -NoSubst
or any other flag to route around RunInSubst.exe; do not modify or delete
.SubstLock; do not terminate processes to bypass the queue. This applies even
when a build fails with a path-length, "invalid parameter", or other
subst-looking error — that failure is a signal to stop and ask the user, not to
invent a drive-letter or -NoSubst workaround. When diagnosing which worktree
owns the subst mapping, use the absolute path of the running RunInSubst.exe,
and report it rather than acting on it.
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.

