@fro.bot/systematic 1.0.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 +158 -0
- package/agents/research/framework-docs-researcher.md +19 -0
- package/agents/review/architecture-strategist.md +23 -0
- package/agents/review/code-simplicity-reviewer.md +30 -0
- package/agents/review/pattern-recognition-specialist.md +24 -0
- package/agents/review/performance-oracle.md +25 -0
- package/agents/review/security-sentinel.md +25 -0
- package/commands/agent-native-audit.md +277 -0
- package/commands/create-agent-skill.md +8 -0
- package/commands/deepen-plan.md +546 -0
- package/commands/lfg.md +19 -0
- package/commands/workflows/brainstorm.md +115 -0
- package/commands/workflows/compound.md +202 -0
- package/commands/workflows/plan.md +551 -0
- package/commands/workflows/review.md +514 -0
- package/commands/workflows/work.md +363 -0
- package/dist/cli.js +360 -0
- package/dist/index-v8dhd5s2.js +194 -0
- package/dist/index.js +297 -0
- package/package.json +69 -0
- package/skills/agent-browser/SKILL.md +223 -0
- package/skills/agent-native-architecture/SKILL.md +435 -0
- package/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
- package/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
- package/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
- package/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
- package/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
- package/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
- package/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
- package/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
- package/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
- package/skills/agent-native-architecture/references/product-implications.md +443 -0
- package/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
- package/skills/agent-native-architecture/references/self-modification.md +269 -0
- package/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
- package/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
- package/skills/brainstorming/SKILL.md +190 -0
- package/skills/compound-docs/SKILL.md +510 -0
- package/skills/compound-docs/assets/critical-pattern-template.md +34 -0
- package/skills/compound-docs/assets/resolution-template.md +93 -0
- package/skills/compound-docs/references/yaml-schema.md +65 -0
- package/skills/compound-docs/schema.yaml +176 -0
- package/skills/create-agent-skills/SKILL.md +299 -0
- package/skills/create-agent-skills/references/api-security.md +226 -0
- package/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
- package/skills/create-agent-skills/references/best-practices.md +404 -0
- package/skills/create-agent-skills/references/common-patterns.md +595 -0
- package/skills/create-agent-skills/references/core-principles.md +437 -0
- package/skills/create-agent-skills/references/executable-code.md +175 -0
- package/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
- package/skills/create-agent-skills/references/official-spec.md +185 -0
- package/skills/create-agent-skills/references/recommended-structure.md +168 -0
- package/skills/create-agent-skills/references/skill-structure.md +372 -0
- package/skills/create-agent-skills/references/using-scripts.md +113 -0
- package/skills/create-agent-skills/references/using-templates.md +112 -0
- package/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
- package/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/skills/create-agent-skills/workflows/add-reference.md +96 -0
- package/skills/create-agent-skills/workflows/add-script.md +93 -0
- package/skills/create-agent-skills/workflows/add-template.md +74 -0
- package/skills/create-agent-skills/workflows/add-workflow.md +120 -0
- package/skills/create-agent-skills/workflows/audit-skill.md +138 -0
- package/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
- package/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
- package/skills/create-agent-skills/workflows/get-guidance.md +121 -0
- package/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
- package/skills/create-agent-skills/workflows/verify-skill.md +204 -0
- package/skills/file-todos/SKILL.md +251 -0
- package/skills/file-todos/assets/todo-template.md +155 -0
- package/skills/git-worktree/SKILL.md +302 -0
- package/skills/git-worktree/scripts/worktree-manager.sh +345 -0
- package/skills/using-systematic/SKILL.md +94 -0
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deepen-plan
|
|
3
|
+
description: Enhance a plan with parallel research agents for each section to add depth, best practices, and implementation details
|
|
4
|
+
argument-hint: "[path to plan file]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Deepen Plan - Power Enhancement Mode
|
|
8
|
+
|
|
9
|
+
## Introduction
|
|
10
|
+
|
|
11
|
+
**Note: The current year is 2026.** Use this when searching for recent documentation and best practices.
|
|
12
|
+
|
|
13
|
+
This command takes an existing plan (from `/workflows:plan`) and enhances each section with parallel research agents. Each major element gets its own dedicated research sub-agent to find:
|
|
14
|
+
- Best practices and industry patterns
|
|
15
|
+
- Performance optimizations
|
|
16
|
+
- UI/UX improvements (if applicable)
|
|
17
|
+
- Quality enhancements and edge cases
|
|
18
|
+
- Real-world implementation examples
|
|
19
|
+
|
|
20
|
+
The result is a deeply grounded, production-ready plan with concrete implementation details.
|
|
21
|
+
|
|
22
|
+
## Plan File
|
|
23
|
+
|
|
24
|
+
<plan_path> #$ARGUMENTS </plan_path>
|
|
25
|
+
|
|
26
|
+
**If the plan path above is empty:**
|
|
27
|
+
1. Check for recent plans: `ls -la docs/plans/`
|
|
28
|
+
2. Ask the user: "Which plan would you like to deepen? Please provide the path (e.g., `docs/plans/2026-01-15-feat-my-feature-plan.md`)."
|
|
29
|
+
|
|
30
|
+
Do not proceed until you have a valid plan file path.
|
|
31
|
+
|
|
32
|
+
## Main Tasks
|
|
33
|
+
|
|
34
|
+
### 1. Parse and Analyze Plan Structure
|
|
35
|
+
|
|
36
|
+
<thinking>
|
|
37
|
+
First, read and parse the plan to identify each major section that can be enhanced with research.
|
|
38
|
+
</thinking>
|
|
39
|
+
|
|
40
|
+
**Read the plan file and extract:**
|
|
41
|
+
- [ ] Overview/Problem Statement
|
|
42
|
+
- [ ] Proposed Solution sections
|
|
43
|
+
- [ ] Technical Approach/Architecture
|
|
44
|
+
- [ ] Implementation phases/steps
|
|
45
|
+
- [ ] Code examples and file references
|
|
46
|
+
- [ ] Acceptance criteria
|
|
47
|
+
- [ ] Any UI/UX components mentioned
|
|
48
|
+
- [ ] Technologies/frameworks mentioned (Rails, React, Python, TypeScript, etc.)
|
|
49
|
+
- [ ] Domain areas (data models, APIs, UI, security, performance, etc.)
|
|
50
|
+
|
|
51
|
+
**Create a section manifest:**
|
|
52
|
+
```
|
|
53
|
+
Section 1: [Title] - [Brief description of what to research]
|
|
54
|
+
Section 2: [Title] - [Brief description of what to research]
|
|
55
|
+
...
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. Discover and Apply Available Skills
|
|
59
|
+
|
|
60
|
+
<thinking>
|
|
61
|
+
Dynamically discover all available skills and match them to plan sections. Don't assume what skills exist - discover them at runtime.
|
|
62
|
+
</thinking>
|
|
63
|
+
|
|
64
|
+
**Step 1: Discover ALL available skills from ALL sources**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# 1. Project-local skills (highest priority - project-specific)
|
|
68
|
+
ls .claude/skills/
|
|
69
|
+
|
|
70
|
+
# 2. User's global skills (~/.claude/)
|
|
71
|
+
ls ~/.claude/skills/
|
|
72
|
+
|
|
73
|
+
# 3. compound-engineering plugin skills
|
|
74
|
+
ls ~/.claude/plugins/cache/*/compound-engineering/*/skills/
|
|
75
|
+
|
|
76
|
+
# 4. ALL other installed plugins - check every plugin for skills
|
|
77
|
+
find ~/.claude/plugins/cache -type d -name "skills" 2>/dev/null
|
|
78
|
+
|
|
79
|
+
# 5. Also check installed_plugins.json for all plugin locations
|
|
80
|
+
cat ~/.claude/plugins/installed_plugins.json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Important:** Check EVERY source. Don't assume compound-engineering is the only plugin. Use skills from ANY installed plugin that's relevant.
|
|
84
|
+
|
|
85
|
+
**Step 2: For each discovered skill, read its SKILL.md to understand what it does**
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# For each skill directory found, read its documentation
|
|
89
|
+
cat [skill-path]/SKILL.md
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Step 3: Match skills to plan content**
|
|
93
|
+
|
|
94
|
+
For each skill discovered:
|
|
95
|
+
- Read its SKILL.md description
|
|
96
|
+
- Check if any plan sections match the skill's domain
|
|
97
|
+
- If there's a match, spawn a sub-agent to apply that skill's knowledge
|
|
98
|
+
|
|
99
|
+
**Step 4: Spawn a sub-agent for EVERY matched skill**
|
|
100
|
+
|
|
101
|
+
**CRITICAL: For EACH skill that matches, spawn a separate sub-agent and instruct it to USE that skill.**
|
|
102
|
+
|
|
103
|
+
For each matched skill:
|
|
104
|
+
```
|
|
105
|
+
Task general-purpose: "You have the [skill-name] skill available at [skill-path].
|
|
106
|
+
|
|
107
|
+
YOUR JOB: Use this skill on the plan.
|
|
108
|
+
|
|
109
|
+
1. Read the skill: cat [skill-path]/SKILL.md
|
|
110
|
+
2. Follow the skill's instructions exactly
|
|
111
|
+
3. Apply the skill to this content:
|
|
112
|
+
|
|
113
|
+
[relevant plan section or full plan]
|
|
114
|
+
|
|
115
|
+
4. Return the skill's full output
|
|
116
|
+
|
|
117
|
+
The skill tells you what to do - follow it. Execute the skill completely."
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Spawn ALL skill sub-agents in PARALLEL:**
|
|
121
|
+
- 1 sub-agent per matched skill
|
|
122
|
+
- Each sub-agent reads and uses its assigned skill
|
|
123
|
+
- All run simultaneously
|
|
124
|
+
- 10, 20, 30 skill sub-agents is fine
|
|
125
|
+
|
|
126
|
+
**Each sub-agent:**
|
|
127
|
+
1. Reads its skill's SKILL.md
|
|
128
|
+
2. Follows the skill's workflow/instructions
|
|
129
|
+
3. Applies the skill to the plan
|
|
130
|
+
4. Returns whatever the skill produces (code, recommendations, patterns, reviews, etc.)
|
|
131
|
+
|
|
132
|
+
**Example spawns:**
|
|
133
|
+
```
|
|
134
|
+
Task general-purpose: "Use the dhh-rails-style skill at ~/.claude/plugins/.../dhh-rails-style. Read SKILL.md and apply it to: [Rails sections of plan]"
|
|
135
|
+
|
|
136
|
+
Task general-purpose: "Use the frontend-design skill at ~/.claude/plugins/.../frontend-design. Read SKILL.md and apply it to: [UI sections of plan]"
|
|
137
|
+
|
|
138
|
+
Task general-purpose: "Use the agent-native-architecture skill at ~/.claude/plugins/.../agent-native-architecture. Read SKILL.md and apply it to: [agent/tool sections of plan]"
|
|
139
|
+
|
|
140
|
+
Task general-purpose: "Use the security-patterns skill at ~/.claude/skills/security-patterns. Read SKILL.md and apply it to: [full plan]"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**No limit on skill sub-agents. Spawn one for every skill that could possibly be relevant.**
|
|
144
|
+
|
|
145
|
+
### 3. Discover and Apply Learnings/Solutions
|
|
146
|
+
|
|
147
|
+
<thinking>
|
|
148
|
+
Check for documented learnings from /workflows:compound. These are solved problems stored as markdown files. Spawn a sub-agent for each learning to check if it's relevant.
|
|
149
|
+
</thinking>
|
|
150
|
+
|
|
151
|
+
**LEARNINGS LOCATION - Check these exact folders:**
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
docs/solutions/ <-- PRIMARY: Project-level learnings (created by /workflows:compound)
|
|
155
|
+
├── performance-issues/
|
|
156
|
+
│ └── *.md
|
|
157
|
+
├── debugging-patterns/
|
|
158
|
+
│ └── *.md
|
|
159
|
+
├── configuration-fixes/
|
|
160
|
+
│ └── *.md
|
|
161
|
+
├── integration-issues/
|
|
162
|
+
│ └── *.md
|
|
163
|
+
├── deployment-issues/
|
|
164
|
+
│ └── *.md
|
|
165
|
+
└── [other-categories]/
|
|
166
|
+
└── *.md
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Step 1: Find ALL learning markdown files**
|
|
170
|
+
|
|
171
|
+
Run these commands to get every learning file:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# PRIMARY LOCATION - Project learnings
|
|
175
|
+
find docs/solutions -name "*.md" -type f 2>/dev/null
|
|
176
|
+
|
|
177
|
+
# If docs/solutions doesn't exist, check alternate locations:
|
|
178
|
+
find .claude/docs -name "*.md" -type f 2>/dev/null
|
|
179
|
+
find ~/.claude/docs -name "*.md" -type f 2>/dev/null
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Step 2: Read frontmatter of each learning to filter**
|
|
183
|
+
|
|
184
|
+
Each learning file has YAML frontmatter with metadata. Read the first ~20 lines of each file to get:
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
---
|
|
188
|
+
title: "N+1 Query Fix for Briefs"
|
|
189
|
+
category: performance-issues
|
|
190
|
+
tags: [activerecord, n-plus-one, includes, eager-loading]
|
|
191
|
+
module: Briefs
|
|
192
|
+
symptom: "Slow page load, multiple queries in logs"
|
|
193
|
+
root_cause: "Missing includes on association"
|
|
194
|
+
---
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**For each .md file, quickly scan its frontmatter:**
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Read first 20 lines of each learning (frontmatter + summary)
|
|
201
|
+
head -20 docs/solutions/**/*.md
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Step 3: Filter - only spawn sub-agents for LIKELY relevant learnings**
|
|
205
|
+
|
|
206
|
+
Compare each learning's frontmatter against the plan:
|
|
207
|
+
- `tags:` - Do any tags match technologies/patterns in the plan?
|
|
208
|
+
- `category:` - Is this category relevant? (e.g., skip deployment-issues if plan is UI-only)
|
|
209
|
+
- `module:` - Does the plan touch this module?
|
|
210
|
+
- `symptom:` / `root_cause:` - Could this problem occur with the plan?
|
|
211
|
+
|
|
212
|
+
**SKIP learnings that are clearly not applicable:**
|
|
213
|
+
- Plan is frontend-only → skip `database-migrations/` learnings
|
|
214
|
+
- Plan is Python → skip `rails-specific/` learnings
|
|
215
|
+
- Plan has no auth → skip `authentication-issues/` learnings
|
|
216
|
+
|
|
217
|
+
**SPAWN sub-agents for learnings that MIGHT apply:**
|
|
218
|
+
- Any tag overlap with plan technologies
|
|
219
|
+
- Same category as plan domain
|
|
220
|
+
- Similar patterns or concerns
|
|
221
|
+
|
|
222
|
+
**Step 4: Spawn sub-agents for filtered learnings**
|
|
223
|
+
|
|
224
|
+
For each learning that passes the filter:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Task general-purpose: "
|
|
228
|
+
LEARNING FILE: [full path to .md file]
|
|
229
|
+
|
|
230
|
+
1. Read this learning file completely
|
|
231
|
+
2. This learning documents a previously solved problem
|
|
232
|
+
|
|
233
|
+
Check if this learning applies to this plan:
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
[full plan content]
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
If relevant:
|
|
240
|
+
- Explain specifically how it applies
|
|
241
|
+
- Quote the key insight or solution
|
|
242
|
+
- Suggest where/how to incorporate it
|
|
243
|
+
|
|
244
|
+
If NOT relevant after deeper analysis:
|
|
245
|
+
- Say 'Not applicable: [reason]'
|
|
246
|
+
"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Example filtering:**
|
|
250
|
+
```
|
|
251
|
+
# Found 15 learning files, plan is about "Rails API caching"
|
|
252
|
+
|
|
253
|
+
# SPAWN (likely relevant):
|
|
254
|
+
docs/solutions/performance-issues/n-plus-one-queries.md # tags: [activerecord] ✓
|
|
255
|
+
docs/solutions/performance-issues/redis-cache-stampede.md # tags: [caching, redis] ✓
|
|
256
|
+
docs/solutions/configuration-fixes/redis-connection-pool.md # tags: [redis] ✓
|
|
257
|
+
|
|
258
|
+
# SKIP (clearly not applicable):
|
|
259
|
+
docs/solutions/deployment-issues/heroku-memory-quota.md # not about caching
|
|
260
|
+
docs/solutions/frontend-issues/stimulus-race-condition.md # plan is API, not frontend
|
|
261
|
+
docs/solutions/authentication-issues/jwt-expiry.md # plan has no auth
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Spawn sub-agents in PARALLEL for all filtered learnings.**
|
|
265
|
+
|
|
266
|
+
**These learnings are institutional knowledge - applying them prevents repeating past mistakes.**
|
|
267
|
+
|
|
268
|
+
### 4. Launch Per-Section Research Agents
|
|
269
|
+
|
|
270
|
+
<thinking>
|
|
271
|
+
For each major section in the plan, spawn dedicated sub-agents to research improvements. Use the Explore agent type for open-ended research.
|
|
272
|
+
</thinking>
|
|
273
|
+
|
|
274
|
+
**For each identified section, launch parallel research:**
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
Task Explore: "Research best practices, patterns, and real-world examples for: [section topic].
|
|
278
|
+
Find:
|
|
279
|
+
- Industry standards and conventions
|
|
280
|
+
- Performance considerations
|
|
281
|
+
- Common pitfalls and how to avoid them
|
|
282
|
+
- Documentation and tutorials
|
|
283
|
+
Return concrete, actionable recommendations."
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Also use Context7 MCP for framework documentation:**
|
|
287
|
+
|
|
288
|
+
For any technologies/frameworks mentioned in the plan, query Context7:
|
|
289
|
+
```
|
|
290
|
+
mcp__plugin_compound-engineering_context7__resolve-library-id: Find library ID for [framework]
|
|
291
|
+
mcp__plugin_compound-engineering_context7__query-docs: Query documentation for specific patterns
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Use WebSearch for current best practices:**
|
|
295
|
+
|
|
296
|
+
Search for recent (2024-2026) articles, blog posts, and documentation on topics in the plan.
|
|
297
|
+
|
|
298
|
+
### 5. Discover and Run ALL Review Agents
|
|
299
|
+
|
|
300
|
+
<thinking>
|
|
301
|
+
Dynamically discover every available agent and run them ALL against the plan. Don't filter, don't skip, don't assume relevance. 40+ parallel agents is fine. Use everything available.
|
|
302
|
+
</thinking>
|
|
303
|
+
|
|
304
|
+
**Step 1: Discover ALL available agents from ALL sources**
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
# 1. Project-local agents (highest priority - project-specific)
|
|
308
|
+
find .claude/agents -name "*.md" 2>/dev/null
|
|
309
|
+
|
|
310
|
+
# 2. User's global agents (~/.claude/)
|
|
311
|
+
find ~/.claude/agents -name "*.md" 2>/dev/null
|
|
312
|
+
|
|
313
|
+
# 3. compound-engineering plugin agents (all subdirectories)
|
|
314
|
+
find ~/.claude/plugins/cache/*/compound-engineering/*/agents -name "*.md" 2>/dev/null
|
|
315
|
+
|
|
316
|
+
# 4. ALL other installed plugins - check every plugin for agents
|
|
317
|
+
find ~/.claude/plugins/cache -path "*/agents/*.md" 2>/dev/null
|
|
318
|
+
|
|
319
|
+
# 5. Check installed_plugins.json to find all plugin locations
|
|
320
|
+
cat ~/.claude/plugins/installed_plugins.json
|
|
321
|
+
|
|
322
|
+
# 6. For local plugins (isLocal: true), check their source directories
|
|
323
|
+
# Parse installed_plugins.json and find local plugin paths
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**Important:** Check EVERY source. Include agents from:
|
|
327
|
+
- Project `.claude/agents/`
|
|
328
|
+
- User's `~/.claude/agents/`
|
|
329
|
+
- compound-engineering plugin (but SKIP workflow/ agents - only use review/, research/, design/, docs/)
|
|
330
|
+
- ALL other installed plugins (agent-sdk-dev, frontend-design, etc.)
|
|
331
|
+
- Any local plugins
|
|
332
|
+
|
|
333
|
+
**For compound-engineering plugin specifically:**
|
|
334
|
+
- USE: `agents/review/*` (all reviewers)
|
|
335
|
+
- USE: `agents/research/*` (all researchers)
|
|
336
|
+
- USE: `agents/design/*` (design agents)
|
|
337
|
+
- USE: `agents/docs/*` (documentation agents)
|
|
338
|
+
- SKIP: `agents/workflow/*` (these are workflow orchestrators, not reviewers)
|
|
339
|
+
|
|
340
|
+
**Step 2: For each discovered agent, read its description**
|
|
341
|
+
|
|
342
|
+
Read the first few lines of each agent file to understand what it reviews/analyzes.
|
|
343
|
+
|
|
344
|
+
**Step 3: Launch ALL agents in parallel**
|
|
345
|
+
|
|
346
|
+
For EVERY agent discovered, launch a Task in parallel:
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
Task [agent-name]: "Review this plan using your expertise. Apply all your checks and patterns. Plan content: [full plan content]"
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**CRITICAL RULES:**
|
|
353
|
+
- Do NOT filter agents by "relevance" - run them ALL
|
|
354
|
+
- Do NOT skip agents because they "might not apply" - let them decide
|
|
355
|
+
- Launch ALL agents in a SINGLE message with multiple Task tool calls
|
|
356
|
+
- 20, 30, 40 parallel agents is fine - use everything
|
|
357
|
+
- Each agent may catch something others miss
|
|
358
|
+
- The goal is MAXIMUM coverage, not efficiency
|
|
359
|
+
|
|
360
|
+
**Step 4: Also discover and run research agents**
|
|
361
|
+
|
|
362
|
+
Research agents (like `best-practices-researcher`, `framework-docs-researcher`, `git-history-analyzer`, `repo-research-analyst`) should also be run for relevant plan sections.
|
|
363
|
+
|
|
364
|
+
### 6. Wait for ALL Agents and Synthesize Everything
|
|
365
|
+
|
|
366
|
+
<thinking>
|
|
367
|
+
Wait for ALL parallel agents to complete - skills, research agents, review agents, everything. Then synthesize all findings into a comprehensive enhancement.
|
|
368
|
+
</thinking>
|
|
369
|
+
|
|
370
|
+
**Collect outputs from ALL sources:**
|
|
371
|
+
|
|
372
|
+
1. **Skill-based sub-agents** - Each skill's full output (code examples, patterns, recommendations)
|
|
373
|
+
2. **Learnings/Solutions sub-agents** - Relevant documented learnings from /workflows:compound
|
|
374
|
+
3. **Research agents** - Best practices, documentation, real-world examples
|
|
375
|
+
4. **Review agents** - All feedback from every reviewer (architecture, security, performance, simplicity, etc.)
|
|
376
|
+
5. **Context7 queries** - Framework documentation and patterns
|
|
377
|
+
6. **Web searches** - Current best practices and articles
|
|
378
|
+
|
|
379
|
+
**For each agent's findings, extract:**
|
|
380
|
+
- [ ] Concrete recommendations (actionable items)
|
|
381
|
+
- [ ] Code patterns and examples (copy-paste ready)
|
|
382
|
+
- [ ] Anti-patterns to avoid (warnings)
|
|
383
|
+
- [ ] Performance considerations (metrics, benchmarks)
|
|
384
|
+
- [ ] Security considerations (vulnerabilities, mitigations)
|
|
385
|
+
- [ ] Edge cases discovered (handling strategies)
|
|
386
|
+
- [ ] Documentation links (references)
|
|
387
|
+
- [ ] Skill-specific patterns (from matched skills)
|
|
388
|
+
- [ ] Relevant learnings (past solutions that apply - prevent repeating mistakes)
|
|
389
|
+
|
|
390
|
+
**Deduplicate and prioritize:**
|
|
391
|
+
- Merge similar recommendations from multiple agents
|
|
392
|
+
- Prioritize by impact (high-value improvements first)
|
|
393
|
+
- Flag conflicting advice for human review
|
|
394
|
+
- Group by plan section
|
|
395
|
+
|
|
396
|
+
### 7. Enhance Plan Sections
|
|
397
|
+
|
|
398
|
+
<thinking>
|
|
399
|
+
Merge research findings back into the plan, adding depth without changing the original structure.
|
|
400
|
+
</thinking>
|
|
401
|
+
|
|
402
|
+
**Enhancement format for each section:**
|
|
403
|
+
|
|
404
|
+
```markdown
|
|
405
|
+
## [Original Section Title]
|
|
406
|
+
|
|
407
|
+
[Original content preserved]
|
|
408
|
+
|
|
409
|
+
### Research Insights
|
|
410
|
+
|
|
411
|
+
**Best Practices:**
|
|
412
|
+
- [Concrete recommendation 1]
|
|
413
|
+
- [Concrete recommendation 2]
|
|
414
|
+
|
|
415
|
+
**Performance Considerations:**
|
|
416
|
+
- [Optimization opportunity]
|
|
417
|
+
- [Benchmark or metric to target]
|
|
418
|
+
|
|
419
|
+
**Implementation Details:**
|
|
420
|
+
```[language]
|
|
421
|
+
// Concrete code example from research
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
**Edge Cases:**
|
|
425
|
+
- [Edge case 1 and how to handle]
|
|
426
|
+
- [Edge case 2 and how to handle]
|
|
427
|
+
|
|
428
|
+
**References:**
|
|
429
|
+
- [Documentation URL 1]
|
|
430
|
+
- [Documentation URL 2]
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### 8. Add Enhancement Summary
|
|
434
|
+
|
|
435
|
+
At the top of the plan, add a summary section:
|
|
436
|
+
|
|
437
|
+
```markdown
|
|
438
|
+
## Enhancement Summary
|
|
439
|
+
|
|
440
|
+
**Deepened on:** [Date]
|
|
441
|
+
**Sections enhanced:** [Count]
|
|
442
|
+
**Research agents used:** [List]
|
|
443
|
+
|
|
444
|
+
### Key Improvements
|
|
445
|
+
1. [Major improvement 1]
|
|
446
|
+
2. [Major improvement 2]
|
|
447
|
+
3. [Major improvement 3]
|
|
448
|
+
|
|
449
|
+
### New Considerations Discovered
|
|
450
|
+
- [Important finding 1]
|
|
451
|
+
- [Important finding 2]
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### 9. Update Plan File
|
|
455
|
+
|
|
456
|
+
**Write the enhanced plan:**
|
|
457
|
+
- Preserve original filename
|
|
458
|
+
- Add `-deepened` suffix if user prefers a new file
|
|
459
|
+
- Update any timestamps or metadata
|
|
460
|
+
|
|
461
|
+
## Output Format
|
|
462
|
+
|
|
463
|
+
Update the plan file in place (or if user requests a separate file, append `-deepened` after `-plan`, e.g., `2026-01-15-feat-auth-plan-deepened.md`).
|
|
464
|
+
|
|
465
|
+
## Quality Checks
|
|
466
|
+
|
|
467
|
+
Before finalizing:
|
|
468
|
+
- [ ] All original content preserved
|
|
469
|
+
- [ ] Research insights clearly marked and attributed
|
|
470
|
+
- [ ] Code examples are syntactically correct
|
|
471
|
+
- [ ] Links are valid and relevant
|
|
472
|
+
- [ ] No contradictions between sections
|
|
473
|
+
- [ ] Enhancement summary accurately reflects changes
|
|
474
|
+
|
|
475
|
+
## Post-Enhancement Options
|
|
476
|
+
|
|
477
|
+
After writing the enhanced plan, use the **AskUserQuestion tool** to present these options:
|
|
478
|
+
|
|
479
|
+
**Question:** "Plan deepened at `[plan_path]`. What would you like to do next?"
|
|
480
|
+
|
|
481
|
+
**Options:**
|
|
482
|
+
1. **View diff** - Show what was added/changed
|
|
483
|
+
2. **Run `/plan_review`** - Get feedback from reviewers on enhanced plan
|
|
484
|
+
3. **Start `/workflows:work`** - Begin implementing this enhanced plan
|
|
485
|
+
4. **Deepen further** - Run another round of research on specific sections
|
|
486
|
+
5. **Revert** - Restore original plan (if backup exists)
|
|
487
|
+
|
|
488
|
+
Based on selection:
|
|
489
|
+
- **View diff** → Run `git diff [plan_path]` or show before/after
|
|
490
|
+
- **`/plan_review`** → Call the /plan_review command with the plan file path
|
|
491
|
+
- **`/workflows:work`** → Call the /workflows:work command with the plan file path
|
|
492
|
+
- **Deepen further** → Ask which sections need more research, then re-run those agents
|
|
493
|
+
- **Revert** → Restore from git or backup
|
|
494
|
+
|
|
495
|
+
## Example Enhancement
|
|
496
|
+
|
|
497
|
+
**Before (from /workflows:plan):**
|
|
498
|
+
```markdown
|
|
499
|
+
## Technical Approach
|
|
500
|
+
|
|
501
|
+
Use React Query for data fetching with optimistic updates.
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
**After (from /workflows:deepen-plan):**
|
|
505
|
+
```markdown
|
|
506
|
+
## Technical Approach
|
|
507
|
+
|
|
508
|
+
Use React Query for data fetching with optimistic updates.
|
|
509
|
+
|
|
510
|
+
### Research Insights
|
|
511
|
+
|
|
512
|
+
**Best Practices:**
|
|
513
|
+
- Configure `staleTime` and `cacheTime` based on data freshness requirements
|
|
514
|
+
- Use `queryKey` factories for consistent cache invalidation
|
|
515
|
+
- Implement error boundaries around query-dependent components
|
|
516
|
+
|
|
517
|
+
**Performance Considerations:**
|
|
518
|
+
- Enable `refetchOnWindowFocus: false` for stable data to reduce unnecessary requests
|
|
519
|
+
- Use `select` option to transform and memoize data at query level
|
|
520
|
+
- Consider `placeholderData` for instant perceived loading
|
|
521
|
+
|
|
522
|
+
**Implementation Details:**
|
|
523
|
+
```typescript
|
|
524
|
+
// Recommended query configuration
|
|
525
|
+
const queryClient = new QueryClient({
|
|
526
|
+
defaultOptions: {
|
|
527
|
+
queries: {
|
|
528
|
+
staleTime: 5 * 60 * 1000, // 5 minutes
|
|
529
|
+
retry: 2,
|
|
530
|
+
refetchOnWindowFocus: false,
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
});
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**Edge Cases:**
|
|
537
|
+
- Handle race conditions with `cancelQueries` on component unmount
|
|
538
|
+
- Implement retry logic for transient network failures
|
|
539
|
+
- Consider offline support with `persistQueryClient`
|
|
540
|
+
|
|
541
|
+
**References:**
|
|
542
|
+
- https://tanstack.com/query/latest/docs/react/guides/optimistic-updates
|
|
543
|
+
- https://tkdodo.eu/blog/practical-react-query
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
NEVER CODE! Just research and enhance the plan.
|
package/commands/lfg.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lfg
|
|
3
|
+
description: Full autonomous engineering workflow
|
|
4
|
+
argument-hint: "[feature description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Run these slash commands in order. Do not do anything else.
|
|
8
|
+
|
|
9
|
+
1. `/ralph-wiggum:ralph-loop "finish all slash commands" --completion-promise "DONE"`
|
|
10
|
+
2. `/workflows:plan $ARGUMENTS`
|
|
11
|
+
3. `/compound-engineering:deepen-plan`
|
|
12
|
+
4. `/workflows:work`
|
|
13
|
+
5. `/workflows:review`
|
|
14
|
+
6. `/compound-engineering:resolve_todo_parallel`
|
|
15
|
+
7. `/compound-engineering:test-browser`
|
|
16
|
+
8. `/compound-engineering:feature-video`
|
|
17
|
+
9. Output `<promise>DONE</promise>` when video is in PR
|
|
18
|
+
|
|
19
|
+
Start with step 1 now.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflows:brainstorm
|
|
3
|
+
description: Explore requirements and approaches through collaborative dialogue before planning implementation
|
|
4
|
+
argument-hint: "[feature idea or problem to explore]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Brainstorm a Feature or Improvement
|
|
8
|
+
|
|
9
|
+
**Note: The current year is 2026.** Use this when dating brainstorm documents.
|
|
10
|
+
|
|
11
|
+
Brainstorming helps answer **WHAT** to build through collaborative dialogue. It precedes `/workflows:plan`, which answers **HOW** to build it.
|
|
12
|
+
|
|
13
|
+
**Process knowledge:** Load the `brainstorming` skill for detailed question techniques, approach exploration patterns, and YAGNI principles.
|
|
14
|
+
|
|
15
|
+
## Feature Description
|
|
16
|
+
|
|
17
|
+
<feature_description> #$ARGUMENTS </feature_description>
|
|
18
|
+
|
|
19
|
+
**If the feature description above is empty, ask the user:** "What would you like to explore? Please describe the feature, problem, or improvement you're thinking about."
|
|
20
|
+
|
|
21
|
+
Do not proceed until you have a feature description from the user.
|
|
22
|
+
|
|
23
|
+
## Execution Flow
|
|
24
|
+
|
|
25
|
+
### Phase 0: Assess Requirements Clarity
|
|
26
|
+
|
|
27
|
+
Evaluate whether brainstorming is needed based on the feature description.
|
|
28
|
+
|
|
29
|
+
**Clear requirements indicators:**
|
|
30
|
+
- Specific acceptance criteria provided
|
|
31
|
+
- Referenced existing patterns to follow
|
|
32
|
+
- Described exact expected behavior
|
|
33
|
+
- Constrained, well-defined scope
|
|
34
|
+
|
|
35
|
+
**If requirements are already clear:**
|
|
36
|
+
Use **AskUserQuestion tool** to suggest: "Your requirements seem detailed enough to proceed directly to planning. Should I run `/workflows:plan` instead, or would you like to explore the idea further?"
|
|
37
|
+
|
|
38
|
+
### Phase 1: Understand the Idea
|
|
39
|
+
|
|
40
|
+
#### 1.1 Repository Research (Lightweight)
|
|
41
|
+
|
|
42
|
+
Run a quick repo scan to understand existing patterns:
|
|
43
|
+
|
|
44
|
+
- Task repo-research-analyst("Understand existing patterns related to: <feature_description>")
|
|
45
|
+
|
|
46
|
+
Focus on: similar features, established patterns, CLAUDE.md guidance.
|
|
47
|
+
|
|
48
|
+
#### 1.2 Collaborative Dialogue
|
|
49
|
+
|
|
50
|
+
Use the **AskUserQuestion tool** to ask questions **one at a time**.
|
|
51
|
+
|
|
52
|
+
**Guidelines (see `brainstorming` skill for detailed techniques):**
|
|
53
|
+
- Prefer multiple choice when natural options exist
|
|
54
|
+
- Start broad (purpose, users) then narrow (constraints, edge cases)
|
|
55
|
+
- Validate assumptions explicitly
|
|
56
|
+
- Ask about success criteria
|
|
57
|
+
|
|
58
|
+
**Exit condition:** Continue until the idea is clear OR user says "proceed"
|
|
59
|
+
|
|
60
|
+
### Phase 2: Explore Approaches
|
|
61
|
+
|
|
62
|
+
Propose **2-3 concrete approaches** based on research and conversation.
|
|
63
|
+
|
|
64
|
+
For each approach, provide:
|
|
65
|
+
- Brief description (2-3 sentences)
|
|
66
|
+
- Pros and cons
|
|
67
|
+
- When it's best suited
|
|
68
|
+
|
|
69
|
+
Lead with your recommendation and explain why. Apply YAGNI—prefer simpler solutions.
|
|
70
|
+
|
|
71
|
+
Use **AskUserQuestion tool** to ask which approach the user prefers.
|
|
72
|
+
|
|
73
|
+
### Phase 3: Capture the Design
|
|
74
|
+
|
|
75
|
+
Write a brainstorm document to `docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md`.
|
|
76
|
+
|
|
77
|
+
**Document structure:** See the `brainstorming` skill for the template format. Key sections: What We're Building, Why This Approach, Key Decisions, Open Questions.
|
|
78
|
+
|
|
79
|
+
Ensure `docs/brainstorms/` directory exists before writing.
|
|
80
|
+
|
|
81
|
+
### Phase 4: Handoff
|
|
82
|
+
|
|
83
|
+
Use **AskUserQuestion tool** to present next steps:
|
|
84
|
+
|
|
85
|
+
**Question:** "Brainstorm captured. What would you like to do next?"
|
|
86
|
+
|
|
87
|
+
**Options:**
|
|
88
|
+
1. **Proceed to planning** - Run `/workflows:plan` (will auto-detect this brainstorm)
|
|
89
|
+
2. **Refine design further** - Continue exploring
|
|
90
|
+
3. **Done for now** - Return later
|
|
91
|
+
|
|
92
|
+
## Output Summary
|
|
93
|
+
|
|
94
|
+
When complete, display:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Brainstorm complete!
|
|
98
|
+
|
|
99
|
+
Document: docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md
|
|
100
|
+
|
|
101
|
+
Key decisions:
|
|
102
|
+
- [Decision 1]
|
|
103
|
+
- [Decision 2]
|
|
104
|
+
|
|
105
|
+
Next: Run `/workflows:plan` when ready to implement.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Important Guidelines
|
|
109
|
+
|
|
110
|
+
- **Stay focused on WHAT, not HOW** - Implementation details belong in the plan
|
|
111
|
+
- **Ask one question at a time** - Don't overwhelm
|
|
112
|
+
- **Apply YAGNI** - Prefer simpler approaches
|
|
113
|
+
- **Keep outputs concise** - 200-300 words per section max
|
|
114
|
+
|
|
115
|
+
NEVER CODE! Just explore and document decisions.
|