kibi-cursor
v0.3.1
Published
Kibi Cursor plugin - thin adapter for Cursor MCP integration and editor hooks
Readme
kibi-cursor
Cursor plugin for Kibi — repo-local, per-branch, queryable knowledge base.
kibi-cursor is optional. It provides Cursor-specific rules, skills, commands, MCP wiring, and advisory editor hooks, but it does not ship a replacement kibi CLI or kibi-mcp server binary.
Prerequisites
Install these before enabling the plugin MCP server:
| Requirement | Why |
| --- | --- |
| SWI-Prolog 9+ (swipl on PATH) | Powers Kibi inference and validation |
| kibi-cli | Project CLI (kibi command) |
| kibi-mcp | MCP server the plugin's mcp.json invokes via npx --no-install kibi-mcp |
| kibi-core | Shared graph/runtime dependency |
npm install --save-dev kibi-cli kibi-mcp kibi-core
swipl --version
npm exec -- kibi doctorFull setup: docs/install.md.
Add this plugin only after the base packages work in your project.
Installation
Cursor Marketplace (recommended)
Submit or install from the Kibi repository marketplace at .cursor-plugin/marketplace.json, which points at ./plugins/kibi-cursor.
For local testing before marketplace publication, copy a real directory tree into Cursor's user-plugins folder. Symlinks are rejected when the target lives outside plugins/local (common on WSL):
./scripts/sync-cursor-plugin-local.shOn WSL workspaces, Cursor reads ~/.cursor/plugins/local in your Linux home, not the Windows profile path. Reload Cursor (Developer: Reload Window) and check Plugins → User.
npm package
npm install --save-dev kibi-cursorCopy the installed package into Cursor's local plugin directory (do not symlink):
cp -r "$(npm root)/kibi-cursor" ~/.cursor/plugins/local/kibi-cursorMCP configuration
The plugin bundles mcp.json pointing at the project-local kibi-mcp binary:
{
"mcpServers": {
"kibi": {
"command": "npx",
"args": ["--no-install", "kibi-mcp"]
}
}
}Toggle the bundled MCP server from Settings → Features → Model Context Protocol after installing the plugin.
Manual MCP fallback (no plugin install required):
{
"mcpServers": {
"kibi": {
"command": "npx",
"args": ["--no-install", "kibi-mcp"]
}
}
}Features
Discovery-first rules and skills
- Rules: always-on MCP workflow guidance plus optional traceability rules for source files.
- Skills:
kibi-usage,init-kibi,kibi-freshness, andkibi-traceability. - Commands:
/init-kibidocuments thekb_autopilot_generatebootstrap workflow.
Advisory editor hooks
Hooks are warning-only and never replace MCP/CLI behavior:
- sessionStart: bootstrap reminder when
.kb/config.jsonis missing. - preToolUse: warns on explicit direct
.kb/**edits without blocking. - beforeReadFile and postToolUse (Read): inject source-linked lookup guidance once per path per session.
- postToolUse (Write/Edit): inject traceability and freshness guidance once per path per session, including
kb_check({sourceFiles:[...], includeImpactDiagnostics:true, includeWorkingTreeDiff:true})for meaningful source edits. - stop: emits a single freshness or impact-check follow-up when meaningful paths changed during the session.
What the plugin does not do
Per the thin-adapter architecture, kibi-cursor does not:
- Own KB storage, parsing, or validation
- Run background
kibi syncor CLIkibi check(use git hooks and MCP tools; for source edits, use impact-enabled MCPkb_checkfirst) - Block agent actions in advisory mode
Architecture
kibi-cursor is a thin bridge layer:
- Agent-visible guidance: public MCP tools (
kb_search,kb_query,kb_upsert, impact-enabledkb_check, etc.) and the/init-kibicommand - Editor-specific value: Cursor hooks for read/write reminders and session freshness follow-ups
- Foundation:
kibi-core,kibi-cli, andkibi-mcpremain required for project-local operations
License
AGPL-3.0-or-later
