|
| 1 | +--- |
| 2 | +name: ultrathink-orchestrator |
| 3 | +version: 1.0.0 |
| 4 | +description: Auto-invokes ultrathink workflow for any work request (default orchestrator) |
| 5 | +auto_activate: true |
| 6 | +priority: 5 |
| 7 | +triggers: |
| 8 | + - "implement" |
| 9 | + - "create" |
| 10 | + - "build" |
| 11 | + - "add" |
| 12 | + - "fix" |
| 13 | + - "update" |
| 14 | + - "refactor" |
| 15 | + - "design" |
| 16 | +--- |
| 17 | + |
| 18 | +# Ultrathink Orchestrator Skill |
| 19 | + |
| 20 | +## Purpose |
| 21 | + |
| 22 | +Automatically trigger ultrathink workflow orchestration for development tasks that don't match more specific skills. Invokes workflow skills (default-workflow or investigation-workflow) based on task type. |
| 23 | + |
| 24 | +## Auto-Activation |
| 25 | + |
| 26 | +**Priority**: 5 (LOW - other skills checked first) |
| 27 | +**Triggers**: Common work request patterns (implement, create, build, add, fix, etc.) |
| 28 | + |
| 29 | +## Behavior |
| 30 | + |
| 31 | +When activated: |
| 32 | + |
| 33 | +1. **Detect Task Type**: Identify if task is investigation or development |
| 34 | + - **Investigation keywords**: investigate, explain, understand, how does, why does, analyze, research, explore, examine, study |
| 35 | + - **Development keywords**: implement, build, create, add feature, fix, refactor, deploy |
| 36 | +2. **Select Appropriate Workflow**: |
| 37 | + - Investigation: `investigation-workflow` skill (6 phases) |
| 38 | + - Development: `default-workflow` skill (15 steps) |
| 39 | + - Hybrid: Both workflows sequentially |
| 40 | +3. **Estimate Complexity**: Analyze task complexity (simple/moderate/complex) |
| 41 | +4. **Confirm with User**: Ask for confirmation before proceeding |
| 42 | +5. **Invoke Workflow Skill**: Execute the selected workflow skill |
| 43 | + - **Fallback**: If skill not found, read markdown workflow file |
| 44 | + |
| 45 | +## Task Type Detection |
| 46 | + |
| 47 | +**Investigation Tasks**: |
| 48 | +- Contain keywords: investigate, explain, understand, how does, why does, analyze, research, explore, examine, study |
| 49 | +- Examples: "Investigate authentication", "Explain how routing works", "Understand the database schema" |
| 50 | + |
| 51 | +**Development Tasks**: |
| 52 | +- Contain keywords: implement, build, create, add feature, fix, refactor, deploy |
| 53 | +- Examples: "Implement JWT auth", "Add user registration", "Fix login bug" |
| 54 | + |
| 55 | +**Hybrid Tasks**: |
| 56 | +- Contain both investigation and development keywords |
| 57 | +- Examples: "Investigate auth system, then add OAuth support" |
| 58 | +- Runs investigation workflow first, then development workflow |
| 59 | + |
| 60 | +## Complexity Estimation |
| 61 | + |
| 62 | +**Simple (1-3 files)**: |
| 63 | +- Single function or small change |
| 64 | +- Clear requirements |
| 65 | +- No dependencies |
| 66 | + |
| 67 | +**Moderate (4-10 files)**: |
| 68 | +- Feature spanning multiple components |
| 69 | +- Some ambiguity in requirements |
| 70 | +- Few dependencies |
| 71 | + |
| 72 | +**Complex (10+ files)**: |
| 73 | +- Major feature or refactoring |
| 74 | +- Unclear requirements |
| 75 | +- Many dependencies |
| 76 | +- Architecture changes |
| 77 | + |
| 78 | +## Confirmation Pattern |
| 79 | + |
| 80 | +``` |
| 81 | +I detected a [COMPLEXITY] [TASK_TYPE] request: "[USER REQUEST]" |
| 82 | +
|
| 83 | +Would you like me to use /ultrathink to orchestrate this work? |
| 84 | +- Workflow: [workflow-name] ([N] steps/phases) |
| 85 | +- Estimated scope: [X] files, [Y] steps |
| 86 | +- Time estimate: [Z] minutes |
| 87 | +
|
| 88 | +[Yes] - Proceed with ultrathink orchestration |
| 89 | +[No] - I'll work on this directly without workflow |
| 90 | +[Custom] - Let me clarify the requirements first |
| 91 | +``` |
| 92 | + |
| 93 | +## Implementation |
| 94 | + |
| 95 | +When confirmed, invoke the appropriate workflow skill: |
| 96 | + |
| 97 | +### Development Tasks |
| 98 | +``` |
| 99 | +Invoke the `default-workflow` skill to execute this task following |
| 100 | +the 15-step development workflow in DEFAULT_WORKFLOW.md. |
| 101 | +``` |
| 102 | + |
| 103 | +### Investigation Tasks |
| 104 | +``` |
| 105 | +Invoke the `investigation-workflow` skill to execute this task following |
| 106 | +the 6-phase investigation workflow in INVESTIGATION_WORKFLOW.md. |
| 107 | +``` |
| 108 | + |
| 109 | +### Hybrid Tasks |
| 110 | +``` |
| 111 | +1. First invoke `investigation-workflow` skill (6 phases) |
| 112 | +2. Then invoke `default-workflow` skill (15 steps), using investigation insights |
| 113 | +``` |
| 114 | + |
| 115 | +## Workflow Integration |
| 116 | + |
| 117 | +**Workflow Skills** (preferred): |
| 118 | +- Uses `Skill(skill="default-workflow")` for development |
| 119 | +- Uses `Skill(skill="investigation-workflow")` for investigation |
| 120 | +- Auto-detects task type from keywords |
| 121 | + |
| 122 | +**Fallback** (if skills not available): |
| 123 | +- Reads `.claude/workflow/DEFAULT_WORKFLOW.md` |
| 124 | +- Reads `.claude/workflow/INVESTIGATION_WORKFLOW.md` |
| 125 | +- Provides same functionality via markdown workflows |
| 126 | + |
| 127 | +## Safeguards |
| 128 | + |
| 129 | +1. **Always confirm**: Never auto-execute without user approval |
| 130 | +2. **Task type awareness**: Automatically select appropriate workflow |
| 131 | +3. **Complexity awareness**: Show estimated scope before proceeding |
| 132 | +4. **Escape hatch**: Provide option to work without workflow |
| 133 | +5. **Clarity option**: Allow user to clarify requirements |
| 134 | + |
| 135 | +## When NOT to Activate |
| 136 | + |
| 137 | +- User explicitly said "don't use workflow" |
| 138 | +- Task is trivial (< 5 lines of code) |
| 139 | +- Higher-priority skill already matched |
| 140 | +- User is asking questions, not requesting work |
| 141 | + |
| 142 | +## Example Activations |
| 143 | + |
| 144 | +### Development Task Example |
| 145 | + |
| 146 | +**User**: "Implement JWT authentication for the API" |
| 147 | + |
| 148 | +**This Skill**: |
| 149 | +``` |
| 150 | +I detected a MODERATE development request: "Implement JWT authentication for the API" |
| 151 | +
|
| 152 | +Would you like me to use /ultrathink to orchestrate this work? |
| 153 | +- Workflow: default-workflow (15 steps) |
| 154 | +- Estimated scope: 6-8 files, 8 steps |
| 155 | +- Time estimate: 45-60 minutes |
| 156 | +
|
| 157 | +[Yes] [No] [Custom] |
| 158 | +``` |
| 159 | + |
| 160 | +### Investigation Task Example |
| 161 | + |
| 162 | +**User**: "Investigate how the reflection system works" |
| 163 | + |
| 164 | +**This Skill**: |
| 165 | +``` |
| 166 | +I detected a MODERATE investigation request: "Investigate how the reflection system works" |
| 167 | +
|
| 168 | +Would you like me to use /ultrathink to orchestrate this work? |
| 169 | +- Workflow: investigation-workflow (6 phases) |
| 170 | +- Estimated scope: 10-15 files, deep analysis |
| 171 | +- Time estimate: 30-40 minutes |
| 172 | +
|
| 173 | +[Yes] [No] [Custom] |
| 174 | +``` |
| 175 | + |
| 176 | +### Hybrid Task Example |
| 177 | + |
| 178 | +**User**: "Investigate auth system, then add OAuth support" |
| 179 | + |
| 180 | +**This Skill**: |
| 181 | +``` |
| 182 | +I detected a COMPLEX hybrid request: "Investigate auth system, then add OAuth support" |
| 183 | +
|
| 184 | +Would you like me to use /ultrathink to orchestrate this work? |
| 185 | +- Workflow: investigation-workflow (6 phases) → default-workflow (15 steps) |
| 186 | +- Estimated scope: 15+ files, comprehensive work |
| 187 | +- Time estimate: 90-120 minutes |
| 188 | +
|
| 189 | +[Yes] [No] [Custom] |
| 190 | +``` |
| 191 | + |
| 192 | +## Related |
| 193 | + |
| 194 | +- Default Workflow: `.claude/skills/default-workflow/` |
| 195 | +- Investigation Workflow: `.claude/skills/investigation-workflow/` |
| 196 | +- Ultrathink Command: `.claude/commands/amplihack/ultrathink.md` |
| 197 | +- Workflow Files: `.claude/workflow/DEFAULT_WORKFLOW.md`, `.claude/workflow/INVESTIGATION_WORKFLOW.md` |
0 commit comments