DirectXTK12
Copilot instructions1.8k 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. If you are new to DirectX, you may want to start with DirectX Tool Kit for DirectX 11 to learn many important concepts for Direct3D programming, HLSL shaders, and the code patterns used in this project with a more 'newbie friendly' API. - Code Style: The project uses an .editorconfig file to…
Trending
Quiet since May.thin dataabout the whole repository
Who's talking about microsoft/DirectXTK12
- mastercomfig/tf2-patches-old“DX12 support”GitHub · Sep 15, 2020 · 4 reactions
- mustikka10/headscale“[WIP] Fix runtime bug in application”GitHub · May 2, 2026
- microsoft/vcpkg“[directxtk, directxtk12, directxtex, directxmesh] March 2026 release”GitHub · Apr 1, 2026
- microsoft/Xbox-GDK-Samples“DirectX Tool Kit for DX12 patch for GameInput 1.2”GitHub · May 7, 2025
- microsoft/vcpkg“[directxtk(12), directxmesh, directxtex, uvatlas] Update ports for Sept 2024”GitHub · Sep 6, 2024
The biggest 5 of 10 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 10
Talked about on GitHub (10 times).
On GitHub · 10
- Sep 15, 2020DX12 support — mastercomfig/tf2-patches-old4 reactions · 4 comments
- May 2, 2026[WIP] Fix runtime bug in application — mustikka10/headscale0 reactions
- Apr 1, 2026[directxtk, directxtk12, directxtex, directxmesh] March 2026 release — microsoft/vcpkg0 reactions · 1 comment
- May 7, 2025DirectX Tool Kit for DX12 patch for GameInput 1.2 — microsoft/Xbox-GDK-Samples0 reactions · 1 comment
- Sep 6, 2024[directxtk(12), directxmesh, directxtex, uvatlas] Update ports for Sept 2024 — microsoft/vcpkg0 reactions · 2 comments
5 more on GitHub
- Dec 11, 2023Move Xbox GDK rendering code to public repo — libsdl-org/SDL0 reactions · 2 comments
- Sep 6, 2023test — eunbi-kim/junit_doc0 reactions
- Apr 30, 2023[directxmesh, directxtex, directxtk(12), uvatlas] April 2023 updates — microsoft/vcpkg0 reactions · 7 comments
- Apr 5, 2023[directxmesh, directxtex, directxtk(12), uvatlas] update ports for March 2023 releases — microsoft/vcpkg0 reactions · 1 comment
- Oct 14, 2021Support compressed SDKMESH/DDS — walbourn/directxtk12modelviewer0 reactions
In this repository3 other files it gives its agents.
- releaseSkill
- directxtk12-tutorialSkill
- directxtk12-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 27
Error Handling: Use C++ exceptions for error handling and use RAII smart pointers to ensure resources are properly managed.
- Distinctive: line 56
Use RAII for all resource ownership (memory, file handles, etc.).
- Very specific: line 58
Use std::unique_ptr for exclusive ownership and std::shared_ptr for shared ownership.
- Very specific: line 59
Use Microsoft::WRL::ComPtr for COM object management.
- Very specific: line 65
Use 16-byte alignment (_aligned_malloc / _aligned_free) to support SIMD operations in the implementation, but do not expose this …
- Very specific: line 66
All implementation .cpp files include pch.h as their first include (precompiled header).
- Very specific: line 69
Use static constexpr for class-scope constants (e.g., static constexpr int MaxDirectionalLights = 3;, static constexpr unsigned int …
- Very specific: line 76
All public API functions must use SAL annotations on every parameter.
- Very specific: line 123
All public free functions use __cdecl explicitly for ABI stability.
- Very specific: line 125
All public function declarations are prefixed with DIRECTX_TOOLKIT_API, which wraps __declspec(dllexport) / __declspec(dllimport) or the …
- Very specific: line 127
When importing DLL classes under MSVC, headers suppress warnings C4251 and C4275 via #pragma warning(disable : 4251 4275) inside a #if …
- Very specific: line 131
All query and utility functions that cannot fail are marked noexcept.
- Very specific: line 132
All HRESULT-returning I/O and processing functions are also noexcept — errors are communicated via return code, never via exceptions.
- Very specific: line 175
Avoid macros for constants—prefer constexpr or inline const.
- Very specific: line 177
Avoid using using namespace in header files to prevent polluting the global namespace.
- Very specific: line 178
Don't use [[deprecated]] or __declspec(deprecated) attributes.
- Very specific: line 194
Every source file (.cpp, .h, .hlsl, .fx, etc.) must begin with this block:
- Very specific: line 218
Use CompileShaders.cmd in Src/Shaders/ to regenerate the .inc files.
- Distinctive: line 245
Only document features, patterns, and decisions that are explicitly present in the source code.
- Distinctive: line 246
Only include configurations and requirements that are clearly specified.
- Distinctive: line 247
Do not make assumptions about implementation details.
- Distinctive: line 251
Ask the user questions to gather missing information.
- Distinctive: line 252
Document gaps in current implementation or specifications.
- Distinctive: line 257
Always cite the specific source file and line numbers for documented features.
- Distinctive: line 264
Remove any speculative content.
- Distinctive: line 265
Ensure all documentation is verifiable against the current state of the codebase.
- Distinctive: line 280
Use these established guards — do not invent new ones:
- Distinctive: line 309
When reviewing code, focus on the following aspects:
- Distinctive: line 319
Ensure that all public functions and classes are covered by unit tests located on GitHub where applicable.
- Distinctive: line 320
Check for performance implications, especially in geometry processing algorithms.
- Distinctive: line 325
When reviewing documentation, do the following:
- Distinctive: line 327
Read the code located in this git repository in the main branch.
- Distinctive: line 329
Read the documentation on the wiki located in this git repository.
- Distinctive: line 335
Don't fix pre-existing issues unrelated to your task.
- Distinctive: line 336
Update documentation if it is directly related to the changes you are making.
- Distinctive: line 337
Always validate that your changes don't break existing behavior.
- Distinctive: line 341
Only run linters, builds and tests that already exist.
- Distinctive: line 342
Use the smallest targeted test, build, or lint command that covers the changed behavior.
- Distinctive: line 347
Prefer ecosystem tools (package managers, scaffolding, refactoring tools, linters) over manual changes.
- Distinctive: line 352
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 12 / Game Audio
- Project Name: DirectX Tool Kit for DirectX 12
- 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 12 into your project is by using the vcpkg Package Manager. See d3d12game_vcpkg for a template which uses VCPKG.
- You can make use of the nuget.org packages directxtk12_desktop_win10 or directxtk12_uwp.
- You can also use the library source code directly in your project or as a git submodule.
If you are new to DirectX, you may want to start with DirectX Tool Kit for DirectX 11 to learn many important concepts for Direct3D programming, HLSL shaders, and the code patterns used in this project with a more 'newbie friendly' API.
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). 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. The audio, input, and math implementations are identical to the DirectX Tool Kit for DirectX 11.
- 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, DirectX-Headers, DirectX 12 Agility SDK, 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. Additional CMake build options includeBUILD_MIXED_DX11for DX11 toolkit interop which removes shared code from the DX12 library as it will be present in the DX11 library to avoid link conflicts. - 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.
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.Note that DirectX Tool Kit for DirectX 12 utilizes the
MakeSpriteFontC# tool and theXWBToolC++ Audio tool hosted in the DirectX Tool Kit for DirectX 11 repository. See MakeSpriteFont and XWBTool.
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 DX12insidenamespace DirectXto disambiguate from DirectX Tool Kit for DirectX 11 types when both libraries are used together. This is usually indicated when parameters use theID3D12Devicetype. Follow this pattern for new headers that have Direct3D 12-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_ ID3D12Device* device,
ResourceUploadBatch& resourceUpload,
_In_reads_bytes_(count* stride) const void* ptr,
size_t count,
size_t stride,
D3D12_RESOURCE_STATES afterState,
_COM_Outptr_ ID3D12Resource** pBuffer,
D3D12_RESOURCE_FLAGS resFlags = D3D12_RESOURCE_FLAG_NONE) noexcept;
// Implementation (.cpp)
_Use_decl_annotations_
HRESULT DirectX::CreateStaticBuffer(
ID3D12Device* device,
ResourceUploadBatch& resourceUpload,
const void* ptr,
size_t count,
size_t stride,
D3D12_RESOURCE_STATES afterState,
ID3D12Resource** pBuffer,
D3D12_RESOURCE_FLAGS resFlags) 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, 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_MIP_AUTOGEN = 0x8,
DDS_LOADER_MIP_RESERVE = 0x10,
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
constexprorinlineconst. - 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=615561
//--------------------------------------------------------------------------------------Section separators within files use:
//--------------------------------------------------------------------------------------
The project does not use Doxygen. API documentation is maintained exclusively on the GitHub wiki.
HLSL Shader Compilation
Shaders in Src/Shaders/ are compiled to embedded C++ header files (.inc):
- Use
CompileShaders.cmdinSrc/Shaders/to regenerate the.incfiles. - By default (
BUILD_DXIL_SHADERS=ON), shaders are compiled with DXC targeting Shader Model 6.0. - Set
BUILD_DXIL_SHADERS=OFFto compile with legacy FXC targeting Shader Model 5.1 instead. - 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 - October 2021
- Games for Windows and the DirectX SDK blog - September 2021
- Games for Windows and the DirectX SDK blog - May 2020
- Games for Windows and the DirectX SDK blog - July 2016
- Games for Windows and the DirectX SDK blog - December 2013
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 10 or later, Xbox One, Xbox Series X|S, and Universal Windows Platform (UWP) apps for Windows 10 and Windows 11.
- Portability and conformance of the code is 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 both PC using the legacy Gaming.Desktop.x64 custom platform as well as Xbox using Gaming.Xbox.*.x64 platforms. - For Xbox development, the project provides MSBuild solution
DirectXTK_GDKX_2022.slnorDirectXTK_GDKX_2026.slnxfor the Microsoft GDK with Xbox Extensions using Gaming.Xbox.*.x64 platforms. - 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 Xbox Series X|S (
scarlett) and Xbox One (xboxone) via theXBOX_CONSOLE_TARGETvariable. - The CMake build supports legacy Xbox One XDK via the
XBOX_CONSOLE_TARGETvariable (durango).
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 | Xbox One XDK (legacy) |
_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_DIRECTX_HEADERS | External DirectX-Headers package in use |
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 |
USING_PIX_CUSTOM_MEMORY_EVENTS | PIX custom memory event integration in GraphicsMemory |
_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.
- directxtk12-usage: Provides usage guidance for the DirectX Tool Kit for DX12 library. Located in the
skills/directxtk12-usage/directory. - directxtk12-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/directxtk12-tutorialdirectory.
To use these skills in the Copilot CLI:
/skills list
/skills search directxtk12Does 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.

