Repository navigation
Add CLAUDE.md for AI-assisted contributors - #76
Merged
Merged
Conversation
Captures the project conventions that aren't obvious from the code or the README: camelCase style, the python3/explicit-test-file workflow, the PhysicalDevice/DeviceManager/NotificationCenter triad, the per-family base classes, the 7-step recipe for adding a new device (referencing labjackdevice.py), and the patterns to avoid (the half-finished 'commands' dict, the bloated oceaninsight.py, wildcard imports). The goal is to let an LLM-assisted contributor produce code that matches existing conventions without having to derive them from scattered evidence across the codebase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a top-level
CLAUDE.mddocumenting the project conventions that aren't derivable from the code or covered by the existing README docs.The goal is to let an LLM-assisted contributor produce code that matches existing conventions on the first try, rather than having to derive them from scattered evidence across the codebase.
What's in it
python3(notpython), the explicit-filename pytest workflow, the hardware-skip test convention from PRs Fixing tests #65/Hamamatsu photon counter #66.PhysicalDevice/DeviceManager/NotificationCentertriad and the communication layer.do*methods for each family.labjackdevice.pyas the canonical reference.commandsdict (onlyIntegraDeviceandEchoDeviceuse it), the bloatedoceaninsight.py, wildcard imports.masternotmain, per-bug commits with Problem/Solution bodies (template: PR Fix 10 latent bugs uncovered by static review #74).Editorial calls worth noting
commandsdict is documented as experimental. New devices are told not to adopt it until thesend-side-migrationbranch lands. Flip this if you'd rather push new devices toward the pattern.labjackdevice.pyis the canonical reference for adding a device. Becomes stale if that file regresses.oceaninsight.pyis called out by name as a file not to copy from.Test plan
CLAUDE.mdcontent🤖 Generated with Claude Code