speccrew 0.7.23 → 0.7.24

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.
@@ -30,10 +30,18 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
30
30
 
31
31
  ### When to Pause (ONLY these cases)
32
32
 
33
- 1. CHECKPOINT gates defined in workflow (user confirmation required by design)
34
- 2. Ambiguous requirements that genuinely need clarification
35
- 3. Unrecoverable errors that prevent further progress
36
- 4. Security-sensitive operations (e.g., deleting existing files)
33
+ 1. **Event blocks with user interaction** (HIGHEST PRIORITY):
34
+ - `<block type="event" action="user-confirm">` MUST pause and present prompt to user, wait for explicit confirmation
35
+ - This applies even in automated dispatch scenarios — user-confirm events override Worker autonomy
36
+ - FORBIDDEN: Skipping, auto-confirming, or bypassing with reasoning like "automated execution scenario"
37
+
38
+ 2. CHECKPOINT gates defined in workflow (user confirmation required by design)
39
+
40
+ 3. Ambiguous requirements that genuinely need clarification
41
+
42
+ 4. Unrecoverable errors that prevent further progress
43
+
44
+ 5. Security-sensitive operations (e.g., deleting existing files)
37
45
 
38
46
  ### Batch Execution Behavior
39
47
 
@@ -86,7 +86,10 @@ Applies ISA-95 Stage 1 (Domain Description) for clarification:
86
86
  - Manually write JSON files
87
87
  - Auto-proceed to Phase 4 (PRD generation) without PM Agent's user confirmation gate
88
88
  - Auto-pass sufficiency checks without actual user answers
89
- - Write checkpoints in this Skill — checkpoints are managed by orchestration layer
89
+ - **Checkpoint management is FORBIDDEN in this Skill**
90
+ - MUST NOT create, write, or modify `.checkpoints.json` or any checkpoint files
91
+ - Checkpoint write operations are the responsibility of the orchestration layer (PM Agent)
92
+ - After this Skill completes, PM Agent writes checkpoints ONLY after user confirmation is received
90
93
 
91
94
  ### MANDATORY: User Answer Verification Rule
92
95
 
@@ -95,6 +98,13 @@ Applies ISA-95 Stage 1 (Domain Description) for clarification:
95
98
  - Checkpoint writing is FORBIDDEN in this Skill — checkpoints are managed by the orchestration layer
96
99
  - The sufficiency check result is ONLY valid when based on real user-provided answers
97
100
 
101
+ ### CRITICAL: User Confirmation Event Enforcement
102
+
103
+ 1. **Event Block = Hard Stop**: Each `<block type="event" action="user-confirm">` (E-ROUND-CONFIRM) MUST trigger a pause. Worker MUST NOT proceed until user provides explicit confirmation.
104
+ 2. **No "Automated Scenario" Bypass**: Even in automated dispatch mode (speccrew-task-worker), `user-confirm` events override Worker autonomy. These are explicit user interaction gates, NOT internal automation points.
105
+ 3. **Template-Based Generation Only**: All clarification question files (`.clarification-questions-round-{N}.md`) MUST be generated using the loaded template (CLARIFICATION-QUESTIONS-TEMPLATE.md) with variable substitution. Freeform generation is FORBIDDEN.
106
+ 4. **Template-Based Summary Only**: The `.clarification-summary.md` MUST be generated using CLARIFICATION-SUMMARY-TEMPLATE.md with variable substitution. Freeform generation is FORBIDDEN.
107
+
98
108
  ### CRITICAL: Summary Generation Guard
99
109
 
100
110
  Worker MUST strictly enforce the following before generating `.clarification-summary.md`:
@@ -99,6 +99,13 @@
99
99
  <branch test="${complexity} == 'complex'" name="Complex Mode Clarification">
100
100
  <!-- Clarification Loop -->
101
101
  <block type="loop" id="L1" condition="sufficiency_checks_passed == false AND round_number <= max_rounds" desc="Clarification rounds until sufficiency">
102
+ <!-- MANDATORY: Template-based generation rule -->
103
+ <block type="rule" id="R-TEMPLATE-GENERATION" level="mandatory" desc="Template-based generation is MANDATORY">
104
+ <field name="text">MANDATORY: Clarification questions MUST be generated by loading the template file and performing variable substitution.</field>
105
+ <field name="text">FORBIDDEN: Freeform generation, manual writing, or creating clarification files without using the loaded template.</field>
106
+ <field name="text">The generated file must follow the template structure with all placeholders replaced by actual values.</field>
107
+ </block>
108
+
102
109
  <!-- Load Question Template -->
103
110
  <block type="task" id="B7-load-template" action="read-file" desc="Load clarification questions template">
104
111
  <field name="path" value="${skill_path}/templates/CLARIFICATION-QUESTIONS-TEMPLATE.md"/>
@@ -118,6 +125,13 @@
118
125
  <field name="output" var="questions_file"/>
119
126
  </block>
120
127
 
128
+ <!-- MANDATORY: User confirmation cannot be bypassed -->
129
+ <block type="rule" id="R-USER-CONFIRM-MANDATORY" level="mandatory" desc="User-confirm events MUST pause Worker execution">
130
+ <field name="text">MANDATORY: The following user-confirm event is a HARD STOP. Worker MUST pause and present the prompt to user.</field>
131
+ <field name="text">FORBIDDEN: Skipping, auto-confirming, or bypassing user-confirm events for ANY reason including "automated execution scenario".</field>
132
+ <field name="text">Worker MUST wait for explicit user response before proceeding to the next block.</field>
133
+ </block>
134
+
121
135
  <!-- MANDATORY: Wait for user to answer clarification questions -->
122
136
  <block type="event" id="E-ROUND-CONFIRM" action="user-confirm" desc="Wait for user to answer clarification questions">
123
137
  <field name="prompt">📋 第 ${round_number} 轮澄清问题已生成: ${questions_file}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.7.23",
3
+ "version": "0.7.24",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -184,6 +184,18 @@ Logging, confirmation, and signaling.
184
184
  - `action`: `log` | `confirm` | `signal`
185
185
  - `level` (for log): `debug` | `info` | `warn` | `error`
186
186
 
187
+ #### User-Confirm Event Execution Rules (MANDATORY)
188
+
189
+ When a Worker encounters `<block type="event" action="user-confirm">`:
190
+
191
+ 1. **MUST pause execution** — Stop all processing and present the prompt to the user
192
+ 2. **CANNOT be skipped or auto-confirmed** — Even if Worker considers the scenario "automated"
193
+ 3. **Applies to ALL execution modes** — Including dispatch-to-worker, batch processing, and automated scenarios
194
+ 4. **`skippable="false"` is absolute** — When set, no bypass mechanism is permitted under any circumstances
195
+ 5. **Variable preservation** — Before pausing, ensure all workflow variables are properly set for resumption
196
+
197
+ `user-confirm` events represent **explicit user interaction gates** in the workflow. They exist to ensure human oversight at critical decision points and MUST NOT be optimized away.
198
+
187
199
  ### error-handler
188
200
 
189
201
  Try/catch/finally error handling.