agentleFS
robotostudiorobotostudio/turbo-start-sanity/.cursor/rules/frontend-rules.mdc

turbo-start-sanity / rules

Cursor rule185 starsChanged 2 months agoMITView on GitHub

Only apply these rules when specifically asked about internationalization: For buttons with directional arrows, use an RTL prop to correctly handle horizontal inversion.

We split this frontend-rules.mdc into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer grid over flex unless working with two sibling tags

    line 8
  2. Very specific:

    Use flex for simple parent-child layouts:

    line 9
  3. Distinctive:

    Always use appropriate semantic HTML

    line 18
  4. Very specific:

    Use SanityImage for any images generated in Sanity if the component is available

    line 19
  5. Very specific:

    Use Buttons.tsx resolver for any buttons unless specified otherwise

    line 20
  6. Distinctive:

    Only apply these rules when specifically asked about internationalization:

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
frontend-rules.mdc
---
description: 
globs: apps/web/**.*
alwaysApply: false
---
### Component Structure

- Prefer `grid` over `flex` unless working with two sibling tags
- Use `flex` for simple parent-child layouts:

```jsx
<div>
  <img />
  <p>Some text</p>
</div>
```

- Always use appropriate semantic HTML
- Use `SanityImage` for any images generated in Sanity if the component is available
- Use `Buttons.tsx` resolver for any buttons unless specified otherwise

## Internationalization Rules

Only apply these rules when specifically asked about internationalization:

| Replace | With |
|---------|------|
| left | start |
| right | end |
| ml | ms |
| mr | me |
| pl | ps |
| pr | pe |
| border-l | border-s |
| border-r | border-e |
| text-left | text-start |
| text-right | text-end |
| float-left | float-start |
| float-right | float-end |

For buttons with directional arrows, use an RTL prop to correctly handle horizontal inversion.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.