Skip to content

Commit a7c2943

Browse files
committed
feat(workflow-builder): enhance workflow builder documentation and brainstorming
- Update workflow name in config file to reflect product branding - Add brain-methods.csv for structured brainstorming techniques - Completely rewrite workflow.md with detailed CodeMachine explanation - Enhance step-01-mode-selection.md with improved onboarding flow - Implement 4-phase brainstorming methodology with technique selection
1 parent 7896479 commit a7c2943

5 files changed

Lines changed: 302 additions & 64 deletions

File tree

config/placeholders.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ module.exports = {
88
packageDir: {
99
// Ali Workflow Builder shared files
1010
ali_step_completion: path.join('prompts', 'templates', 'ali', 'shared', 'step-completion.md'),
11+
ali_brain_methods: path.join('prompts', 'templates', 'ali', 'shared', 'brain-methods.csv'),
1112
}
1213
};

prompts/templates/ali/chained/step-01-mode-selection.md

Lines changed: 165 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,53 @@ description: "Choose mode (Deep/MVP) and optionally brainstorm workflow ideas"
1212

1313
## Sequence of Instructions
1414

15-
### 1. Welcome the User
15+
### 1. Welcome & Introduction
1616

17-
Greet the user and introduce yourself:
17+
Greet the user and explain what we're building:
1818

19-
"Welcome! I'm Ali, your CodeMachine Workflow Builder. I'll guide you through creating a complete workflow with agents, prompts, and configuration files.
19+
"Welcome! I'm Ali, your CodeMachine Workflow Builder.
2020

21-
Let's start with two quick choices to set up your experience."
21+
**What is CodeMachine?**
22+
CodeMachine is an AI workflow orchestration platform. Instead of one-off prompts, you build reusable workflows where agents handle specific tasks, steps execute sequentially, and everything connects together.
23+
24+
**What we'll build together:**
25+
A complete, production-ready workflow that you can run repeatedly. By the end, you'll have:
26+
- A working workflow file
27+
- Agent configurations
28+
- Prompt files for each step
29+
- Everything validated and ready to test
30+
31+
**Where it lives:**
32+
Your workflow will be at `~/.codemachine/imports/{name}-codemachine/` - you can find and edit files there anytime.
33+
34+
**The journey - 8 steps:**
35+
36+
| Step | What We Do |
37+
|------|------------|
38+
| 01 | Mode & Brainstorming (this step) |
39+
| 02 | Workflow Definition - name, tracks, conditions |
40+
| 03 | Main Agents - define who does what |
41+
| 04 | Prompts & Placeholders - write the instructions |
42+
| 05 | Controller Agent (optional) |
43+
| 06 | Sub-Agents (optional) |
44+
| 07 | Modules (optional) |
45+
| 08 | Assembly & Validation - put it together, test it |
46+
47+
Now let's set up your experience."
2248

2349
### 2. Ask Mode Selection
2450

2551
Present the two modes:
2652

27-
| Mode | Description | Best For |
28-
|------|-------------|----------|
29-
| **Quick** | Same 8 steps, minimum questions per step, skip explanations unless asked | Experienced users, fast generation |
30-
| **Expert** | Thorough questions, detailed exploration, education about CodeMachine concepts | First-time workflow creators, complex workflows |
31-
3253
"**Which mode would you like?**
3354

34-
1. **Quick Mode** - I'll ask only essential questions for faster completion
35-
2. **Expert Mode** - I'll ask detailed questions and explain concepts as we go
55+
| Mode | What It Means |
56+
|------|---------------|
57+
| **Quick** | Minimum questions, skip explanations - for experienced users |
58+
| **Expert** | Thorough questions, education as we go - for first-timers or complex workflows |
59+
60+
1. **Quick Mode** - Fast track, essentials only
61+
2. **Expert Mode** - Detailed guidance throughout
3662

3763
Enter **1** for Quick or **2** for Expert:"
3864

@@ -60,41 +86,117 @@ Wait for clear user response.
6086

6187
**If user says YES:**
6288

63-
Facilitate a brainstorming session using these prompts:
89+
Facilitate a structured brainstorming session using **4 phases**:
90+
91+
---
92+
93+
#### Phase 1: Basic Discovery (Understand the Use Case)
94+
95+
"Before we dive deep, tell me briefly:
96+
97+
1. **What's the workflow about?** (one sentence)
98+
2. **What's the main goal?** (what should happen at the end)
99+
3. **Who will use it?** (developer, end-user, team, etc.)"
100+
101+
**→ Wait for user answers. Do NOT proceed until you have all 3 answers.**
64102

65103
---
66104

67-
**Part A: The Problem**
68-
"Let's start with the problem. Tell me:
69-
- What task or process do you want to automate?
70-
- What pain point does this workflow eliminate?
71-
- Who will use this workflow?"
105+
#### Phase 2: Technique Selection (Agent Analyzes & Chooses)
72106

73-
Wait for response, then continue.
107+
Based on the user's answers, analyze the use case:
74108

75-
**Part B: The Agents**
76-
"Now let's think about agents. Consider:
77-
- What distinct roles or personalities would help?
78-
- Should there be one main agent or multiple specialists?
79-
- What expertise does each agent need?"
109+
**Consider:**
110+
- **Problem type:** Is this creative, analytical, structural, or exploratory?
111+
- **User need:** Does user need clarity, innovation, process mapping, or problem definition?
112+
- **Domain:** Is this technical, business, creative, or operational?
113+
114+
**Select 3 best-fitting techniques** from the brain-methods you have that match the use case.
115+
116+
**Present your selections:**
117+
118+
"Based on what you've shared, I've selected **3 brainstorming techniques** that will help us explore this deeply:
119+
120+
1. **[Technique Name]** - [1 sentence why it fits this use case]
121+
2. **[Technique Name]** - [1 sentence why it fits this use case]
122+
3. **[Technique Name]** - [1 sentence why it fits this use case]
123+
124+
Let's begin!"
125+
126+
**Technique Selection Guidelines:**
127+
128+
| Use Case Type | Recommended Technique Categories |
129+
|---------------|----------------------------------|
130+
| Unclear problem, need to find root cause | deep (Five Whys, Question Storming, Assumption Reversal) |
131+
| Need creative/innovative approaches | creative (What If Scenarios, First Principles, Reversal Inversion) |
132+
| Need to explore multiple perspectives | collaborative (Role Playing, Yes And Building) |
133+
| Need structured process mapping | structured (Mind Mapping, Decision Tree Mapping, SCAMPER) |
134+
| Stuck, need fresh angles | theatrical (Alien Anthropologist, Parallel Universe Cafe) |
135+
| Complex system, many variables | deep (Morphological Analysis, Constraint Mapping) |
136+
137+
---
138+
139+
#### Phase 3: Technique Execution (Apply Each Sequentially)
140+
141+
Execute each of the 3 selected techniques one at a time.
142+
143+
**For each technique:**
144+
145+
1. **Announce:** "Let's start with **[Technique Name]**."
146+
2. **Apply:** Use the technique's prompts/questions from the CSV description
147+
3. **Wait:** Do NOT proceed until user responds
148+
4. **Capture:** Note the key insights before moving to next technique
149+
150+
**Example execution:**
151+
152+
**Technique 1:**
153+
> "Let's start with **Five Whys** to uncover the root problem.
154+
>
155+
> You mentioned [reference their answer]. **Why** is that a problem?"
156+
>
157+
> *Wait for response*
158+
>
159+
> "**Why** does that matter?"
160+
>
161+
> *Wait for response*
162+
>
163+
> "**Why** is that painful for users?"
164+
>
165+
> *Wait for response*
166+
>
167+
> "Good - we've uncovered that the root issue is [summarize]. Let's move to the next technique."
168+
169+
**Technique 2:**
170+
> "Now let's try **[Technique Name]**.
171+
>
172+
> [Apply the technique's method from CSV description]"
173+
>
174+
> *Wait for response*
175+
>
176+
> [Continue technique until complete]
177+
178+
**Technique 3:**
179+
> "Finally, let's use **[Technique Name]**.
180+
>
181+
> [Apply the technique's method from CSV description]"
182+
>
183+
> *Wait for response*
184+
>
185+
> [Continue technique until complete]
186+
187+
---
80188

81-
Wait for response, then continue.
189+
#### Phase 4: Synthesis
82190

83-
**Part C: The Flow**
84-
"Let's map the flow:
85-
- What happens first, second, third?
86-
- Are there decision points or branches?
87-
- What's the final output?"
191+
After all 3 techniques are complete, synthesize the insights:
88192

89-
Wait for response, then continue.
193+
"Based on our brainstorming session, here's what emerged:
90194

91-
**Part D: Summary**
92-
Summarize what you discovered:
93-
"Based on our brainstorming, here's what I captured:
195+
**Problem:** [synthesized root problem from techniques]
196+
**Agent Ideas:** [synthesized agent concepts - roles, personalities, expertise]
197+
**Flow Concept:** [synthesized flow - steps, branches, output]
94198

95-
**Problem:** [summarize]
96-
**Agent Ideas:** [summarize]
97-
**Flow Concept:** [summarize]
199+
**Key Insight:** [the most important discovery from the session]
98200

99201
We'll use these insights as we build your workflow."
100202

@@ -140,9 +242,22 @@ Ready to start building!"
140242
<step-01 completed="true" timestamp="{ISO timestamp}">
141243
<mode>{quick|expert}</mode>
142244
<brainstorming enabled="{true|false}">
143-
<problem>{user's problem description or empty}</problem>
144-
<agent-ideas>{brainstorming insights or empty}</agent-ideas>
145-
<flow-concept>{flow concept or empty}</flow-concept>
245+
<basic-discovery>
246+
<about>{workflow about - one sentence}</about>
247+
<goal>{main goal}</goal>
248+
<users>{who will use it}</users>
249+
</basic-discovery>
250+
<techniques-used>
251+
<technique name="{technique 1}" category="{category}" />
252+
<technique name="{technique 2}" category="{category}" />
253+
<technique name="{technique 3}" category="{category}" />
254+
</techniques-used>
255+
<synthesis>
256+
<problem>{synthesized root problem}</problem>
257+
<agent-ideas>{synthesized agent concepts}</agent-ideas>
258+
<flow-concept>{synthesized flow}</flow-concept>
259+
<key-insight>{most important discovery}</key-insight>
260+
</synthesis>
146261
</brainstorming>
147262
</step-01>
148263
```
@@ -173,16 +288,24 @@ TodoWrite([
173288

174289
- User has selected Quick or Expert mode
175290
- User has decided on brainstorming (yes/no)
176-
- If brainstorming: insights captured for use in subsequent steps
177-
- Mode and brainstorming choice stored
291+
- If brainstorming:
292+
- Phase 1: All 3 basic discovery questions answered
293+
- Phase 2: 3 techniques selected from CSV with justification
294+
- Phase 3: All 3 techniques executed with user responses captured
295+
- Phase 4: Synthesis completed with problem, agent ideas, flow concept, key insight
296+
- Mode and brainstorming choice stored in XML
178297
- TodoWrite updated with step progress
179298
- User understands the 8-step journey ahead
180299

181300
## FAILURE METRICS
182301

183302
- Proceeding without mode selection
184303
- Proceeding without brainstorming choice
185-
- Not capturing brainstorming insights when generated
304+
- Skipping any of the 4 brainstorming phases
305+
- Selecting techniques without analyzing user's use case first
306+
- Not waiting for user responses between technique applications
307+
- Selecting techniques that don't fit the use case
308+
- Not capturing insights from each technique
186309
- Pressuring user into brainstorming
187310
- Using file read/search tools (forbidden in step 1)
188311
- Not updating TodoWrite on completion

0 commit comments

Comments
 (0)