speccrew 0.7.33 → 0.7.34
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.
|
@@ -54,6 +54,7 @@ Phase 4: API Contract Generation
|
|
|
54
54
|
| ALL | ABORT ON FAILURE | If any skill invocation fails → STOP and report. Do NOT attempt to generate content manually as fallback |
|
|
55
55
|
| ALL | SCRIPT ENFORCEMENT | All .checkpoints.json and WORKFLOW-PROGRESS.json updates via update-progress.js script. Manual JSON creation FORBIDDEN |
|
|
56
56
|
| ALL | NAME LOCK | After Phase 2 Feature List is confirmed, feature_name is immutable. All Skills MUST use the exact parameter value for output filenames. Name translation or substitution is FORBIDDEN |
|
|
57
|
+
| ALL | ANTI-SCRIPT | Agent MUST NOT create custom automation scripts. DO NOT generate helper scripts (.sh, .ps1, .js) for batch processing or progress checking. Use ONLY the standard update-progress.js commands in documented workflow order. |
|
|
57
58
|
|
|
58
59
|
## MANDATORY WORKER ENFORCEMENT
|
|
59
60
|
|
|
@@ -130,6 +131,9 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
130
131
|
4. DO NOT ask for confirmation before generating output files
|
|
131
132
|
5. DO NOT warn about "large number of files" — proceed with generation
|
|
132
133
|
6. DO NOT offer "Should I proceed with the remaining items?"
|
|
134
|
+
7. DO NOT create custom scripts to automate batch processing — use ONLY update-progress.js
|
|
135
|
+
8. DO NOT write helper scripts for progress checking or task management
|
|
136
|
+
9. DO NOT suggest "Let me create a script to handle this more efficiently"
|
|
133
137
|
|
|
134
138
|
### When to Pause (ONLY these cases)
|
|
135
139
|
|
|
@@ -162,9 +166,15 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
162
166
|
> - If context window is exhausted, STOP and report progress — do NOT skip ahead
|
|
163
167
|
> - When resuming, read DISPATCH-PROGRESS.json and continue from where you left off
|
|
164
168
|
>
|
|
165
|
-
> **Phase Transition Rule:**
|
|
166
|
-
> Phase 4 CANNOT start until
|
|
167
|
-
>
|
|
169
|
+
> **Phase 3→4 Transition Rule:**
|
|
170
|
+
> Phase 4 CANNOT start until:
|
|
171
|
+
> 1. DISPATCH-PROGRESS.json (02.feature-design/) shows counts.pending == 0
|
|
172
|
+
> 2. All Feature Spec files exist in output directory
|
|
173
|
+
> This is enforced by workflow XML validation gates — Agent MUST NOT skip or manually override.
|
|
174
|
+
>
|
|
175
|
+
> **Phase 4 Progress File:**
|
|
176
|
+
> Phase 4 uses a SEPARATE progress file: `03.api-contract/DISPATCH-PROGRESS.json`
|
|
177
|
+
> This ensures Phase 3 completion status is preserved.
|
|
168
178
|
|
|
169
179
|
## ABORT CONDITIONS
|
|
170
180
|
|
|
@@ -754,7 +764,7 @@ If **2+ Feature Specs** in registry:
|
|
|
754
764
|
# Step 1: Write tasks JSON to temp file inside iteration directory
|
|
755
765
|
# Create .tasks-temp.json with the task array content
|
|
756
766
|
# Step 2: Initialize with --tasks-file
|
|
757
|
-
node {update_progress_script} init --file {iterations_dir}/{iteration}/
|
|
767
|
+
node {update_progress_script} init --file {iterations_dir}/{iteration}/03.api-contract/DISPATCH-PROGRESS.json --stage 02_feature_design_api_contract --tasks-file {iterations_dir}/{iteration}/02.feature-design/.tasks-temp.json
|
|
758
768
|
# Step 3: Delete .tasks-temp.json after successful init
|
|
759
769
|
```
|
|
760
770
|
|
|
@@ -776,7 +786,7 @@ If **2+ Feature Specs** in registry:
|
|
|
776
786
|
|
|
777
787
|
3. **Wait for batch completion**, update progress per worker:
|
|
778
788
|
```bash
|
|
779
|
-
node {update_progress_script} update-task --file {iterations_dir}/{iteration}/
|
|
789
|
+
node {update_progress_script} update-task --file {iterations_dir}/{iteration}/03.api-contract/DISPATCH-PROGRESS.json --task-id {feature_id} --status completed
|
|
780
790
|
```
|
|
781
791
|
|
|
782
792
|
4. **Update `.checkpoints.json`** for each completed Feature:
|
|
@@ -794,7 +804,7 @@ When any API Contract worker reports failure:
|
|
|
794
804
|
|
|
795
805
|
1. **Update status**:
|
|
796
806
|
```bash
|
|
797
|
-
node {update_progress_script} update-task --file {iterations_dir}/{iteration}/
|
|
807
|
+
node {update_progress_script} update-task --file {iterations_dir}/{iteration}/03.api-contract/DISPATCH-PROGRESS.json --task-id {feature_id} --status failed --error "[Phase 4] {error_message}"
|
|
798
808
|
```
|
|
799
809
|
|
|
800
810
|
2. **Continue batch**: Do NOT stop entire batch for single failure. Complete remaining workers.
|
|
@@ -310,6 +310,25 @@
|
|
|
310
310
|
<field name="message">📊 Phase 4: API Contract Generation</field>
|
|
311
311
|
</block>
|
|
312
312
|
|
|
313
|
+
<!-- Read Phase 3 completion status -->
|
|
314
|
+
<block type="task" id="P4-V1" action="run-script" status="pending" desc="Read Feature Design completion status">
|
|
315
|
+
<field name="command">node ${workspace_root}/scripts/update-progress.js read --file ${iteration_path}/02.feature-design/DISPATCH-PROGRESS.json --overview</field>
|
|
316
|
+
<field name="output" var="phase3_progress"/>
|
|
317
|
+
</block>
|
|
318
|
+
|
|
319
|
+
<block type="gateway" id="P4-V2" mode="exclusive" desc="Verify Phase 3 completed before Phase 4">
|
|
320
|
+
<branch test="${phase3_progress.counts.pending} > 0" name="Phase 3 Incomplete">
|
|
321
|
+
<block type="event" id="P4-V3" action="abort" desc="Phase 3 not complete">
|
|
322
|
+
<field name="message">ABORT: Phase 3 (Feature Design) has ${phase3_progress.counts.pending} pending tasks. Cannot start Phase 4.</field>
|
|
323
|
+
</block>
|
|
324
|
+
</branch>
|
|
325
|
+
<branch default="true" name="Phase 3 Complete">
|
|
326
|
+
<block type="event" id="P4-V4" action="log" desc="Phase 3 verified">
|
|
327
|
+
<field name="message">✅ Phase 3 complete. Proceeding to Phase 4 (API Contract).</field>
|
|
328
|
+
</block>
|
|
329
|
+
</branch>
|
|
330
|
+
</block>
|
|
331
|
+
|
|
313
332
|
<!-- Phase 4.1: Dispatch Mode Decision -->
|
|
314
333
|
<block type="gateway" id="P4-G1" mode="exclusive" desc="Dispatch mode for API Contract">
|
|
315
334
|
|
|
@@ -338,7 +357,7 @@
|
|
|
338
357
|
|
|
339
358
|
<!-- Initialize DISPATCH-PROGRESS.json for API Contract stage -->
|
|
340
359
|
<block type="task" id="P4-B2" action="run-script" status="pending" desc="Initialize API contract dispatch">
|
|
341
|
-
<field name="command">node ${workspace_root}/scripts/update-progress.js init --file ${iteration_path}/
|
|
360
|
+
<field name="command">node ${workspace_root}/scripts/update-progress.js init --file ${iteration_path}/03.api-contract/DISPATCH-PROGRESS.json --stage 02_feature_design_api_contract --tasks-file ${iteration_path}/02.feature-design/.tasks-temp.json</field>
|
|
342
361
|
</block>
|
|
343
362
|
|
|
344
363
|
<!-- MANDATORY: Dispatch prompt must contain ONLY skill path + context data parameters.
|
|
@@ -362,12 +381,27 @@
|
|
|
362
381
|
</block>
|
|
363
382
|
|
|
364
383
|
<block type="task" id="P4-B4" action="run-script" status="pending" desc="Update worker progress">
|
|
365
|
-
<field name="command">node ${workspace_root}/scripts/update-progress.js update-task --file ${iteration_path}/
|
|
384
|
+
<field name="command">node ${workspace_root}/scripts/update-progress.js update-task --file ${iteration_path}/03.api-contract/DISPATCH-PROGRESS.json --task-id ${item.feature_id} --status ${worker_status}</field>
|
|
366
385
|
</block>
|
|
367
386
|
</block>
|
|
368
387
|
</branch>
|
|
369
388
|
</block>
|
|
370
389
|
|
|
390
|
+
<!-- Read Phase 4 completion summary -->
|
|
391
|
+
<block type="task" id="P4-B5a" action="run-script" status="pending" desc="Read API Contract completion summary">
|
|
392
|
+
<field name="command">node ${workspace_root}/scripts/update-progress.js read --file ${iteration_path}/03.api-contract/DISPATCH-PROGRESS.json --overview</field>
|
|
393
|
+
<field name="output" var="api_contract_progress"/>
|
|
394
|
+
</block>
|
|
395
|
+
|
|
396
|
+
<block type="gateway" id="P4-G2" mode="exclusive" desc="Check API Contract dispatch status">
|
|
397
|
+
<branch test="${api_contract_progress.counts.failed} > ${api_contract_progress.counts.total} / 2" name="Majority Failed">
|
|
398
|
+
<block type="event" id="P4-E-ABORT" action="abort" desc="API Contract batch failure threshold exceeded">
|
|
399
|
+
<field name="message">ABORT: More than 50% of API Contract tasks failed (${api_contract_progress.counts.failed}/${api_contract_progress.counts.total}).</field>
|
|
400
|
+
</block>
|
|
401
|
+
</branch>
|
|
402
|
+
<branch default="true" name="Acceptable"/>
|
|
403
|
+
</block>
|
|
404
|
+
|
|
371
405
|
<!-- Phase 4.4: Joint Confirmation -->
|
|
372
406
|
<block type="checkpoint" id="P4-CP1" name="api_contract_joint" desc="Joint confirmation gate">
|
|
373
407
|
<field name="required" value="true"/>
|