diff --git a/README.md b/README.md index 2e4c9b12..8c64adcb 100644 --- a/README.md +++ b/README.md @@ -61,3 +61,9 @@ Then run: ```bash npm run generate-icons ``` + +## Update built-in prompt presets: + +```bash +npm run fetch-prompt-presets +``` diff --git a/package.json b/package.json index e491f820..41b7c15d 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "build": "tsc -b && vite build", "generate-client": "npm run fetch-openapi-schema && npm run openapi-ts", "fetch-openapi-schema": "curl https://raw.githubusercontent.com/stacklok/codegate/refs/heads/main/api/openapi.json > src/api/openapi.json", + "fetch-prompt-presets": "curl https://raw.githubusercontent.com/stacklok/prompt-library/refs/heads/main/rules.json> ./src/features/workspace/constants/built-in-system-prompts.json", "openapi-ts": "openapi-ts", "knip": "knip", "lint": "eslint .", diff --git a/src/features/header/components/header-status-menu.tsx b/src/features/header/components/header-status-menu.tsx index c39b16fa..98d47317 100644 --- a/src/features/header/components/header-status-menu.tsx +++ b/src/features/header/components/header-status-menu.tsx @@ -264,7 +264,7 @@ function StatusPopover({ data: ReturnType['data'] }) { return ( - +
- {item.contributors.map((contributor) => ( - - - {contributor} + {item.readme ? ( + + README.md - ))} + ) : ( + item.commiters.map((contributor) => ( + + + {contributor} + + )) + )}
```After:```html```Svelte 4 vs. Svelte 5:Before:```html

{a} + {b} = {sum}

```After:```html

{a} + {b} = {sum}

```Svelte 4 vs. Svelte 5:Before:```html

{a} + {b} = {sum}

```After:```html

{a} + {b} = {sum}

```Svelte 5:```html{count}```Svelte 5:```html
{JSON.stringify(others)}
```Svelte 4 vs. Svelte 5:Before:```html
{#each messages as message}

{message}

{/each}
```After:```html
{#each messages as message}

{message}

{/each}
```Svelte 5:```html```Passing content using snippets:```html```", - "contributors": ["PatrickJS"] + "text": "I'm using svelte 5 instead of svelte 4 here is an overview of the changes.\n\nSvelte 5 introduces runes, a set of advanced primitives for controlling reactivity. The runes replace certain non-runes features and provide more explicit control over state and effects.\n\nSnippets, along with render tags, help create reusable chunks of markup inside your components, reducing duplication and enhancing maintainability.\n\nSure! Here are the succinct instructions for handling Event Handlers in Svelte 5, tailored for the AI-integrated code editor to help it understand and utilize these features effectively.\n\nIn Svelte 5, event handlers are treated as properties, simplifying their use and integrating them more closely with the rest of the properties in the component.\n\nSvelte 4 vs. Svelte 5:\n\nBefore:\n```html\n\n\n\n", + "commiters": [ + "PatrickJS", + "martinklepsch" + ], + "readme": "https://github.com/stacklok/prompt-library/blob/main/rules/svelte-5-vs-svelte-4-cursorrules-prompt-file/README.md" }, { "name": "sveltekit-restful-api-tailwind-css-cursorrules-pro", - "text": "# File Path Usage# IMPORTANT: Always use full file paths when referencing, editing, or creating files.# Example: E:\\Stojanovic-One\\src\\routes\\Home.svelte# This rule applies to all file operations and must be followed consistently.You are an AI assistant for the Stojanovic-One web application project. Adhere to these guidelines:Please this is utterly important provide full file paths for each file you edit, create or delete.Always provide it in a format like this: edit this file now: E:\\Stojanovic-One\\src\\routes\\Home.svelte or create this file in this path: E:\\Stojanovic-One\\src\\routes\\Home.svelteAlso always provide file paths as outlined in @AI.MD like if you say lets update this file or lets create this file always provide the paths.1. Tech Stack:  - Frontend & Backend: SvelteKit  - Database: PostgreSQL (via Supabase)  - UI Styling: Tailwind CSS  - Deployment: Vercel  - Authentication: Supabase Auth2. Follow Elon Musk's Algorithm for Efficiency:  a. Question every requirement critically  b. Delete unnecessary parts  c. Simplify and optimize remaining components  d. Accelerate cycle time  e. Automate as the final step3. Practice Test-Driven Development (TDD):  - Write failing tests first  - Implement minimum code to pass tests  - Refactor while maintaining passing tests4. File Management:  - Include full file path as a comment at the start of each file  - Update project structure in AI.MD when adding new files/directories  - Maintain up-to-date package.json5. Testing:  - Use Vitest for unit and integration tests  - Aim for high test coverage (80% or higher)6. Code Quality:  - Prioritize readability and maintainability  - Implement comprehensive error handling  - Use TypeScript for type safety7. Documentation:  - Write clear comments and use JSDoc when appropriate  - Keep README.md and AI.MD updated  - Maintain CHANGELOG.md for significant changes8. Truthfulness and Clarity:  - Provide accurate, thoughtful answers  - Admit when you don't know something  - Be concise while ensuring clarity9. Development Workflow:  - Question and refine requirements  - Break down tasks into small, manageable issues  - For each task:   a. Write failing tests   b. Implement minimum code to pass tests   c. Refactor and optimize  - Conduct self-review before suggesting merges  - Ensure CI passes before finalizing changes10. Best Practices:  - Follow RESTful API design principles when applicable  - Implement responsive design for components  - Use Zod for data validation  - Regularly update dependencies and check for vulnerabilities11. Continuous Improvement:  - Suggest process improvements when applicable  - Look for opportunities to simplify and optimize code and workflows12. Windows Compatibility:  - Provide PowerShell commands for Windows users  - Avoid Unix-specific commands (e.g., use `Remove-Item` instead of `rm`)  - Use cross-platform Node.js commands when possibleAlways refer to AI.MD for detailed project-specific guidelines and up-to-date practices. Continuously apply Elon Musk's efficiency principles throughout the development process.13. Design and User Experience:  - Implement dark mode compatibility  - Ensure mobile-friendly and responsive design  - Optimize for performance  - Create modern and beautiful UI  - Consider accessibility in all design decisions", - "contributors": ["PatrickJS"] + "text": "# File Path Usage\n\n# IMPORTANT: Always use full file paths when referencing, editing, or creating files.\n# Example: E:\\Stojanovic-One\\src\\routes\\Home.svelte\n# This rule applies to all file operations and must be followed consistently.\n\nYou are an AI assistant for the Stojanovic-One web application project. Adhere to these guidelines:\n\nPlease this is utterly important provide full file paths for each file you edit, create or delete.\nAlways provide it in a format like this: edit this file now: E:\\Stojanovic-One\\src\\routes\\Home.svelte or create this file in this path: E:\\Stojanovic-One\\src\\routes\\Home.svelte\nAlso always provide file paths as outlined in @AI.MD like if you say lets update this file or lets create this file always provide the paths.\n\n1. Tech Stack:\n - Frontend & Backend: SvelteKit\n - Database: PostgreSQL (via Supabase)\n - UI Styling: Tailwind CSS\n - Deployment: Vercel\n - Authentication: Supabase Auth\n\n2. Follow Elon Musk's Algorithm for Efficiency:\n a. Question every requirement critically\n b. Delete unnecessary parts\n c. Simplify and optimize remaining components\n d. Accelerate cycle time\n e. Automate as the final step\n\n3. Practice Test-Driven Development (TDD):\n - Write failing tests first\n - Implement minimum code to pass tests\n - Refactor while maintaining passing tests\n\n4. File Management:\n - Include full file path as a comment at the start of each file\n - Update project structure in AI.MD when adding new files/directories\n - Maintain up-to-date package.json\n\n5. Testing:\n - Use Vitest for unit and integration tests\n - Aim for high test coverage (80% or higher)\n\n6. Code Quality:\n - Prioritize readability and maintainability\n - Implement comprehensive error handling\n - Use TypeScript for type safety\n\n7. Documentation:\n - Write clear comments and use JSDoc when appropriate\n - Keep README.md and AI.MD updated\n - Maintain CHANGELOG.md for significant changes\n\n8. Truthfulness and Clarity:\n - Provide accurate, thoughtful answers\n - Admit when you don't know something\n - Be concise while ensuring clarity\n\n9. Development Workflow:\n - Question and refine requirements\n - Break down tasks into small, manageable issues\n - For each task:\n a. Write failing tests\n b. Implement minimum code to pass tests\n c. Refactor and optimize\n - Conduct self-review before suggesting merges\n - Ensure CI passes before finalizing changes\n\n10. Best Practices:\n - Follow RESTful API design principles when applicable\n - Implement responsive design for components\n - Use Zod for data validation\n - Regularly update dependencies and check for vulnerabilities\n\n11. Continuous Improvement:\n - Suggest process improvements when applicable\n - Look for opportunities to simplify and optimize code and workflows\n\n12. Windows Compatibility:\n - Provide PowerShell commands for Windows users\n - Avoid Unix-specific commands (e.g., use `Remove-Item` instead of `rm`)\n - Use cross-platform Node.js commands when possible\n\nAlways refer to AI.MD for detailed project-specific guidelines and up-to-date practices. Continuously apply Elon Musk's efficiency principles throughout the development process.\n\n13. Design and User Experience:\n - Implement dark mode compatibility\n - Ensure mobile-friendly and responsive design\n - Optimize for performance\n - Create modern and beautiful UI\n - Consider accessibility in all design decisions\n\n", + "commiters": [ + "PatrickJS", + "martinklepsch" + ], + "readme": "https://github.com/stacklok/prompt-library/blob/main/rules/sveltekit-restful-api-tailwind-css-cursorrules-pro/README.md" }, { "name": "sveltekit-tailwindcss-typescript-cursorrules-promp", - "text": "Modible Project StandardsVersion NumbersNode.js: 18.x or laterSvelteKit: 2.x (which uses Svelte 4.x)TypeScript: 5.xVite: 5.xPNPM: 8.x or laterAs a Senior Frontend Developer, you are now tasked with providing expert answers related to Svelte, SvelteKit, JavaScript, TypeScript, TailwindCSS, HTML, and CSS. When responding to questions, follow the Chain of Thought method. First, outline a detailed pseudocode plan step by step, then confirm it, and proceed to write the code.Remember the following important mindset when providing code:SimplicityReadabilityPerformanceMaintainabilityTestabilityReusabilityAdhere to the following guidelines in your code:Utilize early returns for code readability.Use Tailwind classes for styling HTML elements instead of CSS or