Skip to content

feat: add full-text search over personal and code wikis - #592

Open
yashi (yashibuilds) wants to merge 1 commit into
langchain-ai:mainfrom
yashibuilds:feat/wiki-search
Open

feat: add full-text search over personal and code wikis#592
yashi (yashibuilds) wants to merge 1 commit into
langchain-ai:mainfrom
yashibuilds:feat/wiki-search

Conversation

@yashibuilds

Copy link
Copy Markdown

Summary

  • Adds searchWiki() over markdown wiki roots (personal ~/.openwiki/wiki and code ./openwiki)
  • Adds CLI: openwiki personal search <query> / openwiki code search <query> / openwiki search [--mode personal|code] [--limit <n>] <query>
  • Adds agent tool openwiki_search_wiki plus a prompt nudge to use it before broad wiki ls/grep crawls

Why

OpenWiki Brains called out better retrieval as next work. After dogfooding Personal Brain, chat agents often spent multiple exploratory filesystem hops (lsgrep → more lsread_file) to find pages that a dedicated wiki search can surface in one tool call. Humans also had no non-agent way to search the brain.

This is intentionally an MVP keyword scan (not embeddings). Under the hood it is in the same family as grep; the product change is a first-class CLI + ranked wiki search tool + guidance so retrieval is not only generic filesystem exploration.

Closes #591

Relation to #529

#529 explores richer code-repo / MCP retrieval. This PR is a smaller Personal/Code Brain surface that can land independently.

Test plan

  • Unit tests for searchWiki + parseCommand search parsing (test/search-wiki.test.ts)
  • pnpm run format && pnpm run lint && pnpm test
  • Manual CLI: node dist/cli.js personal search "middleware" against a real Personal Brain
  • Manual after-check (optional): openwiki personal -p with local build and confirm openwiki_search_wiki is used

Follow-ups (not in this PR)

  • Optional rg / FTS index for very large brains
  • MCP server exposing the same search to external agents

Made with Cursor

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fab66ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openwiki Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Agents often explore wiki memory with multi-hop ls/grep/read. Add a
dedicated searchWiki helper, openwiki search CLI, and openwiki_search_wiki
agent tool so retrieval is a first-class path for Personal and Code Brain.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: full-text search over Personal/Code Brain wiki

1 participant