mirror of
https://github.com/sdwolf4103/opencode-working-memory.git
synced 2026-06-02 06:19:36 +02:00
ff4639d153
## Task 5: Canonical exact dedupe - Already implemented in PR-1 with enforceLongTermLimits() - Source priority: explicit > manual > compaction - Same source: higher confidence wins ## Task 6: Structured negative guard - Add isNegatedMemoryRequest() for adjacency detection - "不要記住" / "don't remember" are now properly ignored - "not forget to remember" no longer false positive (not a directive) - Restrict patterns to line-start (^|\n) to avoid mid-sentence matches ## Task 7: Compaction quality gate - Add shouldAcceptWorkspaceMemoryCandidate() predicate - Reject low-quality candidates: git hashes, errors, stack traces - Reject temporary progress, code signatures, path-heavy facts - Only accept entries with >= 20 chars ## Pattern improvements - All patterns use matchAll() with proper g flag - Dedupe by canonical text in extractExplicitMemories() - Line-start anchor prevents "to remember" mid-sentence matches - Add more trigger patterns: save/add to memory, commit to memory Tests: 36 passing