UNPKG

orchestry-mcp

Version:

Orchestry MCP Server for multi-session task management

276 lines (236 loc) β€’ 8.28 kB
# 🎭 Orchestry μ—­ν•  기반 μ›Œν¬ν”Œλ‘œμš° ## πŸ“‹ 역할별 μ±…μž„κ³Ό μš°μ„ μˆœμœ„ ### μ—­ν•  μ •μ˜ | μ—­ν•  | μ±…μž„ | μ£Όμš” μž‘μ—… | 리뷰 κ°€λŠ₯ | |------|------|----------|-----------| | **Backend** | API, μ„œλ²„ 둜직 | API 개발, λ°μ΄ν„°λ² μ΄μŠ€ 연동, 인증 | Frontend, Database | | **Frontend** | UI/UX κ΅¬ν˜„ | React μ»΄ν¬λ„ŒνŠΈ, μƒνƒœ 관리, μŠ€νƒ€μΌλ§ | UI-UX | | **Fullstack** | 전체 κΈ°λŠ₯ κ΅¬ν˜„ | End-to-end κΈ°λŠ₯, 톡합 | Backend, Frontend | | **DevOps** | 배포, 인프라 | CI/CD, Docker, λͺ¨λ‹ˆν„°λ§ | Security | | **Database** | DB 섀계, μ΅œμ ν™” | μŠ€ν‚€λ§ˆ 섀계, 쿼리 μ΅œμ ν™”, λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ | Backend | | **Testing** | ν…ŒμŠ€νŠΈ μž‘μ„± | λ‹¨μœ„ ν…ŒμŠ€νŠΈ, 톡합 ν…ŒμŠ€νŠΈ, E2E | λͺ¨λ“  개발 μ—­ν•  | | **Security** | λ³΄μ•ˆ κ²€ν†  | 취약점 뢄석, λ³΄μ•ˆ 감사 | Backend, DevOps | | **Architect** | μ‹œμŠ€ν…œ 섀계 | μ•„ν‚€ν…μ²˜ 섀계, 기술 선택 | Fullstack, Backend | ### μš°μ„ μˆœμœ„ μžλ™ κ²°μ • | μš°μ„ μˆœμœ„ | 쑰건 | μ˜ˆμ‹œ | |----------|------|------| | **Critical** πŸ”΄ | λ³΄μ•ˆ 이슈, μ‹œμŠ€ν…œ λ‹€μš΄, "urgent" ν‚€μ›Œλ“œ | "Fix SQL injection vulnerability" | | **High** 🟠 | 버그, μ£Όμš” κΈ°λŠ₯, λ§Žμ€ μ˜μ‘΄μ„± | "Payment system not working" | | **Medium** 🟑 | 일반 κΈ°λŠ₯, κ°œμ„ μ‚¬ν•­ | "Add user profile page" | | **Low** 🟒 | λ¬Έμ„œν™”, λ¦¬νŒ©ν† λ§, μ΅œμ ν™” | "Update README documentation" | ## πŸ”„ μ‹€μ œ μ›Œν¬ν”Œλ‘œμš° μ˜ˆμ‹œ ### μ‹œλ‚˜λ¦¬μ˜€ 1: μ „μžμƒκ±°λž˜ ν”Œλž«νΌ 개발 ```mermaid graph TB PM[Product Manager<br/>μš”κ΅¬μ‚¬ν•­ μ •μ˜] --> ARCH[Architect<br/>μ‹œμŠ€ν…œ 섀계] ARCH --> BACK[Backend Dev<br/>API 개발] ARCH --> DB[Database Dev<br/>μŠ€ν‚€λ§ˆ 섀계] BACK --> FRONT[Frontend Dev<br/>UI κ΅¬ν˜„] DB --> BACK FRONT --> TEST[Testing<br/>ν…ŒμŠ€νŠΈ μž‘μ„±] BACK --> TEST TEST --> SEC[Security<br/>λ³΄μ•ˆ κ²€ν† ] SEC --> OPS[DevOps<br/>배포] ``` #### μ‹€μ œ λŒ€ν™” 흐름: **Session 1 - Product Manager Role:** ``` μ‚¬μš©μž: "μ „μžμƒκ±°λž˜ ν”Œλž«νΌμ„ λ§Œλ“€μ–΄μ•Ό ν•΄" Claude PM: β†’ register_session_role("product-manager") β†’ create_project("E-commerce Platform") β†’ track_epic("User Management", priority: "high") β†’ track_epic("Product Catalog", priority: "high") β†’ track_epic("Shopping Cart", priority: "critical") β†’ track_epic("Payment System", priority: "critical") β†’ create_prioritized_task( "Design database schema for products", requiredSkills: ["PostgreSQL", "Data Modeling"], preferredRole: "database", priority: "high" ) ``` **Session 2 - Database Role:** ``` Claude DB: β†’ register_session_role("database", ["PostgreSQL", "Redis", "Data Modeling"]) β†’ claim_next_task() ← 받은 μž‘μ—…: "Design database schema for products" (High Priority) β†’ [μŠ€ν‚€λ§ˆ 섀계 μž‘μ—…...] β†’ update_progress("completed", "Schema designed with categories, variants, inventory") β†’ handoff_work("Backend team can now implement Product API") ``` **Session 3 - Backend Role:** ``` Claude Backend: β†’ register_session_role("backend", ["Node.js", "Express", "REST API"]) β†’ claim_next_task() ← 받은 μž‘μ—…: "Implement Product API" (High Priority) β†’ [API κ΅¬ν˜„...] β†’ create_prioritized_task( "Create product listing UI", preferredRole: "frontend", dependencies: ["product-api"], priority: "medium" ) ``` **Session 4 - Frontend Role:** ``` Claude Frontend: β†’ register_session_role("frontend", ["React", "Redux", "TailwindCSS"]) β†’ get_role_workload() ← ν˜„μž¬ Backend: 3 tasks, Frontend: 1 task, Testing: 0 tasks β†’ claim_next_task() ← 받은 μž‘μ—…: "Create product listing UI" (Medium Priority) ``` ### μ‹œλ‚˜λ¦¬μ˜€ 2: κΈ΄κΈ‰ λ³΄μ•ˆ 이슈 처리 ``` Session A (Testing): β†’ "SQL injection 취약점 발견!" β†’ escalate_task("user-login-api", "critical", "security", "SQL injection found in login") Session B (Security) - μžλ™ μ•Œλ¦Ό: β†’ claim_next_task() ← 받은 μž‘μ—…: "Fix SQL injection in login" (CRITICAL Priority) β†’ [λ³΄μ•ˆ 패치 μž‘μ—…...] β†’ request_role_specific_help("backend", "Need immediate review", context: "...") Session C (Backend) - μžλ™ μ•Œλ¦Ό: β†’ "Security νŒ€μ—μ„œ κΈ΄κΈ‰ 리뷰 μš”μ²­" β†’ [μ½”λ“œ 리뷰 및 μˆ˜μ •...] β†’ update_task_assignment("deploy-hotfix", "devops", "critical") Session D (DevOps) - μžλ™ μ•Œλ¦Ό: β†’ "Critical λ³΄μ•ˆ 패치 배포 ν•„μš”" β†’ [κΈ΄κΈ‰ 배포 ν”„λ‘œμ„ΈμŠ€...] ``` ## πŸ“Š μš°μ„ μˆœμœ„ 기반 μž‘μ—… 큐 ### ν˜„μž¬ μž‘μ—… 큐 μƒνƒœ: ```json { "critical": [ { "id": "fix-payment-bug", "title": "Payment processing fails", "assignedTo": "backend-session-2", "estimatedHours": 4 } ], "high": [ { "id": "implement-auth", "title": "User authentication system", "assignedTo": "fullstack-session-1", "estimatedHours": 8 }, { "id": "database-optimization", "title": "Optimize slow queries", "assignedTo": "database-session-1", "estimatedHours": 3 } ], "medium": [ { "id": "product-ui", "title": "Product listing page", "assignedTo": "frontend-session-1", "estimatedHours": 6 } ], "low": [ { "id": "update-docs", "title": "Update API documentation", "assignedTo": "pool", "estimatedHours": 2 } ] } ``` ## πŸ€– μžλ™ ν• λ‹Ή 둜직 ```python # μ˜μ‚¬ μ½”λ“œ def auto_assign_task(task): priority = determine_priority(task) # ν‚€μ›Œλ“œ λΆ„μ„μœΌλ‘œ μš°μ„ μˆœμœ„ κ²°μ • # 1. ν•„μš” μŠ€ν‚¬ λ§€μΉ­ best_session = find_best_match( required_skills=task.skills, preferred_role=task.role, availability=True ) # 2. λ‘œλ“œ λ°ΈλŸ°μ‹± if best_session.current_load > MAX_LOAD: best_session = find_alternative_session() # 3. μš°μ„ μˆœμœ„λ³„ 큐 배치 if priority == "critical": assign_immediately(best_session, task) else: add_to_queue(priority, task) return assignment ``` ## πŸ’‘ 베슀트 ν”„λž™ν‹°μŠ€ ### 1. μ„Έμ…˜ μ‹œμž‘ μ‹œ ``` 항상 μ—­ν•  등둝: β†’ register_session_role("your-role", ["your", "skills"]) β†’ get_role_workload() # ν˜„μž¬ 상황 νŒŒμ•… β†’ claim_next_task() # μ μ ˆν•œ μž‘μ—… λ°›κΈ° ``` ### 2. μž‘μ—… 생성 μ‹œ ``` μš°μ„ μˆœμœ„ μžλ™ κ²°μ • ν™œμš©: β†’ create_prioritized_task( title="Fix user login", # "Fix" + "login" = High Priority μžλ™ description="Users cannot login with email", requiredSkills=["Authentication", "JWT"] ) ``` ### 3. ν˜‘μ—… ν•„μš” μ‹œ ``` νŠΉμ • 역할에 도움 μš”μ²­: β†’ request_role_specific_help( targetRole="database", issue="Query taking 10+ seconds", priority="high" ) ``` ### 4. μ—μŠ€μ»¬λ ˆμ΄μ…˜ ``` λ³΅μž‘λ„ 증가 발견 μ‹œ: β†’ escalate_task( taskId="simple-feature", newPriority="critical", escalateToRole="architect", reason="Requires complete system redesign" ) ``` ## πŸ“ˆ μ›Œν¬λ‘œλ“œ λΆ„μ‚° λŒ€μ‹œλ³΄λ“œ ``` Current Load Distribution: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Backend β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘ 75% (3 sessions, 12 tasks) Frontend β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 50% (2 sessions, 8 tasks) Database β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 25% (1 session, 2 tasks) Testing β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 87% (2 sessions, 14 tasks) DevOps β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 12% (1 session, 1 task) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚠️ Testing role is overloaded! β†’ Redistributing low-priority tasks to available sessions... ``` ## πŸ”„ μžλ™ μž¬λΆ„λ°° μ„Έμ…˜μ΄ λŠμ–΄μ§€λ©΄: 1. ν•΄λ‹Ή μ„Έμ…˜μ˜ Critical/High μž‘μ—… β†’ 같은 μ—­ν• μ˜ λ‹€λ₯Έ μ„Έμ…˜ 2. Medium μž‘μ—… β†’ μž‘μ—… ν’€λ‘œ λ°˜ν™˜ 3. Low μž‘μ—… β†’ λŒ€κΈ° 큐에 μΆ”κ°€ ```javascript // μ„Έμ…˜ μ’…λ£Œ 감지 on_session_disconnect(sessionId) { tasks = get_assigned_tasks(sessionId) for (task of tasks) { if (task.priority >= "high") { reassign_to_same_role(task) } else { return_to_pool(task) } } } ``` 이제 OrchestryλŠ” μ™„λ²½ν•œ νŒ€ ν˜‘μ—… λ„κ΅¬μž…λ‹ˆλ‹€! πŸš€