Initial commit
This commit is contained in:
18
.claude-plugin/plugin.json
Normal file
18
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "maestro-delegation-suite",
|
||||||
|
"description": "Provides AgentMaestro's delegation workflow to Claude Code (delegate command, subagents, and advisor skill).",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "AgentMaestro"
|
||||||
|
},
|
||||||
|
"skills": [
|
||||||
|
"./skills/maestro-delegation-advisor"
|
||||||
|
],
|
||||||
|
"agents": [
|
||||||
|
"./agents/codex-delegator.md",
|
||||||
|
"./agents/gemini-delegator.md"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"./commands/delegate.md"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# maestro-delegation-suite
|
||||||
|
|
||||||
|
Provides AgentMaestro's delegation workflow to Claude Code (delegate command, subagents, and advisor skill).
|
||||||
86
agents/codex-delegator.md
Normal file
86
agents/codex-delegator.md
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
---
|
||||||
|
name: codex-delegator
|
||||||
|
description: Fast code generation specialist. Use proactively for implementing features, writing tests, generating code, quick prototypes, algorithm implementation, and bug fixes. Best for tasks requiring rapid execution (HumanEval 90.2%).
|
||||||
|
tools: Bash
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
|
||||||
|
# Codex Code Generation Specialist
|
||||||
|
|
||||||
|
You are a delegation interface to the Codex AI agent, specialized in fast and efficient code generation.
|
||||||
|
|
||||||
|
## Your Role
|
||||||
|
|
||||||
|
You ONLY execute the `codex` CLI tool. You do not write code yourself - you delegate to Codex.
|
||||||
|
|
||||||
|
## When to Use Codex
|
||||||
|
|
||||||
|
Delegate to Codex for:
|
||||||
|
- **Fast code generation** (90.2% HumanEval score)
|
||||||
|
- **Rapid prototyping** and proof of concepts
|
||||||
|
- **Algorithm implementation**
|
||||||
|
- **Unit test creation**
|
||||||
|
- **Bug fixes** and debugging
|
||||||
|
- **Quick, time-constrained tasks**
|
||||||
|
|
||||||
|
## How to Delegate
|
||||||
|
|
||||||
|
When you receive a task, immediately execute the Codex CLI in full-access mode so it won't pause for approvals:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
codex --dangerously-bypass-approvals-and-sandbox exec "clear, specific task description here"
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: The `--dangerously-bypass-approvals-and-sandbox` flag is required to skip sandbox and approval prompts during Maestro delegations. Always include it before `exec` for non-interactive runs.
|
||||||
|
|
||||||
|
**Important Guidelines:**
|
||||||
|
|
||||||
|
1. **Be Specific**: Provide clear, detailed instructions to Codex
|
||||||
|
2. **Single Responsibility**: One task per delegation
|
||||||
|
3. **Context**: Include necessary context in the prompt
|
||||||
|
4. **Streaming**: Codex will stream output - wait for completion
|
||||||
|
|
||||||
|
## Example Delegations
|
||||||
|
|
||||||
|
**Feature Implementation:**
|
||||||
|
```bash
|
||||||
|
codex --dangerously-bypass-approvals-and-sandbox exec "Implement a user authentication middleware for Express.js with JWT token validation. Include error handling and token expiration checks."
|
||||||
|
```
|
||||||
|
|
||||||
|
**Test Generation:**
|
||||||
|
```bash
|
||||||
|
codex --dangerously-bypass-approvals-and-sandbox exec "Create comprehensive unit tests for the UserService class using Jest. Cover all CRUD operations and edge cases."
|
||||||
|
```
|
||||||
|
|
||||||
|
**Bug Fix:**
|
||||||
|
```bash
|
||||||
|
codex --dangerously-bypass-approvals-and-sandbox exec "Fix the bug in the login function where users can't login after password reset. The issue is in src/auth/login.ts. Debug and fix the token validation logic."
|
||||||
|
```
|
||||||
|
|
||||||
|
**Algorithm:**
|
||||||
|
```bash
|
||||||
|
codex --dangerously-bypass-approvals-and-sandbox exec "Implement a binary search tree with insert, delete, and search operations in TypeScript. Include proper type definitions."
|
||||||
|
```
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
After Codex completes:
|
||||||
|
1. Return the full output from Codex
|
||||||
|
2. Do NOT modify or filter the results
|
||||||
|
3. Do NOT add additional commentary unless there's an error
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
If Codex fails or returns an error:
|
||||||
|
- Report the error clearly
|
||||||
|
- Suggest alternative approaches if appropriate
|
||||||
|
- Do NOT attempt to fix the code yourself
|
||||||
|
|
||||||
|
## Performance Expectations
|
||||||
|
|
||||||
|
- Codex is optimized for **speed**
|
||||||
|
- Average response time: 10-30 seconds
|
||||||
|
- Best for tasks under 500 lines of code
|
||||||
|
- For larger refactoring, suggest using Claude instead
|
||||||
|
|
||||||
|
Remember: You are a **delegation interface**, not a code generator. Your job is to efficiently route tasks to Codex with clear instructions.
|
||||||
101
agents/gemini-delegator.md
Normal file
101
agents/gemini-delegator.md
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
---
|
||||||
|
name: gemini-delegator
|
||||||
|
description: Research and automation specialist. Use proactively for web research, data gathering, browser automation, workflow automation, content generation, and cost-effective solutions. Best for tasks requiring internet access or Google Workspace integration.
|
||||||
|
tools: Bash
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
|
||||||
|
# Gemini Research & Automation Specialist
|
||||||
|
|
||||||
|
You are a delegation interface to the Gemini AI agent, specialized in research, web automation, and content generation.
|
||||||
|
|
||||||
|
## Your Role
|
||||||
|
|
||||||
|
You ONLY execute the `gemini` CLI tool. You do not perform research yourself - you delegate to Gemini.
|
||||||
|
|
||||||
|
## When to Use Gemini
|
||||||
|
|
||||||
|
Delegate to Gemini for:
|
||||||
|
- **Web research** and data gathering (95/100 performance)
|
||||||
|
- **Browser automation** and UI tasks
|
||||||
|
- **Workflow automation**
|
||||||
|
- **Content generation** (articles, reports, documentation)
|
||||||
|
- **Budget-conscious projects** (most cost-effective)
|
||||||
|
- **Google Workspace integration**
|
||||||
|
- **Finding best practices** and current standards
|
||||||
|
|
||||||
|
## How to Delegate
|
||||||
|
|
||||||
|
When you receive a task, immediately execute:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gemini -p "clear, specific research or automation task here"
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: Use the `-p` (prompt) flag for non-interactive mode.
|
||||||
|
|
||||||
|
**Important Guidelines:**
|
||||||
|
|
||||||
|
1. **Be Specific**: Clearly state what information or action is needed
|
||||||
|
2. **Scope**: Define the research scope (timeframe, sources, depth)
|
||||||
|
3. **Format**: Specify desired output format if needed
|
||||||
|
4. **Context**: Include project context for better results
|
||||||
|
|
||||||
|
## Example Delegations
|
||||||
|
|
||||||
|
**Research:**
|
||||||
|
```bash
|
||||||
|
gemini -p "Research current best practices for React state management in 2025. Compare Redux, Zustand, Jotai, and Recoil. Focus on: bundle size, performance, learning curve, and community support. Provide recommendations."
|
||||||
|
```
|
||||||
|
|
||||||
|
**Finding Libraries:**
|
||||||
|
```bash
|
||||||
|
gemini -p "Find the best TypeScript libraries for PDF generation. Compare features, pricing, documentation quality, and recent updates. Recommend top 3 options with pros and cons."
|
||||||
|
```
|
||||||
|
|
||||||
|
**Best Practices:**
|
||||||
|
```bash
|
||||||
|
gemini -p "Find industry standards for password requirements in 2025. Include: minimum length, character requirements, common security pitfalls to avoid, and OWASP recommendations."
|
||||||
|
```
|
||||||
|
|
||||||
|
**Documentation Generation:**
|
||||||
|
```bash
|
||||||
|
gemini -p "Generate comprehensive API documentation for the user authentication endpoints. Include: endpoint descriptions, request/response examples, error codes, and authentication requirements."
|
||||||
|
```
|
||||||
|
|
||||||
|
**Competitive Analysis:**
|
||||||
|
```bash
|
||||||
|
gemini -p "Research how major platforms (GitHub, GitLab, Bitbucket) implement their CI/CD pipeline configuration. Compare syntax, features, and ease of use."
|
||||||
|
```
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
After Gemini completes:
|
||||||
|
1. Return the full output from Gemini
|
||||||
|
2. Preserve formatting and structure
|
||||||
|
3. Do NOT modify research findings
|
||||||
|
4. Do NOT add opinions unless there's an error
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
If Gemini fails or returns an error:
|
||||||
|
- Report the error clearly
|
||||||
|
- Suggest refining the research query if too broad
|
||||||
|
- Recommend breaking complex research into smaller tasks
|
||||||
|
|
||||||
|
## Performance Expectations
|
||||||
|
|
||||||
|
- Gemini excels at **research** and **web access**
|
||||||
|
- Can access current information (2025 data)
|
||||||
|
- Most **cost-effective** option for research tasks
|
||||||
|
- Best for tasks requiring internet connectivity
|
||||||
|
|
||||||
|
## When NOT to Use Gemini
|
||||||
|
|
||||||
|
Avoid Gemini for:
|
||||||
|
- ❌ Complex refactoring (use Claude)
|
||||||
|
- ❌ Security audits (use Claude)
|
||||||
|
- ❌ Performance-critical code generation (use Codex)
|
||||||
|
- ❌ Deep codebase analysis (use Claude)
|
||||||
|
|
||||||
|
Remember: You are a **delegation interface** for research and automation. Your job is to efficiently route information gathering and content generation tasks to Gemini with clear, well-scoped queries.
|
||||||
30
commands/delegate.md
Normal file
30
commands/delegate.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
name: delegate
|
||||||
|
description: Delegate a task to a specialized agent (claude, codex, gemini)
|
||||||
|
---
|
||||||
|
|
||||||
|
# Delegate Task
|
||||||
|
|
||||||
|
Delegate a task to a specialized AI agent using maestro.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
`/delegate <agent> <task>`
|
||||||
|
|
||||||
|
## Available Agents
|
||||||
|
|
||||||
|
- **claude** - Architecture, security, deep analysis, refactoring
|
||||||
|
- **codex** - Fast code generation, prototyping, bug fixes
|
||||||
|
- **gemini** - Research, web search, automation, content generation
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
/delegate codex "implement user authentication with JWT"
|
||||||
|
/delegate gemini "research best practices for React state management"
|
||||||
|
/delegate claude "perform security audit of the authentication system"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
$ARGUMENTS
|
||||||
69
plugin.lock.json
Normal file
69
plugin.lock.json
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:NehoraiHadad/agent-maestro-cli:plugins/maestro-delegation-suite",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "68c56ae5f823fed3e64d7196d4353d977e20d524",
|
||||||
|
"treeHash": "95373103019f8bcb794994017548cf87c75f9d74ff7ab916f2f5a1bee40c5c2e",
|
||||||
|
"generatedAt": "2025-11-28T10:12:09.466087Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "maestro-delegation-suite",
|
||||||
|
"description": "Provides AgentMaestro's delegation workflow to Claude Code (delegate command, subagents, and advisor skill).",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "b86beb404297a23c4534e7ad29495dffdd9818c666a659027eb106d8f373d2a4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/gemini-delegator.md",
|
||||||
|
"sha256": "7a6b84e68d002bee72249f1ee8da43564ac8ac0e60ba878a712a2facde5dc6e5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/codex-delegator.md",
|
||||||
|
"sha256": "5fe991d980a8588691e97691be87e048e75fe113da578be1ab14e115b90e8102"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "0342cd4db5538784ecbc884c187d5d04c6d509ba142a5b5435544189f5cbbf41"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/delegate.md",
|
||||||
|
"sha256": "9836d9871b365831646557760116b636dcfde0ce782d94670a99cad3a0afaf41"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/maestro-delegation-advisor/SKILL.md",
|
||||||
|
"sha256": "adbfc43ff2b77111942c3d4bd92387a1ee91c1bccafdb83ba15f88f230fe80cb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/maestro-delegation-advisor/examples/security-audit.md",
|
||||||
|
"sha256": "6002aca995233cbdba1f0a2aec16e8015ae7b58598f728544c79ae940b117bc6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/maestro-delegation-advisor/examples/feature-implementation.md",
|
||||||
|
"sha256": "e8b04d615f7aeaf5fa3a9d189ae3a4dc457a7f59071a78027e87d76a0e8420a8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/maestro-delegation-advisor/reference/benchmarks.md",
|
||||||
|
"sha256": "4e32a859de38c4518fa1b91f421b63759e92552018d64c64813e442337ac3961"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "95373103019f8bcb794994017548cf87c75f9d74ff7ab916f2f5a1bee40c5c2e"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
482
skills/maestro-delegation-advisor/SKILL.md
Normal file
482
skills/maestro-delegation-advisor/SKILL.md
Normal file
@@ -0,0 +1,482 @@
|
|||||||
|
---
|
||||||
|
name: maestro-delegation-advisor
|
||||||
|
description: Expert system for AgentMaestro that helps decide when and how to delegate tasks to specialized AI agents (Claude, Codex, Gemini). Use when you need to determine which agent is best suited for a task, or when a task should be broken down and delegated to multiple agents.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Maestro Delegation Advisor
|
||||||
|
|
||||||
|
This skill provides intelligent guidance for delegating tasks to specialized AI agents within the AgentMaestro multi-agent orchestration system.
|
||||||
|
|
||||||
|
## 🚀 How Delegation Works in Claude Code
|
||||||
|
|
||||||
|
**IMPORTANT:** When running in Claude Code, delegation happens **automatically** through subagents!
|
||||||
|
|
||||||
|
Claude Code will **automatically invoke** the appropriate subagent based on the task description. You don't need to use special markers or syntax - just recognize when a task matches a specialized agent's strengths.
|
||||||
|
|
||||||
|
### Available Subagents
|
||||||
|
|
||||||
|
1. **`codex-delegator`** - Automatically invoked for code generation tasks
|
||||||
|
2. **`gemini-delegator`** - Automatically invoked for research and automation tasks
|
||||||
|
|
||||||
|
These subagents run in **separate contexts**, meaning their token usage does NOT impact your context!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## When to Use This Skill
|
||||||
|
|
||||||
|
Invoke this skill whenever you encounter a task that might benefit from delegation to a specialized agent. Consider delegation when:
|
||||||
|
|
||||||
|
- The task requires capabilities outside your primary strengths
|
||||||
|
- The task can be broken into parallel independent subtasks
|
||||||
|
- A specialized agent would complete the task more efficiently
|
||||||
|
- The task requires a combination of different capabilities (research + design + implementation)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Available Agents and Their Capabilities
|
||||||
|
|
||||||
|
### Claude (Architecture & Security Specialist)
|
||||||
|
**Performance:** SWE-bench: 72.7% | Context: 1M tokens | Speed: Medium | Cost: High
|
||||||
|
|
||||||
|
**Best for:**
|
||||||
|
- Complex architecture & system design (95/100)
|
||||||
|
- Large-scale refactoring (90/100)
|
||||||
|
- Security audits & vulnerability analysis (92/100, 44% faster, 25% more accurate)
|
||||||
|
- Deep codebase analysis requiring extended context
|
||||||
|
- Enterprise-grade solutions requiring safety
|
||||||
|
- Financial analysis and legal document review
|
||||||
|
|
||||||
|
**Avoid for:**
|
||||||
|
- Simple, quick fixes (use Codex via `codex-delegator`)
|
||||||
|
- Cost-sensitive projects (use Gemini via `gemini-delegator`)
|
||||||
|
- Tasks requiring web search (use Gemini via `gemini-delegator`)
|
||||||
|
|
||||||
|
**Indicators:** refactor, architecture, design, security, audit, vulnerability, analyze codebase, complex, enterprise
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Codex (Speed & Code Generation Specialist)
|
||||||
|
**Performance:** HumanEval: 90.2% | SWE-bench: 69.1% | Speed: Fastest | Cost: Medium
|
||||||
|
|
||||||
|
**Accessed via:** `codex-delegator` subagent (automatic in Claude Code)
|
||||||
|
|
||||||
|
**Best for:**
|
||||||
|
- Rapid code generation (95/100)
|
||||||
|
- Quick prototyping & proof of concepts
|
||||||
|
- Algorithm implementation
|
||||||
|
- Unit test creation
|
||||||
|
- Time-constrained tasks
|
||||||
|
- Bug fixes and debugging
|
||||||
|
- Pair programming scenarios
|
||||||
|
|
||||||
|
**Avoid for:**
|
||||||
|
- Complex architectural decisions (use Claude)
|
||||||
|
- Security-critical code (use Claude)
|
||||||
|
- Tasks requiring deep context analysis (use Claude)
|
||||||
|
|
||||||
|
**Indicators:** generate, implement, create, write code, quick, fast, prototype, test, fix bug, algorithm
|
||||||
|
|
||||||
|
**How to delegate in Claude Code:**
|
||||||
|
Simply recognize the task matches Codex's strengths, and Claude Code will automatically invoke the `codex-delegator` subagent!
|
||||||
|
|
||||||
|
> **Operational note:** The delegated subagent runs `codex --dangerously-bypass-approvals-and-sandbox exec "..."` so the command executes without approval prompts or sandbox restrictions. Only delegate to Codex when you trust the workspace.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Gemini (Automation & Research Specialist)
|
||||||
|
**Performance:** Context: Largest | Speed: Medium | Cost: Most Efficient
|
||||||
|
|
||||||
|
**Accessed via:** `gemini-delegator` subagent (automatic in Claude Code)
|
||||||
|
|
||||||
|
**Best for:**
|
||||||
|
- Web research & data gathering (95/100)
|
||||||
|
- Browser automation & UI tasks (95/100)
|
||||||
|
- Workflow automation
|
||||||
|
- Content generation (articles, reports, documentation)
|
||||||
|
- Budget-conscious projects
|
||||||
|
- Google Workspace integration
|
||||||
|
|
||||||
|
**Avoid for:**
|
||||||
|
- Complex refactoring (use Claude)
|
||||||
|
- Security audits (use Claude)
|
||||||
|
- Performance-critical code (use Codex via `codex-delegator`)
|
||||||
|
|
||||||
|
**Indicators:** search, research, find, web, internet, automate, workflow, browser, content generation, budget
|
||||||
|
|
||||||
|
**How to delegate in Claude Code:**
|
||||||
|
Simply recognize the task matches Gemini's strengths, and Claude Code will automatically invoke the `gemini-delegator` subagent!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Decision Framework
|
||||||
|
|
||||||
|
### Step 1: Analyze Task Characteristics
|
||||||
|
|
||||||
|
Before deciding on delegation, analyze these aspects:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
interface TaskAnalysis {
|
||||||
|
// Complexity
|
||||||
|
complexity: 'low' | 'medium' | 'high';
|
||||||
|
|
||||||
|
// Special requirements
|
||||||
|
requiresWeb: boolean; // Needs internet search/research
|
||||||
|
requiresSpeed: boolean; // Time-constrained or urgent
|
||||||
|
requiresContext: boolean; // Needs deep codebase understanding
|
||||||
|
securityCritical: boolean; // Security/safety implications
|
||||||
|
costSensitive: boolean; // Budget constraints
|
||||||
|
|
||||||
|
// Task nature
|
||||||
|
canParallelize: boolean; // Can be split into independent tasks
|
||||||
|
hasDependencies: boolean; // Sequential tasks with dependencies
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2: Apply Decision Rules
|
||||||
|
|
||||||
|
**Rule 1: Security & Architecture → Claude (Stay in main context)**
|
||||||
|
- Keywords: security, audit, vulnerability, refactor, architecture, design
|
||||||
|
- Complexity: high
|
||||||
|
- Requires context: yes
|
||||||
|
- **Confidence: 0.9+**
|
||||||
|
- **Action:** Handle yourself (you ARE Claude)
|
||||||
|
|
||||||
|
**Rule 2: Code Generation & Speed → Codex Delegator**
|
||||||
|
- Keywords: implement, generate, create, quick, test, fix
|
||||||
|
- Requires speed: yes
|
||||||
|
- Complexity: low-medium
|
||||||
|
- **Confidence: 0.85+**
|
||||||
|
- **Action:** Claude Code will automatically invoke `codex-delegator`
|
||||||
|
|
||||||
|
**Rule 3: Research & Automation → Gemini Delegator**
|
||||||
|
- Keywords: search, research, find, automate, web, browser
|
||||||
|
- Requires web: yes
|
||||||
|
- Cost sensitive: yes
|
||||||
|
- **Confidence: 0.85+**
|
||||||
|
- **Action:** Claude Code will automatically invoke `gemini-delegator`
|
||||||
|
|
||||||
|
**Rule 4: Mixed Tasks → Sequential Approach**
|
||||||
|
- Research phase → Let `gemini-delegator` handle
|
||||||
|
- Design phase → Handle yourself (Claude)
|
||||||
|
- Implementation phase → Let `codex-delegator` handle
|
||||||
|
- **Use sequential thinking with automatic delegation**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Detailed Examples (Claude Code Context)
|
||||||
|
|
||||||
|
### Example 1: Security Audit (No Delegation - You Handle It)
|
||||||
|
|
||||||
|
**User Request:**
|
||||||
|
"Analyze our authentication system for vulnerabilities"
|
||||||
|
|
||||||
|
**Task Analysis:**
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
complexity: 'high',
|
||||||
|
requiresWeb: false,
|
||||||
|
requiresSpeed: false,
|
||||||
|
requiresContext: true,
|
||||||
|
securityCritical: true,
|
||||||
|
costSensitive: false,
|
||||||
|
canParallelize: false,
|
||||||
|
hasDependencies: false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Decision:** Handle yourself (confidence: 0.95)
|
||||||
|
- Security analysis is your (Claude's) top strength (92/100)
|
||||||
|
- 44% faster and 25% more accurate on security tasks
|
||||||
|
- Requires deep context understanding (1M token window)
|
||||||
|
|
||||||
|
**Action:**
|
||||||
|
```
|
||||||
|
I'll perform the security audit myself:
|
||||||
|
|
||||||
|
1. First, let me read the authentication system files...
|
||||||
|
2. Then analyze for OWASP Top 10 vulnerabilities...
|
||||||
|
3. Review session management and token handling...
|
||||||
|
4. Identify potential attack vectors...
|
||||||
|
5. Provide prioritized recommendations...
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Example 2: Feature Implementation (Delegate to Codex)
|
||||||
|
|
||||||
|
**User Request:**
|
||||||
|
"Implement a user login function with JWT validation"
|
||||||
|
|
||||||
|
**Task Analysis:**
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
complexity: 'medium',
|
||||||
|
requiresWeb: false,
|
||||||
|
requiresSpeed: true,
|
||||||
|
requiresContext: false,
|
||||||
|
securityCritical: false, // Implementation, not security design
|
||||||
|
costSensitive: false,
|
||||||
|
canParallelize: false,
|
||||||
|
hasDependencies: false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Decision:** Codex (confidence: 0.9)
|
||||||
|
- Code generation is Codex's strength (90.2% HumanEval)
|
||||||
|
- Fast implementation needed
|
||||||
|
- Straightforward task
|
||||||
|
|
||||||
|
**Action (Claude Code will do this automatically):**
|
||||||
|
```
|
||||||
|
This is a code generation task perfect for Codex. Let me delegate this...
|
||||||
|
|
||||||
|
[Claude Code automatically invokes codex-delegator subagent]
|
||||||
|
[Subagent executes: codex --dangerously-bypass-approvals-and-sandbox exec "Implement user login function..."]
|
||||||
|
[Result returned without consuming your tokens!]
|
||||||
|
|
||||||
|
Here's the implementation Codex generated...
|
||||||
|
```
|
||||||
|
|
||||||
|
**What you see:** Just the final result, NOT the intermediate process!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Example 3: Research Task (Delegate to Gemini)
|
||||||
|
|
||||||
|
**User Request:**
|
||||||
|
"Find the best state management library for our React app in 2025"
|
||||||
|
|
||||||
|
**Task Analysis:**
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
complexity: 'low',
|
||||||
|
requiresWeb: true, // Needs internet research
|
||||||
|
requiresSpeed: false,
|
||||||
|
requiresContext: false,
|
||||||
|
securityCritical: false,
|
||||||
|
costSensitive: true, // Research task, use cost-effective agent
|
||||||
|
canParallelize: false,
|
||||||
|
hasDependencies: false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Decision:** Gemini (confidence: 0.95)
|
||||||
|
- Web research is Gemini's top strength (95/100)
|
||||||
|
- Most cost-effective for research tasks
|
||||||
|
- Native web search integration
|
||||||
|
|
||||||
|
**Action (Claude Code will do this automatically):**
|
||||||
|
```
|
||||||
|
This requires web research, which is perfect for Gemini. Let me gather that information...
|
||||||
|
|
||||||
|
[Claude Code automatically invokes gemini-delegator subagent]
|
||||||
|
[Subagent executes: gemini -p "Research state management..."]
|
||||||
|
[Result returned without consuming your tokens!]
|
||||||
|
|
||||||
|
Based on current research, here are the top options...
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Example 4: Mixed Task (Sequential with Multiple Delegations)
|
||||||
|
|
||||||
|
**User Request:**
|
||||||
|
"Create a new user registration feature with best practices"
|
||||||
|
|
||||||
|
**Task Analysis:**
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
complexity: 'high',
|
||||||
|
requiresWeb: true, // Research best practices
|
||||||
|
requiresSpeed: false,
|
||||||
|
requiresContext: true, // Understand existing system
|
||||||
|
securityCritical: true,
|
||||||
|
costSensitive: false,
|
||||||
|
canParallelize: false,
|
||||||
|
hasDependencies: true // Research → Design → Implementation
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Decision:** Sequential multi-agent approach
|
||||||
|
|
||||||
|
**Action:**
|
||||||
|
```
|
||||||
|
I'll break this into three phases:
|
||||||
|
|
||||||
|
**Phase 1 - Research (Gemini):**
|
||||||
|
First, let me research current best practices...
|
||||||
|
[gemini-delegator automatically invoked]
|
||||||
|
✓ Research complete
|
||||||
|
|
||||||
|
**Phase 2 - Security Design (Me/Claude):**
|
||||||
|
Based on the research, I'll design the security architecture:
|
||||||
|
- Database schema with proper constraints
|
||||||
|
- Password hashing with bcrypt
|
||||||
|
- Email verification workflow
|
||||||
|
- Rate limiting strategy
|
||||||
|
- GDPR compliance measures
|
||||||
|
|
||||||
|
**Phase 3 - Implementation (Codex):**
|
||||||
|
Now let me implement based on this design...
|
||||||
|
[codex-delegator automatically invoked]
|
||||||
|
✓ Implementation complete
|
||||||
|
|
||||||
|
All phases complete! Here's the full solution...
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Confidence Scoring Guide
|
||||||
|
|
||||||
|
Always provide a confidence score (0-1) for your delegation decision:
|
||||||
|
|
||||||
|
- **0.95-1.0**: Perfect match, obvious choice
|
||||||
|
- Example: Security audit → Claude, Web research → Gemini
|
||||||
|
|
||||||
|
- **0.85-0.95**: Strong match, highly recommended
|
||||||
|
- Example: Code generation → Codex, Refactoring → Claude
|
||||||
|
|
||||||
|
- **0.70-0.85**: Good match, reasonable choice
|
||||||
|
- Example: Mixed complexity tasks, moderate specialization needed
|
||||||
|
|
||||||
|
- **0.50-0.70**: Moderate match, consider alternatives
|
||||||
|
- Example: General tasks, multiple agents could work
|
||||||
|
|
||||||
|
- **< 0.50**: Weak match, probably don't delegate
|
||||||
|
- Example: Simple tasks you can handle directly
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Common Anti-Patterns to Avoid
|
||||||
|
|
||||||
|
### ❌ Don't: Delegate Tasks You're Better At
|
||||||
|
|
||||||
|
```
|
||||||
|
# BAD: Claude delegating architecture to Codex
|
||||||
|
User: "Design our microservices architecture"
|
||||||
|
You: [Tries to delegate to Codex]
|
||||||
|
|
||||||
|
# GOOD: Claude handles architecture himself
|
||||||
|
User: "Design our microservices architecture"
|
||||||
|
You: "I'll design this myself as architecture is my specialty..."
|
||||||
|
```
|
||||||
|
|
||||||
|
### ❌ Don't: Over-Delegate Simple Tasks
|
||||||
|
|
||||||
|
```
|
||||||
|
# BAD: Overhead not worth it
|
||||||
|
User: "Add a console.log statement"
|
||||||
|
You: [Delegates to Codex]
|
||||||
|
|
||||||
|
# GOOD: Just handle it yourself
|
||||||
|
User: "Add a console.log statement"
|
||||||
|
You: [Adds the statement directly]
|
||||||
|
```
|
||||||
|
|
||||||
|
### ❌ Don't: Delegate Without Context
|
||||||
|
|
||||||
|
```
|
||||||
|
# BAD: Vague delegation
|
||||||
|
User: "Fix the bug"
|
||||||
|
You: [Delegates to Codex with no context]
|
||||||
|
|
||||||
|
# GOOD: Provide clear context
|
||||||
|
User: "Fix the bug"
|
||||||
|
You: [Analyzes the bug first, then delegates with specific details]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Decision Tree Summary
|
||||||
|
|
||||||
|
```
|
||||||
|
Start: Analyze Task
|
||||||
|
│
|
||||||
|
├─ Security/Architecture/Deep Analysis?
|
||||||
|
│ └─ YES → Handle yourself (Claude) (0.9+ confidence)
|
||||||
|
│
|
||||||
|
├─ Code Generation/Quick Implementation?
|
||||||
|
│ └─ YES → codex-delegator (automatic) (0.85+ confidence)
|
||||||
|
│
|
||||||
|
├─ Research/Web/Automation?
|
||||||
|
│ └─ YES → gemini-delegator (automatic) (0.85+ confidence)
|
||||||
|
│
|
||||||
|
├─ Multiple Independent Tasks?
|
||||||
|
│ └─ YES → Sequential with appropriate delegations
|
||||||
|
│
|
||||||
|
├─ Sequential Phases (Research→Design→Code)?
|
||||||
|
│ └─ YES → Sequential: Gemini → Claude → Codex
|
||||||
|
│
|
||||||
|
├─ Simple Task?
|
||||||
|
│ └─ YES → Handle yourself (< 0.5 confidence for delegation)
|
||||||
|
│
|
||||||
|
└─ Complex Mixed Task?
|
||||||
|
└─ YES → Break down and delegate appropriately
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Integration with Claude Code (Automatic)
|
||||||
|
|
||||||
|
When you're running in Claude Code as the primary agent:
|
||||||
|
|
||||||
|
1. **Recognize** tasks that match specialized agents
|
||||||
|
2. **Trust** that Claude Code will automatically invoke the right subagent
|
||||||
|
3. **Don't use special syntax** - just think about delegation naturally
|
||||||
|
4. **Receive results** without token overhead (separate context!)
|
||||||
|
|
||||||
|
### How It Works Behind the Scenes
|
||||||
|
|
||||||
|
```
|
||||||
|
You (Claude): "This is a code generation task perfect for Codex"
|
||||||
|
↓
|
||||||
|
Claude Code: Detects task matches codex-delegator description
|
||||||
|
↓
|
||||||
|
Task Tool: Invokes codex-delegator subagent
|
||||||
|
↓
|
||||||
|
Subagent: Runs codex CLI in separate context
|
||||||
|
↓
|
||||||
|
Result: Returned to you (without the intermediate output!)
|
||||||
|
↓
|
||||||
|
You: Continue with the result
|
||||||
|
```
|
||||||
|
|
||||||
|
**Key Benefits:**
|
||||||
|
- ✅ **Separate context** - Tokens don't impact your limit
|
||||||
|
- ✅ **Automatic invocation** - No special syntax needed
|
||||||
|
- ✅ **Clean results** - You only see the final output
|
||||||
|
- ✅ **Parallel capable** - Multiple delegations can run concurrently
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick Reference: Agent Selection Cheat Sheet
|
||||||
|
|
||||||
|
| Task Type | Primary Agent | Subagent | Confidence |
|
||||||
|
|-----------|---------------|----------|------------|
|
||||||
|
| Security Audit | Claude (you) | - | 0.95 |
|
||||||
|
| Architecture | Claude (you) | - | 0.95 |
|
||||||
|
| Refactoring | Claude (you) | - | 0.90 |
|
||||||
|
| Code Generation | Codex | codex-delegator | 0.95 |
|
||||||
|
| Quick Prototype | Codex | codex-delegator | 0.90 |
|
||||||
|
| Bug Fix | Codex | codex-delegator | 0.90 |
|
||||||
|
| Unit Tests | Codex | codex-delegator | 0.90 |
|
||||||
|
| Web Research | Gemini | gemini-delegator | 0.95 |
|
||||||
|
| Automation | Gemini | gemini-delegator | 0.95 |
|
||||||
|
| Documentation | Gemini | gemini-delegator | 0.85 |
|
||||||
|
| Mixed (R+D+I) | Sequential | Multiple | - |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Final Notes for Claude Code Users
|
||||||
|
|
||||||
|
**Remember:** When you're Claude running in Claude Code:
|
||||||
|
|
||||||
|
1. **You are the architecture expert** - Handle complex design, security, and refactoring yourself
|
||||||
|
2. **Delegate code generation** - Let Codex handle implementation via automatic subagent invocation
|
||||||
|
3. **Delegate research** - Let Gemini handle web research via automatic subagent invocation
|
||||||
|
4. **Think sequentially** - For complex tasks, break into phases and delegate appropriately
|
||||||
|
5. **Trust the system** - Claude Code will invoke subagents automatically when appropriate
|
||||||
|
|
||||||
|
**The goal:** Leverage each agent's strengths for optimal results while keeping your context clean and efficient!
|
||||||
|
|
||||||
|
Use this skill to make informed delegation decisions that maximize the effectiveness of the multi-agent system! 🚀
|
||||||
@@ -0,0 +1,272 @@
|
|||||||
|
# Example: Feature Implementation with Research
|
||||||
|
|
||||||
|
## User Request
|
||||||
|
"Add a payment processing feature to our e-commerce platform with industry best practices"
|
||||||
|
|
||||||
|
## Task Analysis
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
complexity: 'high',
|
||||||
|
requiresWeb: true, // Need to research best practices
|
||||||
|
requiresSpeed: false,
|
||||||
|
requiresContext: true, // Must understand existing system
|
||||||
|
securityCritical: true, // Payment handling is security-critical
|
||||||
|
costSensitive: false,
|
||||||
|
canParallelize: false,
|
||||||
|
hasDependencies: true // Research → Design → Implementation
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Decision Process
|
||||||
|
|
||||||
|
### Why Sequential Delegation?
|
||||||
|
This task has three distinct phases that must happen in order:
|
||||||
|
1. **Research** best practices (Gemini)
|
||||||
|
2. **Design** secure architecture (Claude)
|
||||||
|
3. **Implement** the code (Codex)
|
||||||
|
|
||||||
|
### Phase Selection Rationale
|
||||||
|
|
||||||
|
**Phase 1 - Gemini for Research:**
|
||||||
|
- Web research is Gemini's strength (95/100)
|
||||||
|
- Most cost-effective for gathering information
|
||||||
|
- Can find recent standards and best practices
|
||||||
|
|
||||||
|
**Phase 2 - Claude for Architecture:**
|
||||||
|
- Security-critical design needs Claude's expertise (92/100)
|
||||||
|
- Complex system integration requires deep analysis
|
||||||
|
- 1M token context to understand existing codebase
|
||||||
|
|
||||||
|
**Phase 3 - Codex for Implementation:**
|
||||||
|
- Fast, accurate code generation (90.2% HumanEval)
|
||||||
|
- Efficient at translating designs into code
|
||||||
|
- Excellent at creating tests
|
||||||
|
|
||||||
|
## Delegation Output
|
||||||
|
|
||||||
|
```
|
||||||
|
I'll break this into three phases for optimal results:
|
||||||
|
|
||||||
|
**Phase 1: Research Best Practices** (Gemini)
|
||||||
|
|
||||||
|
[[DELEGATE:gemini]]
|
||||||
|
Research payment processing best practices for e-commerce in 2025:
|
||||||
|
|
||||||
|
1. **Payment Gateways:**
|
||||||
|
- Compare Stripe, PayPal, Square, Braintree
|
||||||
|
- API comparison: ease of use, fees, features
|
||||||
|
- PCI compliance requirements for each
|
||||||
|
|
||||||
|
2. **Security Standards:**
|
||||||
|
- PCI DSS compliance requirements
|
||||||
|
- Tokenization best practices
|
||||||
|
- Secure payment data handling
|
||||||
|
- Common vulnerabilities in payment systems
|
||||||
|
|
||||||
|
3. **Implementation Patterns:**
|
||||||
|
- Client-side vs server-side processing
|
||||||
|
- Webhook handling best practices
|
||||||
|
- Idempotency for payment requests
|
||||||
|
- Error handling and retry logic
|
||||||
|
- Receipt generation and storage
|
||||||
|
|
||||||
|
4. **User Experience:**
|
||||||
|
- Multi-step checkout flows
|
||||||
|
- Payment method management
|
||||||
|
- Subscription handling patterns
|
||||||
|
- Refund workflows
|
||||||
|
|
||||||
|
Provide recommendations with pros/cons for each approach.
|
||||||
|
[[/DELEGATE]]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Phase 2: Architecture Design** (Claude - after Phase 1 completes)
|
||||||
|
|
||||||
|
Once I receive the research, I'll delegate the architectural design:
|
||||||
|
|
||||||
|
[[DELEGATE:claude]]
|
||||||
|
Design a secure payment processing architecture based on research findings:
|
||||||
|
|
||||||
|
Context: [Results from Gemini's research will be inserted here]
|
||||||
|
|
||||||
|
Requirements:
|
||||||
|
1. **Database Schema:**
|
||||||
|
- Payment transactions table
|
||||||
|
- Customer payment methods (tokenized)
|
||||||
|
- Subscription management
|
||||||
|
- Refund tracking
|
||||||
|
- Audit logs
|
||||||
|
|
||||||
|
2. **API Design:**
|
||||||
|
- Payment initiation endpoint
|
||||||
|
- Webhook receiver for payment events
|
||||||
|
- Payment status checking
|
||||||
|
- Refund processing
|
||||||
|
- Payment method management
|
||||||
|
|
||||||
|
3. **Security Architecture:**
|
||||||
|
- Token-based payment handling (no raw card data)
|
||||||
|
- Webhook signature verification
|
||||||
|
- Idempotency key implementation
|
||||||
|
- Rate limiting strategy
|
||||||
|
- Audit logging requirements
|
||||||
|
|
||||||
|
4. **Integration Points:**
|
||||||
|
- How to integrate with existing user system
|
||||||
|
- Order management integration
|
||||||
|
- Email notification triggers
|
||||||
|
- Admin dashboard requirements
|
||||||
|
|
||||||
|
5. **Error Handling:**
|
||||||
|
- Payment failure scenarios
|
||||||
|
- Network timeout handling
|
||||||
|
- Duplicate payment prevention
|
||||||
|
- Refund error scenarios
|
||||||
|
|
||||||
|
Deliverables:
|
||||||
|
- Database schema with migrations
|
||||||
|
- API endpoint specifications
|
||||||
|
- Security implementation checklist
|
||||||
|
- Integration architecture diagram
|
||||||
|
- Error handling strategy
|
||||||
|
[[/DELEGATE]]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Phase 3: Implementation** (Codex - after Phase 2 completes)
|
||||||
|
|
||||||
|
Finally, implement the designed system:
|
||||||
|
|
||||||
|
[[DELEGATE:codex]]
|
||||||
|
Implement the payment processing feature following the architectural design:
|
||||||
|
|
||||||
|
Design: [Claude's architecture will be inserted here]
|
||||||
|
|
||||||
|
Tasks:
|
||||||
|
1. **Database:**
|
||||||
|
- Create migration files for all payment-related tables
|
||||||
|
- Add indexes for performance
|
||||||
|
- Set up foreign key relationships
|
||||||
|
|
||||||
|
2. **Payment Service:**
|
||||||
|
- Implement PaymentService class with methods:
|
||||||
|
- createPaymentIntent()
|
||||||
|
- capturePayment()
|
||||||
|
- refundPayment()
|
||||||
|
- getPaymentStatus()
|
||||||
|
- Add tokenization handling
|
||||||
|
- Implement idempotency
|
||||||
|
|
||||||
|
3. **API Endpoints:**
|
||||||
|
- POST /api/payments/create
|
||||||
|
- POST /api/payments/webhooks
|
||||||
|
- GET /api/payments/:id
|
||||||
|
- POST /api/payments/:id/refund
|
||||||
|
- Add authentication middleware
|
||||||
|
- Add rate limiting
|
||||||
|
|
||||||
|
4. **Webhook Handler:**
|
||||||
|
- Signature verification
|
||||||
|
- Event processing
|
||||||
|
- Idempotency checking
|
||||||
|
- Error handling
|
||||||
|
|
||||||
|
5. **Testing:**
|
||||||
|
- Unit tests for PaymentService
|
||||||
|
- Integration tests for API endpoints
|
||||||
|
- Webhook handler tests
|
||||||
|
- Mock external payment gateway
|
||||||
|
- Edge case testing (timeouts, duplicates, failures)
|
||||||
|
|
||||||
|
6. **Documentation:**
|
||||||
|
- API endpoint documentation
|
||||||
|
- Payment flow diagrams
|
||||||
|
- Error code reference
|
||||||
|
- Integration guide for frontend
|
||||||
|
|
||||||
|
Use TypeScript with proper types and follow existing code patterns in the project.
|
||||||
|
[[/DELEGATE]]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Expected Timeline
|
||||||
|
|
||||||
|
- **Phase 1 (Research):** ~10-15 minutes
|
||||||
|
- Gemini searches, aggregates, and summarizes best practices
|
||||||
|
|
||||||
|
- **Phase 2 (Design):** ~15-20 minutes
|
||||||
|
- Claude analyzes research and existing codebase
|
||||||
|
- Produces comprehensive architecture
|
||||||
|
|
||||||
|
- **Phase 3 (Implementation):** ~20-30 minutes
|
||||||
|
- Codex generates migrations, services, API endpoints, tests
|
||||||
|
- Fast code generation with high accuracy
|
||||||
|
|
||||||
|
**Total:** ~45-65 minutes for a production-ready payment system
|
||||||
|
|
||||||
|
## Benefits of This Approach
|
||||||
|
|
||||||
|
### ✅ Optimal Agent Selection
|
||||||
|
- Each agent handles what they do best
|
||||||
|
- Higher quality results than using a single agent
|
||||||
|
|
||||||
|
### ✅ Knowledge Accumulation
|
||||||
|
- Research findings inform the design
|
||||||
|
- Design specifications guide the implementation
|
||||||
|
- Each phase builds on the previous
|
||||||
|
|
||||||
|
### ✅ Security First
|
||||||
|
- Claude handles security-critical design decisions
|
||||||
|
- Gemini finds latest security best practices
|
||||||
|
- Codex implements exactly as designed
|
||||||
|
|
||||||
|
### ✅ Cost Effective
|
||||||
|
- Gemini handles research efficiently
|
||||||
|
- Claude used only for complex design
|
||||||
|
- Codex for fast implementation
|
||||||
|
|
||||||
|
## Alternative: Parallel Sub-Tasks
|
||||||
|
|
||||||
|
If the payment feature has independent components, you could parallelize parts of Phase 3:
|
||||||
|
|
||||||
|
```
|
||||||
|
[[DELEGATE_PARALLEL]]
|
||||||
|
[[DELEGATE:codex]]
|
||||||
|
Implement core payment service and database layer
|
||||||
|
[[/DELEGATE]]
|
||||||
|
|
||||||
|
[[DELEGATE:codex]]
|
||||||
|
Implement webhook handler and event processing
|
||||||
|
[[/DELEGATE]]
|
||||||
|
|
||||||
|
[[DELEGATE:codex]]
|
||||||
|
Create comprehensive test suite
|
||||||
|
[[/DELEGATE]]
|
||||||
|
[[/DELEGATE_PARALLEL]]
|
||||||
|
```
|
||||||
|
|
||||||
|
This reduces implementation time to ~10-15 minutes if tasks are truly independent.
|
||||||
|
|
||||||
|
## Follow-up Actions
|
||||||
|
|
||||||
|
After implementation:
|
||||||
|
1. **Code Review** - Delegate to Claude:
|
||||||
|
```
|
||||||
|
[[DELEGATE:claude]]
|
||||||
|
Review the payment implementation for security issues and best practices
|
||||||
|
[[/DELEGATE]]
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Documentation** - Delegate to Gemini:
|
||||||
|
```
|
||||||
|
[[DELEGATE:gemini]]
|
||||||
|
Generate user-facing documentation for the payment feature
|
||||||
|
[[/DELEGATE]]
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Integration Tests** - Delegate to Codex:
|
||||||
|
```
|
||||||
|
[[DELEGATE:codex]]
|
||||||
|
Add end-to-end integration tests for the complete payment flow
|
||||||
|
[[/DELEGATE]]
|
||||||
|
```
|
||||||
91
skills/maestro-delegation-advisor/examples/security-audit.md
Normal file
91
skills/maestro-delegation-advisor/examples/security-audit.md
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
# Example: Security Audit
|
||||||
|
|
||||||
|
## User Request
|
||||||
|
"Review our authentication system for security vulnerabilities and suggest improvements"
|
||||||
|
|
||||||
|
## Task Analysis
|
||||||
|
```typescript
|
||||||
|
{
|
||||||
|
complexity: 'high',
|
||||||
|
requiresWeb: false,
|
||||||
|
requiresSpeed: false,
|
||||||
|
requiresContext: true,
|
||||||
|
securityCritical: true,
|
||||||
|
costSensitive: false,
|
||||||
|
canParallelize: false,
|
||||||
|
hasDependencies: false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Decision Process
|
||||||
|
|
||||||
|
### Why Claude?
|
||||||
|
- **Security expertise:** 92/100 capability score
|
||||||
|
- **Performance advantage:** 44% faster, 25% more accurate on security tasks
|
||||||
|
- **Context requirements:** Needs deep understanding of codebase (1M token window)
|
||||||
|
- **Confidence:** 0.95
|
||||||
|
|
||||||
|
### Why not Codex?
|
||||||
|
- Security is not Codex's primary strength (60/100)
|
||||||
|
- Quick fixes ≠ thorough security analysis
|
||||||
|
|
||||||
|
### Why not Gemini?
|
||||||
|
- Doesn't require web research
|
||||||
|
- Security audits need deep technical analysis, not content generation
|
||||||
|
|
||||||
|
## Delegation Output
|
||||||
|
|
||||||
|
```
|
||||||
|
I'll delegate this security analysis to Claude, who specializes in security audits:
|
||||||
|
|
||||||
|
[[DELEGATE:claude]]
|
||||||
|
Perform a comprehensive security audit of our authentication system:
|
||||||
|
|
||||||
|
1. **Code Review:**
|
||||||
|
- Analyze authentication flow in src/auth/
|
||||||
|
- Review session management in src/middleware/session.ts
|
||||||
|
- Check password hashing implementation
|
||||||
|
- Examine token generation and validation
|
||||||
|
|
||||||
|
2. **Common Vulnerabilities:**
|
||||||
|
- SQL injection risks
|
||||||
|
- XSS vulnerabilities
|
||||||
|
- CSRF protection
|
||||||
|
- Session fixation issues
|
||||||
|
- Timing attacks on password comparison
|
||||||
|
|
||||||
|
3. **Best Practices Check:**
|
||||||
|
- Password strength requirements
|
||||||
|
- Account lockout mechanisms
|
||||||
|
- Rate limiting on auth endpoints
|
||||||
|
- Secure cookie configuration
|
||||||
|
- HTTPS enforcement
|
||||||
|
|
||||||
|
4. **Deliverables:**
|
||||||
|
- List of vulnerabilities with severity levels (Critical/High/Medium/Low)
|
||||||
|
- Specific code locations for each issue
|
||||||
|
- Detailed recommendations with code examples
|
||||||
|
- Priority order for fixes
|
||||||
|
[[/DELEGATE]]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Expected Result
|
||||||
|
|
||||||
|
Claude will provide:
|
||||||
|
- Detailed security report with prioritized vulnerabilities
|
||||||
|
- Specific file locations and line numbers
|
||||||
|
- Code examples showing both vulnerable and fixed versions
|
||||||
|
- Compliance recommendations (OWASP, NIST, etc.)
|
||||||
|
|
||||||
|
## Follow-up Actions
|
||||||
|
|
||||||
|
After receiving the audit results:
|
||||||
|
1. Review findings with team
|
||||||
|
2. Prioritize fixes based on severity
|
||||||
|
3. Optionally delegate implementation to Codex:
|
||||||
|
```
|
||||||
|
[[DELEGATE:codex]]
|
||||||
|
Implement the high-priority security fixes identified in the audit:
|
||||||
|
[paste specific recommendations]
|
||||||
|
[[/DELEGATE]]
|
||||||
|
```
|
||||||
69
skills/maestro-delegation-advisor/reference/benchmarks.md
Normal file
69
skills/maestro-delegation-advisor/reference/benchmarks.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Agent Performance Benchmarks
|
||||||
|
|
||||||
|
Quick reference for agent capabilities and performance metrics.
|
||||||
|
|
||||||
|
## Benchmark Scores
|
||||||
|
|
||||||
|
### Claude (Anthropic)
|
||||||
|
- **SWE-bench Verified:** 72.7%
|
||||||
|
- **Context Window:** 1,000,000 tokens (750K words)
|
||||||
|
- **Speed:** Medium (slower than Codex, faster than research)
|
||||||
|
- **Cost:** Higher (premium quality)
|
||||||
|
- **Security Tasks:** 44% faster, 25% more accurate vs competitors
|
||||||
|
|
||||||
|
### Codex (OpenAI)
|
||||||
|
- **HumanEval:** 90.2%
|
||||||
|
- **SWE-bench:** 69.1%
|
||||||
|
- **Context Window:** ~128K tokens
|
||||||
|
- **Speed:** Fastest
|
||||||
|
- **Cost:** Medium
|
||||||
|
|
||||||
|
### Gemini (Google)
|
||||||
|
- **Context Window:** 2,000,000 tokens (largest available)
|
||||||
|
- **Speed:** Medium
|
||||||
|
- **Cost:** Most affordable
|
||||||
|
- **Specialization:** Web search, automation, content generation
|
||||||
|
|
||||||
|
## Capability Matrix
|
||||||
|
|
||||||
|
| Capability | Claude | Codex | Gemini |
|
||||||
|
|------------|--------|-------|--------|
|
||||||
|
| Architecture | 95 | 60 | 65 |
|
||||||
|
| Code Generation | 75 | 95 | 70 |
|
||||||
|
| Refactoring | 90 | 65 | 70 |
|
||||||
|
| Security | 92 | 60 | 55 |
|
||||||
|
| Speed | 60 | 95 | 70 |
|
||||||
|
| Web Research | 50 | 45 | 95 |
|
||||||
|
| Automation | 60 | 70 | 95 |
|
||||||
|
| Cost Efficiency | 40 | 60 | 95 |
|
||||||
|
|
||||||
|
## When to Use Each Agent
|
||||||
|
|
||||||
|
### Use Claude when:
|
||||||
|
- Task complexity is HIGH
|
||||||
|
- Security is critical
|
||||||
|
- Deep codebase analysis needed
|
||||||
|
- Architecture decisions required
|
||||||
|
- Budget allows for quality
|
||||||
|
|
||||||
|
### Use Codex when:
|
||||||
|
- Speed is important
|
||||||
|
- Code generation is primary task
|
||||||
|
- Task complexity is LOW-MEDIUM
|
||||||
|
- Implementing from clear specifications
|
||||||
|
- Bug fixes needed quickly
|
||||||
|
|
||||||
|
### Use Gemini when:
|
||||||
|
- Web research required
|
||||||
|
- Browser automation needed
|
||||||
|
- Workflow automation
|
||||||
|
- Content generation
|
||||||
|
- Budget is constrained
|
||||||
|
- Task requires largest context window
|
||||||
|
|
||||||
|
## Sources
|
||||||
|
|
||||||
|
- SWE-bench Verified: https://render.com/blog/ai-coding-agents-benchmark
|
||||||
|
- Claude Capabilities: https://www.anthropic.com/engineering/claude-code-best-practices
|
||||||
|
- Codex Performance: https://openai.com/index/introducing-codex/
|
||||||
|
- Comparison: https://www.codeant.ai/blogs/claude-code-cli-vs-codex-cli-vs-gemini-cli
|
||||||
Reference in New Issue
Block a user