Skip to content

Adopt next's CLAUDE.md on main (includes #1144) - #1162

Merged
fanchercm merged 2 commits into
mainfrom
docs/claude-md-coding-rules-main
Nov 25, 2026
Merged

fanchercm merged 2 commits into
mainfrom
docs/claude-md-coding-rules-main

Conversation

@fanchercm

@fanchercm fanchercm commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Brings the Claude Code instructions on main to the state they have on next: the same CLAUDE.md, tests/CLAUDE.md and .github/copilot-instructions.md, plus docs/developer/source/code_style.rst, which CLAUDE.md links to.

Two commits:

  1. CLAUDE.md: adopt five coding rules from the #1132 review; add the Copilot mirror #1144 (b583287c), cherry-picked: the five coding rules from the NXstress writes the calibration file's detector chain (#1099) #1132 review, and the Copilot mirror.
  2. The rest of next's version of these files, taken as is: the constitution, the Deferred defects principle, the test-tier section moved to tests/CLAUDE.md, and the full code style moved to the developer docs. The four files are now identical to origin/next.

Things in the instructions that this branch does not have yet

Because the files are taken as is, they mention items that belong to other changes on next:

Documentation only: no code or tests change.

Assisted-by: Claude Code

…ilot mirror

Adds five rules after "Code Quality Standards", proposed in the review of
#1132 and adopted by the maintainer:
- `None` must name a value, not a gap
- Keyword-only arguments
- Import placement
- Private names do not cross module boundaries
- Named states are literals, not free text

Adapted from the proposal: rule 5 has no UNKNOWN member, and a stored
string that is not a member is rejected, not mapped to a fallback (the
maintainer's decision for calibrations, #1141). Rule 4's NXstress file list
names only files on `next`. A review pass corrected factual claims (existing
functions already cross the keyword-only threshold; three deferred imports
in _peaks.py; one source default, in HidraSetup), "Three things", and the
examples' return type hints.

Adds .github/copilot-instructions.md, which CLAUDE.md has always named as
its mirror but which did not exist: the same text, with links relative to
.github/.

Refs #1132

(cherry picked from commit b583287, the #1144 change; applied to main)

Assisted-by: Claude Code
Bring the Claude Code instructions here to the state they have on next, as
requested: the constitution, the `Deferred defects` principle, the four-tier
test section moved to tests/CLAUDE.md, and the code style that
CLAUDE.md links to in docs/developer/source/code_style.rst. The Copilot mirror
already matched.

Taken as is from origin/next, so several things they mention (the
ring_calibration marker and test-ci-* tasks, docs/deferred_defects.md, pytest-xdist
settings) belong to other changes that are not on this branch.

Assisted-by: Claude Code
@fanchercm fanchercm changed the title CLAUDE.md: adopt five coding rules from the #1132 review (backport of #1144 to main) Adopt next's CLAUDE.md on main (includes #1144) Nov 25, 2026
@fanchercm
fanchercm merged commit 6a69ae8 into main Nov 25, 2026
7 checks passed
@fanchercm
fanchercm deleted the docs/claude-md-coding-rules-main branch November 25, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant