speccrew 0.5.5 → 0.5.7
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/skills/speccrew-fd-feature-analyze/SKILL.md +26 -2
- package/.speccrew/skills/speccrew-fd-feature-analyze/templates/FEATURE-ANALYSIS-TEMPLATE.md +180 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +37 -1
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +78 -17
- package/docs/GETTING-STARTED.ar.md +22 -24
- package/docs/GETTING-STARTED.bn.md +22 -24
- package/docs/GETTING-STARTED.bs.md +22 -24
- package/docs/GETTING-STARTED.da.md +22 -24
- package/docs/GETTING-STARTED.de.md +24 -24
- package/docs/GETTING-STARTED.el.md +22 -24
- package/docs/GETTING-STARTED.en.md +24 -24
- package/docs/GETTING-STARTED.es.md +24 -24
- package/docs/GETTING-STARTED.fr.md +24 -24
- package/docs/GETTING-STARTED.it.md +22 -24
- package/docs/GETTING-STARTED.ja.md +24 -24
- package/docs/GETTING-STARTED.ko.md +4 -4
- package/docs/GETTING-STARTED.md +24 -24
- package/docs/GETTING-STARTED.no.md +22 -24
- package/docs/GETTING-STARTED.pl.md +20 -24
- package/docs/GETTING-STARTED.pt-BR.md +20 -24
- package/docs/GETTING-STARTED.ru.md +19 -24
- package/docs/GETTING-STARTED.th.md +19 -24
- package/docs/GETTING-STARTED.tr.md +19 -24
- package/docs/GETTING-STARTED.uk.md +19 -24
- package/docs/GETTING-STARTED.vi.md +19 -24
- package/docs/GETTING-STARTED.zh-TW.md +24 -24
- package/package.json +1 -1
|
@@ -24,6 +24,10 @@ This skill applies ISA-95 Stages 1-3 as an internal thinking framework for analy
|
|
|
24
24
|
|
|
25
25
|
# Workflow
|
|
26
26
|
|
|
27
|
+
**MANDATORY:**
|
|
28
|
+
- **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.
|
|
29
|
+
- **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.
|
|
30
|
+
|
|
27
31
|
## Absolute Constraints
|
|
28
32
|
|
|
29
33
|
> **Violation = task failure**
|
|
@@ -198,6 +202,16 @@ Write analysis results to `.feature-analysis.md`:
|
|
|
198
202
|
- **Data Changes**: {description}
|
|
199
203
|
- **System Relationship**: [EXISTING]/[MODIFIED]/[NEW] — {explanation}
|
|
200
204
|
|
|
205
|
+
> **Content Guidelines for Function Details:**
|
|
206
|
+
>
|
|
207
|
+
> | Aspect | ✅ ALLOWED (Business) | ❌ FORBIDDEN (Technical) |
|
|
208
|
+
> |--------|----------------------|--------------------------|
|
|
209
|
+
> | Frontend Changes | "New appointment list page with search/filter" | "AppointmentIndex.vue, ElDatePicker, v-hasPermi" |
|
|
210
|
+
> | Backend Changes | "Create appointment management operations with validation" | "@PreAuthorize, AppointmentService.java, MapStruct" |
|
|
211
|
+
> | Data Changes | "New appointment entity with status lifecycle" | "appointment_info table, customer_id BIGINT, SQL DDL" |
|
|
212
|
+
> | System Relationship | "[NEW] Full new business module" | "yudao-module-appointment Maven submodule" |
|
|
213
|
+
> | Diagrams | Mermaid flowchart/sequenceDiagram | ASCII text flowcharts |
|
|
214
|
+
|
|
201
215
|
## Name Discrepancy Notice (if applicable)
|
|
202
216
|
- Parameter feature_name: {feature_name}
|
|
203
217
|
- PRD actual feature name: {prd_name}
|
|
@@ -215,8 +229,16 @@ Write analysis results to `.feature-analysis.md`:
|
|
|
215
229
|
|
|
216
230
|
| Rule | Description |
|
|
217
231
|
|------|-------------|
|
|
218
|
-
| **
|
|
219
|
-
| **
|
|
232
|
+
| **Business Perspective Only** | Feature Analysis describes business capabilities and functional requirements. Every section must describe WHAT from user/business perspective |
|
|
233
|
+
| **FORBIDDEN: File Paths** | Do NOT include any file paths, code paths, or directory structures (e.g., views/appointment/AppointmentIndex.vue, yudao-module-appointment/...) |
|
|
234
|
+
| **FORBIDDEN: Framework Code** | 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) |
|
|
235
|
+
| **FORBIDDEN: Framework/Library Names** | Do NOT reference specific framework/library names as implementation details (MyBatis-Plus, MapStruct, Element Plus, wot-design-uni, ElDatePicker, wd-cell, BaseMapperX, etc.) |
|
|
236
|
+
| **FORBIDDEN: Database Artifacts** | Do NOT include database table names (appointment_info), column names (customer_id, staff_id), SQL types (BIGINT, VARCHAR), indexes, or any SQL statements |
|
|
237
|
+
| **FORBIDDEN: Technical Types** | Do NOT use programming language types (Long, String, Integer). Use business types: Text, Number, Date, Boolean, Enum, Identifier |
|
|
238
|
+
| **FORBIDDEN: ASCII Diagrams** | Do NOT use plain text or ASCII art flowcharts. ALL diagrams MUST use Mermaid syntax |
|
|
239
|
+
| **Mermaid Required** | Use `flowchart TB` for business process flows, `sequenceDiagram` for interaction flows. Reference mermaid-rule.md for syntax compliance |
|
|
240
|
+
| Analysis Only | Do NOT design UI wireframes, API specs, or data models — that belongs to Feature Design phase |
|
|
241
|
+
| System Markers | Always use [EXISTING]/[MODIFIED]/[NEW] to indicate system relationship |
|
|
220
242
|
| **Checkpoint A Required** | User confirmation required before design phase (unless skipped) |
|
|
221
243
|
| **Use Script for JSON** | Always use `update-progress.js` for checkpoint files |
|
|
222
244
|
| **Output Contract** | `.feature-analysis.md` serves as interface for downstream design skills |
|
|
@@ -235,3 +257,5 @@ Write analysis results to `.feature-analysis.md`:
|
|
|
235
257
|
- [ ] Checkpoint A passed: function breakdown confirmed with user (or skipped)
|
|
236
258
|
- [ ] `.checkpoints.json` updated via script
|
|
237
259
|
- [ ] `.feature-analysis.md` written to correct path
|
|
260
|
+
- [ ] **CRITICAL — Business Content Only**: All sections use business-level descriptions. ZERO file paths, framework names, code snippets, SQL, database table/column names, component library names, or technical types
|
|
261
|
+
- [ ] **CRITICAL — Mermaid Diagrams**: All process flows use Mermaid syntax (flowchart TB or sequenceDiagram). No ASCII text flowcharts
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
<!-- AI-NOTE: CRITICAL — Business Perspective Guidelines
|
|
2
|
+
This Feature Analysis is a PURE BUSINESS document. It describes WHAT the system needs to do, NOT HOW it will be implemented.
|
|
3
|
+
|
|
4
|
+
FORBIDDEN content (DO NOT include any of these):
|
|
5
|
+
- ❌ File paths (src/views/..., yudao-module-xxx/...)
|
|
6
|
+
- ❌ Framework/library names as implementation (MyBatis-Plus, MapStruct, Element Plus, wot-design-uni)
|
|
7
|
+
- ❌ Code snippets in any language (Java, SQL, Vue, TypeScript)
|
|
8
|
+
- ❌ Database table/column names (appointment_info, customer_id)
|
|
9
|
+
- ❌ Technical types (BIGINT, VARCHAR, Long, String)
|
|
10
|
+
- ❌ Component names (ElDatePicker, wd-cell, el-button)
|
|
11
|
+
- ❌ Framework annotations (@PreAuthorize, @TableLogic, @OperateLog)
|
|
12
|
+
- ❌ ASCII text flowcharts (use Mermaid instead)
|
|
13
|
+
|
|
14
|
+
REQUIRED:
|
|
15
|
+
- ✅ Business-level descriptions only
|
|
16
|
+
- ✅ Mermaid diagrams for all flows (flowchart TB, sequenceDiagram)
|
|
17
|
+
- ✅ [EXISTING]/[MODIFIED]/[NEW] system relationship markers
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
# Feature Analysis: {feature-name}
|
|
21
|
+
|
|
22
|
+
## Feature Information
|
|
23
|
+
|
|
24
|
+
| Item | Value |
|
|
25
|
+
|------|-------|
|
|
26
|
+
| Feature ID | {feature_id} |
|
|
27
|
+
| Feature Name | {feature_name} |
|
|
28
|
+
| Feature Type | {Page+API / API / Page} |
|
|
29
|
+
| Source PRD | {prd_relative_path} |
|
|
30
|
+
| Iteration | {iteration_id} |
|
|
31
|
+
| Analysis Date | {date} |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## System Context Summary
|
|
36
|
+
|
|
37
|
+
<!-- AI-NOTE: Provide a business-level overview of how this feature fits into the system.
|
|
38
|
+
Describe existing system capabilities that this feature can leverage.
|
|
39
|
+
Use BUSINESS terms only — do NOT mention specific frameworks, libraries, or technical components.
|
|
40
|
+
|
|
41
|
+
✅ CORRECT: "Leverages existing user authentication and role-based access control"
|
|
42
|
+
❌ WRONG: "Uses Spring Security @PreAuthorize and yudao-module-system AuthController" -->
|
|
43
|
+
|
|
44
|
+
### System Overview
|
|
45
|
+
|
|
46
|
+
{Brief description of the system and how this feature relates to it}
|
|
47
|
+
|
|
48
|
+
### Existing Reusable Capabilities
|
|
49
|
+
|
|
50
|
+
| Capability | Relevance to This Feature |
|
|
51
|
+
|------------|--------------------------|
|
|
52
|
+
| {e.g., User Authentication} | {e.g., All operations require authenticated sessions} |
|
|
53
|
+
| {e.g., Role-based Access} | {e.g., Different data visibility per role} |
|
|
54
|
+
|
|
55
|
+
### Feature Dependencies
|
|
56
|
+
|
|
57
|
+
| Dependent Feature | Dependency Type | Description |
|
|
58
|
+
|-------------------|-----------------|-------------|
|
|
59
|
+
| {e.g., F-CUST-001 Customer Management} | Data | {e.g., Appointment links to customer records} |
|
|
60
|
+
|
|
61
|
+
### Business Data Flow
|
|
62
|
+
|
|
63
|
+
<!-- AI-NOTE: Use Mermaid flowchart to show data flow. NO ASCII text diagrams. -->
|
|
64
|
+
|
|
65
|
+
```mermaid
|
|
66
|
+
flowchart TB
|
|
67
|
+
A["{Input Source}"] --> B["{This Feature}"]
|
|
68
|
+
B --> C["{Output/Downstream}"]
|
|
69
|
+
D["{Dependent Feature}"] --> B
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Frontend Platforms
|
|
75
|
+
|
|
76
|
+
| Platform ID | Type | Description |
|
|
77
|
+
|-------------|------|-------------|
|
|
78
|
+
| {platform_id} | {Web/Mobile} | {Brief platform description} |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Function Breakdown (Total: {N} functions)
|
|
83
|
+
|
|
84
|
+
<!-- AI-NOTE: List all functions identified from the PRD.
|
|
85
|
+
Each function should be a distinct business capability, NOT a technical component.
|
|
86
|
+
✅ CORRECT: "Appointment List with Search/Filter"
|
|
87
|
+
❌ WRONG: "AppointmentController REST endpoints" -->
|
|
88
|
+
|
|
89
|
+
| # | Function Name | Type | Related User Stories | System Relationship |
|
|
90
|
+
|---|--------------|------|---------------------|---------------------|
|
|
91
|
+
| F1 | {business function name} | {frontend/backend/both} | {user story references} | [NEW]/[EXISTING]/[MODIFIED] |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Function Details
|
|
96
|
+
|
|
97
|
+
<!-- AI-NOTE: Repeat this section for each function.
|
|
98
|
+
ALL descriptions must be from BUSINESS perspective.
|
|
99
|
+
FORBIDDEN: file paths, class names, component names, database tables, SQL, code snippets.
|
|
100
|
+
Use Mermaid for any process flows. -->
|
|
101
|
+
|
|
102
|
+
### F1: {Function Name}
|
|
103
|
+
|
|
104
|
+
**Description**: {1-2 sentence business description of what this function does for the user}
|
|
105
|
+
|
|
106
|
+
- **Frontend Changes ({platform_id})**:
|
|
107
|
+
<!-- AI-NOTE: Describe WHAT pages/screens/interactions are needed from a user perspective.
|
|
108
|
+
✅ "New appointment list page with multi-criteria search, role-based data filtering, and status indicators"
|
|
109
|
+
❌ "New AppointmentIndex.vue with ElDatePicker, v-hasPermi directive, el-button components" -->
|
|
110
|
+
- {[NEW/MODIFIED]} {Business description of the page/interaction}
|
|
111
|
+
|
|
112
|
+
- **Backend Changes**:
|
|
113
|
+
<!-- AI-NOTE: Describe WHAT business operations are needed, not HOW they're implemented.
|
|
114
|
+
✅ "Paginated query supporting customer name, date range, and status filters with role-based data isolation"
|
|
115
|
+
❌ "GET /appointment/page endpoint with @PreAuthorize, using BaseMapperX" -->
|
|
116
|
+
- {[NEW/MODIFIED]} {Business description of the operation}
|
|
117
|
+
|
|
118
|
+
- **Data Changes**:
|
|
119
|
+
<!-- AI-NOTE: Describe WHAT data entities are needed at a conceptual level.
|
|
120
|
+
✅ "New Appointment entity with: ID, customer reference, staff reference, date/time, status lifecycle"
|
|
121
|
+
❌ "New appointment_info table with customer_id BIGINT, staff_id BIGINT, CREATE TABLE..." -->
|
|
122
|
+
- {[NEW/MODIFIED]} {Business description of data entities and key attributes}
|
|
123
|
+
|
|
124
|
+
- **System Relationship**: {[NEW]/[EXISTING]/[MODIFIED]} — {explanation of how this relates to existing system capabilities}
|
|
125
|
+
|
|
126
|
+
**Business Flow**:
|
|
127
|
+
|
|
128
|
+
```mermaid
|
|
129
|
+
flowchart TB
|
|
130
|
+
Start(["{User action}"]) --> Step1["{Business step 1}"]
|
|
131
|
+
Step1 --> Decision{"{Business decision}"}
|
|
132
|
+
Decision -->|Yes| Step2["{Business step 2}"]
|
|
133
|
+
Decision -->|No| Error["{Error handling}"]
|
|
134
|
+
Step2 --> End(["{Completion}"])
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Name Discrepancy Notice (if applicable)
|
|
140
|
+
|
|
141
|
+
<!-- AI-NOTE: Only include this section if parameter feature_name differs from PRD feature name -->
|
|
142
|
+
|
|
143
|
+
| Item | Value |
|
|
144
|
+
|------|-------|
|
|
145
|
+
| Parameter feature_name | {feature_name} |
|
|
146
|
+
| PRD actual feature name | {prd_name} |
|
|
147
|
+
| Discrepancy | {description} |
|
|
148
|
+
| File naming follows | parameter value (as per Filename Lock Rule) |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Summary Statistics
|
|
153
|
+
|
|
154
|
+
| Item | Count |
|
|
155
|
+
|------|-------|
|
|
156
|
+
| Total Functions | {N} |
|
|
157
|
+
| [NEW] Functions | {count} |
|
|
158
|
+
| [MODIFIED] Functions | {count} |
|
|
159
|
+
| [EXISTING] Reused Capabilities | {count} |
|
|
160
|
+
| Frontend Platforms | {count} |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Decomposition Status
|
|
165
|
+
|
|
166
|
+
| Checkpoint | Status | Timestamp |
|
|
167
|
+
|------------|--------|-----------|
|
|
168
|
+
| Checkpoint A | {passed/pending} | {timestamp or null} |
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Checklist
|
|
173
|
+
|
|
174
|
+
- [ ] PRD read and all requirements covered
|
|
175
|
+
- [ ] System knowledge loaded
|
|
176
|
+
- [ ] Function breakdown complete with [NEW]/[EXISTING]/[MODIFIED] markers
|
|
177
|
+
- [ ] Function count within 3-8 range (Single Feature Mode)
|
|
178
|
+
- [ ] **CRITICAL — Business content only**: Zero file paths, framework names, code snippets, SQL, database artifacts, component names
|
|
179
|
+
- [ ] **CRITICAL — Mermaid diagrams**: All flows use Mermaid syntax, no ASCII flowcharts
|
|
180
|
+
- [ ] Checkpoint A passed
|
|
@@ -36,6 +36,7 @@ ISA-95 Stages 4-6 as internal thinking framework:
|
|
|
36
36
|
|
|
37
37
|
**MANDATORY:**
|
|
38
38
|
- Template-first workflow — Step 5 (copy template) MUST precede Step 6 (fill content)
|
|
39
|
+
- **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`.
|
|
39
40
|
|
|
40
41
|
**NOTE:** Design process is internal — no intermediate design-data files are produced.
|
|
41
42
|
|
|
@@ -170,6 +171,8 @@ Create ASCII wireframes showing layout, UI elements, navigation.
|
|
|
170
171
|
|
|
171
172
|
Document: `User Action → Frontend Response → Backend API Call`
|
|
172
173
|
|
|
174
|
+
**Output format: Mermaid `sequenceDiagram`** — Generate interaction flows as Mermaid sequence diagrams showing: User → Frontend → Backend API → Data Store. DO NOT use ASCII text charts.
|
|
175
|
+
|
|
173
176
|
> **ISA-95 Stage 4 Thinking — Information Flows**
|
|
174
177
|
> - Cross-module flows: Map data flows between feature and other modules
|
|
175
178
|
> - Sequence coverage: Complete chain user→frontend→backend→database→external
|
|
@@ -184,6 +187,12 @@ Document: `User Action → Frontend Response → Backend API Call`
|
|
|
184
187
|
|
|
185
188
|
## Step 2: Backend Design
|
|
186
189
|
|
|
190
|
+
> **CRITICAL CONSTRAINT**: Backend design in Feature Spec must remain at the BUSINESS API level:
|
|
191
|
+
> - Describe API endpoints as business operations (e.g., "Create Shop" operation with business parameters)
|
|
192
|
+
> - Describe business validation rules in plain language (e.g., "Shop name must be unique within tenant")
|
|
193
|
+
> - Describe data entities as business concepts with business field types (Text, Number, Date, Enum)
|
|
194
|
+
> - Do NOT include: Java class names, SQL statements, ORM mappings, framework annotations, Maven module paths
|
|
195
|
+
|
|
187
196
|
### 2.1 API/Interface List
|
|
188
197
|
|
|
189
198
|
| Interface | Method | Description |
|
|
@@ -199,6 +208,8 @@ Document: `User Action → Frontend Response → Backend API Call`
|
|
|
199
208
|
| Data Operations | What data to read/write |
|
|
200
209
|
| Response | What data to return |
|
|
201
210
|
|
|
211
|
+
**Output format: Mermaid `flowchart TD`** — Generate processing logic as Mermaid flowcharts showing: business validation → data operation → response. DO NOT use ASCII text charts.
|
|
212
|
+
|
|
202
213
|
### 2.3 Data Access Scheme
|
|
203
214
|
|
|
204
215
|
| Operation | Data Target | Type |
|
|
@@ -327,6 +338,14 @@ Document: `User Action → Frontend Response → Backend API Call`
|
|
|
327
338
|
|
|
328
339
|
5. **Data Model Completeness**: "Does the data model cover all fields and relationships needed?"
|
|
329
340
|
|
|
341
|
+
6. **CRITICAL — Business Perspective Validation**: "Does the specification contain ONLY business concepts and rules? Verify there are NO:
|
|
342
|
+
- ❌ File paths or code directory structures
|
|
343
|
+
- ❌ Framework names or specific technologies (Java, MyBatis, Vue component names, etc.)
|
|
344
|
+
- ❌ Actual code snippets or SQL statements
|
|
345
|
+
- ❌ Component library names or framework-specific syntax
|
|
346
|
+
- ❌ Database table/column names or technical data types
|
|
347
|
+
If ANY of these are present, you MUST revise the affected sections to use pure business descriptions before proceeding."
|
|
348
|
+
|
|
330
349
|
**WAIT for user confirmation before proceeding to document generation.**
|
|
331
350
|
|
|
332
351
|
### 4.3 Update Checkpoints
|
|
@@ -396,6 +415,13 @@ Log: "✅ Checkpoint B (feature_design_review) passed and recorded"
|
|
|
396
415
|
| 5. API Contract Summary | Aggregated from Step 2.1 API List |
|
|
397
416
|
| 6. Notes | Contextual notes from analysis |
|
|
398
417
|
|
|
418
|
+
**CRITICAL — Diagram Format Rule:**
|
|
419
|
+
- "交互流程" / "Interaction Flow" sections → MUST use Mermaid `sequenceDiagram`
|
|
420
|
+
- "核心业务逻辑" / "Processing Logic" sections → MUST use Mermaid `flowchart TD`
|
|
421
|
+
- "跨函数流程" / "Cross-Function Flow" sections → MUST use Mermaid `sequenceDiagram`
|
|
422
|
+
- Plain text / ASCII flowcharts are FORBIDDEN in these sections
|
|
423
|
+
- Reference: `speccrew-workspace/docs/rules/mermaid-rule.md` for syntax compliance
|
|
424
|
+
|
|
399
425
|
### Filling Rules
|
|
400
426
|
|
|
401
427
|
- Use `search_replace` for each section individually
|
|
@@ -447,6 +473,13 @@ Log: "✅ Feature Spec generation completed. Checkpoint feature_spec_review pass
|
|
|
447
473
|
| No Technology Decisions | Do NOT specify frameworks, databases, technologies |
|
|
448
474
|
| Focus on WHAT not HOW | Describe what system does, not how it's implemented |
|
|
449
475
|
| ASCII Wireframes Only | Use ASCII art for UI prototypes |
|
|
476
|
+
| **FORBIDDEN: File Paths** | Do NOT include any file paths, code paths, or directory structures (e.g., src/views/..., yudao-module-base/..., pages/...) |
|
|
477
|
+
| **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 |
|
|
478
|
+
| **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) |
|
|
479
|
+
| **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 |
|
|
480
|
+
| **FORBIDDEN: Component Names** | Do NOT reference UI component library element names (ElDatePicker, ElMessageBox, wd-date-time-picker). Describe interaction behavior instead |
|
|
481
|
+
| **FORBIDDEN: Database Artifacts** | Do NOT include table names, column names, index names, or any SQL statements. Use conceptual entity names and business field names |
|
|
482
|
+
| **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 |
|
|
450
483
|
| Mermaid Compatibility | Follow mermaid-rule.md guidelines |
|
|
451
484
|
| Clear Markers | Use [EXISTING]/[MODIFIED]/[NEW] consistently |
|
|
452
485
|
| Template-First | Copy template before filling content |
|
|
@@ -471,7 +504,10 @@ Log: "✅ Feature Spec generation completed. Checkpoint feature_spec_review pass
|
|
|
471
504
|
- [ ] Output path determined
|
|
472
505
|
- [ ] Template copied using `create_file`
|
|
473
506
|
- [ ] All sections filled using `search_replace`
|
|
474
|
-
- [ ] Mermaid
|
|
507
|
+
- [ ] **[CRITICAL]** Interaction Flow uses Mermaid sequenceDiagram (NOT ASCII)
|
|
508
|
+
- [ ] **[CRITICAL]** Processing Logic uses Mermaid flowchart TD (NOT ASCII)
|
|
509
|
+
- [ ] All Mermaid diagrams follow mermaid-rule.md compliance rules
|
|
475
510
|
- [ ] `.checkpoints.json` updated via script
|
|
476
511
|
- [ ] No technology decisions included
|
|
477
512
|
- [ ] No intermediate design-data artifact created
|
|
513
|
+
- [ ] **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
|
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# Feature Specification - [Feature Name]
|
|
2
2
|
|
|
3
|
+
<!-- AI-NOTE: CRITICAL — Business Perspective Guidelines
|
|
4
|
+
This Feature Spec is a PURE BUSINESS document describing WHAT the system does, NOT HOW it's implemented.
|
|
5
|
+
|
|
6
|
+
## What to Include (Business Perspective)
|
|
7
|
+
- ✅ User roles, business processes, functional requirements
|
|
8
|
+
- ✅ Data meaning, business rules, constraints (conceptual level)
|
|
9
|
+
- ✅ API functionality and parameter business meaning (no framework details)
|
|
10
|
+
- ✅ Business validation rules, permission rules (business level)
|
|
11
|
+
- ✅ Interaction flow business logic (What happens)
|
|
12
|
+
- ✅ Conceptual data entities and their relationships
|
|
13
|
+
|
|
14
|
+
## What to EXCLUDE (Technical Perspective) — FORBIDDEN
|
|
15
|
+
- ❌ File paths or code paths (src/views/..., yudao-module-base/..., pages/base/...)
|
|
16
|
+
- ❌ Framework-specific code (Vue directives, Java annotations, SQL statements)
|
|
17
|
+
- ❌ Framework/library names as implementation choices (MyBatis-Plus, Flyway, wot-design-uni, Element Plus component names)
|
|
18
|
+
- ❌ Programming language specific types (VARCHAR(50), BIGINT, Long, String)
|
|
19
|
+
- ❌ Component library element names (el-button, wd-cell, ElDatePicker, etc.)
|
|
20
|
+
- ❌ Error code numeric values or enum definitions
|
|
21
|
+
- ❌ Database table names, column names, SQL DDL/DML
|
|
22
|
+
- ❌ API layer implementation (request.get, @TableName, etc.)
|
|
23
|
+
- ❌ Maven/Gradle module paths, package paths
|
|
24
|
+
- ❌ Class names, method signatures, annotation names
|
|
25
|
+
|
|
26
|
+
## Correct Approach Examples
|
|
27
|
+
|
|
28
|
+
❌ WRONG (Technical):
|
|
29
|
+
| Field | Type | Constraint |
|
|
30
|
+
| shop_id | BIGINT NOT NULL | FK to system_shop |
|
|
31
|
+
|
|
32
|
+
✅ CORRECT (Business):
|
|
33
|
+
| Field | Business Type | Constraint | Meaning |
|
|
34
|
+
| Shop ID | Identifier | Required, references Shop entity | Which shop this record belongs to |
|
|
35
|
+
|
|
36
|
+
❌ WRONG (Technical):
|
|
37
|
+
`src/views/base/shop/index.vue` with `<el-button v-hasPermi="['base:shop:create']">`
|
|
38
|
+
|
|
39
|
+
✅ CORRECT (Business):
|
|
40
|
+
Shop List Page — displays all shops with search/filter, includes "Add Shop" button (visible to Admin role only)
|
|
41
|
+
-->
|
|
42
|
+
|
|
3
43
|
> **Applicable Scenario**: System feature specification for a single feature or module
|
|
4
44
|
> **Target Audience**: speccrew-feature-designer, speccrew-designer, speccrew-dev
|
|
5
45
|
> **Source PRD**: [Link to PRD document]
|
|
@@ -23,7 +63,8 @@
|
|
|
23
63
|
|
|
24
64
|
### 1.2 Feature Scope
|
|
25
65
|
|
|
26
|
-
<!-- AI-NOTE: This specification covers a SINGLE Feature (business operation unit), not the entire module. Check all items that this specification covers.
|
|
66
|
+
<!-- AI-NOTE: This specification covers a SINGLE Feature (business operation unit), not the entire module. Check all items that this specification covers.
|
|
67
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
27
68
|
|
|
28
69
|
- [ ] {Function 1} - Frontend prototype + Interaction flow + Backend interface + Data definition
|
|
29
70
|
- [ ] {Function 2} - Frontend prototype + Interaction flow + Backend interface + Data definition
|
|
@@ -41,15 +82,18 @@
|
|
|
41
82
|
|
|
42
83
|
## 2. Function Details
|
|
43
84
|
|
|
44
|
-
<!-- AI-NOTE: Repeat Section 2.N for each function in the feature. Each function should include: frontend prototype, interaction flow, backend interface, and data definition.
|
|
85
|
+
<!-- AI-NOTE: Repeat Section 2.N for each function in the feature. Each function should include: frontend prototype, interaction flow, backend interface, and data definition.
|
|
86
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
45
87
|
|
|
46
88
|
### 2.1 Function: {Function Name}
|
|
47
89
|
|
|
48
90
|
#### 2.1.1 Frontend Prototype
|
|
49
91
|
|
|
50
|
-
<!-- AI-NOTE: If the project has multiple frontend platforms (e.g., web + mobile), create separate Frontend Prototype sub-sections for each platform. Use headers like "#### 2.1.1 Frontend Prototype - Web" and "#### 2.1.1b Frontend Prototype - Mobile". Each platform should have its own wireframes and element descriptions tailored to the platform's interaction patterns.
|
|
92
|
+
<!-- AI-NOTE: If the project has multiple frontend platforms (e.g., web + mobile), create separate Frontend Prototype sub-sections for each platform. Use headers like "#### 2.1.1 Frontend Prototype - Web" and "#### 2.1.1b Frontend Prototype - Mobile". Each platform should have its own wireframes and element descriptions tailored to the platform's interaction patterns.
|
|
93
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
51
94
|
|
|
52
|
-
<!-- AI-NOTE: Use ASCII wireframes to show the UI layout. Choose the appropriate pattern below based on the interface type.
|
|
95
|
+
<!-- AI-NOTE: Use ASCII wireframes to show the UI layout. Choose the appropriate pattern below based on the interface type.
|
|
96
|
+
FORBIDDEN: Do NOT use framework-specific component names (el-button, wd-cell, etc.) or file paths in wireframes. -->
|
|
53
97
|
|
|
54
98
|
**Pattern A: List Page**
|
|
55
99
|
|
|
@@ -195,7 +239,8 @@
|
|
|
195
239
|
|
|
196
240
|
#### 2.1.2 Interaction Flow
|
|
197
241
|
|
|
198
|
-
<!-- AI-NOTE: Use Mermaid sequenceDiagram to show the flow: User → Frontend → Backend API → Data Store. NO style definitions allowed. NO HTML tags.
|
|
242
|
+
<!-- AI-NOTE: Use Mermaid sequenceDiagram to show the flow: User → Frontend → Backend API → Data Store. NO style definitions allowed. NO HTML tags. CRITICAL: This section MUST contain mermaid syntax. Plain text or ASCII flowcharts are FORBIDDEN.
|
|
243
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
199
244
|
|
|
200
245
|
```mermaid
|
|
201
246
|
sequenceDiagram
|
|
@@ -241,6 +286,9 @@ sequenceDiagram
|
|
|
241
286
|
|
|
242
287
|
#### 2.1.3 Backend Interface
|
|
243
288
|
|
|
289
|
+
<!-- AI-NOTE: Describe API functionality from a business perspective. Focus on WHAT each API does, not HOW it's implemented.
|
|
290
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
291
|
+
|
|
244
292
|
**Interface List:**
|
|
245
293
|
|
|
246
294
|
| Interface Name | Method | Path Pattern | Description | Caller |
|
|
@@ -250,7 +298,8 @@ sequenceDiagram
|
|
|
250
298
|
|
|
251
299
|
**Processing Logic:**
|
|
252
300
|
|
|
253
|
-
<!-- AI-NOTE: Use Mermaid flowchart TD to show the processing logic for each core interface. Show: business validation → data operation → response. NO style definitions allowed.
|
|
301
|
+
<!-- AI-NOTE: Use Mermaid flowchart TD to show the processing logic for each core interface. Show: business validation → data operation → response. NO style definitions allowed. CRITICAL: This section MUST contain mermaid syntax. Plain text or ASCII flowcharts are FORBIDDEN.
|
|
302
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
254
303
|
|
|
255
304
|
```mermaid
|
|
256
305
|
flowchart TD
|
|
@@ -283,12 +332,17 @@ flowchart TD
|
|
|
283
332
|
|
|
284
333
|
#### 2.1.4 Data Definition
|
|
285
334
|
|
|
335
|
+
<!-- AI-NOTE: ALL field definitions MUST use BUSINESS terms, not technical types.
|
|
336
|
+
Example: NOT "VARCHAR(50) NOT NULL" → BUT "Text, required, max 50 characters"
|
|
337
|
+
CRITICAL: Never include database table/column names, SQL types, or framework-specific annotations.
|
|
338
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
339
|
+
|
|
286
340
|
**Fields:**
|
|
287
341
|
|
|
288
|
-
| Field Name |
|
|
289
|
-
|
|
290
|
-
| {Field Name} |
|
|
291
|
-
| {Field Name} | {Type} | {
|
|
342
|
+
| Field Name | Business Type | Constraint Rules | Business Meaning | New/Existing | Remarks |
|
|
343
|
+
|------------|---------------|------------------|------------------|--------------|---------|
|
|
344
|
+
| {Field Name} | Text/Number/Boolean/Date/Enum/Identifier | {e.g., Required, max 50 chars, unique} | {What this field means in business context} | NEW/EXISTING | {Additional notes} |
|
|
345
|
+
| {Field Name} | {Business Type} | {Constraints} | {Business Meaning} | NEW/EXISTING | {Remarks} |
|
|
292
346
|
|
|
293
347
|
**Data Source:**
|
|
294
348
|
|
|
@@ -328,7 +382,8 @@ flowchart TD
|
|
|
328
382
|
|
|
329
383
|
### 3.1 Shared Data Structures
|
|
330
384
|
|
|
331
|
-
<!-- AI-NOTE: List data structures used across multiple functions
|
|
385
|
+
<!-- AI-NOTE: List data structures used across multiple functions
|
|
386
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
332
387
|
|
|
333
388
|
| Structure Name | Used By Functions | Description |
|
|
334
389
|
|----------------|-------------------|-------------|
|
|
@@ -337,7 +392,8 @@ flowchart TD
|
|
|
337
392
|
|
|
338
393
|
### 3.2 Cross-Function Flows
|
|
339
394
|
|
|
340
|
-
<!-- AI-NOTE: Use Mermaid sequenceDiagram for flows that span multiple functions. NO style definitions. NO HTML tags.
|
|
395
|
+
<!-- AI-NOTE: Use Mermaid sequenceDiagram for flows that span multiple functions. NO style definitions. NO HTML tags.
|
|
396
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
341
397
|
|
|
342
398
|
```mermaid
|
|
343
399
|
sequenceDiagram
|
|
@@ -372,7 +428,8 @@ sequenceDiagram
|
|
|
372
428
|
|
|
373
429
|
### 4.2 Business Logic Rules
|
|
374
430
|
|
|
375
|
-
<!-- AI-NOTE: Numbered list of business rules
|
|
431
|
+
<!-- AI-NOTE: Numbered list of business rules
|
|
432
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
376
433
|
|
|
377
434
|
1. **{Rule Name}**: {Detailed description of the rule}
|
|
378
435
|
2. **{Rule Name}**: {Detailed description}
|
|
@@ -398,7 +455,8 @@ sequenceDiagram
|
|
|
398
455
|
|
|
399
456
|
### 5.2 Shared Response Format
|
|
400
457
|
|
|
401
|
-
<!-- AI-NOTE: Standard response JSON structure used across all APIs in this feature
|
|
458
|
+
<!-- AI-NOTE: Standard response JSON structure used across all APIs in this feature
|
|
459
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
402
460
|
|
|
403
461
|
**Success Response:**
|
|
404
462
|
|
|
@@ -436,21 +494,24 @@ sequenceDiagram
|
|
|
436
494
|
|
|
437
495
|
### 6.1 Pending Confirmations
|
|
438
496
|
|
|
439
|
-
<!-- AI-NOTE: Checklist of items needing confirmation from stakeholders
|
|
497
|
+
<!-- AI-NOTE: Checklist of items needing confirmation from stakeholders
|
|
498
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
440
499
|
|
|
441
500
|
- [ ] **{Item 1}**: {Description of what needs confirmation}
|
|
442
501
|
- [ ] **{Item 2}**: {Description}
|
|
443
502
|
|
|
444
503
|
### 6.2 Assumptions & Dependencies
|
|
445
504
|
|
|
446
|
-
<!-- AI-NOTE: List assumptions made and external dependencies
|
|
505
|
+
<!-- AI-NOTE: List assumptions made and external dependencies
|
|
506
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
447
507
|
|
|
448
508
|
- **Assumption 1**: {Description of assumption}
|
|
449
509
|
- **Dependency 1**: {External system or module this feature depends on}
|
|
450
510
|
|
|
451
511
|
### 6.3 Extension Notes
|
|
452
512
|
|
|
453
|
-
<!-- AI-NOTE: Notes about future iterations or extensions
|
|
513
|
+
<!-- AI-NOTE: Notes about future iterations or extensions
|
|
514
|
+
FORBIDDEN: Do NOT include file paths, framework code, SQL statements, component library names, or any implementation-specific details in this section. -->
|
|
454
515
|
|
|
455
516
|
- {Note about potential future enhancements}
|
|
456
517
|
- {Note about scalability considerations}
|
|
@@ -91,28 +91,11 @@ flowchart LR
|
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
94
|
-
## 3.
|
|
94
|
+
## 3. تهيئة قاعدة المعرفة
|
|
95
95
|
|
|
96
96
|
قبل بدء عملية الهندسة الرسمية، تحتاج إلى تهيئة قاعدة معرفة المشروع.
|
|
97
97
|
|
|
98
|
-
### 3.1
|
|
99
|
-
|
|
100
|
-
**مثال على المحادثة**:
|
|
101
|
-
```
|
|
102
|
-
@speccrew-team-leader تشخيص المشروع
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**ما سيفعله الوكيل**:
|
|
106
|
-
- مسح هيكل المشروع
|
|
107
|
-
- اكتشاف المكدس التقني
|
|
108
|
-
- تحديد الوحدات التجارية
|
|
109
|
-
|
|
110
|
-
**المخرجات**:
|
|
111
|
-
```
|
|
112
|
-
speccrew-workspace/knowledges/base/diagnosis-reports/diagnosis-report-{date}.md
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### 3.2 تهيئة قاعدة المعرفة التقنية
|
|
98
|
+
### 3.1 تهيئة قاعدة المعرفة التقنية
|
|
116
99
|
|
|
117
100
|
**مثال على المحادثة**:
|
|
118
101
|
```
|
|
@@ -134,7 +117,7 @@ speccrew-workspace/knowledges/techs/{platform-id}/
|
|
|
134
117
|
└── INDEX.md # ملف الفهرس
|
|
135
118
|
```
|
|
136
119
|
|
|
137
|
-
### 3.
|
|
120
|
+
### 3.2 تهيئة قاعدة المعرفة التجارية
|
|
138
121
|
|
|
139
122
|
**مثال على المحادثة**:
|
|
140
123
|
```
|
|
@@ -467,11 +450,26 @@ speccrew update
|
|
|
467
450
|
|
|
468
451
|
> **ملاحظة**: يجب تنفيذ الخطوتين. تنفيذ `speccrew update` فقط لن يحدث أداة CLI نفسها؛ وتنفيذ `npm install` فقط لن يحدث الملفات في المشروع.
|
|
469
452
|
|
|
470
|
-
### س5:
|
|
453
|
+
### س5: يظهر `speccrew update` إصدارًا جديدًا لكن بعد التثبيت لا يزال الإصدار القديم؟
|
|
454
|
+
|
|
455
|
+
عادةً ما يكون بسبب ذاكرة التخزين المؤقت npm. الحل:
|
|
456
|
+
|
|
457
|
+
```bash
|
|
458
|
+
npm cache clean --force
|
|
459
|
+
npm install -g speccrew@latest
|
|
460
|
+
npm list -g speccrew
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
إذا لم يعمل، حدد رقم الإصدار:
|
|
464
|
+
```bash
|
|
465
|
+
npm install -g speccrew@0.5.6
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### س6: كيفية عرض التكرارات التاريخية؟
|
|
471
469
|
|
|
472
470
|
بعد الأرشفة، عرض في `speccrew-workspace/iteration-archives/`، منظم بتنسيق `{رقم}-{نوع}-{اسم}-{تاريخ}/`.
|
|
473
471
|
|
|
474
|
-
### س
|
|
472
|
+
### س7: هل تحتاج قاعدة المعرفة إلى تحديثات دورية؟
|
|
475
473
|
|
|
476
474
|
مطلوب إعادة التهيئة في الحالات التالية:
|
|
477
475
|
- تغييرات كبيرة في هيكل المشروع
|
|
@@ -486,7 +484,7 @@ speccrew update
|
|
|
486
484
|
|
|
487
485
|
| المرحلة | الوكيل | محادثة البدء |
|
|
488
486
|
|---------|--------|--------------|
|
|
489
|
-
|
|
487
|
+
|
|
490
488
|
| التهيئة | Team Leader | `@speccrew-team-leader تهيئة قاعدة المعرفة التقنية` |
|
|
491
489
|
| تحليل المتطلبات | Product Manager | `@speccrew-product-manager لدي متطلب جديد: [الوصف]` |
|
|
492
490
|
| تصميم الميزات | Feature Designer | `@speccrew-feature-designer بدء تصميم الميزات` |
|
|
@@ -520,7 +518,7 @@ speccrew update
|
|
|
520
518
|
## الخطوات التالية
|
|
521
519
|
|
|
522
520
|
1. قم بتشغيل `speccrew init --ide qoder` لتهيئة مشروعك
|
|
523
|
-
2. نفذ
|
|
521
|
+
2. نفذ تهيئة قاعدة المعرفة
|
|
524
522
|
3. تقدم عبر كل مرحلة باتباع سير العمل، واستمتع بتجربة التطوير المستندة إلى المواصفات!
|
|
525
523
|
|
|
526
524
|
</div>
|