mirror-magi-meta-agent
Version:
AI-powered development planning and execution system with Supabase integration
105 lines (98 loc) • 9.94 kB
JSON
{
"templates": {
"feature_development": {
"id": "feature_dev",
"description": "Develop new Trip With Us feature",
"template": "claude-code \"Context: Read .claude-instructions.md and meta-agent/state/project-state.json.\n\nTrip With Us Feature Development:\nFeature: {{feature_name}}\nDescription: {{feature_description}}\n\nTechnical Requirements:\n{{#each requirements}}\n- {{this}}\n{{/each}}\n\nFiles to Create/Modify:\n{{#each target_files}}\n- {{this}}\n{{/each}}\n\nTrip With Us Standards:\n- Use TypeScript interfaces for all data structures\n- Follow shadcn/ui component patterns\n- Implement proper Supabase RLS policies\n- Include both unit tests and E2E test scenarios\n- Use TanStack Query for server state management\n- Follow feature-based folder structure\n\nSuccess Criteria:\n{{#each success_criteria}}\n✅ {{this}}\n{{/each}}\n\nValidation Steps:\n1. TypeScript compilation: npx tsc --noEmit\n2. Test execution: npm run test\n3. Build verification: npm run build\n4. E2E test: npm run test:e2e\n\nEstimated Time: {{time_estimate}} minutes\"",
"variables": [
"feature_name",
"feature_description",
"requirements",
"target_files",
"success_criteria",
"time_estimate"
]
},
"component_creation": {
"id": "component_create",
"description": "Create new React component for Trip With Us",
"template": "claude-code \"Context: Read .claude-instructions.md and meta-agent/state/project-state.json.\n\nTrip With Us Component Creation:\nComponent: {{component_name}}\nType: {{component_type}}\nLocation: {{component_path}}\n\nComponent Requirements:\n{{#each requirements}}\n- {{this}}\n{{/each}}\n\nTrip With Us Component Standards:\n- Use TypeScript with proper interface definitions\n- Follow shadcn/ui patterns for UI components\n- Include proper props validation with Zod if needed\n- Implement responsive design with Tailwind CSS\n- Add Framer Motion animations where appropriate\n- Include proper accessibility attributes\n- Use React Hook Form for form components\n- Implement proper error boundaries\n\nTesting Requirements:\n- Create unit tests in {{component_path}}/__tests__/\n- Include accessibility tests\n- Test responsive behavior\n- Mock Supabase dependencies appropriately\n\nFiles to Generate:\n- {{component_path}}/{{component_name}}.tsx\n- {{component_path}}/{{component_name}}.test.tsx\n- {{component_path}}/index.ts (if creating new directory)\n\nSuccess Criteria:\n{{#each success_criteria}}\n✅ {{this}}\n{{/each}}\"",
"variables": [
"component_name",
"component_type",
"component_path",
"requirements",
"success_criteria"
]
},
"api_integration": {
"id": "api_integration",
"description": "Integrate new API or external service",
"template": "claude-code \"Context: Read .claude-instructions.md and meta-agent/state/project-state.json.\n\nTrip With Us API Integration:\nService: {{service_name}}\nPurpose: {{integration_purpose}}\nAPI Type: {{api_type}}\n\nIntegration Requirements:\n{{#each requirements}}\n- {{this}}\n{{/each}}\n\nTrip With Us API Standards:\n- Create service layer in src/api/{{service_name}}Service.ts\n- Use TypeScript interfaces for all API responses\n- Implement proper error handling with try/catch\n- Use TanStack Query for caching and state management\n- Include rate limiting considerations\n- Add environment variable configuration\n- Follow existing Supabase integration patterns\n\nSecurity Requirements:\n- Store API keys in environment variables\n- Implement proper request validation\n- Add request/response logging for debugging\n- Include CORS handling if needed\n\nTesting Strategy:\n- Mock API responses for unit tests\n- Create integration tests with test API keys\n- Include error scenario testing\n- Test rate limiting behavior\n\nFiles to Create:\n- src/api/{{service_name}}Service.ts\n- src/types/{{service_name}}.ts\n- src/hooks/use{{service_name}}.ts\n- src/api/__tests__/{{service_name}}Service.test.ts\n\nSuccess Criteria:\n{{#each success_criteria}}\n✅ {{this}}\n{{/each}}\"",
"variables": [
"service_name",
"integration_purpose",
"api_type",
"requirements",
"success_criteria"
]
},
"database_changes": {
"id": "database_changes",
"description": "Implement database schema changes",
"template": "claude-code \"Context: Read .claude-instructions.md and meta-agent/state/project-state.json.\n\nTrip With Us Database Changes:\nChange Type: {{change_type}}\nDescription: {{change_description}}\nTables Affected: {{affected_tables}}\n\nDatabase Requirements:\n{{#each requirements}}\n- {{this}}\n{{/each}}\n\nTrip With Us Database Standards:\n- Create migration in supabase/migrations/\n- Follow naming convention: YYYYMMDDHHMMSS_description.sql\n- Include proper foreign key constraints\n- Implement Row Level Security (RLS) policies\n- Add audit fields (created_at, updated_at, created_by)\n- Use soft deletes where appropriate\n- Include proper indexes for performance\n\nSecurity Implementation:\n- RLS policies for data access control\n- Proper user role permissions\n- Audit trail for sensitive operations\n\nType Generation:\n- Run: supabase gen types typescript --local > src/types/supabase.ts\n- Update TypeScript interfaces\n- Verify type safety in existing code\n\nTesting Requirements:\n- Create test data fixtures\n- Verify RLS policies work correctly\n- Test migration rollback if needed\n- Update E2E tests for schema changes\n\nFiles to Create/Update:\n- supabase/migrations/{{migration_file}}\n- src/types/supabase.ts (regenerated)\n- tests/fixtures/{{table_name}}.ts\n- Update relevant API service files\n\nSuccess Criteria:\n{{#each success_criteria}}\n✅ {{this}}\n{{/each}}\"",
"variables": [
"change_type",
"change_description",
"affected_tables",
"requirements",
"migration_file",
"success_criteria"
]
},
"bug_fix": {
"id": "bug_fix",
"description": "Fix bugs in Trip With Us application",
"template": "claude-code \"Context: Read .claude-instructions.md and meta-agent/state/project-state.json.\n\nTrip With Us Bug Fix:\nBug Description: {{bug_description}}\nSeverity: {{severity}}\nAffected Components: {{affected_components}}\nReproduction Steps: {{reproduction_steps}}\n\nBug Analysis Requirements:\n1. Identify root cause in Trip With Us context\n2. Check for TypeScript compilation errors\n3. Review Supabase query patterns\n4. Verify React hook usage\n5. Check for state management issues\n\nDebugging Strategy:\n{{#each debug_steps}}\n- {{this}}\n{{/each}}\n\nTrip With Us Fix Standards:\n- Minimal code changes to reduce regression risk\n- Maintain existing TypeScript interfaces\n- Preserve existing test coverage\n- Follow established error handling patterns\n- Update documentation if behavior changes\n\nTesting Requirements:\n- Create regression test for the specific bug\n- Verify existing tests still pass\n- Test edge cases related to the fix\n- Run full E2E test suite if critical path affected\n\nFiles to Investigate/Modify:\n{{#each target_files}}\n- {{this}}\n{{/each}}\n\nValidation Steps:\n1. Reproduce bug in current codebase\n2. Apply fix\n3. Verify bug is resolved\n4. Run comprehensive test suite\n5. Check for unintended side effects\n\nSuccess Criteria:\n{{#each success_criteria}}\n✅ {{this}}\n{{/each}}\"",
"variables": [
"bug_description",
"severity",
"affected_components",
"reproduction_steps",
"debug_steps",
"target_files",
"success_criteria"
]
},
"testing_implementation": {
"id": "testing_implementation",
"description": "Add or improve tests for Trip With Us",
"template": "claude-code \"Context: Read .claude-instructions.md and meta-agent/state/project-state.json.\n\nTrip With Us Testing Implementation:\nTest Type: {{test_type}}\nTarget: {{test_target}}\nCoverage Goal: {{coverage_goal}}\n\nTesting Requirements:\n{{#each requirements}}\n- {{this}}\n{{/each}}\n\nTrip With Us Testing Standards:\n- Unit Tests: Use Jest + @testing-library/react\n- E2E Tests: Use Playwright with realistic user scenarios\n- Mock Supabase operations appropriately\n- Use test fixtures for consistent data\n- Test both success and error scenarios\n- Include accessibility testing\n- Test responsive behavior on different screen sizes\n\nTest Data Strategy:\n- Use fixtures from tests/fixtures/\n- Mock external API calls (Mapbox, OpenAI, Twilio)\n- Create isolated test database state\n- Clean up test data after each test\n\nSpecific Test Scenarios:\n{{#each test_scenarios}}\n- {{this}}\n{{/each}}\n\nFiles to Create/Update:\n{{#each test_files}}\n- {{this}}\n{{/each}}\n\nValidation:\n- All new tests pass\n- Existing tests continue to pass\n- Coverage meets or exceeds {{coverage_goal}}%\n- Tests run efficiently (< {{max_duration}} seconds)\n\nSuccess Criteria:\n{{#each success_criteria}}\n✅ {{this}}\n{{/each}}\"",
"variables": [
"test_type",
"test_target",
"coverage_goal",
"requirements",
"test_scenarios",
"test_files",
"max_duration",
"success_criteria"
]
}
},
"validation_commands": {
"typescript_check": "npx tsc --noEmit",
"lint_check": "npx eslint src/ --max-warnings 0",
"unit_tests": "npm run test",
"e2e_tests": "npm run test:e2e",
"build_verification": "npm run build",
"supabase_types": "supabase gen types typescript --local > src/types/supabase.ts"
},
"common_variables": {
"project_name": "Trip With Us",
"tech_stack": "React + TypeScript + Supabase",
"ui_framework": "shadcn/ui + Tailwind CSS",
"state_management": "TanStack Query + React Context",
"testing_framework": "Playwright + Jest"
}
}