Skip to content

Docs: Claude Code driver authoring guide - #14

Merged
frahlg merged 1 commit into
masterfrom
docs-driver-catalog
Apr 15, 2026
Merged

frahlg merged 1 commit into
masterfrom
docs-driver-catalog

Conversation

@frahlg

@frahlg frahlg commented Apr 15, 2026

Copy link
Copy Markdown
Member

Summary

  • New docs/writing-a-driver-with-claude-code.md: a hands-on recipe for contributors using Claude Code to bootstrap a new 42W Lua driver from a vendor-supplied Modbus or MQTT register map. Covers prerequisites, the starter prompt (with catalog-loader iteration step), a 15-item porting checklist, common Claude Code pitfalls (single-arg host.log, missing endianness suffix on decoders, missing set_sn / driver_default_mode, bare modbus_read, wrong sign convention), a sim + curl + log-tail iteration loop, and PR review criteria.
  • New "Driver development" section in README.md (placed after Quick Start) linking the new guide alongside docs/writing-a-driver.md and the two reference drivers.

Test plan

  • cd go && go test ./... passes locally (all packages green).
  • Rendered markdown reviewed — all relative links resolve to existing files. docs/testing-drivers-live.md is an intentional forward reference to a sibling unit currently under development.
  • Guide length 253 lines (under the 300-line budget).

Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

Adds docs/writing-a-driver-with-claude-code.md — a hands-on recipe
for using Claude Code to bootstrap a new 42W Lua driver from a
vendor-supplied Modbus or MQTT register map. Covers prerequisites,
a prompt recipe (including the starter prompt and catalog-loader
iteration), a 15-item porting checklist, pitfalls Claude Code
falls into (single-arg host.log, missing endianness suffix on
decoders, missing set_sn/default_mode, bare modbus_read, wrong
sign convention), a sim + curl + log-tail iteration loop, and PR
review criteria.

Links the new guide from README.md under a new "Driver development"
section placed after Quick Start.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@frahlg
frahlg force-pushed the docs-driver-catalog branch from 0828039 to a086fca Compare April 15, 2026 08:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0828039cff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/driver-catalog.md Outdated
Comment on lines +9 to +10
17 drivers covering 15 manufacturers across 2 protocols. Read-only: 11.
With control: 6.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align shipped-driver counts with repository state

This section declares 17 shipped drivers across 15 manufacturers, but the repository currently only contains two Lua drivers under drivers/ (ferroamp.lua and sungrow.lua). Since this new catalog is linked as the authoritative support list, readers will be told devices are supported when no driver file exists, which can send integrations down a dead path. Please either restrict the catalog/counts to checked-in drivers or clearly mark non-existent entries as planned.

Useful? React with 👍 / 👎.

Comment on lines +79 to +80
Now run `cd go && go test -count=1 -run TestCatalog ./internal/drivers/`
and fix anything the catalog loader rejects.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace nonexistent catalog test command

The guide asks contributors to run go test -count=1 -run TestCatalog ./internal/drivers/, but there is no TestCatalog test in go/internal/drivers, so this command does not validate catalog parsing as described. That gives a false pass signal and can let malformed DRIVER metadata through this checkpoint; the doc should reference an actual test target (or add one) for catalog-loader validation.

Useful? React with 👍 / 👎.

@frahlg
frahlg merged commit 7ba0d58 into master Apr 15, 2026
@frahlg
frahlg deleted the docs-driver-catalog branch April 15, 2026 08:40
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant