opencode-metis 0.1.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 +140 -0
- package/dist/cli.cjs +63 -0
- package/dist/mcp-server.cjs +51 -0
- package/dist/plugin.cjs +4 -0
- package/dist/worker.cjs +224 -0
- package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
- package/opencode/agent/the-analyst/market-research.md +77 -0
- package/opencode/agent/the-analyst/project-coordination.md +81 -0
- package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
- package/opencode/agent/the-architect/compatibility-review.md +138 -0
- package/opencode/agent/the-architect/complexity-review.md +137 -0
- package/opencode/agent/the-architect/quality-review.md +67 -0
- package/opencode/agent/the-architect/security-review.md +127 -0
- package/opencode/agent/the-architect/system-architecture.md +119 -0
- package/opencode/agent/the-architect/system-documentation.md +83 -0
- package/opencode/agent/the-architect/technology-research.md +85 -0
- package/opencode/agent/the-chief.md +79 -0
- package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
- package/opencode/agent/the-designer/design-foundation.md +74 -0
- package/opencode/agent/the-designer/interaction-architecture.md +75 -0
- package/opencode/agent/the-designer/user-research.md +70 -0
- package/opencode/agent/the-meta-agent.md +155 -0
- package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
- package/opencode/agent/the-platform-engineer/containerization.md +106 -0
- package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
- package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
- package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
- package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
- package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
- package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
- package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
- package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
- package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
- package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
- package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
- package/opencode/agent/the-software-engineer/api-development.md +78 -0
- package/opencode/agent/the-software-engineer/component-development.md +79 -0
- package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
- package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
- package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
- package/opencode/command/analyze.md +149 -0
- package/opencode/command/constitution.md +178 -0
- package/opencode/command/debug.md +194 -0
- package/opencode/command/document.md +178 -0
- package/opencode/command/implement.md +225 -0
- package/opencode/command/refactor.md +207 -0
- package/opencode/command/review.md +229 -0
- package/opencode/command/simplify.md +267 -0
- package/opencode/command/specify.md +191 -0
- package/opencode/command/validate.md +224 -0
- package/opencode/skill/accessibility-design/SKILL.md +566 -0
- package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
- package/opencode/skill/agent-coordination/SKILL.md +224 -0
- package/opencode/skill/api-contract-design/SKILL.md +550 -0
- package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
- package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
- package/opencode/skill/architecture-design/SKILL.md +160 -0
- package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
- package/opencode/skill/architecture-design/template.md +749 -0
- package/opencode/skill/architecture-design/validation.md +99 -0
- package/opencode/skill/architecture-selection/SKILL.md +522 -0
- package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
- package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
- package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
- package/opencode/skill/code-quality-review/SKILL.md +337 -0
- package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
- package/opencode/skill/code-quality-review/reference.md +322 -0
- package/opencode/skill/code-review/SKILL.md +363 -0
- package/opencode/skill/code-review/reference.md +450 -0
- package/opencode/skill/codebase-analysis/SKILL.md +139 -0
- package/opencode/skill/codebase-navigation/SKILL.md +227 -0
- package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
- package/opencode/skill/coding-conventions/SKILL.md +178 -0
- package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
- package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
- package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
- package/opencode/skill/constitution-validation/SKILL.md +315 -0
- package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
- package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
- package/opencode/skill/constitution-validation/template.md +115 -0
- package/opencode/skill/context-preservation/SKILL.md +445 -0
- package/opencode/skill/data-modeling/SKILL.md +385 -0
- package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
- package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
- package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
- package/opencode/skill/documentation-extraction/SKILL.md +259 -0
- package/opencode/skill/documentation-sync/SKILL.md +431 -0
- package/opencode/skill/domain-driven-design/SKILL.md +509 -0
- package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
- package/opencode/skill/domain-driven-design/reference.md +465 -0
- package/opencode/skill/drift-detection/SKILL.md +383 -0
- package/opencode/skill/drift-detection/reference.md +340 -0
- package/opencode/skill/error-recovery/SKILL.md +162 -0
- package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
- package/opencode/skill/feature-prioritization/SKILL.md +419 -0
- package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
- package/opencode/skill/feature-prioritization/reference.md +256 -0
- package/opencode/skill/git-workflow/SKILL.md +453 -0
- package/opencode/skill/implementation-planning/SKILL.md +215 -0
- package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
- package/opencode/skill/implementation-planning/template.md +220 -0
- package/opencode/skill/implementation-planning/validation.md +88 -0
- package/opencode/skill/implementation-verification/SKILL.md +272 -0
- package/opencode/skill/knowledge-capture/SKILL.md +265 -0
- package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
- package/opencode/skill/knowledge-capture/reference.md +444 -0
- package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
- package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
- package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
- package/opencode/skill/observability-design/SKILL.md +291 -0
- package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
- package/opencode/skill/pattern-detection/SKILL.md +171 -0
- package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
- package/opencode/skill/performance-analysis/SKILL.md +266 -0
- package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
- package/opencode/skill/requirements-analysis/SKILL.md +139 -0
- package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
- package/opencode/skill/requirements-analysis/template.md +177 -0
- package/opencode/skill/requirements-analysis/validation.md +69 -0
- package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
- package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
- package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
- package/opencode/skill/safe-refactoring/SKILL.md +312 -0
- package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
- package/opencode/skill/security-assessment/SKILL.md +421 -0
- package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
- package/opencode/skill/specification-management/SKILL.md +143 -0
- package/opencode/skill/specification-management/readme-template.md +32 -0
- package/opencode/skill/specification-management/reference.md +115 -0
- package/opencode/skill/specification-management/spec.py +229 -0
- package/opencode/skill/specification-validation/SKILL.md +397 -0
- package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
- package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
- package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
- package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
- package/opencode/skill/task-delegation/SKILL.md +607 -0
- package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
- package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
- package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
- package/opencode/skill/task-delegation/reference.md +825 -0
- package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
- package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
- package/opencode/skill/technical-writing/SKILL.md +190 -0
- package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
- package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
- package/opencode/skill/test-design/SKILL.md +464 -0
- package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
- package/opencode/skill/testing/SKILL.md +213 -0
- package/opencode/skill/testing/examples/test-pyramid.md +724 -0
- package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
- package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
- package/opencode/skill/user-research/SKILL.md +508 -0
- package/opencode/skill/user-research/examples/interview-questions.md +265 -0
- package/opencode/skill/user-research/examples/personas.md +267 -0
- package/opencode/skill/vibe-security/SKILL.md +654 -0
- package/package.json +45 -0
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-delegation
|
|
3
|
+
description: Generate structured agent prompts with FOCUS/EXCLUDE templates for task delegation. Use when breaking down complex tasks, launching parallel specialists, coordinating multiple agents, creating agent instructions, determining execution strategy, or preventing file path collisions. Handles task decomposition, parallel vs sequential logic, scope validation, and retry strategies.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
category: development
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Task Delegation
|
|
12
|
+
|
|
13
|
+
Roleplay as an agent delegation specialist that helps orchestrators break down complex tasks and coordinate multiple specialist agents.
|
|
14
|
+
|
|
15
|
+
TaskDelegation {
|
|
16
|
+
Activation {
|
|
17
|
+
Breaking down complex tasks into distinct activities
|
|
18
|
+
Launching specialist agents (parallel or sequential)
|
|
19
|
+
Creating structured agent prompts with FOCUS/EXCLUDE templates
|
|
20
|
+
Coordinating multiple agents working on related tasks
|
|
21
|
+
Determining execution strategy (parallel vs sequential)
|
|
22
|
+
Preventing file path collisions between agents
|
|
23
|
+
Validating agent responses for scope compliance
|
|
24
|
+
Generating retry strategies for failed agents
|
|
25
|
+
Assessing dependencies between activities
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
CorePrinciples {
|
|
29
|
+
ActivityBasedDecomposition {
|
|
30
|
+
Decompose by ACTIVITIES (what needs doing), not roles
|
|
31
|
+
DO => "Analyze security requirements", "Design database schema", "Create API endpoints"
|
|
32
|
+
DONT => "Backend engineer do X", "Frontend developer do Y"
|
|
33
|
+
Why => System automatically matches activities to specialized agents
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ParallelFirstMindset {
|
|
37
|
+
DEFAULT => Always execute in parallel unless tasks depend on each other
|
|
38
|
+
Parallel execution maximizes velocity
|
|
39
|
+
Only go sequential when dependencies or shared state require it
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
TaskDecomposition {
|
|
44
|
+
DecisionProcess {
|
|
45
|
+
1. Identify distinct activities - What separate pieces of work are needed?
|
|
46
|
+
2. Determine expertise required - What type of knowledge does each need?
|
|
47
|
+
3. Find natural boundaries - Where do activities naturally separate?
|
|
48
|
+
4. Check for dependencies - Does any activity depend on another's output?
|
|
49
|
+
5. Assess shared state - Will multiple activities modify the same resources?
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
Template {
|
|
53
|
+
```
|
|
54
|
+
Original Task: [The complex task to break down]
|
|
55
|
+
|
|
56
|
+
Activities Identified:
|
|
57
|
+
1. [Activity 1 name]
|
|
58
|
+
- Expertise: [Type of knowledge needed]
|
|
59
|
+
- Output: [What this produces]
|
|
60
|
+
- Dependencies: [What it needs from other activities]
|
|
61
|
+
|
|
62
|
+
2. [Activity 2 name]
|
|
63
|
+
- Expertise: [Type of knowledge needed]
|
|
64
|
+
- Output: [What this produces]
|
|
65
|
+
- Dependencies: [What it needs from other activities]
|
|
66
|
+
|
|
67
|
+
Execution Strategy: [Parallel / Sequential / Mixed]
|
|
68
|
+
Reasoning: [Why this strategy fits]
|
|
69
|
+
```
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
WhenToDecompose {
|
|
73
|
+
Decompose {
|
|
74
|
+
Multiple distinct activities needed
|
|
75
|
+
Independent components that can be validated separately
|
|
76
|
+
Natural boundaries between system layers
|
|
77
|
+
Different stakeholder perspectives required
|
|
78
|
+
Task complexity exceeds single agent capacity
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
DontDecompose {
|
|
82
|
+
Single focused activity
|
|
83
|
+
No clear separation of concerns
|
|
84
|
+
Overhead exceeds benefits
|
|
85
|
+
Task is already atomic
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
Example {
|
|
90
|
+
```
|
|
91
|
+
Original Task: Add user authentication to the application
|
|
92
|
+
|
|
93
|
+
Activities:
|
|
94
|
+
1. Analyze security requirements
|
|
95
|
+
- Expertise: Security analysis
|
|
96
|
+
- Output: Security requirements document
|
|
97
|
+
- Dependencies: None
|
|
98
|
+
|
|
99
|
+
2. Design database schema
|
|
100
|
+
- Expertise: Database design
|
|
101
|
+
- Output: Schema design with user tables
|
|
102
|
+
- Dependencies: Security requirements (Activity 1)
|
|
103
|
+
|
|
104
|
+
3. Create API endpoints
|
|
105
|
+
- Expertise: Backend development
|
|
106
|
+
- Output: Login/logout/register endpoints
|
|
107
|
+
- Dependencies: Database schema (Activity 2)
|
|
108
|
+
|
|
109
|
+
4. Build login/register UI
|
|
110
|
+
- Expertise: Frontend development
|
|
111
|
+
- Output: Authentication UI components
|
|
112
|
+
- Dependencies: API endpoints (Activity 3)
|
|
113
|
+
|
|
114
|
+
Execution Strategy: Mixed
|
|
115
|
+
- Sequential: 1 -> 2 -> (3 & 4 parallel)
|
|
116
|
+
Reasoning: Early activities inform later ones, but API and UI can be built in parallel once schema exists
|
|
117
|
+
```
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
DocumentationDecision {
|
|
122
|
+
CriteriaForDocumentation {
|
|
123
|
+
Include documentation in OUTPUT only when ALL criteria are met:
|
|
124
|
+
1. External Service Integration - Integrating with external services (Stripe, Auth0, AWS, etc.)
|
|
125
|
+
2. Reusable - Pattern/interface/rule used in 2+ places OR clearly reusable
|
|
126
|
+
3. NonObvious - Not standard practices (REST, MVC, CRUD)
|
|
127
|
+
4. NotDuplicate - Check existing docs first: grep -ri "keyword" docs/ or find docs -name "*topic*"
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
DecisionLogic {
|
|
131
|
+
FoundExistingDocs => OUTPUT: "Update docs/[category]/[file.md]"
|
|
132
|
+
NoExistingDocsMeetsCriteria => OUTPUT: "Create docs/[category]/[file.md]"
|
|
133
|
+
DoesntMeetCriteria => No documentation in OUTPUT
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
Categories {
|
|
137
|
+
docs/interfaces/ => External service integrations (Stripe, Auth0, AWS, webhooks)
|
|
138
|
+
docs/patterns/ => Technical patterns (caching, auth flow, error handling)
|
|
139
|
+
docs/domain/ => Business rules and domain logic (permissions, pricing, workflows)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
WhatNotToDocument {
|
|
143
|
+
Meta-documentation (SUMMARY.md, REPORT.md, ANALYSIS.md)
|
|
144
|
+
Standard practices (REST APIs, MVC, CRUD)
|
|
145
|
+
One-off implementation details
|
|
146
|
+
Duplicate files when existing docs should be updated
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
ParallelVsSequential {
|
|
151
|
+
DecisionMatrix {
|
|
152
|
+
| Scenario | Dependencies | Shared State | Validation | File Paths | Recommendation |
|
|
153
|
+
| --- | --- | --- | --- | --- | --- |
|
|
154
|
+
| Research tasks | None | Read-only | Independent | N/A | PARALLEL |
|
|
155
|
+
| Analysis tasks | None | Read-only | Independent | N/A | PARALLEL |
|
|
156
|
+
| Documentation | None | Unique paths | Independent | Unique | PARALLEL |
|
|
157
|
+
| Code creation | None | Unique files | Independent | Unique | PARALLEL |
|
|
158
|
+
| Build pipeline | Sequential | Shared files | Dependent | Same | SEQUENTIAL |
|
|
159
|
+
| File editing | None | Same file | Collision risk | Same | SEQUENTIAL |
|
|
160
|
+
| Dependent tasks | B needs A | Any | Dependent | Any | SEQUENTIAL |
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
ParallelChecklist {
|
|
164
|
+
Run this checklist to confirm parallel execution is safe:
|
|
165
|
+
- [ ] Independent tasks - No task depends on another's output
|
|
166
|
+
- [ ] No shared state - No simultaneous writes to same data
|
|
167
|
+
- [ ] Separate validation - Each can be validated independently
|
|
168
|
+
- [ ] Won't block - No resource contention
|
|
169
|
+
- [ ] Unique file paths - If creating files, paths don't collide
|
|
170
|
+
|
|
171
|
+
AllChecked => PARALLEL EXECUTION - Launch all agents in single response
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
SequentialIndicators {
|
|
175
|
+
Dependency chain - Task B needs Task A's output
|
|
176
|
+
Shared state - Multiple tasks modify same resource
|
|
177
|
+
Validation dependency - Must validate before proceeding
|
|
178
|
+
File path collision - Multiple tasks write same file
|
|
179
|
+
Order matters - Business logic requires specific sequence
|
|
180
|
+
|
|
181
|
+
AnyPresent => SEQUENTIAL EXECUTION - Launch agents one at a time
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
MixedStrategy {
|
|
185
|
+
Pattern => Parallel groups connected sequentially
|
|
186
|
+
```
|
|
187
|
+
Group 1 (parallel): Tasks A, B, C
|
|
188
|
+
| (sequential)
|
|
189
|
+
Group 2 (parallel): Tasks D, E
|
|
190
|
+
| (sequential)
|
|
191
|
+
Group 3: Task F
|
|
192
|
+
```
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
AgentPromptTemplate {
|
|
197
|
+
BaseStructure {
|
|
198
|
+
```
|
|
199
|
+
FOCUS: [Complete task description with all details]
|
|
200
|
+
|
|
201
|
+
EXCLUDE: [Task-specific things to avoid]
|
|
202
|
+
- Do not create new patterns when existing ones work
|
|
203
|
+
- Do not duplicate existing work
|
|
204
|
+
[Add specific exclusions for this task]
|
|
205
|
+
|
|
206
|
+
CONTEXT: [Task background and constraints]
|
|
207
|
+
- [Include relevant rules for this task]
|
|
208
|
+
- Follow discovered patterns exactly
|
|
209
|
+
[Add task-specific context]
|
|
210
|
+
|
|
211
|
+
OUTPUT: [Expected deliverables with exact paths if applicable]
|
|
212
|
+
|
|
213
|
+
SUCCESS: [Measurable completion criteria]
|
|
214
|
+
- Follows existing patterns
|
|
215
|
+
- Integrates with existing system
|
|
216
|
+
[Add task-specific success criteria]
|
|
217
|
+
|
|
218
|
+
TERMINATION: [When to stop]
|
|
219
|
+
- Completed successfully
|
|
220
|
+
- Blocked by [specific blockers]
|
|
221
|
+
- Maximum 3 attempts reached
|
|
222
|
+
```
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
ForImplementationTasks {
|
|
226
|
+
```
|
|
227
|
+
OUTPUT:
|
|
228
|
+
- [Expected file path 1]
|
|
229
|
+
- [Expected file path 2]
|
|
230
|
+
- Structured result:
|
|
231
|
+
- Files created/modified: [paths]
|
|
232
|
+
- Summary: [1-2 sentences]
|
|
233
|
+
- Tests: [status]
|
|
234
|
+
- Blockers: [if any]
|
|
235
|
+
```
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
ForFileCreatingAgents {
|
|
239
|
+
```
|
|
240
|
+
DISCOVERY_FIRST: Before starting your task, understand the environment:
|
|
241
|
+
- [Appropriate discovery commands for the task type]
|
|
242
|
+
- Identify existing patterns and conventions
|
|
243
|
+
- Locate where similar files live
|
|
244
|
+
- Check project structure and naming conventions
|
|
245
|
+
|
|
246
|
+
[Rest of template follows]
|
|
247
|
+
```
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
ForReviewAgents {
|
|
251
|
+
```
|
|
252
|
+
REVIEW_FOCUS: [Implementation to review]
|
|
253
|
+
|
|
254
|
+
VERIFY:
|
|
255
|
+
- [Specific criteria to check]
|
|
256
|
+
- [Quality requirements]
|
|
257
|
+
- [Specification compliance]
|
|
258
|
+
- [Security considerations]
|
|
259
|
+
|
|
260
|
+
CONTEXT: [Background about what's being reviewed]
|
|
261
|
+
|
|
262
|
+
OUTPUT: [Review report format]
|
|
263
|
+
- Issues found (if any)
|
|
264
|
+
- Approval status
|
|
265
|
+
- Recommendations
|
|
266
|
+
|
|
267
|
+
SUCCESS: Review completed with clear decision (approve/reject/revise)
|
|
268
|
+
|
|
269
|
+
TERMINATION: Review decision made OR blocked by missing context
|
|
270
|
+
```
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
ForResearchAgents {
|
|
274
|
+
```
|
|
275
|
+
FOCUS: [Research question or area]
|
|
276
|
+
|
|
277
|
+
EXCLUDE: [Out of scope topics]
|
|
278
|
+
|
|
279
|
+
CONTEXT: [Why this research is needed]
|
|
280
|
+
|
|
281
|
+
OUTPUT: Structured findings including:
|
|
282
|
+
- Executive Summary (2-3 sentences)
|
|
283
|
+
- Key Findings (bulleted list)
|
|
284
|
+
- Detailed Analysis (organized by theme)
|
|
285
|
+
- Recommendations (actionable next steps)
|
|
286
|
+
- References (sources consulted)
|
|
287
|
+
|
|
288
|
+
SUCCESS: All sections completed with actionable insights
|
|
289
|
+
|
|
290
|
+
TERMINATION: Research complete OR information unavailable
|
|
291
|
+
```
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
ContextInsertion {
|
|
295
|
+
DirectContextInjection {
|
|
296
|
+
Use when:
|
|
297
|
+
- Context is small and specific
|
|
298
|
+
- Quick research tasks without spec documents
|
|
299
|
+
- You have the exact information needed
|
|
300
|
+
|
|
301
|
+
AlwaysInclude {
|
|
302
|
+
Relevant rules - Extract applicable rules from CLAUDE.md, Agent.md or project docs
|
|
303
|
+
Project constraints - Technical stack, coding standards, conventions
|
|
304
|
+
Prior outputs - For sequential tasks, include relevant results from previous steps
|
|
305
|
+
Specification references - For implementation tasks, cite PRD/SDD/PLAN sections
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
SelfPrimingPattern {
|
|
310
|
+
Use when:
|
|
311
|
+
- Implementation tasks with existing spec documents (PLAN, SDD, PRD)
|
|
312
|
+
- Subagent needs full document context (not filtered excerpts)
|
|
313
|
+
- Orchestrator should stay lightweight for longevity
|
|
314
|
+
|
|
315
|
+
Example {
|
|
316
|
+
```
|
|
317
|
+
CONTEXT:
|
|
318
|
+
- Self-prime from: docs/specs/001-auth/implementation-plan.md (Phase 2, Task 3)
|
|
319
|
+
- Self-prime from: docs/specs/001-auth/solution-design.md (Section 4.2)
|
|
320
|
+
- Self-prime from: CLAUDE.md / Agent.md (project standards)
|
|
321
|
+
- Match interfaces defined in SDD Section 4.2
|
|
322
|
+
- Follow existing patterns in src/services/
|
|
323
|
+
```
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
FileCreationCoordination {
|
|
330
|
+
CollisionPreventionProtocol {
|
|
331
|
+
CheckBeforeLaunching {
|
|
332
|
+
1. Are file paths specified explicitly in each agent's OUTPUT?
|
|
333
|
+
2. Are all file paths unique (no two agents write same path)?
|
|
334
|
+
3. Do paths follow project conventions?
|
|
335
|
+
4. Are paths deterministic (not ambiguous)?
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
IfAnyCheckFails => Adjust OUTPUT sections to prevent collisions
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
PathAssignmentStrategies {
|
|
342
|
+
ExplicitUniquePaths {
|
|
343
|
+
Assign each agent a specific file path
|
|
344
|
+
Agent1 OUTPUT => docs/patterns/authentication-flow.md
|
|
345
|
+
Agent2 OUTPUT => docs/interfaces/oauth-providers.md
|
|
346
|
+
Agent3 OUTPUT => docs/domain/user-permissions.md
|
|
347
|
+
Result => No collisions possible
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
DiscoveryBasedPaths {
|
|
351
|
+
Use placeholder that agent discovers
|
|
352
|
+
Agent1 OUTPUT => [DISCOVERED_LOCATION]/AuthService.test.ts
|
|
353
|
+
Agent2 OUTPUT => [DISCOVERED_LOCATION]/UserService.test.ts
|
|
354
|
+
Result => Agents discover same location, but filenames differ
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
HierarchicalPaths {
|
|
358
|
+
Use directory structure to separate agents
|
|
359
|
+
Agent1 OUTPUT => docs/patterns/backend/api-versioning.md
|
|
360
|
+
Agent2 OUTPUT => docs/patterns/frontend/state-management.md
|
|
361
|
+
Agent3 OUTPUT => docs/patterns/database/migration-strategy.md
|
|
362
|
+
Result => Different directories prevent collisions
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
CoordinationChecklist {
|
|
367
|
+
- [ ] Each agent has explicit OUTPUT with file path
|
|
368
|
+
- [ ] All file paths are unique
|
|
369
|
+
- [ ] Paths follow project naming conventions
|
|
370
|
+
- [ ] If using DISCOVERY, filenames differ
|
|
371
|
+
- [ ] No potential for race conditions
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
ScopeValidation {
|
|
376
|
+
AutoAcceptCriteria {
|
|
377
|
+
Continue without user review when agent delivers:
|
|
378
|
+
|
|
379
|
+
SecurityImprovements {
|
|
380
|
+
Vulnerability fixes
|
|
381
|
+
Input validation additions
|
|
382
|
+
Authentication enhancements
|
|
383
|
+
Error handling improvements
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
QualityImprovements {
|
|
387
|
+
Code clarity enhancements
|
|
388
|
+
Documentation updates
|
|
389
|
+
Test coverage additions (if in scope)
|
|
390
|
+
Performance optimizations under 10 lines
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
SpecificationCompliance {
|
|
394
|
+
Exactly matches FOCUS requirements
|
|
395
|
+
Respects all EXCLUDE boundaries
|
|
396
|
+
Delivers expected OUTPUT format
|
|
397
|
+
Meets SUCCESS criteria
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
RequiresUserReview {
|
|
402
|
+
Present to user for confirmation when agent delivers:
|
|
403
|
+
|
|
404
|
+
ArchitecturalChanges {
|
|
405
|
+
New external dependencies added
|
|
406
|
+
Database schema modifications
|
|
407
|
+
Public API changes
|
|
408
|
+
Design pattern changes
|
|
409
|
+
Configuration file updates
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
ScopeExpansions {
|
|
413
|
+
Features beyond FOCUS (but valuable)
|
|
414
|
+
Additional improvements requested
|
|
415
|
+
Alternative approaches suggested
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
AutoRejectCriteria {
|
|
420
|
+
Reject as scope creep when agent delivers:
|
|
421
|
+
|
|
422
|
+
OutOfScopeWork {
|
|
423
|
+
Features not in requirements
|
|
424
|
+
Work explicitly in EXCLUDE list
|
|
425
|
+
Breaking changes without migration path
|
|
426
|
+
Untested code modifications
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
QualityIssues {
|
|
430
|
+
Missing required OUTPUT format
|
|
431
|
+
Doesn't meet SUCCESS criteria
|
|
432
|
+
"While I'm here" additions
|
|
433
|
+
Unrequested improvements
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
ProcessViolations {
|
|
437
|
+
Skipped DISCOVERY_FIRST when required
|
|
438
|
+
Ignored CONTEXT constraints
|
|
439
|
+
Exceeded TERMINATION conditions
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
ValidationReportFormat {
|
|
444
|
+
```
|
|
445
|
+
Agent Response Validation
|
|
446
|
+
|
|
447
|
+
Agent: [Agent type/name]
|
|
448
|
+
Task: [Original FOCUS]
|
|
449
|
+
|
|
450
|
+
Deliverables Check:
|
|
451
|
+
[check] [Deliverable 1]: Matches OUTPUT requirement
|
|
452
|
+
[check] [Deliverable 2]: Matches OUTPUT requirement
|
|
453
|
+
[warn] [Deliverable 3]: Extra feature added (not in FOCUS)
|
|
454
|
+
[fail] [Deliverable 4]: Violates EXCLUDE constraint
|
|
455
|
+
|
|
456
|
+
Scope Compliance:
|
|
457
|
+
- FOCUS coverage: [%]
|
|
458
|
+
- EXCLUDE violations: [count]
|
|
459
|
+
- OUTPUT format: [matched/partial/missing]
|
|
460
|
+
- SUCCESS criteria: [met/partial/unmet]
|
|
461
|
+
|
|
462
|
+
Recommendation:
|
|
463
|
+
ACCEPT - Fully compliant
|
|
464
|
+
REVIEW - User decision needed on [specific item]
|
|
465
|
+
REJECT - Scope creep, retry with stricter FOCUS
|
|
466
|
+
```
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
FailureRecovery {
|
|
471
|
+
FallbackChain {
|
|
472
|
+
1. Retry with refined prompt (more specific FOCUS, more explicit EXCLUDE, better CONTEXT)
|
|
473
|
+
2. Try different specialist agent (different expertise angle, simpler task scope)
|
|
474
|
+
3. Break into smaller tasks (decompose further, sequential smaller steps)
|
|
475
|
+
4. Sequential instead of parallel (dependency might exist, coordination issue)
|
|
476
|
+
5. Handle directly (DIY) (task too specialized, agent limitation)
|
|
477
|
+
6. Escalate to user (present options, request guidance)
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
RetryDecisionTree {
|
|
481
|
+
| Symptom | Likely Cause | Solution |
|
|
482
|
+
| --- | --- | --- |
|
|
483
|
+
| Scope creep | FOCUS too vague | Refine FOCUS, expand EXCLUDE |
|
|
484
|
+
| Wrong approach | Wrong specialist | Try different agent type |
|
|
485
|
+
| Incomplete work | Task too complex | Break into smaller tasks |
|
|
486
|
+
| Blocked/stuck | Missing dependency | Check if should be sequential |
|
|
487
|
+
| Wrong output | OUTPUT unclear | Specify exact format/path |
|
|
488
|
+
| Quality issues | CONTEXT insufficient | Add more constraints/examples |
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
PartialSuccessHandling {
|
|
492
|
+
1. Assess what worked (which deliverables complete, which meet SUCCESS, what's missing)
|
|
493
|
+
2. Determine if acceptable (can we ship partial, is missing critical, can we iterate)
|
|
494
|
+
3. Options:
|
|
495
|
+
- Accept partial + new task => Ship what works, new agent for missing parts
|
|
496
|
+
- Retry complete task => If partial isn't useful
|
|
497
|
+
- Sequential completion => Build on partial results
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
RetryLimit {
|
|
501
|
+
Maximum => 3 attempts
|
|
502
|
+
After3FailedAttempts {
|
|
503
|
+
Present to user - Explain what failed and why
|
|
504
|
+
Offer options - Different approaches to try
|
|
505
|
+
Get guidance - User decides next steps
|
|
506
|
+
}
|
|
507
|
+
Rule => Don't infinite loop - If not working after 3 tries, human input needed
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
OutputFormat {
|
|
512
|
+
AfterDecomposition {
|
|
513
|
+
```
|
|
514
|
+
Task Decomposition Complete
|
|
515
|
+
|
|
516
|
+
Original Task: [The complex task]
|
|
517
|
+
|
|
518
|
+
Activities Identified: [N]
|
|
519
|
+
1. [Activity 1] - [Parallel/Sequential]
|
|
520
|
+
2. [Activity 2] - [Parallel/Sequential]
|
|
521
|
+
3. [Activity 3] - [Parallel/Sequential]
|
|
522
|
+
|
|
523
|
+
Execution Strategy: [Parallel / Sequential / Mixed]
|
|
524
|
+
Reasoning: [Why this strategy]
|
|
525
|
+
|
|
526
|
+
Agent Prompts Generated: [Yes/No]
|
|
527
|
+
File Coordination: [Checked/Not applicable]
|
|
528
|
+
Ready to launch: [Yes/No - if No, explain blocker]
|
|
529
|
+
```
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
AfterScopeValidation {
|
|
533
|
+
```
|
|
534
|
+
Scope Validation Complete
|
|
535
|
+
|
|
536
|
+
Agent: [Agent name]
|
|
537
|
+
Result: [ACCEPT / REVIEW NEEDED / REJECT]
|
|
538
|
+
|
|
539
|
+
Summary:
|
|
540
|
+
- Deliverables: [N matched, N extra, N missing]
|
|
541
|
+
- Scope compliance: [percentage]
|
|
542
|
+
- Recommendation: [Action to take]
|
|
543
|
+
|
|
544
|
+
[If REVIEW or REJECT, provide details]
|
|
545
|
+
```
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
AfterRetryStrategy {
|
|
549
|
+
```
|
|
550
|
+
Retry Strategy Generated
|
|
551
|
+
|
|
552
|
+
Agent: [Agent name]
|
|
553
|
+
Failure cause: [Diagnosis]
|
|
554
|
+
Retry approach: [What's different]
|
|
555
|
+
|
|
556
|
+
Template refinements:
|
|
557
|
+
- FOCUS: [What changed]
|
|
558
|
+
- EXCLUDE: [What was added]
|
|
559
|
+
- CONTEXT: [What was enhanced]
|
|
560
|
+
|
|
561
|
+
Retry attempt: [N of 3]
|
|
562
|
+
```
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
QuickReference {
|
|
567
|
+
WhenToUse {
|
|
568
|
+
"Break down this complex task"
|
|
569
|
+
"Launch parallel agents for these activities"
|
|
570
|
+
"Create agent prompts with FOCUS/EXCLUDE"
|
|
571
|
+
"Should these run in parallel or sequential?"
|
|
572
|
+
"Validate this agent response for scope"
|
|
573
|
+
"Generate retry strategy for failed agent"
|
|
574
|
+
"Coordinate file creation across agents"
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
KeyPrinciples {
|
|
578
|
+
1. Activity-based decomposition (not role-based)
|
|
579
|
+
2. Parallel-first mindset (unless dependencies exist)
|
|
580
|
+
3. Explicit FOCUS/EXCLUDE (no ambiguity)
|
|
581
|
+
4. Unique file paths (prevent collisions)
|
|
582
|
+
5. Scope validation (auto-accept/review/reject)
|
|
583
|
+
6. Maximum 3 retries (then escalate to user)
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
TemplateChecklist {
|
|
587
|
+
- [ ] FOCUS: Complete, specific task description
|
|
588
|
+
- [ ] EXCLUDE: Explicit boundaries
|
|
589
|
+
- [ ] CONTEXT: Relevant rules and constraints
|
|
590
|
+
- [ ] OUTPUT: Expected deliverables with paths
|
|
591
|
+
- [ ] SUCCESS: Measurable criteria
|
|
592
|
+
- [ ] TERMINATION: Clear stop conditions
|
|
593
|
+
- [ ] DISCOVERY_FIRST: If creating files (optional)
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
ParallelSafety {
|
|
597
|
+
Verify before launching parallel agents:
|
|
598
|
+
- [ ] No dependencies between tasks
|
|
599
|
+
- [ ] No shared state modifications
|
|
600
|
+
- [ ] Independent validation possible
|
|
601
|
+
- [ ] Unique file paths if creating files
|
|
602
|
+
- [ ] No resource contention
|
|
603
|
+
|
|
604
|
+
AllChecked => PARALLEL SAFE
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|