feat(FN-2133): standardize project memory path guidance to .fusion/memory/
- Update executor, reviewer, core prompt templates, and path-boundary messaging to reference the .fusion/memory/ directory instead of a single MEMORY.md file - Broaden worktree boundary checks in pi path validation to allow .fusion/memory/ directory access from task worktrees - Align memory backend metadata and dashboard backend labels to display file backend storage as .fusion/memory/ - Refresh core/engine tests to assert the new directory-based memory wording and boundary behavior
This commit is contained in:
@@ -154,7 +154,7 @@ describe("resolveAgentPrompt", () => {
|
||||
|
||||
it("built-in executor prompt mentions memory exception", () => {
|
||||
const result = resolveAgentPrompt("executor");
|
||||
expect(result).toContain(".fusion/memory/MEMORY.md");
|
||||
expect(result).toContain(".fusion/memory/");
|
||||
});
|
||||
|
||||
it("built-in executor prompt mentions attachments exception", () => {
|
||||
@@ -183,7 +183,7 @@ describe("resolveAgentPrompt", () => {
|
||||
};
|
||||
|
||||
const result = resolveAgentPrompt("executor", config);
|
||||
expect(result).toContain(".fusion/memory/MEMORY.md");
|
||||
expect(result).toContain(".fusion/memory/");
|
||||
});
|
||||
|
||||
it("senior-engineer prompt mentions attachments exception", () => {
|
||||
|
||||
@@ -108,7 +108,7 @@ model, read-only access) to independently assess your work.
|
||||
You are running in an **isolated git worktree**. This means:
|
||||
|
||||
- **All code changes must be made inside the current worktree directory.** Do not modify files outside the worktree — the worktree is your isolated execution environment.
|
||||
- **Exception — Project memory:** You MAY read and write to .fusion/memory/MEMORY.md at the project root to save durable project learnings (architecture patterns, conventions, pitfalls).
|
||||
- **Exception — Project memory:** You MAY read and write to files under .fusion/memory/ at the project root to save durable project learnings (architecture patterns, conventions, pitfalls).
|
||||
- **Exception — Task attachments:** You MAY read files under .fusion/tasks/{taskId}/attachments/ at the project root for context screenshots and documents attached to this task.
|
||||
- **Shell commands** run inside the worktree by default. Avoid using cd to navigate outside the worktree.
|
||||
|
||||
@@ -519,7 +519,7 @@ model, read-only access) to independently assess your work.
|
||||
You are running in an **isolated git worktree**. This means:
|
||||
|
||||
- **All code changes must be made inside the current worktree directory.** Do not modify files outside the worktree — the worktree is your isolated execution environment.
|
||||
- **Exception — Project memory:** You MAY read and write to .fusion/memory/MEMORY.md at the project root to save durable project learnings (architecture patterns, conventions, pitfalls).
|
||||
- **Exception — Project memory:** You MAY read and write to files under .fusion/memory/ at the project root to save durable project learnings (architecture patterns, conventions, pitfalls).
|
||||
- **Exception — Task attachments:** You MAY read files under .fusion/tasks/{taskId}/attachments/ at the project root for context screenshots and documents attached to this task.
|
||||
- **Shell commands** run inside the worktree by default. Avoid using cd to navigate outside the worktree.
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ describe("memory-backend", () => {
|
||||
|
||||
it("should have human-readable name", () => {
|
||||
const backend = new FileMemoryBackend();
|
||||
expect(backend.name).toBe("File (.fusion/memory/MEMORY.md)");
|
||||
expect(backend.name).toBe("File (.fusion/memory/)");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ const backendRegistry = new Map<string, MemoryBackend>();
|
||||
*/
|
||||
export class FileMemoryBackend implements MemoryBackend {
|
||||
readonly type = "file";
|
||||
readonly name = "File (.fusion/memory/MEMORY.md)";
|
||||
readonly name = "File (.fusion/memory/)";
|
||||
readonly capabilities: MemoryBackendCapabilities = {
|
||||
readable: true,
|
||||
writable: true,
|
||||
|
||||
@@ -1276,15 +1276,15 @@ export interface ProjectSettings {
|
||||
* Extraction only runs if BOTH this time has elapsed AND memory has grown
|
||||
* by more than MIN_INSIGHT_GROWTH_CHARS characters. Default: 86400000 (24h). */
|
||||
insightExtractionMinIntervalMs?: number;
|
||||
/** When enabled, agents will consult and update .fusion/memory/MEMORY.md with durable
|
||||
/** When enabled, agents will consult and update files under .fusion/memory/ with durable
|
||||
* project learnings. When disabled, agents will not include memory instructions
|
||||
* in their prompts and will not read or write to .fusion/memory/MEMORY.md.
|
||||
* in their prompts and will not read or write to .fusion/memory/ files.
|
||||
* Default: true (enabled for backward compatibility). */
|
||||
memoryEnabled?: boolean;
|
||||
/** Memory backend type for pluggable memory storage.
|
||||
* Available built-in backends:
|
||||
* - "qmd": QMD (Quantized Memory Distillation) backend using the qmd CLI tool (default)
|
||||
* - "file": File-based backend storing memory in `.fusion/memory/MEMORY.md`
|
||||
* - "file": File-based backend storing memory in `.fusion/memory/`
|
||||
* - "readonly": Read-only backend that returns empty memory (for external management)
|
||||
* - Any registered custom backend type
|
||||
* Default: "qmd" */
|
||||
|
||||
Reference in New Issue
Block a user