speccrew 0.5.0 → 0.5.2
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 +36 -82
- package/.speccrew/agents/speccrew-system-designer.md +380 -38
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +232 -103
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +238 -0
- package/package.json +2 -3
- package/.speccrew/skills/speccrew-fd-feature-generate/SKILL.md +0 -243
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-sd-framework-evaluate
|
|
3
|
+
description: Framework Evaluation Skill for System Designer. Analyzes Feature Spec requirements against current technology stack capabilities, identifies capability gaps, evaluates potential open-source frameworks/libraries, and generates a framework-evaluation.md report. Invoked by System Designer Agent during Phase 3.
|
|
4
|
+
tools: Read, Write, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
|
|
9
|
+
- System Designer Agent dispatches this skill with Feature Spec paths and techs knowledge paths
|
|
10
|
+
- User requests framework evaluation for current iteration
|
|
11
|
+
- Need to assess technology stack gaps before system design
|
|
12
|
+
|
|
13
|
+
# Workflow
|
|
14
|
+
|
|
15
|
+
## Absolute Constraints
|
|
16
|
+
|
|
17
|
+
> **These rules apply to ALL steps. Violation = task failure.**
|
|
18
|
+
|
|
19
|
+
1. **READ-ONLY on Feature Spec and API Contract** — NEVER modify Feature Spec or API Contract documents. Only read for analysis.
|
|
20
|
+
2. **READ-ONLY on techs knowledge** — NEVER modify techs knowledge files. Only read for capability assessment.
|
|
21
|
+
3. **Evidence-based evaluation** — Every recommendation MUST cite specific Feature Spec requirements and specific tech stack limitations.
|
|
22
|
+
4. **No assumptions** — DO NOT assume framework capabilities. Only recommend frameworks with documented capabilities.
|
|
23
|
+
|
|
24
|
+
## Step 1: Read Inputs
|
|
25
|
+
|
|
26
|
+
**Input Parameters** (from agent context):
|
|
27
|
+
|
|
28
|
+
| Parameter | Required | Description |
|
|
29
|
+
|-----------|----------|-------------|
|
|
30
|
+
| `feature_spec_paths` | Yes | Array of Feature Spec file paths |
|
|
31
|
+
| `api_contract_paths` | Yes | Array of API Contract file paths |
|
|
32
|
+
| `techs_knowledge_paths` | Yes | Object with platform_id → knowledge paths mapping |
|
|
33
|
+
| `iteration_path` | Yes | Current iteration directory path |
|
|
34
|
+
| `output_path` | No | Output file path (default: `iteration_path/03.system-design/framework-evaluation.md`) |
|
|
35
|
+
|
|
36
|
+
Read in order:
|
|
37
|
+
|
|
38
|
+
1. **All Feature Spec documents** — Extract functional requirements, especially:
|
|
39
|
+
- Real-time features (WebSocket, SSE, push notifications)
|
|
40
|
+
- File processing (upload, download, preview, conversion)
|
|
41
|
+
- Data visualization (charts, dashboards, reports)
|
|
42
|
+
- Rich text / editor features
|
|
43
|
+
- Map / geolocation features
|
|
44
|
+
- Payment / third-party integrations
|
|
45
|
+
- Search / filtering / pagination patterns
|
|
46
|
+
- Media processing (image, video, audio)
|
|
47
|
+
|
|
48
|
+
2. **All API Contract documents** — Extract:
|
|
49
|
+
- Communication protocols (REST, GraphQL, WebSocket, gRPC)
|
|
50
|
+
- Authentication patterns (JWT, OAuth, Session)
|
|
51
|
+
- Data formats (JSON, protobuf, multipart)
|
|
52
|
+
|
|
53
|
+
3. **Techs knowledge per platform**:
|
|
54
|
+
- `tech-stack.md` — Current frameworks, libraries, versions
|
|
55
|
+
- `architecture.md` — Current architecture patterns
|
|
56
|
+
- `conventions-design.md` — Design conventions
|
|
57
|
+
- `conventions-dev.md` — Development conventions
|
|
58
|
+
|
|
59
|
+
## Step 2: Gap Analysis
|
|
60
|
+
|
|
61
|
+
For each requirement extracted in Step 1, evaluate against current tech stack:
|
|
62
|
+
|
|
63
|
+
### 2.1 Build Capability Matrix
|
|
64
|
+
|
|
65
|
+
| Requirement Category | Specific Requirement | Source (Feature ID) | Current Stack Support | Gap? |
|
|
66
|
+
|---------------------|---------------------|--------------------|-----------------------|------|
|
|
67
|
+
| Real-time | WebSocket connections | F-CRM-01 | Not in current stack | YES |
|
|
68
|
+
| File Processing | PDF preview | F-ORD-02 | Not in current stack | YES |
|
|
69
|
+
| Data Viz | Dashboard charts | F-RPT-01 | Not in current stack | YES |
|
|
70
|
+
| Authentication | JWT token | F-SYS-01 | Already supported | NO |
|
|
71
|
+
|
|
72
|
+
### 2.2 Categorize Gaps
|
|
73
|
+
|
|
74
|
+
Group identified gaps by category:
|
|
75
|
+
|
|
76
|
+
- **Critical Gaps**: Core functionality cannot be implemented without new framework
|
|
77
|
+
- **Enhancement Gaps**: Functionality possible but significantly better with dedicated library
|
|
78
|
+
- **Optional Gaps**: Nice-to-have improvements, current stack can handle acceptably
|
|
79
|
+
|
|
80
|
+
## Step 3: Framework Research
|
|
81
|
+
|
|
82
|
+
For each identified gap (Critical and Enhancement only):
|
|
83
|
+
|
|
84
|
+
### 3.1 Evaluate Candidates
|
|
85
|
+
|
|
86
|
+
For each gap, research and evaluate 1-3 candidate frameworks/libraries:
|
|
87
|
+
|
|
88
|
+
| Evaluation Criteria | Description |
|
|
89
|
+
|--------------------|-------------|
|
|
90
|
+
| **Functionality Fit** | Does it solve the specific capability gap? |
|
|
91
|
+
| **License** | MIT, Apache 2.0, BSD preferred. GPL requires flagging. |
|
|
92
|
+
| **Maturity** | GitHub stars, npm downloads, last release date, version stability |
|
|
93
|
+
| **Bundle Size** | Impact on frontend bundle (if applicable) |
|
|
94
|
+
| **Integration Complexity** | How much existing code needs modification? |
|
|
95
|
+
| **Community & Docs** | Documentation quality, community support, ecosystem |
|
|
96
|
+
|
|
97
|
+
### 3.2 Make Recommendations
|
|
98
|
+
|
|
99
|
+
For each gap, provide a single primary recommendation with justification.
|
|
100
|
+
|
|
101
|
+
## Step 4: Generate Report
|
|
102
|
+
|
|
103
|
+
Write the framework evaluation report to `output_path`.
|
|
104
|
+
|
|
105
|
+
### Report Structure (When Gaps Found)
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
# Framework Evaluation Report — iteration_name
|
|
109
|
+
|
|
110
|
+
## 1. Evaluation Summary
|
|
111
|
+
|
|
112
|
+
- **Iteration**: iteration_name
|
|
113
|
+
- **Feature Specs Analyzed**: feature_count
|
|
114
|
+
- **Platforms Evaluated**: platform_count
|
|
115
|
+
- **Capability Gaps Found**: gap_count
|
|
116
|
+
- **New Frameworks Recommended**: framework_count
|
|
117
|
+
|
|
118
|
+
## 2. Capability Gap Analysis
|
|
119
|
+
|
|
120
|
+
### 2.1 Gap Summary
|
|
121
|
+
|
|
122
|
+
| # | Gap Category | Specific Gap | Severity | Source Features | Recommendation |
|
|
123
|
+
|---|-------------|-------------|----------|----------------|---------------|
|
|
124
|
+
| 1 | Real-time | WebSocket support | Critical | F-CRM-01, F-MSG-01 | Socket.IO |
|
|
125
|
+
| 2 | Data Viz | Chart rendering | Enhancement | F-RPT-01 | ECharts |
|
|
126
|
+
| ... | ... | ... | ... | ... | ... |
|
|
127
|
+
|
|
128
|
+
### 2.2 Detailed Gap Analysis
|
|
129
|
+
|
|
130
|
+
#### Gap 1: {Gap Name}
|
|
131
|
+
|
|
132
|
+
**Requirement Source**: {Feature IDs and specific requirement text}
|
|
133
|
+
**Current Stack Status**: {What the current stack provides/lacks}
|
|
134
|
+
**Impact**: {What cannot be implemented without addressing this gap}
|
|
135
|
+
|
|
136
|
+
## 3. Framework Recommendations
|
|
137
|
+
|
|
138
|
+
### 3.1 Recommendation Summary
|
|
139
|
+
|
|
140
|
+
| # | Framework | Version | License | For Gap | Platform | Integration Impact |
|
|
141
|
+
|---|-----------|---------|---------|---------|----------|-------------------|
|
|
142
|
+
| 1 | Socket.IO | ^4.x | MIT | WebSocket support | backend + web | Medium |
|
|
143
|
+
| 2 | ECharts | ^5.x | Apache 2.0 | Chart rendering | web | Low |
|
|
144
|
+
|
|
145
|
+
### 3.2 Detailed Recommendations
|
|
146
|
+
|
|
147
|
+
#### Recommendation 1: {Framework Name}
|
|
148
|
+
|
|
149
|
+
- **Solves Gap**: {gap description}
|
|
150
|
+
- **License**: {license type}
|
|
151
|
+
- **Maturity**: {stars, downloads, last release}
|
|
152
|
+
- **Integration Impact**: Low / Medium / High
|
|
153
|
+
- **Integration Notes**: {specific integration considerations}
|
|
154
|
+
- **Alternatives Considered**: {other options and why not chosen}
|
|
155
|
+
|
|
156
|
+
## 4. No-Change Confirmations
|
|
157
|
+
|
|
158
|
+
Capabilities already covered by current stack:
|
|
159
|
+
- {capability 1}: Covered by {existing framework}
|
|
160
|
+
- {capability 2}: Covered by {existing framework}
|
|
161
|
+
|
|
162
|
+
## 5. Version Constraints
|
|
163
|
+
|
|
164
|
+
| Framework | Required Version | Constraint Reason |
|
|
165
|
+
|-----------|-----------------|-------------------|
|
|
166
|
+
| {name} | {version range} | {compatibility reason} |
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Simplified Report Structure (When No Gaps Found)
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
# Framework Evaluation Report — iteration_name
|
|
173
|
+
|
|
174
|
+
## 1. Evaluation Summary
|
|
175
|
+
|
|
176
|
+
- **Feature Specs Analyzed**: feature_count
|
|
177
|
+
- **Platforms Evaluated**: platform_count
|
|
178
|
+
- **Capability Gaps Found**: 0
|
|
179
|
+
- **New Frameworks Recommended**: 0
|
|
180
|
+
|
|
181
|
+
## 2. Assessment
|
|
182
|
+
|
|
183
|
+
All Feature Spec requirements can be fully implemented with the current technology stack. No new frameworks or libraries are needed.
|
|
184
|
+
|
|
185
|
+
### Capabilities Confirmed
|
|
186
|
+
- {list each major capability confirmed as supported}
|
|
187
|
+
|
|
188
|
+
## 3. Conclusion
|
|
189
|
+
|
|
190
|
+
Current tech stack is sufficient. Proceed to system design without framework changes.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Step 5: Output Task Completion Report
|
|
194
|
+
|
|
195
|
+
After writing the report, output:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
--- TASK COMPLETION REPORT ---
|
|
199
|
+
Task: Framework Evaluation
|
|
200
|
+
Status: SUCCESS
|
|
201
|
+
Output: output_path
|
|
202
|
+
Gaps Found: gap_count
|
|
203
|
+
Frameworks Recommended: framework_count
|
|
204
|
+
--- END REPORT ---
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
If any step fails:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
--- TASK COMPLETION REPORT ---
|
|
211
|
+
Task: Framework Evaluation
|
|
212
|
+
Status: FAILED
|
|
213
|
+
Error: {specific error description}
|
|
214
|
+
Failed At: Step {N}
|
|
215
|
+
--- END REPORT ---
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
# Key Rules
|
|
219
|
+
|
|
220
|
+
| Rule | Description |
|
|
221
|
+
|------|-------------|
|
|
222
|
+
| **READ-ONLY Inputs** | Feature Spec, API Contract, and techs knowledge are reference only — never modify |
|
|
223
|
+
| **Evidence-based** | Every gap and recommendation must cite specific requirement sources |
|
|
224
|
+
| **Gap Categories** | Only Critical and Enhancement gaps require framework recommendations |
|
|
225
|
+
| **License Awareness** | GPL and copyleft licenses must be flagged in recommendations |
|
|
226
|
+
| **No Assumptions** | Only recommend frameworks with documented, verified capabilities |
|
|
227
|
+
|
|
228
|
+
# Checklist
|
|
229
|
+
|
|
230
|
+
- [ ] All Feature Spec documents read and requirements extracted
|
|
231
|
+
- [ ] All API Contract documents read and protocols identified
|
|
232
|
+
- [ ] Techs knowledge loaded for all platforms
|
|
233
|
+
- [ ] Capability matrix built with all requirements mapped
|
|
234
|
+
- [ ] Gaps categorized by severity (Critical/Enhancement/Optional)
|
|
235
|
+
- [ ] Framework candidates evaluated against criteria
|
|
236
|
+
- [ ] Primary recommendations made for each gap
|
|
237
|
+
- [ ] Report generated with correct structure
|
|
238
|
+
- [ ] Task Completion Report output
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "speccrew",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Spec-Driven Development toolkit for AI-powered IDEs",
|
|
5
5
|
"author": "charlesmu99",
|
|
6
6
|
"repository": {
|
|
@@ -32,6 +32,5 @@
|
|
|
32
32
|
"agents",
|
|
33
33
|
"skills"
|
|
34
34
|
],
|
|
35
|
-
"license": "MIT"
|
|
36
|
-
"scripts": {}
|
|
35
|
+
"license": "MIT"
|
|
37
36
|
}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: speccrew-fd-feature-generate
|
|
3
|
-
description: Feature Spec Generation SOP. Reads .feature-analysis.md and .feature-design-data.md interface contracts, assembles complete Feature Spec document using template-first workflow. Handles Checkpoint B user confirmation before writing files. Use when Feature Designer needs to generate final Feature Spec document from completed design data.
|
|
4
|
-
tools: Read, Write, Glob, Grep
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Skill Overview
|
|
8
|
-
|
|
9
|
-
Generates final Feature Spec document from completed design data. Reads intermediate artifacts and assembles complete specification using template-first workflow.
|
|
10
|
-
|
|
11
|
-
## Trigger Scenarios
|
|
12
|
-
|
|
13
|
-
- Feature design data ready (`.feature-design-data.md` exists)
|
|
14
|
-
- Feature analysis complete (`.feature-analysis.md` exists)
|
|
15
|
-
- Final Feature Spec document generation needed
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Workflow
|
|
20
|
-
|
|
21
|
-
## Absolute Constraints
|
|
22
|
-
|
|
23
|
-
> **Violation = task failure**
|
|
24
|
-
|
|
25
|
-
### ABORT CONDITIONS
|
|
26
|
-
- `.feature-analysis.md` missing → **HARD STOP**
|
|
27
|
-
- `.feature-design-data.md` missing → **HARD STOP**
|
|
28
|
-
- Template file missing → **HARD STOP**
|
|
29
|
-
- **NEVER skip preconditions verification**
|
|
30
|
-
|
|
31
|
-
### FORBIDDEN
|
|
32
|
-
- `create_file` for final documents — use template + `search_replace`
|
|
33
|
-
- Full-file rewrite — use targeted `search_replace` per section
|
|
34
|
-
|
|
35
|
-
### MANDATORY
|
|
36
|
-
- **Template-first workflow** — Step 4 (copy template) MUST precede Step 5 (fill content)
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Step 1: Read Input & Verify Preconditions
|
|
41
|
-
|
|
42
|
-
### 1.1 Input Parameters
|
|
43
|
-
|
|
44
|
-
| Parameter | Required | Description |
|
|
45
|
-
|-----------|----------|-------------|
|
|
46
|
-
| `feature_analysis_path` | Yes | Path to `.feature-analysis.md` |
|
|
47
|
-
| `feature_design_data_path` | Yes | Path to `.feature-design-data.md` |
|
|
48
|
-
| `feature_id` | No | Feature identifier (e.g., F-CRM-01) |
|
|
49
|
-
| `feature_name` | No | Feature name |
|
|
50
|
-
| `feature_type` | No | Page+API or API-only |
|
|
51
|
-
| `output_path` | No | Custom output path (auto-generated if not provided) |
|
|
52
|
-
| `skip_checkpoint` | No | Boolean. If true, skip Checkpoint B (batch mode) |
|
|
53
|
-
|
|
54
|
-
### 1.2 Verify Input Files
|
|
55
|
-
|
|
56
|
-
**IF either file missing → ABORT:**
|
|
57
|
-
```
|
|
58
|
-
❌ ERROR: Prerequisite files not found.
|
|
59
|
-
Missing: [filename]
|
|
60
|
-
|
|
61
|
-
This skill requires completed feature analysis and design.
|
|
62
|
-
Please run speccrew-fd-feature-analyze and speccrew-fd-feature-design first.
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 1.3 Read Files
|
|
66
|
-
|
|
67
|
-
1. Read `.feature-analysis.md` — extract: Function Breakdown, [EXISTING]/[MODIFIED]/[NEW] counts
|
|
68
|
-
2. Read `.feature-design-data.md` — extract: Frontend Design, Backend Design, Data Model, Business Rules
|
|
69
|
-
3. Read Feature Spec template: `speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md`
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Step 2: Build Design Summary
|
|
74
|
-
|
|
75
|
-
Extract statistics from intermediate artifacts:
|
|
76
|
-
|
|
77
|
-
| Metric | Source |
|
|
78
|
-
|--------|--------|
|
|
79
|
-
| Functions Designed | `.feature-analysis.md` Function Breakdown section |
|
|
80
|
-
| [EXISTING] / [MODIFIED] / [NEW] counts | Function markers in analysis |
|
|
81
|
-
| Frontend Components | `.feature-design-data.md` Frontend Design (0 if API-only) |
|
|
82
|
-
| Backend Interfaces | `.feature-design-data.md` Backend Design API count |
|
|
83
|
-
| Data Entities | `.feature-design-data.md` Data Model (new/modified) |
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Step 3: Checkpoint B — User Confirmation
|
|
88
|
-
|
|
89
|
-
> **Skip this step if `skip_checkpoint=true`**
|
|
90
|
-
|
|
91
|
-
### 3.1 Present Summary
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Feature Design Summary for: {feature-name}
|
|
95
|
-
|
|
96
|
-
Functions Designed: {count}
|
|
97
|
-
├── [EXISTING] {count} functions reuse existing capabilities
|
|
98
|
-
├── [MODIFIED] {count} functions enhance existing features
|
|
99
|
-
└── [NEW] {count} functions are brand new
|
|
100
|
-
|
|
101
|
-
Frontend Components: {count} pages/components
|
|
102
|
-
Backend Interfaces: {count} APIs
|
|
103
|
-
Data Entities: {count} new, {count} modified
|
|
104
|
-
|
|
105
|
-
Output File: {filename}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### 3.2 Confirm 5 Questions
|
|
109
|
-
|
|
110
|
-
**HARD STOP** — Wait for user confirmation on:
|
|
111
|
-
|
|
112
|
-
1. Is the frontend prototype appropriate? (if applicable)
|
|
113
|
-
2. Is the backend logic flow correct and complete?
|
|
114
|
-
3. Is the data model reasonable and extensible?
|
|
115
|
-
4. Are all business rules captured?
|
|
116
|
-
5. [Legacy Master-Sub] Is the module breakdown appropriate?
|
|
117
|
-
|
|
118
|
-
### 3.3 Update Checkpoint
|
|
119
|
-
|
|
120
|
-
Update `.checkpoints.json`:
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"feature_spec_review": {
|
|
124
|
-
"passed": true,
|
|
125
|
-
"confirmed_at": "{timestamp}",
|
|
126
|
-
"description": "Feature specification confirmed"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Step 4: Determine Output Path & Copy Template
|
|
134
|
-
|
|
135
|
-
### 4.1 Determine Output Path
|
|
136
|
-
|
|
137
|
-
| Mode | Path Pattern |
|
|
138
|
-
|------|--------------|
|
|
139
|
-
| Single Feature | `{iteration}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md` |
|
|
140
|
-
| Legacy Single | `{iteration}/02.feature-design/[feature-name]-feature-spec.md` |
|
|
141
|
-
| Legacy Master-Sub | Multiple files (master + sub-specs) |
|
|
142
|
-
|
|
143
|
-
### 4.2 Copy Template
|
|
144
|
-
|
|
145
|
-
1. Read template: `speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md`
|
|
146
|
-
2. Replace top-level placeholders: `{Feature Name}`, `{Feature ID}`, etc.
|
|
147
|
-
3. **Create document** using `create_file` with template content
|
|
148
|
-
4. Verify complete section structure exists
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Step 5: Fill Sections Using search_replace
|
|
153
|
-
|
|
154
|
-
Map data sources to template sections:
|
|
155
|
-
|
|
156
|
-
| Template Section | Data Source |
|
|
157
|
-
|------------------|-------------|
|
|
158
|
-
| Feature Overview | `.feature-analysis.md` Feature Information + summary |
|
|
159
|
-
| Function Breakdown | `.feature-analysis.md` Function Breakdown |
|
|
160
|
-
| Frontend Design | `.feature-design-data.md` Frontend Design |
|
|
161
|
-
| Backend Design | `.feature-design-data.md` Backend Design |
|
|
162
|
-
| Data Model | `.feature-design-data.md` Data Model |
|
|
163
|
-
| Business Rules | `.feature-design-data.md` Business Rules |
|
|
164
|
-
| Cross-Module Interactions | `.feature-design-data.md` Cross-Module (if applicable) |
|
|
165
|
-
|
|
166
|
-
**Rules:**
|
|
167
|
-
- Use `search_replace` for each section individually
|
|
168
|
-
- Preserve all section titles and numbering
|
|
169
|
-
- No applicable content → replace placeholder with "N/A"
|
|
170
|
-
- Legacy Master-Sub: repeat Step 4+5 for each sub-spec
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Step 6: Mermaid Diagram Compliance
|
|
175
|
-
|
|
176
|
-
Verify all Mermaid diagrams follow compatibility rules:
|
|
177
|
-
|
|
178
|
-
- Use only basic node definitions: `A[text content]`
|
|
179
|
-
- No HTML tags (e.g., `<br/>`)
|
|
180
|
-
- No nested subgraphs
|
|
181
|
-
- No `direction` keyword
|
|
182
|
-
- No `style` definitions
|
|
183
|
-
- Standard `graph TB/LR` or `sequenceDiagram` syntax only
|
|
184
|
-
|
|
185
|
-
Reference: `speccrew-workspace/docs/rules/mermaid-rule.md`
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Step 7: Update Checkpoints
|
|
190
|
-
|
|
191
|
-
Update `.checkpoints.json`:
|
|
192
|
-
- Set `feature_spec_review.passed = true`
|
|
193
|
-
- Set `confirmed_at` timestamp
|
|
194
|
-
- Preserve existing checkpoint states
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
# Reference Guides
|
|
199
|
-
|
|
200
|
-
## Legacy Mode Backward Compatibility
|
|
201
|
-
|
|
202
|
-
When `feature_id` is NOT provided:
|
|
203
|
-
|
|
204
|
-
**Single Feature Spec:**
|
|
205
|
-
```
|
|
206
|
-
02.feature-design/[feature-name]-feature-spec.md
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
**Master-Sub Feature Specs:**
|
|
210
|
-
```
|
|
211
|
-
02.feature-design/
|
|
212
|
-
├── [feature-name]-feature-spec.md # Master (overview + cross-module)
|
|
213
|
-
├── [feature-name]-sub-[module1]-spec.md # Sub: Module 1
|
|
214
|
-
└── [feature-name]-sub-[module2]-spec.md # Sub: Module 2
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
Master spec MUST include: overall overview, cross-module diagram, module list, interface contracts.
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
# Key Rules
|
|
222
|
-
|
|
223
|
-
| Rule | Description |
|
|
224
|
-
|------|-------------|
|
|
225
|
-
| **Template-First** | Copy template before filling content |
|
|
226
|
-
| **search_replace Only** | Never use `create_file` for section updates |
|
|
227
|
-
| **Checkpoint B** | Get user confirmation before writing files |
|
|
228
|
-
| **Mermaid Compliance** | Follow mermaid-rule.md guidelines |
|
|
229
|
-
| **Clear Markers** | Use [EXISTING]/[MODIFIED]/[NEW] consistently |
|
|
230
|
-
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
# Output Checklist
|
|
234
|
-
|
|
235
|
-
- [ ] Both input files verified and read
|
|
236
|
-
- [ ] Design summary built with statistics
|
|
237
|
-
- [ ] Checkpoint B passed (or skipped via flag)
|
|
238
|
-
- [ ] Output path determined
|
|
239
|
-
- [ ] Template copied using `create_file`
|
|
240
|
-
- [ ] All sections filled using `search_replace`
|
|
241
|
-
- [ ] Mermaid diagrams verified compliant
|
|
242
|
-
- [ ] `.checkpoints.json` updated
|
|
243
|
-
- [ ] [Legacy Master-Sub] All sub-specs generated
|