kibi-mcp

v3.29.0
io.github.Looted/kibi-mcp Checked 8 hours ago Published 13 days ago

Kibi requirements, traceability, and proof MCP.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

kb_query

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 n…

ParameterTypeDescription
argsarrayPositional argument values for a predicate with no schema; null matches any. Prefer where.
distinctstringOptional argument name whose distinct values to count across the matching predicate facts.
factKindstringTyped fact filter: list facts of one kind; 'predicate_schema' returns the catalog of askable predicates.
idstringOptional exact entity ID. Example: 'REQ-cli-gc'. If omitted, returns matching entities by other filters.
includeBodybooleanWith id only: also return the entity's authored Markdown body. Default: false.
kbstringOptional KB dependency name from .kb/dependencies.json to read, at its pinned commit, instead of this project's KB.
limitnumberOptional max rows to return after filtering. Default: 100 when omitted. Example: 25.
namespacestringOptional predicate namespace when the same name exists in several. Default: any namespace.
offsetnumberOptional zero-based pagination offset. Default: 0. Example: 50 to skip first 50 rows.
polaritystringOptional polarity filter for predicate facts. Default: both.
predicatestringTyped fact filter: predicate name to ask about; returns its stored facts with arguments, polarity and effect.
propertyKeystringOptional property key under subjectKey, e.g. 'max_roles'. Returns operator, value and unit of each fact.
scopestringOptional: 'current_requirements' keeps only facts a current (not superseded or retired) requirement requires.
sourceFilestringOptional source-file substring filter. Example: 'src/auth/login.ts'. Uses KB source linkage, not file-system scanning.
subjectKeystringTyped fact filter: dotted subject key whose property facts to list; combine with propertyKey or factKind 'subject'.
tagsarrayOptional tag filter. Matches entities that contain any provided tag. Example: ['security','billing'].
typestringOptional entity type filter. Allowed: req, scenario, test, adr, flag, event, symbol, fact. Example: 'req'.
whereobjectNamed argument values for predicate, using the names from its schema.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_status

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.

ParameterTypeDescription
kbstringOptional KB dependency name from .kb/dependencies.json to read, at its pinned commit, instead of this project's KB.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_skills

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.

ParameterTypeDescription
action *stringlist, load (needs id) or read (needs id and resource).
idstringBundled skill ID. Example: 'kibi-usage'.
resourcestringManifest-declared resource path to read. Example: 'resources/workflows.md'.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_find_gaps

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.

ParameterTypeDescription
kbstringOptional KB dependency name from .kb/dependencies.json to read, at its pinned commit, instead of this project's KB.
limitintegerMaximum rows to return; count reports the full total.
missingRelationshipsarrayRelationship types the entity must have none of, e.g. specified_by or verified_by.
offsetintegerZero-based row offset for pagination.
presentRelationshipsarrayRelationship types the entity must have at least one of each, in either direction.
sourceFilestringKeep entities whose source path contains this substring.
tagsarrayKeep entities carrying any of these metadata tags.
typestringOnly report entities of this type. Omit for all types.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_coverage

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…

ParameterTypeDescription
bystringReport shape: req (proof status and repair plan), symbol (ownership coverage) or type (counts per type).
includeMigrationPreviewbooleanOpt in to a deterministic, read-only kibi.legacy-migration-plan.v1 preview for ready semantic-inventory repair batches.
includePassingbooleanAlso return rows that are already tested or not applicable. By default only rows that still need repair are returned.
includeTransitivebooleanCount symbol coverage reached transitively through linked entities, not only direct links.
kbstringOptional KB dependency name from .kb/dependencies.json to read, at its pinned commit, instead of this project's KB.
limitintegerMaximum rows to return. When the repair plan reports scope.complete false, rerun with offset 0 and a larger limit.
migrationLimitintegerMaximum requirement migration batches to preview. Defaults to one review batch.
migrationOffsetintegerZero-based offset into ready semantic-inventory batches.
migrationPredicateLimitintegerMaximum exact predicate-schema candidates retained per assertive proposition.
migrationPredicateMinScorenumberMinimum deterministic predicate-schema rank score retained in migration previews.
offsetintegerZero-based row offset for pagination.
statusesarrayreq mode: include only rows whose proofStatus is listed. The summary always covers the whole KB.
tagsarrayKeep rows for entities carrying any of these metadata tags.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_graph

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.

ParameterTypeDescription
seedIds *arrayEntity IDs to start from, for example REQ-... or SCEN-.... Seeds are always returned as nodes.
depthintegerNumber of hops from the seeds.
directionstringoutgoing follows links from each node, incoming follows links pointing at it, both does either.
entityTypesarrayKeep only nodes of these types and the edges between them; traversal still passes through other types.
kbstringOptional KB dependency name from .kb/dependencies.json to read, at its pinned commit, instead of this project's KB.
maxEdgesintegerStop and set truncated once this many edges are reached.
maxNodesintegerStop and set truncated once this many nodes are reached.
relationshipsarrayRelationship types to follow, e.g. specified_by, verified_by or implements. Omit to follow every type.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_model

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-f…

ParameterTypeDescription
mode *stringanalyze (advisor receipt), requirement (strict claim write set) or predicates (ontology predicate plan).
text *stringRequired prose requirement text to model. Example: 'Customer data must be retained for 7 years.'
argumentBindingsobjectOptional exact predicate argument values keyed by argument name; required when binding_status is incomplete.
claimKeystringOptional advisor-issued claim key for the exact proposition represented by logic.
claimTextstringOptional exact proposition text represented by logic; defaults to text.
clausesarrayOptional complete list of atomic clauses; each must be a verbatim fragment of text.
confidencenumberConfidence of the extracted claim: >= 0.70 yields strict-lane output, lower yields observation-only output.
existingLogicClaimsarrayExisting requirement logic_claims values; the update merges the new claim key into them.
idstringOptional requirement ID used for deterministic draft relationship guidance.
includeExistingSchemasbooleanWhether to include the KB's predicate_schema facts beside the built-in predicate catalog. Default: true.
interpretationsarrayOptional typed kibi.logic.v1 interpretations from the host model; raw Prolog is not accepted.
logicobjectOptional typed kibi.logic.v1 IR. Kibi validates and canonicalizes it into a rule fact; raw Prolog is rejected.
maxCandidatesintegerMaximum ranked predicate candidates to return. Default: 5.
minScorenumberMinimum candidate score. Higher values make ontology-gap fallback more likely. Default: 0.35.
operatorstringOptional claim operator, e.g. eq, gt, lt; sets take eq, includes, subset_of or excludes; matches takes a regex.
polarityHintstringOptional reviewed polarity override when surface negation does not mean predicate denial.
propertyKeystringOptional extracted semantic claim propertyKey. Example: 'Retention Years'.
provenancestringOptional extracted text reference; falls back to source. Example: '.kb/requirements/customer-retention.md#L1'.
requirementIdstringOptional requirement ID the strict write set updates instead of minting a REQ-AUTO id.
schemaIdstringOptional exact reviewed predicate schema ID to use instead of rank order; fails closed if unavailable.
sourcestringOptional primary source path used for stable IDs and text refs.
sourceFilesarrayOptional related source files. The first value is used as the source fallback when source is omitted.
statusstringOptional requirement status for draft suggestions.
subjectHintstringOptional canonical subject key to use as the first predicate argument. Example: 'editor.annotation'.
subjectKeystringOptional extracted semantic claim subjectKey. Example: 'Customer.Data'.
titlestringOptional requirement title for draft apply plans.
typestringEntity type context for analysis; only requirements receive deterministic modeling suggestions.
valueOptional claim value: string, number, boolean, or a list of strings for a set claim.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_upsert

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…

ParameterTypeDescription
id *stringUnique entity ID named by the behavior it governs (<TYPE>-<area>-<behavior>); an existing ID updates the entity.
properties *objectEntity fields; must include title and status. Fact, symbol, test and proof fields: kibi-usage resource operation-fields.
type *stringEntity type to create/update. Allowed: req, scenario, test, adr, flag, event, symbol, fact. Example: 'req'.
documentobjectOptional source document write; omit body on update to keep it. New requirements take statement, Context, Source.
dryRunbooleanValidate and preview without writing the KB or workspace; use it as the preflight before the real write.
implementedByarrayreq only: declarations that implement it, each {sourceFile, symbol, coveredBy?}; linked by implements (and covered_by).
plannedFactsarraydryRun only: fact payloads (e.g. kb_model applyPlan entries) staged before this one, so their links resolve.
relationshipsarrayOptional relationship rows to create in the same call; asserts edges in the KB.
whystringreq only: why it exists, in the asker's words.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_record

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.

ParameterTypeDescription
code *arrayDeclarations that implement it, each {file, symbol}.
saidBy *stringuser or maintainer (firm), or agent (default).
statement *stringThe rule as one testable must sentence.
why *stringWhy it exists, in their words; 'Reason not stated' if none given.
dryRunbooleanReturn the kb_upsert payload; write nothing.
quotestringTheir words, recorded as origin.ref; a firm rule needs one.
teststringAn existing TEST id that checks it.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_delete

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_MISMA…

ParameterTypeDescription
approvedPlanHashstringWith ids only: the deletionPlan.planHash a prior call returned; applied only while the hash still matches.
dryRunbooleanPreview without writing: returns what a commit would delete and write.
idsarrayEntity IDs to delete after dependency checks.
relationshipsarrayExact relationship triples to retract, including legacy shard records.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_check

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.

ParameterTypeDescription
asyncbooleanWhen true, run as a background job and return a kibi.job.v1 receipt to poll with kb_job_status.
changedbooleanWhen true, give the commit gate's verdict on every current change (commitAllowed, findings with blocks).
includeImpactDiagnosticsbooleanWhen true, include changed-file impact diagnostics (granularity, ownership, statements to verify) in the output.
includeMigrationPlanbooleanReturn the full migrationPlan (for kb_apply_plan) even when the result would show only its summary.
includeSymbolDebtbooleanWithout rules or sourceFiles: list unrecorded declarations per file (symbolDebt has counts only by default).
includeWorkingTreeDiffbooleanWhen true, inspect unstaged working-tree diffs for impact diagnostics; pair with sourceFiles to scope.
maxDiagnosticsintegerOptional maximum number of impact diagnostics to return. Graph validation violations are not capped by this value.
rulesarrayOptional rule names (an unknown one is refused with the list). Omit to run every rule plus the full-KB audit.
sourceFilesarrayOptional repo-relative source files to inspect for impact diagnostics; scopes violations to what they touch.
stagedbooleanWhen true, inspect staged source changes for impact diagnostics, as kibi check --staged does.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_review_firm_edit

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.

ParameterTypeDescription
reviews *array
dryRunboolean
stagedboolean
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_prepare_impact_review

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.

ParameterTypeDescription
scope *{"kind":"staged"} for the staged snapshot, or {"kind":"diff","baseCommit","headCommit"} with full hashes.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_plan_bootstrap

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.

ParameterTypeDescription
bootstrapContextobjectOptional declared bootstrap context supplied by the agent to ground the read-only synthesis output.
entityTypesarrayOptional filter to limit candidate generation to specific entity types.
includeGenericMarkdownbooleanWhether to include generic markdown content as candidate facts. Default: true, or false with declared intentClaims.
maxCandidatesintegerBudget for candidates Kibi discovers itself; declared intentClaims are never capped. Clamped to [1, 200]. Default: 50.
minConfidencenumberMinimum confidence threshold for candidates. Clamped to [0.60, 0.95]. Default: 0.80.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_compile_intent

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 re…

ParameterTypeDescription
intent *stringComplete post-change normative intent. Send the desired behavior, not a patch fragment.
mode *stringCreate a new requirement or update an existing one.
clausesarrayOptional atomic clause decomposition; each clause must be a verbatim fragment of intent.
conflictReviewsarrayYour verdict on each reviewCandidates entry of a previous compile; a conflict verdict blocks the plan.
contextstringWhy the requirement exists and who asked; required for create. Write 'Reason not stated' rather than invent one.
interpretationsarrayOptional host-supplied typed kibi.logic.v1 interpretations; Kibi validates them before including rule steps.
proposalDecisionsarrayExplicit decisions for deterministic traceability proposals. Pending proposals never enter steps.
requirementIdstringOptional exact requirement ID. Required for an update when automatic selection is below the confidence and margin gates.
scenarioDraftsarrayOptional scenario drafts. Each is linked requirement -> scenario with specified_by.
semanticFacetsobjectHost-agent facets forwarded to deterministic intent-v1 discovery.
sourceExcerptstringOptional verbatim text the intent came from, quoted in the Source section; requires context.
sourceLocationsarrayWorkspace-relative source coordinates used for discovery and before-hash binding.
sourceReferencestringOptional locator of the source text (ticket id, URL, path) for the Source section; requires context.
testDraftsarrayOptional test drafts. Tests are attached to scenarios with verified_by; direct req -> test proof links are not emitted.
titlestringOptional requirement title; existing title is preserved for updates when omitted.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_apply_plan

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.

ParameterTypeDescription
approvedActionIdsarrayRequired for migration-plan.v2: the exact action IDs approved for this application.
approvedPlanHashstringExact SHA-256 planHash returned by kb_plan_bootstrap, kb_compile_intent, or another approved plan after human review.
asyncbooleanMCP only: when true, run as a background job and return a kibi.job.v1 receipt to poll with kb_job_status.
planobjectThe complete bootstrap, compile, migration or hash-bound entity-deletion plan object to apply.
recoveryJournalIdstringRecovery journal id from a committed_with_repairs result or PLAN_APPLY_RECOVERY_REQUIRED error, to resume.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.

kb_ingest_proof

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.

ParameterTypeDescription
artifact *objectProducer-emitted kibi.proof-run.v1 artifact, from kibi prove or a direct call; Kibi evaluates the obligations.
snapshot *stringWorkspace snapshot captured immediately before the run.
testIdsarrayExisting test entities with proof_contract.v1. Omit to evaluate every test contracted to the artifact's integration.
workspaceRootstringOptional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's.