speccrew 0.6.51 → 0.6.53

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.
@@ -77,7 +77,15 @@ You understand the complete AI engineering closed loop: **speccrew-pm → speccr
77
77
 
78
78
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md`
79
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.
80
+ > After reading the specification, parse the XML workflow below and **strictly execute each `<block>` in document order**. For EVERY block, you MUST announce it before execution:
81
+ >
82
+ > ```
83
+ > 📋 Block [ID] (action=[action]) — [desc]
84
+ > 🔧 Tool: [which IDE tool to call]
85
+ > ✅ Result: [output or status]
86
+ > ```
87
+ >
88
+ > 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**. For `action="dispatch-to-worker"`, create a Task for the Worker Agent — do NOT execute the skill yourself. Do NOT interpret the workflow as a goal description or improvise your own approach.
81
89
 
82
90
  ```xml
83
91
  <?xml version="1.0" encoding="UTF-8"?>
@@ -8,15 +8,28 @@ tools: Read, Write, Task, Bash
8
8
  >
9
9
  > **Step 1**: Load XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md` — this defines all block types and action-to-tool mappings
10
10
  >
11
- > **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**:
12
- > - `action="run-script"` → Execute via **Terminal tool** (PowerShell/Bash)
13
- > - `action="run-skill"` → Invoke via **Skill tool** (do NOT manually read SKILL.md files or browse directories)
14
- > - `action="dispatch-to-worker"` Create **Task** via **Task tool** for `speccrew-task-worker`
11
+ > **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**. For EVERY block, you MUST follow this 3-step cycle:
12
+ >
13
+ > ```
14
+ > 📋 Block [ID] (action=[action]) [desc]
15
+ > 🔧 Tool: [which IDE tool to call]
16
+ > ✅ Result: [output or status]
17
+ > ```
18
+ >
19
+ > Action-to-tool mapping:
20
+ > - `action="run-script"` → Execute via **Terminal tool** (pass the `<field name="command">` value EXACTLY)
21
+ > - `action="run-skill"` → Invoke via **Skill tool** (pass the `<field name="skill">` value EXACTLY)
22
+ > - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker` (Worker loads and executes the skill, NOT you)
15
23
  > - `action="confirm"` (event) → Present to user and wait for response
16
24
  >
17
25
  > **Step 3**: Execute ALL stages sequentially without pausing (only stop at explicit `<event action="confirm">` blocks)
18
26
  >
19
- > **FORBIDDEN**: Do NOT run terminal commands as substitute for Skill tool calls. Do NOT do Worker's job yourself. Do NOT skip blocks or improvise.
27
+ > **FORBIDDEN**:
28
+ > - Do NOT skip the block announcement format above — every block must be announced before execution
29
+ > - Do NOT run terminal commands as substitute for Skill tool calls
30
+ > - Do NOT do Worker's job yourself — when `action="dispatch-to-worker"`, create a Task and let Worker handle it
31
+ > - Do NOT skip blocks or improvise your own commands
32
+ > - Do NOT read a skill's SKILL.md file yourself — use the Skill tool which resolves paths automatically
20
33
 
21
34
  # Bizs Knowledge Dispatch (XML Block Version)
22
35
 
@@ -8,15 +8,28 @@ tools: Read, Write, Task, Bash
8
8
  >
9
9
  > **Step 1**: Load XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md` — this defines all block types and action-to-tool mappings
10
10
  >
11
- > **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**:
12
- > - `action="run-script"` → Execute via **Terminal tool** (PowerShell/Bash)
13
- > - `action="run-skill"` → Invoke via **Skill tool** (do NOT manually read SKILL.md files or browse directories)
14
- > - `action="dispatch-to-worker"` Create **Task** via **Task tool** for `speccrew-task-worker`
11
+ > **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**. For EVERY block, you MUST follow this 3-step cycle:
12
+ >
13
+ > ```
14
+ > 📋 Block [ID] (action=[action]) [desc]
15
+ > 🔧 Tool: [which IDE tool to call]
16
+ > ✅ Result: [output or status]
17
+ > ```
18
+ >
19
+ > Action-to-tool mapping:
20
+ > - `action="run-script"` → Execute via **Terminal tool** (pass the `<field name="command">` value EXACTLY)
21
+ > - `action="run-skill"` → Invoke via **Skill tool** (pass the `<field name="skill">` value EXACTLY)
22
+ > - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker` (Worker loads and executes the skill, NOT you)
15
23
  > - `action="confirm"` (event) → Present to user and wait for response
16
24
  >
17
25
  > **Step 3**: Execute ALL stages sequentially without pausing (only stop at explicit `<event action="confirm">` blocks)
18
26
  >
19
- > **FORBIDDEN**: Do NOT run terminal commands as substitute for Skill tool calls. Do NOT do Worker's job yourself. Do NOT skip blocks or improvise.
27
+ > **FORBIDDEN**:
28
+ > - Do NOT skip the block announcement format above — every block must be announced before execution
29
+ > - Do NOT run terminal commands as substitute for Skill tool calls
30
+ > - Do NOT do Worker's job yourself — when `action="dispatch-to-worker"`, create a Task and let Worker handle it
31
+ > - Do NOT skip blocks or improvise your own commands
32
+ > - Do NOT read a skill's SKILL.md file yourself — use the Skill tool which resolves paths automatically
20
33
 
21
34
  # Techs Knowledge Dispatch (XML Block Version)
22
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.51",
3
+ "version": "0.6.53",
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