diff --git a/.cursor/rules/rule-writing-guide.mdc b/.cursor/rules/rule-writing-guide.mdc deleted file mode 100644 index 7c2c484..0000000 --- a/.cursor/rules/rule-writing-guide.mdc +++ /dev/null @@ -1,44 +0,0 @@ ---- -description: creating new Cursor Project Rules (.mdc files) -globs: -alwaysApply: false ---- -## Purpose - -This meta-rule provides structured guidance for generating `.mdc` files that define Cursor Project Rules. It aims to ensure consistency, clarity, and adaptability across diverse codebases, with particular attention to projects utilizing CFD frameworks. - -## Applicability - -Utilize this meta-rule when: - -- Establishing new coding conventions or architectural patterns within your project. -- Documenting project-specific workflows or standards. -- Providing the AI with structured context to enhance code generation and assistance. @basilisk.ft - -## Instructions for Creating a Cursor Project Rule - -1. YAML Frontmatter: Begin each `.mdc` file with a YAML frontmatter block containing: - - `title`: A concise, descriptive title for the rule. - - `description`: A brief explanation of the rule's purpose and scope. - - `glob`: File pattern(s) that the rule should apply to. - -2. Content Structure: Organize the rule's content using markdown headings: - - Introduction: Explain the rationale behind the rule and its relevance to the project. - - Guidelines: Detail the specific standards, conventions, or procedures to follow. - - Examples: Provide code snippets or references to illustrate correct implementation. - - Common Pitfalls: Highlight frequent mistakes and how to avoid them. - -3. Language and Tone: Use clear, concise language. Maintain an academic and logical tone, focusing on precision and clarity. - -4. Formatting: Utilize markdown syntax appropriately: - - Use fenced code blocks with language identifiers for code examples. - - Employ bullet points or numbered lists for enumerations. - - Ensure proper indentation and spacing for readability. - -5. File Naming: Name the `.mdc` file using lowercase letters and hyphens (kebab-case), reflecting the rule's focus (e.g., `coding-standards.mdc`). - -6. Save files in .cursor/rules/ - -## Example Prompt - -"Using the Meta-Rule for Crafting Cursor Project Rules based on our conversation here, create a new rule that outlines the coding standards for header files, including indentation, naming conventions, and documentation practices." \ No newline at end of file diff --git a/.gitignore b/.gitignore index b5aefbc..0c07546 100644 --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,4 @@ scripts/blog_content.json .Spotlight-V100 .Trashes ehthumbs.db -Thumbs.db -CLAUDE.md +Thumbs.db \ No newline at end of file diff --git a/.windsurf/rules/css-style.md b/.windsurf/rules/css-style.md new file mode 100644 index 0000000..4db3aef --- /dev/null +++ b/.windsurf/rules/css-style.md @@ -0,0 +1,62 @@ +--- +trigger: model_decision +description: whenever any *.css file is changed +globs: +--- +## Introduction + +These guidelines establish consistent CSS coding practices, ensuring maintainable and responsive styles across the website. + +## Guidelines + +### CSS Variables +- Define colors and typography in `:root` +```css +:root { + --primary-color: #007bff; + --font-family-base: 'Arial', sans-serif; + --spacing-unit: 1rem; +} +``` + +### Responsive Design +- Use mobile-first approach for media queries +- Implement breakpoints at: + - 500px (mobile) + - 768px (tablet portrait) + - 900px (tablet landscape) + - 1300px (desktop) + - 1700px (large desktop) + +### Units and Measurements +- Use `rem` units for font sizes and spacing +- Use relative units for flexible layouts +- Use percentages for fluid widths + +### Example Media Query Structure +```css +/* Mobile first base styles */ +.component { + width: 100%; +} + +/* Tablet portrait */ +@media (min-width: 768px) { + .component { + width: 50%; + } +} + +/* Desktop */ +@media (min-width: 1300px) { + .component { + width: 33.33%; + } +} +``` + +## Common Pitfalls +- Using pixel units instead of relative units +- Not following mobile-first approach +- Hardcoding colors and typography instead of using CSS variables +- Inconsistent breakpoint usage \ No newline at end of file diff --git a/.windsurf/rules/general-code-style.md b/.windsurf/rules/general-code-style.md new file mode 100644 index 0000000..a9d926f --- /dev/null +++ b/.windsurf/rules/general-code-style.md @@ -0,0 +1,45 @@ +--- +trigger: always_on +description: +globs: +--- +## Introduction + +These guidelines establish fundamental coding standards that apply across all file types in the project, ensuring consistency and maintainability. + +## Guidelines + +### Indentation and Formatting +- Use 2-space indentation consistently across all files +- Maintain consistent spacing around operators and blocks +- Follow language-specific formatting conventions + +### Code Organization +- Follow DRY (Don't Repeat Yourself) principles +- Reuse components, variables, and styles where possible +- Keep related code grouped together logically + +### Documentation +- Add comments for complex logic +- Write self-documenting code where possible +- Use clear, descriptive names for variables, functions, and components + +## Examples + +```javascript +// Good - Self-documenting code with clear naming +const calculateTotalPrice = (basePrice, taxRate) => { + return basePrice * (1 + taxRate); +}; + +// Bad - Unclear naming and unnecessary comments +const calc = (p, t) => { + // multiply price by tax + return p * (1 + t); +}; +``` + +## Common Pitfalls +- Inconsistent indentation across different file types +- Code duplication instead of component reuse +- Over-commenting obvious code while under-documenting complex logic \ No newline at end of file diff --git a/.windsurf/rules/html-markdown-style.md b/.windsurf/rules/html-markdown-style.md new file mode 100644 index 0000000..b773f51 --- /dev/null +++ b/.windsurf/rules/html-markdown-style.md @@ -0,0 +1,44 @@ +--- +trigger: always_on +description: +globs: +--- + ## Introduction + +These guidelines ensure consistent and semantic markup across HTML templates and Markdown content files, promoting accessibility and maintainability. + +## Guidelines + +### HTML Structure +- Use semantic HTML elements appropriately + - `
` for page headers + - `