speccrew 0.5.10 → 0.5.12
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-system-developer.md +242 -19
- package/.speccrew/skills/{speccrew-dev-desktop → speccrew-dev-desktop-electron}/SKILL.md +38 -50
- package/.speccrew/skills/{speccrew-dev-desktop → speccrew-dev-desktop-electron}/templates/TASK-RECORD-TEMPLATE.md +14 -28
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +341 -0
- package/.speccrew/skills/speccrew-dev-desktop-tauri/templates/TASK-RECORD-TEMPLATE.md +145 -0
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +212 -0
- package/.speccrew/skills/speccrew-dev-review-backend/templates/REVIEW-REPORT-TEMPLATE.md +94 -0
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +181 -0
- package/.speccrew/skills/speccrew-dev-review-desktop/templates/REVIEW-REPORT-TEMPLATE.md +90 -0
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +177 -0
- package/.speccrew/skills/speccrew-dev-review-frontend/templates/REVIEW-REPORT-TEMPLATE.md +83 -0
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +181 -0
- package/.speccrew/skills/speccrew-dev-review-mobile/templates/REVIEW-REPORT-TEMPLATE.md +90 -0
- package/docs/GETTING-STARTED.ar.md +249 -176
- package/docs/GETTING-STARTED.bn.md +108 -412
- package/docs/GETTING-STARTED.bs.md +103 -407
- package/docs/GETTING-STARTED.da.md +267 -190
- package/docs/GETTING-STARTED.de.md +190 -115
- package/docs/GETTING-STARTED.el.md +245 -169
- package/docs/GETTING-STARTED.es.md +179 -104
- package/docs/GETTING-STARTED.fr.md +191 -116
- package/docs/GETTING-STARTED.it.md +233 -156
- package/docs/GETTING-STARTED.ja.md +242 -167
- package/docs/GETTING-STARTED.ko.md +211 -136
- package/docs/GETTING-STARTED.no.md +86 -417
- package/docs/GETTING-STARTED.pl.md +213 -135
- package/docs/GETTING-STARTED.pt-BR.md +94 -396
- package/docs/GETTING-STARTED.ru.md +241 -162
- package/docs/GETTING-STARTED.th.md +104 -405
- package/docs/GETTING-STARTED.tr.md +223 -144
- package/docs/GETTING-STARTED.uk.md +273 -194
- package/docs/GETTING-STARTED.vi.md +98 -399
- package/lib/commands/init.js +10 -1
- package/lib/commands/update.js +9 -0
- package/lib/utils.js +26 -0
- package/package.json +1 -1
- package/.speccrew/skills/speccrew-dev-review/SKILL.md +0 -451
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-dev-review-backend
|
|
3
|
+
description: SpecCrew Backend Code Review Skill. Reviews backend implementation code against system design documents, API contracts, and coding standards. Generates structured review reports with PASS/PARTIAL/FAIL verdict.
|
|
4
|
+
tools: Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
|
|
9
|
+
- When speccrew-system-developer dispatches backend code review for a completed module
|
|
10
|
+
- When user requests "Review this backend module's implementation"
|
|
11
|
+
- When user asks "Check if backend code matches design"
|
|
12
|
+
- When incremental review is needed after partial backend implementation
|
|
13
|
+
|
|
14
|
+
# Input Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Required | Description |
|
|
17
|
+
|-----------|----------|-------------|
|
|
18
|
+
| `design_doc_path` | Yes | Path to backend module design document |
|
|
19
|
+
| `implementation_report_path` | Yes | Path to backend development report |
|
|
20
|
+
| `source_root` | Yes | Root directory of backend source code |
|
|
21
|
+
| `platform_id` | Yes | Backend platform (backend-spring, backend-nodejs) |
|
|
22
|
+
| `api_contract_path` | No | Path to API contract file for endpoint validation |
|
|
23
|
+
| `task_id` | Yes | Task identifier from dispatch context |
|
|
24
|
+
| `previous_review_path` | No | Path to previous review report for incremental review |
|
|
25
|
+
|
|
26
|
+
# Workflow
|
|
27
|
+
|
|
28
|
+
## Absolute Constraints
|
|
29
|
+
|
|
30
|
+
> **Violation = review failure.**
|
|
31
|
+
|
|
32
|
+
1. **READ-ONLY OPERATION** — NEVER modify source code files. Only read and report findings.
|
|
33
|
+
2. **FORBIDDEN: Code fixes** — Do NOT attempt to fix issues. Only document them.
|
|
34
|
+
3. **MANDATORY: Actionable output** — PARTIAL/FAIL results MUST include specific "Re-dispatch Guidance".
|
|
35
|
+
4. **INCREMENTAL REVIEW SUPPORT** — If `previous_review_path` provided, skip items already marked as passed.
|
|
36
|
+
|
|
37
|
+
## Step 1: Load Documents
|
|
38
|
+
|
|
39
|
+
### 1.1 Validate Inputs
|
|
40
|
+
|
|
41
|
+
Verify all required parameters provided. If any missing → Report error, stop.
|
|
42
|
+
|
|
43
|
+
### 1.2 Read Design Document
|
|
44
|
+
|
|
45
|
+
Extract from backend design document:
|
|
46
|
+
|
|
47
|
+
| Section | Information to Extract |
|
|
48
|
+
|---------|------------------------|
|
|
49
|
+
| Module Overview | Module name, responsibilities |
|
|
50
|
+
| File Structure | Required files (DO, VO, Mapper, Service, Controller, Convert, Enums) |
|
|
51
|
+
| Class Specifications | Class names, inheritance requirements, annotations |
|
|
52
|
+
| API Endpoints | Endpoint definitions, HTTP methods, paths |
|
|
53
|
+
| Business Logic | Service methods, transaction requirements |
|
|
54
|
+
|
|
55
|
+
### 1.3 Read Implementation Report
|
|
56
|
+
|
|
57
|
+
Extract: Completed Files, Implementation Status, Known Issues.
|
|
58
|
+
|
|
59
|
+
### 1.4 Read API Contract (if provided)
|
|
60
|
+
|
|
61
|
+
Extract for validation: Endpoint Definitions, Request/Response Schemas, HTTP Methods, Error Codes.
|
|
62
|
+
|
|
63
|
+
## Step 2: File Completeness Check
|
|
64
|
+
|
|
65
|
+
### 2.1 Build Expected File List
|
|
66
|
+
|
|
67
|
+
Backend file categories:
|
|
68
|
+
|
|
69
|
+
| Category | Pattern | Example |
|
|
70
|
+
|----------|---------|---------|
|
|
71
|
+
| Enums | `enums/*.java` | `enums/ErrorCodeConstants.java` |
|
|
72
|
+
| DO | `dal/dataobject/**/*.java` | `dal/dataobject/employee/EmployeeDO.java` |
|
|
73
|
+
| VO | `controller/admin/vo/**/*.java` | `controller/admin/vo/EmployeeRespVO.java` |
|
|
74
|
+
| Mapper | `dal/mapper/**/*.java` | `dal/mapper/employee/EmployeeMapper.java` |
|
|
75
|
+
| Service | `service/**/*.java` | `service/employee/EmployeeService.java` |
|
|
76
|
+
| Controller | `controller/admin/**/*.java` | `controller/admin/employee/EmployeeController.java` |
|
|
77
|
+
| Convert | `convert/**/*.java` | `convert/employee/EmployeeConvert.java` |
|
|
78
|
+
|
|
79
|
+
### 2.2 Scan Actual Files
|
|
80
|
+
|
|
81
|
+
Use `Glob` to scan `source_root` for implemented files.
|
|
82
|
+
|
|
83
|
+
### 2.3 Calculate Completeness
|
|
84
|
+
|
|
85
|
+
Generate completeness matrix and percentage: `completeness_pct = (created / required) * 100`
|
|
86
|
+
|
|
87
|
+
## Step 3: Backend-Specific Compliance Check
|
|
88
|
+
|
|
89
|
+
### 3.1 DO/VO/DTO Compliance
|
|
90
|
+
|
|
91
|
+
| Check | Rule | Severity |
|
|
92
|
+
|-------|------|----------|
|
|
93
|
+
| Base Class | Must extend correct base class (e.g., `TenantBaseDO`) | ERROR |
|
|
94
|
+
| @TableName | Must have `@TableName` with correct table name | ERROR |
|
|
95
|
+
| @Schema | Must have `@Schema` for documentation | WARN |
|
|
96
|
+
| Validation | Required fields must have `@NotNull` or similar | ERROR |
|
|
97
|
+
| Desensitization | Sensitive fields must have desensitization | ERROR |
|
|
98
|
+
|
|
99
|
+
### 3.2 Service Layer Check
|
|
100
|
+
|
|
101
|
+
| Check | Rule | Severity |
|
|
102
|
+
|-------|------|----------|
|
|
103
|
+
| Interface | Must have Service interface and implementation separation | WARN |
|
|
104
|
+
| @Service | Implementation must have `@Service` annotation | ERROR |
|
|
105
|
+
| @Transactional | DB write methods must have `@Transactional` | ERROR |
|
|
106
|
+
| Method Coverage | All methods in design must be implemented | ERROR |
|
|
107
|
+
| Data Permission | Must check data permissions where required | ERROR |
|
|
108
|
+
|
|
109
|
+
### 3.3 Controller Layer Check
|
|
110
|
+
|
|
111
|
+
| Check | Rule | Severity |
|
|
112
|
+
|-------|------|----------|
|
|
113
|
+
| @RestController | Must have `@RestController` annotation | ERROR |
|
|
114
|
+
| @RequestMapping | Must have base `@RequestMapping` annotation | ERROR |
|
|
115
|
+
| @Operation | Endpoints should have `@Operation` for documentation | WARN |
|
|
116
|
+
| @PreAuthorize | Must have permission annotations where required | ERROR |
|
|
117
|
+
| @Valid | Request VO parameters must have `@Valid` | ERROR |
|
|
118
|
+
|
|
119
|
+
### 3.4 Database Mapping Validation
|
|
120
|
+
|
|
121
|
+
- Verify Entity fields match design document
|
|
122
|
+
- Check MyBatis XML mappers exist alongside Mapper interfaces
|
|
123
|
+
- Validate Lombok `@Data` or similar on DO/VO classes
|
|
124
|
+
|
|
125
|
+
## Step 4: API Consistency Check
|
|
126
|
+
|
|
127
|
+
If `api_contract_path` provided:
|
|
128
|
+
|
|
129
|
+
| Check | Description | Severity |
|
|
130
|
+
|-------|-------------|----------|
|
|
131
|
+
| Endpoint Coverage | All contract endpoints exist in Controller | ERROR |
|
|
132
|
+
| HTTP Method | Methods match contract | ERROR |
|
|
133
|
+
| Path Match | URL paths match contract exactly | ERROR |
|
|
134
|
+
| VO Fields | All contract fields present in VO | ERROR |
|
|
135
|
+
| Field Types | Data types match contract | ERROR |
|
|
136
|
+
|
|
137
|
+
## Step 5: Generate Review Report
|
|
138
|
+
|
|
139
|
+
### 5.1 Determine Result
|
|
140
|
+
|
|
141
|
+
| Result | Criteria |
|
|
142
|
+
|--------|----------|
|
|
143
|
+
| **PASS** | 100% files created, 0 ERROR-level issues |
|
|
144
|
+
| **PARTIAL** | 70-99% files created, or non-critical ERROR issues |
|
|
145
|
+
| **FAIL** | <70% files created, or critical blockers present |
|
|
146
|
+
|
|
147
|
+
### 5.2 Write Report
|
|
148
|
+
|
|
149
|
+
Generate report at: `speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-review-report.md`
|
|
150
|
+
|
|
151
|
+
Use template from `templates/REVIEW-REPORT-TEMPLATE.md`.
|
|
152
|
+
|
|
153
|
+
## Step 6: Task Completion Report
|
|
154
|
+
|
|
155
|
+
### Success
|
|
156
|
+
|
|
157
|
+
```markdown
|
|
158
|
+
## Task Completion Report
|
|
159
|
+
- **Status**: SUCCESS
|
|
160
|
+
- **Task ID**: review-{original_task_id}
|
|
161
|
+
- **Platform**: {platform_id}
|
|
162
|
+
- **Module**: {module_name}
|
|
163
|
+
- **Output Files**: {review_report_path}
|
|
164
|
+
- **Summary**: Review {result}: {completed}/{total} files, {error_count} errors
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Failure
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
## Task Completion Report
|
|
171
|
+
- **Status**: FAILED
|
|
172
|
+
- **Task ID**: review-{original_task_id}
|
|
173
|
+
- **Platform**: {platform_id}
|
|
174
|
+
- **Module**: {module_name}
|
|
175
|
+
- **Output Files**: None
|
|
176
|
+
- **Summary**: Review failed during {step}
|
|
177
|
+
- **Error**: {detailed error description}
|
|
178
|
+
- **Error Category**: DEPENDENCY_MISSING | VALIDATION_ERROR | BLOCKED
|
|
179
|
+
- **Recovery Hint**: {suggestion}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
# Severity Levels
|
|
183
|
+
|
|
184
|
+
| Level | Definition | Action Required |
|
|
185
|
+
|-------|------------|-----------------|
|
|
186
|
+
| **CRITICAL** | Security vulnerability or data integrity issue | Must fix immediately |
|
|
187
|
+
| **ERROR** | Blocking functionality or violating core requirements | Must fix before PASS |
|
|
188
|
+
| **WARN** | Best practice violation or missing documentation | Should fix |
|
|
189
|
+
| **LOW** | Code style or minor optimization suggestion | Optional |
|
|
190
|
+
|
|
191
|
+
# Key Rules
|
|
192
|
+
|
|
193
|
+
| Rule | Description |
|
|
194
|
+
|------|-------------|
|
|
195
|
+
| **Read-Only** | NEVER modify any source code |
|
|
196
|
+
| **Blueprint-Driven** | Validate against design document specifications |
|
|
197
|
+
| **Actionable Output** | PARTIAL/FAIL must include specific fix guidance |
|
|
198
|
+
| **Incremental Support** | Skip already-passed items when previous review provided |
|
|
199
|
+
| **Completeness First** | File existence is primary check before content validation |
|
|
200
|
+
|
|
201
|
+
# Checklist
|
|
202
|
+
|
|
203
|
+
- [ ] All required inputs validated
|
|
204
|
+
- [ ] Design document loaded and parsed
|
|
205
|
+
- [ ] File completeness check completed with category breakdown
|
|
206
|
+
- [ ] DO classes checked for base class and annotations
|
|
207
|
+
- [ ] VO classes checked for validation and desensitization
|
|
208
|
+
- [ ] Service classes checked for @Transactional and permissions
|
|
209
|
+
- [ ] Controller classes checked for annotations and endpoints
|
|
210
|
+
- [ ] API contract validated against implementation (if provided)
|
|
211
|
+
- [ ] Review report written with clear verdict
|
|
212
|
+
- [ ] Re-dispatch guidance provided for PARTIAL/FAIL
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Backend Code Review Report
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
- **Task ID**: {task_id}
|
|
6
|
+
- **Platform**: {platform_id}
|
|
7
|
+
- **Module**: {module_name}
|
|
8
|
+
- **Review Date**: {review_date}
|
|
9
|
+
- **Review Result**: PASS | PARTIAL | FAIL
|
|
10
|
+
- **Completeness**: {completed_files}/{total_files} ({percentage}%)
|
|
11
|
+
|
|
12
|
+
## File Completeness
|
|
13
|
+
|
|
14
|
+
| Category | Required | Created | Missing |
|
|
15
|
+
|----------|----------|---------|---------|
|
|
16
|
+
| Enums | {n} | {n} | {n} |
|
|
17
|
+
| DO | {n} | {n} | {n} |
|
|
18
|
+
| VO | {n} | {n} | {n} |
|
|
19
|
+
| Mapper | {n} | {n} | {n} |
|
|
20
|
+
| Service | {n} | {n} | {n} |
|
|
21
|
+
| Controller | {n} | {n} | {n} |
|
|
22
|
+
| Convert | {n} | {n} | {n} |
|
|
23
|
+
| **Total** | **{n}** | **{n}** | **{n}** |
|
|
24
|
+
|
|
25
|
+
## Missing Files
|
|
26
|
+
|
|
27
|
+
1. `{expected_path_1}`
|
|
28
|
+
2. `{expected_path_2}`
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
## Code Compliance Issues
|
|
32
|
+
|
|
33
|
+
### DO/VO/DTO Issues
|
|
34
|
+
|
|
35
|
+
| Severity | File | Issue Description |
|
|
36
|
+
|----------|------|-------------------|
|
|
37
|
+
| ERROR | `{file}` | {description} |
|
|
38
|
+
| WARN | `{file}` | {description} |
|
|
39
|
+
|
|
40
|
+
### Service Layer Issues
|
|
41
|
+
|
|
42
|
+
| Severity | File | Issue Description |
|
|
43
|
+
|----------|------|-------------------|
|
|
44
|
+
| ERROR | `{file}` | {description} |
|
|
45
|
+
| WARN | `{file}` | {description} |
|
|
46
|
+
|
|
47
|
+
### Controller Layer Issues
|
|
48
|
+
|
|
49
|
+
| Severity | File | Issue Description |
|
|
50
|
+
|----------|------|-------------------|
|
|
51
|
+
| ERROR | `{file}` | {description} |
|
|
52
|
+
| WARN | `{file}` | {description} |
|
|
53
|
+
|
|
54
|
+
### Database Mapping Issues
|
|
55
|
+
|
|
56
|
+
| Severity | File | Issue Description |
|
|
57
|
+
|----------|------|-------------------|
|
|
58
|
+
| ERROR | `{file}` | {description} |
|
|
59
|
+
| WARN | `{file}` | {description} |
|
|
60
|
+
|
|
61
|
+
## API Consistency Issues
|
|
62
|
+
|
|
63
|
+
| Severity | Endpoint | Issue Description |
|
|
64
|
+
|----------|----------|-------------------|
|
|
65
|
+
| ERROR | `{endpoint}` | {description} |
|
|
66
|
+
| WARN | `{endpoint}` | {description} |
|
|
67
|
+
|
|
68
|
+
## Business Logic Issues
|
|
69
|
+
|
|
70
|
+
| Severity | Method | Issue Description |
|
|
71
|
+
|----------|--------|-------------------|
|
|
72
|
+
| ERROR | `{method}` | {description} |
|
|
73
|
+
| WARN | `{method}` | {description} |
|
|
74
|
+
|
|
75
|
+
## Verdict
|
|
76
|
+
|
|
77
|
+
{Detailed verdict explanation based on findings. Explain why PASS, PARTIAL, or FAIL was assigned.}
|
|
78
|
+
|
|
79
|
+
## Re-dispatch Guidance
|
|
80
|
+
|
|
81
|
+
Priority items for next dev worker:
|
|
82
|
+
|
|
83
|
+
1. **{priority_item_1}** - {detailed description}
|
|
84
|
+
2. **{priority_item_2}** - {detailed description}
|
|
85
|
+
3. **{priority_item_3}** - {detailed description}
|
|
86
|
+
|
|
87
|
+
## Issue Statistics
|
|
88
|
+
|
|
89
|
+
| Severity | Count |
|
|
90
|
+
|----------|-------|
|
|
91
|
+
| CRITICAL | {n} |
|
|
92
|
+
| ERROR | {n} |
|
|
93
|
+
| WARN | {n} |
|
|
94
|
+
| LOW | {n} |
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-dev-review-desktop
|
|
3
|
+
description: SpecCrew Desktop Code Review Skill. Reviews desktop app implementation code (Electron/Tauri) against system design documents and security standards. Generates structured review reports with PASS/PARTIAL/FAIL verdict.
|
|
4
|
+
tools: Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
|
|
9
|
+
- When speccrew-system-developer dispatches desktop code review for a completed module
|
|
10
|
+
- When user requests "Review this desktop module's implementation"
|
|
11
|
+
- When user asks "Check if desktop code matches design"
|
|
12
|
+
- When incremental review is needed after partial desktop implementation
|
|
13
|
+
|
|
14
|
+
# Input Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Required | Description |
|
|
17
|
+
|-----------|----------|-------------|
|
|
18
|
+
| `design_doc_path` | Yes | Path to desktop module design document |
|
|
19
|
+
| `implementation_report_path` | Yes | Path to desktop development report |
|
|
20
|
+
| `source_root` | Yes | Root directory of desktop source code |
|
|
21
|
+
| `platform_id` | Yes | Desktop platform (desktop-tauri, desktop-electron) |
|
|
22
|
+
| `api_contract_path` | No | Path to API contract file |
|
|
23
|
+
| `task_id` | Yes | Task identifier from dispatch context |
|
|
24
|
+
| `previous_review_path` | No | Path to previous review report |
|
|
25
|
+
|
|
26
|
+
# Workflow
|
|
27
|
+
|
|
28
|
+
## Absolute Constraints
|
|
29
|
+
|
|
30
|
+
> **Violation = review failure.**
|
|
31
|
+
|
|
32
|
+
1. **READ-ONLY OPERATION** — NEVER modify source code files.
|
|
33
|
+
2. **FORBIDDEN: Code fixes** — Do NOT attempt to fix issues. Only document them.
|
|
34
|
+
3. **MANDATORY: Actionable output** — PARTIAL/FAIL results MUST include specific "Re-dispatch Guidance".
|
|
35
|
+
4. **INCREMENTAL REVIEW SUPPORT** — Skip items already marked as passed in previous review.
|
|
36
|
+
|
|
37
|
+
## Step 1: Load Documents
|
|
38
|
+
|
|
39
|
+
### 1.1 Validate Inputs
|
|
40
|
+
|
|
41
|
+
Verify all required parameters provided. If any missing → Report error, stop.
|
|
42
|
+
|
|
43
|
+
### 1.2 Read Design Document
|
|
44
|
+
|
|
45
|
+
Extract: Module Overview, Process Architecture, IPC Contracts, Native Integration points.
|
|
46
|
+
|
|
47
|
+
### 1.3 Read Implementation Report
|
|
48
|
+
|
|
49
|
+
Extract: Completed Files, Implementation Status, Known Issues.
|
|
50
|
+
|
|
51
|
+
### 1.4 Read API Contract (if provided)
|
|
52
|
+
|
|
53
|
+
Extract API endpoints for validation against desktop API calls.
|
|
54
|
+
|
|
55
|
+
## Step 2: File Completeness Check
|
|
56
|
+
|
|
57
|
+
### 2.1 Build Expected File List
|
|
58
|
+
|
|
59
|
+
Desktop file categories:
|
|
60
|
+
|
|
61
|
+
| Category | Pattern | Example |
|
|
62
|
+
|----------|---------|---------|
|
|
63
|
+
| Main Process | `src-tauri/src/**/*.rs` or `main/**/*` | `src-tauri/src/main.rs` |
|
|
64
|
+
| Renderer | `src/**/*` (frontend files) | `src/App.vue` |
|
|
65
|
+
| Preload | `preload/**/*` or `src-tauri/src/preload.rs` | `preload/index.ts` |
|
|
66
|
+
| IPC Handlers | `src-tauri/src/commands/**/*.rs` | `commands/file.rs` |
|
|
67
|
+
| Native Modules | `native/**/*` | `native/fileSystem.ts` |
|
|
68
|
+
|
|
69
|
+
### 2.2 Scan Actual Files
|
|
70
|
+
|
|
71
|
+
Use `Glob` to scan `source_root` for implemented files.
|
|
72
|
+
|
|
73
|
+
### 2.3 Calculate Completeness
|
|
74
|
+
|
|
75
|
+
Generate completeness matrix and percentage.
|
|
76
|
+
|
|
77
|
+
## Step 3: Desktop-Specific Compliance Check
|
|
78
|
+
|
|
79
|
+
### 3.1 Process Separation Validation
|
|
80
|
+
|
|
81
|
+
| Check | Rule | Severity |
|
|
82
|
+
|-------|------|----------|
|
|
83
|
+
| Main/Renderer Separation | Business logic in main process only | CRITICAL |
|
|
84
|
+
| No Node in Renderer | Renderer has no direct Node.js access | CRITICAL |
|
|
85
|
+
| Context Isolation | contextIsolation enabled | CRITICAL |
|
|
86
|
+
|
|
87
|
+
### 3.2 IPC Channel Consistency
|
|
88
|
+
|
|
89
|
+
| Check | Rule | Severity |
|
|
90
|
+
|-------|------|----------|
|
|
91
|
+
| Channel Naming | IPC channels follow naming convention | ERROR |
|
|
92
|
+
| Type Safety | IPC payloads properly typed | ERROR |
|
|
93
|
+
| Channel Registration | All channels registered in preload | ERROR |
|
|
94
|
+
| Bidirectional Safety | No unsafe IPC patterns | CRITICAL |
|
|
95
|
+
|
|
96
|
+
### 3.3 Security Isolation
|
|
97
|
+
|
|
98
|
+
| Check | Rule | Severity |
|
|
99
|
+
|-------|------|----------|
|
|
100
|
+
| contextBridge | Uses contextBridge for API exposure | CRITICAL |
|
|
101
|
+
| Preload Script | Preload script properly configured | CRITICAL |
|
|
102
|
+
| CSP Headers | Content Security Policy configured | ERROR |
|
|
103
|
+
| Remote Content | No unsafe remote content loading | CRITICAL |
|
|
104
|
+
|
|
105
|
+
### 3.4 Native Integration Check
|
|
106
|
+
|
|
107
|
+
| Check | Rule | Severity |
|
|
108
|
+
|-------|------|----------|
|
|
109
|
+
| File System | File operations in main process only | CRITICAL |
|
|
110
|
+
| System Notifications | Notifications properly implemented | WARN |
|
|
111
|
+
| Native Menus | Menu structure matches design | ERROR |
|
|
112
|
+
| System Tray | Tray implementation if required | ERROR |
|
|
113
|
+
|
|
114
|
+
### 3.5 Packaging Configuration
|
|
115
|
+
|
|
116
|
+
| Check | Rule | Severity |
|
|
117
|
+
|-------|------|----------|
|
|
118
|
+
| Build Config | Build configuration complete | ERROR |
|
|
119
|
+
| Assets | Required assets included | ERROR |
|
|
120
|
+
| Signing | Code signing configured (if required) | WARN |
|
|
121
|
+
| Auto-Update | Auto-update mechanism (if required) | WARN |
|
|
122
|
+
|
|
123
|
+
## Step 4: Generate Review Report
|
|
124
|
+
|
|
125
|
+
### 4.1 Determine Result
|
|
126
|
+
|
|
127
|
+
| Result | Criteria |
|
|
128
|
+
|--------|----------|
|
|
129
|
+
| **PASS** | 100% files created, 0 ERROR-level issues |
|
|
130
|
+
| **PARTIAL** | 70-99% files created, or non-critical ERROR issues |
|
|
131
|
+
| **FAIL** | <70% files created, or critical blockers present |
|
|
132
|
+
|
|
133
|
+
### 4.2 Write Report
|
|
134
|
+
|
|
135
|
+
Generate report at: `speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-review-report.md`
|
|
136
|
+
|
|
137
|
+
Use template from `templates/REVIEW-REPORT-TEMPLATE.md`.
|
|
138
|
+
|
|
139
|
+
## Step 5: Task Completion Report
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
## Task Completion Report
|
|
143
|
+
- **Status**: SUCCESS
|
|
144
|
+
- **Task ID**: review-{original_task_id}
|
|
145
|
+
- **Platform**: {platform_id}
|
|
146
|
+
- **Module**: {module_name}
|
|
147
|
+
- **Output Files**: {review_report_path}
|
|
148
|
+
- **Summary**: Review {result}: {completed}/{total} files, {error_count} errors
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
# Severity Levels
|
|
152
|
+
|
|
153
|
+
| Level | Definition | Action Required |
|
|
154
|
+
|-------|------------|-----------------|
|
|
155
|
+
| **CRITICAL** | Security vulnerability or sandbox escape risk | Must fix immediately |
|
|
156
|
+
| **ERROR** | Blocking functionality or violating core requirements | Must fix before PASS |
|
|
157
|
+
| **WARN** | Best practice violation or missing documentation | Should fix |
|
|
158
|
+
| **LOW** | Code style or minor optimization suggestion | Optional |
|
|
159
|
+
|
|
160
|
+
# Key Rules
|
|
161
|
+
|
|
162
|
+
| Rule | Description |
|
|
163
|
+
|------|-------------|
|
|
164
|
+
| **Read-Only** | NEVER modify any source code |
|
|
165
|
+
| **Security First** | Desktop security is paramount - verify isolation |
|
|
166
|
+
| **Blueprint-Driven** | Validate against design document specifications |
|
|
167
|
+
| **Actionable Output** | PARTIAL/FAIL must include specific fix guidance |
|
|
168
|
+
| **Completeness First** | File existence is primary check before content validation |
|
|
169
|
+
|
|
170
|
+
# Checklist
|
|
171
|
+
|
|
172
|
+
- [ ] All required inputs validated
|
|
173
|
+
- [ ] Design document loaded and parsed
|
|
174
|
+
- [ ] File completeness check completed
|
|
175
|
+
- [ ] Main/renderer separation validated
|
|
176
|
+
- [ ] IPC channels checked for consistency
|
|
177
|
+
- [ ] Security isolation verified
|
|
178
|
+
- [ ] Native integration checked
|
|
179
|
+
- [ ] Packaging configuration validated
|
|
180
|
+
- [ ] Review report written with clear verdict
|
|
181
|
+
- [ ] Re-dispatch guidance provided for PARTIAL/FAIL
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Desktop Code Review Report
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
- **Task ID**: {task_id}
|
|
6
|
+
- **Platform**: {platform_id}
|
|
7
|
+
- **Module**: {module_name}
|
|
8
|
+
- **Review Date**: {review_date}
|
|
9
|
+
- **Review Result**: PASS | PARTIAL | FAIL
|
|
10
|
+
- **Completeness**: {completed_files}/{total_files} ({percentage}%)
|
|
11
|
+
|
|
12
|
+
## File Completeness
|
|
13
|
+
|
|
14
|
+
| Category | Required | Created | Missing |
|
|
15
|
+
|----------|----------|---------|---------|
|
|
16
|
+
| Main Process | {n} | {n} | {n} |
|
|
17
|
+
| Renderer | {n} | {n} | {n} |
|
|
18
|
+
| Preload | {n} | {n} | {n} |
|
|
19
|
+
| IPC Handlers | {n} | {n} | {n} |
|
|
20
|
+
| Native Modules | {n} | {n} | {n} |
|
|
21
|
+
| **Total** | **{n}** | **{n}** | **{n}** |
|
|
22
|
+
|
|
23
|
+
## Missing Files
|
|
24
|
+
|
|
25
|
+
1. `{expected_path_1}`
|
|
26
|
+
2. `{expected_path_2}`
|
|
27
|
+
...
|
|
28
|
+
|
|
29
|
+
## Process Separation Issues
|
|
30
|
+
|
|
31
|
+
| Severity | File | Issue Description |
|
|
32
|
+
|----------|------|-------------------|
|
|
33
|
+
| CRITICAL | `{file}` | {description} |
|
|
34
|
+
| ERROR | `{file}` | {description} |
|
|
35
|
+
|
|
36
|
+
## IPC Channel Issues
|
|
37
|
+
|
|
38
|
+
| Severity | Channel | Issue Description |
|
|
39
|
+
|----------|---------|-------------------|
|
|
40
|
+
| CRITICAL | `{channel}` | {description} |
|
|
41
|
+
| ERROR | `{channel}` | {description} |
|
|
42
|
+
| WARN | `{channel}` | {description} |
|
|
43
|
+
|
|
44
|
+
## Security Isolation Issues
|
|
45
|
+
|
|
46
|
+
| Severity | Aspect | Issue Description |
|
|
47
|
+
|----------|--------|-------------------|
|
|
48
|
+
| CRITICAL | contextBridge | {description} |
|
|
49
|
+
| CRITICAL | Preload Script | {description} |
|
|
50
|
+
| ERROR | CSP Headers | {description} |
|
|
51
|
+
| CRITICAL | Remote Content | {description} |
|
|
52
|
+
|
|
53
|
+
## Native Integration Issues
|
|
54
|
+
|
|
55
|
+
| Severity | Feature | Issue Description |
|
|
56
|
+
|----------|---------|-------------------|
|
|
57
|
+
| CRITICAL | File System | {description} |
|
|
58
|
+
| ERROR | Native Menus | {description} |
|
|
59
|
+
| ERROR | System Tray | {description} |
|
|
60
|
+
| WARN | Notifications | {description} |
|
|
61
|
+
|
|
62
|
+
## Packaging Configuration Issues
|
|
63
|
+
|
|
64
|
+
| Severity | Aspect | Issue Description |
|
|
65
|
+
|----------|--------|-------------------|
|
|
66
|
+
| ERROR | Build Config | {description} |
|
|
67
|
+
| ERROR | Assets | {description} |
|
|
68
|
+
| WARN | Signing | {description} |
|
|
69
|
+
| WARN | Auto-Update | {description} |
|
|
70
|
+
|
|
71
|
+
## Verdict
|
|
72
|
+
|
|
73
|
+
{Detailed verdict explanation based on findings.}
|
|
74
|
+
|
|
75
|
+
## Re-dispatch Guidance
|
|
76
|
+
|
|
77
|
+
Priority items for next dev worker:
|
|
78
|
+
|
|
79
|
+
1. **{priority_item_1}** - {detailed description}
|
|
80
|
+
2. **{priority_item_2}** - {detailed description}
|
|
81
|
+
3. **{priority_item_3}** - {detailed description}
|
|
82
|
+
|
|
83
|
+
## Issue Statistics
|
|
84
|
+
|
|
85
|
+
| Severity | Count |
|
|
86
|
+
|----------|-------|
|
|
87
|
+
| CRITICAL | {n} |
|
|
88
|
+
| ERROR | {n} |
|
|
89
|
+
| WARN | {n} |
|
|
90
|
+
| LOW | {n} |
|