kb_record
Records a stated rule with rationale, author, quote, implementing code and optional test, submits it as a knowledge-base upsert, and returns the commit gate verdict, findings and next actions.
Instructions
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"statement": "<statement>",
"why": "<why>",
"saidBy": "<saidBy>",
"code": "<code>"
},
"name": "kb_record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | Yes | Why it exists, in their words; 'Reason not stated' if none given. | |
| code | Yes | Declarations that implement it, each {file, symbol}. | |
| test | No | An existing TEST id that checks it. | |
| quote | No | Their words, recorded as origin.ref; a firm rule needs one. | |
| dryRun | No | Return the kb_upsert payload; write nothing. | |
| saidBy | Yes | user or maintainer (firm), or agent (default). | |
| statement | Yes | The rule as one testable must sentence. | |
| workspaceRoot | No | Optional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| status | Yes | ||
| effects | Yes | ||
| operation | Yes | ||
| diagnostics | Yes | ||
| nextActions | Yes | ||
| kibiProtocol | Yes | ||
| resultVersion | Yes |