speccrew 0.5.9 → 0.5.11

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.
Files changed (44) hide show
  1. package/.speccrew/agents/speccrew-feature-designer.md +67 -0
  2. package/.speccrew/agents/speccrew-product-manager.md +69 -0
  3. package/.speccrew/agents/speccrew-system-designer.md +77 -0
  4. package/.speccrew/agents/speccrew-system-developer.md +311 -8
  5. package/.speccrew/agents/speccrew-task-worker.md +34 -0
  6. package/.speccrew/agents/speccrew-team-leader.md +84 -0
  7. package/.speccrew/agents/speccrew-test-manager.md +27 -0
  8. package/.speccrew/skills/{speccrew-dev-desktop → speccrew-dev-desktop-electron}/SKILL.md +38 -50
  9. package/.speccrew/skills/{speccrew-dev-desktop → speccrew-dev-desktop-electron}/templates/TASK-RECORD-TEMPLATE.md +14 -28
  10. package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +341 -0
  11. package/.speccrew/skills/speccrew-dev-desktop-tauri/templates/TASK-RECORD-TEMPLATE.md +145 -0
  12. package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +212 -0
  13. package/.speccrew/skills/speccrew-dev-review-backend/templates/REVIEW-REPORT-TEMPLATE.md +94 -0
  14. package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +181 -0
  15. package/.speccrew/skills/speccrew-dev-review-desktop/templates/REVIEW-REPORT-TEMPLATE.md +90 -0
  16. package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +177 -0
  17. package/.speccrew/skills/speccrew-dev-review-frontend/templates/REVIEW-REPORT-TEMPLATE.md +83 -0
  18. package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +181 -0
  19. package/.speccrew/skills/speccrew-dev-review-mobile/templates/REVIEW-REPORT-TEMPLATE.md +90 -0
  20. package/docs/GETTING-STARTED.ar.md +249 -176
  21. package/docs/GETTING-STARTED.bn.md +108 -412
  22. package/docs/GETTING-STARTED.bs.md +103 -407
  23. package/docs/GETTING-STARTED.da.md +267 -190
  24. package/docs/GETTING-STARTED.de.md +190 -115
  25. package/docs/GETTING-STARTED.el.md +245 -169
  26. package/docs/GETTING-STARTED.en.md +97 -22
  27. package/docs/GETTING-STARTED.es.md +179 -104
  28. package/docs/GETTING-STARTED.fr.md +191 -116
  29. package/docs/GETTING-STARTED.it.md +233 -156
  30. package/docs/GETTING-STARTED.ja.md +242 -167
  31. package/docs/GETTING-STARTED.ko.md +211 -136
  32. package/docs/GETTING-STARTED.md +97 -22
  33. package/docs/GETTING-STARTED.no.md +86 -417
  34. package/docs/GETTING-STARTED.pl.md +213 -135
  35. package/docs/GETTING-STARTED.pt-BR.md +94 -396
  36. package/docs/GETTING-STARTED.ru.md +241 -162
  37. package/docs/GETTING-STARTED.th.md +104 -405
  38. package/docs/GETTING-STARTED.tr.md +223 -144
  39. package/docs/GETTING-STARTED.uk.md +273 -194
  40. package/docs/GETTING-STARTED.vi.md +98 -399
  41. package/docs/GETTING-STARTED.zh-TW.md +213 -138
  42. package/lib/commands/init.js +18 -0
  43. package/package.json +1 -1
  44. package/.speccrew/skills/speccrew-dev-review/SKILL.md +0 -451
@@ -398,6 +398,24 @@ async function runInit(options = {}) {
398
398
  log(` Docs: ${stats.docsInstalled} files installed`);
399
399
 
400
400
  log(`\nRun 'speccrew doctor' to verify your installation.`);
401
+
402
+ console.log('');
403
+ console.log(' What to do next:');
404
+ console.log('');
405
+ console.log(' 1. Open your project in your IDE (Qoder/Cursor/Claude Code)');
406
+ console.log('');
407
+ console.log(' 2. Initialize knowledge base (recommended for existing projects):');
408
+ console.log(' → Tell @speccrew-team-leader: "Initialize technical knowledge base"');
409
+ console.log(' → Then: "Initialize business knowledge base"');
410
+ console.log('');
411
+ console.log(' 3. Start your first requirement:');
412
+ console.log(' → Tell @speccrew-product-manager: "I have a new requirement: [describe it]"');
413
+ console.log('');
414
+ console.log(' Need help? → Tell @speccrew-team-leader: "Help me get started"');
415
+ console.log(' Troubleshooting? → Run: speccrew doctor');
416
+ console.log('');
417
+ console.log(' Documentation: speccrew-workspace/docs/GETTING-STARTED.md');
418
+ console.log('');
401
419
  }
402
420
 
403
421
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.5.9",
3
+ "version": "0.5.11",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -1,451 +0,0 @@
1
- ---
2
- name: speccrew-dev-review
3
- description: Code Review SOP for validating development outputs against design documents. Acts as an independent reviewer (separate from dev worker) to verify file completeness, code compliance, API consistency, and business logic integrity. Read-only operation - reports findings without modifying code.
4
- tools: Read, Grep, Glob
5
- ---
6
-
7
- # Trigger Scenarios
8
-
9
- - When speccrew-system-developer dispatches code review for a completed module
10
- - When user requests "Review this module's implementation"
11
- - When user asks "Check if code matches design" or "Verify implementation completeness"
12
- - When incremental review is needed after partial implementation
13
-
14
- # Input Parameters
15
-
16
- | Parameter | Required | Description |
17
- |-----------|----------|-------------|
18
- | `design_doc_path` | Yes | Path to module design document (e.g., `03.system-design/module-designs/backend-spring/M6-employee-design.md`) |
19
- | `implementation_report_path` | Yes | Path to development report (e.g., `04.development/backend-spring/M6-employee-implementation-report.md`) |
20
- | `source_root` | Yes | Root directory of source code to review |
21
- | `platform_id` | Yes | Platform identifier (backend-spring/web-vue/mobile-uniapp/desktop-tauri) |
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
- > **These rules apply to ALL review operations. Violation = review failure.**
31
-
32
- 1. **READ-ONLY OPERATION** — NEVER modify any source code files. Only read and report findings.
33
-
34
- 2. **FORBIDDEN: Code fixes** — Do NOT attempt to fix issues found. Only document them in the review report.
35
-
36
- 3. **MANDATORY: Actionable output** — PARTIAL or FAIL results MUST include specific "Re-dispatch Guidance" with prioritized fix list.
37
-
38
- 4. **INCREMENTAL REVIEW SUPPORT** — If `previous_review_path` is provided, skip items already marked as passed in previous review.
39
-
40
- ## Step 1: Validate Input and Load Documents
41
-
42
- ### 1.1 Check Required Inputs
43
-
44
- Verify all required parameters are provided:
45
-
46
- ```
47
- IF design_doc_path missing → Report error, stop
48
- IF implementation_report_path missing → Report error, stop
49
- IF source_root missing → Report error, stop
50
- IF platform_id missing → Report error, stop
51
- IF task_id missing → Report error, stop
52
- ```
53
-
54
- ### 1.2 Read Design Document
55
-
56
- Read the module design document at `design_doc_path`:
57
-
58
- **Extract Required Information:**
59
-
60
- | Section | What to Extract |
61
- |---------|-----------------|
62
- | Module Overview | Module name, description, responsibilities |
63
- | File Structure | Complete list of required files (DO, VO, Mapper, Service, Controller, Convert, Enums, etc.) |
64
- | Class Specifications | Class names, inheritance requirements, annotations required |
65
- | API Endpoints | Endpoint definitions, HTTP methods, paths |
66
- | Business Logic | Service methods, business rules, transaction requirements |
67
-
68
- **Error Handling:**
69
- - If design document not found → Report `DEPENDENCY_MISSING` error
70
- - If design document malformed → Report `VALIDATION_ERROR` error
71
-
72
- ### 1.3 Read Implementation Report
73
-
74
- Read the development report at `implementation_report_path`:
75
-
76
- **Extract Information:**
77
-
78
- | Field | Purpose |
79
- |-------|---------|
80
- | Completed Files | List of files claimed to be implemented |
81
- | Implementation Status | Which tasks were completed |
82
- | Known Issues | Any documented deviations or issues |
83
-
84
- ### 1.4 Read API Contract (if provided)
85
-
86
- If `api_contract_path` is provided, read the API contract document:
87
-
88
- **Extract for Validation:**
89
-
90
- | Item | Validation Purpose |
91
- |------|-------------------|
92
- | Endpoint Definitions | Verify Controller implements all defined endpoints |
93
- | Request/Response Schemas | Verify VO classes match contract fields |
94
- | HTTP Methods | Verify correct HTTP method annotations |
95
- | Error Codes | Verify consistent error handling |
96
-
97
- ### 1.5 Load Previous Review (if incremental)
98
-
99
- If `previous_review_path` is provided:
100
-
101
- 1. Read previous review report
102
- 2. Extract items marked as "PASSED" or "VERIFIED"
103
- 3. These items can be skipped in current review (already validated)
104
-
105
- ## Step 2: File Completeness Check
106
-
107
- ### 2.1 Build Expected File List
108
-
109
- From design document, extract complete file inventory:
110
-
111
- **Backend-Spring File Categories:**
112
-
113
- | Category | Pattern | Example |
114
- |----------|---------|---------|
115
- | Enums | `enums/*.java` | `enums/ErrorCodeConstants.java` |
116
- | DO (Data Object) | `dal/dataobject/**/*.java` | `dal/dataobject/employee/EmployeeDO.java` |
117
- | VO (View Object) | `controller/admin/vo/**/*.java` | `controller/admin/vo/EmployeeRespVO.java` |
118
- | Mapper | `dal/mapper/**/*.java` | `dal/mapper/employee/EmployeeMapper.java` |
119
- | Service Interface | `service/**/*.java` | `service/employee/EmployeeService.java` |
120
- | Service Impl | `service/**/*.java` | `service/employee/EmployeeServiceImpl.java` |
121
- | Controller | `controller/admin/**/*.java` | `controller/admin/employee/EmployeeController.java` |
122
- | Convert | `convert/**/*.java` | `convert/employee/EmployeeConvert.java` |
123
-
124
- **Other Platforms:**
125
- Adapt file patterns based on `platform_id` conventions.
126
-
127
- ### 2.2 Scan Actual Files
128
-
129
- Use `Glob` to scan `source_root` for implemented files:
130
-
131
- ```
132
- FOR each category:
133
- - Glob search for actual files matching category pattern
134
- - Record found files
135
- ```
136
-
137
- ### 2.3 Compare and Calculate Completeness
138
-
139
- Generate completeness matrix:
140
-
141
- ```markdown
142
- | Category | Required | Created | Missing |
143
- |----------|----------|---------|---------|
144
- | Enums | {count} | {count} | {count} |
145
- | DO | {count} | {count} | {count} |
146
- | VO | {count} | {count} | {count} |
147
- | Mapper | {count} | {count} | {count} |
148
- | Service | {count} | {count} | {count} |
149
- | Controller | {count} | {count} | {count} |
150
- | Convert | {count} | {count} | {count} |
151
- | **Total** | **{total}** | **{total}** | **{total}** |
152
- ```
153
-
154
- **Completeness Percentage:**
155
- ```
156
- completeness_pct = (created_files / required_files) * 100
157
- ```
158
-
159
- ### 2.4 List Missing Files
160
-
161
- Generate detailed list of missing files with expected paths:
162
-
163
- ```markdown
164
- ### Missing Files
165
- 1. `{expected_path_1}`
166
- 2. `{expected_path_2}`
167
- ...
168
- ```
169
-
170
- ## Step 3: Code Compliance Check
171
-
172
- ### 3.1 DO Class Compliance
173
-
174
- For each found DO class, verify:
175
-
176
- | Check | Rule | Severity |
177
- |-------|------|----------|
178
- | Base Class | Must extend correct base class (e.g., `TenantBaseDO`) | ERROR |
179
- | @TableName | Must have `@TableName` annotation with correct table name | ERROR |
180
- | @Schema | Must have `@Schema` annotation for documentation | WARN |
181
- | Field Annotations | Required fields must have `@NotNull` or similar | WARN |
182
- | Package | Must match design document package structure | ERROR |
183
-
184
- ### 3.2 VO Class Compliance
185
-
186
- For each found VO class, verify:
187
-
188
- | Check | Rule | Severity |
189
- |-------|------|----------|
190
- | @Schema | All fields should have `@Schema` annotation | WARN |
191
- | Validation | Required fields must have validation annotations | ERROR |
192
- | Desensitization | Sensitive fields must have desensitization (e.g., phone, ID card) | ERROR |
193
- | Package | Must match design document package structure | ERROR |
194
-
195
- ### 3.3 Service Compliance
196
-
197
- For each found Service, verify:
198
-
199
- | Check | Rule | Severity |
200
- |-------|------|----------|
201
- | Interface | Must have Service interface and implementation separation | WARN |
202
- | @Service | Implementation must have `@Service` annotation | ERROR |
203
- | @Transactional | Methods with DB writes must have `@Transactional` | ERROR |
204
- | Method Coverage | All methods defined in design must be implemented | ERROR |
205
- | Data Permission | Must check data permissions where required | ERROR |
206
-
207
- ### 3.4 Controller Compliance
208
-
209
- For each found Controller, verify:
210
-
211
- | Check | Rule | Severity |
212
- |-------|------|----------|
213
- | @RestController | Must have `@RestController` annotation | ERROR |
214
- | @RequestMapping | Must have base `@RequestMapping` annotation | ERROR |
215
- | @Operation | Endpoints should have `@Operation` for documentation | WARN |
216
- | @PreAuthorize | Must have permission annotations where required | ERROR |
217
- | Valid | Request VO parameters must have `@Valid` | ERROR |
218
-
219
- ### 3.5 Naming Convention Check
220
-
221
- Verify naming follows conventions:
222
-
223
- | Element | Convention | Example |
224
- |---------|------------|---------|
225
- | Class Name | PascalCase, descriptive | `EmployeeServiceImpl` |
226
- | Method Name | camelCase, verb-first | `createEmployee` |
227
- | Variable Name | camelCase | `employeeList` |
228
- | Constant | UPPER_SNAKE_CASE | `MAX_PAGE_SIZE` |
229
-
230
- ## Step 4: API Consistency Check
231
-
232
- ### 4.1 Endpoint Coverage
233
-
234
- If `api_contract_path` provided, verify:
235
-
236
- | Check | Description | Severity |
237
- |-------|-------------|----------|
238
- | All Endpoints Implemented | Every endpoint in contract exists in Controller | ERROR |
239
- | HTTP Method Correct | `GET/POST/PUT/DELETE` matches contract | ERROR |
240
- | Path Correct | URL path matches contract exactly | ERROR |
241
- | Path Variables | `{id}` placeholders match contract | ERROR |
242
-
243
- ### 4.2 Request/Response Consistency
244
-
245
- Verify VO classes match API contract:
246
-
247
- | Check | Description | Severity |
248
- |-------|-------------|----------|
249
- | All Fields Present | VO must have all fields defined in contract | ERROR |
250
- | Field Types Match | Data types must match contract specification | ERROR |
251
- | Required Fields | Non-nullable contract fields must be required in VO | ERROR |
252
- | Field Names Match | JSON property names must match contract | ERROR |
253
-
254
- ## Step 5: Business Logic Integrity Check
255
-
256
- ### 5.1 Service Method Coverage
257
-
258
- Compare Service implementation against design document:
259
-
260
- | Check | Description | Severity |
261
- |-------|-------------|----------|
262
- | All Methods Implemented | Every method in design must exist in Service | ERROR |
263
- | Method Signatures Match | Parameters and return types match design | ERROR |
264
- | Business Rules Implemented | Key business rules from design are coded | ERROR |
265
-
266
- ### 5.2 Critical Implementation Checks
267
-
268
- | Aspect | What to Verify | Severity |
269
- |--------|----------------|----------|
270
- | Transaction Management | DB write operations in `@Transactional` | ERROR |
271
- | Data Permission | Tenant/user isolation implemented | ERROR |
272
- | Input Validation | Service layer validates inputs | ERROR |
273
- | Error Handling | Proper exception handling and error codes | WARN |
274
-
275
- ## Step 6: Generate Review Report
276
-
277
- ### 6.1 Determine Review Result
278
-
279
- Based on findings, determine overall result using quantitative thresholds:
280
-
281
- ```
282
- IF completeness_pct == 100% AND error_count == 0 THEN
283
- → Result = PASS
284
- IF completeness_pct >= 70% AND completeness_pct < 100% THEN
285
- → Result = PARTIAL
286
- IF completeness_pct < 70% OR has_critical_blockers == true THEN
287
- → Result = FAIL
288
- ```
289
-
290
- | Result | Threshold Criteria |
291
- |--------|-------------------|
292
- | **PASS** | 100% files created, 0 ERROR-level issues |
293
- | **PARTIAL** | 70-99% files created, or has non-critical ERROR issues |
294
- | **FAIL** | <70% files created, or critical blockers present |
295
-
296
- ### 6.2 Write Review Report
297
-
298
- Generate review report at:
299
- ```
300
- speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-review-report.md
301
- ```
302
-
303
- **Report Structure:**
304
-
305
- ```markdown
306
- ## Dev Review Report
307
-
308
- ### Summary
309
- - **Task ID**: {task_id}
310
- - **Platform**: {platform_id}
311
- - **Module**: {module_name}
312
- - **Review Result**: PASS | PARTIAL | FAIL
313
- - **Completeness**: {completed_files}/{total_files} ({percentage}%)
314
-
315
- ### File Completeness
316
- | Category | Required | Created | Missing |
317
- |----------|----------|---------|---------|
318
- | Enums | {n} | {n} | {n} |
319
- | DO | {n} | {n} | {n} |
320
- | VO | {n} | {n} | {n} |
321
- | Mapper | {n} | {n} | {n} |
322
- | Service | {n} | {n} | {n} |
323
- | Controller | {n} | {n} | {n} |
324
- | Convert | {n} | {n} | {n} |
325
- | **Total** | **{n}** | **{n}** | **{n}** |
326
-
327
- ### Missing Files
328
- 1. `{path}`
329
- 2. `{path}`
330
- ...
331
-
332
- ### Code Compliance Issues
333
- 1. [{severity}] `{file}`: {issue_description}
334
- 2. [{severity}] `{file}`: {issue_description}
335
- ...
336
-
337
- ### API Consistency Issues
338
- 1. [{severity}] {issue_description}
339
- ...
340
-
341
- ### Business Logic Issues
342
- 1. [{severity}] {issue_description}
343
- ...
344
-
345
- ### Verdict
346
- {Detailed verdict explanation}
347
-
348
- ### Re-dispatch Guidance
349
- Priority items for next dev worker:
350
- 1. {priority_item_1}
351
- 2. {priority_item_2}
352
- ...
353
- ```
354
-
355
- ## Step 7: Task Completion Report
356
-
357
- Output structured Task Completion Report:
358
-
359
- ### Success Report
360
-
361
- ```markdown
362
- ## Task Completion Report
363
- - **Status**: SUCCESS
364
- - **Task ID**: review-{original_task_id}
365
- - **Platform**: {platform_id}
366
- - **Module**: {module_name}
367
- - **Output Files**:
368
- - {review_report_path}
369
- - **Summary**: Review {result}: {completed}/{total} files, {error_count} errors, {warn_count} warnings
370
- ```
371
-
372
- ### Failure Report
373
-
374
- If review cannot be completed:
375
-
376
- ```markdown
377
- ## Task Completion Report
378
- - **Status**: FAILED
379
- - **Task ID**: review-{original_task_id}
380
- - **Platform**: {platform_id}
381
- - **Module**: {module_name}
382
- - **Output Files**: None
383
- - **Summary**: Review failed during {step}
384
- - **Error**: {detailed error description}
385
- - **Error Category**: DEPENDENCY_MISSING | VALIDATION_ERROR | BLOCKED
386
- - **Partial Outputs**: None
387
- - **Recovery Hint**: {suggestion for recovery}
388
- ```
389
-
390
- **Error Category Definitions:**
391
- - `DEPENDENCY_MISSING`: Design document or implementation report not found
392
- - `VALIDATION_ERROR`: Input parameters invalid or documents malformed
393
- - `BLOCKED`: Cannot access source code directory or other blocking issue
394
-
395
- # Key Rules
396
-
397
- | Rule | Description |
398
- |------|-------------|
399
- | **Read-Only** | NEVER modify any source code - only report findings |
400
- | **Blueprint-Driven** | Validate against design document specifications |
401
- | **Actionable Output** | PARTIAL/FAIL must include specific fix guidance |
402
- | **Incremental Support** | Skip already-passed items when previous review provided |
403
- | **Severity Classification** | ERROR = must fix, WARN = should fix |
404
- | **No Code Fixes** | Do NOT attempt to fix issues - only document them |
405
- | **Completeness First** | File existence is primary check before content validation |
406
-
407
- # Severity Levels
408
-
409
- | Level | Definition | Action Required |
410
- |-------|------------|-----------------|
411
- | **ERROR** | Critical issue blocking functionality or violating core requirements | Must be fixed before PASS |
412
- | **WARN** | Non-critical issue, best practice violation, or missing documentation | Should be fixed but not blocking |
413
-
414
- # Checklist
415
-
416
- - [ ] All required input parameters validated
417
- - [ ] Design document successfully loaded and parsed
418
- - [ ] Implementation report successfully loaded
419
- - [ ] File completeness check completed with category breakdown
420
- - [ ] Missing files list generated
421
- - [ ] DO classes checked for base class and annotations
422
- - [ ] VO classes checked for validation and desensitization
423
- - [ ] Service classes checked for @Transactional and permissions
424
- - [ ] Controller classes checked for annotations and endpoints
425
- - [ ] API contract validated against implementation (if provided)
426
- - [ ] Business logic coverage verified against design
427
- - [ ] Review report written with clear verdict
428
- - [ ] Re-dispatch guidance provided for PARTIAL/FAIL
429
- - [ ] Task Completion Report output
430
-
431
- # Platform-Specific Adaptations
432
-
433
- ## backend-spring
434
-
435
- - Check for Spring annotations: `@Service`, `@RestController`, `@Mapper`
436
- - Verify MyBatis XML mappers exist alongside Mapper interfaces
437
- - Check for Lombok `@Data` or similar on DO/VO classes
438
- - Validate `@PreAuthorize` for permission control
439
-
440
- ## web-vue / mobile-uniapp
441
-
442
- - Check for Vue component file structure
443
- - Verify API client methods match contract
444
- - Check for Pinia/Vuex store implementations
445
- - Validate route definitions
446
-
447
- ## desktop-tauri
448
-
449
- - Check for Rust module structure
450
- - Verify command handlers registered
451
- - Check for type-safe API bindings