UNPKG

mirror-magi-meta-agent

Version:

AI-powered development planning and execution system with Supabase integration

271 lines (216 loc) β€’ 9.38 kB
# 🎯 Mirror Magi Meta-Agent *AI-powered development planning and execution system for Claude Code Max* --- ## πŸš€ The Magic Workflow ``` πŸ€– AI ASSISTANT πŸ“ YOU βœ… VALIDATOR 🎯 CLAUDE CODE MAX β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Generateβ”‚ β”‚Structureβ”‚ β”‚Validate β”‚ β”‚ Execute β”‚ β”‚ Plan β”‚ ➜ β”‚as JSON β”‚ ➜ β”‚Structureβ”‚ ➜ β”‚Step-by- β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ Step β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ "Create a { βœ… PLAN IS πŸ’» Implementation dashboard with "id": "plan_123", VALID! Commands charts using "goal": "dashboard", β”‚ β”‚ React & TS" "phases": [...] πŸ“ Saved! πŸ”„ Progress β”‚ } β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ 🎨 CREATIVE πŸ”§ PRECISE Human Control AI Execution ``` **The workflow is simple:** 1. πŸ€– **Generate** - Use any AI (ChatGPT, Claude, etc.) to create comprehensive plans 2. πŸ“ **Structure** - Format as JSON with exact file paths and details 3. βœ… **Validate** - Ensure perfect structure before execution 4. 🎯 **Execute** - Get specific Claude Code Max commands with no placeholders --- ## πŸ—„οΈ NEW: Supabase Integration Mirror Magi now includes **intelligent Supabase support** with: ### Pre-flight Checks - βœ… Automatic Supabase CLI detection - βœ… Project connection validation - βœ… Environment variable checking - βœ… Migration safety verification ### Supabase Task Types - `supabase_migration` - Database schema changes - `supabase_function` - Edge Functions - `supabase_rls` - Row Level Security policies ### Safety Features - πŸ›‘οΈ Local vs remote database detection - πŸ”„ Automatic rollback SQL generation - ⚠️ Uncommitted migration warnings - πŸ“‹ Step-by-step validation [Learn more about Supabase integration β†’](./docs/guides/SUPABASE_INTEGRATION_GUIDE.md) --- ## πŸ”„ NEW: Git Integration with Claude Summaries Mirror Magi now features **intelligent Git commit automation** that uses Claude's implementation summaries: ### Smart Commit Messages - πŸ€– Uses Claude's "I've successfully..." summaries - πŸ“ Conventional commit format (feat, fix, chore, etc.) - 🏷️ Automatic task ID tracking - πŸ“„ Detailed commit bodies with file changes ### Key Features ```bash # Save Claude's response for better commits npm run plan:save-response task_001 "Claude's implementation summary..." # Complete task with auto-commit npm run plan:complete task_001 --commit # Configure preferences npm run plan:config autoCommit true ``` ### Workflow Benefits - ✨ **Meaningful Commits** - Claude's summaries are descriptive - ⏱️ **Time Saving** - No manual commit messages - πŸ” **Traceability** - Task IDs link commits to plan - 🎯 **Consistency** - All commits follow same format [Learn more about Git integration β†’](./docs/guides/CLAUDE_COMMIT_INTEGRATION.md) --- ## ⚑ Quick Start (5 minutes) ### 1. Install & Setup ```bash npm install -g mirror-magi cd your-project npm run setup ``` ### 2. Generate Plan with AI πŸ€– Use this prompt with **any AI assistant**: ``` I need a comprehensive development plan for: [YOUR PROJECT] Include: - Clear phases and tasks - Exact file names and paths - Component details and dependencies - Validation criteria Tech stack: [React, TypeScript, etc.] ``` ### 3. Structure & Validate πŸ“βœ… ```json { "id": "plan_123", "goal": "Your project goal", "phases": [{ "id": "phase_1", "name": "Setup", "description": "Initial setup", "tasks": [{ "id": "task_1", "description": "Create component", "type": "component_creation", "dependencies": [], "specifics": { "componentName": "MyComponent", "filePath": "src/components/MyComponent.tsx" } }] }] } ``` ```bash npm run plan:validate # Paste JSON, type END ``` ### 4. Execute Step-by-Step 🎯 ```bash npm run plan:continue # Get Claude Code Max command # β†’ Implement with Claude npm run plan:save-response task_1 "Claude's response" # Save for commits npm run plan:complete task_1 --commit # Complete & commit npm run plan:progress # Check progress ``` --- ## πŸ› οΈ Core Commands | Command | What It Does | When To Use | |---------|-------------|-------------| | `npm run plan:validate` | πŸ“‹ Validate plan structure | After creating JSON plan | | `npm run plan:view` | πŸ‘οΈ View complete plan | Check plan details | | `npm run plan:continue` | ▢️ Get next command | Ready to implement | | `npm run plan:complete [id]` | βœ… Mark task complete | After implementing | | `npm run plan:complete [id] --commit` | βœ… Complete & commit | With git integration | | `npm run plan:save-response [id] "..."` | πŸ’Ύ Save Claude's response | For better commits | | `npm run plan:config [setting] [value]` | βš™οΈ Configure preferences | Customize workflow | | `npm run plan:progress` | πŸ“Š Check progress | Track completion | --- ## 🎯 Live Example ### AI Input πŸ€– ``` "Create a todo list app with add/delete functionality using React and TypeScript" ``` ### Structured Plan πŸ“ ```json { "id": "plan_todo_app", "goal": "Create todo list app with add/delete functionality", "phases": [{ "id": "phase_1", "name": "Todo Component Setup", "tasks": [{ "id": "task_1", "description": "Create TodoList component with add/delete functionality", "type": "component_creation", "dependencies": [], "specifics": { "componentName": "TodoList", "filePath": "src/components/TodoList.tsx", "features": ["add items", "delete items", "mark complete"] } }] }] } ``` ### Execute 🎯 ```bash npm run plan:validate # βœ… PLAN IS VALID npm run plan:continue # Get: "Create TodoList component at src/components/TodoList.tsx with..." # β†’ Paste into Claude Code Max # Claude responds: "I've successfully created the TodoList component..." npm run plan:save-response task_1 "I've successfully created the TodoList component with add, delete, and mark complete functionality" npm run plan:complete task_1 --commit # βœ… Committed: "feat(ui): Created the TodoList component with add, delete, and mark complete functionality (task_1)" ``` --- ## 🌟 Why Mirror Magi? | Feature | Benefit | |---------|---------| | πŸ€– **AI Integration** | Works with **any** AI assistant | | πŸ“ **No Placeholders** | Specific file names & paths | | βœ… **Structure Validation** | Catches errors before execution | | 🎯 **Precise Commands** | Exact Claude Code Max instructions | | πŸ“Š **Progress Tracking** | Always know where you are | | πŸ—„οΈ **Supabase Ready** | Intelligent database operations | | πŸ”„ **Git Automation** | Claude's summaries become commits | | πŸš€ **4-Step Workflow** | Simple yet powerful | --- ## πŸ“š Documentation - **[Getting Started](./docs/GETTING_STARTED.md)** - Detailed setup guide - **[Core Scripts](./docs/CORE_SCRIPTS.md)** - Complete command reference - **[Project Structure](./docs/PROJECT_STRUCTURE.md)** - File organization - **[Supabase Integration](./docs/guides/SUPABASE_INTEGRATION_GUIDE.md)** - Database operations - **[Git Integration](./docs/guides/CLAUDE_COMMIT_INTEGRATION.md)** - Commit automation - **[Planning Guides](./docs/guides/)** - In-depth documentation --- ## 🎨 The Perfect Balance ``` 🎨 HUMAN CREATIVITY πŸ€– AI PRECISION β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Strategicβ”‚ β”‚Executionβ”‚ β”‚Planning β”‚ + β”‚Details β”‚ β”‚ Vision β”‚ β”‚& Speed β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ ✨ MIRROR MAGI ✨ Best of Both! ``` --- ## 🀝 Contributing Love the project? Contributions welcome! --- ## πŸ“„ License MIT License - Transform your AI plans into working code! --- *Where AI creativity meets structured execution* ✨