Repository conventions: preferences, CLAUDE.md, headers, formatting #1
No assignees
Labels
No labels
area/build
area/content
area/editor
area/engine
area/graphics
area/platform
area/repo-wide
area/tests
area/tools
bug
optional
roadmap
size/L
size/M
size/S
No project
No milestone
Blocks
#2 CMake build for Linux next to MSBuild, warnings as errors, pinned downloads
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Every later issue writes code under these rules. In the fork they arrived after the port, and a lot of code was reworked to meet them (casts,
const, trailing return types, include order). Setting them first means nothing is written twice.Decided
consteverywhere it fits,::Foo()for global calls,std::for C library calls, braces on every body, designated initializers,std::expectedfor fallible functions (never.value()), no issue numbers in code comments..clang-formatwithInsertBracesand sorted, grouped includes;.editorconfigfor the editors.CLAUDE.mdholds what the repo is, how to build, test and run, and the current state. The rules live in.claude/rules/, one file per topic, which Claude Code loads on its own (area files are limited to their folders withpaths:frontmatter). Both are shared state between the two machines..claude/rules/is the canonical rulebook; the wiki holds the history and the evidence behind each rule. New decisions go into the rule file for their topic..git-blame-ignore-revs.Read first
masterfor the existing style:Engine/Common/CommonHeaders.h,Engine/Components/Entity.cpp.Steps
.claude/rules/(workflow, cpp-style, error-handling, comments-headers, formatting-lint, architecture, and area files withpaths:for ECS/actors, reflection, renderer, ContentTools, editor). Drop what only applied to the fork's history (Avalonia notes, the WPF editor's C# rules beyond "frozen", Gitea, old issue numbers), and keep every code rule.CLAUDE.md: what Primal_Plus_Plus is, where things are, how the issues work (milestones, the roadmap issue). Keep it short; the rules are in.claude/rules/..clang-formatand.editorconfigfrom the fork. Run clang-format over a single file you will touch soon and read the diff, so you know what the style does..git-blame-ignore-revs(empty for now) and tell git to use it:git config blame.ignoreRevsFile .git-blame-ignore-revs.Done when
.claude/rules/,CLAUDE.md,.clang-format,.editorconfigand.git-blame-ignore-revsare committed.std::expectedwere chosen.Claude can help with
.claude/rules/: Claude drafts the files and marks what's fork-only; you review and trim.Learn
InsertBracesand include categories do.std::expectedinstead of exceptions in an engine built without exceptions on MSVC.