speccrew 0.6.57 → 0.6.59

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.
@@ -353,6 +353,21 @@ Before executing the workflow, verify the following inputs:
353
353
  </block>
354
354
 
355
355
  <!-- ==================== STEP 5A: COPY TEMPLATE TO DOCUMENT PATH ==================== -->
356
+ <!-- Document Output Path Rule -->
357
+ <block type="rule" id="R-DOCPATH" level="mandatory" desc="Document output path MUST use documentPath parameter">
358
+ <field name="text">
359
+ The output document file MUST be created at the EXACT path specified by ${documentPath} input parameter.
360
+ DO NOT use the template file name (e.g., FEATURE-DETAIL-TEMPLATE-*.md) as the output file name.
361
+ The documentPath already contains the correct target path including file name (e.g., speccrew-workspace/knowledges/bizs/backend-system/admin/cache/cache_controller.md).
362
+ Before creating the file, ensure the parent directory exists (create if necessary).
363
+ </field>
364
+ </block>
365
+
366
+ <!-- Ensure Document Output Directory Exists -->
367
+ <block type="task" id="B14a" action="run-script" desc="Ensure document output directory exists">
368
+ <field name="command">node -e "require('fs').mkdirSync(require('path').dirname('${documentPath}'), {recursive: true})"</field>
369
+ </block>
370
+
356
371
  <!-- Replace Top-Level Placeholders -->
357
372
  <block type="task" id="B14" action="replace-placeholders" desc="Replace template placeholders">
358
373
  <field name="template" value="${templateContent}"/>
@@ -285,6 +285,21 @@ Analyze one specific UI feature from source code, extract business functionality
285
285
 
286
286
  <!-- ==================== STEP 5A: COPY TEMPLATE TO DOCUMENT PATH ==================== -->
287
287
  <sequence id="S5a" name="Step 5a: Copy Template" status="pending" desc="Copy template to document path">
288
+ <!-- Document Output Path Rule -->
289
+ <block type="rule" id="R-DOCPATH" level="mandatory" desc="Document output path MUST use documentPath parameter">
290
+ <field name="text">
291
+ The output document file MUST be created at the EXACT path specified by ${documentPath} input parameter.
292
+ DO NOT use the template file name (e.g., FEATURE-DETAIL-TEMPLATE-*.md) as the output file name.
293
+ The documentPath already contains the correct target path including file name (e.g., speccrew-workspace/knowledges/bizs/web-vue/src/views/system/user/index.md).
294
+ Before creating the file, ensure the parent directory exists (create if necessary).
295
+ </field>
296
+ </block>
297
+
298
+ <!-- Ensure Document Output Directory Exists -->
299
+ <block type="task" id="B5a0" action="run-script" desc="Ensure document output directory exists">
300
+ <field name="command">node -e "require('fs').mkdirSync(require('path').dirname('${documentPath}'), {recursive: true})"</field>
301
+ </block>
302
+
288
303
  <!-- Prepare Placeholder Replacements -->
289
304
  <block type="task" id="B5a1" action="analyze" desc="Prepare replacements">
290
305
  <field name="language" value="${language}"/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.57",
3
+ "version": "0.6.59",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -481,3 +481,20 @@ Team Leader executes:
481
481
  6. **`loop parallel="true"`** = dispatch all iterations concurrently
482
482
  7. **`rule level="forbidden"`** = immediate stop if violated
483
483
  8. **Input/Output blocks** define the contract — respect required parameters
484
+
485
+ ### Block Execution Announcement Protocol
486
+
487
+ Before executing each `<block>`, the agent MUST announce the block being executed. The announcement format is:
488
+
489
+ ```
490
+ 📋 Block [{block-id}] (type={block-type}, action={action}) — {block-desc}
491
+ ```
492
+
493
+ **Rules:**
494
+ 1. The announcement MUST be made BEFORE the block execution begins, not after.
495
+ 2. ALL block types require announcement: `task`, `loop`, `checkpoint`, `rule`, `gateway`, `input`, `output`.
496
+ 3. For `<block type="loop">` blocks, announce the loop entry with iteration context (e.g., "Loop [S2-L2] — Iterating over ${batch}, 5 items, parallel=true").
497
+ 4. For `<block type="checkpoint">` blocks, announce the checkpoint and its validation result.
498
+ 5. For `<block type="rule">` blocks, announce the rule being applied.
499
+ 6. This protocol applies to ALL agents executing XML workflows — both orchestrating agents (Team Leader) and worker agents.
500
+ 7. Nested blocks inside loops should also be announced for each iteration.