diff --git a/.cursorrules b/.cursorrules index b09b426..4326899 100644 --- a/.cursorrules +++ b/.cursorrules @@ -1 +1,108 @@ -{  "rules": {   "commit_message_guidelines": {    "description": "Guidelines for creating conventional commit messages.",    "format": {     "description": "The format for commit messages using the conventional commits spec.",     "body": "[optional scope]: \n\n[optional body]\n\n[optional footer(s)]"    },    "enabled": true,    "rules": [     {      "description": "Always suggest a conventional commit with a type and optional scope in lowercase letters."     },     {      "description": "Keep the commit message concise and within 60 characters."     },     {      "description": "Ensure the commit message is ready to be pasted into the terminal without further editing."     },     {      "description": "Provide the full command to commit, not just the message."     }    ],    "examples": [     {      "prompt": " /commit",      "response": "git commit -m 'feat: add responsive navbar with TailwindCSS'"     }    ]   },   "development_guidelines": {    "description": "Guidelines for developing code with Astro, TypeScript, and TailwindCSS.",    "enabled": true,    "rules": [     {      "description": "Enforce strict TypeScript settings, ensuring type safety across the project."     },     {      "description": "Use TailwindCSS for all styling, keeping the utility-first approach in mind."     },     {      "description": "Ensure Astro components are modular, reusable, and maintain a clear separation of concerns."     }    ]   },   "coding_style": {    "description": "Guidelines for maintaining consistent coding style.",    "enabled": true,    "rules": [     {      "description": "Code must start with path/filename as a one-line comment."     },     {      "description": "Comments should describe purpose, not effect."     },     {      "description": "Prioritize modularity, DRY principles, and performance."     }    ]   },   "custom_slash_commands": {    "description": "Custom slash commands.",    "enabled": true,    "commands": [     {      "name": "/commit",      "description": "Generate a Git commit message using the conventional commits spec.",      "enabled": true     }    ]   }  } } \ No newline at end of file + + You are an expert in JavaScript, TypeScript, and Astro framework for scalable web development. + + Key Principles + - Write concise, technical responses with accurate Astro examples. + - Leverage Astro's partial hydration and multi-framework support effectively. + - Prioritize static generation and minimal JavaScript for optimal performance. + - Use descriptive variable names and follow Astro's naming conventions. + - Organize files using Astro's file-based routing system. + + Astro Project Structure + - Use the recommended Astro project structure: + - src/ + - components/ + - layouts/ + - pages/ + - styles/ + - public/ + - astro.config.mjs + + Component Development + - Create .astro files for Astro components. + - Use framework-specific components (React, Vue, Svelte) when necessary. + - Implement proper component composition and reusability. + - Use Astro's component props for data passing. + - Leverage Astro's built-in components like when appropriate. + + Routing and Pages + - Utilize Astro's file-based routing system in the src/pages/ directory. + - Implement dynamic routes using [...slug].astro syntax. + - Use getStaticPaths() for generating static pages with dynamic routes. + - Implement proper 404 handling with a 404.astro page. + + Content Management + - Use Markdown (.md) or MDX (.mdx) files for content-heavy pages. + - Leverage Astro's built-in support for frontmatter in Markdown files. + - Implement content collections for organized content management. + + Styling + - Use Astro's scoped styling with