memory-bank-skill 5.0.0 → 5.1.0
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
CHANGED
package/plugin/memory-bank.ts
CHANGED
|
@@ -228,13 +228,20 @@ async function buildMemoryBankContextWithMeta(projectRoot: string): Promise<Memo
|
|
|
228
228
|
`Read more files from \`memory-bank/\` as needed based on the task.\n\n` +
|
|
229
229
|
`**AI 行为指令**:\n` +
|
|
230
230
|
`- 每次回复末尾加一行确认:\`| 📚 Memory Bank | ${fileList} (${totalChars.toLocaleString()} chars) |\`\n` +
|
|
231
|
+
`- **文档驱动开发(核心原则)**:\n` +
|
|
232
|
+
` - 方案讨论完成后,**先写设计文档到 memory-bank/docs/,再写代码**\n` +
|
|
233
|
+
` - 设计文档是契约,代码实现要符合文档\n` +
|
|
234
|
+
` - 实现完成后回顾:如有偏差,决定是改文档还是改实现\n` +
|
|
231
235
|
`- **写入触发场景**(语义判断,非关键词匹配):\n` +
|
|
236
|
+
` - 方案讨论确定(\"那就这样吧\"、\"OK就这么做\"、\"方案确定\")→ **先写** memory-bank/docs/design-xxx.md\n` +
|
|
232
237
|
` - 用户描述新功能/需求(\"我需要...\"、\"能不能加...\"、\"帮我做...\"、\"要实现...\")→ requirements/\n` +
|
|
233
238
|
` - 用户做出技术选型(\"我们用 X 吧\"、\"决定采用...\"、\"选择...\")→ patterns.md\n` +
|
|
234
239
|
` - 修复了 bug 或踩坑经验(\"原来问题是...\"、\"这个坑是...\"、\"发现...\")→ learnings/\n` +
|
|
235
240
|
` - AI 修改了代码/配置文件 → active.md(如涉及 bug 修复则同时 learnings/)\n` +
|
|
236
241
|
` - 当前任务完成,焦点切换 → active.md\n` +
|
|
237
|
-
|
|
242
|
+
`- **Todo 创建规则(必须)**:\n` +
|
|
243
|
+
` - 方案讨论完成后开始落地:第一项必须是\"写入设计文档到 memory-bank/docs/\"\n` +
|
|
244
|
+
` - 最后一项必须是\"更新 Memory Bank\"(检查触发场景并更新相应文件)\n\n` +
|
|
238
245
|
`---\n\n`
|
|
239
246
|
|
|
240
247
|
const wrapped =
|
|
@@ -271,13 +271,19 @@ Files updated:
|
|
|
271
271
|
└─ 按预算限制加载
|
|
272
272
|
|
|
273
273
|
5. 处理用户请求
|
|
274
|
+
└─ **文档驱动开发原则**:
|
|
275
|
+
- 方案讨论确定后 → 先写 memory-bank/docs/design-xxx.md,再写代码
|
|
276
|
+
- 设计文档是契约,代码要符合文档
|
|
277
|
+
- 实现完成后回顾:如有偏差,决定改文档还是改实现
|
|
274
278
|
└─ 创建 todo 时:
|
|
279
|
+
- 方案讨论完成后开始落地 → 第一项是"写入设计文档到 memory-bank/docs/"
|
|
275
280
|
- 已有 memory-bank/ → 最后一项必须是"更新 Memory Bank"
|
|
276
281
|
- 没有 memory-bank/ → 第一项是"初始化 Memory Bank",最后一项是"更新 Memory Bank"
|
|
277
282
|
└─ 正常工作
|
|
278
283
|
|
|
279
284
|
6. 执行"更新 Memory Bank" todo 时
|
|
280
285
|
└─ 检查触发场景:
|
|
286
|
+
- 方案讨论确定 → 创建 memory-bank/docs/design-xxx.md
|
|
281
287
|
- 修改了代码/配置文件 → 更新 active.md
|
|
282
288
|
- 修复了 bug / 踩坑经验 → 创建 learnings/xxx.md
|
|
283
289
|
- 做了技术决策 → 追加 patterns.md
|