Skip to content

chore: improve cursor prompts #4028

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

Open
wants to merge 1 commit into
base: spectrum-two
Choose a base branch
from

Conversation

castastrophe
Copy link
Collaborator

Description

Added structured rules configuration for Cursor to enforce consistent formatting in documentation and Jira tickets. This includes:

  • JSON configuration for enforcing text formatting rules
  • Standardized templates for Jira tickets
  • Automated validation of ticket structure and labels
  • Documentation for rule usage and maintenance

Motivation and context

This change provides automated enforcement of our documentation standards and Jira ticket formatting, ensuring consistency across the project. It helps team members create well-structured tickets and maintain consistent documentation formatting without manual oversight.

Related issue(s)

  • fixes CSS-1222

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have included updated documentation in the form of README.md and rules.json.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Verify Jira ticket formatting rules

    1. Create a new Jira ticket
    2. Attempt to use title case in headings
    3. Verify Cursor enforces sentence case with appropriate exceptions
  • Verify template enforcement

    1. Create a new bug report
    2. Skip required fields
    3. Verify Cursor requires all mandatory sections
  • Verify label validation

    1. Add a non-standard label to a ticket
    2. Verify Cursor flags invalid labels
    3. Confirm allowed labels are accepted

Copy link

changeset-bot bot commented Jul 11, 2025

⚠️ No Changeset found

Latest commit: 61f9257

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@castastrophe castastrophe force-pushed the castastrophe/chore-cursor-utilities-css-222 branch from 4ff40e7 to 9acc449 Compare July 11, 2025 18:49
@castastrophe castastrophe self-assigned this Jul 11, 2025
@castastrophe castastrophe added skip_vrt Add to a PR to skip running VRT (but still pass the action) ready-for-review labels Jul 11, 2025
Copy link
Contributor

github-actions bot commented Jul 11, 2025

File metrics

Summary

Total size: 1.43 MB*

🎉 No changes detected in any packages

* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

Copy link
Contributor

github-actions bot commented Jul 11, 2025

📚 Branch preview

PR #4028 has been deployed to Azure Blob Storage: https://spectrumcss.z13.web.core.windows.net/pr-4028/index.html.

@castastrophe castastrophe force-pushed the castastrophe/chore-cursor-utilities-css-222 branch from 9acc449 to 61f9257 Compare July 11, 2025 19:00
Copy link
Member

@cdransf cdransf left a comment

Choose a reason for hiding this comment

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

Looks good! ✨

(With the caveat that I'm not using Cursor.)

Comment on lines +46 to +49
1. Cursor will automatically enforce these rules while editing relevant files; however, if you wish to enable a rule that is not triggered by default, you can do so by `@` mentioning it in the chat.
2. Rules can be toggled using the `enabled` flag
3. Custom error messages will be shown when rules are violated
4. Exceptions are handled through the `exceptions` field in relevant rules
Copy link
Collaborator

Choose a reason for hiding this comment

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

Super nitpicky- the bullet points have mixed punctuation right now, with one being punctuated, and then the others not being punctuated. How do you feel about adding punctuation to all of them? Or would you rather have them all without punctuation?


### Jira tickets

- **ticket_title**: Validates Jira ticket title format
Copy link
Collaborator

Choose a reason for hiding this comment

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

This probably should correspond to title_format in the mdc file.

2. Auto-fix results based on settings defined by the `../../stylelint.config.js` unless it requires rewriting more than 30% of the line. Changes that impact more than 30% of the original content should prompt for update.
3. Copyrights should reflect the current year.
4. Comments added should always use sentence, never title case.
5. Any files removed should also be removed from the exports of the component's package.json.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Take it or leave it:

Suggested change
5. Any files removed should also be removed from the exports of the component's package.json.
5. Any files removed should also be removed from the exports of the component's `package.json`.

alwaysApply: true
---

1. Follow rules outlined in the `../../STYLING.md` file.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a STYLING.md file? Am I missing it somewhere? Is a guide in the storybook directory? 👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh haha no! I think that's actually an SWC thing. I should find a CSS-comparable document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review skip_vrt Add to a PR to skip running VRT (but still pass the action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants