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.
- package/.speccrew/agents/speccrew-feature-designer.md +67 -0
- package/.speccrew/agents/speccrew-product-manager.md +69 -0
- package/.speccrew/agents/speccrew-system-designer.md +77 -0
- package/.speccrew/agents/speccrew-system-developer.md +311 -8
- package/.speccrew/agents/speccrew-task-worker.md +34 -0
- package/.speccrew/agents/speccrew-team-leader.md +84 -0
- package/.speccrew/agents/speccrew-test-manager.md +27 -0
- 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.en.md +97 -22
- 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.md +97 -22
- 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/docs/GETTING-STARTED.zh-TW.md +213 -138
- package/lib/commands/init.js +18 -0
- package/package.json +1 -1
- package/.speccrew/skills/speccrew-dev-review/SKILL.md +0 -451
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-dev-desktop-tauri
|
|
3
|
+
description: SpecCrew Tauri Desktop Development Skill. Implements desktop application features using Tauri framework based on system design documents. Handles Rust backend commands, frontend integration, Tauri Command API, and Tauri Build packaging.
|
|
4
|
+
tools: Read, Write, Glob, Grep, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
|
|
9
|
+
- System Designer Agent has completed Tauri desktop system design
|
|
10
|
+
- User asks "Start Tauri development", "Implement Tauri app"
|
|
11
|
+
- Design documents confirmed in `03.system-design/{platform_id}/`
|
|
12
|
+
|
|
13
|
+
# Workflow
|
|
14
|
+
|
|
15
|
+
## Absolute Constraints
|
|
16
|
+
|
|
17
|
+
> **These rules apply to Task Record document generation. Violation = task failure.**
|
|
18
|
+
|
|
19
|
+
1. **FORBIDDEN: Full-file rewrite for Task Record** — After the Task Record is initially created in Step 3.1a, NEVER use `create_file` or full-content overwrite on it. All subsequent updates MUST use targeted `search_replace` on specific sections.
|
|
20
|
+
|
|
21
|
+
2. **FORBIDDEN: Full-file rewrite** — NEVER replace the entire Task Record content in a single operation. Always use targeted `search_replace` on specific sections.
|
|
22
|
+
|
|
23
|
+
3. **MANDATORY: Template-first workflow** — Copy template MUST execute before fill sections. Skipping copy and writing content directly is FORBIDDEN.
|
|
24
|
+
|
|
25
|
+
4. **CLARIFICATION: Source code is NOT template-filled** — Actual source code files are written directly based on design blueprints. The template-fill workflow applies ONLY to the Task Record document.
|
|
26
|
+
|
|
27
|
+
## Step 1: Read Design Documents
|
|
28
|
+
|
|
29
|
+
**Input**: Single module design document path `design_doc_path` (provided by upstream system-developer agent).
|
|
30
|
+
|
|
31
|
+
Read in order:
|
|
32
|
+
|
|
33
|
+
1. **Module design document**: `design_doc_path` (single module design document)
|
|
34
|
+
2. **API Contract**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-api-contract.md`
|
|
35
|
+
3. **Techs Knowledge** (paths from agent context):
|
|
36
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/tech-stack.md`
|
|
37
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/architecture.md`
|
|
38
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/conventions-design.md`
|
|
39
|
+
- `speccrew-workspace/knowledges/techs/{platform_id}/conventions-dev.md`
|
|
40
|
+
|
|
41
|
+
## Step 2: Analyze Existing Code Structure
|
|
42
|
+
|
|
43
|
+
Use Glob/Grep to understand current Tauri codebase:
|
|
44
|
+
|
|
45
|
+
| Target | Glob Pattern | Purpose |
|
|
46
|
+
|--------|-------------|---------|
|
|
47
|
+
| Rust commands | `src-tauri/src/**/*.rs` | Understand Tauri command structure |
|
|
48
|
+
| Frontend integration | `src/**/*.{tsx,vue}` | Understand frontend structure |
|
|
49
|
+
| Tauri commands | `src-tauri/src/commands/**/*.rs` | Understand command patterns |
|
|
50
|
+
| Window management | `src-tauri/src/window/**/*.rs` | Understand window patterns |
|
|
51
|
+
| State management | `src/stores/**/*` | Understand store pattern |
|
|
52
|
+
| API layer | `src/apis/**/*` | Understand API encapsulation |
|
|
53
|
+
| Configuration files | `package.json`, `tauri.conf.json` | Build and config patterns |
|
|
54
|
+
| Cargo.toml | `src-tauri/Cargo.toml` | Rust dependencies |
|
|
55
|
+
|
|
56
|
+
Document findings for reference in later steps.
|
|
57
|
+
|
|
58
|
+
## Step 3: Extract Task List and Create Task Record
|
|
59
|
+
|
|
60
|
+
### 3.1 Create Task Record File Using Template-Fill Workflow
|
|
61
|
+
|
|
62
|
+
**Path**: `speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[feature-name]-task.md`
|
|
63
|
+
|
|
64
|
+
#### 3.1a Copy Template to Task Record Path
|
|
65
|
+
|
|
66
|
+
> Note: This is the ONLY step where `create_file` is allowed for the Task Record. All later updates in Step 4-6 MUST use `search_replace` on individual sections.
|
|
67
|
+
|
|
68
|
+
1. **Read the template file**: `templates/TASK-RECORD-TEMPLATE.md`
|
|
69
|
+
2. **Replace top-level placeholders** (feature name, platform ID, iteration info)
|
|
70
|
+
3. **Create the document** using `create_file`:
|
|
71
|
+
- Target path: `speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[feature-name]-task.md`
|
|
72
|
+
- Content: Template with top-level placeholders replaced
|
|
73
|
+
4. **Verify**: Document has complete section structure ready for filling
|
|
74
|
+
|
|
75
|
+
#### 3.1b Fill Task Record Sections Using search_replace
|
|
76
|
+
|
|
77
|
+
Fill each section with task checklist and design metadata extracted from input documents.
|
|
78
|
+
|
|
79
|
+
> ⚠️ **CRITICAL CONSTRAINTS:**
|
|
80
|
+
> - **FORBIDDEN: `create_file` to rewrite the entire document**
|
|
81
|
+
> - **MUST use `search_replace` to fill each section individually**
|
|
82
|
+
> - **All section titles MUST be preserved**
|
|
83
|
+
|
|
84
|
+
### 3.2 Tauri-Specific Task Types
|
|
85
|
+
|
|
86
|
+
**Conditional Task Selection:**
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
IF task involves Rust backend logic THEN
|
|
90
|
+
→ Create Tauri Command task
|
|
91
|
+
IF task involves UI components in frontend THEN
|
|
92
|
+
→ Create Frontend Component task
|
|
93
|
+
IF task involves process communication THEN
|
|
94
|
+
→ Create Tauri Command + Frontend Invoke task
|
|
95
|
+
IF task involves native APIs THEN
|
|
96
|
+
→ Create Native Integration task
|
|
97
|
+
IF task involves menus or shortcuts THEN
|
|
98
|
+
→ Create Menu/Shortcut task
|
|
99
|
+
IF task involves auto-update THEN
|
|
100
|
+
→ Create Auto-Update task
|
|
101
|
+
IF task involves security configuration THEN
|
|
102
|
+
→ Create Security Hardening task
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
| Task Type | Description | Example |
|
|
106
|
+
|-----------|-------------|---------|
|
|
107
|
+
| Tauri Command | Rust backend command | `#[tauri::command]` functions |
|
|
108
|
+
| Frontend Component | UI components | React/Vue components, pages |
|
|
109
|
+
| Command Handler | Frontend-to-Rust communication | `invoke()` calls |
|
|
110
|
+
| Window Management | Window creation, lifecycle | `WindowBuilder`, window config |
|
|
111
|
+
| Native Integration | File system, notifications | `std::fs`, `tauri::api` |
|
|
112
|
+
| Menu/Shortcut | Application menus, shortcuts | Menu templates, accelerators |
|
|
113
|
+
| Auto-Update | Update mechanism | `tauri-updater` |
|
|
114
|
+
| Security Hardening | CSP, permissions | `tauri.conf.json` security |
|
|
115
|
+
|
|
116
|
+
### Task ID Prefix
|
|
117
|
+
|
|
118
|
+
Use `TR-` prefix for Tauri tasks: `TR-001`, `TR-002`, etc.
|
|
119
|
+
|
|
120
|
+
### Task Checklist Table
|
|
121
|
+
|
|
122
|
+
| Task ID | Module | Description | Target Files | Command Name | Native Integration | Dependencies | Status |
|
|
123
|
+
|---------|--------|-------------|--------------|--------------|-------------------|--------------|--------|
|
|
124
|
+
| TR-001 | Commands | Create file operations command | `src-tauri/src/commands/file.rs` | `read_file`, `write_file` | File system | - | Pending |
|
|
125
|
+
| TR-002 | Frontend | Create main window UI | `src/pages/Main.tsx` | `file:*` | - | TR-001 | Pending |
|
|
126
|
+
|
|
127
|
+
**Status**: Pending / In Progress / Completed / Blocked
|
|
128
|
+
|
|
129
|
+
**Proceed directly to implementation — no user confirmation required.**
|
|
130
|
+
|
|
131
|
+
## Step 4: Implement Tasks
|
|
132
|
+
|
|
133
|
+
### 4.1 Implementation Order
|
|
134
|
+
|
|
135
|
+
Follow dependency order:
|
|
136
|
+
1. Tauri commands (Rust backend)
|
|
137
|
+
2. Frontend integration
|
|
138
|
+
3. Native integrations
|
|
139
|
+
4. Security configurations
|
|
140
|
+
5. Auto-update mechanism
|
|
141
|
+
|
|
142
|
+
### 4.2 Coding Standards
|
|
143
|
+
|
|
144
|
+
- **Rust Commands**: Follow conventions-dev.md for Tauri backend code
|
|
145
|
+
- **Frontend**: Follow frontend conventions (React/Vue/etc.)
|
|
146
|
+
- **Command Names**: Use exact names from design document
|
|
147
|
+
- **Types**: Use TypeScript types defined in design document
|
|
148
|
+
- **Error Handling**: Use `Result<T, String>` for command returns
|
|
149
|
+
|
|
150
|
+
### 4.3 Status Markers
|
|
151
|
+
|
|
152
|
+
Use markers from design document:
|
|
153
|
+
|
|
154
|
+
| Marker | Meaning | Action |
|
|
155
|
+
|--------|---------|--------|
|
|
156
|
+
| `[EXISTING]` | Reuse current code | Verify compatibility, no modification needed |
|
|
157
|
+
| `[MODIFIED]` | Enhance existing code | Implement changes carefully |
|
|
158
|
+
| `[NEW]` | Create brand new | Full implementation required |
|
|
159
|
+
|
|
160
|
+
## Step 5: Local Checks (Per Task)
|
|
161
|
+
|
|
162
|
+
After completing each task, run the following checks:
|
|
163
|
+
|
|
164
|
+
### 5.1 Rust Checks
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
cd src-tauri
|
|
168
|
+
cargo check
|
|
169
|
+
cargo clippy
|
|
170
|
+
cargo test
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 5.2 Frontend Build Verification
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
npm run build
|
|
177
|
+
# or
|
|
178
|
+
npm run tauri build --debug
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 5.3 Lint Check
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
npm run lint
|
|
185
|
+
# or
|
|
186
|
+
npx eslint [modified-files]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 5.4 Type Check (TypeScript projects)
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
npx tsc --noEmit
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 5.5 Quick Verify
|
|
196
|
+
|
|
197
|
+
- Application window launches without crash
|
|
198
|
+
- No console errors in DevTools
|
|
199
|
+
- Tauri commands respond correctly
|
|
200
|
+
- Native integrations work as expected
|
|
201
|
+
|
|
202
|
+
**If checks fail**: Fix issues before marking task complete. Record complex issues in task file.
|
|
203
|
+
|
|
204
|
+
## Step 6: Record Deviations
|
|
205
|
+
|
|
206
|
+
If implementation deviates from design document:
|
|
207
|
+
|
|
208
|
+
1. Stop and document the deviation
|
|
209
|
+
2. Explain reason for deviation
|
|
210
|
+
3. Get user confirmation or proceed with documented reason
|
|
211
|
+
|
|
212
|
+
**Record in task file**:
|
|
213
|
+
```markdown
|
|
214
|
+
### Deviation Log
|
|
215
|
+
- TR-002: Changed command return type from {original} to {new} because {reason}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Step 7: Record Technical Debt
|
|
219
|
+
|
|
220
|
+
If technical debt is identified:
|
|
221
|
+
|
|
222
|
+
**Write to**: `speccrew-workspace/iterations/{number}-{type}-{name}/tech-debt/[feature-name]-tech-debt.md`
|
|
223
|
+
|
|
224
|
+
**Categories**:
|
|
225
|
+
- Security: Temporary security relaxations
|
|
226
|
+
- Performance: Known performance issues
|
|
227
|
+
- Refactoring: Code that needs cleanup
|
|
228
|
+
- Dependencies: Version constraints or workarounds
|
|
229
|
+
|
|
230
|
+
## Step 8: Complete Notification
|
|
231
|
+
|
|
232
|
+
After all tasks complete, present summary:
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
Tauri Development Complete: {feature-name}
|
|
236
|
+
Platform: {platform_id}
|
|
237
|
+
Framework: Tauri
|
|
238
|
+
|
|
239
|
+
Tasks Completed: {count}
|
|
240
|
+
├── Tauri Commands: {count}
|
|
241
|
+
├── Frontend Integration: {count}
|
|
242
|
+
├── Native Integration: {count}
|
|
243
|
+
└── Security/Other: {count}
|
|
244
|
+
|
|
245
|
+
Deviations Recorded: {count}
|
|
246
|
+
Technical Debt Items: {count}
|
|
247
|
+
|
|
248
|
+
Task Record: speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[feature-name]-task.md
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Task Completion Report
|
|
252
|
+
|
|
253
|
+
At the end of Step 8 (or if the skill fails at any point), output a structured Task Completion Report:
|
|
254
|
+
|
|
255
|
+
### Success Report
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
## Task Completion Report
|
|
259
|
+
- **Status**: SUCCESS
|
|
260
|
+
- **Task ID**: {task_id from dispatch context}
|
|
261
|
+
- **Platform**: {platform_id}
|
|
262
|
+
- **Module**: {module_name}
|
|
263
|
+
- **Output Files**:
|
|
264
|
+
- {file_path_1}
|
|
265
|
+
- {file_path_2}
|
|
266
|
+
- ...
|
|
267
|
+
- **Summary**: Tauri module {module_name} implemented with {X} tasks completed
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Failure Report
|
|
271
|
+
|
|
272
|
+
If the skill fails at any step:
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
## Task Completion Report
|
|
276
|
+
- **Status**: FAILED
|
|
277
|
+
- **Task ID**: {task_id from dispatch context}
|
|
278
|
+
- **Platform**: {platform_id}
|
|
279
|
+
- **Module**: {module_name}
|
|
280
|
+
- **Output Files**: {list of partially generated files, or "None"}
|
|
281
|
+
- **Summary**: {one-line description of what was attempted}
|
|
282
|
+
- **Error**: {detailed error description}
|
|
283
|
+
- **Error Category**: {DEPENDENCY_MISSING | BUILD_FAILURE | VALIDATION_ERROR | RUNTIME_ERROR | BLOCKED}
|
|
284
|
+
- **Partial Outputs**: {list of files that were generated before failure, or "None"}
|
|
285
|
+
- **Recovery Hint**: {suggestion for how to resolve and retry}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Error Category Definitions**:
|
|
289
|
+
- `DEPENDENCY_MISSING`: Required Rust crate or Node.js dependency not available
|
|
290
|
+
- `BUILD_FAILURE`: Tauri build error, Rust compilation failure
|
|
291
|
+
- `VALIDATION_ERROR`: Clippy, ESLint, TypeScript type check, or test failure
|
|
292
|
+
- `RUNTIME_ERROR`: App crash on launch, runtime exception, command invocation failure
|
|
293
|
+
- `BLOCKED`: Blocked by external dependency or unresolved design issue
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
# Reference Guides
|
|
298
|
+
|
|
299
|
+
## Security Audit Checklist
|
|
300
|
+
|
|
301
|
+
| Check | Method |
|
|
302
|
+
|-------|--------|
|
|
303
|
+
| CSP | Verify `csp` in `tauri.conf.json` |
|
|
304
|
+
| Dangerous APIs | Check `allowlist` scope |
|
|
305
|
+
| Command Validation | Verify input validation in commands |
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
# Key Rules
|
|
310
|
+
|
|
311
|
+
| Rule | Description |
|
|
312
|
+
|------|-------------|
|
|
313
|
+
| **Design Document READ-ONLY** | Design documents are reference only - do not modify. Record deviations in task file. |
|
|
314
|
+
| **Actual Framework Syntax** | All code MUST use actual Tauri/Rust API syntax |
|
|
315
|
+
| **Status Markers Required** | Use [EXISTING], [MODIFIED], [NEW] markers for all components and commands |
|
|
316
|
+
| **Follow Techs Conventions** | Naming, directory structure, patterns must follow techs knowledge |
|
|
317
|
+
| **Security First** | Minimize dangerous API allowlist scope |
|
|
318
|
+
| **Error Handling** | All commands must return `Result<T, E>` |
|
|
319
|
+
| **Task Per File Group** | Each task should map to a logical file group or component |
|
|
320
|
+
| **Local Checks Mandatory** | Run cargo check, lint, and quick verify before marking task complete |
|
|
321
|
+
| **Tech Debt Recorded** | All technical debt must be written to iterations/{iter}/tech-debt/ |
|
|
322
|
+
|
|
323
|
+
# Checklist
|
|
324
|
+
|
|
325
|
+
- [ ] Design document loaded before implementation (single module design_doc_path)
|
|
326
|
+
- [ ] Existing code structure analyzed via Glob/Grep
|
|
327
|
+
- [ ] Task record created with complete checklist
|
|
328
|
+
- [ ] Task list extracted and recorded in task file
|
|
329
|
+
- [ ] All modules in the design document covered in task list
|
|
330
|
+
- [ ] All Tauri commands from design implemented
|
|
331
|
+
- [ ] CSP configured in tauri.conf.json
|
|
332
|
+
- [ ] Command input validation implemented
|
|
333
|
+
- [ ] Native integrations follow security best practices
|
|
334
|
+
- [ ] Rust checks pass (cargo check, clippy, test)
|
|
335
|
+
- [ ] Frontend build verification passes
|
|
336
|
+
- [ ] Lint check passes with no errors
|
|
337
|
+
- [ ] Type check passes (TypeScript projects)
|
|
338
|
+
- [ ] Quick verify: App launches without crash
|
|
339
|
+
- [ ] All deviations recorded in task file
|
|
340
|
+
- [ ] Technical debt recorded in tech-debt/ directory
|
|
341
|
+
- [ ] Task record status updated to complete
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Tauri Development Task Record - [Feature Name]
|
|
2
|
+
|
|
3
|
+
> Based on Design Document: [Link to 03.system-design/{platform_id}/[feature-name]-design.md]
|
|
4
|
+
> Platform: {platform_id} | Framework: Tauri
|
|
5
|
+
|
|
6
|
+
## Task Checklist
|
|
7
|
+
|
|
8
|
+
| Task ID | Module | Description | Target Files | Command Name | Native Integration | Dependencies | Status |
|
|
9
|
+
|---------|--------|-------------|--------------|--------------|-------------------|--------------|--------|
|
|
10
|
+
| TR-001 | Commands | [Description] | `src-tauri/src/commands/...` | `command:name` | [None/FileSystem/etc] | - | Pending |
|
|
11
|
+
| TR-002 | Frontend | [Description] | `src/...` | `command:name` | - | TR-001 | Pending |
|
|
12
|
+
|
|
13
|
+
> Status: Pending / In Progress / Completed / Blocked
|
|
14
|
+
|
|
15
|
+
## Command Registry
|
|
16
|
+
|
|
17
|
+
| Command Name | Input Type | Output Type | Handler Location | Description | Status |
|
|
18
|
+
|--------------|------------|-------------|------------------|-------------|--------|
|
|
19
|
+
| [command:name] | [Input] | [Output] | `src-tauri/src/commands/[file].rs` | [Description] | [NEW/MODIFIED/EXISTING] |
|
|
20
|
+
|
|
21
|
+
## Native Integration Status
|
|
22
|
+
|
|
23
|
+
| Integration Type | Feature | Implementation File | Status | Notes |
|
|
24
|
+
|------------------|---------|---------------------|--------|-------|
|
|
25
|
+
| File System | [Read/Write/Dialog] | `src-tauri/src/commands/fs.rs` | [Done/Pending] | [Notes] |
|
|
26
|
+
| System Tray | [Icon/Menu] | `src-tauri/src/tray.rs` | [Done/Pending] | [Notes] |
|
|
27
|
+
| Notifications | [OS Notifications] | `src-tauri/src/notify.rs` | [Done/Pending] | [Notes] |
|
|
28
|
+
| Menu Bar | [App Menu] | `src-tauri/src/menu.rs` | [Done/Pending] | [Notes] |
|
|
29
|
+
| Shortcuts | [Global/Local] | `src-tauri/src/shortcuts.rs` | [Done/Pending] | [Notes] |
|
|
30
|
+
| Protocol Handler | [Custom Protocol] | `src-tauri/src/protocol.rs` | [Done/Pending] | [Notes] |
|
|
31
|
+
| Auto Update | [Check/Download/Install] | `src-tauri/src/updater.rs` | [Done/Pending] | [Notes] |
|
|
32
|
+
|
|
33
|
+
## Security Checklist
|
|
34
|
+
|
|
35
|
+
| Check Item | Configuration | Verified |
|
|
36
|
+
|------------|---------------|----------|
|
|
37
|
+
| CSP | Configured in `tauri.conf.json` | [ ] Yes / [ ] No |
|
|
38
|
+
| Dangerous APIs | Minimal allowlist scope | [ ] Yes / [ ] No |
|
|
39
|
+
| Command Validation | Input validation implemented | [ ] Yes / [ ] No |
|
|
40
|
+
| Permission Scope | [Limited permissions] | [ ] Yes / [ ] No |
|
|
41
|
+
|
|
42
|
+
## Window Management
|
|
43
|
+
|
|
44
|
+
| Window Name | Type | Status | Configuration |
|
|
45
|
+
|-------------|------|--------|---------------|
|
|
46
|
+
| [MainWindow] | Window | [NEW/MODIFIED/EXISTING] | [Size/frame/etc] |
|
|
47
|
+
| [ModalWindow] | Window | [NEW/MODIFIED/EXISTING] | [Size/frame/etc] |
|
|
48
|
+
|
|
49
|
+
## Implementation Progress
|
|
50
|
+
|
|
51
|
+
### Completed Tasks
|
|
52
|
+
|
|
53
|
+
- [TR-001] [Description] - Completed at [timestamp]
|
|
54
|
+
- [TR-002] [Description] - Completed at [timestamp]
|
|
55
|
+
|
|
56
|
+
### In Progress
|
|
57
|
+
|
|
58
|
+
- [TR-003] [Description] - Started at [timestamp]
|
|
59
|
+
|
|
60
|
+
### Blocked Tasks
|
|
61
|
+
|
|
62
|
+
| Task ID | Block Reason | Blocking Issue | Planned Resolution |
|
|
63
|
+
|---------|--------------|----------------|-------------------|
|
|
64
|
+
| [TR-XXX] | [Reason] | [Issue link/description] | [Resolution plan] |
|
|
65
|
+
|
|
66
|
+
## Deviation Log
|
|
67
|
+
|
|
68
|
+
| Task ID | Original Design | Implementation | Reason |
|
|
69
|
+
|---------|-----------------|----------------|--------|
|
|
70
|
+
| [TR-XXX] | [Original approach] | [Actual implementation] | [Why changed] |
|
|
71
|
+
|
|
72
|
+
## Issues and Resolutions
|
|
73
|
+
|
|
74
|
+
| Issue ID | Task ID | Description | Severity | Resolution | Status |
|
|
75
|
+
|----------|---------|-------------|----------|------------|--------|
|
|
76
|
+
| [ISSUE-001] | [TR-XXX] | [Description] | [High/Med/Low] | [How resolved] | [Resolved/Pending] |
|
|
77
|
+
|
|
78
|
+
## Local Verification Results
|
|
79
|
+
|
|
80
|
+
### Build Verification
|
|
81
|
+
|
|
82
|
+
| Check | Command | Result | Notes |
|
|
83
|
+
|-------|---------|--------|-------|
|
|
84
|
+
| Rust Check | `cargo check` | [Pass/Fail] | [Notes] |
|
|
85
|
+
| Dev Build | `npm run tauri dev` | [Pass/Fail] | [Notes] |
|
|
86
|
+
| Production Build | `npm run tauri build` | [Pass/Fail] | [Notes] |
|
|
87
|
+
|
|
88
|
+
### Code Quality
|
|
89
|
+
|
|
90
|
+
| Check | Command | Result | Notes |
|
|
91
|
+
|-------|---------|--------|-------|
|
|
92
|
+
| Rust Lint | `cargo clippy` | [Pass/Fail] | [Notes] |
|
|
93
|
+
| Rust Test | `cargo test` | [Pass/Fail] | [Notes] |
|
|
94
|
+
| Frontend Lint | `npm run lint` | [Pass/Fail] | [Notes] |
|
|
95
|
+
| Type Check | `npx tsc --noEmit` | [Pass/Fail] | [Notes] |
|
|
96
|
+
| Unit Tests | `npm test` | [Pass/Fail] | [Notes] |
|
|
97
|
+
|
|
98
|
+
### Security Verification
|
|
99
|
+
|
|
100
|
+
| Check | Method | Result | Notes |
|
|
101
|
+
|-------|--------|--------|-------|
|
|
102
|
+
| CSP Config | Config review | [Pass/Fail] | [Notes] |
|
|
103
|
+
| Allowlist Scope | Config review | [Pass/Fail] | [Notes] |
|
|
104
|
+
| Input Validation | Code review | [Pass/Fail] | [Notes] |
|
|
105
|
+
|
|
106
|
+
### Functional Verification
|
|
107
|
+
|
|
108
|
+
| Check | Result | Notes |
|
|
109
|
+
|-------|--------|-------|
|
|
110
|
+
| App launches without crash | [Pass/Fail] | [Notes] |
|
|
111
|
+
| Tauri commands respond correctly | [Pass/Fail] | [Notes] |
|
|
112
|
+
| Native integrations work | [Pass/Fail] | [Notes] |
|
|
113
|
+
| No console errors | [Pass/Fail] | [Notes] |
|
|
114
|
+
|
|
115
|
+
## Technical Debt
|
|
116
|
+
|
|
117
|
+
Technical debt recorded in: `../tech-debt/[feature-name]-tech-debt.md`
|
|
118
|
+
|
|
119
|
+
| Item | Category | Description | Priority |
|
|
120
|
+
|------|----------|-------------|----------|
|
|
121
|
+
| [TD-001] | [Security/Performance/Refactor] | [Description] | [High/Med/Low] |
|
|
122
|
+
|
|
123
|
+
## Completion Summary
|
|
124
|
+
|
|
125
|
+
- **Total Tasks**: [N]
|
|
126
|
+
- **Completed**: [N]
|
|
127
|
+
- **Blocked**: [N]
|
|
128
|
+
- **Deviations**: [N]
|
|
129
|
+
- **Technical Debt Items**: [N]
|
|
130
|
+
|
|
131
|
+
### Final Checklist
|
|
132
|
+
|
|
133
|
+
- [ ] All tasks completed or documented as blocked
|
|
134
|
+
- [ ] All Tauri commands tested
|
|
135
|
+
- [ ] Security checklist verified
|
|
136
|
+
- [ ] Local checks (cargo check, lint, type, build) passing
|
|
137
|
+
- [ ] Deviations documented with reasons
|
|
138
|
+
- [ ] Technical debt recorded
|
|
139
|
+
- [ ] Task record updated
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
**Status**: In Progress / Completed
|
|
144
|
+
**Last Updated**: [Timestamp]
|
|
145
|
+
**Developer**: [Agent/User name]
|
|
@@ -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
|