Skip to content

OCM-00000 | chore: add cursor rules#1087

Open
amandahla wants to merge 1 commit intoterraform-redhat:mainfrom
amandahla:OCM-00000-cursor-rules
Open

OCM-00000 | chore: add cursor rules#1087
amandahla wants to merge 1 commit intoterraform-redhat:mainfrom
amandahla:OCM-00000-cursor-rules

Conversation

@amandahla
Copy link

PR Summary

This PR adds 3 files containing rules for Go and Terraform Provider development.

The Go file is based on Effective Go, Code Reviews and the project CONTRIBUTE.md file
The Terraform ones are based on the Terraform documentation available at https://github.com/hashicorp/web-unified-docs
I cloned the repo and used Claude for creating rules based on the content.

Detailed Description of the Issue

Create a standard for PR reviews.

Related Issues and PRs

  • Jira: OCM-XXXXX
  • Fixes: #
  • Related PR(s):
  • Related design/docs:

Type of Change

  • feat - adds a new user-facing capability.
  • fix - resolves an incorrect behavior or bug.
  • docs - updates documentation only.
  • style - formatting or naming changes with no logic impact.
  • refactor - code restructuring with no behavior change.
  • test - adds or updates tests only.
  • chore - maintenance work (tooling, housekeeping, non-product code).
  • build - changes build system, packaging, or dependencies for build output.
  • ci - changes CI pipelines, jobs, or automation workflows.
  • perf - improves performance without changing intended behavior.

Previous Behavior

Behavior After This Change

How to Test (Step-by-Step)

Using Cursor, you can test with a prompt like

@branch Review this PR using .cursor/rules/terraform.mdc, go.mdc, and terraform_tests.mdc. For each issue give: Problem / Suggested fix / Why (best practice). Do not approve until the checklists are satisfied.

Preconditions

Test Steps

Expected Results

Proof of the Fix

  • Screenshots:
  • Videos:
  • Logs/CLI output:
  • Other artifacts:

Breaking Changes

  • No breaking changes
  • Yes, this PR introduces a breaking change (describe impact and migration plan below)

Breaking Change Details / Migration Plan

Developer Verification Checklist

  • Commit subject/title follows [JIRA-TICKET] | [TYPE]: <MESSAGE>.
  • PR description clearly explains both what changed and why.
  • Relevant Jira/GitHub issues and related PRs are linked.
  • Tests were added/updated where appropriate.
  • I manually tested the change.
  • make test passes.
  • make fmt passes.
  • make build passes.
  • Documentation was added/updated where appropriate.
  • Any risk, limitation, or follow-up work is documented.

@openshift-ci
Copy link

openshift-ci bot commented Mar 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign davidleerh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link

openshift-ci bot commented Mar 13, 2026

@amandahla: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-presubmits-images c2d131b link true /test e2e-presubmits-images
ci/prow/e2e-images c2d131b link true /test e2e-images
ci/prow/e2e-presubmits-rosa-hcp-advanced-critical-high-presubmit c2d131b link true /test e2e-presubmits-rosa-hcp-advanced-critical-high-presubmit
ci/prow/e2e-presubmits-rosa-sts-advanced-critical-high-presubmit c2d131b link true /test e2e-presubmits-rosa-sts-advanced-critical-high-presubmit
ci/prow/e2e-presubmits-rosa-sts-private-critical-high-presubmit c2d131b link true /test e2e-presubmits-rosa-sts-private-critical-high-presubmit
ci/prow/e2e-presubmits-rosa-hcp-private-critical-high-presubmit c2d131b link true /test e2e-presubmits-rosa-hcp-private-critical-high-presubmit

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@olucasfreitas
Copy link
Contributor

@amandahla thanks for coming up with this one, I already had this planned, but now that you have picked it up, could you please take a look:

https://github.com/openshift/hypershift/tree/main/.claude
https://github.com/openshift/hypershift/tree/main/.cursor/rules
https://github.com/openshift/hypershift/blob/main/AGENTS.md
https://github.com/openshift/hypershift/blob/main/CLAUDE.md
https://github.com/openshift/hypershift/blob/main/GEMINI.md
https://github.com/openshift/hypershift/blob/main/HACKING.md

I think here we could address files for Claude, with the init file and the others, cursor, gemini and the other examples I gave here, I mainly like the 100 go mistakes, also, please create an epic for this, since I think we should do this for all the 4 repos we maitain (CLI,TF,HCP module, Classic module)

@amandahla
Copy link
Author

@amandahla thanks for coming up with this one, I already had this planned, but now that you have picked it up, could you please take a look:

https://github.com/openshift/hypershift/tree/main/.claude https://github.com/openshift/hypershift/tree/main/.cursor/rules https://github.com/openshift/hypershift/blob/main/AGENTS.md https://github.com/openshift/hypershift/blob/main/CLAUDE.md https://github.com/openshift/hypershift/blob/main/GEMINI.md https://github.com/openshift/hypershift/blob/main/HACKING.md

I think here we could address files for Claude, with the init file and the others, cursor, gemini and the other examples I gave here, I mainly like the 100 go mistakes, also, please create an epic for this, since I think we should do this for all the 4 repos we maitain (CLI,TF,HCP module, Classic module)

Hi, thanks for sharing these resources, they look great.
Proposal: Let's merge this PR with these rules as a starting point, especially since it provides specific guidance for Terraform providers. In the meantime, I’ll create the Epic to standardize the AI settings across our repos. WDYT

@olucasfreitas
Copy link
Contributor

@amandahla most of the files I mentioned are pretty standard and would just take a good read and copying and pasting them into our repo here, I think this PR can include all of the AI rules necessary for this, because these are simple files to read and review, we can include all of them and make this PR an example for other repos.

I agree with you on the epic creation, please create one, and add 4 tasks, each one related to their repos next release, so we can better track this, after you would just change the jira ticket of this PR and commit.

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.

2 participants