This project uses Conventional Commits for automated versioning and changelog generation.
Commit Format: <type>(<scope>): <subject>
See the Conventional Commits specification for full details.
Common types and their effect on versioning:
feat:→ Minor version bump (1.2.0 → 1.3.0)fix:,perf:,refactor:,style:→ Patch version bump (1.2.0 → 1.2.1)BREAKING CHANGE:or!→ Major version bump (1.2.0 → 2.0.0)docs:,test:,chore:,ci:,build:→ No version bump
Examples:
feat(actor): add new combat utility functions
fix(memory): resolve heap allocation bug in ScrapHeap
style: apply automated maintenance (formatting & file lists)Install pre-commit hooks to automatically format code and generate CMake lists:
pip install pre-commit
pre-commit installThis will run before each commit:
- clang-format - Format C/C++ code according to
.clang-format - cmake-generate - Regenerate
cmake/sourcelist.cmakefrom source files
The maintenance workflow runs automatically on:
- Push to
ngbranch - Pull Requests targeting
ngbranch
It performs:
- Code formatting with clang-format
- CMake file list generation
- Auto-commit with message:
style: apply automated maintenance (formatting & file lists)
This ensures PRs can be squash-merged without requiring follow-up maintenance commits.
Version bumps are fully automated using semantic-release based on conventional commits. When changes are merged to ng branch:
- Analyzes commits since last release
- Determines next version number (based on commit types above)
- Updates
vcpkg.jsonandCMakeLists.txtversions - Generates
CHANGELOG.md - Creates GitHub release
- Commits changes with auto-generated message
Note: Semantic versioning is handled by the cycjimmy/semantic-release-action GitHub Action. C++ dependencies are managed in vcpkg.json.
- Create feature branch from
ng - Make changes and commit using conventional commit format
- Push branch - maintenance workflow auto-formats on PR
- Review - ensure CI passes and maintenance commits are applied
- Squash merge - GitHub will preserve conventional commit format
- Automatic release - semantic-release runs on merge to
ng
Format code manually:
clang-format -i -style=file path/to/file.cppRegenerate CMake lists:
python scripts/cmake_generate.pyCheck pending release version:
Review commits since last release using conventional commit types to determine the next version that would be released.
- Follow
.clang-formatconfiguration (enforced by pre-commit) - Use C++23 features where appropriate
- Add header guards to all headers
- Keep lines readable (no strict column limit, but be reasonable)
- Use CRLF line endings (Windows-first project)
- Add tests for new features in
tests/ - Ensure all tests pass before submitting PR
- Consumer integration test validates dependency usage
Open an issue for questions about contributing or the development workflow.