DirectXTK
Copilot instructions2.9k starsChanged 4 months agoMITView on GitHub
These instructions define how GitHub Copilot should assist with this project. The goal is to ensure consistent, high-quality code generation aligned with our conventions, stack, and best practices. - Code Style: The project uses an .editorconfig file to enforce coding standards. Follow the rules defined in .editorconfig for indentation, line endings, and other formatting. Additional information can be found on the wiki at Implementation. The library's public API requires C++11, and the project builds with C++17 (CMAKE_CXX_STANDARD 17). The command-line…
Trending
Quiet since August.about the whole repository
Who's talking about microsoft/DirectXTK
- @wonsorang.com“Direct3D 11 C++ 코드를 작성하기 위한 헬퍼 클래스 모음인 <DirectX Tool Kit for DirectX 11> github.com/microsoft/Di... 내부 구현체 …”Bluesky · Sep 13, 2023 · 3 likes
- A Hacker News story“DirectX 11 Tutorial by Microsoft”Hacker News · Jan 5, 2026 · 2 points
- espeak-ng/pcaudiolib“Feat/build with cmake”GitHub · Jan 24, 2025 · 1 reactions
- microsoft/vcpkg“[xaudio2redist, directxtk] updated XAudio2 port to 1.2.8 and added cmake find”GitHub · Oct 16, 2021 · 1 reactions
- kosua20/herebedragons“Add DirectX Toolkit version”GitHub · Jul 26, 2017 · 1 reactions
The biggest 5 of 15 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 15
Talked about on GitHub, Hacker News and Bluesky (15 times).
On GitHub · 13
- Jan 24, 2025Feat/build with cmake — espeak-ng/pcaudiolib1 reaction · 1 comment
- Oct 16, 2021[xaudio2redist, directxtk] updated XAudio2 port to 1.2.8 and added cmake find — microsoft/vcpkg1 reaction · 18 comments
- Jul 26, 2017Add DirectX Toolkit version — kosua20/herebedragons1 reaction · 2 comments
- Aug 19, 2026Validate seek table bounds in WaveBankReader — microsoft/DirectXTK120 reactions · 1 comment
- Aug 19, 2026Fetch DirectXTK from GitHub at configure time instead of vendoring it — XxRagulxX/Stand0 reactions
8 more on GitHub
- Apr 1, 2026[directxtk, directxtk12, directxtex, directxmesh] March 2026 release — microsoft/vcpkg0 reactions · 1 comment
- Dec 20, 2025Update declared license for git:directxtk 38f1e61fcb058da39b1ee55f6eceb5aa92bd443e — clearlydefined/curated-data0 reactions · 2 comments
- Nov 21, 2025feat: add additional dds fourCC values for bc4 and bc5 — Laupetin/OpenAssetTools0 reactions
- May 23, 2025New Project Proposal - VUE and PlantFactory — AcademySoftwareFoundation/tac0 reactions · 14 comments
- Sep 6, 2023HDR and wide color range output setup. — Kode/Kore0 reactions
- Apr 21, 2022Completely broken — microsoft/xbox-live-samples0 reactions · 5 comments
- Dec 5, 2017Support for Xbox One DDS files. — GerbilSoft/rom-properties0 reactions
- Sep 7, 2017Platonic solids in GeometryGenerator — vilbeyli/VQEngine-Legacy0 reactions
On Hacker News · 1
- Jan 5, 2026DirectX 11 Tutorial by Microsoft2 points
On Bluesky · 1
- Sep 13, 2023Direct3D 11 C++ 코드를 작성하기 위한 헬퍼 클래스 모음인 <DirectX Tool Kit for DirectX 11> github.com/microsoft/Di... 내부 구현체 내용 참조할 거리가 많군요. — @wonsorang.com3 likes and reposts · 1 reply
In this repository3 other files it gives its agents.
- releaseSkill
- directxtk-tutorialSkill
- directxtk-usageSkill
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
40 rules. About 0 are common, 24 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈24
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Error Handling: Use C++ exceptions for error handling and use RAII smart pointers to ensure resources are properly managed.
- Distinctive: line 54
Use RAII for all resource ownership (memory, file handles, etc.).
- Very specific: line 56
Use std::unique_ptr for exclusive ownership and std::shared_ptr for shared ownership.
- Very specific: line 57
Use Microsoft::WRL::ComPtr for COM object management.
- Very specific: line 63
Use 16-byte alignment (_aligned_malloc / _aligned_free) to support SIMD operations in the implementation, but do not expose this …
- Very specific: line 64
All implementation .cpp files include pch.h as their first include (precompiled header).
- Very specific: line 67
Use static constexpr for class-scope constants (e.g., static constexpr int MaxDirectionalLights = 3;, static constexpr unsigned int …
- Very specific: line 74
All public API functions must use SAL annotations on every parameter.
- Very specific: line 117
All public free functions use __cdecl explicitly for ABI stability.
- Very specific: line 119
All public function declarations are prefixed with DIRECTX_TOOLKIT_API, which wraps __declspec(dllexport) / __declspec(dllimport) or the …
- Very specific: line 121
When importing DLL classes under MSVC, headers suppress warnings C4251 and C4275 via #pragma warning(disable : 4251 4275) inside a #if …
- Very specific: line 125
All query and utility functions that cannot fail are marked noexcept.
- Very specific: line 126
All HRESULT-returning I/O and processing functions are also noexcept — errors are communicated via return code, never via exceptions.
- Very specific: line 167
Avoid macros for constants—prefer constexpr or inline const.
- Very specific: line 169
Avoid using using namespace in header files to prevent polluting the global namespace.
- Very specific: line 170
Don't use [[deprecated]] or __declspec(deprecated) attributes.
- Very specific: line 186
Every source file (.cpp, .h, .hlsl, .fx, etc.) must begin with this block:
- Very specific: line 211
Use CompileShaders.cmd in Src/Shaders/ to regenerate the .inc files.
- Distinctive: line 239
Only document features, patterns, and decisions that are explicitly present in the source code.
- Distinctive: line 240
Only include configurations and requirements that are clearly specified.
- Distinctive: line 241
Do not make assumptions about implementation details.
- Distinctive: line 245
Ask the user questions to gather missing information.
- Distinctive: line 246
Document gaps in current implementation or specifications.
- Distinctive: line 251
Always cite the specific source file and line numbers for documented features.
- Distinctive: line 258
Remove any speculative content.
- Distinctive: line 259
Ensure all documentation is verifiable against the current state of the codebase.
- Distinctive: line 272
Use these established guards — do not invent new ones:
- Distinctive: line 299
When reviewing code, focus on the following aspects:
- Distinctive: line 309
Ensure that all public functions and classes are covered by unit tests located on GitHub where applicable.
- Distinctive: line 310
Check for performance implications, especially in geometry processing algorithms.
- Distinctive: line 315
When reviewing documentation, do the following:
- Distinctive: line 317
Read the code located in this git repository in the main branch.
- Distinctive: line 319
Read the documentation on the wiki located in this git repository.
- Distinctive: line 325
Don't fix pre-existing issues unrelated to your task.
- Distinctive: line 326
Update documentation if it is directly related to the changes you are making.
- Distinctive: line 327
Always validate that your changes don't break existing behavior.
- Distinctive: line 331
Only run linters, builds and tests that already exist.
- Distinctive: line 332
Use the smallest targeted test, build, or lint command that covers the changed behavior.
- Distinctive: line 337
Prefer ecosystem tools (package managers, scaffolding, refactoring tools, linters) over manual changes.
- Distinctive: line 342
Only comment code that needs a bit of clarification.
≈ “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
GitHub Copilot Instructions
These instructions define how GitHub Copilot should assist with this project. The goal is to ensure consistent, high-quality code generation aligned with our conventions, stack, and best practices.
Context
- Project Type: Graphics Library / DirectX / Direct3D 11 / Game Audio
- Project Name: DirectX Tool Kit for DirectX 11
- Language: C++
- Framework / Libraries: STL / CMake / CTest
- Architecture: Modular / RAII / OOP
Getting Started
- See the tutorial at Getting Started.
- The recommended way to integrate DirectX Tool Kit for DirectX 11 into your project is by using the vcpkg Package Manager. See d3d11game_vcpkg for a template which uses VCPKG.
- You can make use of the nuget.org packages directxtk_desktop_win10 or directxtk_uwp.
- You can also use the library source code directly in your project or as a git submodule.
General Guidelines
- Code Style: The project uses an .editorconfig file to enforce coding standards. Follow the rules defined in
.editorconfigfor indentation, line endings, and other formatting. Additional information can be found on the wiki at Implementation. The library's public API requires C++11, and the project builds with C++17 (CMAKE_CXX_STANDARD 17). The command-line tools also use C++17, including<filesystem>for long file path support. This code is designed to build with Visual Studio 2022, Visual Studio 2026, clang for Windows v12 or later, or MinGW 12.2.
Notable
.editorconfigrules: C/C++ and HLSL files use 4-space indentation,crlfline endings, andlatin1charset — avoid non-ASCII characters in source files. HLSL files have separate indent/spacing rules defined in.editorconfig.
- Documentation: The project provides documentation in the form of wiki pages available at Documentation.
- Error Handling: Use C++ exceptions for error handling and use RAII smart pointers to ensure resources are properly managed. For some functions that return HRESULT error codes, they are marked
noexcept, usestd::nothrowfor memory allocation, and should not throw exceptions. - Testing: Unit tests for this project are implemented in this repository Test Suite and can be run using CTest per the instructions at Test Documentation. See test copilot instructions for additional information on the tests.
- Security: This project uses secure coding practices from the Microsoft Secure Coding Guidelines, and is subject to the
SECURITY.mdfile in the root of the repository. Functions that read input from image files, geometry files, and audio files are subject to OneFuzz fuzz testing to ensure they are secure against malformed files. - Dependencies: The project uses CMake and VCPKG for managing dependencies, making optional use of DirectXMath, GameInput, and XAudio2Redist. The project can be built without these dependencies, relying on the Windows SDK for core functionality. CMake build options include
BUILD_GAMEINPUT,BUILD_WGI, andBUILD_XINPUTfor alternative input backends. - Continuous Integration: This project implements GitHub Actions for continuous integration, ensuring that all code changes are tested and validated before merging. This includes building the project for a number of configurations and toolsets, running a subset of unit tests, and static code analysis including GitHub super-linter, CodeQL, and MSVC Code Analysis.
- Code of Conduct: The project adheres to the Microsoft Open Source Code of Conduct. All contributors are expected to follow this code of conduct in all interactions related to the project.
File Structure
.azuredevops/ # Azure DevOps pipeline configuration and policy files.
.github/ # GitHub Actions workflow files and linter configuration files.
.nuget/ # NuGet package configuration files.
build/ # Miscellaneous build files and scripts.
Audio/ # DirectX Tool Kit for Audio implementation files.
Inc/ # Public header files.
Src/ # Implementation header and source files.
Shaders/ # HLSL shader files.
MakeSpriteFont/ # C# CLI tool for capturing sprite fonts.
XWBTool/ # C++ CLI tool for creating XACT-style wave banks.
skills/ # Published CoPilot skills for use by developers.
Tests/ # Tests are designed to be cloned from a separate repository at this location.
wiki/ # Local clone of the GitHub wiki documentation repository.Patterns
Patterns to Follow
- Use RAII for all resource ownership (memory, file handles, etc.).
- Many classes utilize the pImpl idiom to hide implementation details, and to enable optimized memory alignment in the implementation.
- Use
std::unique_ptrfor exclusive ownership andstd::shared_ptrfor shared ownership. - Use
Microsoft::WRL::ComPtrfor COM object management. - Make use of anonymous namespaces to limit scope of functions and variables.
- Make use of
assertfor debugging checks, but be sure to validate input parameters in release builds. - Make use of the
DebugTracehelper to log diagnostic messages, particularly at the point of throwing an exception. - Explicitly
= deletecopy constructors and copy-assignment operators on all classes that use the pImpl idiom. - Explicitly utilize
= defaultor= deletefor copy constructors, assignment operators, move constructors and move-assignment operators where appropriate. - Use 16-byte alignment (
_aligned_malloc/_aligned_free) to support SIMD operations in the implementation, but do not expose this requirement in public APIs. - All implementation
.cppfiles includepch.has their first include (precompiled header). MinGW builds skip precompiled headers. Modeland related classes require RTTI (/GRon MSVC,__GXX_RTTIon GCC/Clang). The CMake build enables/GRautomatically; do not disable RTTI when usingModel.- Many public headers use
inline namespace DX11insidenamespace DirectXto disambiguate from DirectX Tool Kit for DirectX 12 types when both libraries are used together. This is usually indicated when parameters useID3D11DeviceorID3D11DeviceContexttypes. Follow this pattern for new headers that have Direct3D 11-specific types in the public API. - Use
static constexprfor class-scope constants (e.g.,static constexpr int MaxDirectionalLights = 3;,static constexpr unsigned int InputElementCount = 1;). SimpleMath types useconstexprconstructors for compile-time initialization. - Functions that load data from memory (texture loaders, Model) provide both
const uint8_t*andconst std::byte*overloads. When adding new memory-buffer APIs, provide both overload variants. Theconst std::byte *overloads are guarded by#ifdef __cpp_lib_byteto maintain compatibility with older C++ standards. - Each public header wraps the
DIRECTX_TOOLKIT_APImacro definition in#ifndef DIRECTX_TOOLKIT_APIso it is only defined once. Follow this guard pattern when adding new headers. - Headers use
#pragma comment(lib, ...)under_MSC_VERto auto-link platform libraries (e.g.,gameinput.lib,xinput.lib,runtimeobject.lib). Follow this pattern for new platform library dependencies.
SAL Annotations
All public API functions must use SAL annotations on every parameter. Use _Use_decl_annotations_ at the top of each implementation that has SAL in the header declaration — never repeat the annotations in the .cpp or .inl file.
Common annotations:
| Annotation | Meaning |
_In_ | Input parameter |
_Out_ | Output parameter |
_Inout_ | Bidirectional parameter |
_In_reads_bytes_(n) | Input buffer with byte count |
_In_reads_(n) | Input array with element count |
_In_z_ | Null-terminated input string |
_In_opt_ | Optional input parameter (may be null) |
_Out_opt_ | Optional output parameter |
_COM_Outptr_ | Output COM interface |
Example:
// Header (BufferHelpers.h)
DIRECTX_TOOLKIT_API
HRESULT __cdecl CreateStaticBuffer(
_In_ ID3D11Device* device,
_In_reads_bytes_(count* stride) const void* ptr,
size_t count,
size_t stride,
unsigned int bindFlags,
_COM_Outptr_ ID3D11Buffer** pBuffer) noexcept;
// Implementation (.cpp)
_Use_decl_annotations_
HRESULT DirectX::CreateStaticBuffer(
ID3D11Device* device,
const void* ptr,
size_t count,
size_t stride,
unsigned int bindFlags,
ID3D11Buffer** pBuffer) noexcept
{ ... }Calling Convention and DLL Export
- All public free functions use
__cdeclexplicitly for ABI stability. - Functions that take
XMVECTOR,FXMVECTOR, orXMMATRIXparameters useXM_CALLCONVinstead of__cdeclto enable efficient SIMD register passing. This is the DirectXMath calling convention and is used extensively in SpriteBatch, SpriteFont, Effects, Model, GeometricPrimitive, and VertexTypes. - All public function declarations are prefixed with
DIRECTX_TOOLKIT_API, which wraps__declspec(dllexport)/__declspec(dllimport)or the GCC__attribute__equivalent when usingBUILD_SHARED_LIBSin CMake. The underlying macros areDIRECTX_TOOLKIT_EXPORT(for building the library) andDIRECTX_TOOLKIT_IMPORT(for consuming it). - For free functions,
DIRECTX_TOOLKIT_APIappears on the line above the return type. For inner classes and interfaces, the macro is placed inline:class DIRECTX_TOOLKIT_API ClassName. - When importing DLL classes under MSVC, headers suppress warnings C4251 and C4275 via
#pragma warning(disable : 4251 4275)inside a#if defined(DIRECTX_TOOLKIT_IMPORT) && defined(_MSC_VER)guard.
noexcept Rules
- All query and utility functions that cannot fail are marked
noexcept. - All HRESULT-returning I/O and processing functions are also
noexcept— errors are communicated via return code, never via exceptions. - Constructors and functions that perform heap allocation or utilize Standard C++ containers that may throw are marked
noexcept(false).
Enum Flags Pattern
Flags enums follow this pattern — a uint32_t-based unscoped enum with a _DEFAULT = 0 base case, followed by a call to DEFINE_ENUM_FLAG_OPERATORS to enable |, &, and ~ operators:
enum DDS_LOADER_FLAGS : uint32_t
{
DDS_LOADER_DEFAULT = 0,
DDS_LOADER_FORCE_SRGB = 0x1,
DDS_LOADER_IGNORE_SRGB = 0x2,
DDS_LOADER_IGNORE_MIPS = 0x20,
};
DEFINE_ENUM_FLAG_OPERATORS(DDS_LOADER_FLAGS);See this blog post for more information on this pattern.
Clang Diagnostic Pragmas
Headers that trigger Clang warnings use paired #pragma clang diagnostic push/pop blocks under #ifdef __clang__ to suppress specific diagnostics. Common suppressions include -Wunsafe-buffer-usage, -Wfloat-equal, and -Wunknown-warning-option. Follow this pattern when adding code that legitimately triggers Clang-specific warnings:
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
#endif
// ... code ...
#ifdef __clang__
#pragma clang diagnostic pop
#endifPatterns to Avoid
- Don’t use raw pointers for ownership.
- Avoid macros for constants—prefer
constexprorinline const. - Don’t put implementation logic in header files unless using templates, although the SimpleMath library does use an .inl file for performance.
- Avoid using
using namespacein header files to prevent polluting the global namespace. - Don't use
[[deprecated]]or__declspec(deprecated)attributes. Feature retirement is communicated viaCHANGELOG.mdnotes, not in-source deprecation markers.
Naming Conventions
| Element | Convention | Example |
| Classes / structs | PascalCase | VertexPosition |
| Public functions | PascalCase + __cdecl or XM_CALLCONV | ComputeDisplayArea |
| Private data members | m_ prefix | m_count |
| Static constexpr members | c_ prefix (camelCase) or PascalCase | c_MostRecent, MaxDirectionalLights |
| Enum type names | UPPER_SNAKE_CASE | DDS_LOADER_FLAGS |
| Enum values | UPPER_SNAKE_CASE | DDS_LOADER_DEFAULT |
| Files | PascalCase | ScreenGrab.h, SpriteEffect.fx |
File Header Convention
Every source file (.cpp, .h, .hlsl, .fx, etc.) must begin with this block:
//--------------------------------------------------------------------------------------
// File: {FileName}
//
// {One-line description}
//
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
// https://go.microsoft.com/fwlink/?LinkId=248929
//--------------------------------------------------------------------------------------Section separators within files use:
- Major sections:
//-------------------------------------------------------------------------------------- - Subsections:
//----------------------------------------------------------------------------------
The project does not use Doxygen. API documentation is maintained exclusively on the GitHub wiki.
HLSL Shader Compilation
Shaders in Src/Shaders/ are compiled with FXC, producing embedded C++ header files (.inc):
- Use
CompileShaders.cmdinSrc/Shaders/to regenerate the.incfiles. - The CMake option
USE_PREBUILT_SHADERS=ONskips shader compilation and uses pre-built.incfiles; requiresCOMPILED_SHADERSvariable to be set.
References
- Source git repository on GitHub
- DirectXTK documentation git repository on GitHub
- DirectXTK test suite git repository on GitHub
- DirectX Tool Kit for Audio Wiki
- C++ Core Guidelines
- Microsoft Secure Coding Guidelines
- CMake Documentation
- VCPKG Documentation
- Games for Windows and the DirectX SDK blog - March 2012
- Games for Windows and the DirectX SDK blog - January 2013
- Games for Windows and the DirectX SDK blog - December 2013
- Games for Windows and the DirectX SDK blog - September 2014
- Games for Windows and the DirectX SDK blog - August 2015
- Games for Windows and the DirectX SDK blog - May 2020
- Games for Windows and the DirectX SDK blog - September 2021
- Games for Windows and the DirectX SDK blog - October 2021
No speculation
When creating documentation:
Document Only What Exists
- Only document features, patterns, and decisions that are explicitly present in the source code.
- Only include configurations and requirements that are clearly specified.
- Do not make assumptions about implementation details.
Handle Missing Information
- Ask the user questions to gather missing information.
- Document gaps in current implementation or specifications.
- List open questions that need to be addressed.
Source Material
- Always cite the specific source file and line numbers for documented features.
- Link directly to relevant source code when possible.
- Indicate when information comes from requirements vs. implementation.
Verification Process
- Review each documented item against source code whenever related to the task.
- Remove any speculative content.
- Ensure all documentation is verifiable against the current state of the codebase.
Cross-platform Support Notes
- The code targets Win32 desktop applications for Windows 8.1 or later, legacy Xbox One XDK, and Universal Windows Platform (UWP) apps for Windows 10 and Windows 11.
- Portability and conformance of the code are validated by building with Visual C++, clang/LLVM for Windows, and MinGW.
- For PC development using the Microsoft GDK, the project provides MSBuild solution
DirectXTK_GDKW_2022.slnfor the x64 or ARM64 architectures. - The MSBuild solution
DirectXTK_GDK_2022.slnis for Microsoft GDK with Xbox Extensions development for PC using the legacy Gaming.Desktop.x64 custom platform. There is no support for the Gaming.Xbox.*.x64 custom platforms since they do not support DirectX 11. - The project ships MSBuild projects for Visual Studio 2022 (
.sln/.vcxproj) and Visual Studio 2026 (.slnx/.vcxproj). VS 2019 projects have been retired. - The CMake build supports legacy Xbox One XDK via the
XBOX_CONSOLE_TARGETvariable (durango). Xbox Series X|S (scarlett) and Xbox One (xboxone) via the Microsoft GDK with Xbox Extensions only support DirectX 12, so this version of the library cannot support those platforms.
Platform and Compiler #ifdef Guards
Use these established guards — do not invent new ones:
| Guard | Purpose |
_WIN32 | Windows platform (desktop, UWP, Xbox) |
_GAMING_XBOX | Xbox platform (GDK - covers both Xbox One and Xbox Series X|S) |
_GAMING_XBOX_SCARLETT | Xbox Series X|S (GDK with Xbox Extensions) |
_GAMING_XBOX_XBOXONE | Xbox One (GDK with Xbox Extensions) |
_GAMING_DESKTOP | Gaming desktop platform (GDK); used for GRDK edition version checks |
_XBOX_ONE && _TITLE | Legacy Xbox One XDK |
_MSC_VER | MSVC-specific (and MSVC-like clang-cl) pragmas and warning suppression |
__clang__ | Clang/LLVM diagnostic suppressions |
__MINGW32__ | MinGW compatibility headers |
__GNUC__ | MinGW/GCC DLL attribute equivalents |
_M_ARM64 / _M_X64 / _M_IX86 | Architecture-specific code paths for MSVC (#ifdef) |
_M_ARM64EC | ARM64EC ABI (ARM64 code with x64 interop) for MSVC |
__aarch64__ / __x86_64__ / __i386__ | Additional architecture-specific symbols for MinGW/GNUC (#if) |
USING_GAMEINPUT | GameInput API for GamePad, Keyboard, Mouse |
USING_WINDOWS_GAMING_INPUT | Windows.Gaming.Input API for GamePad |
USING_XINPUT | XInput API for GamePad |
USING_COREWINDOW | CoreWindow-based input (UWP) for Keyboard, Mouse |
GAMEINPUT_API_VERSION | GameInput SDK version detection for API-level feature checks |
_M_ARM/__arm__is legacy 32-bit ARM which is deprecated.
Code Review Instructions
When reviewing code, focus on the following aspects:
- Adherence to coding standards defined in
.editorconfigand on the wiki. - Make coding recommendations based on the C++ Core Guidelines.
- Proper use of RAII and smart pointers.
- Correct error handling practices and C++ Exception safety.
- Clarity and maintainability of the code.
- Adequate comments where necessary.
- Public interfaces located in
Inc\*.hshould be clearly defined and documented on the GitHub wiki. - Compliance with the project's architecture and design patterns.
- Ensure that all public functions and classes are covered by unit tests located on GitHub where applicable. Report any gaps in test coverage.
- Check for performance implications, especially in geometry processing algorithms.
- Provide brutally honest feedback on code quality, design, and potential improvements as needed.
Documentation Review Instructions
When reviewing documentation, do the following:
- Read the code located in this git repository in the main branch.
- Review the public interface defined in the
Incfolder. - Read the documentation on the wiki located in this git repository.
- Report any specific gaps in the documentation compared to the public interface.
Code Change Rules
- Make precise, surgical changes that fully address the request. Don't modify unrelated code, but ensure changes are complete and correct.
- Don't fix pre-existing issues unrelated to your task. However, if you discover bugs directly caused by or tightly coupled to the code you're changing, fix those too.
- Update documentation if it is directly related to the changes you are making.
- Always validate that your changes don't break existing behavior.
Linting, Building, Testing
- Only run linters, builds and tests that already exist. Do not add new linting, building or testing tools unless necessary for the task.
- Use the smallest targeted test, build, or lint command that covers the changed behavior. When related targeted selectors use the same runner, include them in one invocation; escalate to full-suite or baseline runs only when targeted validation shows they are needed.
- Documentation changes do not need to be linted, built or tested unless there are specific tests for documentation.
Using Ecosystem Tools
- Prefer ecosystem tools (package managers, scaffolding, refactoring tools, linters) over manual changes.
- Install packages only when changing dependencies or after a missing-dependency failure.
Code Commenting Style
- Only comment code that needs a bit of clarification. Do not comment otherwise.
Release Process
The release process is documented in the release skill. Invoke the release skill for step-by-step guidance when performing a release.
CoPilot Skills
The project includes published CoPilot skills for developers:
- Release-Process: Guide for performing the DirectX Tool Kit release process. Invoked when asked to help with releasing a new version, publishing packages, or updating ports. See Release Process skill for details.
- directxtk-usage: Provides usage guidance for the DirectX Tool Kit for DX11 library. Located in the
skills/directxtk-usage/directory. - directxtk-tutorial: Provides an interactive tutorial which can create a project, add the toolkit, and implement features in a step-by-step fashion. Located in the
skills/directxtk-tutorialdirectory.
To use these skills in the Copilot CLI:
/skills list
/skills search directxtkDoes 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.

