sillyspec 3.10.1 → 3.10.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/package.json +1 -1
- package/src/run.js +14 -4
- package/src/stages/quick.js +19 -6
package/package.json
CHANGED
package/src/run.js
CHANGED
|
@@ -280,10 +280,20 @@ async function runStage(pm, progress, stageName, cwd) {
|
|
|
280
280
|
let currentIdx = steps.findIndex(s => s.status !== 'completed' && s.status !== 'skipped')
|
|
281
281
|
|
|
282
282
|
if (currentIdx === -1) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
283
|
+
// 已完成 → 自动重置,重新开始
|
|
284
|
+
const freshSteps = await getStageSteps(stageName, cwd, progress)
|
|
285
|
+
stageData.steps = freshSteps
|
|
286
|
+
? freshSteps.map(s => ({ name: s.name, status: 'pending' }))
|
|
287
|
+
: []
|
|
288
|
+
stageData.status = 'in-progress'
|
|
289
|
+
stageData.startedAt = new Date().toLocaleString('zh-CN', { hour12: false })
|
|
290
|
+
stageData.completedAt = null
|
|
291
|
+
pm._write(cwd, progress)
|
|
292
|
+
currentIdx = 0
|
|
293
|
+
console.log(`🔄 ${stageName} 阶段已自动重置,重新开始。\n`)
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (currentIdx > 0) {
|
|
287
297
|
// 有进行中的步骤,提示用户
|
|
288
298
|
const completed = currentIdx
|
|
289
299
|
const total = steps.length
|
package/src/stages/quick.js
CHANGED
|
@@ -17,8 +17,21 @@ export const definition = {
|
|
|
17
17
|
6. 如有 \`--change\`,加载设计文档:\`cat .sillyspec/changes/<变更名>/design.md 2>/dev/null\`(理解设计意图)
|
|
18
18
|
7. 如有需要,查询知识库:\`cat .sillyspec/knowledge/INDEX.md 2>/dev/null\`
|
|
19
19
|
|
|
20
|
+
### 创建任务记录(必须执行)
|
|
21
|
+
理解完任务后,立即创建记录文件:
|
|
22
|
+
1. \`git config user.name\` 获取用户名
|
|
23
|
+
2. 无 \`--change\`:创建 \.sillyspec/quicklog/QUICKLOG-<git用户名>.md\`(已存在则追加),写入:
|
|
24
|
+
\`\`\`
|
|
25
|
+
## YYYY-MM-DD HH:mm:ss — <一句话任务描述>
|
|
26
|
+
状态:进行中
|
|
27
|
+
文件:<预估要改的文件>
|
|
28
|
+
\`\`\`
|
|
29
|
+
3. 有 \`--change\`:在 \`.sillyspec/changes/<变更名>/tasks.md\` 追加未勾选的 task
|
|
30
|
+
|
|
31
|
+
这样 Gate 检测到 \.sillyspec/\` 下有变更,就不会拦截后续的代码修改。
|
|
32
|
+
|
|
20
33
|
### 输出
|
|
21
|
-
任务理解 +
|
|
34
|
+
任务理解 + 上下文摘要 + quicklog 已创建`,
|
|
22
35
|
outputHint: '任务理解',
|
|
23
36
|
optional: false
|
|
24
37
|
},
|
|
@@ -43,14 +56,14 @@ export const definition = {
|
|
|
43
56
|
optional: false
|
|
44
57
|
},
|
|
45
58
|
{
|
|
46
|
-
name: '
|
|
47
|
-
prompt: `Git
|
|
59
|
+
name: '暂存和更新记录',
|
|
60
|
+
prompt: `Git 暂存并更新任务记录。
|
|
48
61
|
|
|
49
62
|
### 操作
|
|
50
63
|
1. \`git add -A\` — 暂存改动文件(不要 commit,由用户通过统一提交工具处理)
|
|
51
|
-
2.
|
|
52
|
-
-
|
|
53
|
-
-
|
|
64
|
+
2. 更新 Step 1 创建的记录:
|
|
65
|
+
- 无 \`--change\`:更新 QUICKLOG 条目,将「状态:进行中」改为「状态:已完成」,补充实际改动文件和结果摘要
|
|
66
|
+
- 有 \`--change\`:勾选 tasks.md 中对应的 task checkbox
|
|
54
67
|
3. QUICKLOG 轮转:超过 500 行则重命名为 \`QUICKLOG-<USER>-YYYY-MM-DD.md\`
|
|
55
68
|
4. 如果发现项目特有的坑,追加到 \`.sillyspec/knowledge/uncategorized.md\`
|
|
56
69
|
5. 任务比预期复杂 → 建议用完整流程
|