opencode-multiagent 0.2.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/LICENSE +21 -0
- package/README.md +209 -0
- package/agents/advisor.md +57 -0
- package/agents/auditor.md +45 -0
- package/agents/critic.md +127 -0
- package/agents/deep-worker.md +65 -0
- package/agents/devil.md +36 -0
- package/agents/executor.md +141 -0
- package/agents/heavy-worker.md +68 -0
- package/agents/lead.md +155 -0
- package/agents/librarian.md +62 -0
- package/agents/planner.md +121 -0
- package/agents/qa.md +50 -0
- package/agents/quick.md +65 -0
- package/agents/reviewer.md +55 -0
- package/agents/scout.md +58 -0
- package/agents/scribe.md +78 -0
- package/agents/strategist.md +63 -0
- package/agents/ui-heavy-worker.md +62 -0
- package/agents/ui-worker.md +69 -0
- package/agents/validator.md +47 -0
- package/agents/worker.md +68 -0
- package/commands/execute.md +14 -0
- package/commands/init-deep.md +18 -0
- package/commands/init.md +18 -0
- package/commands/inspect.md +13 -0
- package/commands/plan.md +15 -0
- package/commands/quality.md +14 -0
- package/commands/review.md +14 -0
- package/commands/status.md +15 -0
- package/defaults/agent-settings.json +102 -0
- package/defaults/agent-settings.schema.json +25 -0
- package/defaults/flags.json +35 -0
- package/defaults/flags.schema.json +119 -0
- package/defaults/mcp-defaults.json +47 -0
- package/defaults/mcp-defaults.schema.json +38 -0
- package/defaults/profiles.json +53 -0
- package/defaults/profiles.schema.json +60 -0
- package/defaults/team-profiles.json +83 -0
- package/examples/opencode.json +4 -0
- package/examples/opencode.with-overrides.json +23 -0
- package/package.json +62 -0
- package/skills/advanced-evaluation/SKILL.md +454 -0
- package/skills/advanced-evaluation/manifest.json +20 -0
- package/skills/cek-context-engineering/SKILL.md +1261 -0
- package/skills/cek-context-engineering/manifest.json +17 -0
- package/skills/cek-prompt-engineering/SKILL.md +559 -0
- package/skills/cek-prompt-engineering/manifest.json +17 -0
- package/skills/cek-test-prompt/SKILL.md +714 -0
- package/skills/cek-test-prompt/manifest.json +17 -0
- package/skills/cek-thought-based-reasoning/SKILL.md +658 -0
- package/skills/cek-thought-based-reasoning/manifest.json +17 -0
- package/skills/context-degradation/SKILL.md +231 -0
- package/skills/context-degradation/manifest.json +17 -0
- package/skills/debate/SKILL.md +316 -0
- package/skills/debate/manifest.json +19 -0
- package/skills/design-first/SKILL.md +5 -0
- package/skills/design-first/manifest.json +20 -0
- package/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/skills/dispatching-parallel-agents/manifest.json +18 -0
- package/skills/drift-analysis/SKILL.md +324 -0
- package/skills/drift-analysis/manifest.json +19 -0
- package/skills/evaluation/SKILL.md +5 -0
- package/skills/evaluation/manifest.json +19 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/executing-plans/manifest.json +17 -0
- package/skills/handoff-protocols/SKILL.md +5 -0
- package/skills/handoff-protocols/manifest.json +19 -0
- package/skills/parallel-investigation/SKILL.md +206 -0
- package/skills/parallel-investigation/manifest.json +18 -0
- package/skills/reflexion-critique/SKILL.md +477 -0
- package/skills/reflexion-critique/manifest.json +17 -0
- package/skills/reflexion-reflect/SKILL.md +650 -0
- package/skills/reflexion-reflect/manifest.json +17 -0
- package/skills/root-cause-analysis/SKILL.md +5 -0
- package/skills/root-cause-analysis/manifest.json +20 -0
- package/skills/sadd-judge-with-debate/SKILL.md +426 -0
- package/skills/sadd-judge-with-debate/manifest.json +17 -0
- package/skills/structured-code-review/SKILL.md +5 -0
- package/skills/structured-code-review/manifest.json +18 -0
- package/skills/task-decomposition/SKILL.md +5 -0
- package/skills/task-decomposition/manifest.json +20 -0
- package/skills/verification-before-completion/SKILL.md +5 -0
- package/skills/verification-before-completion/manifest.json +22 -0
- package/skills/verification-gates/SKILL.md +281 -0
- package/skills/verification-gates/manifest.json +19 -0
- package/src/control-plane.ts +21 -0
- package/src/index.ts +8 -0
- package/src/opencode-multiagent/compiler.ts +168 -0
- package/src/opencode-multiagent/constants.ts +178 -0
- package/src/opencode-multiagent/file-lock.ts +90 -0
- package/src/opencode-multiagent/hooks.ts +599 -0
- package/src/opencode-multiagent/log.ts +12 -0
- package/src/opencode-multiagent/mailbox.ts +287 -0
- package/src/opencode-multiagent/markdown.ts +99 -0
- package/src/opencode-multiagent/mcp.ts +35 -0
- package/src/opencode-multiagent/policy.ts +67 -0
- package/src/opencode-multiagent/quality.ts +140 -0
- package/src/opencode-multiagent/runtime.ts +55 -0
- package/src/opencode-multiagent/skills.ts +144 -0
- package/src/opencode-multiagent/supervision.ts +156 -0
- package/src/opencode-multiagent/task-manager.ts +148 -0
- package/src/opencode-multiagent/team-manager.ts +219 -0
- package/src/opencode-multiagent/team-tools.ts +359 -0
- package/src/opencode-multiagent/telemetry.ts +124 -0
- package/src/opencode-multiagent/utils.ts +54 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dispatching-parallel-agents
|
|
3
|
+
description: Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dispatching Parallel Agents
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
```dot
|
|
17
|
+
digraph when_to_use {
|
|
18
|
+
"Multiple failures?" [shape=diamond];
|
|
19
|
+
"Are they independent?" [shape=diamond];
|
|
20
|
+
"Single agent investigates all" [shape=box];
|
|
21
|
+
"One agent per problem domain" [shape=box];
|
|
22
|
+
"Can they work in parallel?" [shape=diamond];
|
|
23
|
+
"Sequential agents" [shape=box];
|
|
24
|
+
"Parallel dispatch" [shape=box];
|
|
25
|
+
|
|
26
|
+
"Multiple failures?" -> "Are they independent?" [label="yes"];
|
|
27
|
+
"Are they independent?" -> "Single agent investigates all" [label="no - related"];
|
|
28
|
+
"Are they independent?" -> "Can they work in parallel?" [label="yes"];
|
|
29
|
+
"Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
|
|
30
|
+
"Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Use when:**
|
|
35
|
+
- 3+ test files failing with different root causes
|
|
36
|
+
- Multiple subsystems broken independently
|
|
37
|
+
- Each problem can be understood without context from others
|
|
38
|
+
- No shared state between investigations
|
|
39
|
+
|
|
40
|
+
**Don't use when:**
|
|
41
|
+
- Failures are related (fix one might fix others)
|
|
42
|
+
- Need to understand full system state
|
|
43
|
+
- Agents would interfere with each other
|
|
44
|
+
|
|
45
|
+
## The Pattern
|
|
46
|
+
|
|
47
|
+
### 1. Identify Independent Domains
|
|
48
|
+
|
|
49
|
+
Group failures by what's broken:
|
|
50
|
+
- File A tests: Tool approval flow
|
|
51
|
+
- File B tests: Batch completion behavior
|
|
52
|
+
- File C tests: Abort functionality
|
|
53
|
+
|
|
54
|
+
Each domain is independent - fixing tool approval doesn't affect abort tests.
|
|
55
|
+
|
|
56
|
+
### 2. Create Focused Agent Tasks
|
|
57
|
+
|
|
58
|
+
Each agent gets:
|
|
59
|
+
- **Specific scope:** One test file or subsystem
|
|
60
|
+
- **Clear goal:** Make these tests pass
|
|
61
|
+
- **Constraints:** Don't change other code
|
|
62
|
+
- **Expected output:** Summary of what you found and fixed
|
|
63
|
+
|
|
64
|
+
### 3. Dispatch in Parallel
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// In Claude Code / AI environment
|
|
68
|
+
Task("Fix agent-tool-abort.test.ts failures")
|
|
69
|
+
Task("Fix batch-completion-behavior.test.ts failures")
|
|
70
|
+
Task("Fix tool-approval-race-conditions.test.ts failures")
|
|
71
|
+
// All three run concurrently
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 4. Review and Integrate
|
|
75
|
+
|
|
76
|
+
When agents return:
|
|
77
|
+
- Read each summary
|
|
78
|
+
- Verify fixes don't conflict
|
|
79
|
+
- Run full test suite
|
|
80
|
+
- Integrate all changes
|
|
81
|
+
|
|
82
|
+
## Agent Prompt Structure
|
|
83
|
+
|
|
84
|
+
Good agent prompts are:
|
|
85
|
+
1. **Focused** - One clear problem domain
|
|
86
|
+
2. **Self-contained** - All context needed to understand the problem
|
|
87
|
+
3. **Specific about output** - What should the agent return?
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
|
|
91
|
+
|
|
92
|
+
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
|
|
93
|
+
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
|
|
94
|
+
3. "should properly track pendingToolCount" - expects 3 results but gets 0
|
|
95
|
+
|
|
96
|
+
These are timing/race condition issues. Your task:
|
|
97
|
+
|
|
98
|
+
1. Read the test file and understand what each test verifies
|
|
99
|
+
2. Identify root cause - timing issues or actual bugs?
|
|
100
|
+
3. Fix by:
|
|
101
|
+
- Replacing arbitrary timeouts with event-based waiting
|
|
102
|
+
- Fixing bugs in abort implementation if found
|
|
103
|
+
- Adjusting test expectations if testing changed behavior
|
|
104
|
+
|
|
105
|
+
Do NOT just increase timeouts - find the real issue.
|
|
106
|
+
|
|
107
|
+
Return: Summary of what you found and what you fixed.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Common Mistakes
|
|
111
|
+
|
|
112
|
+
**❌ Too broad:** "Fix all the tests" - agent gets lost
|
|
113
|
+
**✅ Specific:** "Fix agent-tool-abort.test.ts" - focused scope
|
|
114
|
+
|
|
115
|
+
**❌ No context:** "Fix the race condition" - agent doesn't know where
|
|
116
|
+
**✅ Context:** Paste the error messages and test names
|
|
117
|
+
|
|
118
|
+
**❌ No constraints:** Agent might refactor everything
|
|
119
|
+
**✅ Constraints:** "Do NOT change production code" or "Fix tests only"
|
|
120
|
+
|
|
121
|
+
**❌ Vague output:** "Fix it" - you don't know what changed
|
|
122
|
+
**✅ Specific:** "Return summary of root cause and changes"
|
|
123
|
+
|
|
124
|
+
## When NOT to Use
|
|
125
|
+
|
|
126
|
+
**Related failures:** Fixing one might fix others - investigate together first
|
|
127
|
+
**Need full context:** Understanding requires seeing entire system
|
|
128
|
+
**Exploratory debugging:** You don't know what's broken yet
|
|
129
|
+
**Shared state:** Agents would interfere (editing same files, using same resources)
|
|
130
|
+
|
|
131
|
+
## Real Example from Session
|
|
132
|
+
|
|
133
|
+
**Scenario:** 6 test failures across 3 files after major refactoring
|
|
134
|
+
|
|
135
|
+
**Failures:**
|
|
136
|
+
- agent-tool-abort.test.ts: 3 failures (timing issues)
|
|
137
|
+
- batch-completion-behavior.test.ts: 2 failures (tools not executing)
|
|
138
|
+
- tool-approval-race-conditions.test.ts: 1 failure (execution count = 0)
|
|
139
|
+
|
|
140
|
+
**Decision:** Independent domains - abort logic separate from batch completion separate from race conditions
|
|
141
|
+
|
|
142
|
+
**Dispatch:**
|
|
143
|
+
```
|
|
144
|
+
Agent 1 → Fix agent-tool-abort.test.ts
|
|
145
|
+
Agent 2 → Fix batch-completion-behavior.test.ts
|
|
146
|
+
Agent 3 → Fix tool-approval-race-conditions.test.ts
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Results:**
|
|
150
|
+
- Agent 1: Replaced timeouts with event-based waiting
|
|
151
|
+
- Agent 2: Fixed event structure bug (threadId in wrong place)
|
|
152
|
+
- Agent 3: Added wait for async tool execution to complete
|
|
153
|
+
|
|
154
|
+
**Integration:** All fixes independent, no conflicts, full suite green
|
|
155
|
+
|
|
156
|
+
**Time saved:** 3 problems solved in parallel vs sequentially
|
|
157
|
+
|
|
158
|
+
## Key Benefits
|
|
159
|
+
|
|
160
|
+
1. **Parallelization** - Multiple investigations happen simultaneously
|
|
161
|
+
2. **Focus** - Each agent has narrow scope, less context to track
|
|
162
|
+
3. **Independence** - Agents don't interfere with each other
|
|
163
|
+
4. **Speed** - 3 problems solved in time of 1
|
|
164
|
+
|
|
165
|
+
## Verification
|
|
166
|
+
|
|
167
|
+
After agents return:
|
|
168
|
+
1. **Review each summary** - Understand what changed
|
|
169
|
+
2. **Check for conflicts** - Did agents edit same code?
|
|
170
|
+
3. **Run full suite** - Verify all fixes work together
|
|
171
|
+
4. **Spot check** - Agents can make systematic errors
|
|
172
|
+
|
|
173
|
+
## Real-World Impact
|
|
174
|
+
|
|
175
|
+
From debugging session (2025-10-03):
|
|
176
|
+
- 6 failures across 3 files
|
|
177
|
+
- 3 agents dispatched in parallel
|
|
178
|
+
- All investigations completed concurrently
|
|
179
|
+
- All fixes integrated successfully
|
|
180
|
+
- Zero conflicts between agent changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dispatching-parallel-agents",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Guidance for splitting independent work across multiple agents in parallel",
|
|
5
|
+
"triggers": [
|
|
6
|
+
"parallel agents",
|
|
7
|
+
"parallel dispatch",
|
|
8
|
+
"concurrent tasks",
|
|
9
|
+
"independent subtasks",
|
|
10
|
+
"parallelize"
|
|
11
|
+
],
|
|
12
|
+
"applicable_agents": [
|
|
13
|
+
"critic",
|
|
14
|
+
"strategist"
|
|
15
|
+
],
|
|
16
|
+
"max_context_tokens": 1800,
|
|
17
|
+
"entry_file": "SKILL.md"
|
|
18
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drift-analysis
|
|
3
|
+
description: Use when the user asks about plan drift, reality check, comparing docs to code, project state analysis, roadmap alignment, implementation gaps, or needs guidance on identifying discrepancies between documented plans and actual implementation state.
|
|
4
|
+
version: 5.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Drift Analysis
|
|
8
|
+
|
|
9
|
+
Knowledge and patterns for analyzing project state, detecting plan drift, and creating prioritized reconstruction plans.
|
|
10
|
+
|
|
11
|
+
## Architecture Overview
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/drift-detect
|
|
15
|
+
│
|
|
16
|
+
├─→ collectors.js (pure JavaScript)
|
|
17
|
+
│ ├─ scanGitHubState()
|
|
18
|
+
│ ├─ analyzeDocumentation()
|
|
19
|
+
│ └─ scanCodebase()
|
|
20
|
+
│
|
|
21
|
+
└─→ plan-synthesizer (Opus)
|
|
22
|
+
└─ Deep semantic analysis with full context
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Data collection**: Pure JavaScript (no LLM overhead)
|
|
26
|
+
**Semantic analysis**: Single Opus call with complete context
|
|
27
|
+
|
|
28
|
+
## Drift Detection Patterns
|
|
29
|
+
|
|
30
|
+
### Types of Drift
|
|
31
|
+
|
|
32
|
+
**Plan Drift**: When documented plans diverge from actual implementation
|
|
33
|
+
- PLAN.md items remain unchecked for extended periods
|
|
34
|
+
- Roadmap milestones slip without updates
|
|
35
|
+
- Sprint/phase goals not reflected in code changes
|
|
36
|
+
|
|
37
|
+
**Documentation Drift**: When documentation falls behind implementation
|
|
38
|
+
- New features exist without corresponding docs
|
|
39
|
+
- README describes features that don't exist
|
|
40
|
+
- API docs don't match actual endpoints
|
|
41
|
+
|
|
42
|
+
**Issue Drift**: When issue tracking diverges from reality
|
|
43
|
+
- Stale issues that no longer apply
|
|
44
|
+
- Completed work without closed issues
|
|
45
|
+
- High-priority items neglected
|
|
46
|
+
|
|
47
|
+
**Scope Drift**: When project scope expands beyond original plans
|
|
48
|
+
- More features documented than can be delivered
|
|
49
|
+
- Continuous addition without completion
|
|
50
|
+
- Ever-growing backlog with no pruning
|
|
51
|
+
|
|
52
|
+
### Detection Signals
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
HIGH-CONFIDENCE DRIFT INDICATORS:
|
|
56
|
+
- Milestone 30+ days overdue with open issues
|
|
57
|
+
- PLAN.md < 30% completion after 90 days
|
|
58
|
+
- 5+ high-priority issues stale > 60 days
|
|
59
|
+
- README features not found in codebase
|
|
60
|
+
|
|
61
|
+
MEDIUM-CONFIDENCE INDICATORS:
|
|
62
|
+
- Documentation files unchanged for 180+ days
|
|
63
|
+
- Draft PRs open > 30 days
|
|
64
|
+
- Issue themes don't match code activity
|
|
65
|
+
- Large gap between documented and implemented features
|
|
66
|
+
|
|
67
|
+
LOW-CONFIDENCE INDICATORS:
|
|
68
|
+
- Many TODOs in codebase
|
|
69
|
+
- Stale dependencies
|
|
70
|
+
- Old git branches not merged
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Prioritization Framework
|
|
74
|
+
|
|
75
|
+
### Priority Calculation
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
function calculatePriority(item, weights) {
|
|
79
|
+
let score = 0;
|
|
80
|
+
|
|
81
|
+
// Severity base score
|
|
82
|
+
const severityScores = {
|
|
83
|
+
critical: 15,
|
|
84
|
+
high: 10,
|
|
85
|
+
medium: 5,
|
|
86
|
+
low: 2
|
|
87
|
+
};
|
|
88
|
+
score += severityScores[item.severity] || 5;
|
|
89
|
+
|
|
90
|
+
// Category multiplier
|
|
91
|
+
const categoryWeights = {
|
|
92
|
+
security: 2.0, // Security issues get 2x
|
|
93
|
+
bugs: 1.5, // Bugs get 1.5x
|
|
94
|
+
infrastructure: 1.3,
|
|
95
|
+
features: 1.0,
|
|
96
|
+
documentation: 0.8
|
|
97
|
+
};
|
|
98
|
+
score *= categoryWeights[item.category] || 1.0;
|
|
99
|
+
|
|
100
|
+
// Recency boost
|
|
101
|
+
if (item.createdRecently) score *= 1.2;
|
|
102
|
+
|
|
103
|
+
// Stale penalty (old items slightly deprioritized)
|
|
104
|
+
if (item.daysStale > 180) score *= 0.9;
|
|
105
|
+
|
|
106
|
+
return Math.round(score);
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Time Bucket Thresholds
|
|
111
|
+
|
|
112
|
+
| Bucket | Criteria | Max Items |
|
|
113
|
+
|--------|----------|-----------|
|
|
114
|
+
| Immediate | severity=critical OR priority >= 15 | 5 |
|
|
115
|
+
| Short-term | severity=high OR priority >= 10 | 10 |
|
|
116
|
+
| Medium-term | priority >= 5 | 15 |
|
|
117
|
+
| Backlog | everything else | 20 |
|
|
118
|
+
|
|
119
|
+
### Priority Weights (Default)
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
security: 10 # Security issues always top priority
|
|
123
|
+
bugs: 8 # Bugs affect users directly
|
|
124
|
+
features: 5 # New functionality
|
|
125
|
+
documentation: 3 # Important but not urgent
|
|
126
|
+
tech-debt: 4 # Keeps codebase healthy
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Cross-Reference Patterns
|
|
130
|
+
|
|
131
|
+
### Document-to-Code Matching
|
|
132
|
+
|
|
133
|
+
```javascript
|
|
134
|
+
// Fuzzy matching for feature names
|
|
135
|
+
function featureMatch(docFeature, codeFeature) {
|
|
136
|
+
const normalize = s => s
|
|
137
|
+
.toLowerCase()
|
|
138
|
+
.replace(/[-_\s]+/g, '')
|
|
139
|
+
.replace(/s$/, ''); // Remove trailing 's'
|
|
140
|
+
|
|
141
|
+
const docNorm = normalize(docFeature);
|
|
142
|
+
const codeNorm = normalize(codeFeature);
|
|
143
|
+
|
|
144
|
+
return docNorm.includes(codeNorm) ||
|
|
145
|
+
codeNorm.includes(docNorm) ||
|
|
146
|
+
levenshteinDistance(docNorm, codeNorm) < 3;
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Common Mismatches
|
|
151
|
+
|
|
152
|
+
| Documented As | Implemented As |
|
|
153
|
+
|---------------|----------------|
|
|
154
|
+
| "user authentication" | auth/, login/, session/ |
|
|
155
|
+
| "API endpoints" | routes/, api/, handlers/ |
|
|
156
|
+
| "database models" | models/, entities/, schemas/ |
|
|
157
|
+
| "caching layer" | cache/, redis/, memcache/ |
|
|
158
|
+
| "logging system" | logger/, logs/, telemetry/ |
|
|
159
|
+
|
|
160
|
+
## Output Templates
|
|
161
|
+
|
|
162
|
+
### Drift Report Section
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
## Drift Analysis
|
|
166
|
+
|
|
167
|
+
### {drift_type}
|
|
168
|
+
**Severity**: {severity}
|
|
169
|
+
**Detected In**: {source}
|
|
170
|
+
|
|
171
|
+
{description}
|
|
172
|
+
|
|
173
|
+
**Evidence**:
|
|
174
|
+
{evidence_items}
|
|
175
|
+
|
|
176
|
+
**Recommendation**: {recommendation}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Gap Report Section
|
|
180
|
+
|
|
181
|
+
```markdown
|
|
182
|
+
## Gap: {gap_title}
|
|
183
|
+
|
|
184
|
+
**Category**: {category}
|
|
185
|
+
**Severity**: {severity}
|
|
186
|
+
|
|
187
|
+
{description}
|
|
188
|
+
|
|
189
|
+
**Impact**: {impact_description}
|
|
190
|
+
|
|
191
|
+
**To Address**:
|
|
192
|
+
1. {action_item_1}
|
|
193
|
+
2. {action_item_2}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Reconstruction Plan Section
|
|
197
|
+
|
|
198
|
+
```markdown
|
|
199
|
+
## Reconstruction Plan
|
|
200
|
+
|
|
201
|
+
### Immediate Actions (This Week)
|
|
202
|
+
{immediate_items_numbered}
|
|
203
|
+
|
|
204
|
+
### Short-Term (This Month)
|
|
205
|
+
{short_term_items_numbered}
|
|
206
|
+
|
|
207
|
+
### Medium-Term (This Quarter)
|
|
208
|
+
{medium_term_items_numbered}
|
|
209
|
+
|
|
210
|
+
### Backlog
|
|
211
|
+
{backlog_items_numbered}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Best Practices
|
|
215
|
+
|
|
216
|
+
### When Analyzing Drift
|
|
217
|
+
|
|
218
|
+
1. **Compare timestamps, not just content**
|
|
219
|
+
- When was the doc last updated vs. last code change?
|
|
220
|
+
- Are milestones dated realistically?
|
|
221
|
+
|
|
222
|
+
2. **Look for patterns, not individual items**
|
|
223
|
+
- One stale issue isn't drift; 10 stale issues is a pattern
|
|
224
|
+
- One undocumented feature isn't drift; 5 undocumented features is
|
|
225
|
+
|
|
226
|
+
3. **Consider context**
|
|
227
|
+
- Active development naturally has some drift
|
|
228
|
+
- Mature projects should have minimal drift
|
|
229
|
+
- Post-launch projects often have documentation lag
|
|
230
|
+
|
|
231
|
+
4. **Weight by impact**
|
|
232
|
+
- User-facing drift matters more than internal
|
|
233
|
+
- Public API drift matters more than implementation details
|
|
234
|
+
|
|
235
|
+
### When Creating Plans
|
|
236
|
+
|
|
237
|
+
1. **Be actionable, not exhaustive**
|
|
238
|
+
- Top 5 immediate items, not top 50
|
|
239
|
+
- Each item should be completable in reasonable time
|
|
240
|
+
|
|
241
|
+
2. **Group related items**
|
|
242
|
+
- "Update authentication docs" not "Update login page docs" + "Update signup docs"
|
|
243
|
+
|
|
244
|
+
3. **Include success criteria**
|
|
245
|
+
- How do we know this drift item is resolved?
|
|
246
|
+
|
|
247
|
+
4. **Balance categories**
|
|
248
|
+
- All security first, but don't ignore everything else
|
|
249
|
+
- Mix quick wins with important work
|
|
250
|
+
|
|
251
|
+
## Data Collection (JavaScript)
|
|
252
|
+
|
|
253
|
+
The collectors.js module extracts data without LLM overhead:
|
|
254
|
+
|
|
255
|
+
### GitHub Data
|
|
256
|
+
- Open issues categorized by labels
|
|
257
|
+
- Open PRs with draft status
|
|
258
|
+
- Milestones with due dates
|
|
259
|
+
- Stale items (> 90 days inactive)
|
|
260
|
+
- Theme analysis from titles
|
|
261
|
+
|
|
262
|
+
### Documentation Data
|
|
263
|
+
- Parsed README, PLAN.md, CLAUDE.md, CHANGELOG.md
|
|
264
|
+
- Checkbox completion counts
|
|
265
|
+
- Section analysis
|
|
266
|
+
- Feature lists
|
|
267
|
+
|
|
268
|
+
### Code Data
|
|
269
|
+
- Directory structure
|
|
270
|
+
- Framework detection
|
|
271
|
+
- Test framework presence
|
|
272
|
+
- Health indicators (CI, linting, tests)
|
|
273
|
+
|
|
274
|
+
## Semantic Analysis (Opus)
|
|
275
|
+
|
|
276
|
+
The plan-synthesizer receives all collected data and performs:
|
|
277
|
+
|
|
278
|
+
1. **Cross-referencing**: Match documented features to implementation
|
|
279
|
+
2. **Drift identification**: Find divergence patterns
|
|
280
|
+
3. **Gap analysis**: Identify what's missing
|
|
281
|
+
4. **Prioritization**: Context-aware ranking
|
|
282
|
+
5. **Report generation**: Actionable recommendations
|
|
283
|
+
|
|
284
|
+
## Example Input/Output
|
|
285
|
+
|
|
286
|
+
### Collected Data (from collectors.js)
|
|
287
|
+
|
|
288
|
+
```json
|
|
289
|
+
{
|
|
290
|
+
"github": {
|
|
291
|
+
"issues": [...],
|
|
292
|
+
"categorized": { "bugs": [...], "features": [...] },
|
|
293
|
+
"stale": [...]
|
|
294
|
+
},
|
|
295
|
+
"docs": {
|
|
296
|
+
"files": { "README.md": {...}, "PLAN.md": {...} },
|
|
297
|
+
"checkboxes": { "total": 15, "checked": 3 }
|
|
298
|
+
},
|
|
299
|
+
"code": {
|
|
300
|
+
"frameworks": ["Express"],
|
|
301
|
+
"health": { "hasTests": true, "hasCi": true }
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Analysis Output (from plan-synthesizer)
|
|
307
|
+
|
|
308
|
+
```markdown
|
|
309
|
+
# Reality Check Report
|
|
310
|
+
|
|
311
|
+
## Executive Summary
|
|
312
|
+
Project has moderate drift: 8 stale priority issues and 20% plan completion.
|
|
313
|
+
Strong code health (tests + CI) but documentation lags implementation.
|
|
314
|
+
|
|
315
|
+
## Drift Analysis
|
|
316
|
+
### Priority Neglect
|
|
317
|
+
**Severity**: high
|
|
318
|
+
8 high-priority issues inactive for 60+ days...
|
|
319
|
+
|
|
320
|
+
## Prioritized Plan
|
|
321
|
+
### Immediate
|
|
322
|
+
1. Close #45 (already implemented)
|
|
323
|
+
2. Update README API section...
|
|
324
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "drift-analysis",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Analyze plan drift between documented intent and repository reality",
|
|
5
|
+
"triggers": [
|
|
6
|
+
"drift",
|
|
7
|
+
"reality check",
|
|
8
|
+
"plan drift",
|
|
9
|
+
"implementation gap",
|
|
10
|
+
"roadmap alignment"
|
|
11
|
+
],
|
|
12
|
+
"applicable_agents": [
|
|
13
|
+
"planner",
|
|
14
|
+
"auditor",
|
|
15
|
+
"strategist"
|
|
16
|
+
],
|
|
17
|
+
"max_context_tokens": 2000,
|
|
18
|
+
"entry_file": "SKILL.md"
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "evaluation",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Lightweight evaluation framework for judgments and comparisons",
|
|
5
|
+
"triggers": [
|
|
6
|
+
"evaluate",
|
|
7
|
+
"assess",
|
|
8
|
+
"judge",
|
|
9
|
+
"compare",
|
|
10
|
+
"rate"
|
|
11
|
+
],
|
|
12
|
+
"applicable_agents": [
|
|
13
|
+
"reviewer",
|
|
14
|
+
"critic",
|
|
15
|
+
"advisor"
|
|
16
|
+
],
|
|
17
|
+
"max_context_tokens": 1500,
|
|
18
|
+
"entry_file": "SKILL.md"
|
|
19
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: executing-plans
|
|
3
|
+
description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Executing Plans
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Load plan, review critically, execute all tasks, report when complete.
|
|
11
|
+
|
|
12
|
+
**Announce at start:** "I'm using the executing-plans skill to implement this plan."
|
|
13
|
+
|
|
14
|
+
**Note:** Tell your human partner that Superpowers works much better with access to subagents. The quality of its work will be significantly higher if run on a platform with subagent support (such as Claude Code or Codex). If subagents are available, use superpowers:subagent-driven-development instead of this skill.
|
|
15
|
+
|
|
16
|
+
## The Process
|
|
17
|
+
|
|
18
|
+
### Step 1: Load and Review Plan
|
|
19
|
+
1. Read plan file
|
|
20
|
+
2. Review critically - identify any questions or concerns about the plan
|
|
21
|
+
3. If concerns: Raise them with your human partner before starting
|
|
22
|
+
4. If no concerns: Create TodoWrite and proceed
|
|
23
|
+
|
|
24
|
+
### Step 2: Execute Tasks
|
|
25
|
+
|
|
26
|
+
For each task:
|
|
27
|
+
1. Mark as in_progress
|
|
28
|
+
2. Follow each step exactly (plan has bite-sized steps)
|
|
29
|
+
3. Run verifications as specified
|
|
30
|
+
4. Mark as completed
|
|
31
|
+
|
|
32
|
+
### Step 3: Complete Development
|
|
33
|
+
|
|
34
|
+
After all tasks complete and verified:
|
|
35
|
+
- Announce: "I'm using the finishing-a-development-branch skill to complete this work."
|
|
36
|
+
- **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
|
|
37
|
+
- Follow that skill to verify tests, present options, execute choice
|
|
38
|
+
|
|
39
|
+
## When to Stop and Ask for Help
|
|
40
|
+
|
|
41
|
+
**STOP executing immediately when:**
|
|
42
|
+
- Hit a blocker (missing dependency, test fails, instruction unclear)
|
|
43
|
+
- Plan has critical gaps preventing starting
|
|
44
|
+
- You don't understand an instruction
|
|
45
|
+
- Verification fails repeatedly
|
|
46
|
+
|
|
47
|
+
**Ask for clarification rather than guessing.**
|
|
48
|
+
|
|
49
|
+
## When to Revisit Earlier Steps
|
|
50
|
+
|
|
51
|
+
**Return to Review (Step 1) when:**
|
|
52
|
+
- Partner updates the plan based on your feedback
|
|
53
|
+
- Fundamental approach needs rethinking
|
|
54
|
+
|
|
55
|
+
**Don't force through blockers** - stop and ask.
|
|
56
|
+
|
|
57
|
+
## Remember
|
|
58
|
+
- Review plan critically first
|
|
59
|
+
- Follow plan steps exactly
|
|
60
|
+
- Don't skip verifications
|
|
61
|
+
- Reference skills when plan says to
|
|
62
|
+
- Stop when blocked, don't guess
|
|
63
|
+
- Never start implementation on main/master branch without explicit user consent
|
|
64
|
+
|
|
65
|
+
## Integration
|
|
66
|
+
|
|
67
|
+
**Required workflow skills:**
|
|
68
|
+
- **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
|
|
69
|
+
- **superpowers:writing-plans** - Creates the plan this skill executes
|
|
70
|
+
- **superpowers:finishing-a-development-branch** - Complete development after all tasks
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "executing-plans",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Execution guidance for following an existing implementation plan with checkpoints",
|
|
5
|
+
"triggers": [
|
|
6
|
+
"execute plan",
|
|
7
|
+
"follow plan",
|
|
8
|
+
"implementation plan",
|
|
9
|
+
"carry out plan",
|
|
10
|
+
"execution checkpoints"
|
|
11
|
+
],
|
|
12
|
+
"applicable_agents": [
|
|
13
|
+
"executor"
|
|
14
|
+
],
|
|
15
|
+
"max_context_tokens": 2000,
|
|
16
|
+
"entry_file": "SKILL.md"
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "handoff-protocols",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Guidance for safe multi-agent or multi-step handoffs",
|
|
5
|
+
"triggers": [
|
|
6
|
+
"handoff",
|
|
7
|
+
"transfer",
|
|
8
|
+
"transition",
|
|
9
|
+
"pass to",
|
|
10
|
+
"onboard"
|
|
11
|
+
],
|
|
12
|
+
"applicable_agents": [
|
|
13
|
+
"executor",
|
|
14
|
+
"planner",
|
|
15
|
+
"worker"
|
|
16
|
+
],
|
|
17
|
+
"max_context_tokens": 1500,
|
|
18
|
+
"entry_file": "SKILL.md"
|
|
19
|
+
}
|