Skip to content

Commit cc905c7

Browse files
authored
feat: Add /workflows:brainstorm command and skill (EveryInc#101)
* feat(workflows:plan): Add smart research decision logic Previously, /workflows:plan always ran all 3 research agents (repo-research, best-practices, framework-docs) regardless of task complexity. This wasted tokens and time for simple tasks like UI tweaks or bug fixes with clear causes. Now the workflow: - Always runs repo research first (fast, local) - Makes an informed decision about external research based on: - Signals gathered during idea refinement (familiarity, intent, risk) - Repo research findings (existing patterns, CLAUDE.md guidance) - High-risk topics (security, payments, external APIs) always trigger research - Strong local context allows skipping external research - Announces the decision and proceeds, user can redirect if needed This makes the planning workflow smarter about when web research adds value. * feat: Add /workflows:brainstorm command and skill Add brainstorming workflow to explore requirements and approaches before planning implementation: - New `/workflows:brainstorm` command for collaborative dialogue - New `brainstorming` skill with process knowledge and techniques - Update `/workflows:plan` to detect brainstorm output and skip idea refinement when relevant brainstorm exists - Add brainstorm to README workflow commands table The brainstorm → plan flow enables: - Phase 0: Assess requirement clarity - Phase 1: Understand the idea via repo research + dialogue - Phase 2: Explore 2-3 approaches with trade-offs - Phase 3: Capture design to docs/brainstorms/ - Phase 4: Handoff to /workflows:plan
1 parent 17fe887 commit cc905c7

File tree

4 files changed

+374
-15
lines changed

4 files changed

+374
-15
lines changed

plugins/compound-engineering/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in
7575

7676
| Command | Description |
7777
|---------|-------------|
78+
| `/workflows:brainstorm` | Explore requirements and approaches before planning |
7879
| `/workflows:plan` | Create implementation plans |
7980
| `/workflows:review` | Run comprehensive code reviews |
8081
| `/workflows:work` | Execute work items systematically |
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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>.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>.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.

plugins/compound-engineering/commands/workflows/plan.md

Lines changed: 68 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,97 @@ Do not proceed until you have a clear feature description from the user.
2222

2323
### 0. Idea Refinement
2424

25-
Before running research, refine the idea through collaborative dialogue using the **AskUserQuestion tool**:
25+
**Check for brainstorm output first:**
26+
27+
Before asking questions, look for recent brainstorm documents in `docs/brainstorms/` that match this feature:
28+
29+
```bash
30+
ls -la docs/brainstorms/*.md 2>/dev/null | head -10
31+
```
32+
33+
**Relevance criteria:** A brainstorm is relevant if:
34+
- The topic (from filename or YAML frontmatter) semantically matches the feature description
35+
- Created within the last 14 days
36+
- If multiple candidates match, use the most recent one
37+
38+
**If a relevant brainstorm exists:**
39+
1. Read the brainstorm document
40+
2. Announce: "Found brainstorm from [date]: [topic]. Using as context for planning."
41+
3. Extract key decisions, chosen approach, and open questions
42+
4. **Skip the idea refinement questions below** - the brainstorm already answered WHAT to build
43+
5. Use brainstorm decisions as input to the research phase
44+
45+
**If multiple brainstorms could match:**
46+
Use **AskUserQuestion tool** to ask which brainstorm to use, or whether to proceed without one.
47+
48+
**If no brainstorm found (or not relevant), run idea refinement:**
49+
50+
Refine the idea through collaborative dialogue using the **AskUserQuestion tool**:
2651

2752
- Ask questions one at a time to understand the idea fully
2853
- Prefer multiple choice questions when natural options exist
2954
- Focus on understanding: purpose, constraints and success criteria
3055
- Continue until the idea is clear OR user says "proceed"
3156

57+
**Gather signals for research decision.** During refinement, note:
58+
59+
- **User's familiarity**: Do they know the codebase patterns? Are they pointing to examples?
60+
- **User's intent**: Speed vs thoroughness? Exploration vs execution?
61+
- **Topic risk**: Security, payments, external APIs warrant more caution
62+
- **Uncertainty level**: Is the approach clear or open-ended?
63+
3264
**Skip option:** If the feature description is already detailed, offer:
3365
"Your description is clear. Should I proceed with research, or would you like to refine it further?"
3466

3567
## Main Tasks
3668

37-
### 1. Repository Research & Context Gathering
69+
### 1. Repository Research (Always Runs)
3870

3971
<thinking>
40-
First, I need to understand the project's conventions and existing patterns, leveraging all available resources and use paralel subagents to do this.
72+
First, I need to understand the project's conventions and existing patterns. This is fast and local - it informs whether external research is needed.
4173
</thinking>
4274

43-
Runn these three agents in paralel at the same time:
75+
Run repo research to understand the codebase:
4476

4577
- Task repo-research-analyst(feature_description)
78+
79+
**What to look for:** existing patterns, CLAUDE.md guidance, technology familiarity, pattern consistency. These findings inform the next step.
80+
81+
### 1.5. Research Decision
82+
83+
Based on signals from Step 0 and findings from Step 1, decide on external research.
84+
85+
**High-risk topics → always research.** Security, payments, external APIs, data privacy. The cost of missing something is too high. This takes precedence over speed signals.
86+
87+
**Strong local context → skip external research.** Codebase has good patterns, CLAUDE.md has guidance, user knows what they want. External research adds little value.
88+
89+
**Uncertainty or unfamiliar territory → research.** User is exploring, codebase has no examples, new technology. External perspective is valuable.
90+
91+
**Announce the decision and proceed.** Brief explanation, then continue. User can redirect if needed.
92+
93+
Examples:
94+
- "Your codebase has solid patterns for this. Proceeding without external research."
95+
- "This involves payment processing, so I'll research current best practices first."
96+
97+
### 1.5b. External Research (Conditional)
98+
99+
**Only run if Step 1.5 indicates external research is valuable.**
100+
101+
Run these agents in parallel:
102+
46103
- Task best-practices-researcher(feature_description)
47104
- Task framework-docs-researcher(feature_description)
48105

49-
**Reference Collection:**
50-
51-
- [ ] Document all research findings with specific file paths (e.g., `app/services/example_service.rb:42`)
52-
- [ ] Include URLs to external documentation and best practices guides
53-
- [ ] Create a reference list of similar issues or PRs (e.g., `#123`, `#456`)
54-
- [ ] Note any team conventions discovered in `CLAUDE.md` or team documentation
106+
### 1.6. Consolidate Research
55107

56-
### Research Validation (Optional)
108+
After all research steps complete, consolidate findings:
57109

58-
After research agents complete, briefly validate alignment:
110+
- Document relevant file paths from repo research (e.g., `app/services/example_service.rb:42`)
111+
- Note external documentation URLs and best practices (if external research was done)
112+
- List related issues or PRs discovered
113+
- Capture CLAUDE.md conventions
59114

60-
- Summarize key findings from research
61-
- Ask if anything looks off or is missing
62-
- User can confirm or request additional research on specific topics
115+
**Optional validation:** Briefly summarize findings and ask if anything looks off or missing before proceeding to planning.
63116

64117
### 2. Issue Planning & Structure
65118

0 commit comments

Comments
 (0)