sillyspec 3.11.2 → 3.11.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/run.js +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sillyspec",
3
- "version": "3.11.2",
3
+ "version": "3.11.3",
4
4
  "description": "SillySpec CLI — 流程状态机,让 AI 严格按步骤来",
5
5
  "icon": "logo.jpg",
6
6
  "homepage": "https://sillyspec.ppdmq.top/",
package/src/run.js CHANGED
@@ -144,7 +144,11 @@ function outputStep(stageName, stepIndex, steps, cwd, changeName) {
144
144
  console.log(`step: ${stepIndex + 1}/${total}`)
145
145
  console.log(`stepName: ${step.name}`)
146
146
  console.log(`project: ${projectName}`)
147
- if (changeName) console.log(`change: ${changeName}`)
147
+ if (changeName) {
148
+ console.log(`change: ${changeName}`)
149
+ const changeDir = join('.sillyspec', 'changes', changeName)
150
+ console.log(`changeDir: ${changeDir}`)
151
+ }
148
152
  console.log(`---\n`)
149
153
  if (personas[stageName]) {
150
154
  console.log(personas[stageName])
@@ -160,6 +164,11 @@ function outputStep(stageName, stepIndex, steps, cwd, changeName) {
160
164
  console.log('- 完成后立即执行 --done 命令,不得跳过')
161
165
  console.log('- 文档类型文件(.md/.yaml/.json 等)头部必须包含 author(git 用户名)和 created_at(精确到秒)')
162
166
  console.log('- 执行构建/测试前必须先读 local.yaml,优先使用其中配置的命令、路径和环境变量;未配置时才使用默认值')
167
+ // 路径安全规则:防止 AI 拼错变更目录
168
+ if (changeName) {
169
+ const changeDir = join('.sillyspec', 'changes', changeName)
170
+ console.log(`- **文件路径规则:所有变更文件必须写入 \`${changeDir}/\` 目录下。不要自己拼接路径,直接使用 changeDir 值。示例:\`${changeDir}/proposal.md\`**`)
171
+ }
163
172
  const changeFlag = changeName ? ` --change ${changeName}` : ''
164
173
  console.log(`\n### 完成后执行`)
165
174
  console.log(`sillyspec run ${stageName} --done${changeFlag} --input "用户原始需求/反馈" --output "你的摘要"`)