חזרה לכל הפרומפטים
VibeScale React Architecture .cursorrules
חוקי המערכת (System Prompt) שאנחנו שמים בכל פרויקט קליינט. מונע מ-Cursor Agent ליצור קבצים מפלצתיים של 1000 שורות ומכריח אותו לכתוב בצורה מודולרית.
מודל: Cursor (Composer) / Claudeקטגוריה: פיתוח
# VibeScale Core Frontend Rules // View official Cursor documentation: https://docs.cursor.com 1. MODULARITY: Never exceed 200 lines per file. If a component exceeds this, break it down into smaller sub-components in a 'components/' directory. 2. STATE MANAGEMENT: Never place fetch calls directly inside UI components. Use React Context or external state managers (Zustand) for global state, and custom hooks for data fetching. 3. STYLING: When writing Tailwind CSS, prioritize standard tailwind utility classes over arbitrary values (e.g. use p-4 instead of p-[16px]). Avoid adding raw CSS unless absolutely necessary. Keep colors synced with CSS variables. 4. TYPESCRIPT: Always strictly type props and API responses at the top of the file or in a dedicated types file. Avoid 'any'. 5. ERROR HANDLING: Implement Try/Catch blocks for any external call and render grace-fallbacks using error boundaries. Do not crash the entire app if an edge component fails. 6. COMMENTS: Comment complex business logic in English, focusing on 'WHY' not 'WHAT'.
מתי כדאי להשתמש?
הקמת פרויקטים מאפס ב-React / Vite או השתלטות על סטריאוטיפ Lovable.