speccrew 0.6.51 → 0.6.52

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.51",
3
+ "version": "0.6.52",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -390,6 +390,87 @@ When executing `<block type="task">` blocks, the `action` attribute determines w
390
390
  3. **`<loop parallel="true">` with `dispatch-to-worker`** — Create ALL worker tasks in ONE batch call, not sequentially. This enables true parallel execution.
391
391
  4. **Variable binding** — After a tool call completes, bind the result to the variable specified in `<field name="output" var="..."/>` for use in subsequent blocks.
392
392
 
393
+ ### Invocation Examples
394
+
395
+ **Example 1: `action="run-script"` — Team Leader runs terminal command directly**
396
+
397
+ Given this XML block:
398
+ ```xml
399
+ <block type="task" id="S0-B4" action="run-script" desc="Generate platforms.json">
400
+ <field name="command">node scripts/generate-platforms.js</field>
401
+ <field name="output" var="platforms_file"/>
402
+ </block>
403
+ ```
404
+
405
+ Team Leader executes:
406
+ ```
407
+ → Call run_in_terminal(command="node scripts/generate-platforms.js")
408
+ → Store result in variable ${platforms_file}
409
+ ```
410
+
411
+ **Example 2: `action="run-skill"` — Team Leader loads a Skill (dispatch playbook)**
412
+
413
+ Given this XML block:
414
+ ```xml
415
+ <block type="task" id="B3" action="run-skill" desc="Load dispatch playbook">
416
+ <field name="skill">speccrew-knowledge-bizs-dispatch-xml</field>
417
+ </block>
418
+ ```
419
+
420
+ Team Leader executes:
421
+ ```
422
+ → Call Skill(name="speccrew-knowledge-bizs-dispatch-xml")
423
+ → Read and execute the loaded workflow block-by-block
424
+ ```
425
+
426
+ **Example 3: `action="dispatch-to-worker"` — Team Leader creates Task for Worker Agent**
427
+
428
+ Given this XML block:
429
+ ```xml
430
+ <block type="task" id="S1-B1" action="dispatch-to-worker" desc="Identify entry directories for backend">
431
+ <field name="agent">speccrew-task-worker</field>
432
+ <field name="skill">speccrew-knowledge-bizs-identify-entries-xml</field>
433
+ <field name="context_platform_id">${platform.platformId}</field>
434
+ <field name="context_source_path">${platform.sourcePath}</field>
435
+ <field name="output" var="entry_result"/>
436
+ </block>
437
+ ```
438
+
439
+ Team Leader executes:
440
+ ```
441
+ → Call Task tool to create a new task:
442
+ - Assign to: speccrew-task-worker
443
+ - Worker must call: Skill(name="speccrew-knowledge-bizs-identify-entries-xml")
444
+ - Pass context: platform_id=backend-system, source_path=d:/dev/project/backend
445
+ → Wait for Worker Agent to complete the task
446
+ → Store Worker's result in variable ${entry_result}
447
+ ```
448
+
449
+ **CRITICAL**: When block says `action="dispatch-to-worker"`, Team Leader MUST NOT load the skill itself or execute it directly. Team Leader creates a Task, Worker Agent loads and executes the skill.
450
+
451
+ **Example 4: `<loop parallel="true">` with `dispatch-to-worker` — Batch dispatch**
452
+
453
+ Given this XML block:
454
+ ```xml
455
+ <block type="loop" id="S1-L1" over="${platforms}" var="platform" parallel="true">
456
+ <block type="task" id="S1-B1" action="dispatch-to-worker" desc="Identify entries">
457
+ <field name="agent">speccrew-task-worker</field>
458
+ <field name="skill">speccrew-knowledge-bizs-identify-entries-xml</field>
459
+ <field name="context_platform_id">${platform.platformId}</field>
460
+ </block>
461
+ </block>
462
+ ```
463
+
464
+ Team Leader executes:
465
+ ```
466
+ → For each platform in ${platforms}, create a Task in ONE batch:
467
+ - Task 1: Worker runs identify-entries-xml for backend-system
468
+ - Task 2: Worker runs identify-entries-xml for frontend-web
469
+ - Task 3: Worker runs identify-entries-xml for mobile-app
470
+ → All 3 tasks run in parallel on Worker Agents
471
+ → Wait for all tasks to complete before proceeding
472
+ ```
473
+
393
474
  ## Execution Rules
394
475
 
395
476
  1. **NEVER skip a block** — execute every block in document order