Search the codebase knowledge base with breadth-first scan and progressive alias learning. Scans ALL project indexes in parallel (including _personal), scores candidates by alias/semantic match, then deep-verifies the best match. Use when user asks to find code, understand how something works, or get usage examples.
Create a new codebase knowledge base from a git repository URL. Clones the repo, scans all code files, generates documentation for each function/class, and builds a searchable index. Use when user says 'create knowledge base', 'index a repo', 'add a codebase', or provides a git URL to index.
Delete a codebase knowledge base and all its cached documentation. Removes the project cache, cloned repo, and registry entry. Use when user says 'delete knowledge base', 'remove repo', 'rk-delete', or wants to clean up a project.
List all codebase knowledge bases in the registry. Shows project name, git URL, last update time, and document count. Use when user says 'list repos', 'show knowledge bases', 'what codebases do I have', or 'rk-list'.
Save a piece of personal knowledge to the user's personal knowledge base (_personal project). No git repo needed โ stores anything the user knows by heart: commands, tips, best practices, personal workflows. Searchable via rk-search, synced via rk-push/pull. Use when user says 'remember this', 'save this note', 'rk-memo', or wants to store a frequently-used snippet or trick.
Pull knowledge base from remote and merge into local. Fetches remote state, Agent compares diffs and merges (alias LRU merge for _index.md, union dedup for _registry.md, newer-cached-date wins for docs). Does NOT push โ local only. Use when user says 'pull knowledge', 'sync from remote', 'rk-pull', or on a new machine to get existing knowledge without re-indexing.
Push local knowledge base to the remote repository. Always fetches remote first, Agent compares diffs and merges (alias LRU merge for _index.md, union dedup for _registry.md, newer-cached-date wins for docs), then commits and pushes. Retries once on push rejection. Use when user says 'push knowledge', 'sync to remote', 'rk-push', or after making local updates.
Initialize remote sync for the knowledge base. Sets up ~/.repo-knowledge/ as a git repository, configures a user-provided remote URL, links to the main branch, and either pushes local data (first machine) or pulls existing data (subsequent machines). Use when user says 'set up remote sync', 'connect remote repo', 'init remote', 'rk-remote-init', or provides a git URL for syncing the knowledge base.