speccrew 0.7.15 → 0.7.17
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 +310 -1669
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +76 -0
- package/.speccrew/skills/speccrew-pm-phase0-init/workflow.agentflow.xml +271 -0
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +95 -0
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/workflow.agentflow.xml +440 -0
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +110 -0
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/workflow.agentflow.xml +341 -0
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +94 -0
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/workflow.agentflow.xml +447 -0
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +92 -0
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/workflow.agentflow.xml +379 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +19 -2
- package/.speccrew/skills/speccrew-pm-requirement-clarify/templates/CLARIFICATION-QUESTIONS-TEMPLATE.md +49 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/templates/CLARIFICATION-SUMMARY-TEMPLATE.md +52 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +65 -19
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +84 -20
- package/.speccrew/skills/speccrew-product-manager-orchestration/workflow.agentflow.xml +196 -495
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-pm-phase0-init
|
|
3
|
+
description: SpecCrew PM Phase 0 Initialization Skill. Handles iteration directory creation, WORKFLOW-PROGRESS.json management, checkpoint recovery, IDE detection, and path initialization. First step before any PM workflow execution.
|
|
4
|
+
tools: Read, Write, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Overview
|
|
8
|
+
|
|
9
|
+
Phase 0 initialization for PM workflow. Ensures proper workspace setup, iteration directory creation, progress tracking initialization, and resume state detection.
|
|
10
|
+
|
|
11
|
+
## Trigger Scenarios
|
|
12
|
+
|
|
13
|
+
- PM Agent starts a new workflow session
|
|
14
|
+
- PM Agent needs to detect or create iteration directory
|
|
15
|
+
- PM Agent needs to check resume state from previous session
|
|
16
|
+
- PM Agent needs to initialize path context variables
|
|
17
|
+
|
|
18
|
+
## Input Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type | Required | Description |
|
|
21
|
+
|-----------|------|----------|-------------|
|
|
22
|
+
| `user_requirement` | string | Yes | User requirement description or document path |
|
|
23
|
+
| `workspace_root` | string | Yes | speccrew-workspace root directory path |
|
|
24
|
+
| `source_path` | string | No | Project source root from .speccrewrc |
|
|
25
|
+
| `language` | string | No | User language (auto-detected) |
|
|
26
|
+
|
|
27
|
+
## Methodology Foundation
|
|
28
|
+
|
|
29
|
+
Applies workspace initialization principles:
|
|
30
|
+
- Iteration directory naming convention: `{number}-{type}-{name}`
|
|
31
|
+
- Progress tracking via WORKFLOW-PROGRESS.json
|
|
32
|
+
- Checkpoint recovery for session continuity
|
|
33
|
+
|
|
34
|
+
## Output Deliverables
|
|
35
|
+
|
|
36
|
+
| Deliverable | Path | Description |
|
|
37
|
+
|-------------|------|-------------|
|
|
38
|
+
| Iteration Directory | `{iterations_dir}/{iteration_name}/` | Created iteration structure |
|
|
39
|
+
| WORKFLOW-PROGRESS.json | `{iteration_path}/WORKFLOW-PROGRESS.json` | Workflow progress tracker |
|
|
40
|
+
| Path Variables | Context | All computed path variables |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# AgentFlow Definition
|
|
45
|
+
|
|
46
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
47
|
+
|
|
48
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
# Output Checklist
|
|
53
|
+
|
|
54
|
+
- [ ] IDE environment detected
|
|
55
|
+
- [ ] Path variables computed (workspace_path, iteration_path, etc.)
|
|
56
|
+
- [ ] Iteration directory created or located
|
|
57
|
+
- [ ] WORKFLOW-PROGRESS.json initialized or loaded
|
|
58
|
+
- [ ] Checkpoint recovery logic executed
|
|
59
|
+
- [ ] Resume target determined
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
# Constraints
|
|
64
|
+
|
|
65
|
+
**Must do:**
|
|
66
|
+
- Follow iteration naming convention `{number}-{type}-{name}`
|
|
67
|
+
- Use `update-progress.js` script for WORKFLOW-PROGRESS.json operations
|
|
68
|
+
- Compute all path variables as absolute paths
|
|
69
|
+
- Check for active iteration before creating new one
|
|
70
|
+
- Copy requirement document to iteration's 00.docs directory
|
|
71
|
+
|
|
72
|
+
**Must not do:**
|
|
73
|
+
- Manually create WORKFLOW-PROGRESS.json via Write/Edit tools
|
|
74
|
+
- Skip checkpoint recovery check
|
|
75
|
+
- Use relative paths in Worker dispatches
|
|
76
|
+
- Create iteration directory without proper naming convention
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="pm-phase0-init" status="pending" version="1.0" desc="PM Phase 0 Initialization - Iteration, Progress, and Path Management">
|
|
3
|
+
|
|
4
|
+
<!-- ============================================================
|
|
5
|
+
Input Parameters Definition
|
|
6
|
+
============================================================ -->
|
|
7
|
+
<block type="input" id="I1" desc="Phase 0 Input Parameters">
|
|
8
|
+
<field name="user_requirement" required="true" type="string" desc="User requirement description or document path"/>
|
|
9
|
+
<field name="workspace_root" required="true" type="string" desc="speccrew-workspace root directory path"/>
|
|
10
|
+
<field name="source_path" required="false" type="string" desc="Project source root from .speccrewrc"/>
|
|
11
|
+
<field name="language" required="false" type="string" desc="User language (auto-detected)"/>
|
|
12
|
+
</block>
|
|
13
|
+
|
|
14
|
+
<!-- ============================================================
|
|
15
|
+
Global Constraints
|
|
16
|
+
============================================================ -->
|
|
17
|
+
<block type="rule" id="R1" level="mandatory" desc="Phase 0 Mandatory Constraints">
|
|
18
|
+
<field name="text">Iteration directories MUST follow naming convention: {number}-{type}-{name}</field>
|
|
19
|
+
<field name="text">ALL WORKFLOW-PROGRESS.json operations MUST use update-progress.js script</field>
|
|
20
|
+
<field name="text">ALL path variables MUST be absolute paths</field>
|
|
21
|
+
<field name="text">Check for active iteration before creating new one</field>
|
|
22
|
+
</block>
|
|
23
|
+
|
|
24
|
+
<block type="rule" id="R2" level="forbidden" desc="Phase 0 Forbidden Actions">
|
|
25
|
+
<field name="text">Manually create WORKFLOW-PROGRESS.json via Write/Edit tools</field>
|
|
26
|
+
<field name="text">Skip checkpoint recovery check</field>
|
|
27
|
+
<field name="text">Use relative paths in context variables</field>
|
|
28
|
+
</block>
|
|
29
|
+
|
|
30
|
+
<!-- ============================================================
|
|
31
|
+
Main Processing Sequence
|
|
32
|
+
============================================================ -->
|
|
33
|
+
<sequence id="S1" name="Phase 0: Workflow Progress Management" status="pending">
|
|
34
|
+
|
|
35
|
+
<!-- ========== Step 0.5: IDE Detection ========== -->
|
|
36
|
+
<block type="task" id="P0-5-B1" action="detect-ide" status="pending" desc="Detect current IDE environment">
|
|
37
|
+
<!-- Detect IDE from environment or context: Claude Code, Cursor, Qoder, etc. -->
|
|
38
|
+
<field name="output" var="ide_type"/>
|
|
39
|
+
<field name="output" var="ide_config_dir">
|
|
40
|
+
<!-- Mapping: Claude Code -> .claude, Cursor -> .cursor, Qoder -> .qoder -->
|
|
41
|
+
</field>
|
|
42
|
+
<field name="output" var="ide_skills_dir"/>
|
|
43
|
+
</block>
|
|
44
|
+
|
|
45
|
+
<!-- ========== Step 0.6: Path Initialization ========== -->
|
|
46
|
+
<block type="task" id="P0-6-B1" action="compute-paths" status="pending" desc="Compute all workflow paths">
|
|
47
|
+
<!-- All paths MUST be absolute -->
|
|
48
|
+
<field name="source_path" value="${source_path}"/>
|
|
49
|
+
<field name="workspace_path" value="${workspace_root}"/>
|
|
50
|
+
<field name="output" var="sync_state_bizs_dir" value="${workspace_root}/knowledges/base/sync-state/knowledge-bizs"/>
|
|
51
|
+
<field name="output" var="iterations_dir" value="${workspace_root}/iterations"/>
|
|
52
|
+
<field name="output" var="update_progress_script" value="${workspace_root}/scripts/update-progress.js"/>
|
|
53
|
+
<field name="output" var="configs_dir" value="${workspace_root}/docs/configs"/>
|
|
54
|
+
</block>
|
|
55
|
+
|
|
56
|
+
<!-- ========== Step 0.1: Iteration Directory Management ========== -->
|
|
57
|
+
|
|
58
|
+
<!-- Step 0.1.0: Search for Active Iteration -->
|
|
59
|
+
<block type="task" id="P0-1-B1" action="glob" status="pending" desc="Search for active iteration">
|
|
60
|
+
<field name="pattern" value="${iterations_dir}/*/WORKFLOW-PROGRESS.json"/>
|
|
61
|
+
<field name="output" var="existing_progress_files"/>
|
|
62
|
+
</block>
|
|
63
|
+
|
|
64
|
+
<!-- Gateway: Has Active Iteration? -->
|
|
65
|
+
<block type="gateway" id="P0-1-G1" mode="exclusive" desc="Check for active iteration">
|
|
66
|
+
|
|
67
|
+
<!-- Branch: Found active iteration with in_progress status -->
|
|
68
|
+
<branch test="exists(${existing_progress_files}) AND any(${existing_progress_files}/01_prd.status == 'in_progress')" name="Has Active Iteration">
|
|
69
|
+
<block type="task" id="P0-1-B2" action="read-json" status="pending" desc="Read active iteration progress">
|
|
70
|
+
<field name="path" value="${active_iteration_progress_file}"/>
|
|
71
|
+
<field name="output" var="workflow_progress"/>
|
|
72
|
+
</block>
|
|
73
|
+
<block type="task" id="P0-1-B3" action="set-var" status="pending" desc="Set iteration path from existing">
|
|
74
|
+
<field name="iteration_path" value="${active_iteration_path}"/>
|
|
75
|
+
<field name="iteration_name" value="${active_iteration_name}"/>
|
|
76
|
+
</block>
|
|
77
|
+
<!-- Skip to Step 0.2 for checkpoint recovery -->
|
|
78
|
+
<block type="goto" id="P0-1-GOTO1" target="P0-2-B1"/>
|
|
79
|
+
</branch>
|
|
80
|
+
|
|
81
|
+
<!-- Branch: All iterations completed or no iteration found -->
|
|
82
|
+
<branch name="Create New Iteration" default="true">
|
|
83
|
+
|
|
84
|
+
<!-- Step 2.1: Determine next sequence number -->
|
|
85
|
+
<block type="task" id="P0-1-B4" action="analyze" status="pending" desc="Determine next sequence number">
|
|
86
|
+
<field name="action" value="list-directories"/>
|
|
87
|
+
<field name="path" value="${iterations_dir}"/>
|
|
88
|
+
<field name="output" var="existing_iterations"/>
|
|
89
|
+
<field name="output" var="next_sequence" value="max(existing_numbers) + 1 OR 001"/>
|
|
90
|
+
</block>
|
|
91
|
+
|
|
92
|
+
<!-- Step 2.2: Determine iteration type -->
|
|
93
|
+
<block type="task" id="P0-1-B5" action="analyze" status="pending" desc="Determine iteration type">
|
|
94
|
+
<field name="input" value="${user_requirement}"/>
|
|
95
|
+
<!-- Mapping: new feature -> feature, bug fix -> bugfix, refactoring -> refactor -->
|
|
96
|
+
<field name="output" var="iteration_type"/>
|
|
97
|
+
</block>
|
|
98
|
+
|
|
99
|
+
<!-- Step 2.3: Extract short name -->
|
|
100
|
+
<block type="task" id="P0-1-B6" action="analyze" status="pending" desc="Extract short name from requirement">
|
|
101
|
+
<field name="input" value="${user_requirement}"/>
|
|
102
|
+
<!-- Derive from filename or main subject, kebab-case, 1-3 words -->
|
|
103
|
+
<field name="output" var="iteration_short_name"/>
|
|
104
|
+
</block>
|
|
105
|
+
|
|
106
|
+
<!-- Step 2.4: Compose iteration name -->
|
|
107
|
+
<block type="task" id="P0-1-B7" action="set-var" status="pending" desc="Set iteration name">
|
|
108
|
+
<field name="iteration_name" value="${next_sequence}-${iteration_type}-${iteration_short_name}"/>
|
|
109
|
+
<field name="iteration_path" value="${iterations_dir}/${iteration_name}"/>
|
|
110
|
+
</block>
|
|
111
|
+
|
|
112
|
+
<!-- Step 2.5: Create directory structure -->
|
|
113
|
+
<block type="task" id="P0-1-B8" action="run-script" status="pending" desc="Create iteration directory structure">
|
|
114
|
+
<field name="command">New-Item -ItemType Directory -Path "${iteration_path}/00.docs" -Force; New-Item -ItemType Directory -Path "${iteration_path}/01.product-requirement" -Force</field>
|
|
115
|
+
</block>
|
|
116
|
+
|
|
117
|
+
<!-- Step 2.6: Copy requirement document -->
|
|
118
|
+
<block type="task" id="P0-1-B9" action="run-script" status="pending" desc="Copy requirement document to iteration">
|
|
119
|
+
<field name="command">Copy-Item "${user_requirement}" "${iteration_path}/00.docs/" -ErrorAction SilentlyContinue</field>
|
|
120
|
+
</block>
|
|
121
|
+
|
|
122
|
+
<!-- Step 0.1.1: Initialize WORKFLOW-PROGRESS.json -->
|
|
123
|
+
<block type="task" id="P0-1-B10" action="run-script" status="pending" desc="Initialize WORKFLOW-PROGRESS.json via script">
|
|
124
|
+
<!-- MANDATORY: Use update-progress.js script -->
|
|
125
|
+
<field name="command">node "${update_progress_script}" update-workflow --file "${iteration_path}/WORKFLOW-PROGRESS.json" --stage 01_prd --status in_progress</field>
|
|
126
|
+
<field name="output" var="init_result"/>
|
|
127
|
+
</block>
|
|
128
|
+
|
|
129
|
+
</branch>
|
|
130
|
+
</block>
|
|
131
|
+
|
|
132
|
+
<!-- ========== Step 0.2: Check Resume State (Checkpoint Recovery) ========== -->
|
|
133
|
+
|
|
134
|
+
<!-- Step 0.2.1: Read Checkpoints -->
|
|
135
|
+
<block type="task" id="P0-2-B1" action="run-script" status="pending" desc="Read checkpoints if exists">
|
|
136
|
+
<field name="command">node "${update_progress_script}" read --file "${iteration_path}/01.product-requirement/.checkpoints.json" --checkpoints</field>
|
|
137
|
+
<field name="on_error" value="continue"/>
|
|
138
|
+
<field name="output" var="checkpoints"/>
|
|
139
|
+
</block>
|
|
140
|
+
|
|
141
|
+
<!-- Step 0.2.2: Check Intermediate Artifacts -->
|
|
142
|
+
<block type="task" id="P0-2-B2" action="check-files" status="pending" desc="Check intermediate artifact files">
|
|
143
|
+
<field name="files">
|
|
144
|
+
- ${iteration_path}/01.product-requirement/.clarification-summary.md
|
|
145
|
+
- ${iteration_path}/01.product-requirement/.module-design.md
|
|
146
|
+
- ${iteration_path}/01.product-requirement/*-prd.md
|
|
147
|
+
- ${iteration_path}/01.product-requirement/*-sub-*.md
|
|
148
|
+
</field>
|
|
149
|
+
<field name="output" var="artifact_status"/>
|
|
150
|
+
</block>
|
|
151
|
+
|
|
152
|
+
<!-- Gateway: Resume Decision Tree -->
|
|
153
|
+
<block type="gateway" id="P0-2-G1" mode="exclusive" desc="Determine resume point based on checkpoints and artifacts">
|
|
154
|
+
|
|
155
|
+
<!-- Branch: PRD already confirmed -->
|
|
156
|
+
<branch test="${checkpoints.prd_review.passed} == true" name="PRD Confirmed">
|
|
157
|
+
<block type="event" id="P0-2-E1" action="confirm" desc="Ask user if redo needed">
|
|
158
|
+
<field name="prompt">PRD stage already confirmed. Would you like to redo the PRD process?</field>
|
|
159
|
+
</block>
|
|
160
|
+
<block type="task" id="P0-2-B3" action="set-var" desc="Set resume target">
|
|
161
|
+
<field name="resume_target" value="PHASE_REVIEW"/>
|
|
162
|
+
</block>
|
|
163
|
+
</branch>
|
|
164
|
+
|
|
165
|
+
<!-- Branch: Sub-PRD dispatch complete -->
|
|
166
|
+
<branch test="${checkpoints.sub_prd_dispatch.passed} == true" name="Sub-PRD Complete">
|
|
167
|
+
<block type="task" id="P0-2-B4" action="set-var" desc="Set resume target">
|
|
168
|
+
<field name="resume_target" value="PHASE_6_VERIFICATION"/>
|
|
169
|
+
</block>
|
|
170
|
+
</branch>
|
|
171
|
+
|
|
172
|
+
<!-- Branch: Modeling complete (complex path) -->
|
|
173
|
+
<branch test="${checkpoints.requirement_modeling.passed} == true AND ${artifact_status.module_design} == true" name="Modeling Complete">
|
|
174
|
+
<block type="task" id="P0-2-B5" action="set-var" desc="Set resume target">
|
|
175
|
+
<field name="resume_target" value="PHASE_4B_PRD_GENERATION"/>
|
|
176
|
+
</block>
|
|
177
|
+
</branch>
|
|
178
|
+
|
|
179
|
+
<!-- Branch: Clarification confirmed -->
|
|
180
|
+
<branch test="${checkpoints.requirement_clarification_confirmed.passed} == true" name="Clarification Confirmed">
|
|
181
|
+
<block type="task" id="P0-2-B6" action="set-var" desc="Set resume target">
|
|
182
|
+
<field name="resume_target" value="PHASE_4_PRD_SKILL"/>
|
|
183
|
+
</block>
|
|
184
|
+
</branch>
|
|
185
|
+
|
|
186
|
+
<!-- Branch: Clarification done, needs confirmation -->
|
|
187
|
+
<branch test="${checkpoints.requirement_clarification.passed} == true" name="Clarification Done">
|
|
188
|
+
<block type="task" id="P0-2-B7" action="set-var" desc="Set resume target">
|
|
189
|
+
<field name="resume_target" value="PHASE_3_7_USER_CONFIRMATION"/>
|
|
190
|
+
</block>
|
|
191
|
+
</branch>
|
|
192
|
+
|
|
193
|
+
<!-- Branch: Artifacts exist but no checkpoint -->
|
|
194
|
+
<branch test="${artifact_status.clarification_summary} == true" name="Has Artifacts">
|
|
195
|
+
<!-- Check complexity from clarification summary -->
|
|
196
|
+
<block type="task" id="P0-2-B8" action="analyze" desc="Determine resume based on artifacts">
|
|
197
|
+
<field name="input" value="${artifact_status}"/>
|
|
198
|
+
<!--
|
|
199
|
+
Resume Mapping (from agent.md lines 136-150):
|
|
200
|
+
IF .clarification-summary.md exists AND complexity == simple:
|
|
201
|
+
IF Single PRD exists → Phase 6
|
|
202
|
+
ELSE → Phase 4 (Simple Path)
|
|
203
|
+
IF .clarification-summary.md exists AND complexity == complex:
|
|
204
|
+
IF .module-design.md missing → Phase 4a (Modeling)
|
|
205
|
+
IF Master PRD missing → Phase 4b (PRD Generation)
|
|
206
|
+
IF Sub-PRDs incomplete → Phase 5 (Worker Dispatch)
|
|
207
|
+
IF all files exist → Phase 6
|
|
208
|
+
-->
|
|
209
|
+
<field name="output" var="complexity"/>
|
|
210
|
+
<field name="output" var="resume_target"/>
|
|
211
|
+
</block>
|
|
212
|
+
</branch>
|
|
213
|
+
|
|
214
|
+
<!-- Branch: Fresh start -->
|
|
215
|
+
<branch name="Fresh Start" default="true">
|
|
216
|
+
<block type="task" id="P0-2-B9" action="set-var" desc="Set resume target to Phase 1">
|
|
217
|
+
<field name="resume_target" value="PHASE_1_KNOWLEDGE_CHECK"/>
|
|
218
|
+
</block>
|
|
219
|
+
</branch>
|
|
220
|
+
</block>
|
|
221
|
+
|
|
222
|
+
<!-- Step 0.2.3: Check Sub-PRD Dispatch Progress -->
|
|
223
|
+
<block type="gateway" id="P0-2-G2" mode="exclusive" desc="Check Sub-PRD dispatch progress if applicable">
|
|
224
|
+
<branch test="${resume_target} == 'PHASE_5_WORKER_DISPATCH' OR exists(${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json)" name="Has Dispatch Progress">
|
|
225
|
+
<block type="task" id="P0-2-B10" action="run-script" status="pending" desc="Read dispatch progress">
|
|
226
|
+
<field name="command">node "${update_progress_script}" read --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json" --summary</field>
|
|
227
|
+
<field name="output" var="dispatch_progress"/>
|
|
228
|
+
</block>
|
|
229
|
+
<!--
|
|
230
|
+
Resume Logic:
|
|
231
|
+
- Skip tasks with status == "completed"
|
|
232
|
+
- Re-execute tasks with status == "failed"
|
|
233
|
+
- Execute tasks with status == "pending"
|
|
234
|
+
-->
|
|
235
|
+
</branch>
|
|
236
|
+
<branch name="No Dispatch Progress" default="true"/>
|
|
237
|
+
</block>
|
|
238
|
+
|
|
239
|
+
<!-- Step 0.2.4: Display Resume Summary -->
|
|
240
|
+
<block type="event" id="P0-2-E2" action="log" desc="Display resume summary">
|
|
241
|
+
<field name="template">resume-summary</field>
|
|
242
|
+
<field name="data">
|
|
243
|
+
iteration_name: ${iteration_name}
|
|
244
|
+
artifact_status: ${artifact_status}
|
|
245
|
+
resume_target: ${resume_target}
|
|
246
|
+
dispatch_progress: ${dispatch_progress}
|
|
247
|
+
</field>
|
|
248
|
+
</block>
|
|
249
|
+
|
|
250
|
+
</sequence>
|
|
251
|
+
|
|
252
|
+
<!-- ============================================================
|
|
253
|
+
Output Results
|
|
254
|
+
============================================================ -->
|
|
255
|
+
<block type="output" id="O1" desc="Phase 0 Initialization Output">
|
|
256
|
+
<field name="resume_target" from="${resume_target}" type="string" desc="Target phase to resume or start"/>
|
|
257
|
+
<field name="iteration_path" from="${iteration_path}" type="string" desc="Path to iteration directory"/>
|
|
258
|
+
<field name="iteration_name" from="${iteration_name}" type="string" desc="Iteration name"/>
|
|
259
|
+
<field name="workspace_path" from="${workspace_path}" type="string" desc="Workspace root path"/>
|
|
260
|
+
<field name="sync_state_bizs_dir" from="${sync_state_bizs_dir}" type="string" desc="Knowledge sync state directory"/>
|
|
261
|
+
<field name="iterations_dir" from="${iterations_dir}" type="string" desc="Iterations directory"/>
|
|
262
|
+
<field name="update_progress_script" from="${update_progress_script}" type="string" desc="Path to update-progress.js"/>
|
|
263
|
+
<field name="ide_type" from="${ide_type}" type="string" desc="Detected IDE type"/>
|
|
264
|
+
<field name="ide_skills_dir" from="${ide_skills_dir}" type="string" desc="IDE skills directory"/>
|
|
265
|
+
<field name="configs_dir" from="${configs_dir}" type="string" desc="Configs directory"/>
|
|
266
|
+
<field name="workflow_progress" from="${workflow_progress}" type="object" desc="Current workflow progress state"/>
|
|
267
|
+
<field name="checkpoints" from="${checkpoints}" type="object" desc="Checkpoint state"/>
|
|
268
|
+
<field name="message" value="Phase 0 initialization completed" type="string" desc="Status message"/>
|
|
269
|
+
</block>
|
|
270
|
+
|
|
271
|
+
</workflow>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-pm-phase1-knowledge-check
|
|
3
|
+
description: SpecCrew PM Phase 1 Knowledge Base Availability Check Skill. Detects knowledge base status and initializes business knowledge as needed. Supports three-path routing (Full/Lite/None) with Path B deep initialization sequence.
|
|
4
|
+
tools: Read, Write, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Overview
|
|
8
|
+
|
|
9
|
+
Knowledge base availability check for PM workflow. Detects existing knowledge status, routes to appropriate path, and initializes business knowledge when needed.
|
|
10
|
+
|
|
11
|
+
## Trigger Scenarios
|
|
12
|
+
|
|
13
|
+
- PM Agent starts new requirement processing
|
|
14
|
+
- Knowledge base status unknown
|
|
15
|
+
- Feature inventory generation needed
|
|
16
|
+
- Module matching and deep initialization required
|
|
17
|
+
|
|
18
|
+
## Input Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type | Required | Description |
|
|
21
|
+
|-----------|------|----------|-------------|
|
|
22
|
+
| `workspace_path` | string | Yes | Absolute path to speccrew-workspace root |
|
|
23
|
+
| `sync_state_bizs_dir` | string | Yes | Absolute path to knowledges/base/sync-state/knowledge-bizs |
|
|
24
|
+
| `configs_dir` | string | Yes | Absolute path to docs/configs directory |
|
|
25
|
+
| `ide_skills_dir` | string | No | Absolute path to IDE skills directory |
|
|
26
|
+
| `source_path` | string | No | Project source root from .speccrewrc |
|
|
27
|
+
| `language` | string | No | User language (auto-detected if not provided) |
|
|
28
|
+
| `user_requirement` | string | No | User requirement text for module matching |
|
|
29
|
+
| `update_progress_script` | string | Yes | Absolute path to update-progress.js script |
|
|
30
|
+
|
|
31
|
+
## Methodology Foundation
|
|
32
|
+
|
|
33
|
+
Applies knowledge detection and initialization flow:
|
|
34
|
+
- Stage 0: Feature inventory (lightweight metadata scan)
|
|
35
|
+
- Stage 1: Deep module initialization (requirement-scoped analysis)
|
|
36
|
+
|
|
37
|
+
## Output Files
|
|
38
|
+
|
|
39
|
+
| File | Path | Purpose |
|
|
40
|
+
|------|------|---------|
|
|
41
|
+
| Features Inventory | `{sync_state_bizs_dir}/features-{platform}.json` | Platform module and feature metadata |
|
|
42
|
+
| Entry Dirs | `{sync_state_bizs_dir}/entry-dirs-{platform}.json` | Source directory mapping |
|
|
43
|
+
| Module Overview | `{workspace_path}/knowledges/bizs/{platform}/{module}/module-overview.md` | Module documentation |
|
|
44
|
+
| System Overview | `{workspace_path}/knowledges/bizs/system-overview.md` | Aggregated system summary |
|
|
45
|
+
| Graph Data | `{sync_state_bizs_dir}/completed/*.graph.json` | API/UI relationship graph data |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# AgentFlow Definition
|
|
50
|
+
|
|
51
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
52
|
+
|
|
53
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
# Output Checklist
|
|
58
|
+
|
|
59
|
+
- [ ] Knowledge detector dispatched and status obtained
|
|
60
|
+
- [ ] Correct path selected based on status (A/B/C)
|
|
61
|
+
- [ ] **Path A**: System overview summary loaded
|
|
62
|
+
- [ ] **Path B**: Module matcher executed
|
|
63
|
+
- [ ] **Path B Step 1.5**: DISPATCH-PROGRESS.json initialized
|
|
64
|
+
- [ ] **Path B Step 2**: Analyze task plan generated for matched modules
|
|
65
|
+
- [ ] **Path B Step 3**: All feature analysis workers dispatched (parallel)
|
|
66
|
+
- [ ] **Path B Step 3.5**: Graph data generated for all completed analyses
|
|
67
|
+
- [ ] **Path B Step 4**: Module summaries generated
|
|
68
|
+
- [ ] **Path B Step 5**: Features status updated (analyzed=true)
|
|
69
|
+
- [ ] **Path B Step 6**: System overview generated
|
|
70
|
+
- [ ] **Path B Step 7**: Intermediate files cleaned up
|
|
71
|
+
- [ ] **Path C**: Feature inventory generated via Worker
|
|
72
|
+
- [ ] **Path C Re-check**: Detector re-run and status verified
|
|
73
|
+
- [ ] Knowledge context stored for downstream phases
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
# Constraints
|
|
78
|
+
|
|
79
|
+
**Must do:**
|
|
80
|
+
- MUST dispatch Worker with `speccrew-pm-knowledge-detector` skill - DO NOT manually search directories
|
|
81
|
+
- MUST dispatch Worker for `speccrew-knowledge-bizs-init-features` when status is "none"
|
|
82
|
+
- MUST dispatch Worker for `speccrew-pm-module-matcher` in Path B
|
|
83
|
+
- MUST execute all Path B Steps 1-7 in sequence - DO NOT skip to Phase 2
|
|
84
|
+
- MUST use `run_in_terminal` for all script executions via Workers
|
|
85
|
+
- MUST use parallel dispatch (max 5 concurrency) for feature analysis
|
|
86
|
+
- MUST generate graph data (Step 3.5) before module summaries (Step 4)
|
|
87
|
+
- MUST clean up intermediate files after successful completion
|
|
88
|
+
|
|
89
|
+
**Must not do:**
|
|
90
|
+
- Manually create features-*.json or entry-dirs-*.json files
|
|
91
|
+
- Execute knowledge-base scripts directly via Bash (PM Agent must use Workers)
|
|
92
|
+
- Write files to `knowledges/techs/*/sync-state/` - output goes to `knowledges/base/sync-state/knowledge-bizs/` ONLY
|
|
93
|
+
- Skip Steps 2-5 when matcher returns matched modules
|
|
94
|
+
- Ask user "do you want to continue?" mid-way through Path B sequence
|
|
95
|
+
- Expose internal concepts (Stage 0, Stage 1) to user
|