sillyspec 3.7.19 → 3.7.21
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/.claude/skills/sillyspec-archive/SKILL.md +8 -2
- package/.claude/skills/sillyspec-brainstorm/SKILL.md +7 -3
- package/.claude/skills/sillyspec-execute/SKILL.md +7 -3
- package/.claude/skills/sillyspec-plan/SKILL.md +7 -3
- package/.claude/skills/sillyspec-propose/SKILL.md +7 -3
- package/.claude/skills/sillyspec-quick/SKILL.md +8 -2
- package/.claude/skills/sillyspec-scan/SKILL.md +8 -2
- package/.claude/skills/sillyspec-status/SKILL.md +8 -2
- package/.claude/skills/sillyspec-verify/SKILL.md +7 -3
- package/package.json +1 -1
- package/src/run.js +41 -10
|
@@ -4,8 +4,14 @@ description: 归档变更 — 规范沉淀,可追溯
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run archive` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run archive --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
9
15
|
|
|
10
16
|
## 用户指令
|
|
11
17
|
$ARGUMENTS
|
|
@@ -5,9 +5,13 @@ description: 需求探索 — 结构化头脑风暴,含技术方案输出(
|
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run brainstorm` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run brainstorm --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
11
15
|
|
|
12
16
|
## 用户指令
|
|
13
17
|
$ARGUMENTS
|
|
@@ -5,9 +5,13 @@ description: 波次执行 — 子代理并行 + 强制 TDD + 两阶段审查
|
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run execute` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run execute --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
11
15
|
|
|
12
16
|
## 用户指令
|
|
13
17
|
$ARGUMENTS
|
|
@@ -5,9 +5,13 @@ description: 编写实现计划 — 2-5 分钟粒度,精确到文件路径和
|
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run plan` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run plan --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
11
15
|
|
|
12
16
|
## 用户指令
|
|
13
17
|
$ARGUMENTS
|
|
@@ -5,9 +5,13 @@ description: 生成结构化规范 — proposal + design + tasks
|
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run propose` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run propose --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
11
15
|
|
|
12
16
|
## 用户指令
|
|
13
17
|
$ARGUMENTS
|
|
@@ -4,8 +4,14 @@ description: 快速任务 — 跳过完整流程,直接做
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run quick` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run quick --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
9
15
|
|
|
10
16
|
## 用户指令
|
|
11
17
|
$ARGUMENTS
|
|
@@ -4,8 +4,14 @@ description: 代码扫描 — 分析项目结构、约定和架构
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run scan` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run scan --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
9
15
|
|
|
10
16
|
## 用户指令
|
|
11
17
|
$ARGUMENTS
|
|
@@ -4,8 +4,14 @@ description: 查看项目进度和状态
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run status` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run status --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
9
15
|
|
|
10
16
|
## 用户指令
|
|
11
17
|
$ARGUMENTS
|
|
@@ -5,9 +5,13 @@ description: 验证实现 — 对照规范检查 + 测试套件
|
|
|
5
5
|
|
|
6
6
|
## 执行
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
9
|
+
|
|
10
|
+
1. 运行 `sillyspec run verify` — 读取输出的步骤 prompt
|
|
11
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
12
|
+
3. 步骤完成后,运行 `sillyspec run verify --done --output "你的摘要"`
|
|
13
|
+
4. 重复 2-3 直到阶段完成
|
|
14
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
11
15
|
|
|
12
16
|
## 用户指令
|
|
13
17
|
$ARGUMENTS
|
package/package.json
CHANGED
package/src/run.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* CLI 成为流程引擎,AI 变成步骤执行器。
|
|
5
5
|
*/
|
|
6
6
|
import { basename, join } from 'path'
|
|
7
|
-
import { existsSync, readdirSync, mkdirSync, writeFileSync, appendFileSync } from 'fs'
|
|
7
|
+
import { existsSync, readdirSync, mkdirSync, writeFileSync, appendFileSync, readFileSync, statSync } from 'fs'
|
|
8
8
|
import { ProgressManager } from './progress.js'
|
|
9
9
|
import { stageRegistry, getNextStage, auxiliaryStages } from './stages/index.js'
|
|
10
10
|
import { buildExecuteSteps } from './stages/execute.js'
|
|
@@ -164,17 +164,15 @@ function runStage(progress, stageName, cwd) {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
const steps = stageData.steps
|
|
167
|
-
|
|
167
|
+
let currentIdx = steps.findIndex(s => s.status !== 'completed' && s.status !== 'skipped')
|
|
168
168
|
|
|
169
169
|
if (currentIdx === -1) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
process.exit(2)
|
|
170
|
+
// 阶段已完成,自动重置,允许重复执行
|
|
171
|
+
steps.forEach(s => { s.status = 'pending'; s.completedAt = null; s.output = null; s.startedAt = null })
|
|
172
|
+
stageData.status = 'in_progress'
|
|
173
|
+
stageData.completedAt = null
|
|
174
|
+
console.log(`🔄 ${stageName} 阶段已完成,重新开始...\n`)
|
|
175
|
+
currentIdx = 0
|
|
178
176
|
}
|
|
179
177
|
|
|
180
178
|
const stageDef = stageRegistry[stageName]
|
|
@@ -184,6 +182,36 @@ function runStage(progress, stageName, cwd) {
|
|
|
184
182
|
}
|
|
185
183
|
}
|
|
186
184
|
|
|
185
|
+
function validateMetadata(cwd, stageName) {
|
|
186
|
+
const changesDir = join(cwd, '.sillyspec', 'changes')
|
|
187
|
+
if (!existsSync(changesDir)) return
|
|
188
|
+
|
|
189
|
+
// 找最近 10 分钟内修改的 md/yaml 文件
|
|
190
|
+
const cutoff = Date.now() - 10 * 60 * 1000
|
|
191
|
+
const missing = []
|
|
192
|
+
|
|
193
|
+
function walk(dir) {
|
|
194
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
195
|
+
const full = join(dir, entry.name)
|
|
196
|
+
if (entry.isDirectory()) { walk(full); continue }
|
|
197
|
+
if (!/\.(md|yaml|yml)$/.test(entry.name)) continue
|
|
198
|
+
const mtime = statSync(full).mtimeMs
|
|
199
|
+
if (mtime < cutoff) continue
|
|
200
|
+
const content = readFileSync(full, 'utf-8')
|
|
201
|
+
if (!content.includes('author:') && !content.includes('author:')) missing.push(full)
|
|
202
|
+
if (!content.includes('created_at:') && !content.includes('created_at:')) missing.push(full)
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
walk(changesDir)
|
|
207
|
+
const unique = [...new Set(missing)]
|
|
208
|
+
if (unique.length > 0) {
|
|
209
|
+
console.log(`\n⚠️ 以下文件缺少 author 或 created_at 元数据:`)
|
|
210
|
+
unique.forEach(f => console.log(` - ${f.replace(cwd + '/', '')}`))
|
|
211
|
+
console.log('请在文件头部添加 author(git 用户名)和 created_at(精确到秒)')
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
187
215
|
function completeStep(pm, progress, stageName, cwd, outputText) {
|
|
188
216
|
const stageData = progress.stages[stageName]
|
|
189
217
|
if (!stageData || !stageData.steps) {
|
|
@@ -244,6 +272,9 @@ function completeStep(pm, progress, stageName, cwd, outputText) {
|
|
|
244
272
|
appendFileSync(inputsPath, entry)
|
|
245
273
|
}
|
|
246
274
|
|
|
275
|
+
// 验证:检查生成的文件是否包含 author 和 created_at
|
|
276
|
+
validateMetadata(cwd, stageName)
|
|
277
|
+
|
|
247
278
|
const total = steps.length
|
|
248
279
|
console.log(`✅ ${stageName} 阶段已完成(${total}/${total} 步)`)
|
|
249
280
|
if (next) {
|