Repository navigation
Rank coherent knowledge, harden ingestion, simplify MCP - #3
Merged
Merged
Conversation
…ding Require field coherence for two-term queries so scattered term matches cannot outrank same-field phrases, body phrases, or title anchors. Normalize curly apostrophes and strip conversational prefixes that diluted scoring. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Return created/updated page and link/metadata deltas from knowledge updates, reconcile sources.json from provenance citations, and fail previews that drop cold-start benchmark ranks before any write. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose query_knowledge/read_page/list_sources/inspect_source/update_knowledge. read_page resolves paths, URIs, titles, wikilinks, and stems. Preview/apply is digest-only with no deprecated confirmed flag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Session-start hooks and wiki skills now direct agents to query when freshness, specificity, or citation needs exceed injected context, and to abstain when curated pages do not support an answer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update dogfood stdio and knowledge CLI adapters for renamed tools, read_page refs, and Brian seed-corpus expectations so engine sync validation can pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep config/status formatting aligned with upstream engine style without behavior changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify that wiki knowledge and the five MCP tools share one engine, document flexible read refs in CLI help and agent surfaces, and add adapter parity for source inspect, read --help, and rejected legacy update fields. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Migrated from KOS: rank regressions now force needs_revision, clear the approval digest, and emit RETRIEVAL_REGRESSION diagnostics so preview cannot be approved and apply cannot write a regressing update. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Makes Brian's knowledge engine rank what is actually about the query, refuse wiki updates that quietly worsen retrieval, and expose a shorter MCP surface agents can follow without path bookkeeping.
Three product outcomes:
Why these decisions
who is,our, …)needs_revisionwith diagnostics.{{SOURCE_PATH}}provenancequery_knowledge, …)*_company_*read_pageinput[[wikilink]]/ stemapproval_digestonlyconfirmedImportant
Breaking MCP rename. Clients must call
query_knowledge,read_page,list_sources,inspect_source, andupdate_knowledge. The old*_company_*/apply_knowledge_updatenames and theconfirmedflag are gone. CLI subcommands (wiki knowledge …) are unchanged.Note
Live field-coherence holdouts are adapted to Brian's seed wiki (single overview page). Synthetic multi-page fixtures still lock the ranking rule itself. Private-corpus partner pages are intentionally not shipped here.
What changed
Search (
wikicli/core/resolve.py)field provenance: …andincoherent evidence demoted.Ingestion (
wikicli/core/ingest.py)created_pages,updated_pages,metadata_changes,links_added,links_removed.needs_revision+retrieval_regressions.MCP + knowledge API
query_company_knowledgequery_knowledgeread_company_page(path=…)read_page(ref=…)list_company_sourceslist_sourcesinspect_company_sourceinspect_sourceapply_knowledge_update(+ optionalconfirmed)update_knowledge(digest-only)Agent surfaces
Review guide
Prefer reviewing behavior and trade-offs, not only line diffs:
Test plan
pytest— 433 passedwiki-sync-enginecandidate validationwiki knowledge query "What is Brian?"still topsBrian Overviewread_pageaccepts[[Brian Overview]]ready/needs_revision; apply only with digest from that ready previewCommits
feat(search): demote incoherent two-term hits and strip query scaffoldingfeat(ingest): expose page deltas and block retrieval regressionsfeat(mcp): rename tools, drop confirmed, and accept flexible page refsfeat(agents): teach proactive grounding without ritualistic queryingtest: align Brian companion suites with the new MCP contractchore: fold incidental formatting from the engine sync