From f3508b93d60ca63b746c4aa52df1a5cbe4e78081 Mon Sep 17 00:00:00 2001 From: PSBigBig Date: Wed, 27 Aug 2025 15:17:22 +0800 Subject: [PATCH] Create pattern_memory_namespace_split.md --- .../pattern_memory_namespace_split.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ProblemMap/GlobalFixMap/Agents_Orchestration/patterns/pattern_memory_namespace_split.md diff --git a/ProblemMap/GlobalFixMap/Agents_Orchestration/patterns/pattern_memory_namespace_split.md b/ProblemMap/GlobalFixMap/Agents_Orchestration/patterns/pattern_memory_namespace_split.md new file mode 100644 index 00000000..a5e156c5 --- /dev/null +++ b/ProblemMap/GlobalFixMap/Agents_Orchestration/patterns/pattern_memory_namespace_split.md @@ -0,0 +1,23 @@ +# Pattern: Memory Namespace Split + +**Problem** +Agents overwrite or re-assert stale facts after refresh. Different tools write to the same memory without fences. + +**When to use** +Any multi-agent or tool-rich pipeline where memories persist across runs or threads. + +**Recipe** +1) Create namespaces per role or tool: `agent/`, `tool/`, `session/`. +2) Stamp every write with `mem_rev` and `mem_hash`. +3) Read policy: prefer `session` then `agent` then `tool`. +4) Write policy: do not merge across namespaces without a reducer function. +5) Gate responses when `mem_rev` is older than the current `index_hash` snapshot. + +**Acceptance** +- No stale fact re-entry in three paraphrase tests. +- λ stays convergent before and after memory refresh. + +**Related fixes** +- [Multi-Agent Problems](https://github.com/onestardao/WFGY/blob/main/ProblemMap/Multi-Agent_Problems.md) +- [Data Contracts](https://github.com/onestardao/WFGY/blob/main/ProblemMap/data-contracts.md) +- [Retrieval Traceability](https://github.com/onestardao/WFGY/blob/main/ProblemMap/retrieval-traceability.md)