Repository navigation
Add naming and option-unit rules to adaptor guidance - #1834
Closed
jackohilts wants to merge 1 commit into
Closed
jackohilts wants to merge 1 commit into
jackohilts wants to merge 1 commit into
Conversation
From review of the openstreetmap adaptor (#1833): name functions with a verb for what they do rather than after the endpoint they call, and put the unit in option names that have one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01De8BkeiGnA7aM4fARhetDC
Collaborator
|
Hey @jackohilts thanks for the suggestion, I have incorporated you suggestion in this pr #1829 |
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 two rules from mtuchi's review of the openstreetmap adaptor (#1833) to the adaptor generation and review guidance. Stacked on #1829: it targets that branch and adds to the Design Rules section #1829 introduces.
Details
The two rules:
runQuery, notinterpreter. This applies to helpers inUtils.jstoo.timeoutMsandqueryTimeoutSeconds, and never two options with the same name in different units. In Add openstreetmap adaptor (read-only, via the Overpass API) #1833,RequestOptions.timeoutwas in milliseconds andQueryOptions.timeoutwas in seconds.Where they go:
claude.md: two new bullets under Design Rules, so generation applies them.wiki/best-practice.md: a new "Naming" section under Common Patterns, with the reasoning.wiki/code-review.md: two checklist items under API design, linking to the new section. Both are at the default severity for API design (Recommended).The rules apply to new code. Common's
requestkeeps its existingtimeout(ms) option.Notes:
claude.mdand both wiki files already failprettier --checkon Improve adaptor generation and review guidance #1829's branch. I left that alone to keep this diff to the 24 added lines.AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to
know!):
You can read more details in our
Responsible AI Policy
Review Checklist
Before merging, the reviewer should check the following items:
production? Is it safe to release?
dev only changes don't need a changeset.
pnpm run versionused to bump versions (notpnpm changeset versiondirectly)? This ensures changelog dates are stamped correctly.Generated by Claude Code