Claude sub-agents, PRD, MCP improvements (#359)
1. Added Claude Code sub-agents 2. Added PRD tool to MCP Server 3. Added MCP Server UI to Dev Tools 4. Improved MCP Server Database Tool 5. Updated dependencies
This commit is contained in:
committed by
GitHub
parent
02e2502dcc
commit
2b8572baaa
@@ -124,250 +124,6 @@ export class PromptsManager {
|
||||
'Performance analysis of database queries',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'component_implementation',
|
||||
title: 'Component Implementation Guide',
|
||||
description:
|
||||
'Generate implementation guidance for creating new UI components',
|
||||
category: 'development',
|
||||
arguments: [
|
||||
{
|
||||
name: 'component_description',
|
||||
description: 'Description of the component to implement',
|
||||
required: true,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'component_type',
|
||||
description: 'Type of component to create',
|
||||
required: true,
|
||||
type: 'enum',
|
||||
options: ['shadcn', 'makerkit', 'page', 'form', 'table', 'modal'],
|
||||
},
|
||||
{
|
||||
name: 'features',
|
||||
description: 'Specific features or functionality needed',
|
||||
required: false,
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
template: `Help me implement a {{component_type}} component: {{component_description}}
|
||||
|
||||
{{#if features}}
|
||||
**Required Features:**
|
||||
{{features}}
|
||||
{{/if}}
|
||||
|
||||
**Please provide:**
|
||||
1. **Component Design:** Architecture and structure recommendations
|
||||
2. **Code Implementation:** Full TypeScript/React code with proper typing
|
||||
3. **Styling Approach:** Tailwind CSS classes and variants (use CVA if applicable)
|
||||
4. **Props Interface:** Complete TypeScript interface definition
|
||||
5. **Usage Examples:** How to use the component in different scenarios
|
||||
6. **Testing Strategy:** Unit tests and accessibility considerations
|
||||
7. **Makerkit Integration:** How this fits with existing patterns
|
||||
|
||||
**Makerkit Implementation Requirements:**
|
||||
|
||||
**TypeScript Standards:**
|
||||
- Strict TypeScript with no 'any' types
|
||||
- Use implicit type inference unless impossible
|
||||
- Proper error handling with typed errors
|
||||
- Clean code without unnecessary comments
|
||||
|
||||
**Component Architecture:**
|
||||
- Functional components with proper 'use client' directive
|
||||
- Use existing @kit/ui components (shadcn + makerkit customs)
|
||||
- Follow established patterns: enhanced-data-table, if, trans, page
|
||||
- Implement proper conditional rendering with <If> component
|
||||
- Display loading indicators with LoadingSpinner component where appropriate
|
||||
- Encapsulate repeated blocks of code into reusable local components
|
||||
|
||||
**Styling & UI Standards:**
|
||||
- Tailwind CSS 4 with CVA (Class Variance Authority) for variants
|
||||
- Responsive design with mobile-first approach
|
||||
- Proper accessibility with ARIA attributes and data-test for E2E
|
||||
- Use shadcn components as base, extend with makerkit patterns
|
||||
|
||||
**State & Data Management:**
|
||||
- Single state objects over multiple useState
|
||||
- Server-side data fetching with RSC preferred
|
||||
- Supabase client integration with proper error handling
|
||||
- Account-based data access with proper RLS policies
|
||||
|
||||
**File Structure:**
|
||||
- Follow monorepo structure: packages/features/* for feature packages
|
||||
- Use established naming conventions and folder organization
|
||||
- Import from @kit/* packages appropriately`,
|
||||
examples: [
|
||||
'Create a data table component with sorting and filtering',
|
||||
'Build a multi-step form component',
|
||||
'Design a notification center component',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'architecture_guidance',
|
||||
title: 'Architecture Guidance',
|
||||
description: 'Provide architectural recommendations for complex features',
|
||||
category: 'architecture',
|
||||
arguments: [
|
||||
{
|
||||
name: 'feature_scope',
|
||||
description: 'Description of the feature or system to architect',
|
||||
required: true,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'scale_requirements',
|
||||
description: 'Expected scale and performance requirements',
|
||||
required: false,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'constraints',
|
||||
description: 'Technical constraints or requirements',
|
||||
required: false,
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
template: `Provide architectural guidance for: {{feature_scope}}
|
||||
|
||||
{{#if scale_requirements}}
|
||||
**Scale Requirements:** {{scale_requirements}}
|
||||
{{/if}}
|
||||
|
||||
{{#if constraints}}
|
||||
**Constraints:** {{constraints}}
|
||||
{{/if}}
|
||||
|
||||
**Please provide:**
|
||||
1. **Architecture Overview:** High-level system design and components
|
||||
2. **Data Architecture:** Database design and data flow patterns
|
||||
3. **API Design:** RESTful endpoints and GraphQL considerations
|
||||
4. **State Management:** Client-side state architecture
|
||||
5. **Security Architecture:** Authentication, authorization, and data protection
|
||||
6. **Performance Strategy:** Caching, optimization, and scaling approaches
|
||||
7. **Integration Patterns:** How this fits with existing Makerkit architecture
|
||||
|
||||
**Makerkit Architecture Standards:**
|
||||
|
||||
**Multi-Tenant Patterns:**
|
||||
- Account-based data isolation with proper foreign key relationships
|
||||
- Personal vs Team account architecture (auth.users.id = accounts.id for personal)
|
||||
- Role-based access control with roles, memberships, and permissions tables
|
||||
- RLS policies that enforce account boundaries at database level
|
||||
|
||||
**Technology Stack Integration:**
|
||||
- Next.js 15 App Router with React Server Components
|
||||
- Supabase for database, auth, storage, and real-time features
|
||||
- TypeScript strict mode with no 'any' types
|
||||
- Tailwind CSS 4 with shadcn/ui and custom Makerkit components
|
||||
- Turborepo monorepo with proper package organization
|
||||
|
||||
**Performance & Security:**
|
||||
- Server-side data fetching preferred over client-side
|
||||
- Proper error boundaries and graceful error handling
|
||||
- Account-level data access patterns with efficient queries
|
||||
- Use of existing database functions for complex operations
|
||||
|
||||
**Code Organization:**
|
||||
- For simplicity, place feature directly in the application (apps/web) unless you're asked to create a separate package for it
|
||||
- Shared utilities in packages/* (ui, auth, billing, etc.)
|
||||
- Consistent naming conventions and file structure
|
||||
- Proper import patterns from @kit/* packages`,
|
||||
examples: [
|
||||
'Design a real-time notification system',
|
||||
'Architect a file upload and processing system',
|
||||
'Design a reporting and analytics feature',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'makerkit_feature_implementation',
|
||||
title: 'Makerkit Feature Implementation Guide',
|
||||
description:
|
||||
'Complete guide for implementing new features following Makerkit patterns',
|
||||
category: 'development',
|
||||
arguments: [
|
||||
{
|
||||
name: 'feature_name',
|
||||
description: 'Name of the feature to implement',
|
||||
required: true,
|
||||
type: 'string',
|
||||
},
|
||||
{
|
||||
name: 'feature_type',
|
||||
description: 'Type of feature being implemented',
|
||||
required: true,
|
||||
type: 'enum',
|
||||
options: [
|
||||
'billing',
|
||||
'auth',
|
||||
'team-management',
|
||||
'data-management',
|
||||
'api',
|
||||
'ui-component',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'user_stories',
|
||||
description: 'User stories or requirements for the feature',
|
||||
required: false,
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
template: `Implement a {{feature_type}} feature: {{feature_name}}
|
||||
|
||||
{{#if user_stories}}
|
||||
**User Requirements:**
|
||||
{{user_stories}}
|
||||
{{/if}}
|
||||
|
||||
**Please provide a complete Makerkit implementation including:**
|
||||
|
||||
**1. Database Design:**
|
||||
- Schema changes following multi-tenant patterns
|
||||
- RLS policies for account-based access control
|
||||
- Database functions if needed (SECURITY DEFINER/INVOKER)
|
||||
- Proper foreign key relationships with account_id
|
||||
- Schema uses constraints/triggers where required for data integrity and business rules
|
||||
- Schema prevents invalid data from being inserted or updated
|
||||
|
||||
**2. Backend Implementation:**
|
||||
- Server Actions or API routes following Next.js 15 patterns
|
||||
- Proper error handling with typed responses
|
||||
- Integration with existing Supabase auth and database
|
||||
- Account-level data access patterns
|
||||
- Redirect using Server Actions/API Routes instead of client-side navigation
|
||||
|
||||
**3. Frontend Components:**
|
||||
- React Server Components where possible
|
||||
- Use of @kit/ui components (shadcn + makerkit)
|
||||
- Small, composable, explicit, reusable, well-named components
|
||||
- Proper TypeScript interfaces and types
|
||||
- Single state objects over multiple useState
|
||||
- Conditional rendering with <If> component
|
||||
|
||||
**4. Package Organization:**
|
||||
- If reusable, create feature package in packages/features/{{feature_name}}
|
||||
- Proper exports and package.json configuration
|
||||
- Integration with existing packages (@kit/auth, @kit/ui, etc.)
|
||||
|
||||
**5. Code Quality:**
|
||||
- TypeScript strict mode with no 'any' types
|
||||
- Proper error boundaries and handling
|
||||
- Follow established file structure and naming conventions
|
||||
|
||||
**Makerkit Standards:**
|
||||
- Multi-tenant architecture with account-based access
|
||||
- Use existing database functions where applicable
|
||||
- Follow monorepo patterns and package organization
|
||||
- Implement proper security and performance best practices`,
|
||||
examples: [
|
||||
'Implement team collaboration features',
|
||||
'Build a subscription management system',
|
||||
'Create a file sharing feature with permissions',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'supabase_rls_policy_design',
|
||||
title: 'Supabase RLS Policy Design',
|
||||
|
||||
Reference in New Issue
Block a user