Kibi requirements, traceability, and proof MCP. Install as a project dev dependency.
Prompt the intent. Kibi makes the agent remember it—and prove the implementation.
Simplified from what Kibi reports in each case.
Kibi is an agent-native requirements compiler and enforcement layer. You describe product intent in natural language; the agent creates and maintains the structured requirements, scenarios, tests, semantic facts, and code links. Kibi then checks that the implementation remains coherent with that intent.
Unlike passive memory or retrieval systems, Kibi is designed to place itself in the agent's workflow. The agent does not have to remember to consult a ticket, board, or requirements folder: Kibi's hooks, tools, and validation gates continuously bring the relevant product context back into the work.
Documentation · Quick start · Kibi's own health report
Most project knowledge is scattered across prompts, tickets, code, and conversations—and most AI agents eventually forget part of it. Kibi turns that knowledge into an enforceable, branch-local model:
kibi-plugin-treesitter adds offline symbol extraction for Python, Go, Rust, Java, C#, PHP, C, C++, Bash, Ruby, and Terraform/HCL using pinned WASM grammars.kibi-plugin-ui keeps React and Angular components on their agreed design patterns. Pixels, colours and spacing stay with your linter..kb/ directory; the Kibi packages send no external telemetry or analytics. Only the documentation website counts visits, with cookieless Umami analytics.Kibi is meant to be set up and driven by your coding agent, so the recommended install is a prompt rather than a list of commands. Kibi requires Node.js 22+. SWI-Prolog is bundled: on Linux (x64 or arm64, glibc 2.28+) and macOS (Apple silicon or Intel) there is nothing else to install. On other platforms, such as Alpine/musl or native Windows (use WSL), install SWI-Prolog 9.0+ and put swipl on your PATH (details).
Recommended: let your agent set it up. Paste this into Claude Code, Cursor, Codex, OpenCode, or any coding agent that can run commands in your repository:
Set up Kibi (https://github.com/Looted/kibi) in this repository, then bootstrap its knowledge base.
1. Install: confirm Node.js 22+ is available. With the package manager this repository already uses, add kibi-core, kibi-cli and kibi-mcp as dev dependencies. Do not skip optional dependencies; the bundled SWI-Prolog runtime is one.
2. Initialize: run every `kibi` command through the package manager's local runner (npm: `npm exec -- kibi <command>`). Run `kibi init`; if it reports a problem, run `kibi doctor` and fix what it names. If this platform has no bundled SWI-Prolog, tell me what to install and stop.
3. Connect: register the project-local `kibi-mcp` server for the agent host you are running in, following https://looted.github.io/kibi/guide/connect-an-agent.html. Prefer project-scoped configuration, and ask me before installing a plugin or changing global settings. Until the kb_* tools are visible to you, use Kibi's CLI JSON routes instead.
4. Bootstrap: run `kibi skills load kibi-bootstrap --format markdown` and follow that skill exactly. It starts by asking me where product intent lives outside the code (issue trackers, wikis, specs) and which sources to trust; read them through the connectors you have and cite them. Show me the complete plan and its hash, and write nothing until I approve it.
5. Verify: run `kibi check` and `kibi status`, fix anything they report, and summarize what was added. Do not commit; I will review the changes.
What happens next:
kibi init, and connects itself to Kibi.After that, work normally: prompt for features, fixes, and refactors, and the agent keeps requirements, scenarios, tests, and code links in step with the code.
In your repository:
npm install --save-dev kibi-core kibi-cli kibi-mcp
npm exec -- kibi init
kibi init creates the .kb/ layout and installs the Git hooks that keep it in sync. It never overwrites a hook it did not write, and it does not infer product knowledge. Connect your coding agent, then ask it:
Bootstrap Kibi for this repository.
pnpm, Yarn, and Bun work the same way through their local runners. The installation guide has their equivalents, how Kibi finds SWI-Prolog, and package-manager caveats. npm exec -- kibi doctor tells you whether everything is in place.
Upgrading. After updating the Kibi packages, run kibi migrate (or ask your agent to). It shows what would change and applies nothing until you approve; the CLI reference covers each schema version.
The setup prompt above does this step for you. To do it by hand: every client starts the same project-local kibi-mcp server (npx --no-install kibi-mcp, stdio, working directory = your repository). Optional plugins add bundled skills and hooks on top.
Install the optional kibi-claude plugin from this repository's marketplace. It brings the MCP server, the bundled skills, and hooks that show the agent the linked requirements, what they must keep true, and the decision behind them before it reads or edits code, including through shell commands. The agent connection guide has the details:
claude plugin marketplace add Looted/kibi
claude plugin install kibi-claude@kibi
Without the plugin, register the server for the project:
claude mcp add --scope project kibi -- npx --no-install kibi-mcp
Add Kibi to .cursor/mcp.json:
{
"mcpServers": {
"kibi": {
"command": "npx",
"args": ["--no-install", "kibi-mcp"]
}
}
}
The optional kibi-cursor plugin adds rules, bundled skills, commands, and advisory hooks that show the same requirement context as the Claude Code plugin before reads and edits of linked code. See the Cursor plugin guide.
codex mcp add kibi -- npx --no-install kibi-mcp
The optional kibi-codex plugin bundles Kibi skills, MCP configuration, and warning-only hooks that bring the linked requirement into the agent's context before it changes code. Add the Kibi repository marketplace, open Codex, then run /plugins, choose Kibi Plugins, and install kibi-codex:
codex plugin marketplace add Looted/kibi
The repository marketplace is not the official OpenAI Plugin Directory; self-serve plugin publishing is not available there yet. Manual MCP configuration remains fully supported.
Add Kibi to opencode.json. The optional kibi-opencode plugin adds prompt guidance (including what a requirement linked to the file being edited must keep true) and background maintenance:
{
"mcp": {
"kibi": {
"type": "local",
"enabled": true,
"command": ["npx", "--no-install", "kibi-mcp"]
}
},
"plugin": ["kibi-opencode"]
}
Add Kibi to .vscode/mcp.json:
{
"servers": {
"kibi": {
"type": "stdio",
"command": "npx",
"args": ["--no-install", "kibi-mcp"]
}
}
}
Any stdio MCP client works with command: npx, args: --no-install kibi-mcp. ZCode also has an optional plugin, installed from a local checkout, whose edit hook shows the same requirement context as the Claude Code plugin; see the ZCode plugin guide. Agents without MCP can use the same operations through the CLI's JSON routes.
Kibi's skill subsystem gives the agent four bundled skills that teach it how to work with Kibi, so you do not paste a long system prompt, and a small set of MCP tools does the rest:
kb_search returns the current requirements, the tests and decisions behind them, and what Kibi's checks say about each.kb_check on the files the agent touched quotes the requirements that code implements and flags new code no requirement covers.The MCP reference lists every tool. Generic agents can start from agent onboarding.
npm exec -- kibi report --open
kibi report writes a self-contained kibi-report/index.html and kibi-report/badge.svg from one coverage snapshot. % proven is the share of current requirements with fresh end-to-end proof on the current code; the report lists what is proven, what is missing proof, what contradicts, and what has gone stale. See reading the report.
To publish the report and a clickable badge on GitHub Pages, run npm exec -- kibi init --github, then enable Settings → Pages → Source → GitHub Actions. The GitHub integration guide covers the report workflow, badge-only publishing, and a CI step that keeps pull requests mergeable when only Kibi's own files conflict.
For day-to-day inspection, kibi status, kibi search, kibi gaps, kibi coverage, and kibi check are in the CLI reference.
Kibi combines probabilistic interpretation with deterministic verification:
Human prompt
|
v
Agent updates code and product knowledge
|
v
Requirements + semantic facts/rules + scenarios + tests + symbol links
|
v
Prolog coherence checks + traceability gates + fresh E2E evidence
|
v
Proven result or explicit, repairable gaps
The agent never writes arbitrary Prolog as trusted truth. It works through typed facts, predicate schemas, and safe logic representations; Kibi validates those encodings before the Prolog layer uses them for inference.
Kibi maintains a canonical traceability and proof chain:
Requirement -> Scenario -> Test
^ ^
| |
Production symbol Executable test symbol
For a requirement to be proven rather than merely documented:
That makes questions answerable in both directions: which requirement owns this symbol, what this E2E test actually verifies, which requirements lack a scenario or current evidence, and whether two current requirements contradict each other. Code coverage alone cannot answer them: it shows that a test touched a line, not which product behavior was exercised.
Suppose the product defines exactly three user roles. Once that constraint is encoded as a strict property or predicate, an agent cannot quietly invent a fourth role and treat it as established intent: Kibi can surface the contradiction or missing authorization deterministically.
Kibi does not report "no conflict" when it could not tell. Numeric constraints are compared exactly ("greater than 0" conflicts with "equals 0"), an allow and a deny for the same action contradict, and anything Kibi cannot model is reported as unresolved for the agent to review, never as a clean pass.
Prolog does not decide whether the original human intent was correct. It verifies the knowledge that was encoded, while Kibi keeps ambiguity, missing ontology, incomplete grounding, and stale evidence explicit instead of calling them proof.
Traditional knowledge bases required specialists to design ontologies, write formal logic, and maintain every mapping by hand. LLMs change the economics of that authoring step, and Kibi and Prolog supply the discipline:
| Participant | Strength and responsibility |
|---|---|
| Human | States product intent and resolves real ambiguity or policy choices |
| AI agent | Maps intent to the codebase and maintains requirements, scenarios, tests, facts, and symbol links |
| Kibi + Prolog | Validates schemas, checks coherence and contradictions, enforces traceability, and evaluates proof evidence |
The result uses LLM strengths to address LLM weaknesses: limited memory, hallucination, context drift, and the loss of the product-to-code mapping traditionally spread across product owners, ticket systems, and planning boards.
Eight entity types: req, scenario, test, fact, adr, flag, event, and symbol. The entity schema has the complete model.
Every entity records who authored it, a person or an agent, and advisory checks list agent-written requirements no person has approved.
Requirements and ADRs also say how firmly they were decided. A firm rule is one a person stated: it points at their words, the agent asks before changing it, and Kibi refuses to rewrite it quietly. A default choice can be revisited on evidence, and exploratory marks a guess. Every supersede has to say why it changed. How Kibi works has the details.
Install kibi-core, kibi-cli, and kibi-mcp in the project. Everything else is optional.
| Package | Role |
|---|---|
kibi-core | Prolog-backed knowledge graph, inference, and validation |
kibi-cli | Human, agent, automation, and Git-hook interface |
kibi-mcp | MCP surface exposing the public Kibi operation contracts |
kibi-claude | Claude Code skills, MCP, requirement context before reads/edits, and advisory hooks (plugin marketplace) |
kibi-cursor | Cursor rules, skills, MCP, requirement context before reads/edits, and advisory hooks |
kibi-codex | Codex skills, MCP, requirement context before edits, and lifecycle hooks |
kibi-opencode | OpenCode guidance (including requirement context for edits) and background maintenance |
kibi-zcode | ZCode skills, command, MCP, requirement context before edits, and advisory hooks (local checkout) |
kibi-vscode | VS Code knowledge explorer and traceability view |
kibi-plugin-sdk | Protocol types and validators for capability plugins |
kibi-plugin-builtin | Default semantic, ontology, and TypeScript symbol capabilities |
kibi-plugin-jev | Optional TypeSafe Jev semantic classifier |
kibi-plugin-treesitter | Optional offline multi-language symbol extraction (tree-sitter WASM grammars) |
kibi-plugin-ui | Experimental check policy keeping UI components on their agreed design patterns |
kibi-swipl | Bundled SWI-Prolog runtime; the matching platform build installs automatically |
The guide and reference are published at https://looted.github.io/kibi/. Language models can start from the documentation index.
kibi prove, and receiptsKibi is in beta and ready for use in real projects. Public interfaces may still evolve before 1.0, so pin exact package versions when reproducibility matters.
Kibi is licensed under AGPL-3.0-or-later.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y kibi-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-looted-kibi-mcp": {
"command": "npx",
"args": [
"-y",
"kibi-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencekibi-mcpnpmio.github.Looted/kibi-mcp works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.