feat(FN-4063): enforce planning and triage memory write contracts

Enforces memory write contracts for triage and planning agents, adding tests in both `project-memory.test.ts` and `triage.test.ts` to guard the contract boundaries established in `project-memory.ts`.

Fusion-Task-Id: FN-4063

Fusion-Task-Lineage: 5f86295b-d583-4757-9aa5-30a64b2cc2d6
This commit is contained in:
Fusion
2026-05-11 20:40:30 -07:00
committed by gsxdsm
parent 1f7958fc0f
commit 0056b85668
4 changed files with 21 additions and 1 deletions

View File

@@ -374,6 +374,10 @@ This project has OpenClaw-style memory files:
2. Use \`fn_memory_get\` only for specific memory files/line ranges returned by search
3. Incorporate relevant learnings into your specification — reference actual patterns, constraints, and conventions documented there
**Memory write contract for planning agents:**
- If you need to save durable planning context, use \`fn_memory_append\` (choose scope/layer intentionally)
- Do **not** write \`.fusion/memory/MEMORY.md\`, \`.fusion/memory/YYYY-MM-DD.md\`, or any other memory files directly when \`fn_memory_append\` is available
Do not read all memory directly by default. If memory is irrelevant, skip it.
`;
}
@@ -389,6 +393,10 @@ This project has a memory system that stores durable project learnings.
2. Use \`fn_memory_get\` only for specific memory files/line ranges returned by search
3. Incorporate useful learnings into your specification
**Memory write contract for planning agents:**
- If you need to save durable planning context, use \`fn_memory_append\` (choose scope/layer intentionally)
- Do **not** write memory files directly when \`fn_memory_append\` is available
**If the memory contains useful context for this task, reference it in the specification.**
`;
}