speccrew 0.6.50 → 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.
@@ -76,6 +76,8 @@ You understand the complete AI engineering closed loop: **speccrew-pm → speccr
76
76
  # Workflow (XML Block Definition)
77
77
 
78
78
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md`
79
+ >
80
+ > After reading the specification, parse the XML workflow below and **strictly execute each `<block>` in document order**. Every `<block type="task">` is a literal tool-call instruction — use the `action` attribute to determine which IDE tool to invoke, and pass the `<field name="command">` or `<field name="skill">` value **exactly as written**. Do NOT interpret the workflow as a goal description or improvise your own approach.
79
81
 
80
82
  ```xml
81
83
  <?xml version="1.0" encoding="UTF-8"?>
@@ -99,6 +99,8 @@ Stage 4: System Summary
99
99
  ## XML Workflow Definition
100
100
 
101
101
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md`
102
+ >
103
+ > After reading the specification, parse the XML workflow below and **strictly execute each `<block>` in document order**. Every `<block type="task">` is a literal tool-call instruction — use the `action` attribute to determine which IDE tool to invoke, and pass the `<field name="command">` or `<field name="skill">` value **exactly as written**. Do NOT interpret the workflow as a goal description or improvise your own approach.
102
104
 
103
105
  ```xml
104
106
  <?xml version="1.0" encoding="UTF-8"?>
@@ -119,6 +119,8 @@ Read `speccrew-workspace/docs/configs/platform-mapping.json` for standardized pl
119
119
  ## XML Workflow Definition
120
120
 
121
121
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md`
122
+ >
123
+ > After reading the specification, parse the XML workflow below and **strictly execute each `<block>` in document order**. Every `<block type="task">` is a literal tool-call instruction — use the `action` attribute to determine which IDE tool to invoke, and pass the `<field name="command">` or `<field name="skill">` value **exactly as written**. Do NOT interpret the workflow as a goal description or improvise your own approach.
122
124
 
123
125
  ```xml
124
126
  <?xml version="1.0" encoding="UTF-8"?>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.50",
3
+ "version": "0.6.52",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -390,12 +390,94 @@ 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
396
- 2. **Read `rule` blocks as constraints** check them continuously during execution
397
- 3. **`checkpoint` blocks** = persist progress before continuing
398
- 4. **`gateway mode="exclusive"`** = only execute the first matching branch
399
- 5. **`loop parallel="true"`** = dispatch all iterations concurrently
400
- 6. **`rule level="forbidden"`** = immediate stop if violated
401
- 7. **Input/Output blocks** define the contract respect required parameters
477
+ 2. **Literal execution** each `<block type="task">` is a direct tool-call instruction, NOT a goal description. Pass `<field name="command">` values to the terminal **exactly as written**. Pass `<field name="skill">` values to the Skill tool **exactly as written**. Do NOT rephrase, combine, or improvise alternative commands.
478
+ 3. **Read `rule` blocks as constraints** check them continuously during execution
479
+ 4. **`checkpoint` blocks** = persist progress before continuing
480
+ 5. **`gateway mode="exclusive"`** = only execute the first matching branch
481
+ 6. **`loop parallel="true"`** = dispatch all iterations concurrently
482
+ 7. **`rule level="forbidden"`** = immediate stop if violated
483
+ 8. **Input/Output blocks** define the contract — respect required parameters