ima-claude 2.20.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -9
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/plugins/ima-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/ima-claude/agents/explorer.md +29 -15
- package/plugins/ima-claude/agents/implementer.md +58 -13
- package/plugins/ima-claude/agents/memory.md +19 -19
- package/plugins/ima-claude/agents/reviewer.md +56 -34
- package/plugins/ima-claude/agents/tester.md +59 -16
- package/plugins/ima-claude/agents/wp-developer.md +66 -21
- package/plugins/ima-claude/hooks/bootstrap.sh +42 -44
- package/plugins/ima-claude/hooks/prompt_coach_digest.md +14 -17
- package/plugins/ima-claude/hooks/prompt_coach_system.md +10 -12
- package/plugins/ima-claude/personalities/README.md +17 -6
- package/plugins/ima-claude/personalities/enable-efficient.md +61 -0
- package/plugins/ima-claude/personalities/enable-terse.md +71 -0
- package/plugins/ima-claude/skills/agentic-workflows/SKILL.md +35 -71
- package/plugins/ima-claude/skills/architect/SKILL.md +54 -168
- package/plugins/ima-claude/skills/compound-bridge/SKILL.md +41 -94
- package/plugins/ima-claude/skills/design-to-code/SKILL.md +43 -78
- package/plugins/ima-claude/skills/discourse/SKILL.md +79 -194
- package/plugins/ima-claude/skills/discourse-admin/SKILL.md +41 -103
- package/plugins/ima-claude/skills/docs-organize/SKILL.md +63 -203
- package/plugins/ima-claude/skills/ember-discourse/SKILL.md +90 -200
- package/plugins/ima-claude/skills/espocrm/SKILL.md +14 -23
- package/plugins/ima-claude/skills/espocrm-api/SKILL.md +79 -192
- package/plugins/ima-claude/skills/functional-programmer/SKILL.md +33 -237
- package/plugins/ima-claude/skills/gh-cli/SKILL.md +26 -65
- package/plugins/ima-claude/skills/ima-bootstrap/SKILL.md +71 -104
- package/plugins/ima-claude/skills/ima-bootstrap/references/ima-brand.md +32 -22
- package/plugins/ima-claude/skills/ima-brand/SKILL.md +18 -23
- package/plugins/ima-claude/skills/ima-copywriting/SKILL.md +68 -179
- package/plugins/ima-claude/skills/ima-doc2pdf/SKILL.md +32 -102
- package/plugins/ima-claude/skills/ima-editorial-scorecard/SKILL.md +38 -63
- package/plugins/ima-claude/skills/ima-editorial-workflow/SKILL.md +69 -114
- package/plugins/ima-claude/skills/ima-email-creator/SKILL.md +16 -22
- package/plugins/ima-claude/skills/ima-forms-expert/SKILL.md +21 -37
- package/plugins/ima-claude/skills/jira-checkpoint/SKILL.md +39 -120
- package/plugins/ima-claude/skills/jquery/SKILL.md +107 -233
- package/plugins/ima-claude/skills/js-fp/SKILL.md +75 -296
- package/plugins/ima-claude/skills/js-fp-api/SKILL.md +52 -162
- package/plugins/ima-claude/skills/js-fp-react/SKILL.md +47 -270
- package/plugins/ima-claude/skills/js-fp-vue/SKILL.md +55 -209
- package/plugins/ima-claude/skills/js-fp-wordpress/SKILL.md +59 -204
- package/plugins/ima-claude/skills/livecanvas/SKILL.md +19 -32
- package/plugins/ima-claude/skills/mcp-atlassian/SKILL.md +92 -162
- package/plugins/ima-claude/skills/mcp-context7/SKILL.md +32 -64
- package/plugins/ima-claude/skills/mcp-gitea/SKILL.md +98 -188
- package/plugins/ima-claude/skills/mcp-github/SKILL.md +60 -124
- package/plugins/ima-claude/skills/mcp-memory/SKILL.md +1 -177
- package/plugins/ima-claude/skills/mcp-qdrant/SKILL.md +58 -115
- package/plugins/ima-claude/skills/mcp-sequential/SKILL.md +32 -87
- package/plugins/ima-claude/skills/mcp-serena/SKILL.md +54 -80
- package/plugins/ima-claude/skills/mcp-tavily/SKILL.md +40 -63
- package/plugins/ima-claude/skills/mcp-vestige/SKILL.md +75 -116
- package/plugins/ima-claude/skills/php-authnet/SKILL.md +32 -65
- package/plugins/ima-claude/skills/php-fp/SKILL.md +50 -129
- package/plugins/ima-claude/skills/php-fp-wordpress/SKILL.md +25 -73
- package/plugins/ima-claude/skills/phpunit-wp/SKILL.md +103 -463
- package/plugins/ima-claude/skills/playwright/SKILL.md +69 -220
- package/plugins/ima-claude/skills/prompt-starter/SKILL.md +33 -83
- package/plugins/ima-claude/skills/prompt-starter/references/code-review.md +38 -0
- package/plugins/ima-claude/skills/py-fp/SKILL.md +78 -384
- package/plugins/ima-claude/skills/quasar-fp/SKILL.md +54 -255
- package/plugins/ima-claude/skills/quickstart/SKILL.md +7 -11
- package/plugins/ima-claude/skills/rails/SKILL.md +63 -184
- package/plugins/ima-claude/skills/resume-session/SKILL.md +14 -35
- package/plugins/ima-claude/skills/rg/SKILL.md +61 -146
- package/plugins/ima-claude/skills/ruby-fp/SKILL.md +66 -163
- package/plugins/ima-claude/skills/save-session/SKILL.md +10 -39
- package/plugins/ima-claude/skills/scorecard/SKILL.md +24 -38
- package/plugins/ima-claude/skills/skill-analyzer/SKILL.md +42 -71
- package/plugins/ima-claude/skills/skill-creator/SKILL.md +79 -250
- package/plugins/ima-claude/skills/task-master/SKILL.md +11 -31
- package/plugins/ima-claude/skills/task-planner/SKILL.md +44 -153
- package/plugins/ima-claude/skills/task-runner/SKILL.md +61 -143
- package/plugins/ima-claude/skills/unit-testing/SKILL.md +59 -134
- package/plugins/ima-claude/skills/wp-ddev/SKILL.md +38 -120
- package/plugins/ima-claude/skills/wp-local/SKILL.md +26 -108
|
@@ -5,224 +5,115 @@ description: "Decomposition and planning sub-skill. Breaks work into Epic > Stor
|
|
|
5
5
|
|
|
6
6
|
# Task Planner - Structured Work Breakdown
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Plan before implementing. Every hour of planning prevents rework.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Work Hierarchy
|
|
11
11
|
|
|
12
|
-
## Core Philosophy
|
|
13
|
-
|
|
14
|
-
### The Planning Imperative
|
|
15
|
-
|
|
16
|
-
**Think before acting. Plan before implementing.**
|
|
17
|
-
|
|
18
|
-
Every hour of planning saves 10 hours of rework. The urge to "just start coding" is the enemy of clean architecture and maintainable systems.
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
Unplanned work → Rework → Technical debt → More rework
|
|
22
|
-
Planned work → Clean implementation → Iteration → Progress
|
|
23
12
|
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
Epic (Big Goal)
|
|
29
|
-
├── Story (Deliverable Outcome)
|
|
30
|
-
│ ├── Task (Actionable Step)
|
|
31
|
-
│ ├── Task
|
|
32
|
-
│ └── Task
|
|
33
|
-
├── Story
|
|
34
|
-
│ ├── Task
|
|
13
|
+
Epic (large goal, multi-session)
|
|
14
|
+
├── Story (deliverable outcome with value)
|
|
15
|
+
│ ├── Task (single actionable step, <2 hours)
|
|
35
16
|
│ └── Task
|
|
36
17
|
└── Story
|
|
37
18
|
└── Task
|
|
38
19
|
```
|
|
39
20
|
|
|
40
|
-
|
|
41
|
-
- **Epic**: A large goal spanning multiple sessions (e.g., "Implement user authentication system")
|
|
42
|
-
- **Story**: A coherent deliverable that provides value (e.g., "Users can log in with email/password")
|
|
43
|
-
- **Task**: A single actionable step, completable in one session (e.g., "Create login form component")
|
|
21
|
+
If a task exceeds 2 hours or requires context switches, break it down further.
|
|
44
22
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Storage Strategy Decision Tree
|
|
23
|
+
## Storage Decision Tree
|
|
48
24
|
|
|
49
25
|
```
|
|
50
|
-
|
|
51
|
-
├── Yes →
|
|
26
|
+
Serena MCP available?
|
|
27
|
+
├── Yes → Needs cross-session persistence?
|
|
52
28
|
│ ├── Yes → Serena Memory (write_memory/read_memory)
|
|
53
29
|
│ └── No → Claude Task List (TaskCreate/TaskUpdate)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
├── Yes → Markdown file (docs/PLANNING.md or similar)
|
|
30
|
+
└── No → Needs cross-session persistence?
|
|
31
|
+
├── Yes → Markdown file (docs/PLANNING.md)
|
|
57
32
|
└── No → Claude Task List (survives compacts)
|
|
58
33
|
```
|
|
59
34
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
|
63
|
-
|
|
64
|
-
| **
|
|
65
|
-
| **Claude Task List** | In-session tracking, current work items | Compacts | "[ ] Implement validation [ ] Add tests" |
|
|
66
|
-
| **Markdown File** | No Serena, need persistence, team visibility | Forever | `docs/PLANNING.md` with full breakdown |
|
|
35
|
+
| Storage | Survives | Use Case |
|
|
36
|
+
|---------|----------|----------|
|
|
37
|
+
| **Serena Memory** | Sessions | Milestones, decisions, project state |
|
|
38
|
+
| **Claude Task List** | Compacts | In-session tracking, current work items |
|
|
39
|
+
| **Markdown File** | Forever | No Serena, need persistence or team visibility |
|
|
67
40
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
For cross-session persistence of project state:
|
|
41
|
+
## Storage Patterns
|
|
71
42
|
|
|
43
|
+
**Serena Memory:**
|
|
72
44
|
```
|
|
73
|
-
# Save project state
|
|
74
45
|
mcp__serena__write_memory
|
|
75
46
|
memory_file_name: "planning-{project-name}"
|
|
76
47
|
content: |
|
|
77
48
|
# Project: {name}
|
|
78
49
|
## Current Phase: 2 - Core Implementation
|
|
79
|
-
|
|
80
50
|
## Completed
|
|
81
|
-
- [x] Phase 1:
|
|
82
|
-
|
|
51
|
+
- [x] Phase 1: Setup and architecture
|
|
83
52
|
## In Progress
|
|
84
53
|
- [ ] Story: User authentication
|
|
85
54
|
- [x] Task: Database schema
|
|
86
55
|
- [ ] Task: Login endpoint
|
|
87
|
-
- [ ] Task: Session management
|
|
88
|
-
|
|
89
56
|
## Upcoming
|
|
90
57
|
- Phase 3: Testing and polish
|
|
91
58
|
|
|
92
|
-
# Resume later
|
|
93
59
|
mcp__serena__read_memory
|
|
94
60
|
memory_file_name: "planning-{project-name}"
|
|
95
61
|
```
|
|
96
62
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
For in-session work tracking (survives context compaction):
|
|
100
|
-
|
|
63
|
+
**Claude Task List:**
|
|
101
64
|
```
|
|
102
|
-
# Create tasks for current work
|
|
103
65
|
TaskCreate
|
|
104
66
|
description: "Implement login form validation"
|
|
105
67
|
status: "in_progress"
|
|
106
68
|
priority: "high"
|
|
107
69
|
|
|
108
|
-
TaskCreate
|
|
109
|
-
description: "Add unit tests for auth service"
|
|
110
|
-
status: "pending"
|
|
111
|
-
priority: "medium"
|
|
112
|
-
|
|
113
|
-
# Update as you work
|
|
114
70
|
TaskUpdate
|
|
115
71
|
id: {task-id}
|
|
116
72
|
status: "completed"
|
|
117
73
|
|
|
118
|
-
# Check status
|
|
119
74
|
TaskList
|
|
120
75
|
```
|
|
121
76
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
**Note:** When using Markdown, use the `docs-organize` Skill for proper file/folder structure
|
|
125
|
-
|
|
126
|
-
When Serena isn't available but you need persistence:
|
|
127
|
-
|
|
77
|
+
**Markdown fallback** (use `docs-organize` skill for file placement):
|
|
128
78
|
```markdown
|
|
129
|
-
<!-- docs/PLANNING.md -->
|
|
130
|
-
# Project Planning
|
|
131
|
-
|
|
132
79
|
## Epic: User Authentication System
|
|
133
80
|
|
|
134
|
-
### Story: Email/Password Login
|
|
135
|
-
**Status:** In Progress
|
|
136
|
-
|
|
81
|
+
### Story: Email/Password Login — In Progress
|
|
137
82
|
- [x] Task: Create users table migration
|
|
138
|
-
- [x] Task: Implement password hashing utility
|
|
139
83
|
- [ ] Task: Create login endpoint
|
|
140
|
-
- [ ] Task: Add session management
|
|
141
84
|
- [ ] Task: Write integration tests
|
|
142
|
-
|
|
143
|
-
### Story: Password Reset Flow
|
|
144
|
-
**Status:** Not Started
|
|
145
|
-
|
|
146
|
-
- [ ] Task: Create password reset tokens table
|
|
147
|
-
- [ ] Task: Implement reset email sender
|
|
148
|
-
- [ ] Task: Create reset confirmation endpoint
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## The Breakdown Process
|
|
152
|
-
|
|
153
|
-
### Step 1: Define the Epic
|
|
154
|
-
|
|
155
|
-
Start with the end state:
|
|
156
|
-
```
|
|
157
|
-
"Users can authenticate via email/password, reset forgotten passwords,
|
|
158
|
-
and stay logged in across browser sessions."
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Step 2: Identify Stories
|
|
162
|
-
|
|
163
|
-
What deliverable outcomes compose the epic?
|
|
164
|
-
```
|
|
165
|
-
1. Users can log in with email/password
|
|
166
|
-
2. Users can register new accounts
|
|
167
|
-
3. Users can reset forgotten passwords
|
|
168
|
-
4. Sessions persist across browser restarts
|
|
169
85
|
```
|
|
170
86
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
For each story, what specific steps are needed?
|
|
174
|
-
```
|
|
175
|
-
Story: Users can log in with email/password
|
|
176
|
-
├── Create users table with email, password_hash columns
|
|
177
|
-
├── Implement password hashing utility (use bcrypt)
|
|
178
|
-
├── Create POST /api/auth/login endpoint
|
|
179
|
-
├── Add login form component
|
|
180
|
-
├── Connect form to API
|
|
181
|
-
└── Add error handling for invalid credentials
|
|
182
|
-
```
|
|
87
|
+
## Breakdown Process
|
|
183
88
|
|
|
184
|
-
|
|
89
|
+
1. **Define Epic** — one sentence end state
|
|
90
|
+
2. **Identify Stories** — deliverable outcomes composing the epic
|
|
91
|
+
3. **Decompose Tasks** — specific steps per story, each <2 hours
|
|
92
|
+
4. **Sequence** — mark dependencies, estimate effort
|
|
93
|
+
5. **Store** — use decision tree above, then execute
|
|
185
94
|
|
|
186
|
-
|
|
95
|
+
**Example sequencing:**
|
|
187
96
|
```
|
|
188
97
|
1. [15m] Create users table ─┐
|
|
189
|
-
2. [30m] Password hashing ─┼─→ 3. [45m] Login endpoint
|
|
190
|
-
4. [30m] Login form
|
|
98
|
+
2. [30m] Password hashing ─┼─→ 3. [45m] Login endpoint → 5. [30m] Connect form
|
|
99
|
+
4. [30m] Login form ─────────┘
|
|
191
100
|
6. [30m] Error handling (after 5)
|
|
192
101
|
```
|
|
193
102
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Based on the decision tree above, store appropriately and begin work.
|
|
197
|
-
|
|
198
|
-
## Quick Reference
|
|
199
|
-
|
|
200
|
-
### Breakdown Checklist
|
|
201
|
-
|
|
202
|
-
Before starting any significant work:
|
|
203
|
-
|
|
204
|
-
- [ ] Can I describe the goal in one sentence?
|
|
205
|
-
- [ ] Have I identified all major deliverables (stories)?
|
|
206
|
-
- [ ] Is each task completable in under 2 hours?
|
|
207
|
-
- [ ] Do I know the dependencies between tasks?
|
|
208
|
-
- [ ] Have I chosen appropriate storage (Serena/TaskList/Markdown)?
|
|
209
|
-
- [ ] If delegating, does each subagent have minimal, clear context?
|
|
210
|
-
|
|
211
|
-
### Red Flags
|
|
103
|
+
## Red Flags — Stop and Restructure
|
|
212
104
|
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
- Dependencies form cycles → Rethink the approach
|
|
105
|
+
- "Task" has 3+ subtasks → it's a Story
|
|
106
|
+
- Agents nesting 3+ levels → flatten
|
|
107
|
+
- Subagent needs "full context" → task too broad
|
|
108
|
+
- Task estimate >2 hours → break down further
|
|
109
|
+
- Dependencies form cycles → rethink approach
|
|
219
110
|
|
|
220
|
-
|
|
111
|
+
## Anti-Patterns
|
|
221
112
|
|
|
222
|
-
| Anti-Pattern |
|
|
223
|
-
|
|
224
|
-
| "I'll figure it out as I go" |
|
|
225
|
-
| "This task is simple enough" |
|
|
226
|
-
| "I'll remember the plan" |
|
|
113
|
+
| Anti-Pattern | Solution |
|
|
114
|
+
|--------------|----------|
|
|
115
|
+
| "I'll figure it out as I go" | Plan first, even 5 minutes |
|
|
116
|
+
| "This task is simple enough" | Still write it down |
|
|
117
|
+
| "I'll remember the plan" | Use TaskList or Serena |
|
|
227
118
|
|
|
228
|
-
**REQUIRED
|
|
119
|
+
**REQUIRED:** After decomposition, use `task-runner` to delegate to agents.
|
|
@@ -5,188 +5,106 @@ description: "Agent delegation and execution sub-skill. Selects models (opus/son
|
|
|
5
5
|
|
|
6
6
|
# Task Runner - Agent Delegation & Execution
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
You are the Orchestrator. Agents implement. Max nesting: 2 levels deep.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Agent Delegation Patterns
|
|
13
|
-
|
|
14
|
-
### The Two-Level Rule
|
|
15
|
-
|
|
16
|
-
**Maximum nesting: 2 levels deep.**
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
Main Claude
|
|
20
|
-
├── Subagent A (specific task)
|
|
21
|
-
└── Subagent B (specific task)
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Deeper hierarchies create:
|
|
25
|
-
- Debugging nightmares
|
|
26
|
-
- Context loss
|
|
27
|
-
- Coordination overhead
|
|
28
|
-
- Exponential complexity
|
|
29
|
-
|
|
30
|
-
**If you think you need 3+ levels, restructure the work instead.**
|
|
31
|
-
|
|
32
|
-
### Named Agents (Preferred)
|
|
33
|
-
|
|
34
|
-
**Delegate to named agents when one fits. Fall back to generic agents for edge cases.**
|
|
35
|
-
|
|
36
|
-
The plugin provides purpose-built agents with enforced constraints (model, tools, permissions, skills). Use them instead of manually configuring generic agents.
|
|
10
|
+
## Named Agents (Prefer over generic)
|
|
37
11
|
|
|
38
12
|
```
|
|
39
13
|
Agent(agent_type="ima-claude:explorer", ...) # Read-only codebase exploration (haiku)
|
|
40
14
|
Agent(agent_type="ima-claude:implementer", ...) # Standard implementation (sonnet + FP skills)
|
|
41
15
|
Agent(agent_type="ima-claude:reviewer", ...) # Code quality review (sonnet, read-only)
|
|
16
|
+
Agent(agent_type="ima-claude:tester", ...) # Test writing/running (sonnet + test skills)
|
|
42
17
|
Agent(agent_type="ima-claude:wp-developer", ...) # WordPress specialist (sonnet + WP skills)
|
|
18
|
+
Agent(agent_type="ima-claude:memory", ...) # Memory ops (Vestige/Qdrant/Serena)
|
|
43
19
|
```
|
|
44
20
|
|
|
45
|
-
**
|
|
46
|
-
|
|
21
|
+
**Selection tree:**
|
|
47
22
|
```
|
|
48
23
|
What does the subtask need?
|
|
49
|
-
├── Find files,
|
|
50
|
-
|
|
51
|
-
├──
|
|
52
|
-
|
|
53
|
-
├──
|
|
54
|
-
|
|
55
|
-
├──
|
|
56
|
-
|
|
57
|
-
├── Write tests, run test suites, TDD, debug test failures?
|
|
58
|
-
│ → ima-claude:tester (sonnet, test orchestration + FP)
|
|
59
|
-
├── Memory operations (search, store, consolidate)?
|
|
60
|
-
│ → ima-claude:memory (sonnet, Vestige/Qdrant/Serena)
|
|
61
|
-
├── Needs a custom tool/skill combination?
|
|
62
|
-
│ → general-purpose with explicit model parameter
|
|
63
|
-
└── Uncertain?
|
|
64
|
-
→ ima-claude:implementer (safe default)
|
|
24
|
+
├── Find files, explore code? → ima-claude:explorer (haiku, read-only, cheap)
|
|
25
|
+
├── Implement, fix, refactor? → ima-claude:implementer (sonnet, FP-aware)
|
|
26
|
+
├── WordPress (plugin/theme/WP-CLI)? → ima-claude:wp-developer (sonnet, full WP bundle)
|
|
27
|
+
├── Review code quality/security? → ima-claude:reviewer (sonnet, read-only)
|
|
28
|
+
├── Write/run tests, TDD? → ima-claude:tester (sonnet)
|
|
29
|
+
├── Memory search/store/consolidate? → ima-claude:memory (sonnet)
|
|
30
|
+
├── Custom tool/skill combo? → generic agent with explicit model
|
|
31
|
+
└── Uncertain? → ima-claude:implementer (safe default)
|
|
65
32
|
```
|
|
66
33
|
|
|
67
34
|
| Agent | Model | Mode | Use For |
|
|
68
35
|
|-------|-------|------|---------|
|
|
69
|
-
| **explorer** | haiku | read-only | File discovery, architecture
|
|
70
|
-
| **implementer** | sonnet | full
|
|
71
|
-
| **reviewer** | sonnet | read-only | Code review, security
|
|
72
|
-
| **tester** | sonnet | full
|
|
73
|
-
| **wp-developer** | sonnet | full
|
|
74
|
-
| **memory** | sonnet | full
|
|
75
|
-
|
|
76
|
-
### Model Selection (Generic Agents)
|
|
36
|
+
| **explorer** | haiku | read-only | File discovery, architecture, code search |
|
|
37
|
+
| **implementer** | sonnet | full | Feature dev, bug fixes, refactoring |
|
|
38
|
+
| **reviewer** | sonnet | read-only | Code review, security, FP compliance |
|
|
39
|
+
| **tester** | sonnet | full | Test creation, TDD, debugging failures |
|
|
40
|
+
| **wp-developer** | sonnet | full | WordPress plugins, themes, WP-CLI |
|
|
41
|
+
| **memory** | sonnet | full | Vestige/Qdrant/Serena memory ops |
|
|
77
42
|
|
|
78
|
-
|
|
43
|
+
## Model Selection (Generic Agents)
|
|
79
44
|
|
|
80
|
-
|
|
45
|
+
Opus orchestrates. Sonnet executes. Haiku handles trivial.
|
|
81
46
|
|
|
82
|
-
| Model |
|
|
83
|
-
|
|
84
|
-
| **haiku** |
|
|
85
|
-
| **sonnet** |
|
|
86
|
-
| **opus** |
|
|
47
|
+
| Model | Use For |
|
|
48
|
+
|-------|---------|
|
|
49
|
+
| **haiku** | File searches, quick lookups, simple reads |
|
|
50
|
+
| **sonnet** | Most delegated work: implementation, research, testing |
|
|
51
|
+
| **opus** | Orchestration, complex reasoning, ambiguous trade-offs |
|
|
87
52
|
|
|
88
|
-
|
|
89
|
-
Sonnet can handle it. If the agent needs to make judgment calls about ambiguous trade-offs,
|
|
90
|
-
consider Opus.
|
|
53
|
+
## Minimal Context Principle
|
|
91
54
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
**Give subagents only what they need: task in, result out.**
|
|
55
|
+
Give subagents only what they need.
|
|
95
56
|
|
|
96
57
|
```
|
|
97
|
-
Bad:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Good: "Add a submit button to /src/components/LoginForm.vue that
|
|
101
|
-
calls the onSubmit prop. Return the updated file."
|
|
58
|
+
Bad: Full project history + all decisions + "also add a button"
|
|
59
|
+
Good: "Add submit button to /src/components/LoginForm.vue calling onSubmit prop. Return updated file."
|
|
102
60
|
```
|
|
103
61
|
|
|
104
|
-
|
|
105
|
-
- The specific task
|
|
106
|
-
- The specific file(s) to modify
|
|
107
|
-
- The expected output format
|
|
62
|
+
80% of subagent tasks are fully isolated: specific task + specific file(s) + expected output. No project history, no architectural decisions, no other tasks.
|
|
108
63
|
|
|
109
|
-
|
|
110
|
-
- Project history
|
|
111
|
-
- Architectural decisions
|
|
112
|
-
- Other tasks
|
|
113
|
-
- Your reasoning process
|
|
64
|
+
## Decomposition Patterns
|
|
114
65
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
**Vertical (Sequential):** When steps depend on each other.
|
|
66
|
+
**Vertical (sequential):** Steps depend on each other → execute in order.
|
|
118
67
|
```
|
|
119
|
-
|
|
120
|
-
↓
|
|
121
|
-
Step 2: Implement data access layer
|
|
122
|
-
↓
|
|
123
|
-
Step 3: Build API endpoints
|
|
124
|
-
↓
|
|
125
|
-
Step 4: Create UI components
|
|
68
|
+
Schema → Data layer → API endpoints → UI components
|
|
126
69
|
```
|
|
127
|
-
*Execute in order. Each step needs the previous step's output.*
|
|
128
70
|
|
|
129
|
-
**Horizontal (
|
|
71
|
+
**Horizontal (parallel):** Independent steps → execute concurrently.
|
|
130
72
|
```
|
|
131
|
-
|
|
132
|
-
│ Main Claude (coordinator) │
|
|
133
|
-
├──────────┬──────────┬──────────┬────────┤
|
|
134
|
-
│ Agent A │ Agent B │ Agent C │ Agent D│
|
|
135
|
-
│ Login UI │ Auth API │ DB Setup │ Tests │
|
|
136
|
-
└──────────┴──────────┴──────────┴────────┘
|
|
73
|
+
Main Claude → [Login UI | Auth API | DB Setup | Tests]
|
|
137
74
|
```
|
|
138
|
-
*Execute in parallel when tasks don't share state or dependencies.*
|
|
139
|
-
|
|
140
|
-
### Delegation Decision Framework
|
|
141
|
-
|
|
142
|
-
Before delegating to a subagent, ask:
|
|
143
|
-
|
|
144
|
-
**1. Is the task clearly bounded?**
|
|
145
|
-
- Can you describe the input and expected output in 2-3 sentences?
|
|
146
|
-
- Are the success criteria unambiguous?
|
|
147
|
-
- No? → Break it down further before delegating.
|
|
148
75
|
|
|
149
|
-
|
|
150
|
-
- Does the agent need to modify files another agent is touching?
|
|
151
|
-
- Does it need context from other ongoing work?
|
|
152
|
-
- Yes? → Don't parallelize. Do sequentially or yourself.
|
|
76
|
+
## Delegation Checklist
|
|
153
77
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
78
|
+
Before delegating, verify:
|
|
79
|
+
1. **Bounded?** Task describable in 2-3 sentences with clear success criteria
|
|
80
|
+
2. **No shared state?** Agent won't conflict with other agents' files
|
|
81
|
+
3. **Minimal context?** Agent succeeds with task + 1-2 files max
|
|
82
|
+
4. **Failure safe?** Can retry or fix without cascading
|
|
83
|
+
5. **Escalation-aware?** Expect three return shapes — success, failure, **ESCALATION**. Don't treat escalation as failure.
|
|
158
84
|
|
|
159
|
-
|
|
160
|
-
- If the subagent fails, can you retry or fix easily?
|
|
161
|
-
- Does failure cascade to other work?
|
|
162
|
-
- High risk? → Do it yourself or add verification.
|
|
85
|
+
## Handling ESCALATION returns (advisor pattern)
|
|
163
86
|
|
|
164
|
-
|
|
165
|
-
- Is the task well-scoped with clear criteria? → `model: "sonnet"`
|
|
166
|
-
- Is it a quick file search or lookup? → `model: "haiku"`
|
|
167
|
-
- Does it require complex reasoning or ambiguous trade-offs? → `model: "opus"`
|
|
168
|
-
- Default to Sonnet. Opus orchestrates, Sonnet executes.
|
|
87
|
+
Executor agents return `ESCALATION: <trigger>` when they hit out-of-scope forks (scope drift, architectural fork, security-sensitive changes, repeated failure, ambiguous requirements). This is the designed-in advisor channel — parent (Opus) is the advisor.
|
|
169
88
|
|
|
170
|
-
|
|
89
|
+
When an agent returns ESCALATION:
|
|
171
90
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
| "Just one more level of agents" | Debugging nightmare | Max 2 levels, restructure |
|
|
176
|
-
| "Every agent needs Opus" | Wastes expensive tokens | Sonnet for most tasks, Opus for orchestration |
|
|
91
|
+
1. Read the structured report — `Did`, `Blocked on`, `Options`, `Recommendation`, `Files touched`
|
|
92
|
+
2. Decide — continue as planned, narrow the task, expand the scope, abandon, or ask the human (AskUserQuestion)
|
|
93
|
+
3. Re-dispatch with explicit guidance — do NOT just retry the same prompt. Add the decision to the new task.
|
|
177
94
|
|
|
178
|
-
|
|
95
|
+
Cost shape: Sonnet ran cheap, stopped early, returned a focused question. Opus answers the question. Sonnet resumes with clarity. This is cheaper than letting Sonnet guess wrong and rework.
|
|
179
96
|
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
- **mcp-vestige** - For cross-project decisions, patterns, and intentions
|
|
185
|
-
- **architect** - For evaluating architectural choices during planning
|
|
186
|
-
- **save-session / resume-session** - For session state management
|
|
97
|
+
**Do NOT:**
|
|
98
|
+
- Tell agents to "just figure it out" — that defeats the escalation channel
|
|
99
|
+
- Treat ESCALATION as retryable failure — it's a request for arbitration, not a crash
|
|
100
|
+
- Re-dispatch without adding the resolution — agent will escalate the same thing again
|
|
187
101
|
|
|
188
|
-
|
|
102
|
+
## Anti-Patterns
|
|
189
103
|
|
|
190
|
-
|
|
104
|
+
| Anti-Pattern | Solution |
|
|
105
|
+
|--------------|----------|
|
|
106
|
+
| "Agent needs everything" | Minimal context — task + files only |
|
|
107
|
+
| "3+ levels of agents" | Max 2 levels — restructure the work |
|
|
108
|
+
| "Every agent needs Opus" | Sonnet for most; Opus orchestrates only |
|
|
191
109
|
|
|
192
|
-
|
|
110
|
+
**REQUIRED:** If work isn't decomposed yet, use `task-planner` first.
|