Skip to content

M2: 记忆 MVP(front-matter / 目录树注入 / memory_* / 可见性) #9

Closed

Description

@DoodleBears

Warning

Historical implementation; target design superseded by #114/#115 (2026-09-21). PR #22 remains delivery evidence for the old M2 MVP, but its model-visible memory_* tools, special PERSONA.md/MEMORY.md, cwd lookup and per-write contract are not the V1 target. New work uses a default real Git Memory Repository, ordinary file/Shell/grep/git capabilities, and Memory Service accepted Memory Commits.

What to build

@botharness/core 的文件记忆:记忆目录布局与 front-matter(summary/updated_at/sources/visibility/tags)读写与降级;目录树注入(≤1000 路径、折叠、可见性过滤);memory_* 文件工具(路径 jail、原子写、串行);生成的 MEMORY.md;PERSONA.md 人属注入(Agent 禁写);private 条目按 owner 可见。

git(v1.1 M6 规则):每 PersonaBot 一个 repo(覆盖记忆目录、单分支、.gitattributes 强制 LF);每次记忆写入必须携带 summary,成功后生成 commit message(summary + sources;人改 source=human)。

依据:docs/botharness.md §4(M1–M11,v1.1);ADR-0012/0013/0014;变更见 docs/changelog/2026-09-18-soulsnapshot-registry.md。

Acceptance criteria

  • front-matter 写入/解析/降级(首行摘要 + mtime),非法 YAML 不抛错
  • 目录树注入:摘要来自 front-matter;超限折叠;private 在群上下文不出现
  • 工具路径 jail(../绝对路径拒绝);原子写;同 PersonaBot 串行写(并发测试)
  • MEMORY.md 由工具生成,模型不可写
  • PERSONA.md 注入为 per-bot prompt section;工具写 PERSONA.md 被拒
  • 每次记忆写入带 summary(缺失则拒绝),成功后一个 commit(summary + sources,单分支)
  • 跨 session 可检索到彼此写入的事实(集成测试)

Blocked by

Delivered

Activity

  1. DoodleBears commented on Sep 17, 2026

    @DoodleBears
    ContributorAuthor

    规格 v1.1 更新(2026-09-18):

    1. 记忆写入必须携带 summary,作为 commit message(M6 规则)。
    2. 记忆目录 git:单分支、.gitattributes 强制 LF、每 turn 一个 commit。
    3. 阻塞解除:M1: BotHarness 骨架(core + registry + bot home + 状态事件) #8 已随 PR M1: BotHarness 骨架(core + registry + bot home + 状态事件) #13 合并。

    变更记录:docs/changelog/2026-09-18-soulsnapshot-registry.md。

  2. DoodleBears commented on Sep 17, 2026

    @DoodleBears
    ContributorAuthor

    交付细节见合并的 PR #22 与 changelog docs/changelog/2026-09-18-m2-memory-mvp.md;visibility/scope 已按 #23 移除(ADR-0021)。

  3. added a commit that references this issue on Sep 17, 2026
    a3d19fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions