Track shadow knowledge revisits in Markdown - #42
Merged
Xingdi (Eric) Yuan (xingdi-eric-yuan) merged 12 commits intoSep 28, 2026
Merged
Xingdi (Eric) Yuan (xingdi-eric-yuan) merged 12 commits into
Xingdi (Eric) Yuan (xingdi-eric-yuan) merged 12 commits into
Conversation
Track surfaced discoveries with deterministic identities and an atomic local SQLite ledger shared across worktrees. Add bounded symbol-aware retrieval, stable pagination, per-entry expansion and retry-safe counting while preserving canonical knowledge formats and hook fail-open behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bind cursor requests by digest rather than storing raw query text in local usage metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reuse fully synchronized rollback journals and retry only SQLite lock contention after rolling back each whole write attempt. Keep hook timeouts and the six-process exact-count workload unchanged; cover blocked commits and non-lock failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep canonical file/symbol identities, literal text, and merged labels intact. Share hook budgets across previews, bind long reads to their content revision and event, and bound local retry/pagination metadata while preserving fail-open accounting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve reconciliation path containment alongside citation identity, bounded retrieval, and logical-read accounting. Retain both feature entries in the changelog. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep full commit synchronization while allowing readers and score writers to progress independently. Retain bounded retries and exact-count stress coverage, configure automatic checkpoints, and give the expanded cross-platform regression job time to finish. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move shared knowledge/citation helpers into the core skill, expose bounded reads by known file or symbol, and keep the Viewer user-facing. Restore direct-navigation guidance, route hooks through the core reader, and include the optional reference in pinned tooling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use visible citation_score metadata and an exact-claim increment helper with per-file locking and atomic publication. Preserve native navigation and user-facing views, retain counters during knowledge merges, and remove database-backed retrieval and pagination machinery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exclude fenced examples and unrelated headings from exact-entry matching, merge cross-cutting scores at the actual discovery metadata, and clarify that existing shadows require no score reset. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Xingdi (Eric) Yuan (xingdi-eric-yuan)
requested a review
from Chinmay Singh (chisingh)
September 24, 2026 04:19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Xingdi (Eric) Yuan (xingdi-eric-yuan)
deleted the
feature/shadow-citation-ranking
branch
September 28, 2026 13:42
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.
Summary
Add a visible
citation_scoreto shadow discoveries and preferences so agents can recognize knowledge that previous tasks have revisited. The score is an approximate, agent-reported frequency hint stored directly in Markdown.New entries start at zero; omitted scores also mean zero.
Recording a citation
After consulting a discovery, the agent records it once per task using its file, symbol, and exact claim text:
Use
.claude/skills/for Claude Code. Supply the claim body in--textand repeat that argument to update several entries in the same file/section atomically. For preferences and cross-cutting discoveries, supply the file and claim text alone.Features
citation_scorefollows the source and optional label fields in each entry.shadow-cite.pyidentifies exact claims, serializes counter updates with per-file locking, and publishes them atomically. Ambiguous matches, invalid scores, busy writers, and detected edit races produce corrective feedback.Citation reporting is explicit: each successful helper invocation increments the selected entries, so the agent or coordinator handles once-per-task deduplication. Subagents can report consulted claims to a single writer. Scores travel with the Markdown through Git; Dream reconciliation imports score updates supplied on matching manifest discoveries.