Skip to main content
Glama

Kibi Wordmark

Status: Beta CI Coverage Kibi requirement health License: AGPL-3.0-or-later Glama MCP server X @kibi_dev

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

Why Kibi

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:

  • Humans maintain intent, not artifacts — The prompt is the primary authoring interface. Agents own the routine work of creating and evolving requirements, scenarios, tests, facts, and symbol links; humans resolve genuine ambiguity and product decisions.

  • Memory is enforceable — Symbols need requirement ownership, requirements need complete semantics and scenarios, scenarios need tests, and proof-bearing tests need fresh execution evidence.

  • Prolog guards against drift — Typed properties, predicates, and safe rules let deterministic checks expose contradictions, unsupported invention, and incomplete semantics before they become accepted project knowledge.

  • E2E behavior is traceable — Kibi records what an end-to-end test proves, not merely which lines it happened to execute. You can navigate from a symbol to its requirement or from a test to the scenario and intent it verifies.

  • Intent survives branch changes — Each Git branch has its own KB snapshot, so feature context stays isolated and is there when you return.

  • Works across languages — TypeScript and JavaScript symbols are built in. The optional kibi-plugin-treesitter adds offline symbol extraction for Python, Go, Rust, Java, C#, PHP, C, C++, Bash, Ruby, SWI-Prolog, and Terraform/HCL using pinned WASM grammars. Each language installs as a small kibi-lang-* grammar pack (kibi-lang-python, kibi-lang-go, kibi-lang-prolog, ...), and kibi doctor names the ones a repository needs: generated files count only when the KB uses them, and any pack can be declined in kibi.declinedLanguagePacks. Generated code (linguist-generated, a generator header, or kibi.generatedPaths globs) also needs no requirement links in the commit gate unless the KB tracks it. Code and source proofs read TypeScript, JavaScript, Python and SWI-Prolog, so a Prolog project can prove its claims against its own predicates, imports, calls and pack.pl. With the plugin active for proofs, source proofs also read what Go, Java, C#, Rust, PHP, C and Bash files import, call and read from the environment, and the property values of PHP, C and Terraform/HCL files, without compiling or running them.

  • Optional UI design guard (experimental) — kibi-plugin-ui keeps React and Angular components on their agreed design patterns. Pixels, colours and spacing stay with your linter.

  • Questions in your own words — kb_search answers with five one-line decision cards ranked by the question's words, the words of each decision's facts and implementing symbols, and its meaning: kibi-plugin-search-hints ships with Kibi and, on by default, scores each decision and the scenarios, tests and facts it links with a small offline model, and lists up to seven more decisions related by meaning. A question the KB cannot answer gets the nearest cards and the words no decision holds, never a claim that nothing governs it. List the plugin in kibi.declinedPlugins to rank by words alone.

  • Keep knowledge local — KB state lives in your repository's .kb/ directory and is never sent anywhere. The Kibi packages send anonymous usage statistics, which you can turn off (see Usage telemetry); the documentation website counts visits with cookieless Umami analytics.

Related MCP server: Axiom Meridian

Quick start

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+), macOS (Apple silicon or Intel) and native Windows (x64) there is nothing else to install. On other platforms, such as Alpine/musl or Windows arm64 (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, Mistral Vibe, 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:

  1. Setup. The agent installs the packages, runs kibi init, and connects itself to Kibi.

  2. Interview. It asks where your product intent already lives (issue trackers such as Jira or YouTrack, wikis, specs) and which of those sources to trust.

  3. Plan. It reads those sources through the connectors it has and drafts a bootstrap plan. Every requirement in the plan cites the ticket or page it came from. Open questions and conflicts it finds between sources are flagged for you rather than turned into requirements.

  4. Your approval. It shows you the plan and its hash. Nothing is written until you approve.

  5. Apply and check. It applies the plan, validates the result, then fills in what the plan could not write, such as scenarios from acceptance criteria and machine-checkable facts for the new requirements. It tells you what it added.

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; with lefthook, husky or the pre-commit framework it installs none and prints the configuration to add instead. It does not infer product knowledge. So that a fresh clone (a teammate's, a cloud agent's) uses Kibi too, it also writes a Kibi section into AGENTS.md (imported from CLAUDE.md for Claude Code and from GEMINI.md for Gemini CLI) that tells any agent the knowledge base exists and gives it the same change steps every Kibi session opens with (search before changing behaviour, record a stated rule, run the linked tests and the changed-files check before finishing), and adds a prepare step that installs the hooks when dependencies are installed; the first Kibi query in a clone compiles the branch's store from the committed knowledge. Each of these can be turned off (setup choices). 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.

Versions. Each release has one Kibi release version, such as 2026.11.0, that names its exact package set and declares the KB schema it uses. kibi --version and kibi doctor show it, and doctor warns when installed packages come from different releases. When a newer kibi-cli is out, the CLI says so in one stderr line at a terminal (checked at most daily in the background, silent in CI, JSON output and agent runs, off with KIBI_UPDATE_CHECK=0), and kibi doctor reports it for every host. See Kibi release versions.

Connect your coding agent

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-antigravity plugin (bundled skills, always-on workflow rules, workspace-gated MCP server with automatic roots/list workspace discovery for global installs, and lifecycle hooks that inject requirement context, prompt before edits to firm requirements, and remind once at stop):

agy plugin install https://github.com/Looted/kibi/tree/master/packages/antigravity

For workspace-scoped dogfooding or team sharing inside a repository, point .agents/plugins.json at the plugin directory (see the Antigravity plugin guide). Without the plugin, add npx --no-install kibi-mcp to ~/.gemini/config/mcp_config.json.

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), background maintenance and, on OpenCode v1, the decision hooks the other plugins run: a message that states a rule gets a kb_record capture template, an edit of code that implements a firm requirement is stopped once so the agent asks the person first, and a session that changed source and recorded nothing is asked once to record the decision:

{
  "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"]
    }
  }
}

Install the optional kibi-vibe plugin (Agent Plugins 1.0 format) from a local checkout into ~/.vibe/plugins/kibi, then restart Vibe or run /reload. It brings the MCP server, the bundled skills, and fail-open hooks that show KB status at session start, governing entities for each prompt, and the entities linked to a file after it is read or edited:

mkdir -p ~/.vibe/plugins && cp -r packages/vibe ~/.vibe/plugins/kibi

On Windows the launcher runs the project-local kibi-mcp natively with the bundled SWI-Prolog, and wraps the call in wsl.exe --exec (never a shell string) only for a \\wsl.localhost\<distro> workspace or with KIBI_FORCE_WSL=1; on Linux/macOS it spawns the project-local kibi-mcp directly. See the Vibe plugin guide.

Without the plugin, register the server in ~/.vibe/config.toml:

[[mcp_servers]]
name = "kibi"
transport = "stdio"
command = "node"
args = ["<path-to-packages/vibe>/bin/launch-kibi-mcp.mjs"]
startup_timeout_sec = 120
tool_timeout_sec = 300

Any stdio MCP client works with command: npx, args: --no-install kibi-mcp. ZCode also has an optional plugin, installed from the Kibi marketplace or 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.

What your agent gets

Every surface opens a session with the same short brief: search for the recorded intent before changing behaviour, record the person's decisions with their reason, run the commit check before finishing, and treat a request that would make a recorded rule false as a question. The host plugins add it at session start, and the MCP server returns it in its initialize instructions and in kb_status, so an MCP client without hooks reads it too.

Kibi's skill subsystem gives the agent seven bundled skills that teach it how to work with Kibi (including kibi-provable-code, on writing code whose rules Kibi can prove), so you do not paste a long system prompt, and the MCP tools (kb_search, kb_query, kb_record, kb_upsert, kb_check, kb_status, kb_skills and the rest) do the work; a project can list only the eight core tools with KIBI_MCP_TOOLS=core. The main skill, kibi-usage, is a short arc of about 3k characters (search for prior intent, edit, record the decision, check, commit); its topic guidance, such as modeling claims or changing someone else's KB, loads only when the task needs it:

  • Plain-language answers. Ask "what governs checkout rounding?" and kb_search returns the current requirements with what each says and why it exists (its recorded reason, who gave it and when), the tests and decisions behind them, and what Kibi's checks say about each.

  • A review of every change. kb_check on the files the agent touched quotes the requirements that code implements and flags new code no requirement covers.

  • Safe writes. Every write can be previewed first, and a plan you approve lands in full or not at all.

  • Other repositories' knowledge, read-only. Declare a repository your code depends on in .kb/dependencies.json, pin it with kibi deps lock, and kb_search (or kibi search --kb <name>) answers from that repository's own KB at the pinned commit. Its KB stays separate from yours, is never written to, and can be on an older KB schema (6 or later).

The MCP reference lists every tool. Generic agents can start from agent onboarding.

See how strong each guarantee is

npm exec -- kibi report --open

kibi report writes a self-contained kibi-report/index.html and kibi-report/badge.svg from one coverage snapshot. % tested is the share of current requirements with fresh end-to-end evidence on the current code; the report lists what is tested, what is missing evidence, what contradicts, and what has gone stale.

Every requirement also carries an evidence level, so no guarantee reads stronger than what backs it: proved (every claim of the requirement holds for every case, backed by fresh certificates from an exhaustive, typecheck, arithmetic, smt, rule, state_machine, regex or source proof contract that names the claim, which a separate checker re-checks; claims need not be numbers: permission rules, every-member properties, state transitions, states that can never be reached, required fields and string formats are decided exactly against the code, and a source proof checks routes, database schemas, configuration, validators and code references that Kibi reads from the project itself), tested (fresh end-to-end receipts cover every linked scenario), asserted (a person stands behind it, but nothing current checks it) and unverified (an agent wrote it and no person approved it). kibi coverage returns evidenceLevel per requirement and summary.evidenceLevels counts; the report and kibi signoff show it next to firmness. See the proof ladder, proving requirements for the certificate proof kinds, and reading the report.

The knowledge base itself is checked the same way. kibi check (and kb_check for agents) proves that the facts your requirements state are consistent (one value satisfies every fact on a property, every decision has one outcome) and that stored rules are stratified, and leaves a certificate for each answer that a small separate checker re-checks. It also catches facts that contradict only together, which pairwise checks miss. A contradiction comes back as the smallest set of facts that cannot hold at once; anything it cannot compare is reported as unresolved, never as consistent.

Before you sign off on a change, kibi signoff shows the requirements it adds, rewrites or affects, each quoted with its firmness, proof state and evidence level, with a change of the Kibi level or a lowered evidence floor listed as a decision only you make, and kibi signoff --questions numbers the decisions waiting for you next to the rule each one would change. Agents put the view in their reply as plain Markdown, so it renders wherever the agent writes, including chat apps and cloud sessions where replies go through a messaging tool; the same view is a self-contained page in .kb/briefs/signoff/latest.html. Claude Code, Cursor, ZCode and OpenCode add a /kibi-signoff command, OpenCode draws the view as a card, VS Code opens it in a panel, and the agent hooks ask for it once a session has written requirements.

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 action that keeps pull requests mergeable when only Kibi's own files conflict, which GitHub's own merge check cannot resolve. Symbol line positions are never committed: every kibi sync derives them into a gitignored cache, so two branches that edit the same source file do not conflict over them.

For day-to-day inspection, kibi status, kibi search, kibi gaps, kibi coverage, and kibi check are in the CLI reference.

How it works

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
Tested 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.

What Kibi enforces

Kibi maintains a canonical traceability and proof chain:

%%{init: {"flowchart": {"curve": "basis", "nodeSpacing": 40, "rankSpacing": 70}} }%%
flowchart LR
    subgraph code["Your code"]
        direction TB
        SYM["⚙️ <b>Production code</b>"]
        TSYM["🧾 <b>Test code</b>"]
    end

    subgraph intent["Intent"]
        direction TB
        REQ["📋 <b>Requirement</b><br/><small>what it must do, and why</small>"]
        FACT["🔣 <b>Facts and rules</b><br/><small>typed, Prolog-checked</small>"]
    end

    subgraph behaviour["Behaviour"]
        direction TB
        SCEN["🎬 <b>Scenario</b><br/><small>given / when / then</small>"]
        TEST["🧪 <b>Test</b>"]
    end

    EV[("✅ <b>Fresh evidence</b><br/><small>bound to the commit</small>")]

    SYM == implements ==> REQ
    REQ -- "requires_property<br/>requires_predicate" --> FACT
    REQ == specified_by ==> SCEN
    SCEN == verified_by ==> TEST
    SYM -. covered_by .-> TEST
    TSYM -- executable_for --> TEST
    TEST == receipts ==> EV

    classDef intent fill:#ede9fe,stroke:#7c3aed,stroke-width:2px,color:#2e1065
    classDef behaviour fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#172554
    classDef code fill:#fef3c7,stroke:#d97706,stroke-width:2px,color:#451a03
    classDef evidence fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#052e16
    class REQ,FACT intent
    class SCEN,TEST behaviour
    class SYM,TSYM code
    class EV evidence
    style code fill:transparent,stroke:#d97706,stroke-dasharray:4 4,color:#b45309
    style intent fill:transparent,stroke:#7c3aed,stroke-dasharray:4 4,color:#6d28d9
    style behaviour fill:transparent,stroke:#2563eb,stroke-dasharray:4 4,color:#1d4ed8
    linkStyle default stroke:#64748b

For a requirement to be tested end to end rather than merely documented:

  • Every behavioral production symbol must trace to the requirement it implements. A schema constant or type can be recorded with a non-behavioral symbol_role and no link. When the pre-commit hook refuses a new declaration that nothing owns, it prints one block for it: the requirements the rest of its file implements, each with a paste-ready kb_upsert input (implementedBy with coveredBy), and Kibi never picks one.

  • Every normative requirement clause must be modeled as typed facts or stay explicitly unresolved.

  • Requirements must be specified by scenarios, and tests must verify those scenarios. A success scenario that assumes something a current requirement forbids blocks proof.

  • Executable test symbols must identify the code that actually performs the verification.

  • Proof-bearing production symbols must be covered by qualifying tests, and the pre-commit hook applies the same rule as the full check.

  • The pre-commit hook judges a commit only on the declarations it adds or changes, so an older repository whose KB records only its deciding code can adopt Kibi without first recording every declaration. kibi check counts the unrecorded rest as non-blocking symbol debt on its one-line verdict (kibi check --symbol-debt lists it), and every commit that touches it records it.

  • kibi check --changed (kb_check with changed: true for agents) gives the pre-commit hook's verdict on every current change before anything is staged, without touching the index, and every finding says whether it blocks the commit (blocks: "commit"), the merge ("merge") or nothing ("none"). The agent hooks recommend it after each edit.

  • End-to-end evidence must be fresh and bound to the current code snapshot, so CI and a local checkout of the same commit agree.

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.

Prolog as the safety layer

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.

Why this is possible now

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.

What Kibi models

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. A requirement whose behavior is gone without a replacement is retired with a reason, so it stops governing; a closed one is done and still holds. How Kibi works has the details.

When the agent records a rule you stated, one kb_record call (kibi record --input - without MCP) takes the rule, your reason, who said it, your words and the code that implements it. Kibi turns that into one kb_upsert write, checked exactly as a hand-written one, and returns the commit gate's verdict on the result: whether a commit would pass and which findings block it. The result lists what the checks still need (the subject the rule is about, a scenario, a test) as ready calls, and names the current requirements on the same terms, so an older version of the rule is superseded rather than left beside the new one. Facts, links, updates and other modeling stay on kb_upsert.

Packages

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-antigravity

Antigravity rules, skills, MCP (roots/list + worktree routing), requirement context, firm-edit confirmation, and stop reminders

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 (marketplace or local checkout)

kibi-vibe

Mistral Vibe skills, MCP with automatic WSL/Windows runtime detection, and context 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 queries; each grammar is a kibi-lang-* pack)

kibi-lang-*

Data-only grammar packs for kibi-plugin-treesitter: python, go, rust, java, csharp, php, c, cpp, bash, ruby, hcl, prolog

kibi-plugin-ui

Experimental check policy keeping UI components on their agreed design patterns

kibi-plugin-search-hints

Default offline meaning ranking for every kb_search (opt out with kibi.declinedPlugins)

kibi-swipl

Bundled SWI-Prolog runtime; the matching platform build installs automatically

Documentation

The guide and reference are published at https://looted.github.io/kibi/. Language models can start from the documentation index.

Beta status

Kibi 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 sends anonymous usage statistics (operation names, durations, error categories and versions, never code, paths, queries or KB content) to help prioritize fixes. Turn them off with kibi telemetry disable, KIBI_TELEMETRY=0 or DO_NOT_TRACK=1; see Usage telemetry.

Kibi is licensed under AGPL-3.0-or-later. Contributions are welcome under the Contributor License Agreement; see CONTRIBUTING.md.

Available Tools

18 tools
kb_apply_planA
Destructive

Apply an explicitly approved kibi.bootstrap-plan.v1, kibi.compile-plan.v1, kibi.migration-plan.v2, or entity-deletion plan after revalidating its canonical hash and live snapshots. Compile plans apply all-or-nothing: a durable journal records every source write and store mutation before the first write, all steps commit in one store transaction, and an interrupted application is completed or rolled back by the next mutating call. Bootstrap actions are dependency-ordered, sequential, source-first, and recoverable from a typed journal.

Inputs: plan, async, workspaceRoot, approvedPlanHash, +2 more. Returns: data, error, status, effects, +5 more

kb_checkA
Read-onlyIdempotent

Run KB validation rules and return violations, quality diagnostics, and typed kibi.migration-plan.v2 actions. Use before or after mutations and after source edits; checks remain read-only and never infer or apply actions from prose suggestions.

Inputs: async, rules, staged, changed, +7 more. Returns: data, error, status, effects, +5 more

kb_compile_intentA
Read-onlyIdempotent

Compile complete change intent into a deterministic, snapshot-bound read-only plan. Use it before editing code for a change request that may touch several requirements; use kb_model for one requirement's prose and kb_plan_bootstrap for first-time onboarding. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.

Inputs: mode (required), intent (required), title, clauses, +12 more. Returns: data, error, status, effects, +5 more

kb_coverageA
Read-onlyIdempotent

Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Use it to ask which requirements are tested end to end, how strong each requirement's evidence is (evidenceLevel: proved, tested, asserted or unverified), and what blocks the rest; use kb_find_gaps for a plain list of missing links and kb_check for rule violations. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.

Inputs: by, kb, tags, limit, +10 more. Returns: data, error, status, effects, +5 more

kb_deleteA
Destructive

Delete entities by ID, or exact relationship triples. Use only for intentional removals after dependency checks. Do not use as a bulk cleanup shortcut. An entity authored in a Markdown or YAML source is not deleted directly: the call writes nothing and returns outcome plan_returned with a hash-bound deletionPlan and a nextActions entry holding the exact kb_apply_plan input ({plan, approvedPlanHash}); apply that unmodified, or repeat this call with approvedPlanHash = deletionPlan.planHash to apply the freshly computed plan in one step (a stale or different hash fails with DELETE_PLAN_HASH_MISMATCH and writes nothing). Authored requirements are never deleted: outcome supersession_required points to kb_upsert with a supersedes relationship. dryRun:true previews any delete and writes nothing. Side effects: mutates and saves KB and authored sources; skips entities with dependents; dryRun and plan_returned write nothing.

Inputs: ids, dryRun, relationships, workspaceRoot, +1 more. Returns: data, error, status, effects, +5 more

kb_find_gapsA
Read-onlyIdempotent

List KB entities by the relationships they lack or have. Use for questions like which requirements lack scenarios or tests; all filters must match, and a relationship counts in either direction. Use kb_coverage instead for proof status and repair plans, and kb_check for rule violations. No mutation side effects.

Inputs: kb, tags, type, limit, +5 more. Returns: data, error, status, effects, +5 more

kb_graphA
Read-onlyIdempotent

Run bounded graph traversal from one or more seed IDs across curated relationship types and return the nodes and edges reached. Use it to follow links from IDs you already have, such as a requirement to its scenarios and tests or a symbol to the requirements it implements; use kb_query to find entities by filter and kb_search to ask a question. Traversal stops at depth, maxNodes or maxEdges and then sets truncated. No mutation side effects.

Inputs: seedIds (required), kb, depth, maxEdges, +5 more. Returns: data, error, status, effects, +5 more

kb_ingest_proofA
Destructive

Ingest a producer-emitted kibi.proof-run.v1 artifact and evaluate it against each selected test's kibi.proof-contract.v1 proof obligations. Revalidates the live workspace snapshot, integration command binding, run-level outcome, attempt history, success policy, and append-only proof-receipt history before deriving and appending idempotent kibi.proof-receipt.v1 receipts. Producers report what happened; Kibi evaluates proof. Prefer kibi prove so the configured producer runs automatically; direct ingestion is an integration path for custom producers and agents.

Inputs: artifact (required), snapshot (required), testIds, workspaceRoot. Returns: data, error, status, effects, +5 more

kb_modelA
Read-onlyIdempotent

Turn requirement prose into checkable structure without writing the KB. Use it for one requirement's prose; to plan a whole change request use kb_compile_intent. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.

Inputs: mode (required), text (required), id, type, +25 more. Returns: data, error, status, effects, +5 more

kb_plan_bootstrapA
Read-onlyIdempotent

Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Use it only to onboard a repository whose KB is empty or incomplete (the kibi-bootstrap skill drives it); for a change in an onboarded project use kb_compile_intent. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.

Inputs: entityTypes, maxCandidates, minConfidence, workspaceRoot, +2 more. Returns: data, error, status, effects, +5 more

kb_prepare_impact_reviewA
Read-onlyIdempotent

Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Use it when kb_check reports that changed files need an impact review; it does not plan KB changes. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.

Inputs: scope (required), workspaceRoot. Returns: data, error, status, effects, +5 more

kb_queryA
Read-onlyIdempotent

Read entities from the KB with exact filters, or ask typed fact questions. Use for lookup by id, type, tags or sourceFile, and for precise questions about modeled facts: predicate facts by name with named arguments (predicate + where), property facts of a subject (subjectKey + propertyKey), the domain view of a subject (factKind 'subject' + subjectKey: its definition, broader and narrower subjects, every current requirement about it and the claims and scenarios on it), or the catalog of facts of one kind (factKind; 'predicate_schema' lists the predicates you can ask about with their argument names and constants). Typed answers return matching fact rows plus factQuery: the schema used, distinct counts, values that do exist when nothing matched, warnings about the question and the next call to make. Read-only. Tags filter by metadata tags only, not entity IDs.

Inputs: id, kb, args, tags, +15 more. Returns: data, error, status, effects, +5 more

kb_recordA
Destructive

Record a rule as it is stated: statement, why, saidBy, quote, code and an optional test. Kibi writes it as one kb_upsert payload and returns the commit gate's verdict (commitAllowed, findings with blocks) and the steps left as nextActions. dryRun:true returns the payload and writes nothing. Facts, links, updates and other modeling: kb_upsert.

Inputs: why (required), code (required), saidBy (required), statement (required), +4 more. Returns: data, error, status, effects, +5 more

kb_review_firm_editA
Idempotent

Record your verdict on a change to code that implements a current firm requirement: keeps (the code still does what it says) or changes. kibi check --staged blocks such a change until each edited symbol has a current keeps receipt. A receipt is your judgment, not the person's approval. staged:true reviews the code and requirement in the Git index, as the commit gate reads them. Side effects: writes .kb/firm-edit-reviews/ files; dryRun:true writes nothing.

Inputs: reviews (required), dryRun, staged, workspaceRoot. Returns: data, error, status, effects, +5 more

kb_skillsA
Read-onlyIdempotent

Read bundled Kibi agent skills (workflow guidance). action:list returns the catalog; action:load returns a skill's metadata, Markdown body, declared resources and content hash (start with id 'kibi-usage'); action:read returns one manifest-declared resource. Read-only; does not require Prolog.

Inputs: action (required), id, resource, workspaceRoot. Returns: data, error, status, effects, +5 more

kb_statusA
Read-onlyIdempotent

Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Call it first to orient on a branch or after a failed call; use kb_check for validation findings and kb_coverage for proof status. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.

Inputs: kb, workspaceRoot. Returns: data, error, status, effects, +5 more

kb_upsertA
Destructive

Create or update one entity and its relationships. Use it for modeling, updates and every write kb_record does not take (a newly stated rule is one kb_record call). dryRun:true validates without writing. Model prose with kb_model before hand-writing strict property or predicate facts. An update keeps what it leaves out: send the changed fields (with title and status) and only the links to add. Relationship endpoints must already exist. A requirement that contradicts a current one on the same subject is rejected; to replace it, add a supersedes link from the new requirement and upsert the old one with status closed. For a requirement send the statement as document.body and the reason as why (never invent one: write 'Reason not stated'); give other entities a prose body. A requirement write returns its open kb_check steps as nextActions. Side effects: writes KB; dryRun:true writes nothing.

Inputs: id (required), type (required), properties (required), why, +6 more. Returns: data, error, status, effects, +5 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 18 tools

    Disambiguation4/5

    Most tools target distinct lifecycle stages, and descriptions explicitly cross-reference alternatives such as kb_find_gaps vs kb_coverage and kb_model vs kb_compile_intent. A few adjacent read/model/plan tools remain subtle enough that an agent could still misselect without careful reading.

    Naming Consistency4/5

    All tools use a consistent kb_ prefix and snake_case, with mostly verb-led names like kb_search, kb_upsert, and kb_apply_plan. A handful of noun-only names such as kb_status, kb_skills, and kb_graph are minor deviations but remain readable.

    Tool Count3/5

    At 18 tools, the surface is heavy, especially with advanced operations for bootstrap planning, proof ingestion, impact review, and firm-edit review alongside core KB operations. Each tool has a role, but the set sits in the borderline-heavy range for a single MCP server.

    Completeness5/5

    The set covers lookup, search, traversal, status, modeling, create/update/delete, validation, planning, plan application, proof ingestion, and review workflows. For a requirements-oriented knowledge base, no obvious lifecycle gap remains.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI coding agents to query a team's institutional coding rules and lessons learned, resolving a project → framework → language → global scope hierarchy so only the entries relevant to the current task are returned instead of whole knowledge-base files. It also supports governed proposal approval, PR and feature audits, meeting-transcript extraction, optional semantic ranking, and access-controlled audit logging, while keeping Markdown files as the source of truth.
      28
      59 PyPI
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables coding agents to persist and retrieve ADR-style decisions and machine-checkable constraints as git-friendly markdown in a repository, linked to requirement ids, tests and commits. Agents can pull relevant context before a task, check a proposed change against accepted constraints before committing, and record, supersede or search decisions over a local stdio connection.
      7
      10 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives AI agents structured tools to maintain a living requirements traceability graph — requirements to user stories, cucumber scenarios, screens and phase results — so coverage and its trend across releases can be queried on demand and explored through a web dashboard.
      MIT