Skip to content

Add CLAUDE.md for AI-assisted contributors - #76

Merged
dccote merged 1 commit into
masterfrom
add-claude-md
May 18, 2026
Merged

dccote merged 1 commit into
masterfrom
add-claude-md

Conversation

@dccote

@dccote dccote commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a top-level CLAUDE.md documenting 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

  • Style — camelCase everywhere, no docstrings on obvious code, no inline what-it-does comments, no wildcard imports in new code, descriptive parameter names.
  • Running things — python3 (not python), the explicit-filename pytest workflow, the hardware-skip test convention from PRs Fixing tests #65/Hamamatsu photon counter #66.
  • Architecture — the PhysicalDevice / DeviceManager / NotificationCenter triad and the communication layer.
  • Device families table — folder, base class, and required do* methods for each family.
  • Adding a new device — a 7-step recipe pointing at labjackdevice.py as the canonical reference.
  • Patterns to avoid — the half-finished commands dict (only IntegraDevice and EchoDevice use it), the bloated oceaninsight.py, wildcard imports.
  • Branch hygiene — master not main, per-bug commits with Problem/Solution bodies (template: PR Fix 10 latent bugs uncovered by static review #74).

Editorial calls worth noting

  • The commands dict is documented as experimental. New devices are told not to adopt it until the send-side-migration branch lands. Flip this if you'd rather push new devices toward the pattern.
  • labjackdevice.py is the canonical reference for adding a device. Becomes stale if that file regresses.
  • oceaninsight.py is called out by name as a file not to copy from.

Test plan

  • Visual review of CLAUDE.md content
  • Confirm Claude Code (or another LLM agent) actually loads this file when working in the repo
  • Optional: sanity-check that recommendations match the codebase as of merging this PR

🤖 Generated with Claude Code

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>
@dccote
dccote merged commit a8a814a into master May 18, 2026
@dccote
dccote deleted the add-claude-md branch May 18, 2026 16:02
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