kibi-runtime 2.14.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine-daemon.js +99 -20
- package/dist/index.js +2283 -1797
- package/dist/skills/kibi-usage/SKILL.md +36 -1
- package/dist/skills/kibi-usage/resources/fact-lanes.md +4 -2
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: kibi-usage
|
|
3
3
|
name: Kibi Usage
|
|
4
4
|
description: Use Kibi's source-first, exact-Git, migration-aware, proof-aware operations safely across MCP or the trusted local CLI, including partial completion repair.
|
|
5
|
-
version: 2.15.
|
|
5
|
+
version: 2.15.2
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -82,6 +82,41 @@ different workspace than the one you asked for; its `detail.reason` says why.
|
|
|
82
82
|
Use the CLI from your working directory instead: `npx --no-install kibi ...`
|
|
83
83
|
runs where you are and needs no `workspaceRoot`.
|
|
84
84
|
|
|
85
|
+
## Reading a hook snippet
|
|
86
|
+
|
|
87
|
+
On hosts where Kibi hooks are installed, a short block
|
|
88
|
+
arrives before you read or edit a file whose symbols are linked to
|
|
89
|
+
requirements. It is projected from `.kb/symbols.yaml`, not from the store, so
|
|
90
|
+
it is a pointer to the knowledge, never proof. Each line answers one question:
|
|
91
|
+
|
|
92
|
+
- `Kibi knowledge for <path> (symbol manifest):` and the `- REQ-… — <symbol
|
|
93
|
+
titles>` rows: the requirements the file's symbols implement, lead
|
|
94
|
+
requirement first. Read the lead requirement with `kb_query({id})` before
|
|
95
|
+
changing behavior.
|
|
96
|
+
- `REQ-… must keep true: FACT-…` (edit only): the ground facts the lead
|
|
97
|
+
requirement requires. An edit that breaks one of them is a requirement
|
|
98
|
+
change: supersede and remodel the requirement, do not code around the fact.
|
|
99
|
+
- `Decision: ADR-…` (edit only): the decision behind the lead requirement.
|
|
100
|
+
- `Covered by: TEST-…` and `Test code for: …`: the tests that prove the
|
|
101
|
+
file's symbols; run or update them with the edit.
|
|
102
|
+
- `The edit is inside <symbol>, which implements REQ-…`: the symbol the edit
|
|
103
|
+
lands in.
|
|
104
|
+
- `Next layer: …`: the exact `kb_query` and `kb_search(... sourceLocations)`
|
|
105
|
+
calls that return the full detail.
|
|
106
|
+
- The `kb_check({sourceFiles:[…], includeImpactDiagnostics:true,
|
|
107
|
+
includeWorkingTreeDiff:true})` line (edit only): run it after the edit. The
|
|
108
|
+
Stop hook reminds you once per session of files edited without it.
|
|
109
|
+
|
|
110
|
+
A file already shown this session gets only the one-line `Kibi: this edit to
|
|
111
|
+
<path> is inside <symbol>` update; the facts and tests from its first snippet
|
|
112
|
+
still apply. `Kibi: no symbol in <path> is linked to a requirement yet` means
|
|
113
|
+
the file is unowned: find the governing requirement with `kb_search` and
|
|
114
|
+
`sourceLocations`, then link a symbol to it with `implements` through
|
|
115
|
+
`kb_upsert`. Without a readable manifest (`Kibi: the hook could not read
|
|
116
|
+
.kb/symbols.yaml`) snippets are off for this session; `kb_query({sourceFile})`
|
|
117
|
+
still answers and `kibi sync` regenerates the manifest. The search tip and the
|
|
118
|
+
`.kb/` note appear once per session and need no action.
|
|
119
|
+
|
|
85
120
|
## Safe workflow
|
|
86
121
|
|
|
87
122
|
1. Always discover before you mutate: start with `kb_search`, then exact-filter with `kb_query`. Use
|
|
@@ -68,14 +68,16 @@ id: FACT-SUSPENDED-PUBLISH-DENIED
|
|
|
68
68
|
status: active
|
|
69
69
|
fact_kind: predicate
|
|
70
70
|
predicate_name: permission_rule
|
|
71
|
-
predicate_args: [suspended_user, publish,
|
|
71
|
+
predicate_args: [suspended_user, publish, article, deny]
|
|
72
72
|
polarity: deny
|
|
73
|
-
canonical_key: permission_rule(suspended_user,publish,
|
|
73
|
+
canonical_key: permission_rule(suspended_user,publish,article,deny)
|
|
74
74
|
claim_key: <advisor-issued key for this exact clause>
|
|
75
75
|
claim_text: Suspended users must not publish articles.
|
|
76
76
|
relationship: { type: requires_predicate, from: REQ-SUSPENDED-PUBLISH-DENIED, to: FACT-SUSPENDED-PUBLISH-DENIED }
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
Inferred bindings drop the article and singularise the resource (`articles` becomes `article`, `any analysis request` and `analysis requests` both become `analysis_request`), so an allow and a deny on the same actor, action and resource share one key. Grants read the same as `allowed`: `may`, `can`, `is allowed to`, `are permitted to`, `must be able to`, `are able to`, `have permission to` and `are entitled to` all select `permission_rule` with `polarity: assert`.
|
|
80
|
+
|
|
79
81
|
If another current requirement links an `assert` fact with the same predicate namespace, name, and ordered arguments, `domain-contradictions` reports the pair. More complex semantic conflicts require a shared canonical schema and arguments; do not assume Kibi can prove arbitrary equivalence between differently shaped predicates.
|
|
80
82
|
|
|
81
83
|
The full logical representation of a requirement is the conjunction of all of its linked ground property and predicate terms. Conditions, exceptions, permissions, and ordering constraints remain explicit arguments of their declared schemas. Contradiction detection therefore depends on equivalent prose reusing the same predicate name, argument roles, ordered canonical values, and opposing polarity rather than inventing synonymous terms.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-runtime",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"description": "Narrow first-party runtime contracts and adapters for Kibi operations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"gray-matter": "^4.0.3",
|
|
21
|
-
"kibi-core": "^0.
|
|
22
|
-
"kibi-plugin-builtin": "^0.5.
|
|
21
|
+
"kibi-core": "^0.21.0",
|
|
22
|
+
"kibi-plugin-builtin": "^0.5.1",
|
|
23
23
|
"kibi-swipl": "^1.0.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|