brain-save
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrain Save
Brain 保存
Persist session context — decisions, progress, plans, implementation details — to the Claude Brain Logseq graph for cross-session and cross-device continuity.
将会话上下文——包括决策、进展、计划、实现细节——持久化到Claude Brain Logseq图谱中,以实现跨会话和跨设备的连续性。
Prerequisites
前置条件
Resolve the graph path per .
skills/_shared/path-resolution.md按照中的规则解析图谱路径。
skills/_shared/path-resolution.mdWhat to Save
保存内容分类
Six categories — see for each one's format and rules. The orchestrator decides which apply based on what the session covered:
references/categories.md- Session Log Entry (always)
- Decisions (when made — see for conflict + cross-project rules)
references/decisions.md - Plan Updates (when plans changed — replace, don't append)
- Implementation Details (when significant)
- Jira Task Context (when tasks were worked on — store pointers, not full plans)
- User Preferences & Meta (when newly discovered — update )
pages/Meta.md
共六大类——每个类别的格式和规则请参考。编排器会根据会话涉及的内容决定适用哪些类别:
references/categories.md- 会话日志条目(必选)
- 决策内容(当做出决策时——冲突处理及跨项目规则请参考)
references/decisions.md - 计划更新(当计划变更时——替换而非追加)
- 实现细节(当内容较为重要时)
- Jira任务上下文(当处理任务时——仅存储指针,不保存完整计划)
- 用户偏好与元数据(当发现新内容时——更新)
pages/Meta.md
Save Process
保存流程
-
Identify target project(s). Look for project names mentioned, files/repos discussed, or explicit user statements ("we're working on X"). If multiple projects, save to each. If unclear, ask: "This touched [X] and [Y] — save to both?"
-
Verify project page exists. Glob for. If missing:
pages/Projects___<ProjectName>.md- Tell user: "No project page found for [name]. Want me to create one first?"
- If yes, hand off to "Adding a New Project" flow, then continue.
brain-init - If no, list available projects and let the user pick.
- Never write session data to a non-existent project page.
-
Read the current project page selectively using the section-targeted-read pattern in. Read only the sections you'll touch (Session Log, Decisions, Current Plan, Implementation) — never the whole file. The read serves two purposes: detect duplicates before appending, and provide enough surrounding lines for the Edit
skills/_shared/section-locator.mdto be unique.old_string -
Prepare the updates for each applicable category from.
references/categories.md -
Write the updates using the Edit tool — surgical updates per section, never rewrite the whole page:
- Append to Session Log
- Append to Decisions (with conflict check per )
references/decisions.md - Replace Current Plan if changed
- Update Implementation if needed
- Update to today's date
last-updated::
-
Update the journal —. Append a rich cross-reference to today's
## Sessions:journals/yyyy_MM_dd.mdmarkdown- ## Sessions - [[Projects/ProjectName]]: Brief summary of session -
Updateif new user preferences emerged (see
pages/Meta.mdcategory 6).references/categories.md -
Updateif a project status changed or new cross-project info emerged.
pages/Index.md -
Write a journey-log entry perwith activity line:
skills/_shared/journey-log.md.saved [[Projects/<ProjectName>]] -
Confirm to the user in plain language what was saved. List each thing written.
-
确定目标项目。查找提及的项目名称、讨论的文件/仓库,或用户明确说明的内容(如"我们正在处理X项目")。如果涉及多个项目,需分别保存。若不明确,询问用户:"本次会话涉及[X]和[Y]——是否要保存到两个项目中?"
-
验证项目页面是否存在。全局查找文件。若不存在:
pages/Projects___<ProjectName>.md- 告知用户:"未找到[name]项目的页面。是否需要先创建该页面?"
- 若用户同意,移交至的"添加新项目"流程,之后继续保存操作。
brain-init - 若用户不同意,列出可用项目供用户选择。
- 禁止将会话数据写入不存在的项目页面。
-
选择性读取当前项目页面,使用中的分段读取模式。仅读取需要修改的章节(会话日志、决策、当前计划、实现细节)——切勿读取整个文件。读取操作有两个目的:追加前检测重复内容,以及为编辑工具提供足够的上下文行以确保
skills/_shared/section-locator.md的唯一性。old_string -
根据中的适用类别准备更新内容。
references/categories.md -
使用编辑工具写入更新内容——仅对各章节进行精准更新,切勿重写整个页面:
- 追加至会话日志章节
- 追加至决策章节(需按照进行冲突检查)
references/decisions.md - 若计划变更则替换当前计划章节
- 必要时更新实现细节章节
- 将更新为当前日期
last-updated::
-
更新日志——章节。在当日的
## Sessions文件中追加一个带交叉引用的条目:journals/yyyy_MM_dd.mdmarkdown- ## Sessions - [[Projects/ProjectName]]: 会话简要总结 -
若发现新的用户偏好,更新(参考
pages/Meta.md第6类)。references/categories.md -
若项目状态变更或出现新的跨项目信息,更新。
pages/Index.md -
按照的要求写入操作日志条目,活动行内容为:
skills/_shared/journey-log.md。saved [[Projects/<ProjectName>]] -
用简洁语言向用户确认保存内容,列出所有已写入的内容。
Auto-Suggest Save
自动建议保存
See . Suggestion only — never auto-save.
references/auto-suggest.md参考。仅提供建议——切勿自动保存。
references/auto-suggest.mdImportant Notes
重要注意事项
- Edit tool for surgical updates only. Never rewrite a whole page (sync conflicts).
- All content in bullet-point format. See for Logseq invariants.
CLAUDE.md - When appending, place new entries at the end of the section, before the next heading.
## - If doesn't exist, create it (Bash
journals/) before writing the journal entry.mkdir -p
- 编辑工具仅用于精准更新。切勿重写整个页面(避免同步冲突)。
- 所有内容均采用项目符号格式。Logseq的固定规则请参考。
CLAUDE.md - 追加内容时,将新条目放在章节末尾、下一个标题之前。
## - 若目录不存在,写入日志条目前需先创建该目录(使用Bash命令
journals/)。mkdir -p