Repository navigation
S21: wire knowledge records into repo memory (SHIP_KNOWLEDGE_PROVENANCE=shadow|on) - #51
Merged
Merged
Conversation
…NCE (S21) Sidecar provenance records (new ship_knowledge_records table / knowledge-records dir) written alongside notes; shadow logs what retrieval would hide or label without changing context; on hides invalidated/unverifiable notes and labels fresh|stale|unknown. Run-publish notes record the run as source; condenser summaries record as derivation:summary with derivedFrom; Knowledge delete redacts derived records. Default off: no store built, nothing written. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
src/knowledge-store.ts:KnowledgeStorewith in-memory, file (<state>/knowledge-records/*.jsonl) and Nucleus (NEW tableship_knowledge_records, CREATE TABLE IF NOT EXISTS, no migration, no ALTER) implementations. Provenance is a sidecar keyed by noteId; existing notes/rows are untouched.src/knowledge-provenance.ts:SHIP_KNOWLEDGE_PROVENANCE(off default | shadow | on),KnowledgeProvenance(recordNote, recordSummary, screen via visibleTo + freshness, redact via redactionPlan/applyRedactionPlan). Project is optional (""= repo-only, since repoKeyOf is repo-only); documented in the header.ScopedRepoMemory: optional provenance arg;recordstrips the hint and writes a hypothesis record (run as source);recent(..., {context})screens only context reads (dashboard listing never filtered);remove(id, repo?)redacts derived records.loadRepoContext: with mode != off resolvesgit rev-parse HEADand labels notes(fresh|stale|unknown)only inon.condenseIfNeeded: optional observe-onlyonSummary; durable records summaries asderivation:'summary', agent-claim, derivedFrom = injected note ids, idempotent by id.runtime.tsbuilds the store only when mode != off.knowledge-provenance: wouldHide, wouldLabel, unrecorded); never changes retrieved context.Checks
Not verified / still open
on.🤖 Generated with Claude Code
https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX
Generated by Claude Code