speccrew 0.7.34 → 0.7.35
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.
- package/.speccrew/agents/speccrew-feature-designer.md +22 -4
- package/.speccrew/agents/speccrew-task-worker.md +7 -0
- package/.speccrew/skills/speccrew-feature-designer-orchestration/workflow.agentflow.xml +7 -1
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +8 -0
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +1 -0
- package/package.json +1 -1
|
@@ -54,7 +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
|
+
| 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. If a required temp file (.tasks-temp.json) is missing, this indicates a workflow orchestration gap — follow the XML workflow's regeneration step, do NOT implement workarounds with ad-hoc commands. |
|
|
58
58
|
|
|
59
59
|
## MANDATORY WORKER ENFORCEMENT
|
|
60
60
|
|
|
@@ -756,15 +756,33 @@ If **2+ Feature Specs** in registry:
|
|
|
756
756
|
> Worker will read the skill's workflow.agentflow.xml for its execution plan.
|
|
757
757
|
> See: MANDATORY: Worker Dispatch Prompt Format section above.
|
|
758
758
|
|
|
759
|
+
### Phase 4: API Contract — Task File Management
|
|
760
|
+
|
|
761
|
+
⚠️ **CRITICAL: .tasks-temp.json Regeneration**
|
|
762
|
+
|
|
763
|
+
Phase 3 deletes `.tasks-temp.json` after init. Phase 4 MUST regenerate it before init:
|
|
764
|
+
|
|
765
|
+
1. Read `{iteration_path}/02.feature-design/DISPATCH-PROGRESS.json` (Phase 3 results)
|
|
766
|
+
2. Extract ALL task IDs from the tasks array
|
|
767
|
+
3. Build flat JSON array: `[{"id":"F-M01-01"},{"id":"F-M01-02"},...]`
|
|
768
|
+
4. Write to `{iteration_path}/03.api-contract/.tasks-temp.json`
|
|
769
|
+
5. Run init: `node {workspace_path}/scripts/update-progress.js init --file {iteration_path}/03.api-contract/DISPATCH-PROGRESS.json --stage 02_feature_design_api_contract --tasks-file {iteration_path}/03.api-contract/.tasks-temp.json`
|
|
770
|
+
6. Delete `.tasks-temp.json` after successful init
|
|
771
|
+
|
|
772
|
+
**DO NOT**:
|
|
773
|
+
- Run ad-hoc PowerShell/Bash commands to parse `.prd-feature-list.json`
|
|
774
|
+
- Create custom scripts to build task lists
|
|
775
|
+
- Skip the init step and manually edit DISPATCH-PROGRESS.json
|
|
776
|
+
|
|
759
777
|
1. **Initialize DISPATCH-PROGRESS.json for API Contract stage**:
|
|
760
778
|
|
|
761
779
|
> ⚠️ Use `--tasks-file` instead of `--tasks` to avoid PowerShell JSON parsing issues.
|
|
762
780
|
|
|
763
781
|
```bash
|
|
764
|
-
# Step 1:
|
|
765
|
-
#
|
|
782
|
+
# Step 1: Read Phase 3 DISPATCH-PROGRESS.json and extract all task IDs
|
|
783
|
+
# Build flat JSON array: [{"id":"F-XXX"},...] and write to .tasks-temp.json
|
|
766
784
|
# Step 2: Initialize with --tasks-file
|
|
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}/
|
|
785
|
+
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}/03.api-contract/.tasks-temp.json
|
|
768
786
|
# Step 3: Delete .tasks-temp.json after successful init
|
|
769
787
|
```
|
|
770
788
|
|
|
@@ -65,6 +65,13 @@ When executing design or document generation skills:
|
|
|
65
65
|
- Only output brief block execution announcements
|
|
66
66
|
- This is especially critical in batch mode where multiple Workers run simultaneously
|
|
67
67
|
|
|
68
|
+
### FILE ENCODING
|
|
69
|
+
|
|
70
|
+
ALL file operations MUST use UTF-8 encoding explicitly:
|
|
71
|
+
- When creating files via tools: ensure UTF-8 (most IDE tools default to UTF-8)
|
|
72
|
+
- When writing via Node.js: always pass `'utf8'` as encoding parameter
|
|
73
|
+
- NEVER rely on system default encoding — Chinese Windows defaults to GBK which corrupts Unicode characters
|
|
74
|
+
|
|
68
75
|
**FORBIDDEN output in conversation during design tasks:**
|
|
69
76
|
- ASCII wireframes / UI prototypes
|
|
70
77
|
- Mermaid diagrams (these go in the file only)
|
|
@@ -355,9 +355,15 @@
|
|
|
355
355
|
<field name="text">DO NOT invoke speccrew-fd-api-contract directly</field>
|
|
356
356
|
</block>
|
|
357
357
|
|
|
358
|
+
<!-- Phase 4.1a: Regenerate tasks file from Phase 3 completed features -->
|
|
359
|
+
<block type="task" id="P4-B1c" action="analyze" status="pending" desc="Build API Contract task list from Phase 3 DISPATCH-PROGRESS.json">
|
|
360
|
+
<field name="text">Read ${iteration_path}/02.feature-design/DISPATCH-PROGRESS.json. Extract all task IDs (regardless of status). Build a flat JSON array: [{"id":"F-M01-01"},{"id":"F-M01-02"},...]. Write this array to ${iteration_path}/03.api-contract/.tasks-temp.json</field>
|
|
361
|
+
<field name="output" var="api_contract_tasks_file"/>
|
|
362
|
+
</block>
|
|
363
|
+
|
|
358
364
|
<!-- Initialize DISPATCH-PROGRESS.json for API Contract stage -->
|
|
359
365
|
<block type="task" id="P4-B2" action="run-script" status="pending" desc="Initialize API contract dispatch">
|
|
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}/
|
|
366
|
+
<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}/03.api-contract/.tasks-temp.json</field>
|
|
361
367
|
</block>
|
|
362
368
|
|
|
363
369
|
<!-- MANDATORY: Dispatch prompt must contain ONLY skill path + context data parameters.
|
|
@@ -201,6 +201,14 @@ IF verification fails:
|
|
|
201
201
|
> **Purpose:** Separate feature data from dispatch plan into dedicated `.prd-feature-list.json` file.
|
|
202
202
|
> Each Sub-PRD Worker writes its module's features upon completion.
|
|
203
203
|
|
|
204
|
+
> **CRITICAL: UTF-8 Encoding**
|
|
205
|
+
>
|
|
206
|
+
> When writing ANY file (JSON, Markdown, or other text files), you MUST ensure UTF-8 encoding:
|
|
207
|
+
> - Use `create_file` tool (which defaults to UTF-8) for file creation
|
|
208
|
+
> - If using Node.js scripts: `fs.writeFileSync(path, content, 'utf8')`
|
|
209
|
+
> - NEVER rely on system default encoding (may be GBK on Chinese Windows)
|
|
210
|
+
> - This applies to ALL output files including `.prd-feature-list.json`
|
|
211
|
+
|
|
204
212
|
### 5.1 Determine Feature List File Path
|
|
205
213
|
|
|
206
214
|
```
|
|
@@ -190,6 +190,7 @@
|
|
|
190
190
|
|
|
191
191
|
<block type="task" id="B17" action="write-file" desc="Update feature list file">
|
|
192
192
|
<field name="path" value="${feature_list_path}"/>
|
|
193
|
+
<field name="encoding">utf8</field>
|
|
193
194
|
<field name="merge">true</field>
|
|
194
195
|
<field name="entry" value="${feature_list_entry}"/>
|
|
195
196
|
<field name="output" var="feature_list_updated"/>
|