mirror of
https://github.com/sdwolf4103/opencode-working-memory.git
synced 2026-07-17 12:56:42 +02:00
feat: sharpen compaction memory extraction prompt
Wave 3 of memory quality optimization plan. - Add good memory examples in buildCompactionPrompt() - Add bad memory examples to skip (test counts, commit hashes, etc.) - Add prompt assertions in tests to prevent regression - Emphasize 'useful if a new agent opens this workspace next week'
This commit is contained in:
@@ -275,6 +275,14 @@ test("compaction hook sets output.prompt with ---free template", async () => {
|
||||
// Should contain Memory candidates format
|
||||
assert.equal(prompt!.includes("Memory candidates:"), true,
|
||||
"Prompt should include Memory candidates: label");
|
||||
assert.equal(prompt!.includes("Good memory examples:"), true,
|
||||
"Prompt should include concrete positive memory examples");
|
||||
assert.equal(prompt!.includes("Bad memory examples to skip:"), true,
|
||||
"Prompt should include concrete negative memory examples");
|
||||
assert.equal(prompt!.includes("42 tests passed"), true,
|
||||
"Prompt should explicitly reject test-count snapshots");
|
||||
assert.equal(prompt!.includes("commit 4309cb8"), true,
|
||||
"Prompt should explicitly reject commit-hash snapshots");
|
||||
|
||||
// Should contain our context data (hot session state)
|
||||
assert.equal(prompt!.includes("Hot session state"), true,
|
||||
|
||||
Reference in New Issue
Block a user