Skip to content

docs(directories): 目录归属总账——「哪个目录是什么」一处可查(#278) - #624

Open
modusensus wants to merge 2 commits into
mainfrom
docs/278-directory-ownership
Open

modusensus wants to merge 2 commits into
mainfrom
docs/278-directory-ownership

Conversation

@modusensus

@modusensus modusensus commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

对应 #278 的第 3 子项(目录归属文档)。按 issue 2026-10-20 楼的接手建议拆批:迁出路径与统一导出是大活,各自单独立项;本 PR 只收「最容易先做且收益最高」的文档——它防的是 #278 里真实踩过的误解(把 ~/.dsh/mneme 模型缓存当成记忆库)。

改了什么

  • dsh-mneme/docs/DIRECTORIES.md(新,114 行):目录归属总账。开篇钉死三个相似名——~/.dsh/memory(记忆库正本 + 镜像 + 候选/提议/观察/日记/文档目录)、~/.dsh/mneme(模型与运行时缓存,不是记忆库,可整目录删掉重来)、~/.dsh-mneme(CLI 连接配置)。每个落点标拥有者(人改 / 机器写 / 外部只读)与出处文件,另附「删了会怎样」速查、七个路径配置键的 ~ 展开规则差异(memoryDir 一族展开、模型/运行时一族不展开)、已知坑五条(含 memoryDir 落 profiles/ 丢库、documents.md ≠ documents/、<workspace>/.mneme/ 记忆投影不存在的澄清)。
  • 索引四处:README 中英两张文档表、AGENTS.md 模块地图各加一行;CONFIGURATION.md 路径键处反链;CHANGELOG [Unreleased] 补条目。

边界(刻意不做)

验证

  • euthyna audit(base 514d238,首提交与瘦身提交后各一次)exit 0、零安全事实:相对 base 为纯新增 diff(5 files, +121/−0),无删除行可归属。
  • 文档 63 项事实断言逐条对码核验(目录路径、镜像十文件名、拥有者注释、分桶结构、路径键展开规则、文档引用的源文件存在性、无本机私有信息;全部以 grep / 文件存在性判定,不信转述):63/63 PASS,瘦身提交后复跑仍 63/63。核验抓出并修复 1 处归属张冠李戴——初稿把 T1 的写路径保证写成 assertInsideChoro,实际该函数只在 src/wiki/t0.js:453,T1 是独立的越界拒收(src/wiki/t1.js:480 抛 write-outside-chorography)。
  • 另过一轮复杂度评审(只管冗余,不管正确性):9 条 finding 已落进 a5ec132——重复表述收敛到唯一出处、mirror 设计 lore 归还代码注释、已知坑 6→5 条,净 −5 行;每条删除都以「事实仍在唯一出处」为前提,删后 63 项核验复跑全绿。
  • euthyna gate 校验审计报告:exit 0。
  • npm test 全量 3154 / 3153 pass / 0 fail / 1 skip(与 main 基线一致,瘦身前后各跑一次)。
  • 审计报告 MNEME_EUTHYNA_AUDIT_DOCS_2026-11-10.md 留存于仓库外,不随本 PR 提交。

已核现状:README、CHANGELOG、dsh-mneme/docs/ 既有域文档(含 #278 第一批已落地的 mirror 扩容与 #296 的 documents.md)、#278 全楼评论。

#278 拆出的第 3 子项(最容易先做、防真实踩过的坑):把散在注释里的
「哪个目录是什么」收成 dsh-mneme/docs/DIRECTORIES.md 一处总账。

- 开篇钉死三个相似名:~/.dsh/memory(记忆库正本 + 镜像 + 候选/提议/
  观察/日记/文档目录)、~/.dsh/mneme(模型与运行时缓存,不是记忆库,
  可整删重来)、~/.dsh-mneme(CLI 连接配置)——把模型缓存当成记忆库
  是 issue 里真实发生过的误解
- 每个落点标拥有者(人改 / 机器写 / 外部只读)与出处文件;镜像十个
  文件名、documents.md 只读指针视图、candidates/proposals/observations
  分桶、diaries 三件、documents/ 双所有权(index.md 机器所有、其余
  agent 所有)逐一入账
- 附「删了会怎样」速查、七个路径配置键的 ~ 展开规则差异(memoryDir
  一族展开、模型/运行时一族不展开)、已知坑六条(含 profiles/ 丢库
  与 <workspace>/.mneme/ 记忆投影不存在的澄清)
- 索引:README 中英文档表、AGENTS.md 模块地图各加一行,
  CONFIGURATION.md 反链

纯文档改动:src/lib 零变化,无需 sync;全量测试 3154/3153 通过。
#278 另两个子项(~/.dsh 迁出、统一导出)按 issue 建议拆批另做。
Copilot AI lite review requested due to automatic review settings November 9, 2026 19:07
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 514d238 and a5ec132.

Files selected for processing: 5

  • AGENTS.md
  • README.md
  • dsh-mneme/CHANGELOG.md
  • dsh-mneme/docs/CONFIGURATION.md
  • dsh-mneme/docs/DIRECTORIES.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

9 条 finding 全落:已知坑 #1/#3/#5 只留各自动出处(开篇定论 L5、
删了会怎样表、记忆库正文),MIRROR_EXCLUDED_TYPES 盲区纪律归还
mirror.js 注释与 mirror-types.test.js,memoryDir 独行段并进记忆库
节首、分隔线收掉,WAL 半句还 CONFIGURATION.md,两处链接括注去重。
已知坑 6→5 条。

验证:63 项文档事实断言核验复跑 63/63 PASS;npm test 全量
3154/3153 通过。
Copilot AI lite review requested due to automatic review settings November 9, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants