Skip to content

Commit d5d553d

Browse files
authored
Merge pull request #1473 from rysweet/experiment/ultrathink-as-default
feat: Add experimental ultrathink-orchestrator skill (PR #6)
2 parents b96d4a3 + 95af994 commit d5d553d

File tree

2 files changed

+319
-0
lines changed

2 files changed

+319
-0
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Ultrathink Orchestrator Skill
2+
3+
**Version**: 1.0.0
4+
**Priority**: 5 (LOW)
5+
6+
## Overview
7+
8+
Automatic workflow orchestration skill that invokes ultrathink for development work requests. Intelligently selects between investigation and development workflows based on task keywords.
9+
10+
## Purpose
11+
12+
Provide default orchestration for non-trivial development tasks by automatically triggering the appropriate workflow (investigation or development) when no more specific skill matches.
13+
14+
## How It Works
15+
16+
1. Auto-activates on work request patterns (implement, create, fix, investigate, etc.)
17+
2. Detects task type: investigation, development, or hybrid
18+
3. Estimates task complexity (simple/moderate/complex)
19+
4. Asks user for confirmation before proceeding
20+
5. Invokes the appropriate workflow skill:
21+
- **Investigation**: `investigation-workflow` skill (6 phases)
22+
- **Development**: `default-workflow` skill (15 steps)
23+
- **Hybrid**: Both workflows sequentially
24+
25+
## Task Type Detection
26+
27+
**Investigation Tasks**:
28+
- Keywords: investigate, explain, understand, how does, why does, analyze, research, explore, examine, study
29+
- Examples: "Investigate authentication", "Explain routing", "Understand database schema"
30+
31+
**Development Tasks**:
32+
- Keywords: implement, build, create, add feature, fix, refactor, deploy
33+
- Examples: "Implement JWT auth", "Add user registration", "Fix login bug"
34+
35+
**Hybrid Tasks**:
36+
- Contains both investigation and development keywords
37+
- Examples: "Investigate auth system, then add OAuth support"
38+
39+
## Safety Features
40+
41+
- **Always confirms**: Never auto-executes without user approval
42+
- **Low priority**: Other specialized skills take precedence (priority 5)
43+
- **Escape hatch**: Users can decline workflow orchestration
44+
- **Clarity option**: Users can request clarification first
45+
- **Task type awareness**: Automatically routes to appropriate workflow
46+
47+
## Example Interactions
48+
49+
### Development Task
50+
51+
**User**: "Add user authentication to the API"
52+
53+
**Skill Response**:
54+
```
55+
I detected a MODERATE development request: "Add user authentication to the API"
56+
57+
Would you like me to use /ultrathink to orchestrate this work?
58+
- Workflow: default-workflow (15 steps)
59+
- Estimated scope: 6-8 files, 8 steps
60+
- Time estimate: 45-60 minutes
61+
62+
[Yes] [No] [Custom]
63+
```
64+
65+
### Investigation Task
66+
67+
**User**: "Investigate how the reflection system works"
68+
69+
**Skill Response**:
70+
```
71+
I detected a MODERATE investigation request: "Investigate how the reflection system works"
72+
73+
Would you like me to use /ultrathink to orchestrate this work?
74+
- Workflow: investigation-workflow (6 phases)
75+
- Estimated scope: 10-15 files, deep analysis
76+
- Time estimate: 30-40 minutes
77+
78+
[Yes] [No] [Custom]
79+
```
80+
81+
### Hybrid Task
82+
83+
**User**: "Investigate auth system, then add OAuth support"
84+
85+
**Skill Response**:
86+
```
87+
I detected a COMPLEX hybrid request: "Investigate auth system, then add OAuth support"
88+
89+
Would you like me to use /ultrathink to orchestrate this work?
90+
- Workflow: investigation-workflow (6 phases) → default-workflow (15 steps)
91+
- Estimated scope: 15+ files, comprehensive work
92+
- Time estimate: 90-120 minutes
93+
94+
[Yes] [No] [Custom]
95+
```
96+
97+
## Workflow Integration
98+
99+
**Preferred Approach** (workflow skills):
100+
- Uses `Skill(skill="default-workflow")` for development tasks
101+
- Uses `Skill(skill="investigation-workflow")` for investigation tasks
102+
- Automatic task type detection from keywords
103+
104+
**Fallback** (if skills not available):
105+
- Reads `.claude/workflow/DEFAULT_WORKFLOW.md`
106+
- Reads `.claude/workflow/INVESTIGATION_WORKFLOW.md`
107+
- Provides same functionality via markdown workflows
108+
109+
## Benefits
110+
111+
- **Consistent workflow execution**: All non-trivial work follows established patterns
112+
- **Reduced cognitive load**: Automatic workflow selection based on task type
113+
- **User control**: Always asks for confirmation before proceeding
114+
- **Intelligent routing**: Chooses appropriate workflow (investigation vs development)
115+
- **Quality assurance**: Ensures all work goes through proper review and validation
116+
117+
## Related
118+
119+
- Default Workflow Skill: `.claude/skills/default-workflow/`
120+
- Investigation Workflow Skill: `.claude/skills/investigation-workflow/`
121+
- Ultrathink Command: `.claude/commands/amplihack/ultrathink.md`
122+
- Workflow Files: `.claude/workflow/DEFAULT_WORKFLOW.md`, `.claude/workflow/INVESTIGATION_WORKFLOW.md`
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
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

Comments
 (0)