You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add full e2e test: define -> implement -> execute workflow
Update the claude-code-e2e job to test the COMPLETE DeepWork workflow:
1. /deepwork_jobs.define - Create a new job from scratch
2. /deepwork_jobs.implement - Generate step instruction files
3. /fruits.identify - Execute the generated identify command
4. /fruits.classify - Execute the generated classify command
This tests the actual user experience rather than just validating
pre-existing fixtures. The test provides deterministic instructions
for creating a 'fruits' job with identify and classify steps.
# Create a fresh project with NO pre-existing job definitions
140
+
mkdir -p test_project/.claude
141
141
142
142
cd test_project
143
143
git init
144
144
git config user.email "test@test.com"
145
145
git config user.name "Test"
146
-
echo "# CI Test Project" > README.md
146
+
echo "# CI Test Project - DeepWork E2E Test" > README.md
147
147
git add . && git commit -m "init"
148
148
cd ..
149
149
150
-
# Run deepwork install to set up the project (this also runs sync)
150
+
# Install deepwork (this sets up .deepwork/ with standard jobs only)
151
151
uv run deepwork install --platform claude --path test_project
152
152
153
-
echo "Test project setup complete"
153
+
echo "Fresh test project setup complete"
154
+
echo "Available commands:"
154
155
ls -la test_project/.claude/commands/
155
156
156
-
- name: Run Claude Code - Identify Step
157
+
# STEP 1: Use /deepwork_jobs.define to CREATE the fruits job
158
+
- name: Create job with /deepwork_jobs.define
159
+
if: steps.check-key.outputs.has_key == 'true'
160
+
working-directory: test_project
161
+
timeout-minutes: 10
162
+
run: |
163
+
echo "=== Running /deepwork_jobs.define to create fruits job ==="
164
+
165
+
# Provide detailed, deterministic instructions for creating the job
166
+
claude --yes --print "/deepwork_jobs.define" <<'PROMPT_EOF'
167
+
I want to create a simple job called "fruits" for identifying and classifying fruits.
168
+
169
+
Here are the EXACT specifications - please create the job.yml with these exact details:
170
+
171
+
Job name: fruits
172
+
Version: 1.0.0
173
+
Summary: Identify and classify fruits from a mixed list of items
174
+
175
+
Description: A simple workflow that takes a list of mixed items, identifies which are fruits, then classifies them by category. Designed for CI testing.
176
+
177
+
Steps:
178
+
1. Step ID: identify
179
+
Name: Identify Fruits
180
+
Description: Filter a list of items to identify only the fruits
181
+
Input: raw_items (user parameter) - A comma-separated list of items
182
+
Output: identified_fruits.md
183
+
Dependencies: none
184
+
185
+
2. Step ID: classify
186
+
Name: Classify Fruits
187
+
Description: Organize identified fruits into categories (citrus, tropical, berries, etc.)
188
+
Input: identified_fruits.md (file from step identify)
189
+
Output: classified_fruits.md
190
+
Dependencies: identify
191
+
192
+
Please create this job definition now. Do not ask questions - use these exact specifications.
193
+
PROMPT_EOF
194
+
195
+
# Verify the job.yml was created
196
+
echo "=== Checking job.yml was created ==="
197
+
if [ -f ".deepwork/jobs/fruits/job.yml" ]; then
198
+
echo "SUCCESS: job.yml created"
199
+
cat .deepwork/jobs/fruits/job.yml
200
+
else
201
+
echo "ERROR: job.yml was not created"
202
+
echo "Contents of .deepwork/jobs/:"
203
+
ls -la .deepwork/jobs/ || echo "No jobs directory"
204
+
exit 1
205
+
fi
206
+
207
+
# STEP 2: Use /deepwork_jobs.implement to generate step instructions
208
+
- name: Generate step instructions with /deepwork_jobs.implement
209
+
if: steps.check-key.outputs.has_key == 'true'
210
+
working-directory: test_project
211
+
timeout-minutes: 10
212
+
run: |
213
+
echo "=== Running /deepwork_jobs.implement to generate step instructions ==="
214
+
215
+
claude --yes --print "/deepwork_jobs.implement" <<'PROMPT_EOF'
216
+
Please implement the "fruits" job that was just defined.
217
+
218
+
For the identify step, create instructions that:
219
+
- Parse the comma-separated raw_items input
220
+
- Identify which items are fruits (apple, banana, orange, mango, grape, etc.)
221
+
- Output a markdown file listing the identified fruits
222
+
223
+
For the classify step, create instructions that:
224
+
- Read identified_fruits.md from the previous step
225
+
- Classify fruits into categories: Citrus (orange, lemon), Tropical (banana, mango), Pome (apple, pear), Berries, etc.
226
+
- Output a markdown file with fruits organized by category
227
+
228
+
Generate the step instruction files now.
229
+
PROMPT_EOF
230
+
231
+
# Verify step files were created
232
+
echo "=== Checking step files were created ==="
233
+
if [ -f ".deepwork/jobs/fruits/steps/identify.md" ] && [ -f ".deepwork/jobs/fruits/steps/classify.md" ]; then
234
+
echo "SUCCESS: Step instruction files created"
235
+
echo "--- identify.md ---"
236
+
cat .deepwork/jobs/fruits/steps/identify.md
237
+
echo ""
238
+
echo "--- classify.md ---"
239
+
cat .deepwork/jobs/fruits/steps/classify.md
240
+
else
241
+
echo "ERROR: Step files were not created"
242
+
ls -la .deepwork/jobs/fruits/steps/ || echo "No steps directory"
243
+
exit 1
244
+
fi
245
+
246
+
# Run sync to generate the slash commands
247
+
echo "=== Running deepwork sync to generate commands ==="
248
+
cd ..
249
+
uv run deepwork sync --path test_project
250
+
251
+
echo "=== Checking generated commands ==="
252
+
ls -la test_project/.claude/commands/
253
+
254
+
if [ -f "test_project/.claude/commands/fruits.identify.md" ] && [ -f "test_project/.claude/commands/fruits.classify.md" ]; then
255
+
echo "SUCCESS: Slash commands generated"
256
+
else
257
+
echo "ERROR: Slash commands were not generated"
258
+
exit 1
259
+
fi
260
+
261
+
# STEP 3: Execute the generated /fruits.identify command
262
+
- name: Run /fruits.identify
157
263
if: steps.check-key.outputs.has_key == 'true'
158
264
working-directory: test_project
159
265
timeout-minutes: 5
160
266
run: |
161
-
# Run the identify step with a deterministic input
162
-
# Using --print to output result, --yes to auto-accept
0 commit comments