speccrew 0.7.73 → 0.7.75
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 +96 -0
- package/.speccrew/agents/speccrew-product-manager.md +55 -0
- package/.speccrew/agents/speccrew-system-deployer.md +178 -0
- package/.speccrew/agents/speccrew-system-developer.md +177 -0
- package/.speccrew/agents/speccrew-task-worker.md +18 -0
- package/.speccrew/agents/speccrew-team-leader.md +56 -0
- package/.speccrew/agents/speccrew-test-manager.md +167 -0
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +6 -149
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +2 -59
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +2 -64
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +2 -75
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +2 -70
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +2 -381
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +2 -369
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +2 -362
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +2 -304
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +2 -294
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +2 -204
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +2 -169
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +2 -251
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +2 -254
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +2 -748
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +6 -105
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +6 -33
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +3 -138
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +3 -283
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +3 -1014
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +4 -343
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +4 -235
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +6 -72
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +3 -534
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +3 -432
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +4 -391
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -98
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -92
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +3 -181
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +3 -148
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +3 -330
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +6 -159
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +3 -142
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +3 -568
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +3 -180
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +3 -154
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +3 -176
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +4 -88
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +4 -178
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -102
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +5 -78
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +5 -85
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +4 -100
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +14 -106
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +7 -84
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +6 -66
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +4 -96
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +4 -131
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +4 -76
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +3 -281
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +6 -165
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +2 -35
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +6 -98
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +2 -58
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +2 -61
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +2 -102
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +3 -121
- package/package.json +1 -1
- package/workspace-template/docs/rules/agentflow-spec.md +56 -8
|
@@ -4,758 +4,12 @@ description: Unified Feature Analysis & Design SOP. Performs complete feature an
|
|
|
4
4
|
tools: Read, Write, Glob, Grep, search_replace
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Methodology Foundation
|
|
8
|
-
|
|
9
|
-
This skill applies ISA-95 Stages 1-6 as an internal thinking framework:
|
|
10
|
-
|
|
11
|
-
| ISA-95 Stage | Phase | Purpose |
|
|
12
|
-
|--------------|-------|---------|
|
|
13
|
-
| Stage 1: Domain Description | Analysis | Understand business context, scope boundaries, glossary |
|
|
14
|
-
| Stage 2: Information Flows | Analysis | Identify data sources, destinations, and cross-module exchanges |
|
|
15
|
-
| Stage 3: Categories of Information | Analysis | Classify data entities and establish information hierarchy |
|
|
16
|
-
| Stage 4: Information Flows | Design | Map cross-module data flows, identify API endpoints |
|
|
17
|
-
| Stage 5: Categories of Information | Design | Classify data entities, build data dictionary |
|
|
18
|
-
| Stage 6: Information Descriptions | Design | Define validation rules, output standards, traceability |
|
|
19
|
-
|
|
20
|
-
> No separate modeling documents. Methodology guides thinking quality.
|
|
21
|
-
|
|
22
7
|
# Trigger Scenarios
|
|
23
|
-
|
|
24
8
|
- PRD has been confirmed, user requests to start feature analysis and design
|
|
25
9
|
- Feature Designer Agent needs to analyze PRD and produce Feature Spec in one pass
|
|
26
10
|
- User asks "Design this feature" or "Analyze and design this requirement"
|
|
27
11
|
|
|
28
12
|
## AgentFlow Definition
|
|
29
|
-
|
|
30
13
|
<!-- @agentflow: SKILL.xml -->
|
|
31
|
-
|
|
32
|
-
>
|
|
33
|
-
|
|
34
|
-
## Workflow
|
|
35
|
-
|
|
36
|
-
**MANDATORY:**
|
|
37
|
-
- **Business Perspective Only** — Feature Analysis is a PURE BUSINESS document. It describes WHAT the system does from a business/user perspective, NOT HOW it's technically implemented.
|
|
38
|
-
- **Mermaid for all diagrams** — ALL business flows, interaction sequences, and cross-function flows MUST use Mermaid syntax (`flowchart TB`, `sequenceDiagram`). Plain text ASCII flowcharts are FORBIDDEN.
|
|
39
|
-
|
|
40
|
-
## Absolute Constraints
|
|
41
|
-
|
|
42
|
-
> **Violation = task failure**
|
|
43
|
-
|
|
44
|
-
**ABORT CONDITIONS:**
|
|
45
|
-
- PRD document missing → HARD STOP
|
|
46
|
-
- Template file missing → HARD STOP
|
|
47
|
-
- System overview missing → HARD STOP
|
|
48
|
-
|
|
49
|
-
1. **FORBIDDEN: Script execution failure** — If `update-progress.js` fails, HARD STOP and report error
|
|
50
|
-
2. **FORBIDDEN: Hand-written `.checkpoints.json`** — ALWAYS use `update-progress.js` script
|
|
51
|
-
3. **FORBIDDEN: Skip Checkpoint A** — User confirmation required before proceeding to design phase (unless `skip_analysis_checkpoint=true`)
|
|
52
|
-
4. **FORBIDDEN: Skip Checkpoint B** — User confirmation required before generating documents (unless `skip_checkpoint=true`)
|
|
53
|
-
5. **FORBIDDEN: Rename features** — Output filename MUST use the exact `feature_name` parameter value. DO NOT translate, abbreviate, paraphrase, or substitute with alternative names found in PRD content. The `feature_name` parameter is the SINGLE SOURCE OF TRUTH for file naming.
|
|
54
|
-
|
|
55
|
-
> **CRITICAL: Script Path Rule**
|
|
56
|
-
> ALL update-progress.js commands MUST use absolute paths with `{workspace_path}`:
|
|
57
|
-
> ```
|
|
58
|
-
> node "{workspace_path}/scripts/update-progress.js" update-task --file "{workspace_path}/iterations/..." ...
|
|
59
|
-
> ```
|
|
60
|
-
> NEVER use relative paths like `node scripts/update-progress.js` or `cd ... ; node scripts/...`
|
|
61
|
-
> The Worker may execute from project root directory, NOT from speccrew-workspace directory.
|
|
62
|
-
|
|
63
|
-
⛔ **ABSOLUTE PROHIBITION — Phase B Content Filling:**
|
|
64
|
-
- NEVER use `create_file` to rewrite or recreate the document after Step 5 skeleton creation
|
|
65
|
-
- NEVER abandon `search_replace` mid-way and switch to `create_file`
|
|
66
|
-
- Even if the document is very long, you MUST continue using `search_replace` for EVERY section
|
|
67
|
-
- Violation of this rule invalidates the entire output
|
|
68
|
-
|
|
69
|
-
**MANDATORY:**
|
|
70
|
-
- Template-first workflow — Step 5 (copy template) MUST precede Step 6 (fill content)
|
|
71
|
-
- **Mermaid for all diagrams** — ALL interaction flows, processing logic flows, and cross-function sequences MUST use Mermaid syntax (`sequenceDiagram`, `flowchart TD`). Plain text ASCII flowcharts are FORBIDDEN for these sections. Reference: `speccrew-workspace/docs/rules/mermaid-rule.md`.
|
|
72
|
-
|
|
73
|
-
**NOTE:** Analysis and design process is internal — no intermediate analysis or design-data files are produced.
|
|
74
|
-
|
|
75
|
-
**FORBIDDEN: Rename features** — Output filename MUST use the exact `feature_name` parameter value. DO NOT translate, abbreviate, paraphrase, or substitute with names derived from analysis content. The `feature_name` parameter is the SINGLE SOURCE OF TRUTH for file naming.
|
|
76
|
-
|
|
77
|
-
## Step 0: Input Parameters
|
|
78
|
-
|
|
79
|
-
| Parameter | Required | Description |
|
|
80
|
-
|-----------|----------|-------------|
|
|
81
|
-
| `prd_path` | Yes | Path to the Sub-PRD document |
|
|
82
|
-
| `feature_id` | No | Feature identifier (e.g., `F-CRM-01`) |
|
|
83
|
-
| `feature_name` | No | Feature name in English (e.g., `customer-list`) |
|
|
84
|
-
| `feature_type` | No | `Page+API` or `API-only` |
|
|
85
|
-
| `iteration_id` | No | Current iteration identifier |
|
|
86
|
-
| `frontend_platforms` | No | List of frontend platforms (auto-discover if not provided) |
|
|
87
|
-
| `skip_analysis_checkpoint` | No | Boolean, default `false`. Skip Checkpoint A if `true` (batch mode) |
|
|
88
|
-
| `skip_checkpoint` | No | Boolean, default `false`. Skip Checkpoint B if `true` (batch mode) |
|
|
89
|
-
| `output_path` | No | Custom output path for Feature Spec (auto-generated if not provided) |
|
|
90
|
-
|
|
91
|
-
## Step 0.1: Read PRD Input
|
|
92
|
-
|
|
93
|
-
### 0.1.1 Read PRD
|
|
94
|
-
|
|
95
|
-
Read the PRD document at `{prd_path}` (typically `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[module-name]-prd.md`)
|
|
96
|
-
|
|
97
|
-
### 0.1.2 Focus on Specific Feature (when feature_id provided)
|
|
98
|
-
|
|
99
|
-
If `feature_id` is provided:
|
|
100
|
-
- Locate the specific Feature in PRD Section 3.4 "Feature Breakdown"
|
|
101
|
-
- Extract only the user stories and requirements related to this Feature
|
|
102
|
-
- Ignore other Features in the same PRD
|
|
103
|
-
|
|
104
|
-
### 0.1.3 Backward Compatibility (when feature_id not provided)
|
|
105
|
-
|
|
106
|
-
If `feature_id` is NOT provided, process entire PRD using legacy mode.
|
|
107
|
-
|
|
108
|
-
## Step 0.2: Load System Knowledge
|
|
109
|
-
|
|
110
|
-
### 0.2.1 Read System Overview
|
|
111
|
-
|
|
112
|
-
Read: `speccrew-workspace/knowledges/bizs/system-overview.md`
|
|
113
|
-
|
|
114
|
-
### 0.2.2 Load Related Module Overviews
|
|
115
|
-
|
|
116
|
-
Based on PRD content, identify related modules and read:
|
|
117
|
-
```
|
|
118
|
-
speccrew-workspace/knowledges/bizs/{module-name}/{module-name}-overview.md
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### 0.2.3 Discover Frontend Platforms
|
|
122
|
-
|
|
123
|
-
Read `speccrew-workspace/knowledges/techs/techs-manifest.json` to identify frontend platforms:
|
|
124
|
-
|
|
125
|
-
| Platform Type | Examples |
|
|
126
|
-
|---------------|----------|
|
|
127
|
-
| `web-*` | web-vue, web-react |
|
|
128
|
-
| `mobile-*` | mobile-uniapp, mobile-flutter |
|
|
129
|
-
|
|
130
|
-
- If `frontend_platforms` parameter provided, use that list
|
|
131
|
-
- Otherwise, read techs-manifest.json directly
|
|
132
|
-
|
|
133
|
-
### 0.2.4 Query Knowledge Graph (Optional)
|
|
134
|
-
|
|
135
|
-
If cross-module relationships need analysis, use `speccrew-knowledge-graph-query` skill.
|
|
136
|
-
|
|
137
|
-
## Step 0.3: Function Breakdown
|
|
138
|
-
|
|
139
|
-
Break down PRD functional requirements into implementable system functions.
|
|
140
|
-
|
|
141
|
-
### 0.3.1 Feature-Based Decomposition (when feature_id provided)
|
|
142
|
-
|
|
143
|
-
When processing a single Feature:
|
|
144
|
-
|
|
145
|
-
1. **Extract Feature Scope**: From PRD Section 3.4, locate the specific Feature by `feature_id`
|
|
146
|
-
2. **Identify Related User Stories**: Extract only user stories mapped to this Feature
|
|
147
|
-
3. **Decompose into Functions**: Break down into 3-8 focused Functions
|
|
148
|
-
4. **Check feature_type**: Mark `API-only` for backend-only design
|
|
149
|
-
|
|
150
|
-
### 0.3.2 Full PRD Decomposition (backward compatibility)
|
|
151
|
-
|
|
152
|
-
When `feature_id` is NOT provided (legacy mode):
|
|
153
|
-
- Decompose entire PRD into all required Functions
|
|
154
|
-
- May result in 10-20 Functions for complex modules
|
|
155
|
-
|
|
156
|
-
### 0.3.3 Function Analysis
|
|
157
|
-
|
|
158
|
-
For each function, identify:
|
|
159
|
-
|
|
160
|
-
| Aspect | Analysis Content |
|
|
161
|
-
|--------|------------------|
|
|
162
|
-
| **Frontend Changes** | New pages, components, or modifications to existing UI |
|
|
163
|
-
| **Backend Changes** | New interfaces or modifications to existing logic |
|
|
164
|
-
| **Data Changes** | New data structures or modifications to existing data |
|
|
165
|
-
| **System Relationship** | How this relates to existing system capabilities |
|
|
166
|
-
|
|
167
|
-
### Mark Relationship to Existing System
|
|
168
|
-
|
|
169
|
-
| Marker | Meaning | Example |
|
|
170
|
-
|--------|---------|---------|
|
|
171
|
-
| `[EXISTING]` | Reuse current system capability | `[EXISTING] User authentication system` |
|
|
172
|
-
| `[MODIFIED]` | Enhance/change existing feature | `[MODIFIED] Add validation to user profile form` |
|
|
173
|
-
| `[NEW]` | Create brand new functionality | `[NEW] Order management module` |
|
|
174
|
-
|
|
175
|
-
## Step 0.4: Checkpoint A — Function Breakdown Confirmation
|
|
176
|
-
|
|
177
|
-
**Conditional Execution:** If `skip_analysis_checkpoint=true`, skip user confirmation and proceed to Step 1.
|
|
178
|
-
|
|
179
|
-
If `skip_analysis_checkpoint=false` (default):
|
|
180
|
-
1. Present function breakdown with [EXISTING]/[MODIFIED]/[NEW] markers to user
|
|
181
|
-
2. Ask: "Does this function breakdown align with your understanding of the requirements?"
|
|
182
|
-
3. **HARD STOP** — Wait for user confirmation before proceeding
|
|
183
|
-
|
|
184
|
-
### Checkpoint A Progress Update
|
|
185
|
-
|
|
186
|
-
After user confirms (or if skipped):
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
node "{workspace_path}/scripts/update-progress.js" write-checkpoint \
|
|
190
|
-
--file "{workspace_path}/iterations/{iteration_id}/02.feature-design/.checkpoints.json" \
|
|
191
|
-
--stage 02_feature_design \
|
|
192
|
-
--checkpoint function_decomposition \
|
|
193
|
-
--passed true
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Log: "✅ Checkpoint A (function_decomposition) passed and recorded"
|
|
197
|
-
|
|
198
|
-
### OUTPUT EFFICIENCY RULES
|
|
199
|
-
|
|
200
|
-
> **MANDATORY: Direct-to-File Output**
|
|
201
|
-
>
|
|
202
|
-
> When generating Feature Spec content:
|
|
203
|
-
> - **DO NOT** display design content (wireframes, interaction flows, API specs, data models) in the conversation
|
|
204
|
-
> - **DO NOT** output intermediate design results as chat messages
|
|
205
|
-
> - **DO** think through the design internally, then write directly to the output file
|
|
206
|
-
> - **DO** only report brief status messages: "[Block X] Designing frontend for Function N..."
|
|
207
|
-
>
|
|
208
|
-
> **Rationale**: In batch mode, multiple Workers run simultaneously. Displaying full design content in chat wastes context window and creates confusion.
|
|
209
|
-
>
|
|
210
|
-
> **Allowed output in conversation**:
|
|
211
|
-
> - Block execution announcements (1 line each)
|
|
212
|
-
> - Error messages
|
|
213
|
-
> - Checkpoint confirmation requests (when not skipped)
|
|
214
|
-
> - Final completion summary (1-2 lines)
|
|
215
|
-
>
|
|
216
|
-
> **FORBIDDEN output in conversation**:
|
|
217
|
-
> - ASCII wireframes / UI prototypes
|
|
218
|
-
> - Mermaid diagrams (these go in the file only)
|
|
219
|
-
> - API endpoint lists
|
|
220
|
-
> - Data model tables
|
|
221
|
-
> - Full section content
|
|
222
|
-
|
|
223
|
-
## Step 1: Frontend Design
|
|
224
|
-
|
|
225
|
-
> ⚠️ **OUTPUT REMINDER**: Design content goes directly into the output file. DO NOT display wireframes or UI elements in conversation.
|
|
226
|
-
|
|
227
|
-
### 1.0 Conditional Execution
|
|
228
|
-
|
|
229
|
-
`feature_type = "Page+API"` → Execute design; `feature_type = "API-only"` → Skip; Not provided → Execute (backward compatibility)
|
|
230
|
-
|
|
231
|
-
**Multi-Platform Rule:** Repeat design for EACH platform with platform-specific headers.
|
|
232
|
-
|
|
233
|
-
**Mobile Wireframe Patterns:**
|
|
234
|
-
|
|
235
|
-
```
|
|
236
|
-
Pattern M-A: Card List
|
|
237
|
-
+----------------------------------+
|
|
238
|
-
| [Search...] [Filter] |
|
|
239
|
-
+----------------------------------+
|
|
240
|
-
| +----------------------------+ |
|
|
241
|
-
| | Title Status Tag | |
|
|
242
|
-
| | Subtitle / Key info | |
|
|
243
|
-
| | Detail line [Action] | |
|
|
244
|
-
| +----------------------------+ |
|
|
245
|
-
| +----------------------------+ |
|
|
246
|
-
| | Title Status Tag | |
|
|
247
|
-
| | Subtitle / Key info | |
|
|
248
|
-
| | Detail line [Action] | |
|
|
249
|
-
| +----------------------------+ |
|
|
250
|
-
| [Load More / Pull to Refresh] |
|
|
251
|
-
+----------------------------------+
|
|
252
|
-
| [Tab1] [Tab2] [Tab3] [Tab4] |
|
|
253
|
-
+----------------------------------+
|
|
254
|
-
|
|
255
|
-
Pattern M-B: Mobile Form
|
|
256
|
-
+----------------------------------+
|
|
257
|
-
| < Back Title [Save] |
|
|
258
|
-
+----------------------------------+
|
|
259
|
-
| Label |
|
|
260
|
-
| [Full-width input ] |
|
|
261
|
-
| |
|
|
262
|
-
| Label |
|
|
263
|
-
| [Full-width input ] |
|
|
264
|
-
| |
|
|
265
|
-
| Label |
|
|
266
|
-
| [Picker / Selector >] |
|
|
267
|
-
| |
|
|
268
|
-
| Label |
|
|
269
|
-
| [Switch toggle O ] |
|
|
270
|
-
+----------------------------------+
|
|
271
|
-
|
|
272
|
-
Pattern M-C: Action Sheet
|
|
273
|
-
+----------------------------------+
|
|
274
|
-
| (dimmed background) |
|
|
275
|
-
| +----------------------------+ |
|
|
276
|
-
| | Action Sheet Title | |
|
|
277
|
-
| +----------------------------+ |
|
|
278
|
-
| | Option 1 | |
|
|
279
|
-
| +----------------------------+ |
|
|
280
|
-
| | Option 2 | |
|
|
281
|
-
| +----------------------------+ |
|
|
282
|
-
| | Cancel | |
|
|
283
|
-
| +----------------------------+ |
|
|
284
|
-
+----------------------------------+
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
### 1.1 UI Prototype
|
|
288
|
-
|
|
289
|
-
Create ASCII wireframes showing layout, UI elements, navigation.
|
|
290
|
-
|
|
291
|
-
**PC Wireframe Example:**
|
|
292
|
-
```
|
|
293
|
-
+--------------------------------------------------+
|
|
294
|
-
| Header: User Management |
|
|
295
|
-
+--------------------------------------------------+
|
|
296
|
-
| [Search] [Filter v] [+ New User] |
|
|
297
|
-
+--------------------------------------------------+
|
|
298
|
-
| +---------------------------------------------+ |
|
|
299
|
-
| | ID | Username | Email | Status | Actions | |
|
|
300
|
-
| |----|----------|----------|--------|---------| |
|
|
301
|
-
| | 1 | john_doe | john@... | Active | [Edit] | |
|
|
302
|
-
| | 2 | jane_smith|jane@... | Active | [Edit] | |
|
|
303
|
-
| +---------------------------------------------+ |
|
|
304
|
-
| [Previous] Page 1 of 5 [Next] |
|
|
305
|
-
+--------------------------------------------------+
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
### 1.2 Interface Element Descriptions
|
|
309
|
-
|
|
310
|
-
| Element | Type | Behavior |
|
|
311
|
-
|---------|------|----------|
|
|
312
|
-
| {name} | {component type} | {behavior description} |
|
|
313
|
-
|
|
314
|
-
### 1.3 Interaction Flow
|
|
315
|
-
|
|
316
|
-
Document: `User Action → Frontend Response → Backend API Call`
|
|
317
|
-
|
|
318
|
-
**Output format: Mermaid `sequenceDiagram`** — Generate interaction flows as Mermaid sequence diagrams showing: User → Frontend → Backend API → Data Store. DO NOT use ASCII text charts.
|
|
319
|
-
|
|
320
|
-
> **ISA-95 Stage 4 Thinking — Information Flows**
|
|
321
|
-
> - Cross-module flows: Map data flows between feature and other modules
|
|
322
|
-
> - Sequence coverage: Complete chain user→frontend→backend→database→external
|
|
323
|
-
> - Interface identification: Every data exchange point = potential API endpoint
|
|
324
|
-
> - Exception flows: Document alternative paths, not just happy path
|
|
325
|
-
|
|
326
|
-
### 1.4 Backend API Mapping
|
|
327
|
-
|
|
328
|
-
| Frontend Action | Backend API | Purpose |
|
|
329
|
-
|-----------------|-------------|---------|
|
|
330
|
-
| {action} | {API endpoint} | {data exchanged} |
|
|
331
|
-
|
|
332
|
-
## Step 2: Backend Design
|
|
333
|
-
|
|
334
|
-
> ⚠️ **OUTPUT REMINDER**: Backend API designs go directly into the output file. DO NOT display API lists or processing logic in conversation.
|
|
335
|
-
|
|
336
|
-
> **CRITICAL CONSTRAINT**: Backend design in Feature Spec must remain at the BUSINESS API level:
|
|
337
|
-
> - Describe API endpoints as business operations (e.g., "Create Shop" operation with business parameters)
|
|
338
|
-
> - Describe business validation rules in plain language (e.g., "Shop name must be unique within tenant")
|
|
339
|
-
> - Describe data entities as business concepts with business field types (Text, Number, Date, Enum)
|
|
340
|
-
> - Do NOT include: Java class names, SQL statements, ORM mappings, framework annotations, Maven module paths
|
|
341
|
-
|
|
342
|
-
### 2.1 API/Interface List
|
|
343
|
-
|
|
344
|
-
| Interface | Method | Description |
|
|
345
|
-
|-----------|--------|-------------|
|
|
346
|
-
| {name} | {GET/POST/PUT/DELETE} | {purpose} |
|
|
347
|
-
|
|
348
|
-
### 2.2 Processing Logic Flow
|
|
349
|
-
|
|
350
|
-
| Stage | Description |
|
|
351
|
-
|-------|-------------|
|
|
352
|
-
| Input Validation | Business rules validating input |
|
|
353
|
-
| Business Logic | Core processing steps (conceptual) |
|
|
354
|
-
| Data Operations | What data to read/write |
|
|
355
|
-
| Response | What data to return |
|
|
356
|
-
|
|
357
|
-
**Output format: Mermaid `flowchart TD`** — Generate processing logic as Mermaid flowcharts showing: business validation → data operation → response. DO NOT use ASCII text charts.
|
|
358
|
-
|
|
359
|
-
### 2.3 Data Access Scheme
|
|
360
|
-
|
|
361
|
-
| Operation | Data Target | Type |
|
|
362
|
-
|-----------|-------------|------|
|
|
363
|
-
| Read | {data} | [EXISTING]/[NEW] |
|
|
364
|
-
| Write | {data} | [EXISTING]/[NEW] |
|
|
365
|
-
|
|
366
|
-
### 2.4 Cross-Module Interactions
|
|
367
|
-
|
|
368
|
-
| This Module | Interacts With | Interface | Data Exchanged |
|
|
369
|
-
|-------------|----------------|-----------|----------------|
|
|
370
|
-
| {module} | {other module} | {API/Event} | {what data} |
|
|
371
|
-
|
|
372
|
-
## Step 3: Data Model & Business Rules
|
|
373
|
-
|
|
374
|
-
> ⚠️ **OUTPUT REMINDER**: Data models and business rules go directly into the output file. DO NOT display tables or validation rules in conversation.
|
|
375
|
-
|
|
376
|
-
### 3.1 New Data Structures
|
|
377
|
-
|
|
378
|
-
| Field | Type | Constraints | Description |
|
|
379
|
-
|-------|------|-------------|-------------|
|
|
380
|
-
| {field} | {data type} | {required/unique} | {purpose} |
|
|
381
|
-
|
|
382
|
-
> **ISA-95 Stage 5 Thinking — Categories of Information**
|
|
383
|
-
> - Classification: Categorize data (master, transactional, reference, computed)
|
|
384
|
-
> - Dictionary rigor: Every field needs name, type, constraints, semantic description
|
|
385
|
-
> - Semantic consistency: Align with domain glossary
|
|
386
|
-
> - Relationships: Identify core relationships (1:1, 1:N, N:N)
|
|
387
|
-
|
|
388
|
-
### 3.2 Modifications to Existing Data Structures
|
|
389
|
-
|
|
390
|
-
| Entity | Change Type | Details | Impact |
|
|
391
|
-
|--------|-------------|---------|--------|
|
|
392
|
-
| {entity} | Add/Modify/Remove field | {description} | {affected areas} |
|
|
393
|
-
|
|
394
|
-
### 3.3 Data Relationships
|
|
395
|
-
|
|
396
|
-
**New Relationships:** `EntityA --1:N--> EntityB`
|
|
397
|
-
|
|
398
|
-
| New Entity | Existing Entity | Relationship |
|
|
399
|
-
|------------|-----------------|--------------|
|
|
400
|
-
| {new} | {existing} | {1:1 / 1:N / N:M} |
|
|
401
|
-
|
|
402
|
-
### 3.4 Data Source Descriptions
|
|
403
|
-
|
|
404
|
-
| Data | Source | Update Frequency |
|
|
405
|
-
|------|--------|------------------|
|
|
406
|
-
| {item} | {internal/external/user} | {real-time/periodic/on-demand} |
|
|
407
|
-
|
|
408
|
-
### 3.5 Permission Rules
|
|
409
|
-
|
|
410
|
-
> **ISA-95 Stage 6 Thinking — Information Descriptions**
|
|
411
|
-
> - Validation: Field-level, cross-field, business logic rules
|
|
412
|
-
> - Output standards: Format specifications for downstream API Contract
|
|
413
|
-
> - Permissions: Data access rules mapping to API authorization
|
|
414
|
-
> - Traceability: Every rule traces back to PRD requirement
|
|
415
|
-
|
|
416
|
-
| Function | Required Permission | Scope |
|
|
417
|
-
|----------|---------------------|-------|
|
|
418
|
-
| {function} | {permission} | {global/module/resource-specific} |
|
|
419
|
-
|
|
420
|
-
### 3.6 Business Logic Rules
|
|
421
|
-
|
|
422
|
-
| Rule ID | Description | Trigger | Action |
|
|
423
|
-
|---------|-------------|---------|--------|
|
|
424
|
-
| BR-{number} | {description} | {when applies} | {what happens} |
|
|
425
|
-
|
|
426
|
-
### 3.7 Validation Rules
|
|
427
|
-
|
|
428
|
-
| Field | Frontend Validation | Backend Validation |
|
|
429
|
-
|-------|---------------------|---------------------|
|
|
430
|
-
| {field} | {client rules} | {server rules} |
|
|
431
|
-
|
|
432
|
-
## Step 4: Checkpoint B — User Confirmation
|
|
433
|
-
|
|
434
|
-
**Conditional Execution:** Skip if `skip_checkpoint=true`
|
|
435
|
-
|
|
436
|
-
### 4.1 Present Design Summary
|
|
437
|
-
|
|
438
|
-
```
|
|
439
|
-
╔══════════════════════════════════════════════════════════════╗
|
|
440
|
-
║ FEATURE DESIGN SUMMARY - CHECKPOINT B ║
|
|
441
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
442
|
-
║ Feature: {feature_name} ({feature_id}) ║
|
|
443
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
444
|
-
║ FUNCTIONS DESIGNED ║
|
|
445
|
-
║ Total: {N} functions ║
|
|
446
|
-
║ ║
|
|
447
|
-
║ Function Breakdown: ║
|
|
448
|
-
║ • {Function 1} - [EXISTING/MODIFIED/NEW] ║
|
|
449
|
-
║ • {Function 2} - [EXISTING/MODIFIED/NEW] ║
|
|
450
|
-
║ • {Function 3} - [EXISTING/MODIFIED/NEW] ║
|
|
451
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
452
|
-
║ SYSTEM RELATIONSHIP SUMMARY ║
|
|
453
|
-
║ • [EXISTING]: {count} - Reuse existing capabilities ║
|
|
454
|
-
║ • [MODIFIED]: {count} - Enhance existing features ║
|
|
455
|
-
║ • [NEW]: {count} - Create new functionality ║
|
|
456
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
457
|
-
║ FRONTEND COMPONENTS ║
|
|
458
|
-
║ • Platforms: {platform list} ║
|
|
459
|
-
║ • UI Patterns: {list of wireframe patterns used} ║
|
|
460
|
-
║ • Total Functions with UI: {count} ║
|
|
461
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
462
|
-
║ BACKEND INTERFACES ║
|
|
463
|
-
║ • Total APIs: {count} ║
|
|
464
|
-
║ • New APIs: {count} ║
|
|
465
|
-
║ • Modified APIs: {count} ║
|
|
466
|
-
║ • Cross-Module Interactions: {count} ║
|
|
467
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
468
|
-
║ DATA ENTITIES ║
|
|
469
|
-
║ • New Entities: {count} ║
|
|
470
|
-
║ • Modified Entities: {count} ║
|
|
471
|
-
║ • Business Rules: {count} ║
|
|
472
|
-
╚══════════════════════════════════════════════════════════════╝
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
### 4.2 HARD STOP — 5 Confirmation Questions
|
|
476
|
-
|
|
477
|
-
**STOP — DO NOT PROCEED until user confirms:**
|
|
478
|
-
|
|
479
|
-
1. **Function Coverage**: "Does this design cover all functions from the analysis? Are any functions missing?"
|
|
480
|
-
|
|
481
|
-
2. **System Relationship Markers**: "Are the [EXISTING]/[MODIFIED]/[NEW] markers accurate for each component?"
|
|
482
|
-
|
|
483
|
-
3. **UI/UX Approach**: "Do the ASCII wireframes and interaction flows match your expectations?"
|
|
484
|
-
|
|
485
|
-
4. **Backend Interface Scope**: "Are the API endpoints and cross-module interactions correctly identified?"
|
|
486
|
-
|
|
487
|
-
5. **Data Model Completeness**: "Does the data model cover all fields and relationships needed?"
|
|
488
|
-
|
|
489
|
-
6. **CRITICAL — Business Perspective Validation**: "Does the specification contain ONLY business concepts and rules? Verify there are NO:
|
|
490
|
-
- ❌ File paths or code directory structures
|
|
491
|
-
- ❌ Framework names or specific technologies (Java, MyBatis, Vue component names, etc.)
|
|
492
|
-
- ❌ Actual code snippets or SQL statements
|
|
493
|
-
- ❌ Component library names or framework-specific syntax
|
|
494
|
-
- ❌ Database table/column names or technical data types
|
|
495
|
-
If ANY of these are present, you MUST revise the affected sections to use pure business descriptions before proceeding."
|
|
496
|
-
|
|
497
|
-
**WAIT for user confirmation before proceeding to document generation.**
|
|
498
|
-
|
|
499
|
-
### 4.3 Update Checkpoints
|
|
500
|
-
|
|
501
|
-
After user confirms (or if skipped):
|
|
502
|
-
|
|
503
|
-
```bash
|
|
504
|
-
node "{workspace_path}/scripts/update-progress.js" write-checkpoint \
|
|
505
|
-
--file "{workspace_path}/iterations/{iteration_id}/02.feature-design/.checkpoints.json" \
|
|
506
|
-
--stage 02_feature_design \
|
|
507
|
-
--checkpoint feature_design_review \
|
|
508
|
-
--passed true
|
|
509
|
-
```
|
|
510
|
-
|
|
511
|
-
Log: "✅ Checkpoint B (feature_design_review) passed and recorded"
|
|
512
|
-
|
|
513
|
-
## Step 5: Determine Output Path & Copy Template
|
|
514
|
-
|
|
515
|
-
> **⚠️ CRITICAL: Two-Phase Strategy (Skeleton-First, Content-After)**
|
|
516
|
-
>
|
|
517
|
-
> Steps 5 and 6 MUST be executed in two phases to ensure consistent document structure.
|
|
518
|
-
|
|
519
|
-
### Phase A: Skeleton Construction (BEFORE any content filling)
|
|
520
|
-
|
|
521
|
-
1. Read FEATURE-SPEC-TEMPLATE.md to identify the complete section structure
|
|
522
|
-
2. Count the number of functions from Step 0.3 function breakdown results
|
|
523
|
-
3. For Section 2 Function Details, replicate the template's Function block structure for EACH function:
|
|
524
|
-
- Copy the EXACT template structure (all 4 sub-sections) from FEATURE-SPEC-TEMPLATE.md
|
|
525
|
-
- Create `### 2.1 Function: {function_name}` through `### 2.N Function: {function_name}`
|
|
526
|
-
- Each function block MUST contain these 4 sub-section headers (copied from template):
|
|
527
|
-
```
|
|
528
|
-
#### 2.N.1 Frontend Prototype
|
|
529
|
-
[TO BE FILLED]
|
|
530
|
-
|
|
531
|
-
#### 2.N.2 Interaction Flow
|
|
532
|
-
[TO BE FILLED]
|
|
533
|
-
|
|
534
|
-
#### 2.N.3 Backend Interface
|
|
535
|
-
[TO BE FILLED]
|
|
536
|
-
|
|
537
|
-
#### 2.N.4 Data Definition
|
|
538
|
-
[TO BE FILLED]
|
|
539
|
-
```
|
|
540
|
-
4. Verify skeleton: confirm ALL functions have ALL 4 sub-section headers before proceeding
|
|
541
|
-
|
|
542
|
-
> ⚠️ DO NOT start filling content until the complete skeleton is verified.
|
|
543
|
-
|
|
544
|
-
### Phase B: Content Filling (AFTER skeleton is complete)
|
|
545
|
-
|
|
546
|
-
Fill each `[TO BE FILLED]` placeholder with actual content:
|
|
547
|
-
- **Frontend Prototype** → ASCII wireframes (Pattern A/B/C/M-A/M-B/M-C) + Interface Element Description table
|
|
548
|
-
- **Interaction Flow** → Mermaid `sequenceDiagram` + Interaction Rules table
|
|
549
|
-
- **Backend Interface** → Interface List table + Mermaid `flowchart TD` for Processing Logic + Data Access table
|
|
550
|
-
- **Data Definition** → Fields table + Data Source table
|
|
551
|
-
|
|
552
|
-
---
|
|
553
|
-
|
|
554
|
-
### 5.1 Determine Output Path
|
|
555
|
-
|
|
556
|
-
**Single Feature Mode** (when `feature_id` provided):
|
|
557
|
-
```
|
|
558
|
-
{iteration_path}/02.feature-design/{feature_id}-{feature_name}-feature-spec.md
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
**Legacy Single Mode** (backward compatibility):
|
|
562
|
-
```
|
|
563
|
-
{iteration_path}/02.feature-design/[feature-name]-feature-spec.md
|
|
564
|
-
```
|
|
565
|
-
|
|
566
|
-
**Legacy Master-Sub Mode** (backward compatibility):
|
|
567
|
-
- Master Spec: `{iteration_path}/02.feature-design/[master-name]-feature-spec.md`
|
|
568
|
-
- Sub Specs: `{iteration_path}/02.feature-design/[sub-name]-feature-spec.md` (one per sub-feature)
|
|
569
|
-
|
|
570
|
-
**CRITICAL — Filename Lock Rule:**
|
|
571
|
-
- `{feature_name}` in the output path MUST be the exact value of the `feature_name` parameter
|
|
572
|
-
- If analysis file uses a different name → use `feature_name` parameter for filename
|
|
573
|
-
- Example: parameter `feature_name = "店铺信息管理"` → filename MUST contain "店铺信息管理", NOT "shop-management" or "多店切换"
|
|
574
|
-
|
|
575
|
-
### 5.2 Copy Template
|
|
576
|
-
|
|
577
|
-
1. Read template: `templates/FEATURE-SPEC-TEMPLATE.md` (relative path from skill directory)
|
|
578
|
-
2. Replace top-level placeholders:
|
|
579
|
-
- `[Feature Name]` → actual feature name
|
|
580
|
-
- `{Feature ID}` → actual feature ID
|
|
581
|
-
- `{Feature Name}` → actual feature name
|
|
582
|
-
- `{Page+API / API-only}` → actual feature type
|
|
583
|
-
- `{Link to Sub-PRD document}` → `prd_path` value
|
|
584
|
-
3. Create document using `create_file` with template content
|
|
585
|
-
4. Verify section structure exists (Sections 1-6 with proper numbering)
|
|
586
|
-
|
|
587
|
-
## Step 6: Fill Sections Using search_replace
|
|
588
|
-
|
|
589
|
-
#### ⛔ HARD RULE — NO FULL-FILE REWRITE
|
|
590
|
-
|
|
591
|
-
Even if the document is very long or complex:
|
|
592
|
-
- You MUST use `search_replace` to fill each `[TO BE FILLED]` placeholder individually
|
|
593
|
-
- You MUST NOT use `create_file` to recreate the document
|
|
594
|
-
- You MUST NOT give up on `search_replace` and switch strategies mid-execution
|
|
595
|
-
- If a `search_replace` fails, fix the search pattern — do NOT fall back to `create_file`
|
|
596
|
-
|
|
597
|
-
This rule has ZERO exceptions. "Document too long" is NOT a valid reason to switch to `create_file`.
|
|
598
|
-
|
|
599
|
-
> **⚠️ CRITICAL: Section 2 Function Details Skeleton Verification**
|
|
600
|
-
>
|
|
601
|
-
> Before proceeding with content filling, verify the two-phase strategy was correctly applied:
|
|
602
|
-
> 1. Confirm ALL functions in Section 2 have complete 4 sub-section skeletons (Frontend Prototype, Interaction Flow, Backend Interface, Data Definition)
|
|
603
|
-
> 2. Confirm no `[TO BE FILLED]` placeholders remain unfilled after content filling
|
|
604
|
-
> 3. Confirm each function follows the exact template structure from FEATURE-SPEC-TEMPLATE.md
|
|
605
|
-
|
|
606
|
-
### Section Mapping Table
|
|
607
|
-
|
|
608
|
-
| Template Section | Data Source |
|
|
609
|
-
|------------------|-------------|
|
|
610
|
-
| 0. Feature Analysis Summary | Step 0.3 Function Breakdown results (internal memory) |
|
|
611
|
-
| 1. Overview (Basic Information, Feature Scope) | PRD Feature Information + Step 0 analysis summary |
|
|
612
|
-
| 1.3 Relationship to Existing System | Step 0.3 System Relationship markers |
|
|
613
|
-
| 2. Function Details | Step 1 Frontend Design + Step 2 Backend Design results (internal) |
|
|
614
|
-
| 2.1.x Frontend Prototype | Step 1.1 UI Prototype results |
|
|
615
|
-
| 2.1.x Interaction Flow | Step 1.3 Interaction Flow results |
|
|
616
|
-
| 2.1.x Backend Interface | Step 2.1-2.3 Backend Design results |
|
|
617
|
-
| 2.1.x Data Definition | Step 3.1-3.4 Data Model results |
|
|
618
|
-
| 3. Cross-Function Concerns | Step 2.4 Cross-Module results |
|
|
619
|
-
| 4. Business Rules & Constraints | Step 3.5-3.7 Business Rules results |
|
|
620
|
-
| 5. API Contract Summary | Aggregated from Step 2.1 API List |
|
|
621
|
-
| 6. Notes | Contextual notes from analysis |
|
|
622
|
-
|
|
623
|
-
**CRITICAL — Diagram Format Rule:**
|
|
624
|
-
- "交互流程" / "Interaction Flow" sections → MUST use Mermaid `sequenceDiagram`
|
|
625
|
-
- "核心业务逻辑" / "Processing Logic" sections → MUST use Mermaid `flowchart TD`
|
|
626
|
-
- "跨函数流程" / "Cross-Function Flow" sections → MUST use Mermaid `sequenceDiagram`
|
|
627
|
-
- Plain text / ASCII flowcharts are FORBIDDEN in these sections
|
|
628
|
-
- Reference: `speccrew-workspace/docs/rules/mermaid-rule.md` for syntax compliance
|
|
629
|
-
|
|
630
|
-
### Filling Rules
|
|
631
|
-
|
|
632
|
-
- Use `search_replace` for each section individually
|
|
633
|
-
- Preserve all section titles and numbering
|
|
634
|
-
- No applicable content → "N/A"
|
|
635
|
-
- Multi-platform: Create separate sub-sections per platform
|
|
636
|
-
|
|
637
|
-
⚠️ REMINDER: If you find yourself thinking "the document is too long, let me use create_file instead" — STOP. This is explicitly forbidden. Continue with search_replace.
|
|
638
|
-
|
|
639
|
-
### Legacy Master-Sub Mode
|
|
640
|
-
|
|
641
|
-
If processing Master-Sub structure:
|
|
642
|
-
- Repeat Step 5+6 for each sub-spec
|
|
643
|
-
- Master spec contains: Overview, Cross-module diagram, shared data structures
|
|
644
|
-
- Sub specs contain: Per-feature detailed design
|
|
645
|
-
|
|
646
|
-
## Step 7: Mermaid Diagram Compliance
|
|
647
|
-
|
|
648
|
-
Verify all Mermaid diagrams follow compliance rules:
|
|
649
|
-
|
|
650
|
-
1. **NO style definitions** — No `classDef`, `style`, or CSS-like syntax
|
|
651
|
-
2. **NO HTML tags** — No `<br/>`, `<b>`, or other HTML in labels
|
|
652
|
-
3. **Use standard syntax only:**
|
|
653
|
-
- `sequenceDiagram` for interaction flows
|
|
654
|
-
- `flowchart TD` for processing logic
|
|
655
|
-
- Plain text labels with standard characters
|
|
656
|
-
4. **Reference:** `speccrew-workspace/docs/rules/mermaid-rule.md`
|
|
657
|
-
|
|
658
|
-
**Validation:** Before finalizing, scan all Mermaid blocks for non-compliant syntax.
|
|
659
|
-
|
|
660
|
-
## Step 8: Update Checkpoints
|
|
661
|
-
|
|
662
|
-
Set final checkpoint status:
|
|
663
|
-
|
|
664
|
-
```bash
|
|
665
|
-
node "{workspace_path}/scripts/update-progress.js" write-checkpoint \
|
|
666
|
-
--file "{workspace_path}/iterations/{iteration_id}/02.feature-design/.checkpoints.json" \
|
|
667
|
-
--stage 02_feature_design \
|
|
668
|
-
--checkpoint feature_spec_review \
|
|
669
|
-
--passed true
|
|
670
|
-
```
|
|
671
|
-
|
|
672
|
-
Log: "✅ Feature Spec generation completed. Checkpoint feature_spec_review passed."
|
|
673
|
-
|
|
674
|
-
## Step 9: Update Progress with Metadata
|
|
675
|
-
|
|
676
|
-
After generating the Feature Spec document, update the task in DISPATCH-PROGRESS.json with summary metadata:
|
|
677
|
-
|
|
678
|
-
```bash
|
|
679
|
-
node {workspace_path}/scripts/update-progress.js update-task \
|
|
680
|
-
--file {dispatch_progress_path} \
|
|
681
|
-
--task-id {feature_task_id} \
|
|
682
|
-
--status completed \
|
|
683
|
-
--metadata '{"function_count": X, "component_count": Y, "api_count": Z, "entity_count": W}'
|
|
684
|
-
```
|
|
685
|
-
|
|
686
|
-
Where:
|
|
687
|
-
- `function_count`: Number of functions defined in the Feature Spec
|
|
688
|
-
- `component_count`: Number of frontend components identified
|
|
689
|
-
- `api_count`: Number of API endpoints defined
|
|
690
|
-
- `entity_count`: Number of data entities defined
|
|
691
|
-
|
|
692
|
-
⚠️ This step is MANDATORY — the FD Agent relies on this metadata for batch summary in Phase 3c.
|
|
693
|
-
|
|
694
|
-
---
|
|
695
|
-
|
|
696
|
-
# Key Rules
|
|
697
|
-
|
|
698
|
-
| Rule | Description |
|
|
699
|
-
|------|-------------|
|
|
700
|
-
| **Business Perspective Only (Analysis)** | Feature Analysis describes business capabilities and functional requirements. Every section must describe WHAT from user/business perspective |
|
|
701
|
-
| No Technology Decisions | Do NOT specify frameworks, databases, technologies |
|
|
702
|
-
| Focus on WHAT not HOW | Describe what system does, not how it's implemented |
|
|
703
|
-
| ASCII Wireframes Only | Use ASCII art for UI prototypes |
|
|
704
|
-
| **FORBIDDEN: Analysis File Paths** | Do NOT include any file paths, code paths, or directory structures (e.g., views/appointment/AppointmentIndex.vue, yudao-module-appointment/...) |
|
|
705
|
-
| **FORBIDDEN: Framework Code in Analysis** | Do NOT include code snippets in any language — no Java classes, SQL DDL/DML, Vue templates, TypeScript API code, HTML markup, annotations (@PreAuthorize, @OperateLog, @TableLogic, @TableName) |
|
|
706
|
-
| **FORBIDDEN: Framework/Library Names in Analysis** | Do NOT reference specific framework/library names as implementation details (MyBatis-Plus, MapStruct, Element Plus, wot-design-uni, ElDatePicker, wd-cell, BaseMapperX, etc.) |
|
|
707
|
-
| **FORBIDDEN: Database Artifacts in Analysis** | Do NOT include database table names (appointment_info), column names (customer_id, staff_id), SQL types (BIGINT, VARCHAR), indexes, or any SQL statements |
|
|
708
|
-
| **FORBIDDEN: Technical Types in Analysis** | Do NOT use programming language types (Long, String, Integer). Use business types: Text, Number, Date, Boolean, Enum, Identifier |
|
|
709
|
-
| **FORBIDDEN: ASCII Diagrams in Analysis** | Do NOT use plain text or ASCII art flowcharts. ALL diagrams MUST use Mermaid syntax |
|
|
710
|
-
| **Mermaid Required** | Use `flowchart TB` for business process flows, `sequenceDiagram` for interaction flows. Reference mermaid-rule.md for syntax compliance |
|
|
711
|
-
| **FORBIDDEN: File Paths** | Do NOT include any file paths, code paths, or directory structures (e.g., src/views/..., yudao-module-base/..., pages/...) |
|
|
712
|
-
| **FORBIDDEN: Framework Code** | Do NOT include actual code snippets in any language — no Java classes, SQL DDL/DML, Vue templates, TypeScript API code, HTML markup |
|
|
713
|
-
| **FORBIDDEN: Framework Names as Implementation** | Do NOT reference specific framework/library names as implementation choices (MyBatis-Plus, Flyway, Element Plus component names like el-button, wot-design-uni widget names like wd-cell) |
|
|
714
|
-
| **FORBIDDEN: Technical Types** | Do NOT use database column types (VARCHAR, BIGINT, INT), Java types (Long, String), or ORM annotations (@TableName, @TableId). Use business types: Text, Number, Date, Boolean, Enum |
|
|
715
|
-
| **FORBIDDEN: Component Names** | Do NOT reference UI component library element names (ElDatePicker, ElMessageBox, wd-date-time-picker). Describe interaction behavior instead |
|
|
716
|
-
| **FORBIDDEN: Database Artifacts** | Do NOT include table names, column names, index names, or any SQL statements. Use conceptual entity names and business field names |
|
|
717
|
-
| **Business Perspective Priority** | Feature Spec is a BUSINESS document. Every section must describe WHAT from a user/business perspective, never HOW from a technical implementation perspective |
|
|
718
|
-
| Mermaid Compatibility | Follow mermaid-rule.md guidelines |
|
|
719
|
-
| Clear Markers | Use [EXISTING]/[MODIFIED]/[NEW] consistently |
|
|
720
|
-
| Template-First | Copy template before filling content |
|
|
721
|
-
| search_replace Only | Never use create_file for section updates after template copy |
|
|
722
|
-
| Checkpoint A | Get user confirmation on function breakdown before design (unless skipped) |
|
|
723
|
-
| Checkpoint B | Get user confirmation before writing files (unless skipped) |
|
|
724
|
-
| No Intermediate Files | Analysis and design process is internal — do NOT output any intermediate analysis or design-data artifacts |
|
|
725
|
-
|
|
726
|
-
# Checklist
|
|
727
|
-
|
|
728
|
-
- [ ] PRD has been read, all P0 requirements covered
|
|
729
|
-
- [ ] **[Single Feature Mode]** Feature ID and name parameters received
|
|
730
|
-
- [ ] **[Single Feature Mode]** Only related Feature content extracted from PRD
|
|
731
|
-
- [ ] **[Legacy Mode]** All sub PRDs have been read (if master-sub structure)
|
|
732
|
-
- [ ] System overview loaded for context
|
|
733
|
-
- [ ] Related module overviews loaded
|
|
734
|
-
- [ ] **[Cross-module]** Knowledge graph queried for relationship analysis
|
|
735
|
-
- [ ] Function breakdown completed with [EXISTING]/[MODIFIED]/[NEW] markers
|
|
736
|
-
- [ ] **[Single Feature Mode]** 3-8 focused Functions defined
|
|
737
|
-
- [ ] Checkpoint A passed: function breakdown confirmed with user (or skipped)
|
|
738
|
-
- [ ] `.checkpoints.json` updated via script for Checkpoint A
|
|
739
|
-
- [ ] All input parameters resolved (feature_id, feature_name, feature_type)
|
|
740
|
-
- [ ] Template file `templates/FEATURE-SPEC-TEMPLATE.md` exists
|
|
741
|
-
- [ ] **[API-only]** Frontend design skipped
|
|
742
|
-
- [ ] **[Page+API]** ASCII wireframes created for all platforms
|
|
743
|
-
- [ ] **[Multi-platform]** Per-platform designs completed
|
|
744
|
-
- [ ] Backend interfaces and logic documented
|
|
745
|
-
- [ ] Data model with entities and modifications documented
|
|
746
|
-
- [ ] Business rules (permissions, logic, validation) documented
|
|
747
|
-
- [ ] ISA-95 Stage 4/5/6 thinking applied
|
|
748
|
-
- [ ] Checkpoint B passed: design summary confirmed with user (or skipped)
|
|
749
|
-
- [ ] Output path determined
|
|
750
|
-
- [ ] Template copied using `create_file`
|
|
751
|
-
- [ ] All sections filled using `search_replace`
|
|
752
|
-
- [ ] Phase B used ONLY search_replace (no create_file after Step 5)
|
|
753
|
-
- [ ] **[CRITICAL]** Section 2 Function Details skeleton verified (all functions have 4 sub-sections)
|
|
754
|
-
- [ ] **[CRITICAL]** Interaction Flow uses Mermaid sequenceDiagram (NOT ASCII)
|
|
755
|
-
- [ ] **[CRITICAL]** Processing Logic uses Mermaid flowchart TD (NOT ASCII)
|
|
756
|
-
- [ ] All Mermaid diagrams follow mermaid-rule.md compliance rules
|
|
757
|
-
- [ ] `.checkpoints.json` updated via script
|
|
758
|
-
- [ ] **CRITICAL**: DISPATCH-PROGRESS.json updated with metadata (function_count, component_count, api_count, entity_count)
|
|
759
|
-
- [ ] No technology decisions included
|
|
760
|
-
- [ ] No intermediate design-data artifact created
|
|
761
|
-
- [ ] **CRITICAL — Business Content Only**: Verify ALL sections use business-level descriptions. Zero tolerance for: file paths, code snippets, SQL, framework names, component names, technical types
|
|
14
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
15
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|