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:
gsxdsm
2026-04-07 00:41:19 -07:00
parent c4a0da027e
commit 92b516e5fa
10 changed files with 566 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ import type {
TaskAttachment,
Settings,
} from "@fusion/core";
import { buildTriageMemoryInstructions } from "@fusion/core";
import type { ImageContent } from "@mariozechner/pi-ai";
import { Type, type Static } from "@mariozechner/pi-ai";
import type {
@@ -1252,13 +1253,10 @@ export function buildSpecificationPrompt(
// Build project memory section from settings.
// When enabled, agents consult .fusion/memory.md for durable project learnings.
// Actual memory instructions will be injected by FN-810; this placeholder
// establishes the conditional integration point.
const memoryEnabled = settings?.memoryEnabled !== false;
let memorySection = "";
if (memoryEnabled) {
// TODO(FN-810): Call buildMemoryInstructions(rootDir) to populate memory context
memorySection = "";
memorySection = "\n\n" + buildTriageMemoryInstructions("");
}
let attachmentsSection = "";