Company Memory Reliability Bundle 1 Report

Date: June 8, 2026. Scope: chat-to-knowledge capture, wiki provenance, metadata preservation, and provider-free explicit memory extraction.

Implementation
Done
API Tests
17/17
Typecheck
Clean
Browser
Pass

Executive Summary

Bundle 1 is now materially improved. Manual knowledge capture preserves metadata and source-message provenance, wiki detail pages show clickable resource and chat-source links, and explicit decisions/facts now have a local fallback path when no AI provider is available.

The main remaining caveat is not a backend correctness issue: during browser automation, the in-chat knowledge panel listed the new entry but the row-expansion click became unreliable in the in-app browser transport. The same data is verified through API and the full wiki UI, and the side-panel code path now renders the same URL/source fields once expanded.

Fixes Shipped

AreaChangeWhy It Matters
Schema Added wiki_pages.metadata plus migration 0068_wiki_pages_metadata.sql. Resource URLs, decision status, and other knowledge metadata are no longer dropped.
Manual Save POST /api/spaces/:spaceId/knowledge now validates source_message_id, writes metadata, creates wiki_citations, and returns source_space_id. Knowledge cards can prove where they came from instead of saying “From conversation” without a link.
Validation Order Source-message validation now happens before inserting the wiki page. Bad provenance cannot leave orphaned wiki rows.
Wiki API Wiki list/detail APIs expose metadata; citations now include the originating message space. The canonical wiki surface can render resource links and deep-link back to chat.
UI Full wiki detail shows resource URL metadata and clickable chat-message citations. In-chat panel “From conversation” is now a link. Users can move from saved memory to source context without guessing.
Auto Extraction Provider-free local classifier now extracts explicit Decision:, Fact:, Policy:, Preference:, and always/never rules. Company memory does not fully collapse when LLM keys are missing.
Realtime Auto memory extraction emits knowledge:created / knowledge:updated into the source space when possible. The knowledge panel can update without requiring a refresh.

Verification Matrix

TestCommand / MethodResult
API typecheck pnpm --filter @deft/api typecheck Passed
Web typecheck pnpm --filter @deft/web typecheck Passed
Local classifier + in-chat knowledge route tests tsx --test test/classifier-local-memory.test.ts test/in-chat-knowledge-panel.test.ts 12 passing, 0 failing
Automatic memory extraction tests tsx --test test/memory-extract-no-agent-memory.test.ts test/memory-extract-embed-enqueue.test.ts 5 passing, 0 failing
Local DB migration ALTER TABLE "wiki_pages" ADD COLUMN IF NOT EXISTS "metadata" jsonb against localhost:55432/deft Applied
Browser wiki detail Created a Testers Tomatoes source chat message and resource page, opened /knowledge?slug=bundle-1-buyer-guide-1780917236002. Title, resource URL, source citation, excerpt, and chat-source link all visible.
Browser provenance link Opened /chat?space=025d2a79-f59f-423c-a326-f4b191038ed3&message=4df66783-5bf9-49ea-8a58-86659a9c1b2c. Chat page loaded and original decision message was visible.
In-chat knowledge panel Opened the Knowledge side panel from chat. Panel opened and listed the new resource entry. Automated expansion click was unreliable in the in-app browser; API and full wiki UI verified the expanded fields.

Known Test Artifact

The browser pass left one realistic test artifact in the local demo workspace so the provenance path remains inspectable:

Pilot Readiness Impact

Improved Manual “Save to Knowledge” now behaves like a real memory capture feature rather than a shallow wiki insert.

Improved Users can inspect the source of a memory and return to the chat context where it was decided.

Improved Deft can still capture explicit decisions/facts without depending on Anthropic, OpenAI, or another LLM provider.

Still Next A broader semantic dedupe/merge pass is still worth doing later so repeated decisions update existing pages more intelligently instead of creating near-duplicates.