-
Notifications
You must be signed in to change notification settings - Fork 97
feat: add cursor rules for idiomatic go code #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add cursor rules for idiomatic go code #77
Conversation
Add .cursor/rules/ directory with idiomatic-go.mdc rule file that instructs Cursor AI to follow Effective Go guidelines when writing Go code. The rule references https://go.dev/doc/effective_go and includes: - Required actions (gofmt, go vet, naming conventions) - Common anti-patterns to avoid - Links to authoritative Go style guides This ensures all Go code written in this repository follows idiomatic Go practices. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this file be .md instead of .mdc ?
Nice PR btw was looking to add something similar like this :)
No, .mdc is correct - https://cursor.com/docs/context/rules#rule-anatomy |
|
It would be nice to somehow let this knowledge be shared with a claude agent we define in the root folder https://github.com/openshift-eng/ai-helpers/tree/main/agents that then every plugin can take advantage of |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
There's no |
|
@stbenjam this is intended to be an example of a Cursor rule. I was assuming they didn't need to copy the rule and could just follow https://github.com/openshift-eng/ai-helpers/blob/main/README.md#using-cursor instead. |
|
Oh I see -- a cursor rules for multiple repos. Those instructions only cover commands, is it pulling in the rules for you? It didn't work for me. The instructions in the README are kind of hacky, since the repo isn't structured really well for cursor and commands show up like "/ai-helpers/plugins/ci/commands/trigger-periodic" (and it doesn't understand skills). |
What this PR does / why we need it:
This PR adds Cursor rules support to the repository by creating the
.cursor/rules/directory structure and adding anidiomatic-go.mdcrule file.The rule instructs Cursor's AI to follow Effective Go guidelines when writing Go code, ensuring all Go code in this repository is idiomatic and follows best practices.
Changes:
.cursor/rules/directory (per Cursor's official recommendation)idiomatic-go.mdcrule that references Effective GoWhich issue(s) this PR fixes:
N/A - Infrastructure improvement
Special notes for your reviewer:
.cursor/rules/directory structure (not the legacy.cursorrulesfile).mdc(Markdown Context) extension as recommended by CursorChecklist:
🤖 Generated with Claude Code