@@ -231,3 +231,64 @@ Running:
231231cd references/hello-world
232232pnpm exec trigger dev # or with --log-level debug
233233```
234+
235+ ## Local Task Testing Workflow
236+
237+ This workflow enables Claude Code to run the webapp and trigger dev simultaneously, trigger tasks, and inspect results for testing code changes.
238+
239+ ### Step 1: Start Webapp in Background
240+
241+ ``` bash
242+ # Run from repo root with run_in_background: true
243+ pnpm run dev --filter webapp
244+ ```
245+
246+ Verify webapp is running:
247+
248+ ``` bash
249+ curl -s http://localhost:3030/healthcheck # Should return 200
250+ ```
251+
252+ ### Step 2: Start Trigger Dev in Background
253+
254+ ``` bash
255+ # Run from hello-world directory with run_in_background: true
256+ cd references/hello-world && pnpm exec trigger dev
257+ ```
258+
259+ The worker will build and register tasks. Check output for "Local worker ready [ node] " message.
260+
261+ ### Step 3: Trigger and Monitor Tasks via MCP
262+
263+ Use the Trigger.dev MCP tools to interact with tasks:
264+
265+ ```
266+ # Get current worker and registered tasks
267+ mcp__trigger__get_current_worker(projectRef: "proj_rrkpdguyagvsoktglnod", environment: "dev")
268+
269+ # Trigger a task
270+ mcp__trigger__trigger_task(
271+ projectRef: "proj_rrkpdguyagvsoktglnod",
272+ environment: "dev",
273+ taskId: "hello-world",
274+ payload: {"message": "Hello from Claude"}
275+ )
276+
277+ # List runs to see status
278+ mcp__trigger__list_runs(
279+ projectRef: "proj_rrkpdguyagvsoktglnod",
280+ environment: "dev",
281+ taskIdentifier: "hello-world",
282+ limit: 5
283+ )
284+ ```
285+
286+ ### Step 4: Monitor Execution
287+
288+ - Check trigger dev output file for real-time execution logs
289+ - Successful runs show: ` Task | Run ID | Success (Xms) `
290+ - Dashboard available at: http://localhost:3030/orgs/references-9dfd/projects/hello-world-97DT/env/dev/runs
291+
292+ ### Key Project Refs
293+
294+ - hello-world: ` proj_rrkpdguyagvsoktglnod `
0 commit comments