speccrew 0.6.1 → 0.6.3
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 +18 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +11 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +11 -0
- package/package.json +1 -1
- package/workspace-template/docs/solutions/workspace-structure.md +1 -0
- package/workspace-template/scripts/update-progress.js +15 -0
|
@@ -443,6 +443,24 @@ All development outputs MUST go under `iterations/{iter}/04.development/`.
|
|
|
443
443
|
|
|
444
444
|
**FORBIDDEN directory names**: `04.dev-report/`, `04.dev-reports/`, `04.implementation/`, or any other variant.
|
|
445
445
|
|
|
446
|
+
#### Helper Scripts Constraint
|
|
447
|
+
|
|
448
|
+
All temporary/helper scripts generated during development MUST be placed under:
|
|
449
|
+
```
|
|
450
|
+
04.development/{platform_id}/scripts/
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
This includes but is not limited to:
|
|
454
|
+
- Data initialization scripts
|
|
455
|
+
- Local validation/verification scripts
|
|
456
|
+
- Environment setup scripts
|
|
457
|
+
- Build helper scripts
|
|
458
|
+
- Test data generation scripts
|
|
459
|
+
|
|
460
|
+
Scripts that are part of the application source code (e.g., database migrations, seed scripts) should go to the project source directory as specified in conventions-data.md, NOT to this scripts directory.
|
|
461
|
+
|
|
462
|
+
Each Worker MUST list all generated scripts in their Task Record under a "Generated Scripts" section.
|
|
463
|
+
|
|
446
464
|
> ⛔ **NO DIRECT CODING**: System Developer MUST NOT use file creation/editing tools to write application code. Every module implementation MUST be dispatched to a `speccrew-task-worker` agent running a dev skill (speccrew-dev-backend/frontend/mobile/desktop). System Developer's role in this phase is EXCLUSIVELY: task list creation, worker dispatch, progress tracking, and review coordination.
|
|
447
465
|
|
|
448
466
|
> **IMPORTANT**: Dispatch `speccrew-task-worker` agents (via Agent tool) for parallel module development. Do NOT call dev skills directly — each module MUST run in an independent Worker Agent for progress visibility and error isolation.
|
|
@@ -201,6 +201,17 @@ If accepting suboptimal solutions, write to tech-debt directory:
|
|
|
201
201
|
|
|
202
202
|
Use the unified tech_debt document template defined in the workspace document templates configuration.
|
|
203
203
|
|
|
204
|
+
#### Helper Scripts Output
|
|
205
|
+
|
|
206
|
+
All temporary/helper scripts (validation, data init, environment setup, etc.) MUST be saved to:
|
|
207
|
+
```
|
|
208
|
+
iterations/{iter}/04.development/{platform_id}/scripts/
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Exception**: Application source scripts (migrations, seeds) go to the project source directory per conventions-data.md.
|
|
212
|
+
|
|
213
|
+
Include all generated scripts in the Task Record "Generated Scripts" section with path and purpose.
|
|
214
|
+
|
|
204
215
|
## Step 9: Completion Notification
|
|
205
216
|
|
|
206
217
|
When all tasks complete, update task record and notify user:
|
|
@@ -206,6 +206,17 @@ Tech Debt: {count}
|
|
|
206
206
|
Task Record: speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/{feature-name}-tasks.md
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
+
#### Helper Scripts Output
|
|
210
|
+
|
|
211
|
+
All temporary/helper scripts (validation, data init, environment setup, mock data, etc.) MUST be saved to:
|
|
212
|
+
```
|
|
213
|
+
iterations/{iter}/04.development/{platform_id}/scripts/
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Exception**: Application source scripts (build configs, etc.) go to the project source directory per conventions-dev.md.
|
|
217
|
+
|
|
218
|
+
Include all generated scripts in the Task Record "Generated Scripts" section with path and purpose.
|
|
219
|
+
|
|
209
220
|
## Task Completion Report
|
|
210
221
|
|
|
211
222
|
At the end of Step 6 (or if the skill fails at any point), output a structured Task Completion Report:
|
package/package.json
CHANGED
|
@@ -113,6 +113,7 @@ iterations/
|
|
|
113
113
|
├── .checkpoints.json # Stage progress checkpoints
|
|
114
114
|
├── DISPATCH-PROGRESS.json # Task dispatch and execution tracking
|
|
115
115
|
├── {platform_id}/ # Grouped by platform (e.g., backend-spring, web-vue)
|
|
116
|
+
│ ├── scripts/ # Helper scripts generated during development
|
|
116
117
|
│ ├── {module}-task.md # Development task record (created by Dev Skill)
|
|
117
118
|
│ └── {module}-review-report.md # Code review report (created by Review Skill)
|
|
118
119
|
└── delivery-report.md # Final delivery summary
|
|
@@ -129,6 +129,21 @@ function acquireLock(filePath) {
|
|
|
129
129
|
fs.closeSync(fd);
|
|
130
130
|
return lockPath;
|
|
131
131
|
} catch (error) {
|
|
132
|
+
// 检查是否为锁文件已存在的错误
|
|
133
|
+
if (error.code === 'EEXIST') {
|
|
134
|
+
try {
|
|
135
|
+
const lockStat = fs.statSync(lockPath);
|
|
136
|
+
const ageSeconds = (Date.now() - lockStat.mtimeMs) / 1000;
|
|
137
|
+
if (ageSeconds > 60) {
|
|
138
|
+
console.error(`Warning: Stale lock file detected (age: ${Math.round(ageSeconds)}s), removing: ${lockPath}`);
|
|
139
|
+
fs.unlinkSync(lockPath);
|
|
140
|
+
// 不消耗重试次数,继续下一次循环尝试获取锁
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
} catch (statErr) {
|
|
144
|
+
// 锁文件在 stat 时已被删除,继续重试即可
|
|
145
|
+
}
|
|
146
|
+
}
|
|
132
147
|
retryCount++;
|
|
133
148
|
if (retryCount >= maxRetries) {
|
|
134
149
|
throw new Error(`Failed to acquire file lock for '${filePath}' after ${maxRetries} attempts`);
|