chore: memory-sync — 归档 memcore 三项优化决策
新增三条架构决策:
- synonyms.md 作为独立等价词表文件(type: reference)
- synthesis 三触发分工:快扫 vs 精扫的职责边界
- memory-sync Phase 0 冲突检测必须先于 git commit
更新 project_overview.md:memcore 插件描述补充新能力说明
刷新 MEMORY.md 索引锚点至 f26e741
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f26e741b0e
commit
4bf58796cf
@@ -2,8 +2,8 @@
|
||||
name: 架构决策
|
||||
description: Marketplace 设计中的关键技术决策及其原因
|
||||
type: project
|
||||
last_updated: 2026-05-08
|
||||
commit: 9c91382
|
||||
last_updated: 2026-05-10
|
||||
commit: f26e741
|
||||
---
|
||||
|
||||
# 关键架构决策
|
||||
@@ -63,6 +63,38 @@ commit: 9c91382
|
||||
|
||||
---
|
||||
|
||||
## memcore:synonyms.md 作为独立等价词表文件
|
||||
|
||||
**结论**:等价表述清单以独立的 `synonyms.md`(`type: reference`)存放于 `.claude/memory/`,而非内嵌到 feedback.md。
|
||||
|
||||
**Why**:feedback.md 存放协作规范(含 Why + How to apply),语义上属于"决策";synonyms.md 是纯配置数据,在 lint Phase 4 矛盾检测前作为输入加载。两者职责不同,混放会让 lint 的加载逻辑复杂化。`type: reference` 符合"外部参考资料"语义,且该类型已在 frontmatter 枚举中。
|
||||
|
||||
**How to apply**:新建项目记忆体系时,若项目有领域专有术语缩写(如 PG/PostgreSQL、KT/Kotlin),在 `.claude/memory/synonyms.md` 中维护等价组(每行逗号分隔)。幽灵检测自动排除该文件,不纳入 MEMORY.md 索引。
|
||||
|
||||
**See Also**:[[decisions.md#memcore memory-update/lint 路径锁定:禁止写入系统自动记忆路径]]
|
||||
|
||||
---
|
||||
|
||||
## memcore:synthesis 三触发分工——快扫 vs 精扫
|
||||
|
||||
**结论**:synthesis 升级触发拆为三路:A 会话内主动、B Phase 3C 即时快扫(每次 memory-update 必跑)、C lint Top 反向触发(月度运行)。
|
||||
|
||||
**Why**:原双触发中,B 路径依赖 lint 生成 `lint_report.md` 的「条目级高频引用 Top」段,短会话或任务型对话中 lint 常被跳过,导致高频引用条目长期未升级为 synthesis。Phase 3C 快扫在每次 memory-update 结束时强制执行,覆盖短会话盲区;lint 精扫按源文件去重计数,用于月度深度检查。两者以 `**Synthesized:**` 标记作为唯一判重依据,不重复创建文件。
|
||||
|
||||
**How to apply**:实现新的 memory-update 类技能时,引用计数类检查应分"即时快扫"和"月度精扫"两档,分别对应"覆盖率"和"准确率"的不同优先级。
|
||||
|
||||
---
|
||||
|
||||
## memcore memory-sync:冲突检测必须先于 git commit
|
||||
|
||||
**结论**:memory-sync Phase 0 重构为两步:Step 1 冲突优先检测(`diff --diff-filter=U`)→ Step 2 普通变更提交。冲突语义合并完成后才允许 commit,再进入 Phase 1。
|
||||
|
||||
**Why**:原设计中 Phase 0 先执行 `git add + commit`,Phase 0.5 才检测冲突。若文件存在 git merge conflict markers,`git commit` 会静默失败(git 拒绝提交含冲突标记的文件),整个 sync 流程进入不确定状态且无明显报错。改为"先检测再提交"消除了这条静默失败路径。
|
||||
|
||||
**How to apply**:设计任何含"检测 + 操作"两步的流程时,检测必须先于操作,且检测结果应作为操作的前置条件,而非事后处理。
|
||||
|
||||
---
|
||||
|
||||
## SKILL.md frontmatter 只保留 name 和 description
|
||||
|
||||
**结论**:SKILL.md frontmatter 只写 `name` 和 `description` 两个字段,去掉 `version`。
|
||||
|
||||
Reference in New Issue
Block a user