Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .cursor/rules/cursor_rules.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
description: Guidelines for creating and maintaining Cursor rules to ensure consistency and effectiveness.
globs: .cursor/rules/*.mdc
alwaysApply: true
---

- **Required Rule Structure:**
```markdown
---
description: Clear, one-line description of what the rule enforces
globs: path/to/files/*.ext, other/path/**/*
alwaysApply: boolean
---

- **Main Points in Bold**
- Sub-points with details
- Examples and explanations
```

- **File References:**
- Use `[filename](mdc:path/to/file)` ([filename](mdc:filename)) to reference files
- Example: [prisma.mdc](mdc:.cursor/rules/prisma.mdc) for rule references
- Example: [schema.prisma](mdc:prisma/schema.prisma) for code references

- **Code Examples:**
- Use language-specific code blocks
```typescript
// ✅ DO: Show good examples
const goodExample = true;

// ❌ DON'T: Show anti-patterns
const badExample = false;
```

- **Rule Content Guidelines:**
- Start with high-level overview
- Include specific, actionable requirements
- Show examples of correct implementation
- Reference existing code when possible
- Keep rules DRY by referencing other rules

- **Rule Maintenance:**
- Update rules when new patterns emerge
- Add examples from actual codebase
- Remove outdated patterns
- Cross-reference related rules

- **Best Practices:**
- Use bullet points for clarity
- Keep descriptions concise
- Include both DO and DON'T examples
- Reference actual code over theoretical examples
- Use consistent formatting across rules
219 changes: 219 additions & 0 deletions .cursor/rules/dev_workflow.mdc

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions .cursor/rules/self_improve.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
description: Guidelines for continuously improving Cursor rules based on emerging code patterns and best practices.
globs: **/*
alwaysApply: true
---
Comment on lines +1 to +5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect globs pattern in front matter.
The globs field is set to **/*, which may apply this guideline to every file rather than just rule files. It should be scoped to .cursor/rules/*.mdc to target the intended documents.

🤖 Prompt for AI Agents (early access)
In .cursor/rules/self_improve.mdc at lines 1 to 5, the front matter's globs
pattern is set to **/*, which applies the guideline to all files. Change the
globs value to .cursor/rules/*.mdc to restrict the scope to only rule files in
that directory.


- **Rule Improvement Triggers:**
- New code patterns not covered by existing rules
- Repeated similar implementations across files
- Common error patterns that could be prevented
- New libraries or tools being used consistently
- Emerging best practices in the codebase

- **Analysis Process:**
- Compare new code with existing rules
- Identify patterns that should be standardized
- Look for references to external documentation
- Check for consistent error handling patterns
- Monitor test patterns and coverage

- **Rule Updates:**
- **Add New Rules When:**
- A new technology/pattern is used in 3+ files
- Common bugs could be prevented by a rule
- Code reviews repeatedly mention the same feedback
- New security or performance patterns emerge

- **Modify Existing Rules When:**
- Better examples exist in the codebase
- Additional edge cases are discovered
- Related rules have been updated
- Implementation details have changed

- **Example Pattern Recognition:**
```typescript
// If you see repeated patterns like:
const data = await prisma.user.findMany({
select: { id: true, email: true },
where: { status: 'ACTIVE' }
});

// Consider adding to [prisma.mdc](mdc:.cursor/rules/prisma.mdc):
// - Standard select fields
// - Common where conditions
// - Performance optimization patterns
```

- **Rule Quality Checks:**
- Rules should be actionable and specific
- Examples should come from actual code
- References should be up to date
- Patterns should be consistently enforced

- **Continuous Improvement:**
- Monitor code review comments
- Track common development questions
- Update rules after major refactors
- Add links to relevant documentation
- Cross-reference related rules

- **Rule Deprecation:**
- Mark outdated patterns as deprecated
- Remove rules that no longer apply
- Update references to deprecated rules
- Document migration paths for old patterns

- **Documentation Updates:**
- Keep examples synchronized with code
- Update references to external docs
- Maintain links between related rules
- Document breaking changes
Follow [cursor_rules.mdc](mdc:.cursor/rules/cursor_rules.mdc) for proper rule formatting and structure.
382 changes: 382 additions & 0 deletions .cursor/rules/taskmaster.mdc

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# API Keys (Required to enable respective provider)
ANTHROPIC_API_KEY=your_anthropic_api_key_here # Required: Format: sk-ant-api03-...
PERPLEXITY_API_KEY=your_perplexity_api_key_here # Optional: Format: pplx-...
OPENAI_API_KEY=your_openai_api_key_here # Optional, for OpenAI/OpenRouter models. Format: sk-proj-...
GOOGLE_API_KEY=your_google_api_key_here # Optional, for Google Gemini models.
MISTRAL_API_KEY=your_mistral_key_here # Optional, for Mistral AI models.
XAI_API_KEY=YOUR_XAI_KEY_HERE # Optional, for xAI AI models.
AZURE_OPENAI_API_KEY=your_azure_key_here # Optional, for Azure OpenAI models (requires endpoint in .taskmasterconfig).
19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,21 @@ dist
storybook-static

# React Router v7
.react-router/
.react-router/

# Added by Claude Task Master
*.log
npm-debug.log*
dev-debug.log
# Environment variables
# Editor directories and files
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# OS specific
# Task files
tasks.json
tasks/
31 changes: 31 additions & 0 deletions .taskmasterconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"models": {
"main": {
"provider": "anthropic",
"modelId": "claude-3-7-sonnet-20250219",
"maxTokens": 120000,
"temperature": 0.2
},
"research": {
"provider": "perplexity",
"modelId": "sonar-pro",
"maxTokens": 8700,
"temperature": 0.1
},
"fallback": {
"provider": "anthropic",
"modelId": "claude-3.5-sonnet-20240620",
"maxTokens": 120000,
"temperature": 0.1
}
},
"global": {
"logLevel": "info",
"debug": false,
"defaultSubtasks": 5,
"defaultPriority": "medium",
"projectName": "Taskmaster",
"ollamaBaseUrl": "http://localhost:11434/api",
"azureOpenaiBaseUrl": "https://your-endpoint.openai.azure.com/"
}
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cSpell.words": [
"autodocs",
"Bazza",
"biomejs",
"cleanbuild",
"Filenaming",
Expand All @@ -22,5 +23,6 @@
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"tailwindCSS.classAttributes": ["class", "className", "ngClass", "class:list", "wrapperClassName"]
"tailwindCSS.classAttributes": ["class", "className", "ngClass", "class:list", "wrapperClassName"],
"cursor.general.disableHttp2": true
}
28 changes: 22 additions & 6 deletions apps/docs/src/lib/storybook/react-router-stub.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Command } from '@lambdacurry/forms/ui';
import type { Decorator } from '@storybook/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { NuqsAdapter } from 'nuqs/adapters/react-router/v7';
import type { ComponentType } from 'react';
import { DayPickerProvider } from 'react-day-picker';
import {
type ActionFunction,
type IndexRouteObject,
Expand Down Expand Up @@ -40,6 +44,9 @@ interface RemixStubOptions {
initialPath?: string;
}

// Create a single QueryClient instance outside the decorator
const queryClient = new QueryClient();
Comment on lines +47 to +48
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Potential issue with singleton QueryClient in Storybook

Creating a single QueryClient instance outside the decorator means all stories will share the same cache, which could lead to unexpected behavior when testing components that depend on query state.

Consider creating a new QueryClient for each story to isolate the query cache:

- // Create a single QueryClient instance outside the decorator
- const queryClient = new QueryClient();

export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorator => {
  const { routes, initialPath = '/' } = options;
  // This outer function runs once when Storybook loads the story meta

  return (Story, context) => {
+   // Create a new QueryClient for each story
+   const queryClient = new QueryClient();
    // This inner function runs when the story component actually renders
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Create a single QueryClient instance outside the decorator
const queryClient = new QueryClient();
// (remove these two lines at the top of the file)
// - // Create a single QueryClient instance outside the decorator
// - const queryClient = new QueryClient();
export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorator => {
const { routes, initialPath = '/' } = options;
// This outer function runs once when Storybook loads the story meta
return (Story, context) => {
// Create a new QueryClient for each story
const queryClient = new QueryClient();
// This inner function runs when the story component actually renders
return (
<QueryClientProvider client={queryClient}>
{/* ...the rest of your decorator wrapper... */}
<Story />
</QueryClientProvider>
);
};
};
🤖 Prompt for AI Agents (early access)
In apps/docs/src/lib/storybook/react-router-stub.tsx around lines 47 to 48, the
current code creates a single QueryClient instance outside the decorator,
causing all stories to share the same cache and potentially leading to state
leakage between tests. To fix this, move the creation of the QueryClient
instance inside the decorator function so that each story gets a fresh
QueryClient, isolating the query cache and preventing shared state issues.


export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorator => {
const { routes, initialPath = '/' } = options;
// This outer function runs once when Storybook loads the story meta
Expand All @@ -53,13 +60,11 @@ export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorat

// Get the base path (without existing query params from options)
const basePath = initialPath.split('?')[0];

// Get the current search string from the actual browser window, if available
// If not available, use a default search string with parameters needed for the data table
const currentWindowSearch = typeof window !== 'undefined'
? window.location.search
: '?page=0&pageSize=10';

const currentWindowSearch = typeof window !== 'undefined' ? window.location.search : '?page=0&pageSize=10';

// Combine them for the initial entry
const actualInitialPath = `${basePath}${currentWindowSearch}`;

Expand All @@ -69,7 +74,18 @@ export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorat
initialEntries: [actualInitialPath], // Use the path combined with window.location.search
});

return <RouterProvider router={router} />;
// Wrap existing providers with QueryClientProvider and DayPickerProvider
return (
<QueryClientProvider client={queryClient}>
<DayPickerProvider initialProps={{}}>
<NuqsAdapter>
<Command>
<RouterProvider router={router} />
</Command>
</NuqsAdapter>
</DayPickerProvider>
</QueryClientProvider>
);
};
};

Expand Down
Loading
Loading