| name | source-command-add-module |
| description | Add a modern C++ module with a documented boundary, CMake registration, and tests. |
Add Module
Use this skill when introducing a new project-owned C++ module.
Required Process
- Read
AGENTS.md, docs/agent/ARCHITECTURE.md, MODULES.md, NAMING.md,
and SYNTAX_AND_STYLE.md.
- Identify the module's single owned responsibility.
- Choose a dotted lowercase domain-oriented module name.
- Put exported declarations and Doxygen contracts in
.cppm.
- Put non-trivial implementation in
.cpp.
- Include only the required standard headers in the global module fragment,
before the named module declaration. Do not use
import std.
- Register the interface with
FILE_SET CXX_MODULES.
- Enable target module scanning with
CXX_SCAN_FOR_MODULES.
- Link consumers to the owning CMake target.
- Add public-behavior tests.
- Configure, build, test, inspect the diff, and report exact evidence.
Do not create .h files or add a module named utils, helpers, common, or
misc without a repository-established domain reason.