@fanchao8609/agent_brain_sync 1.31.1 → 1.31.2

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/hooks/abs.pi.ts CHANGED
@@ -265,7 +265,14 @@ const TODO_GUIDELINES = [
265
265
  // ⑧ 有疑惑先查记忆(用户 2026-11-03 定):主动搜索不是等报错才应激,
266
266
  // 而是「心里形成关键词/有疑问的那一刻」自己查。上面七条只讲了登记,
267
267
  // 没讲「记下来的东西怎么取」——实测一场会话从头到尾没查过一次记忆。
268
- 'When a doubt forms about something the project has likely dealt with before (a design choice, a past bug, a convention), run `abs recall <关键词>` (or `abs query <词>` for wider matches) BEFORE acting on the assumption. Do not wait for an error or for the user to remind you — asking the memory is your own decision, made the moment the question arises.',
268
+ // ★ 2026-11-09 修:原来写的是 `abs recall`,那个命令 11-08 就删了 ——
269
+ // 规矩给成不存在的命令,模型只能白撞一次。
270
+ 'When a doubt forms about something the project has likely dealt with before (a design choice, a past bug, a convention), run `abs query <关键词>` BEFORE acting on the assumption. Do not wait for an error or for the user to remind you — asking the memory is your own decision, made the moment the question arises.',
271
+ // ⑨ 参数规矩要说在**前面**(用户 2026-11-09 提:闸门拦得住,但得先告诉模型规矩)。
272
+ // 起因:另一个 pi 会话(pi-capsule-tools)连撞两次 —— ① 不传 cwd → 被 schema 拒;
273
+ // ② 把整句话当 id → 被「id 不能含空格」拒。两次都是「没提前说」而不是「不会做」。
274
+ // 放在常驻指引里而不是只靠工具 description:description 模型常不读。
275
+ 'abs task tool parameters — wrong ones are rejected before anything is written, so get them right the first time: `cwd` = the project root that contains `.brain/` and is ALWAYS required; `id` = ONE word, no spaces / tabs / brackets (put the readable name in `note`); `start`/`add` require `note` (what to do, one sentence); `child_done` / `child_undone` / `state` take `n` = which child item (1-based, default = last); `done` takes the conclusion in `note` plus `as` (落地 / 否决 / 仅方案). A child row must keep `note` to ONE short sentence (≤200 字) — longer text goes to `abs log` (progress) or `abs note` (lessons), not the board.',
269
276
  ]
270
277
 
271
278
  /** 当前项目是否有 .brain 图谱 —— 有才加指引(没图谱的项目里这指引是噪音)。
@@ -526,7 +533,7 @@ export function injectSessionGuideline(options: any, sid: string): boolean {
526
533
  return true
527
534
  }
528
535
 
529
- /** 注入 todo 指引。静态 6 条(行为要求) + 实时看板(对齐用)—— 两者职责不同:
536
+ /** 注入 todo 指引。静态 9 条(行为要求 + 参数规矩) + 实时看板(对齐用)—— 两者职责不同:
530
537
  * 静态条说「该怎么做」,看板说「现在是什么」。 */
531
538
  export function injectTodoGuidelines(options: any, board?: string | null): boolean {
532
539
  if (String(process.env.ABS_TODO_GUIDE || '') === '0') return false
@@ -556,8 +563,8 @@ const LOAD_MARK = '[开工] '
556
563
  * 每次开会话都多塞 200 行,而其中大部分(图谱组织/容量纪律/tesardown 流程)
557
564
  * 只在真正做 abs 维护时才用得上。
558
565
  *
559
- * 与【常驻 6 条】TODO_GUIDELINES 的区别(两者职责不同,别合并):
560
- * - 6 条常驻:行为要求,每轮都在(看板对齐用)。
566
+ * 与【常驻 9 条】TODO_GUIDELINES 的区别(两者职责不同,别合并):
567
+ * - 9 条常驻:行为要求与参数规矩,每轮都在(看板对齐用)。
561
568
  * - 这 3 条:**只在开工第一轮出现一次** —— 因为它们是「开工那一刻」的触发器,
562
569
  * 每次都说等于噪音(历史教训:静态指引有痕 414 次、行为 0 变化)。
563
570
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanchao8609/agent_brain_sync",
3
- "version": "1.31.1",
3
+ "version": "1.31.2",
4
4
  "description": "agent-brain-sync: 跨会话 AI 编码记忆 — hook 纯触发 + CLI/MCP 读写 .brain markdown 图谱, 防并发写保护。",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/brain/load.js CHANGED
@@ -17,7 +17,7 @@ const SESSION_UNFILLED_SHOW = 5;
17
17
  /** 开机屏的使用方法(2026-11-08 用户定 load 三件套之一)。一行一个动作,别写成手册。 */
18
18
  const LOAD_USAGE = [
19
19
  '--- 用法 ---',
20
- '接经验 abs search <词> / abs recall 记一句 abs note "…"',
20
+ '查经验 abs query <词> 记一句 abs note "…"',
21
21
  '立概念 abs concept <id> --title "…" 登记活 abs todo start <id> --note "做什么"',
22
22
  '收尾 abs todo done <id> --as 落地|否决|仅方案 "结论"',
23
23
  '体检 abs lint 看全量 abs show index|log|status',