feat(FN-1022): add project memory bootstrap with agent integration
- Add project-memory module in @fusion/core with read/write/resolve helpers and upsert-on-store hook - Bootstrap project memory during task creation (store) with structured task context - Inject resolved project memory into executor and triage agent system prompts - Add comprehensive tests for project-memory module, store integration, and agent prompt changes - Document project memory architecture and usage in README
This commit is contained in:
@@ -217,7 +217,7 @@ describe("buildSpecificationPrompt", () => {
|
||||
});
|
||||
|
||||
describe("memoryEnabled setting", () => {
|
||||
it("accepts memoryEnabled: true without error", () => {
|
||||
it("includes memory instructions when memoryEnabled: true", () => {
|
||||
const settings: Settings = {
|
||||
maxConcurrent: 2,
|
||||
maxWorktrees: 4,
|
||||
@@ -231,11 +231,12 @@ describe("buildSpecificationPrompt", () => {
|
||||
".fusion/tasks/KB-001/PROMPT.md",
|
||||
settings,
|
||||
);
|
||||
// Memory instructions are a placeholder until FN-810; just verify no crash
|
||||
expect(prompt).toContain("Specify this task");
|
||||
expect(prompt).toContain("## Project Memory");
|
||||
expect(prompt).toContain(".fusion/memory.md");
|
||||
});
|
||||
|
||||
it("accepts memoryEnabled: false without error", () => {
|
||||
it("excludes memory instructions when memoryEnabled: false", () => {
|
||||
const settings: Settings = {
|
||||
maxConcurrent: 2,
|
||||
maxWorktrees: 4,
|
||||
@@ -250,15 +251,18 @@ describe("buildSpecificationPrompt", () => {
|
||||
settings,
|
||||
);
|
||||
expect(prompt).toContain("Specify this task");
|
||||
expect(prompt).not.toContain("## Project Memory");
|
||||
});
|
||||
|
||||
it("accepts undefined memoryEnabled (default enabled) without error", () => {
|
||||
it("includes memory instructions when memoryEnabled is undefined (default enabled)", () => {
|
||||
const prompt = buildSpecificationPrompt(
|
||||
baseTask,
|
||||
".fusion/tasks/KB-001/PROMPT.md",
|
||||
undefined,
|
||||
);
|
||||
expect(prompt).toContain("Specify this task");
|
||||
expect(prompt).toContain("## Project Memory");
|
||||
expect(prompt).toContain(".fusion/memory.md");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user