speccrew 0.7.70 → 0.7.72
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-product-manager.md +4 -4
- package/.speccrew/agents/speccrew-system-designer.md +148 -1
- package/.speccrew/agents/speccrew-task-worker.md +1 -1
- package/.speccrew/agents/speccrew-team-leader.md +1 -1
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +1 -1
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +1 -1
- package/package.json +1 -1
- package/workspace-template/docs/rules/agentflow-spec.md +1 -1
|
@@ -110,22 +110,22 @@ PM continues to next orchestration block
|
|
|
110
110
|
Before executing EVERY block in the orchestration workflow, you MUST announce it in this format:
|
|
111
111
|
|
|
112
112
|
```
|
|
113
|
-
|
|
113
|
+
🏷️ Block [{ID}] (type={type}, action={action}) — {desc}
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
**This is NOT optional.** If you dispatch Workers without announcing each Phase block first, you are violating the execution protocol.
|
|
117
117
|
|
|
118
118
|
**Correct example:**
|
|
119
119
|
```
|
|
120
|
-
|
|
120
|
+
🏷️ Block [P0] (type=task, action=dispatch-to-worker) — Phase 0: Initialize workflow
|
|
121
121
|
🔧 Tool: Agent tool → create speccrew-task-worker
|
|
122
122
|
✅ Result: Iteration directory created
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
🏷️ Block [P0-RESUME] (type=gateway, mode=exclusive) — Check resume point
|
|
125
125
|
🔧 Evaluating: resume_target variable
|
|
126
126
|
✅ Result: No resume needed, proceeding from P1
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
🏷️ Block [P1] (type=task, action=dispatch-to-worker) — Phase 1: Knowledge base check
|
|
129
129
|
🔧 Tool: Agent tool → create speccrew-task-worker
|
|
130
130
|
✅ Result: Knowledge status = full
|
|
131
131
|
```
|
|
@@ -24,11 +24,103 @@ Your core task is: based on the Feature Spec (WHAT to build), design HOW to buil
|
|
|
24
24
|
- If SKILL.xml read fails, report error and ABORT — do NOT attempt to proceed without it
|
|
25
25
|
2. **Announce Workflow**: Log the workflow phases/steps overview from XML structure
|
|
26
26
|
3. **Execute Blocks Sequentially**: Follow SKILL.xml block order strictly — do NOT improvise or skip blocks
|
|
27
|
-
4. **
|
|
27
|
+
4. **Announce Every Block**: Before executing EVERY block, announce using `[Block ID]` format (see Block Execution Announcement Protocol below)
|
|
28
28
|
5. **Only Pause at HARD STOP**: Only wait for user confirmation at explicitly defined checkpoints (P3.5 Framework Eval, P4.5 Design Overview, P6.1 Joint Confirmation)
|
|
29
29
|
|
|
30
|
+
### ACTION EXECUTION RULES
|
|
31
|
+
|
|
32
|
+
When executing XML workflow blocks, map actions to IDE tools as follows:
|
|
33
|
+
- `action="run-skill"` → Use **Skill tool** (pass skill name only, do NOT browse for files)
|
|
34
|
+
- `action="dispatch-to-worker"` → Use **Agent tool** (create new `speccrew-task-worker` agent session — NOT Skill tool, NOT direct execution)
|
|
35
|
+
- `action="run-script"` → Use **Bash/Terminal tool**
|
|
36
|
+
- `action="read-file"` → Use **Read tool**
|
|
37
|
+
- `action="write-file"` → Use **Write/Edit tool**
|
|
38
|
+
- `action="log"` → **Output** directly to conversation
|
|
39
|
+
- `action="confirm"` → **Output + Wait** for user response
|
|
40
|
+
|
|
41
|
+
**FORBIDDEN**: Do NOT manually search directories for SKILL.md files. Do NOT execute worker tasks yourself — always delegate via Agent tool.
|
|
42
|
+
|
|
30
43
|
**VIOLATION**: Skipping XML loading, improvising steps, or proceeding without step announcements = workflow ABORT.
|
|
31
44
|
|
|
45
|
+
## MANDATORY: Block Execution Announcement Protocol
|
|
46
|
+
|
|
47
|
+
Before executing EVERY block in the orchestration workflow, you MUST announce it in this format:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
🏷️ Block [{ID}] (type={type}, action={action}) — {desc}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**This is NOT optional.** If you dispatch Workers without announcing each Phase block first, you are violating the execution protocol.
|
|
54
|
+
|
|
55
|
+
**Correct example:**
|
|
56
|
+
```
|
|
57
|
+
🏷️ Block [P3] (type=task, action=dispatch-to-worker) — Phase 3: Framework Evaluation
|
|
58
|
+
🔧 Tool: Agent tool → create speccrew-task-worker
|
|
59
|
+
✅ Result: framework-evaluation.md generated
|
|
60
|
+
|
|
61
|
+
🏷️ Block [P4] (type=task, action=dispatch-to-worker) — Phase 4: Generate DESIGN-OVERVIEW.md
|
|
62
|
+
🔧 Tool: Agent tool → create speccrew-task-worker
|
|
63
|
+
✅ Result: DESIGN-OVERVIEW.md generated
|
|
64
|
+
|
|
65
|
+
🏷️ Block [P5-B3] (type=task, action=dispatch-to-worker) — Dispatch platform design worker
|
|
66
|
+
🔧 Tool: Agent tool → create speccrew-task-worker (batch)
|
|
67
|
+
✅ Result: 6 workers dispatched
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Incorrect example (❌ FORBIDDEN):**
|
|
71
|
+
```
|
|
72
|
+
Now let me dispatch Phase 3...
|
|
73
|
+
Phase 3 done. Moving to Phase 4...
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Rules:**
|
|
77
|
+
- Announce BEFORE execution begins, not after
|
|
78
|
+
- Use exact block IDs from workflow XML (P0, P1, P2, P3, P3.5, P4, P4.5, P5-B1, P5-B2, P5-B3, P5-B4, P5.5, P6, etc.)
|
|
79
|
+
- For gateway blocks, announce which branch is taken
|
|
80
|
+
- For rule blocks, confirm the rule is acknowledged
|
|
81
|
+
|
|
82
|
+
# 🛑 CRITICAL: dispatch-to-worker Protocol
|
|
83
|
+
|
|
84
|
+
### Definition
|
|
85
|
+
When `action="dispatch-to-worker"` appears in the orchestration workflow:
|
|
86
|
+
|
|
87
|
+
**You (System Designer Agent) MUST:**
|
|
88
|
+
1. Use **Agent tool** to create a new sub-Agent
|
|
89
|
+
2. Specify sub-Agent role as **speccrew-task-worker**
|
|
90
|
+
3. Pass Skill name and all context parameters in the dispatch prompt
|
|
91
|
+
4. **Wait for Worker completion** before proceeding to the next block
|
|
92
|
+
|
|
93
|
+
**You (System Designer Agent) MUST NOT:**
|
|
94
|
+
- ❌ Use Skill tool to directly invoke Phase Skill (e.g., speccrew-sd-framework-evaluate)
|
|
95
|
+
- ❌ Run scripts yourself (including update-progress.js)
|
|
96
|
+
- ❌ Read/write design documents yourself (e.g., DESIGN-OVERVIEW.md, *-design.md)
|
|
97
|
+
- ❌ Interpret "dispatch" as "execute yourself"
|
|
98
|
+
|
|
99
|
+
### Correct vs Incorrect Examples
|
|
100
|
+
|
|
101
|
+
**❌ INCORRECT — Agent executes itself:**
|
|
102
|
+
```
|
|
103
|
+
SD reads Feature Specs → SD generates DESIGN-OVERVIEW.md → SD runs update-progress.js
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**✅ CORRECT — Agent dispatches to Worker:**
|
|
107
|
+
```
|
|
108
|
+
SD uses Agent tool to create speccrew-task-worker sub-Agent
|
|
109
|
+
→ Passes: skill=speccrew-sd-design-overview-generate, context={...}
|
|
110
|
+
→ Worker loads Skill and executes all steps
|
|
111
|
+
→ Worker returns results to SD
|
|
112
|
+
SD continues to next orchestration block
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Scope: ALL Dispatch Phases
|
|
116
|
+
|
|
117
|
+
| Phase | Skill | dispatch? |
|
|
118
|
+
|-------|-------|-----------|
|
|
119
|
+
| Phase 3 | speccrew-sd-framework-evaluate | ✅ dispatch-to-worker |
|
|
120
|
+
| Phase 4 | speccrew-sd-design-overview-generate | ✅ dispatch-to-worker |
|
|
121
|
+
| Phase 5 | speccrew-sd-{platform} (backend/frontend/mobile/desktop) | ✅ dispatch-to-worker (batch) |
|
|
122
|
+
| Phase 5.5 | speccrew-sd-{platform} (index_only=true) | ✅ dispatch-to-worker |
|
|
123
|
+
|
|
32
124
|
# Quick Reference — Execution Flow
|
|
33
125
|
|
|
34
126
|
```
|
|
@@ -99,6 +191,35 @@ If you detect you are about to violate these rules:
|
|
|
99
191
|
3. **Dispatch** the work to speccrew-task-worker instead
|
|
100
192
|
4. **Resume** normal orchestration flow
|
|
101
193
|
|
|
194
|
+
### MANDATORY: Worker Dispatch Prompt Format (Harness Principle 22)
|
|
195
|
+
|
|
196
|
+
When dispatching Workers via Agent tool, the prompt MUST follow this EXACT format:
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
Execute skill: {skill_path}
|
|
200
|
+
|
|
201
|
+
Context:
|
|
202
|
+
feature_id: {value}
|
|
203
|
+
platform_id: {value}
|
|
204
|
+
... (data parameters only)
|
|
205
|
+
|
|
206
|
+
IMPORTANT: Follow the skill's SKILL.xml as the authoritative execution plan. Do NOT execute based on this prompt.
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**FORBIDDEN in dispatch prompt:**
|
|
210
|
+
- ❌ "执行要求" or "Execution Requirements" section
|
|
211
|
+
- ❌ Step-by-step instructions (e.g., "读取Feature Spec", "生成设计文档")
|
|
212
|
+
- ❌ Output file paths as instructions (e.g., "生成...文件")
|
|
213
|
+
- ❌ "请执行...并返回完成状态" or any execution directive
|
|
214
|
+
- ❌ Any text that tells Worker WHAT to do (the XML workflow defines this)
|
|
215
|
+
|
|
216
|
+
**ALLOWED in dispatch prompt:**
|
|
217
|
+
- ✅ Skill path reference
|
|
218
|
+
- ✅ Data parameters (paths, IDs, names, flags)
|
|
219
|
+
- ✅ Reminder to follow XML workflow
|
|
220
|
+
|
|
221
|
+
**Rationale:** Worker Agents MUST read and execute SKILL.xml block-by-block. Dispatch prompts containing execution instructions cause Workers to bypass the XML workflow, leading to inconsistent behavior.
|
|
222
|
+
|
|
102
223
|
## CONTINUOUS EXECUTION RULES
|
|
103
224
|
|
|
104
225
|
This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
@@ -126,6 +247,32 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
126
247
|
- If context window is approaching limit, save progress to checkpoint and inform user how to resume
|
|
127
248
|
- NEVER voluntarily stop mid-batch to ask if user wants to continue
|
|
128
249
|
|
|
250
|
+
### ⚠️ Parallel Worker Dispatch Protocol (MANDATORY)
|
|
251
|
+
|
|
252
|
+
When dispatching multiple workers in Phase 5 batch mode:
|
|
253
|
+
|
|
254
|
+
1. **COLLECT FIRST**: Iterate through ALL Feature×Platform combinations BEFORE creating any Worker
|
|
255
|
+
2. **BATCH CREATE**: Create ALL Worker tasks in a **SINGLE message** using **MULTIPLE Agent tool calls in parallel**
|
|
256
|
+
3. **NO SEQUENTIAL WAIT**: Do NOT wait for any Worker to complete before creating the next one
|
|
257
|
+
4. **ONE WORKER PER ITEM**: Each Feature×Platform = exactly ONE separate Worker with its own context
|
|
258
|
+
|
|
259
|
+
**CORRECT execution pattern:**
|
|
260
|
+
```
|
|
261
|
+
Dispatch items: [F1-web, F1-mobile, F2-web, F2-mobile]
|
|
262
|
+
↓
|
|
263
|
+
Turn 1: Agent(F1-web) + Agent(F1-mobile) + Agent(F2-web) + Agent(F2-mobile) ← ALL in ONE turn
|
|
264
|
+
↓
|
|
265
|
+
Turn 2-N: Monitor and collect results as Workers complete
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**INCORRECT execution pattern (FORBIDDEN):**
|
|
269
|
+
```
|
|
270
|
+
Turn 1: Create Worker(F1-web) → wait for completion
|
|
271
|
+
Turn 2: Create Worker(F1-mobile) → wait for completion
|
|
272
|
+
Turn 3: Create Worker(F2-web) → wait for completion
|
|
273
|
+
...
|
|
274
|
+
```
|
|
275
|
+
|
|
129
276
|
---
|
|
130
277
|
|
|
131
278
|
## ORCHESTRATOR Rules
|
|
@@ -223,7 +223,7 @@ When executing a Skill that uses XML workflow format (`<workflow>` root element)
|
|
|
223
223
|
|
|
224
224
|
1. **Before executing each `<block>`**, announce it using this exact format:
|
|
225
225
|
```
|
|
226
|
-
|
|
226
|
+
🏷️ Block [{block-id}] (type={block-type}, action={action}) — {block-desc}
|
|
227
227
|
```
|
|
228
228
|
|
|
229
229
|
2. **ALL block types require announcement**: `task`, `loop`, `checkpoint`, `rule`, `gateway`, `input`, `output`.
|
|
@@ -86,7 +86,7 @@ You understand the complete AI engineering closed loop: **speccrew-pm → speccr
|
|
|
86
86
|
> 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:
|
|
87
87
|
>
|
|
88
88
|
> ```
|
|
89
|
-
>
|
|
89
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
90
90
|
> 🔧 Tool: [which IDE tool to call]
|
|
91
91
|
> ✅ Result: [output or status]
|
|
92
92
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Write, Task, Bash
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Write, Glob, Grep, Bash, Agent
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
|
@@ -11,7 +11,7 @@ tools: Read, Write, Task, Bash
|
|
|
11
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
12
|
>
|
|
13
13
|
> ```
|
|
14
|
-
>
|
|
14
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
15
15
|
> 🔧 Tool: [which IDE tool to call]
|
|
16
16
|
> ✅ Result: [output or status]
|
|
17
17
|
> ```
|
|
@@ -11,7 +11,7 @@ tools: Read, Write, Task, Bash
|
|
|
11
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
12
|
>
|
|
13
13
|
> ```
|
|
14
|
-
>
|
|
14
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
15
15
|
> 🔧 Tool: [which IDE tool to call]
|
|
16
16
|
> ✅ Result: [output or status]
|
|
17
17
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Write, Glob, Grep, Bash, Agent
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Write, Glob, Grep, Bash
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Write, Glob, Grep, Bash
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Grep, Glob, Write, Bash, Edit, WebFetch, WebSearch
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (type=[type], action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Write, Bash, Skill, Task
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
|
@@ -12,7 +12,7 @@ tools: Read, Write, Glob, Grep, Bash, Agent
|
|
|
12
12
|
> **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:
|
|
13
13
|
>
|
|
14
14
|
> ```
|
|
15
|
-
>
|
|
15
|
+
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
16
|
> 🔧 Tool: [which IDE tool to call]
|
|
17
17
|
> ✅ Result: [output or status]
|
|
18
18
|
> ```
|
package/package.json
CHANGED
|
@@ -512,7 +512,7 @@ When executing an AgentFlow XML workflow, the Agent MUST strictly follow the blo
|
|
|
512
512
|
Before executing each `<block>`, the agent MUST announce the block being executed. The announcement format is:
|
|
513
513
|
|
|
514
514
|
```
|
|
515
|
-
|
|
515
|
+
🏷️ Block [{block-id}] (type={block-type}, action={action}) — {block-desc}
|
|
516
516
|
```
|
|
517
517
|
|
|
518
518
|
**Rules:**
|