claude-code-workflow 6.3.48 → 6.3.49
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/.claude/CLAUDE.md +6 -8
- package/.claude/agents/action-planning-agent.md +28 -45
- package/.claude/agents/cli-lite-planning-agent.md +93 -1
- package/.claude/agents/code-developer.md +144 -27
- package/.claude/commands/ccw-coordinator.md +175 -21
- package/.claude/commands/ccw-debug.md +832 -0
- package/.claude/commands/ccw.md +90 -9
- package/.claude/commands/cli/cli-init.md +1 -0
- package/.claude/commands/issue/convert-to-plan.md +718 -0
- package/.claude/commands/issue/from-brainstorm.md +382 -0
- package/.claude/commands/memory/tips.md +332 -0
- package/.claude/commands/workflow/analyze-with-file.md +804 -0
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +18 -43
- package/.claude/commands/workflow/brainstorm/role-analysis.md +705 -0
- package/.claude/commands/workflow/brainstorm-with-file.md +1153 -0
- package/.claude/commands/workflow/debug-with-file.md +7 -5
- package/.claude/commands/workflow/execute.md +6 -4
- package/.claude/commands/workflow/lite-plan.md +2 -2
- package/.claude/commands/workflow/plan-verify.md +162 -327
- package/.claude/commands/workflow/plan.md +162 -26
- package/.claude/commands/workflow/replan.md +78 -2
- package/.claude/commands/workflow/{review-fix.md → review-cycle-fix.md} +6 -6
- package/.claude/commands/workflow/review-module-cycle.md +2 -2
- package/.claude/commands/workflow/review-session-cycle.md +2 -2
- package/.claude/commands/workflow/tools/conflict-resolution.md +16 -26
- package/.claude/commands/workflow/tools/context-gather.md +81 -118
- package/.claude/commands/workflow/tools/task-generate-agent.md +94 -10
- package/.claude/skills/ccw-help/command.json +4 -4
- package/.claude/skills/lite-skill-generator/SKILL.md +650 -0
- package/.claude/skills/lite-skill-generator/templates/simple-skill.md +68 -0
- package/.claude/skills/lite-skill-generator/templates/style-guide.md +64 -0
- package/.claude/skills/skill-generator/SKILL.md +277 -85
- package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +4 -15
- package/.claude/skills/skill-generator/phases/02-structure-generation.md +72 -17
- package/.claude/skills/skill-generator/phases/03-phase-generation.md +218 -51
- package/.claude/skills/skill-generator/phases/04-specs-templates.md +111 -41
- package/.claude/skills/skill-generator/phases/05-validation.md +139 -56
- package/.claude/skills/skill-generator/templates/autonomous-action.md +78 -268
- package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +14 -0
- package/.claude/skills/skill-generator/templates/code-analysis-action.md +12 -0
- package/.claude/skills/skill-generator/templates/llm-action.md +12 -0
- package/.claude/skills/skill-generator/templates/script-template.md +368 -0
- package/.claude/skills/skill-generator/templates/sequential-phase.md +14 -0
- package/.claude/skills/skill-generator/templates/skill-md.md +14 -0
- package/.claude/skills/skill-tuning/SKILL.md +130 -266
- package/.claude/skills/skill-tuning/phases/orchestrator.md +95 -283
- package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +90 -198
- package/.claude/skills/skill-tuning/specs/tuning-strategies.md +193 -1345
- package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +47 -0
- package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +158 -0
- package/.claude/workflows/cli-tools-usage.md +1 -1
- package/.codex/AGENTS.md +1 -3
- package/.codex/prompts/analyze-with-file.md +607 -0
- package/.codex/prompts/brainstorm-to-cycle.md +455 -0
- package/.codex/prompts/brainstorm-with-file.md +933 -0
- package/.codex/prompts/debug-with-file.md +15 -20
- package/.codex/skills/ccw-cli-tools/SKILL.md +559 -0
- package/ccw/dist/commands/cli.d.ts.map +1 -1
- package/ccw/dist/commands/cli.js +29 -5
- package/ccw/dist/commands/cli.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts +2 -0
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +62 -20
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.js +5 -3
- package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
- package/ccw/dist/config/litellm-provider-models.d.ts +73 -0
- package/ccw/dist/config/litellm-provider-models.d.ts.map +1 -0
- package/ccw/dist/config/litellm-provider-models.js +172 -0
- package/ccw/dist/config/litellm-provider-models.js.map +1 -0
- package/ccw/dist/config/provider-models.d.ts +25 -51
- package/ccw/dist/config/provider-models.d.ts.map +1 -1
- package/ccw/dist/config/provider-models.js +84 -149
- package/ccw/dist/config/provider-models.js.map +1 -1
- package/ccw/dist/config/storage-paths.d.ts.map +1 -1
- package/ccw/dist/config/storage-paths.js +23 -5
- package/ccw/dist/config/storage-paths.js.map +1 -1
- package/ccw/dist/core/auth/csrf-middleware.js +3 -3
- package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
- package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
- package/ccw/dist/core/dashboard-generator.js +3 -1
- package/ccw/dist/core/dashboard-generator.js.map +1 -1
- package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/claude-routes.js +206 -14
- package/ccw/dist/core/routes/claude-routes.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/commands-routes.d.ts +7 -0
- package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/commands-routes.js +480 -0
- package/ccw/dist/core/routes/commands-routes.js.map +1 -0
- package/ccw/dist/core/routes/model-routes.d.ts +11 -0
- package/ccw/dist/core/routes/model-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/model-routes.js +112 -0
- package/ccw/dist/core/routes/model-routes.js.map +1 -0
- package/ccw/dist/core/routes/nav-status-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/nav-status-routes.js +84 -1
- package/ccw/dist/core/routes/nav-status-routes.js.map +1 -1
- package/ccw/dist/core/routes/provider-routes.d.ts +11 -0
- package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/provider-routes.js +67 -0
- package/ccw/dist/core/routes/provider-routes.js.map +1 -0
- package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/skills-routes.js +219 -7
- package/ccw/dist/core/routes/skills-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +58 -6
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +13 -0
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/mcp-server/index.js +2 -2
- package/ccw/dist/mcp-server/index.js.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.d.ts +48 -11
- package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.js +146 -50
- package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
- package/ccw/dist/tools/cli-config-manager.d.ts +1 -13
- package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
- package/ccw/dist/tools/cli-config-manager.js +3 -27
- package/ccw/dist/tools/cli-config-manager.js.map +1 -1
- package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-core.js +7 -2
- package/ccw/dist/tools/cli-executor-core.js.map +1 -1
- package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.d.ts +11 -0
- package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.js +82 -2
- package/ccw/dist/tools/cli-history-store.js.map +1 -1
- package/ccw/dist/tools/command-registry.d.ts +7 -0
- package/ccw/dist/tools/command-registry.d.ts.map +1 -1
- package/ccw/dist/tools/command-registry.js +14 -1
- package/ccw/dist/tools/command-registry.js.map +1 -1
- package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
- package/ccw/dist/tools/generate-module-docs.js +11 -7
- package/ccw/dist/tools/generate-module-docs.js.map +1 -1
- package/ccw/dist/tools/litellm-executor.d.ts +1 -0
- package/ccw/dist/tools/litellm-executor.d.ts.map +1 -1
- package/ccw/dist/tools/litellm-executor.js +11 -9
- package/ccw/dist/tools/litellm-executor.js.map +1 -1
- package/ccw/dist/types/skill-types.d.ts +97 -0
- package/ccw/dist/types/skill-types.d.ts.map +1 -0
- package/ccw/dist/types/skill-types.js +6 -0
- package/ccw/dist/types/skill-types.js.map +1 -0
- package/ccw/src/commands/cli.ts +36 -5
- package/ccw/src/commands/issue.ts +81 -26
- package/ccw/src/config/litellm-api-config-manager.ts +5 -3
- package/ccw/src/config/litellm-provider-models.ts +222 -0
- package/ccw/src/config/provider-models.ts +91 -190
- package/ccw/src/config/storage-paths.ts +20 -5
- package/ccw/src/core/auth/csrf-middleware.ts +3 -3
- package/ccw/src/core/dashboard-generator.ts +3 -1
- package/ccw/src/core/routes/claude-routes.ts +233 -15
- package/ccw/src/core/routes/cli-routes.ts +2 -3
- package/ccw/src/core/routes/commands-routes.ts +620 -0
- package/ccw/src/core/routes/nav-status-routes.ts +95 -1
- package/ccw/src/core/routes/provider-routes.ts +78 -0
- package/ccw/src/core/routes/skills-routes.ts +266 -45
- package/ccw/src/core/routes/system-routes.ts +102 -50
- package/ccw/src/core/server.ts +13 -0
- package/ccw/src/mcp-server/index.ts +2 -2
- package/ccw/src/templates/dashboard-css/18-cli-settings.css +35 -0
- package/ccw/src/templates/dashboard-css/37-commands.css +193 -0
- package/ccw/src/templates/dashboard-js/components/navigation.js +4 -0
- package/ccw/src/templates/dashboard-js/i18n.js +116 -0
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +249 -4
- package/ccw/src/templates/dashboard-js/views/commands-manager.js +503 -0
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +7 -7
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2 -7
- package/ccw/src/templates/dashboard-js/views/skills-manager.js +164 -23
- package/ccw/src/templates/dashboard.html +7 -0
- package/ccw/src/tools/claude-cli-tools.ts +170 -56
- package/ccw/src/tools/cli-config-manager.ts +2 -33
- package/ccw/src/tools/cli-executor-core.ts +8 -2
- package/ccw/src/tools/cli-history-store.ts +92 -2
- package/ccw/src/tools/command-registry.ts +16 -1
- package/ccw/src/tools/generate-module-docs.ts +11 -7
- package/ccw/src/tools/litellm-executor.ts +13 -9
- package/ccw/src/types/skill-types.ts +99 -0
- package/package.json +1 -1
- package/.claude/commands/enhance-prompt.md +0 -93
- package/.claude/commands/memory/code-map-memory.md +0 -687
- package/.claude/commands/memory/docs.md +0 -615
- package/.claude/commands/memory/load-skill-memory.md +0 -182
- package/.claude/commands/memory/skill-memory.md +0 -525
- package/.claude/commands/memory/swagger-docs.md +0 -773
- package/.claude/commands/memory/tech-research-rules.md +0 -310
- package/.claude/commands/memory/workflow-skill-memory.md +0 -517
- package/.claude/commands/task/breakdown.md +0 -208
- package/.claude/commands/task/create.md +0 -152
- package/.claude/commands/task/execute.md +0 -270
- package/.claude/commands/task/replan.md +0 -441
- package/.claude/commands/version.md +0 -254
- package/.claude/commands/workflow/action-plan-verify.md +0 -485
- package/.claude/commands/workflow/brainstorm/api-designer.md +0 -587
- package/.claude/commands/workflow/brainstorm/data-architect.md +0 -220
- package/.claude/commands/workflow/brainstorm/product-manager.md +0 -200
- package/.claude/commands/workflow/brainstorm/product-owner.md +0 -200
- package/.claude/commands/workflow/brainstorm/scrum-master.md +0 -200
- package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +0 -200
- package/.claude/commands/workflow/brainstorm/system-architect.md +0 -389
- package/.claude/commands/workflow/brainstorm/ui-designer.md +0 -221
- package/.claude/commands/workflow/brainstorm/ux-expert.md +0 -221
- package/.claude/commands/workflow/debug.md +0 -331
- package/.claude/commands/workflow/develop-with-file.md +0 -1044
- package/.claude/skills/ccw-loop/README.md +0 -303
- package/.claude/skills/skill-generator/templates/script-bash.md +0 -277
- package/.claude/skills/skill-generator/templates/script-python.md +0 -198
- package/.codex/prompts/debug.md +0 -318
- package/ccw/src/core/routes/mcp-routes.ts.backup +0 -549
|
@@ -0,0 +1,933 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Interactive brainstorming with multi-perspective analysis, idea expansion, and documented thought evolution
|
|
3
|
+
argument-hint: TOPIC="<idea or topic to brainstorm>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codex Brainstorm-With-File Prompt
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Interactive brainstorming workflow with **documented thought evolution**. Expands initial ideas through questioning, multi-perspective analysis, and iterative refinement.
|
|
11
|
+
|
|
12
|
+
**Core workflow**: Seed Idea → Expand → Multi-Perspective Explore → Synthesize → Refine → Crystallize
|
|
13
|
+
|
|
14
|
+
**Key features**:
|
|
15
|
+
- **brainstorm.md**: Complete thought evolution timeline
|
|
16
|
+
- **Multi-perspective analysis**: Creative, Pragmatic, Systematic viewpoints
|
|
17
|
+
- **Idea expansion**: Progressive questioning and exploration
|
|
18
|
+
- **Diverge-Converge cycles**: Generate options then focus on best paths
|
|
19
|
+
- **Synthesis**: Merge multiple perspectives into coherent solutions
|
|
20
|
+
|
|
21
|
+
## Target Topic
|
|
22
|
+
|
|
23
|
+
**$TOPIC**
|
|
24
|
+
|
|
25
|
+
## Execution Process
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Session Detection:
|
|
29
|
+
├─ Check if brainstorm session exists for topic
|
|
30
|
+
├─ EXISTS + brainstorm.md exists → Continue mode
|
|
31
|
+
└─ NOT_FOUND → New session mode
|
|
32
|
+
|
|
33
|
+
Phase 1: Seed Understanding
|
|
34
|
+
├─ Parse initial idea/topic
|
|
35
|
+
├─ Identify brainstorm dimensions (technical, UX, business, etc.)
|
|
36
|
+
├─ Initial scoping with user
|
|
37
|
+
├─ Expand seed into exploration vectors
|
|
38
|
+
└─ Document in brainstorm.md
|
|
39
|
+
|
|
40
|
+
Phase 2: Divergent Exploration (Multi-Perspective)
|
|
41
|
+
├─ Creative perspective: Innovative, unconventional ideas
|
|
42
|
+
├─ Pragmatic perspective: Implementation-focused approaches
|
|
43
|
+
├─ Systematic perspective: Architectural, structured solutions
|
|
44
|
+
└─ Aggregate diverse viewpoints
|
|
45
|
+
|
|
46
|
+
Phase 3: Interactive Refinement (Multi-Round)
|
|
47
|
+
├─ Present multi-perspective findings
|
|
48
|
+
├─ User selects promising directions
|
|
49
|
+
├─ Deep dive on selected paths
|
|
50
|
+
├─ Challenge assumptions (devil's advocate)
|
|
51
|
+
├─ Update brainstorm.md with evolution
|
|
52
|
+
└─ Repeat diverge-converge cycles
|
|
53
|
+
|
|
54
|
+
Phase 4: Convergence & Crystallization
|
|
55
|
+
├─ Synthesize best ideas
|
|
56
|
+
├─ Resolve conflicts between perspectives
|
|
57
|
+
├─ Formulate actionable conclusions
|
|
58
|
+
├─ Generate next steps or implementation plan
|
|
59
|
+
└─ Final brainstorm.md update
|
|
60
|
+
|
|
61
|
+
Output:
|
|
62
|
+
├─ .workflow/.brainstorm/{slug}-{date}/brainstorm.md (thought evolution)
|
|
63
|
+
├─ .workflow/.brainstorm/{slug}-{date}/perspectives.json (analysis findings)
|
|
64
|
+
├─ .workflow/.brainstorm/{slug}-{date}/synthesis.json (final ideas)
|
|
65
|
+
└─ .workflow/.brainstorm/{slug}-{date}/ideas/ (individual idea deep-dives)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Implementation Details
|
|
69
|
+
|
|
70
|
+
### Session Setup & Mode Detection
|
|
71
|
+
|
|
72
|
+
```javascript
|
|
73
|
+
const getUtc8ISOString = () => new Date(Date.now() + 8 * 60 * 60 * 1000).toISOString()
|
|
74
|
+
|
|
75
|
+
const topicSlug = "$TOPIC".toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, '-').substring(0, 40)
|
|
76
|
+
const dateStr = getUtc8ISOString().substring(0, 10)
|
|
77
|
+
|
|
78
|
+
const sessionId = `BS-${topicSlug}-${dateStr}`
|
|
79
|
+
const sessionFolder = `.workflow/.brainstorm/${sessionId}`
|
|
80
|
+
const brainstormPath = `${sessionFolder}/brainstorm.md`
|
|
81
|
+
const perspectivesPath = `${sessionFolder}/perspectives.json`
|
|
82
|
+
const synthesisPath = `${sessionFolder}/synthesis.json`
|
|
83
|
+
const ideasFolder = `${sessionFolder}/ideas`
|
|
84
|
+
|
|
85
|
+
// Auto-detect mode
|
|
86
|
+
const sessionExists = fs.existsSync(sessionFolder)
|
|
87
|
+
const hasBrainstorm = sessionExists && fs.existsSync(brainstormPath)
|
|
88
|
+
|
|
89
|
+
const mode = hasBrainstorm ? 'continue' : 'new'
|
|
90
|
+
|
|
91
|
+
if (!sessionExists) {
|
|
92
|
+
bash(`mkdir -p ${sessionFolder}/ideas`)
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### Phase 1: Seed Understanding
|
|
99
|
+
|
|
100
|
+
#### Step 1.1: Parse Seed & Identify Dimensions
|
|
101
|
+
|
|
102
|
+
```javascript
|
|
103
|
+
// Brainstorm dimensions for multi-perspective analysis
|
|
104
|
+
const BRAINSTORM_DIMENSIONS = {
|
|
105
|
+
technical: ['技术', 'technical', 'implementation', 'code', '实现', 'architecture'],
|
|
106
|
+
ux: ['用户', 'user', 'experience', 'UX', 'UI', '体验', 'interaction'],
|
|
107
|
+
business: ['业务', 'business', 'value', 'ROI', '价值', 'market'],
|
|
108
|
+
innovation: ['创新', 'innovation', 'novel', 'creative', '新颖'],
|
|
109
|
+
feasibility: ['可行', 'feasible', 'practical', 'realistic', '实际'],
|
|
110
|
+
scalability: ['扩展', 'scale', 'growth', 'performance', '性能'],
|
|
111
|
+
security: ['安全', 'security', 'risk', 'protection', '风险']
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function identifyDimensions(topic) {
|
|
115
|
+
const text = topic.toLowerCase()
|
|
116
|
+
const matched = []
|
|
117
|
+
|
|
118
|
+
for (const [dimension, keywords] of Object.entries(BRAINSTORM_DIMENSIONS)) {
|
|
119
|
+
if (keywords.some(k => text.includes(k))) {
|
|
120
|
+
matched.push(dimension)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return matched.length > 0 ? matched : ['technical', 'innovation', 'feasibility']
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const dimensions = identifyDimensions("$TOPIC")
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### Step 1.2: Initial Scoping (New Session Only)
|
|
131
|
+
|
|
132
|
+
Ask user to scope the brainstorm:
|
|
133
|
+
|
|
134
|
+
- Focus areas: 技术方案 / 用户体验 / 创新突破 / 可行性评估
|
|
135
|
+
- Brainstorm depth: Quick Divergence / Balanced Exploration / Deep Dive
|
|
136
|
+
|
|
137
|
+
#### Step 1.3: Expand Seed into Exploration Vectors
|
|
138
|
+
|
|
139
|
+
Generate exploration vectors from seed idea:
|
|
140
|
+
|
|
141
|
+
1. Core question: What is the fundamental problem/opportunity?
|
|
142
|
+
2. User perspective: Who benefits and how?
|
|
143
|
+
3. Technical angle: What enables this technically?
|
|
144
|
+
4. Alternative approaches: What other ways could this be solved?
|
|
145
|
+
5. Challenges: What could go wrong or block success?
|
|
146
|
+
6. Innovation angle: What would make this 10x better?
|
|
147
|
+
7. Integration: How does this fit with existing systems/processes?
|
|
148
|
+
|
|
149
|
+
#### Step 1.4: Create/Update brainstorm.md
|
|
150
|
+
|
|
151
|
+
For new session:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
# Brainstorm Session
|
|
155
|
+
|
|
156
|
+
**Session ID**: ${sessionId}
|
|
157
|
+
**Topic**: $TOPIC
|
|
158
|
+
**Started**: ${getUtc8ISOString()}
|
|
159
|
+
**Dimensions**: ${dimensions.join(', ')}
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Initial Context
|
|
164
|
+
|
|
165
|
+
**Focus Areas**: ${userFocusAreas.join(', ')}
|
|
166
|
+
**Depth**: ${brainstormDepth}
|
|
167
|
+
**Constraints**: ${constraints.join(', ') || 'None specified'}
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Seed Expansion
|
|
172
|
+
|
|
173
|
+
### Original Idea
|
|
174
|
+
> $TOPIC
|
|
175
|
+
|
|
176
|
+
### Exploration Vectors
|
|
177
|
+
|
|
178
|
+
${explorationVectors.map((v, i) => `
|
|
179
|
+
#### Vector ${i+1}: ${v.title}
|
|
180
|
+
**Question**: ${v.question}
|
|
181
|
+
**Angle**: ${v.angle}
|
|
182
|
+
**Potential**: ${v.potential}
|
|
183
|
+
`).join('\n')}
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Thought Evolution Timeline
|
|
188
|
+
|
|
189
|
+
### Round 1 - Seed Understanding (${timestamp})
|
|
190
|
+
|
|
191
|
+
#### Initial Parsing
|
|
192
|
+
- **Core concept**: ${coreConcept}
|
|
193
|
+
- **Problem space**: ${problemSpace}
|
|
194
|
+
- **Opportunity**: ${opportunity}
|
|
195
|
+
|
|
196
|
+
#### Key Questions to Explore
|
|
197
|
+
${keyQuestions.map((q, i) => `${i+1}. ${q}`).join('\n')}
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Current Ideas
|
|
202
|
+
|
|
203
|
+
*To be populated after exploration phases*
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Idea Graveyard
|
|
208
|
+
|
|
209
|
+
*Discarded ideas with reasons - kept for reference*
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
For continue session, append:
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
### Round ${n} - Continuation (${timestamp})
|
|
216
|
+
|
|
217
|
+
#### Previous Context
|
|
218
|
+
|
|
219
|
+
Resuming brainstorm based on prior discussion.
|
|
220
|
+
|
|
221
|
+
#### New Focus
|
|
222
|
+
|
|
223
|
+
${newFocusFromUser}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### Phase 2: Divergent Exploration (Multi-Perspective)
|
|
229
|
+
|
|
230
|
+
#### Step 2.1: Creative Perspective Analysis
|
|
231
|
+
|
|
232
|
+
Explore from creative/innovative angle:
|
|
233
|
+
|
|
234
|
+
- Think beyond obvious solutions - what would be surprising/delightful?
|
|
235
|
+
- Cross-domain inspiration (what can we learn from other industries?)
|
|
236
|
+
- Challenge assumptions - what if the opposite were true?
|
|
237
|
+
- Generate 'moonshot' ideas alongside practical ones
|
|
238
|
+
- Consider future trends and emerging technologies
|
|
239
|
+
|
|
240
|
+
Output:
|
|
241
|
+
- 5+ creative ideas with brief descriptions
|
|
242
|
+
- Each idea rated: novelty (1-5), potential impact (1-5)
|
|
243
|
+
- Key assumptions challenged
|
|
244
|
+
- Cross-domain inspirations
|
|
245
|
+
- One 'crazy' idea that might just work
|
|
246
|
+
|
|
247
|
+
#### Step 2.2: Pragmatic Perspective Analysis
|
|
248
|
+
|
|
249
|
+
Evaluate from implementation reality:
|
|
250
|
+
|
|
251
|
+
- Technical feasibility of core concept
|
|
252
|
+
- Existing patterns/libraries that could help
|
|
253
|
+
- Integration with current codebase
|
|
254
|
+
- Implementation complexity estimates
|
|
255
|
+
- Potential technical blockers
|
|
256
|
+
- Incremental implementation approach
|
|
257
|
+
|
|
258
|
+
Output:
|
|
259
|
+
- 3-5 practical implementation approaches
|
|
260
|
+
- Each rated: effort (1-5), risk (1-5), reuse potential (1-5)
|
|
261
|
+
- Technical dependencies identified
|
|
262
|
+
- Quick wins vs long-term solutions
|
|
263
|
+
- Recommended starting point
|
|
264
|
+
|
|
265
|
+
#### Step 2.3: Systematic Perspective Analysis
|
|
266
|
+
|
|
267
|
+
Analyze from architectural standpoint:
|
|
268
|
+
|
|
269
|
+
- Decompose the problem into sub-problems
|
|
270
|
+
- Identify architectural patterns that apply
|
|
271
|
+
- Map dependencies and interactions
|
|
272
|
+
- Consider scalability implications
|
|
273
|
+
- Evaluate long-term maintainability
|
|
274
|
+
- Propose systematic solution structure
|
|
275
|
+
|
|
276
|
+
Output:
|
|
277
|
+
- Problem decomposition diagram (text)
|
|
278
|
+
- 2-3 architectural approaches with tradeoffs
|
|
279
|
+
- Dependency mapping
|
|
280
|
+
- Scalability assessment
|
|
281
|
+
- Recommended architecture pattern
|
|
282
|
+
- Risk matrix
|
|
283
|
+
|
|
284
|
+
#### Step 2.4: Aggregate Multi-Perspective Findings
|
|
285
|
+
|
|
286
|
+
```javascript
|
|
287
|
+
const perspectives = {
|
|
288
|
+
session_id: sessionId,
|
|
289
|
+
timestamp: getUtc8ISOString(),
|
|
290
|
+
topic: "$TOPIC",
|
|
291
|
+
|
|
292
|
+
creative: {
|
|
293
|
+
ideas: [...],
|
|
294
|
+
insights: [...],
|
|
295
|
+
challenges: [...]
|
|
296
|
+
},
|
|
297
|
+
|
|
298
|
+
pragmatic: {
|
|
299
|
+
approaches: [...],
|
|
300
|
+
blockers: [...],
|
|
301
|
+
recommendations: [...]
|
|
302
|
+
},
|
|
303
|
+
|
|
304
|
+
systematic: {
|
|
305
|
+
decomposition: [...],
|
|
306
|
+
patterns: [...],
|
|
307
|
+
tradeoffs: [...]
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
synthesis: {
|
|
311
|
+
convergent_themes: [],
|
|
312
|
+
conflicting_views: [],
|
|
313
|
+
unique_contributions: []
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
Write(perspectivesPath, JSON.stringify(perspectives, null, 2))
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
#### Step 2.5: Update brainstorm.md with Perspectives
|
|
321
|
+
|
|
322
|
+
```markdown
|
|
323
|
+
### Round 2 - Multi-Perspective Exploration (${timestamp})
|
|
324
|
+
|
|
325
|
+
#### Creative Perspective
|
|
326
|
+
|
|
327
|
+
**Top Creative Ideas**:
|
|
328
|
+
${creativeIdeas.map((idea, i) => `
|
|
329
|
+
${i+1}. **${idea.title}** ⭐ Novelty: ${idea.novelty}/5 | Impact: ${idea.impact}/5
|
|
330
|
+
${idea.description}
|
|
331
|
+
`).join('\n')}
|
|
332
|
+
|
|
333
|
+
**Challenged Assumptions**:
|
|
334
|
+
${challengedAssumptions.map(a => `- ~~${a.assumption}~~ → Consider: ${a.alternative}`).join('\n')}
|
|
335
|
+
|
|
336
|
+
**Cross-Domain Inspirations**:
|
|
337
|
+
${inspirations.map(i => `- ${i}`).join('\n')}
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
#### Pragmatic Perspective
|
|
342
|
+
|
|
343
|
+
**Implementation Approaches**:
|
|
344
|
+
${pragmaticApproaches.map((a, i) => `
|
|
345
|
+
${i+1}. **${a.title}** | Effort: ${a.effort}/5 | Risk: ${a.risk}/5
|
|
346
|
+
${a.description}
|
|
347
|
+
- Quick win: ${a.quickWin}
|
|
348
|
+
- Dependencies: ${a.dependencies.join(', ')}
|
|
349
|
+
`).join('\n')}
|
|
350
|
+
|
|
351
|
+
**Technical Blockers**:
|
|
352
|
+
${blockers.map(b => `- ⚠️ ${b}`).join('\n')}
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
#### Systematic Perspective
|
|
357
|
+
|
|
358
|
+
**Problem Decomposition**:
|
|
359
|
+
${decomposition}
|
|
360
|
+
|
|
361
|
+
**Architectural Options**:
|
|
362
|
+
${architecturalOptions.map((opt, i) => `
|
|
363
|
+
${i+1}. **${opt.pattern}**
|
|
364
|
+
- Pros: ${opt.pros.join(', ')}
|
|
365
|
+
- Cons: ${opt.cons.join(', ')}
|
|
366
|
+
- Best for: ${opt.bestFor}
|
|
367
|
+
`).join('\n')}
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
#### Perspective Synthesis
|
|
372
|
+
|
|
373
|
+
**Convergent Themes** (all perspectives agree):
|
|
374
|
+
${convergentThemes.map(t => `- ✅ ${t}`).join('\n')}
|
|
375
|
+
|
|
376
|
+
**Conflicting Views** (need resolution):
|
|
377
|
+
${conflictingViews.map(v => `
|
|
378
|
+
- 🔄 ${v.topic}
|
|
379
|
+
- Creative: ${v.creative}
|
|
380
|
+
- Pragmatic: ${v.pragmatic}
|
|
381
|
+
- Systematic: ${v.systematic}
|
|
382
|
+
`).join('\n')}
|
|
383
|
+
|
|
384
|
+
**Unique Contributions**:
|
|
385
|
+
${uniqueContributions.map(c => `- 💡 [${c.source}] ${c.insight}`).join('\n')}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
### Phase 3: Interactive Refinement (Multi-Round)
|
|
391
|
+
|
|
392
|
+
#### Step 3.1: Present & Select Directions
|
|
393
|
+
|
|
394
|
+
```javascript
|
|
395
|
+
const MAX_ROUNDS = 6
|
|
396
|
+
let roundNumber = 3 // After initial exploration
|
|
397
|
+
let brainstormComplete = false
|
|
398
|
+
|
|
399
|
+
while (!brainstormComplete && roundNumber <= MAX_ROUNDS) {
|
|
400
|
+
|
|
401
|
+
// Present current state
|
|
402
|
+
console.log(`
|
|
403
|
+
## Brainstorm Round ${roundNumber}
|
|
404
|
+
|
|
405
|
+
### Top Ideas So Far
|
|
406
|
+
|
|
407
|
+
${topIdeas.map((idea, i) => `
|
|
408
|
+
${i+1}. **${idea.title}** (${idea.source})
|
|
409
|
+
${idea.brief}
|
|
410
|
+
- Novelty: ${'⭐'.repeat(idea.novelty)} | Feasibility: ${'✅'.repeat(idea.feasibility)}
|
|
411
|
+
`).join('\n')}
|
|
412
|
+
|
|
413
|
+
### Open Questions
|
|
414
|
+
${openQuestions.map((q, i) => `${i+1}. ${q}`).join('\n')}
|
|
415
|
+
`)
|
|
416
|
+
|
|
417
|
+
// Gather user direction - options:
|
|
418
|
+
// - 深入探索: Deep dive on selected ideas
|
|
419
|
+
// - 继续发散: Generate more ideas
|
|
420
|
+
// - 挑战验证: Devil's advocate challenge
|
|
421
|
+
// - 合并综合: Merge multiple ideas
|
|
422
|
+
// - 准备收敛: Start concluding
|
|
423
|
+
|
|
424
|
+
// Process based on direction and update brainstorm.md
|
|
425
|
+
roundNumber++
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
#### Step 3.2: Deep Dive on Selected Ideas
|
|
430
|
+
|
|
431
|
+
For each selected idea, create dedicated idea file:
|
|
432
|
+
|
|
433
|
+
```javascript
|
|
434
|
+
async function deepDiveIdea(idea) {
|
|
435
|
+
const ideaPath = `${ideasFolder}/${idea.slug}.md`
|
|
436
|
+
|
|
437
|
+
// Deep dive analysis:
|
|
438
|
+
// - Elaborate the core concept in detail
|
|
439
|
+
// - Identify implementation requirements
|
|
440
|
+
// - List potential challenges and mitigations
|
|
441
|
+
// - Suggest proof-of-concept approach
|
|
442
|
+
// - Define success metrics
|
|
443
|
+
// - Map related/dependent features
|
|
444
|
+
|
|
445
|
+
// Output:
|
|
446
|
+
// - Detailed concept description
|
|
447
|
+
// - Technical requirements list
|
|
448
|
+
// - Risk/challenge matrix
|
|
449
|
+
// - MVP definition
|
|
450
|
+
// - Success criteria
|
|
451
|
+
// - Recommendation: pursue/pivot/park
|
|
452
|
+
|
|
453
|
+
Write(ideaPath, deepDiveContent)
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
#### Step 3.3: Devil's Advocate Challenge
|
|
458
|
+
|
|
459
|
+
For each idea, identify:
|
|
460
|
+
- 3 strongest objections
|
|
461
|
+
- Challenge core assumptions
|
|
462
|
+
- Scenarios where this fails
|
|
463
|
+
- Competitive/alternative solutions
|
|
464
|
+
- Whether this solves the right problem
|
|
465
|
+
- Survivability rating after challenge (1-5)
|
|
466
|
+
|
|
467
|
+
Output:
|
|
468
|
+
- Per-idea challenge report
|
|
469
|
+
- Critical weaknesses exposed
|
|
470
|
+
- Counter-arguments to objections (if any)
|
|
471
|
+
- Ideas that survive the challenge
|
|
472
|
+
- Modified/strengthened versions
|
|
473
|
+
|
|
474
|
+
#### Step 3.4: Merge & Synthesize Ideas
|
|
475
|
+
|
|
476
|
+
When merging selected ideas:
|
|
477
|
+
- Identify complementary elements
|
|
478
|
+
- Resolve contradictions
|
|
479
|
+
- Create unified concept
|
|
480
|
+
- Preserve key strengths from each
|
|
481
|
+
- Describe the merged solution
|
|
482
|
+
- Assess viability of merged idea
|
|
483
|
+
|
|
484
|
+
Output:
|
|
485
|
+
- Merged concept description
|
|
486
|
+
- Elements taken from each source idea
|
|
487
|
+
- Contradictions resolved (or noted as tradeoffs)
|
|
488
|
+
- New combined strengths
|
|
489
|
+
- Implementation considerations
|
|
490
|
+
|
|
491
|
+
#### Step 3.5: Document Each Round
|
|
492
|
+
|
|
493
|
+
Append to brainstorm.md:
|
|
494
|
+
|
|
495
|
+
```markdown
|
|
496
|
+
### Round ${n} - ${roundType} (${timestamp})
|
|
497
|
+
|
|
498
|
+
#### User Direction
|
|
499
|
+
- **Selected ideas**: ${selectedIdeas.join(', ')}
|
|
500
|
+
- **Action**: ${action}
|
|
501
|
+
- **Reasoning**: ${userReasoning || 'Not specified'}
|
|
502
|
+
|
|
503
|
+
${roundType === 'deep-dive' ? `
|
|
504
|
+
#### Deep Dive: ${ideaTitle}
|
|
505
|
+
|
|
506
|
+
**Elaborated Concept**:
|
|
507
|
+
${elaboratedConcept}
|
|
508
|
+
|
|
509
|
+
**Implementation Requirements**:
|
|
510
|
+
${requirements.map(r => `- ${r}`).join('\n')}
|
|
511
|
+
|
|
512
|
+
**Challenges & Mitigations**:
|
|
513
|
+
${challenges.map(c => `- ⚠️ ${c.challenge} → ✅ ${c.mitigation}`).join('\n')}
|
|
514
|
+
|
|
515
|
+
**MVP Definition**:
|
|
516
|
+
${mvpDefinition}
|
|
517
|
+
|
|
518
|
+
**Recommendation**: ${recommendation}
|
|
519
|
+
` : ''}
|
|
520
|
+
|
|
521
|
+
${roundType === 'challenge' ? `
|
|
522
|
+
#### Devil's Advocate Results
|
|
523
|
+
|
|
524
|
+
**Challenges Raised**:
|
|
525
|
+
${challenges.map(c => `
|
|
526
|
+
- 🔴 **${c.idea}**: ${c.objection}
|
|
527
|
+
- Counter: ${c.counter || 'No strong counter-argument'}
|
|
528
|
+
- Survivability: ${c.survivability}/5
|
|
529
|
+
`).join('\n')}
|
|
530
|
+
|
|
531
|
+
**Ideas That Survived**:
|
|
532
|
+
${survivedIdeas.map(i => `- ✅ ${i}`).join('\n')}
|
|
533
|
+
|
|
534
|
+
**Eliminated/Parked**:
|
|
535
|
+
${eliminatedIdeas.map(i => `- ❌ ${i.title}: ${i.reason}`).join('\n')}
|
|
536
|
+
` : ''}
|
|
537
|
+
|
|
538
|
+
${roundType === 'merge' ? `
|
|
539
|
+
#### Merged Idea: ${mergedIdea.title}
|
|
540
|
+
|
|
541
|
+
**Source Ideas Combined**:
|
|
542
|
+
${sourceIdeas.map(i => `- ${i}`).join('\n')}
|
|
543
|
+
|
|
544
|
+
**Unified Concept**:
|
|
545
|
+
${mergedIdea.description}
|
|
546
|
+
|
|
547
|
+
**Key Elements Preserved**:
|
|
548
|
+
${preservedElements.map(e => `- ✅ ${e}`).join('\n')}
|
|
549
|
+
|
|
550
|
+
**Tradeoffs Accepted**:
|
|
551
|
+
${tradeoffs.map(t => `- ⚖️ ${t}`).join('\n')}
|
|
552
|
+
` : ''}
|
|
553
|
+
|
|
554
|
+
#### Updated Idea Ranking
|
|
555
|
+
|
|
556
|
+
${updatedRanking.map((idea, i) => `
|
|
557
|
+
${i+1}. **${idea.title}** ${idea.status}
|
|
558
|
+
- Score: ${idea.score}/10
|
|
559
|
+
- Source: ${idea.source}
|
|
560
|
+
`).join('\n')}
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
### Phase 4: Convergence & Crystallization
|
|
566
|
+
|
|
567
|
+
#### Step 4.1: Final Synthesis
|
|
568
|
+
|
|
569
|
+
```javascript
|
|
570
|
+
const synthesis = {
|
|
571
|
+
session_id: sessionId,
|
|
572
|
+
topic: "$TOPIC",
|
|
573
|
+
completed: getUtc8ISOString(),
|
|
574
|
+
total_rounds: roundNumber,
|
|
575
|
+
|
|
576
|
+
// Top ideas with full details
|
|
577
|
+
top_ideas: ideas.filter(i => i.status === 'active').sort((a,b) => b.score - a.score).slice(0, 5).map(idea => ({
|
|
578
|
+
title: idea.title,
|
|
579
|
+
description: idea.description,
|
|
580
|
+
source_perspective: idea.source,
|
|
581
|
+
score: idea.score,
|
|
582
|
+
novelty: idea.novelty,
|
|
583
|
+
feasibility: idea.feasibility,
|
|
584
|
+
key_strengths: idea.strengths,
|
|
585
|
+
main_challenges: idea.challenges,
|
|
586
|
+
next_steps: idea.nextSteps
|
|
587
|
+
})),
|
|
588
|
+
|
|
589
|
+
// Parked ideas for future reference
|
|
590
|
+
parked_ideas: ideas.filter(i => i.status === 'parked').map(idea => ({
|
|
591
|
+
title: idea.title,
|
|
592
|
+
reason_parked: idea.parkReason,
|
|
593
|
+
potential_future_trigger: idea.futureTrigger
|
|
594
|
+
})),
|
|
595
|
+
|
|
596
|
+
// Key insights from the process
|
|
597
|
+
key_insights: keyInsights,
|
|
598
|
+
|
|
599
|
+
// Recommendations
|
|
600
|
+
recommendations: {
|
|
601
|
+
primary: primaryRecommendation,
|
|
602
|
+
alternatives: alternativeApproaches,
|
|
603
|
+
not_recommended: notRecommended
|
|
604
|
+
},
|
|
605
|
+
|
|
606
|
+
// Follow-up suggestions
|
|
607
|
+
follow_up: [
|
|
608
|
+
{ type: 'implementation', summary: '...' },
|
|
609
|
+
{ type: 'research', summary: '...' },
|
|
610
|
+
{ type: 'validation', summary: '...' }
|
|
611
|
+
]
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
Write(synthesisPath, JSON.stringify(synthesis, null, 2))
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
#### Step 4.2: Final brainstorm.md Update
|
|
618
|
+
|
|
619
|
+
```markdown
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
## Synthesis & Conclusions (${timestamp})
|
|
623
|
+
|
|
624
|
+
### Executive Summary
|
|
625
|
+
|
|
626
|
+
${executiveSummary}
|
|
627
|
+
|
|
628
|
+
### Top Ideas (Final Ranking)
|
|
629
|
+
|
|
630
|
+
${topIdeas.map((idea, i) => `
|
|
631
|
+
#### ${i+1}. ${idea.title} ⭐ Score: ${idea.score}/10
|
|
632
|
+
|
|
633
|
+
**Description**: ${idea.description}
|
|
634
|
+
|
|
635
|
+
**Why This Idea**:
|
|
636
|
+
${idea.strengths.map(s => `- ✅ ${s}`).join('\n')}
|
|
637
|
+
|
|
638
|
+
**Main Challenges**:
|
|
639
|
+
${idea.challenges.map(c => `- ⚠️ ${c}`).join('\n')}
|
|
640
|
+
|
|
641
|
+
**Recommended Next Steps**:
|
|
642
|
+
${idea.nextSteps.map((s, j) => `${j+1}. ${s}`).join('\n')}
|
|
643
|
+
|
|
644
|
+
---
|
|
645
|
+
`).join('\n')}
|
|
646
|
+
|
|
647
|
+
### Primary Recommendation
|
|
648
|
+
|
|
649
|
+
> ${primaryRecommendation}
|
|
650
|
+
|
|
651
|
+
**Rationale**: ${primaryRationale}
|
|
652
|
+
|
|
653
|
+
**Quick Start Path**:
|
|
654
|
+
1. ${step1}
|
|
655
|
+
2. ${step2}
|
|
656
|
+
3. ${step3}
|
|
657
|
+
|
|
658
|
+
### Alternative Approaches
|
|
659
|
+
|
|
660
|
+
${alternatives.map((alt, i) => `
|
|
661
|
+
${i+1}. **${alt.title}**
|
|
662
|
+
- When to consider: ${alt.whenToConsider}
|
|
663
|
+
- Tradeoff: ${alt.tradeoff}
|
|
664
|
+
`).join('\n')}
|
|
665
|
+
|
|
666
|
+
### Ideas Parked for Future
|
|
667
|
+
|
|
668
|
+
${parkedIdeas.map(idea => `
|
|
669
|
+
- **${idea.title}** (Parked: ${idea.reason})
|
|
670
|
+
- Revisit when: ${idea.futureTrigger}
|
|
671
|
+
`).join('\n')}
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
675
|
+
## Key Insights
|
|
676
|
+
|
|
677
|
+
### Process Discoveries
|
|
678
|
+
|
|
679
|
+
${processDiscoveries.map(d => `- 💡 ${d}`).join('\n')}
|
|
680
|
+
|
|
681
|
+
### Assumptions Challenged
|
|
682
|
+
|
|
683
|
+
${challengedAssumptions.map(a => `- ~~${a.original}~~ → ${a.updated}`).join('\n')}
|
|
684
|
+
|
|
685
|
+
### Unexpected Connections
|
|
686
|
+
|
|
687
|
+
${unexpectedConnections.map(c => `- 🔗 ${c}`).join('\n')}
|
|
688
|
+
|
|
689
|
+
---
|
|
690
|
+
|
|
691
|
+
## Current Understanding (Final)
|
|
692
|
+
|
|
693
|
+
### Problem Reframed
|
|
694
|
+
|
|
695
|
+
${reframedProblem}
|
|
696
|
+
|
|
697
|
+
### Solution Space Mapped
|
|
698
|
+
|
|
699
|
+
${solutionSpaceMap}
|
|
700
|
+
|
|
701
|
+
### Decision Framework
|
|
702
|
+
|
|
703
|
+
When to choose each approach:
|
|
704
|
+
${decisionFramework}
|
|
705
|
+
|
|
706
|
+
---
|
|
707
|
+
|
|
708
|
+
## Session Statistics
|
|
709
|
+
|
|
710
|
+
- **Total Rounds**: ${totalRounds}
|
|
711
|
+
- **Ideas Generated**: ${totalIdeas}
|
|
712
|
+
- **Ideas Survived**: ${survivedIdeas}
|
|
713
|
+
- **Perspectives Used**: Creative, Pragmatic, Systematic
|
|
714
|
+
- **Duration**: ${duration}
|
|
715
|
+
- **Artifacts**: brainstorm.md, perspectives.json, synthesis.json, ${ideaFiles.length} idea deep-dives
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
#### Step 4.3: Post-Completion Options
|
|
719
|
+
|
|
720
|
+
Offer follow-up options:
|
|
721
|
+
- Create Implementation Plan: Convert best idea to implementation plan
|
|
722
|
+
- Create Issue: Turn ideas into trackable issues
|
|
723
|
+
- Deep Analysis: Run detailed technical analysis on an idea
|
|
724
|
+
- Export Report: Generate shareable report
|
|
725
|
+
- Complete: No further action needed
|
|
726
|
+
|
|
727
|
+
---
|
|
728
|
+
|
|
729
|
+
## Session Folder Structure
|
|
730
|
+
|
|
731
|
+
```
|
|
732
|
+
.workflow/.brainstorm/BS-{slug}-{date}/
|
|
733
|
+
├── brainstorm.md # Complete thought evolution
|
|
734
|
+
├── perspectives.json # Multi-perspective analysis findings
|
|
735
|
+
├── synthesis.json # Final synthesis
|
|
736
|
+
└── ideas/ # Individual idea deep-dives
|
|
737
|
+
├── idea-1.md
|
|
738
|
+
├── idea-2.md
|
|
739
|
+
└── merged-idea-1.md
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
## Brainstorm Document Template
|
|
743
|
+
|
|
744
|
+
```markdown
|
|
745
|
+
# Brainstorm Session
|
|
746
|
+
|
|
747
|
+
**Session ID**: BS-xxx-2025-01-28
|
|
748
|
+
**Topic**: [idea or topic]
|
|
749
|
+
**Started**: 2025-01-28T10:00:00+08:00
|
|
750
|
+
**Dimensions**: [technical, ux, innovation, ...]
|
|
751
|
+
|
|
752
|
+
---
|
|
753
|
+
|
|
754
|
+
## Initial Context
|
|
755
|
+
|
|
756
|
+
**Focus Areas**: [selected focus areas]
|
|
757
|
+
**Depth**: [quick|balanced|deep]
|
|
758
|
+
**Constraints**: [if any]
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
762
|
+
## Seed Expansion
|
|
763
|
+
|
|
764
|
+
### Original Idea
|
|
765
|
+
> [the initial idea]
|
|
766
|
+
|
|
767
|
+
### Exploration Vectors
|
|
768
|
+
[generated questions and directions]
|
|
769
|
+
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
## Thought Evolution Timeline
|
|
773
|
+
|
|
774
|
+
### Round 1 - Seed Understanding
|
|
775
|
+
...
|
|
776
|
+
|
|
777
|
+
### Round 2 - Multi-Perspective Exploration
|
|
778
|
+
|
|
779
|
+
#### Creative Perspective
|
|
780
|
+
...
|
|
781
|
+
|
|
782
|
+
#### Pragmatic Perspective
|
|
783
|
+
...
|
|
784
|
+
|
|
785
|
+
#### Systematic Perspective
|
|
786
|
+
...
|
|
787
|
+
|
|
788
|
+
#### Perspective Synthesis
|
|
789
|
+
...
|
|
790
|
+
|
|
791
|
+
### Round 3 - Deep Dive
|
|
792
|
+
...
|
|
793
|
+
|
|
794
|
+
### Round 4 - Challenge
|
|
795
|
+
...
|
|
796
|
+
|
|
797
|
+
---
|
|
798
|
+
|
|
799
|
+
## Synthesis & Conclusions
|
|
800
|
+
|
|
801
|
+
### Executive Summary
|
|
802
|
+
...
|
|
803
|
+
|
|
804
|
+
### Top Ideas (Final Ranking)
|
|
805
|
+
...
|
|
806
|
+
|
|
807
|
+
### Primary Recommendation
|
|
808
|
+
...
|
|
809
|
+
|
|
810
|
+
---
|
|
811
|
+
|
|
812
|
+
## Key Insights
|
|
813
|
+
...
|
|
814
|
+
|
|
815
|
+
---
|
|
816
|
+
|
|
817
|
+
## Current Understanding (Final)
|
|
818
|
+
...
|
|
819
|
+
|
|
820
|
+
---
|
|
821
|
+
|
|
822
|
+
## Session Statistics
|
|
823
|
+
...
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
## Multi-Perspective Analysis Strategy
|
|
827
|
+
|
|
828
|
+
### Perspective Roles
|
|
829
|
+
|
|
830
|
+
| Perspective | Focus | Best For |
|
|
831
|
+
|-------------|-------|----------|
|
|
832
|
+
| Creative | Innovation, cross-domain | Generating novel ideas |
|
|
833
|
+
| Pragmatic | Implementation, feasibility | Reality-checking ideas |
|
|
834
|
+
| Systematic | Architecture, structure | Organizing solutions |
|
|
835
|
+
|
|
836
|
+
### Analysis Patterns
|
|
837
|
+
|
|
838
|
+
1. **Parallel Divergence**: All perspectives explore simultaneously from different angles
|
|
839
|
+
2. **Sequential Deep-Dive**: One perspective expands, others critique/refine
|
|
840
|
+
3. **Debate Mode**: Perspectives argue for/against specific approaches
|
|
841
|
+
4. **Synthesis Mode**: Combine insights from all perspectives
|
|
842
|
+
|
|
843
|
+
### When to Use Each Pattern
|
|
844
|
+
|
|
845
|
+
- **New topic**: Parallel Divergence → get diverse initial ideas
|
|
846
|
+
- **Promising idea**: Sequential Deep-Dive → thorough exploration
|
|
847
|
+
- **Controversial approach**: Debate Mode → uncover hidden issues
|
|
848
|
+
- **Ready to decide**: Synthesis Mode → create actionable conclusion
|
|
849
|
+
|
|
850
|
+
## Consolidation Rules
|
|
851
|
+
|
|
852
|
+
When updating "Current Understanding":
|
|
853
|
+
|
|
854
|
+
1. **Promote confirmed insights**: Move validated findings to "What We Established"
|
|
855
|
+
2. **Track corrections**: Keep important wrong→right transformations
|
|
856
|
+
3. **Focus on current state**: What do we know NOW
|
|
857
|
+
4. **Avoid timeline repetition**: Don't copy discussion details
|
|
858
|
+
5. **Preserve key learnings**: Keep insights valuable for future reference
|
|
859
|
+
|
|
860
|
+
**Bad (cluttered)**:
|
|
861
|
+
```markdown
|
|
862
|
+
## Current Understanding
|
|
863
|
+
|
|
864
|
+
In round 1 we discussed X, then in round 2 user said Y, and we explored Z...
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
**Good (consolidated)**:
|
|
868
|
+
```markdown
|
|
869
|
+
## Current Understanding
|
|
870
|
+
|
|
871
|
+
### Problem Reframed
|
|
872
|
+
The core challenge is not X but actually Y because...
|
|
873
|
+
|
|
874
|
+
### Solution Space Mapped
|
|
875
|
+
Three viable approaches emerged: A (creative), B (pragmatic), C (hybrid)
|
|
876
|
+
|
|
877
|
+
### Decision Framework
|
|
878
|
+
- Choose A when: innovation is priority
|
|
879
|
+
- Choose B when: time-to-market matters
|
|
880
|
+
- Choose C when: balanced approach needed
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
## Error Handling
|
|
884
|
+
|
|
885
|
+
| Situation | Action |
|
|
886
|
+
|-----------|--------|
|
|
887
|
+
| Analysis timeout | Retry with focused scope, or continue without that perspective |
|
|
888
|
+
| No good ideas | Reframe the problem, adjust constraints, try different angles |
|
|
889
|
+
| User disengaged | Summarize progress, offer break point with resume option |
|
|
890
|
+
| Perspectives conflict | Present as tradeoff, let user decide direction |
|
|
891
|
+
| Max rounds reached | Force synthesis, highlight unresolved questions |
|
|
892
|
+
| All ideas fail challenge | Return to divergent phase with new constraints |
|
|
893
|
+
| Session folder conflict | Append timestamp suffix |
|
|
894
|
+
|
|
895
|
+
## Iteration Flow
|
|
896
|
+
|
|
897
|
+
```
|
|
898
|
+
First Call (TOPIC="topic"):
|
|
899
|
+
├─ No session exists → New mode
|
|
900
|
+
├─ Identify brainstorm dimensions
|
|
901
|
+
├─ Scope with user
|
|
902
|
+
├─ Create brainstorm.md with initial understanding
|
|
903
|
+
├─ Expand seed into exploration vectors
|
|
904
|
+
├─ Launch multi-perspective exploration
|
|
905
|
+
└─ Enter refinement loop
|
|
906
|
+
|
|
907
|
+
Continue Call (TOPIC="topic"):
|
|
908
|
+
├─ Session exists → Continue mode
|
|
909
|
+
├─ Load brainstorm.md
|
|
910
|
+
├─ Resume from last round
|
|
911
|
+
└─ Continue refinement loop
|
|
912
|
+
|
|
913
|
+
Refinement Loop:
|
|
914
|
+
├─ Present current findings and top ideas
|
|
915
|
+
├─ Gather user feedback
|
|
916
|
+
├─ Process response:
|
|
917
|
+
│ ├─ Deep dive → Explore selected ideas in depth
|
|
918
|
+
│ ├─ Diverge → Generate more ideas
|
|
919
|
+
│ ├─ Challenge → Devil's advocate testing
|
|
920
|
+
│ ├─ Merge → Combine multiple ideas
|
|
921
|
+
│ └─ Converge → Exit loop for synthesis
|
|
922
|
+
├─ Update brainstorm.md
|
|
923
|
+
└─ Repeat until complete or max rounds
|
|
924
|
+
|
|
925
|
+
Completion:
|
|
926
|
+
├─ Generate synthesis.json
|
|
927
|
+
├─ Update brainstorm.md with final synthesis
|
|
928
|
+
└─ Offer follow-up options
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
---
|
|
932
|
+
|
|
933
|
+
**Now execute the brainstorm-with-file workflow for topic**: $TOPIC
|