Skip to content

Commit 971316a

Browse files
committed
Refactor workflow options and steps to introduce Quick and Expert modes
- Updated the main question prompt to clarify workflow building modes. - Reorganized workflow options into 'Quick Mode' for speed and 'Expert Mode' for complexity. - Added a new condition group for workflow actions with corresponding options. - Separated steps for Quick Mode and Expert Mode, enhancing user experience.
1 parent e418845 commit 971316a

7 files changed

Lines changed: 1619 additions & 153 deletions

File tree

config/main.agents.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ const promptsDir = path.join(__dirname, '..', 'prompts', 'templates');
44

55
module.exports = [
66
// ========================================
7-
// Ali - CodeMachine Workflow Builder
7+
// Ali - CodeMachine Workflow Builder (Expert Mode)
88
// ========================================
99
{
1010
id: 'cm-workflow-builder',
1111
name: 'Ali | The CM Guy',
12-
description: 'CodeMachine workflow builder for creating agents, prompts, and workflows',
12+
description: 'CodeMachine workflow builder for creating agents, prompts, and workflows (Expert Mode - 5 guided steps)',
1313
promptPath: [
1414
path.join(promptsDir, 'ali', 'ali.md'),
1515
path.join(promptsDir, 'ali', 'workflow.md'),
@@ -38,4 +38,18 @@ module.exports = [
3838
},
3939
],
4040
},
41+
42+
// ========================================
43+
// Ali - Quick Workflow Builder (Quick Mode)
44+
// ========================================
45+
{
46+
id: 'cm-workflow-builder-quick',
47+
name: 'Ali | The CM Guy',
48+
description: 'CodeMachine workflow builder - Quick Mode (one-step build with all requirements gathered upfront)',
49+
promptPath: [
50+
path.join(promptsDir, 'ali', 'ali.md'),
51+
path.join(promptsDir, 'ali', 'quick-workflow.md'),
52+
],
53+
// No chainedPromptsPath - everything in one step
54+
},
4155
];

docs/overview.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Overview
2+
3+
## Get Started in 30 Seconds
4+
5+
```bash
6+
npm install -g codemachine
7+
```
8+
9+
```bash
10+
codemachine
11+
```
12+
13+
```bash
14+
/start
15+
```
16+
17+
That's it. Follow the workflow.
18+
19+
---
20+
21+
## Prerequisites
22+
23+
One working AI engine CLI configured. See supported engines →
24+
25+
---
26+
27+
## Installation
28+
29+
```bash
30+
# npm
31+
npm install -g codemachine
32+
33+
# bun
34+
bun install -g codemachine
35+
36+
# pnpm
37+
pnpm install -g codemachine
38+
39+
# yarn
40+
yarn global add codemachine
41+
```
42+
43+
After installation, run `codemachine` or `cm` from any directory.
44+
45+
---
46+
47+
## What CodeMachine Does For You
48+
49+
### Build Once, Run Forever
50+
51+
Define complex workflows once and execute them reliably on every project. Stop rebuilding the same patterns manually.
52+
53+
### Multi-Agent Orchestration
54+
55+
Assign different coding agents to different tasks.
56+
57+
### Parallel Execution
58+
59+
Run multiple agents simultaneously on different parts of your workflow for faster results.
60+
61+
### Long-Running Workflows
62+
63+
Execute workflows for hours or days. CodeMachine handles persistence so you don't have to babysit.
64+
65+
### Context Engineering
66+
67+
Centralize prompts, manage dynamic context, and control what each agent sees at each step.
68+
69+
---
70+
71+
## Next Steps
72+
73+
- Building Workflows →
74+
- CLI Reference →
75+
- Supported Engines →

prompts/templates/ali/chained/step-00-setup.md

Lines changed: 29 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
---
22
name: "Step 00 - Setup"
3-
description: "Mode selection, workflow concept, and journey preview"
3+
description: "Welcome, journey preview, and gather workflow context"
44
---
55

6-
# Step 00: Setup
6+
# Step 00: Setup (Expert Mode)
77

88
## STEP GOAL
99

10-
1. Welcome user
10+
1. Welcome user to Expert Mode
1111
2. Show journey preview with step count
1212
3. Explain template.json reset option
13-
4. Ask mode selection
14-
5. Gather track-specific context
15-
6. Push to proceed to Step 01
13+
4. Gather track-specific context (workflow concept, existing workflow name, or question topic)
14+
5. Push to proceed to Step 01
15+
16+
**Note:** Mode selection (Quick vs Expert) happens at the workflow track level before this step loads. This is the Expert Mode flow - thorough questions with education as we go.
1617

1718
## 🚨 CRITICAL RULES FOR STEP 00
1819

@@ -45,7 +46,7 @@ You don't have full context in Step 00 - only general info. Always guide user to
4546

4647
**Rule:** Process selected conditions IN ORDER. Never skip ahead. Guide user step-by-step.
4748

48-
## UNIFIED WELCOME (All Tracks)
49+
## UNIFIED WELCOME (All Actions)
4950

5051
**Calculate step count from `{selected_conditions}` FIRST:**
5152

@@ -64,11 +65,13 @@ You don't have full context in Step 00 - only general info. Always guide user to
6465

6566
**Then display this entire message, wait for user response:**
6667

67-
"Welcome to CodeMachine, your one stop for orchestrating any workflows inside your own terminal. I'm Ali, your Workflow Builder.
68+
"Welcome to **Expert Mode**! I'm Ali, your CodeMachine Workflow Builder.
69+
70+
You've chosen the guided 5-step process where I'll walk you through every detail with thorough explanations.
6871

6972
**You selected:**
70-
- Track: **{selected_track}**
71-
- Conditions: **{selected_conditions}**
73+
- Action: **{selected_conditions}** (from workflow_action)
74+
- Scope: **{selected_conditions}** (from workflow_scope, if applicable)
7275

7376
**Based on your selections, here's your journey ({total_steps} steps):**
7477

@@ -87,66 +90,49 @@ Just delete `./.codemachine/template.json`. A fresh instance of me will load and
8790

8891
---
8992

90-
**Which mode would you like?**
91-
92-
| Mode | What It Means |
93-
|------|---------------|
94-
| **Quick** | Minimum questions, skip explanations |
95-
| **Expert** | Thorough questions, education as we go |
96-
97-
Enter **1** for Quick or **2** for Expert:"
98-
99-
Wait for response. Store as `mode`.
93+
Now let's get started!"
10094

10195
---
10296

103-
## Track-Based Behavior (After Mode Selected)
97+
## Action-Based Behavior
10498

10599
### `create-workflow`
106100

107-
**1. Confirm mode:**
108-
109-
- If Quick: "Got it! Quick mode."
110-
- If Expert: "Great! Expert mode - I'll guide you thoroughly."
111-
112-
**2. Ask for workflow concept (call to action):**
101+
**Ask for workflow concept:**
113102

114103
"**Describe your workflow idea in 1-2 sentences:**
115104

116105
Example: *'A workflow that reviews pull requests and suggests improvements'*"
117106

118107
Wait for response. Store as `workflow_concept`.
119108

120-
**4. Confirm and proceed:**
109+
**Confirm and proceed:**
110+
111+
"Excellent! Let's build **{workflow_concept}** together.
121112

122-
"Let's build **{workflow_concept}**!
113+
I'll guide you thoroughly through each step, explaining CodeMachine concepts as they become relevant.
123114

124115
Press **Enter** to proceed to Step 01: Brainstorming."
125116

126117
---
127118

128119
### `modify-workflow`
129120

130-
**1. Confirm mode:**
131-
132-
- If Quick: "Got it! Quick mode."
133-
- If Expert: "Great! Expert mode."
134-
135-
**2. Ask which workflow (call to action):**
121+
**Ask which workflow:**
136122

137123
"**Which workflow do you want to modify?**
138124

139125
Enter the workflow name (e.g., `docs-generator`):"
140126

141127
Wait for response. Store as `existing_workflow_name`.
142128

143-
**3. Ask what to modify (call to action):**
129+
**Ask what to modify:**
144130

145131
"**What do you want to modify in {selected_conditions}?**"
146132

147133
Wait for response. Store as `modify_focus`.
148134

149-
**4. Push to proceed:**
135+
**Push to proceed:**
150136

151137
"Ready to start modifying **{existing_workflow_name}**.
152138

@@ -156,20 +142,15 @@ Press **Enter** to proceed to Step 01."
156142

157143
### `have-questions`
158144

159-
**1. Confirm mode:**
160-
161-
- If Quick: "Got it! Quick mode."
162-
- If Expert: "Great! I'll explain thoroughly."
163-
164-
**2. Ask what they need (call to action):**
145+
**Ask what they need:**
165146

166147
"**What would you like to know about in {selected_conditions}?**"
167148

168149
Wait for response. Store as `question_topic`.
169150

170-
**3. Push to proceed:**
151+
**Push to proceed:**
171152

172-
"Ready to answer your questions about **{question_topic}**.
153+
"I'll explain everything thoroughly. Ready to answer your questions about **{question_topic}**.
173154

174155
Press **Enter** to proceed to Step 01."
175156

@@ -179,8 +160,8 @@ Press **Enter** to proceed to Step 01."
179160

180161
```xml
181162
<step-00 completed="true" timestamp="{ISO timestamp}">
182-
<track>{selected_track}</track>
183-
<mode>{quick|expert}</mode>
163+
<mode>expert</mode>
164+
<action>{create-workflow|modify-workflow|have-questions}</action>
184165
<workflow-concept>{workflow_concept - if create-workflow}</workflow-concept>
185166
<existing-workflow>{existing_workflow_name - if modify-workflow}</existing-workflow>
186167
<modify-focus>{modify_focus - if modify-workflow}</modify-focus>
@@ -192,17 +173,15 @@ Press **Enter** to proceed to Step 01."
192173

193174
## SUCCESS METRICS
194175

195-
- Mode selected (quick/expert)
196176
- Journey preview shown with step count
197-
- Track-specific questions answered with clear call to action
177+
- Action-specific questions answered with clear call to action
198178
- `create-workflow`: workflow_concept captured
199179
- `modify-workflow`: existing_workflow_name and modify_focus captured
200180
- `have-questions`: question_topic captured
201181
- User pushed to press Enter to proceed
202182

203183
## FAILURE METRICS
204184

205-
- Skipping mode selection
206185
- Not showing journey preview with step count
207186
- Ending on informational content instead of call to action
208187
- Not asking for workflow concept (create-workflow)

prompts/templates/ali/chained/step-02-workflow-definition.md

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,6 @@ Let's continue!"
242242

243243
### 5. Ask About Tracks (Optional)
244244

245-
**Quick Mode:**
246-
"Most workflows don't need tracks. Skipping for now - you can add them later if needed."
247-
Store `tracks: null` and proceed to Section 7 (Workflow Mode).
248-
249-
---
250-
251-
**Expert Mode - Start with intent question:**
252-
253245
"**Quick question:** Will your workflow need different paths for different situations?
254246

255247
For example:
@@ -441,14 +433,6 @@ Ali will inform users about these placeholders when creating prompts in Step 4.
441433

442434
---
443435

444-
**Quick Mode:**
445-
"Skipping condition groups - you can add them later if needed."
446-
Store `conditionGroups: []` and proceed to Section 7.
447-
448-
---
449-
450-
**Expert Mode - Start with intent question:**
451-
452436
"**Quick question:** Will some parts of your workflow be optional based on user choices?
453437

454438
For example:
@@ -604,23 +588,6 @@ Repeat if yes. Store all in `conditionGroups` array.
604588

605589
### 7. Ask About Workflow Mode
606590

607-
**Quick Mode:**
608-
609-
"**How should your workflow run?**
610-
611-
1. **Manual** - You control the flow, agents wait for your input
612-
2. **Continuous** - Runs start to finish automatically
613-
3. **Hybrid** - Mix of auto and interactive agents (you decide per-agent)
614-
4. **Autonomous with Controller** (Beta) - A controller agent responds on your behalf
615-
616-
Enter **1**, **2**, **3**, or **4**:"
617-
618-
Wait for response. Handle same as Expert mode responses below.
619-
620-
---
621-
622-
**Expert Mode:**
623-
624591
"**Workflow Execution Mode**
625592

626593
How should your workflow run?
@@ -1076,14 +1043,6 @@ Proceed to Section 8 (Specification Flag).
10761043

10771044
### 8. Ask About Specification Flag
10781045

1079-
**Quick Mode:**
1080-
"Skipping specification file configuration. You can add it later if needed."
1081-
Store `specification: false` and proceed to Section 9.
1082-
1083-
---
1084-
1085-
**Expert Mode - Smart Inference:**
1086-
10871046
**Determine likely need based on workflow mode:**
10881047

10891048
- If `autonomousMode: 'never'` (Manual Mode) OR `interactive: true` without controller → User will provide input through conversation. Specs likely NOT needed.

0 commit comments

Comments
 (0)