Skip to content

Commit f7a35c7

Browse files
authored
Merge branch 'main' into feat/tool-exposure-switches
2 parents 58d9475 + 3779059 commit f7a35c7

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎dsh-mneme/lib/guide.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const SECTION_LINES = [
2424
"3. Write back sparingly: use memory_save for durable, cross-session value — a preference, a decision with its rationale, " +
2525
"an engineering constraint, a pitfall with its root cause. Trivial single-turn work is not worth a memory.",
2626
"4. When unsure, do nothing. Not acting is a valid outcome: a useless memory is paid for by every future session.",
27-
"5. Prefer the reversible tools. memory_archive hides an entry and memory_forget only stops it being injected — both are " +
28-
"recoverable. memory_delete is permanent, so reach for it only when an entry is wrong or unwanted, not merely stale."
27+
"5. Prefer the reversible tools. memory_archive hides an entry from lists, search, injection and consolidation, and " +
28+
"memory_forget suppresses it from injection, search results and lists — both are recoverable. memory_delete is permanent, " +
29+
"so reach for it only when an entry is wrong or unwanted, not merely stale."
2930
];
3031

3132
/** 系统提示段(order 150)的总则文本。常量:同会话内稳定是硬约束。 */
@@ -39,5 +40,5 @@ export const TOOL_GUIDE = {
3940
"Skip it for facts you can read directly from the repository.",
4041
memory_save:
4142
" Save only durable, cross-session value (a preference, a decision with its rationale, an engineering constraint, " +
42-
"a pitfall with its root cause). Trivial single-turn work does not belong here, and when unsure it is correct to save nothing."
43+
"a pitfall with its root cause). Trivial single-turn work does not belong here, and when unsure, do not save."
4344
};

‎dsh-mneme/src/guide.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const SECTION_LINES = [
2424
"3. Write back sparingly: use memory_save for durable, cross-session value — a preference, a decision with its rationale, " +
2525
"an engineering constraint, a pitfall with its root cause. Trivial single-turn work is not worth a memory.",
2626
"4. When unsure, do nothing. Not acting is a valid outcome: a useless memory is paid for by every future session.",
27-
"5. Prefer the reversible tools. memory_archive hides an entry and memory_forget only stops it being injected — both are " +
28-
"recoverable. memory_delete is permanent, so reach for it only when an entry is wrong or unwanted, not merely stale."
27+
"5. Prefer the reversible tools. memory_archive hides an entry from lists, search, injection and consolidation, and " +
28+
"memory_forget suppresses it from injection, search results and lists — both are recoverable. memory_delete is permanent, " +
29+
"so reach for it only when an entry is wrong or unwanted, not merely stale."
2930
];
3031

3132
/** 系统提示段(order 150)的总则文本。常量:同会话内稳定是硬约束。 */
@@ -39,5 +40,5 @@ export const TOOL_GUIDE = {
3940
"Skip it for facts you can read directly from the repository.",
4041
memory_save:
4142
" Save only durable, cross-session value (a preference, a decision with its rationale, an engineering constraint, " +
42-
"a pitfall with its root cause). Trivial single-turn work does not belong here, and when unsure it is correct to save nothing."
43+
"a pitfall with its root cause). Trivial single-turn work does not belong here, and when unsure, do not save."
4344
};

‎dsh-mneme/test/inject-pools.test.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ test("#249: capability guide is off by default, registered once when on", () =>
134134
// 不可逆工具(memory_delete)的克制指引必须在场:这是全 guide 里唯一有数据
135135
// 损失后果的一句,被误删掉的回归要能立刻转红。
136136
assert.ok(MEMORY_GUIDE_SECTION.includes("memory_delete"), "guide keeps the irreversible-tool warning");
137+
// memory_forget 的副作用面同样不能被写窄:工具描述是「挡注入 + 从检索与列表里
138+
// 消失」,只写「只挡注入」会让模型低估它(#249 文案定稿时专门改过这一句)。
139+
assert.ok(
140+
MEMORY_GUIDE_SECTION.includes("memory_forget suppresses it from injection, search results and lists"),
141+
"reversible-tools rule states memory_forget's full reach"
142+
);
137143
// 优先序那条不得让模型拿 memory_search 去核对当前指令/仓库:它只搜记忆库,
138144
// 搜不到「现在」——把它写成验证手段会换来一轮无效查询 + 继续采信陈旧记忆。
139145
assert.ok(

0 commit comments

Comments
 (0)