vcpkg-tool
Copilot instructions606 starsChanged 4 months agoMITView on GitHub
The file
We split this copilot-instructions.md into the rules it gives an agent
9 rules. About 0 are common, 0 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use Win-arm64-Debug-WithArtifacts on Windows Arm64 hosts.
- Very specific: line 12
Use Win-x64-Debug-WithArtifacts on Windows x64 hosts.
- Very specific: line 13
Prefer these host-matching WithArtifacts presets for normal local configure, build, and test workflows instead of windows-ci.
- Very specific: line 16
Run one CTest target: ctest --preset Win-arm64-Debug-WithArtifacts -R "^vcpkg-test$" --output-on-failure or ctest --preset …
- Very specific: line 17
Run specific Catch2 tests directly: .\out\build\Win-arm64-Debug-WithArtifacts\vcpkg-test.exe [tag-or-filter] or …
- Very specific: line 19
Run one e2e suite: pwsh azure-pipelines/end-to-end-tests.ps1 -Filter "<suite-file-name-without-.ps1>"
- Very specific: line 30
Verify message usage: cmake --build --preset Win-arm64-Debug-WithArtifacts --target verify-messages -- -k0 or cmake --build --preset …
- Very specific: line 49
Update the vcpkg scripts SHA with vcpkg-init/update-scripts-sha.ps1.
- Very specific: line 54
add localized synopsis/examples (CmdCommandNameSynopsis, CmdCommandNameExampleN).
≈ “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 vcpkg-tool
Build, test, and lint commands
CMake presets (matches CI)
- Configure:
cmake --preset windows-ci(orlinux-ci,linux-arm64-ci,macos-ci) - Build:
cmake --build --preset windows-ci -- -k0 - Run tests:
ctest --preset windows-ci --output-on-failure
Windows local development
- Use
Win-arm64-Debug-WithArtifactson Windows Arm64 hosts. - Use
Win-x64-Debug-WithArtifactson Windows x64 hosts. - Prefer these host-matching
WithArtifactspresets for normal local configure, build, and test workflows instead ofwindows-ci.
Run a single test
- Run one CTest target:
ctest --preset Win-arm64-Debug-WithArtifacts -R "^vcpkg-test$" --output-on-failureorctest --preset Win-x64-Debug-WithArtifacts -R "^vcpkg-test$" --output-on-failure - Run specific Catch2 tests directly:
.\out\build\Win-arm64-Debug-WithArtifacts\vcpkg-test.exe [tag-or-filter]or.\out\build\Win-x64-Debug-WithArtifacts\vcpkg-test.exe [tag-or-filter]- Tags follow the source filename convention (for example
[arguments]).
- Tags follow the source filename convention (for example
- Run one e2e suite:
pwsh azure-pipelines/end-to-end-tests.ps1 -Filter "<suite-file-name-without-.ps1>"
Local Linux e2e notes
vcpkg-toolis a tool-only repo; local Linux e2e runs need a separate fullmicrosoft/vcpkgcheckout asVCPKG_ROOTfor built-in triplets, scripts, and registry history.- In this dev container environment,
/vcpkgis likely to already contain that fullmicrosoft/vcpkgclone and should be preferred if present. - Linux e2e runs may also need the PowerShell
Pestermodule andmono-completefor NuGet export scenarios. - Some registry tests require full git history in the
VCPKG_ROOTcheckout; shallow clones can fail baseline lookups.
Formatting / checks
- C++ format check path used in PR workflow:
pwsh .\azure-pipelines\Format-CxxCode.ps1 - Regenerate message map:
cmake --build --preset Win-arm64-Debug-WithArtifacts --target generate-message-map -- -k0orcmake --build --preset Win-x64-Debug-WithArtifacts --target generate-message-map -- -k0 - Verify message usage:
cmake --build --preset Win-arm64-Debug-WithArtifacts --target verify-messages -- -k0orcmake --build --preset Win-x64-Debug-WithArtifacts --target verify-messages -- -k0
vcpkg-artifacts (TypeScript) checks
- Install deps:
npm --prefix .\vcpkg-artifacts ci - Lint:
npm --prefix .\vcpkg-artifacts run eslint - Unit tests:
npm --prefix .\vcpkg-artifacts test
High-level architecture
vcpkgis the CLI executable (src/vcpkg.cpp) and dispatches subcommands registered insrc/vcpkg/commands.cpp.- Command dispatch is tiered:
basic_commandsrun withoutVcpkgPaths,paths_commandsrequire initialized paths, andtriplet_commandsadditionally resolve default/host triplets before executing. - Core implementation lives in the
vcpkglibobject library built fromsrc/vcpkg/*.cppandsrc/vcpkg/base/*.cpp, with public headers ininclude/vcpkg/**. - Tests are built into
vcpkg-testfromsrc/vcpkg-test/*.cpp(Catch2), plus small helper executables (reads-stdin,test-editor, etc.) used by tests. - The
vcpkg-artifactsTypeScript code is bundled intovcpkg-artifacts.mjsduring CMake builds only whenVCPKG_ARTIFACTS_DEVELOPMENT=ON(enabled by CI presets). - Localization is a first-class pipeline: message declarations in
include/vcpkg/base/message-data.inc.h, generated maps inlocales/messages.json, and enforcement viagenerate-message-map+verify-messages. - The files under
locales/are generated output and are usually not worth review comments; if you need to comment on message content, direct that feedback toinclude/vcpkg/base/message-data.inc.hinstead.
Key conventions
- Update the vcpkg scripts SHA with
vcpkg-init/update-scripts-sha.ps1; pass-Sha <commit>to use a specific commit instead of the currentmicrosoft/vcpkgmaster. - New commands follow
docs/command-guidelines.md:- file name pattern
commands.<command-name>.cpp(dashes, not underscores), - register command metadata/dispatch in
commands.cpp, - implement the entrypoint as
command_<command_name>_and_exit(dashes become underscores), - add localized synopsis/examples (
CmdCommandNameSynopsis,CmdCommandNameExampleN).
- file name pattern
- Command naming semantics:
x-commands are user-facing experimental commands (invoked withoutx-), whilez-commands are internal and keep thez-prefix. - Tests in
src/vcpkg-testuse Catch2 tags, and the expected tag convention is[filename-without-extension]; use this for targeted runs. - For localizable output, prefer the message system (
msg::format(...), message declarations, and declared message args) over hardcoded English strings or raw warning/error prefixes.
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.

