kibi-cursor 2.6.11 → 2.7.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/.cursor-plugin/plugin.json +1 -1
- package/CHANGELOG.md +27 -0
- package/agent-plugin/plugin.json +1 -1
- package/agent-plugin/skills/kibi-traceability/SKILL.md +6 -4
- package/agent-plugin/skills/kibi-usage/SKILL.md +59 -12
- package/agent-plugin/skills/kibi-usage/resources/fact-lanes.md +1 -1
- package/agent-plugin/skills/kibi-usage/resources/source-authoring.md +4 -2
- package/agent-plugin/skills/kibi-usage/resources/ui-requirements.md +2 -2
- package/agent-plugin/skills/kibi-usage/resources/workflows.md +1 -1
- package/dist/.cursor-plugin/plugin.json +1 -1
- package/dist/skills/.canon-hash.json +6 -6
- package/dist/skills/kibi-traceability/SKILL.md +6 -4
- package/dist/skills/kibi-usage/SKILL.md +59 -12
- package/dist/skills/kibi-usage/resources/fact-lanes.md +1 -1
- package/dist/skills/kibi-usage/resources/source-authoring.md +4 -2
- package/dist/skills/kibi-usage/resources/ui-requirements.md +2 -2
- package/dist/skills/kibi-usage/resources/workflows.md +1 -1
- package/package.json +2 -2
- package/skills/.canon-hash.json +6 -6
- package/skills/kibi-traceability/SKILL.md +6 -4
- package/skills/kibi-usage/SKILL.md +59 -12
- package/skills/kibi-usage/resources/fact-lanes.md +1 -1
- package/skills/kibi-usage/resources/source-authoring.md +4 -2
- package/skills/kibi-usage/resources/ui-requirements.md +2 -2
- package/skills/kibi-usage/resources/workflows.md +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cursor",
|
|
3
3
|
"displayName": "Kibi",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.1",
|
|
5
5
|
"description": "Optional Cursor adapter for Kibi. Requires project-local kibi-cli, kibi-mcp, and kibi-core (SWI-Prolog is bundled on Linux and macOS) before the bundled MCP server can start.",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"author": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# kibi-cursor
|
|
2
2
|
|
|
3
|
+
## 2.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The bundled `kibi-usage` skill (2.16.1) now tells an agent that changes a grounded requirement's text to analyze the new prose with the requirement's `id` first, so the `Claim-key drift against the stored ledger` warning fires before any write, and it explains the two-sided proposition-complete error. Before, the Codex and Cursor packages would have kept shipping the 2.16.0 skill text after the CLI and MCP server already carried the new behavior.
|
|
8
|
+
|
|
9
|
+
Technical summary: the `skills/` mirrors in these packages are regenerated from the runtime skill canon; no code changes.
|
|
10
|
+
|
|
11
|
+
## 2.7.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 5ad4319: Requirements and ADRs can now say how firmly they were decided, so a later agent knows whether it may change a decision on evidence or must ask a human first. Mark a rule a person stated `firmness: firm` (it must cite their words in `origin.ref`, or `approval_ref` on a requirement), a guess `firmness: exploratory`, and leave the rest unset (`default`). `kibi check` now blocks a firm decision without that reference (Kibi checks that it is present, not that it is genuine), a decision that is not firm superseding a firm one, and a current requirement or ADR that supersedes another without a `## Why this changed` section naming the evidence. `kb_search` and `kb_query` show the firmness of each decision; the editor hooks label firm and exploratory ones.
|
|
16
|
+
|
|
17
|
+
Migration: this is a hard rollout with KB schema 9. Run `kibi migrate --yes` once; it records every supersede edge that predates the rule in the manifest (`supersedesReasonAcknowledged`, as `FROM -> TO`), so those do not block, and an advisory `supersedes-reason-acknowledged` diagnostic counts them. No source file is rewritten and no reason is invented. New supersedes must explain themselves, including a new one on an acknowledged decision.
|
|
18
|
+
|
|
19
|
+
Technical summary: new optional `firmness` property (`firm` | `default` | `exploratory`) on `req` and `adr` in the JSON schema, the `kb_upsert` input schema, the markdown extractor and the Prolog entity schema; the schema rejects it on other types. `kb_upsert` judges firmness as it will be written: an update that omits `firmness` keeps the stored value (also in the compiled store), and a write that leaves a decision firm without a reference is rejected. `decision-firm-superseded` checks every superseder, retired ones included, so a chain cannot launder a firm decision; shard edges from deleted entities are ignored. New rules `decision-firm-unreferenced`, `decision-firm-superseded` and `supersedes-reason-missing` (canonical, blocking) and `supersedes-reason-acknowledged` (info) read authored requirements, ADRs, front-matter `supersedes` links and relationship shards, so they agree before a sync. `LATEST_KB_SCHEMA_VERSION` is 9; the `decision-firmness-v9` migration step and the `supersedes-reason-acknowledge` fragment action write only `.kb/manifest.json`. Search answer rows and `kb_query` results carry the effective firmness of requirements and ADRs; hook snippets append `[firm]` or `[exploratory]`. The `kibi-usage` skill gains a "Decision firmness" section.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- adac6d1: `kb_delete` (and `kibi delete`) now treats a returned deletion plan as a result instead of an error. Deleting an entity authored in a Markdown or YAML file returns `outcome: "plan_returned"`, an empty `errors` list and a `nextActions` entry whose `input` is the exact `kb_apply_plan` call (`{plan, approvedPlanHash}`) to run unchanged; an authored requirement returns `outcome: "supersession_required"` with a `kb_upsert` supersession template. The `approvedPlanHash` input now works: repeating the delete with the plan's hash applies the freshly computed plan in one call, and a stale or different hash fails with `DELETE_PLAN_HASH_MISMATCH` without writing. A new `dryRun: true` input previews relationship and direct entity deletes (counts, source writes with hashes, skipped effects) without touching sources or the store.
|
|
24
|
+
|
|
25
|
+
Technical summary: `executeDelete` builds `nextActions` for the authored plan path, lists only real per-id failures in `errors` (plus any resolved non-authored id the plan does not cover), and on a matching `approvedPlanHash` delegates to `executeApplyPlan` under the lock it already holds, which gained an optional `onCommitted` callback so a post-commit failure is still classified as committed. Relationship deletes gain a dry-run branch after preflight that renders shard and authored-source patches without writing, using the new `planRelationshipShardRemovals` (which `removeRelationshipsFromShards` now wraps). The `kibi.kb_delete.v1` result adds optional `outcome`, `dryRun`, `wouldDelete`, `planHash`, `sourcePaths` and `recoveryJournalId`; the input schema adds `dryRun` and documents `approvedPlanHash`. MCP contract fixtures, the MCP, CLI and error references, and the bundled kibi-usage and kibi-traceability skills (with their host mirrors) are updated.
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [5ad4319]
|
|
28
|
+
- kibi-agent-core@0.4.0
|
|
29
|
+
|
|
3
30
|
## 2.6.11
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/agent-plugin/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "kibi",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.1",
|
|
5
5
|
"description": "Repo-local, per-branch, queryable knowledge base. Portable Agent Plugin packaging Kibi's Agent Skills and MCP server.",
|
|
6
6
|
"author": { "name": "Kibi" },
|
|
7
7
|
"homepage": "https://looted.github.io/kibi/",
|
|
@@ -43,10 +43,12 @@ sequential `kb_upsert`, then run final check and coverage. Kibi authors tracked
|
|
|
43
43
|
files transactionally but never Git-stages or commits them. Do not read or edit
|
|
44
44
|
`.kb` directly.
|
|
45
45
|
|
|
46
|
-
Use `kb_delete` only for intentional cleanup
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
Use `kb_delete` only for intentional cleanup; `dryRun: true` previews any
|
|
47
|
+
delete without writing. Authored entity deletion returns `outcome:
|
|
48
|
+
plan_returned` with a hash-bound plan whose `nextActions[0].input` is the exact
|
|
49
|
+
`kb_apply_plan` input; requirements return `supersession_required` and evolve
|
|
50
|
+
through a new requirement linked with `supersedes`. Relationship deletes patch
|
|
51
|
+
shards while preserving unrelated records.
|
|
50
52
|
|
|
51
53
|
## Typed recovery and proof
|
|
52
54
|
|
|
@@ -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.
|
|
5
|
+
version: 2.16.1
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -188,8 +188,9 @@ returns `status: error`, `MIGRATION_PLAN_REFUSED` and `data.outcome:
|
|
|
188
188
|
refused`: nothing changed, so read the action `detail` and get a new plan.
|
|
189
189
|
`data.outcome: reconciliation_required` (status success) means an action
|
|
190
190
|
failed mid-way: inspect its effect before retrying. `kb_delete` of an
|
|
191
|
-
authored entity returns status success with `deleted: 0
|
|
192
|
-
|
|
191
|
+
authored entity returns status success with `deleted: 0` and `outcome:
|
|
192
|
+
plan_returned` (or `supersession_required` for a requirement): nothing was
|
|
193
|
+
deleted yet, and `nextActions` names the call that does it. If the status is
|
|
193
194
|
`committed_with_repairs`, the mutation already committed: inspect failed effects,
|
|
194
195
|
execute each required repair action in order, and never retry the original
|
|
195
196
|
operation. Record effect failures, followed actions, and unsafe retries in
|
|
@@ -285,8 +286,13 @@ authored. Each one is the order the write path accepts.
|
|
|
285
286
|
existing entity, whose stored ledger Kibi keeps.
|
|
286
287
|
2. **Changing the text of a grounded requirement.** New prose means new
|
|
287
288
|
claim keys, so a bare rewrite is refused with `modeled proposition
|
|
288
|
-
claim_keys must match logical grounding target claim_keys exactly
|
|
289
|
-
|
|
289
|
+
claim_keys must match logical grounding target claim_keys exactly`; the
|
|
290
|
+
error names the modeled keys no fact declares and the facts whose keys
|
|
291
|
+
the ledger dropped. Analyze the new prose with the requirement's `id`
|
|
292
|
+
first: the receipt warns `Claim-key drift against the stored ledger`
|
|
293
|
+
and names the grounded clauses the new wording drops (the title worded
|
|
294
|
+
differently from the stored `semantic_text` is the usual cause), before
|
|
295
|
+
any write. Prefer supersession for a change of meaning: analyze the new prose,
|
|
290
296
|
write its facts, write the new requirement (`-v2`) with `supersedes` to
|
|
291
297
|
the old one, then set the old one to `status: closed`. Its scenario
|
|
292
298
|
follows the same rule as in recipe 1: create the new scenario (with
|
|
@@ -302,12 +308,18 @@ authored. Each one is the order the write path accepts.
|
|
|
302
308
|
between the two writes `kb_check` reports the requirement until the
|
|
303
309
|
second lands.
|
|
304
310
|
3. **Deleting authored entities.** `kb_delete` on an authored entity that
|
|
305
|
-
is not a requirement (scenario, test, fact, ADR, …)
|
|
306
|
-
`
|
|
307
|
-
`
|
|
308
|
-
|
|
309
|
-
`
|
|
310
|
-
|
|
311
|
+
is not a requirement (scenario, test, fact, ADR, …) writes nothing and
|
|
312
|
+
returns `outcome: plan_returned` with a hash-bound
|
|
313
|
+
`kibi.entity-deletion-plan.v1` in `deletionPlan`. After review, run
|
|
314
|
+
`nextActions[0]` unchanged: `kb_apply_plan` with its `input` (`plan` plus
|
|
315
|
+
`approvedPlanHash: plan.planHash`), or repeat the `kb_delete` call with
|
|
316
|
+
`approvedPlanHash` to apply the freshly computed plan in one step (a
|
|
317
|
+
changed source fails with `DELETE_PLAN_HASH_MISMATCH`). `dryRun: true`
|
|
318
|
+
previews relationship and direct deletes without writing. For an
|
|
319
|
+
authored requirement the result is `outcome: supersession_required`, the
|
|
320
|
+
plan carries `supersessionRequired: true` and both routes refuse it
|
|
321
|
+
(`REQUIREMENT_SUPERSESSION_REQUIRED`): Kibi never deletes an authored
|
|
322
|
+
requirement. Evolve it instead with a new
|
|
311
323
|
requirement linked by `supersedes` and close the old one, or, for an
|
|
312
324
|
agent-origin requirement nobody approved and nothing links to, upsert it
|
|
313
325
|
with `status: closed` (keep its `title`); it stays on disk as history. A
|
|
@@ -342,6 +354,29 @@ human sets `approved_by`; `kb_check` flags approvals an agent recorded without
|
|
|
342
354
|
corroboration. Never fill in an approval yourself. Record why a requirement
|
|
343
355
|
exists in `rationale`, or link the ADR that explains it.
|
|
344
356
|
|
|
357
|
+
## Decision firmness
|
|
358
|
+
|
|
359
|
+
Requirements and ADRs carry `firmness`, which says what you may do with them.
|
|
360
|
+
Search answers, `kb_query` rows and hook snippets show it (snippets label only
|
|
361
|
+
`[firm]` and `[exploratory]`; an unlabeled decision is `default`).
|
|
362
|
+
|
|
363
|
+
- `firm`: a human stated it as a rule. Follow it; to change it, ask first.
|
|
364
|
+
`kb_check` blocks a firm decision without `origin.ref` to their words, and
|
|
365
|
+
a replacement of a firm decision that is not itself firm.
|
|
366
|
+
- `default` (when absent): a delegated or agent choice. Follow it unless the
|
|
367
|
+
task gives evidence against it; then supersede it in the same change and
|
|
368
|
+
list it under "Decisions I changed" for review, without asking first.
|
|
369
|
+
- `exploratory`: a flagged guess; revisit it when you touch the area.
|
|
370
|
+
|
|
371
|
+
Set `firmness` from what a human actually said: only their stated rule is
|
|
372
|
+
`firm` (with `origin.ref`); "do whatever" or your own pick is `default`; a
|
|
373
|
+
guess is `exploratory`. A supersede needs `## Why this changed` in the new
|
|
374
|
+
entity's body (at least 12 words): name the evidence (a failing test, a
|
|
375
|
+
measured cost, a constraint the old decision missed, a new requirement) and
|
|
376
|
+
answer the old decision's reasoning; `kb_check` blocks it otherwise. A
|
|
377
|
+
preference is not evidence: propose it instead of superseding. Kibi checks
|
|
378
|
+
only that a firm decision has a reference; never cite words nobody said.
|
|
379
|
+
|
|
345
380
|
Conditional clauses ("only when", "only if", "must not ... unless") compile
|
|
346
381
|
into typed `forbid` rules linked by `requires_rule`, not property facts; one
|
|
347
382
|
`kb_model` or `kb_compile_intent` cannot translate stays an `ontology_gap`.
|
|
@@ -369,6 +404,8 @@ For each relational clause, call `kb_model` with `mode: "predicates"`, that clau
|
|
|
369
404
|
reviewed `schemaId`. If `binding_status` is `incomplete`, supply
|
|
370
405
|
`argumentBindings` and retry. Persist `fact_kind: predicate` with the same
|
|
371
406
|
`claim_key` / `claim_text`, then link `REQ -> fact` with `requires_predicate`.
|
|
407
|
+
`claim_key` is derived from `claim_text`, so a ground fact may send the exact
|
|
408
|
+
clause alone and Kibi fills the key in; a sent key must equal the derived one.
|
|
372
409
|
Use `kb_model` with `mode: "requirement"` for strict scalar clauses. Use
|
|
373
410
|
`fact_kind: observation` only for a true ontology gap. The manifest is not
|
|
374
411
|
grounding: run `logic-coverage` so each key binds to one ground fact.
|
|
@@ -419,7 +456,17 @@ a second grounding link would fail, so keep the existing link or apply the
|
|
|
419
456
|
`kb_delete` of the old link, requirement link; between the last two `kb_check`
|
|
420
457
|
reports both `logic-coverage` and `strict-req-fact-pairing` for the
|
|
421
458
|
requirement, as `expected.kbCheckAfterStep` states; run `kb_check` after the
|
|
422
|
-
last step and apply `rollback` if it is not clean)
|
|
459
|
+
last step and apply `rollback` if it is not clean). `keep_existing_grounding`
|
|
460
|
+
means the requirement already links a predicate fact with the candidate's
|
|
461
|
+
`canonical_key` (`existingGrounding[].matchedBy` is `canonical_key` when the
|
|
462
|
+
claim was worded differently), so write nothing. `extend_requirement` means
|
|
463
|
+
the requirement's proposition ledger has no entry for this text, so a link
|
|
464
|
+
cannot be made and no fact is planned: add the clause to the requirement's
|
|
465
|
+
prose (`mode: "requirement"`, or `kb_upsert` with the extended `semantic_text`
|
|
466
|
+
and the ledger `mode: "analyze"` returns) and call `mode: "predicates"` again.
|
|
467
|
+
Read `decisionConflicts` and its warnings whenever `plan` is null: they name
|
|
468
|
+
the stored decision facts the candidate would contradict and the requirements
|
|
469
|
+
that own them. `provide_argument_bindings` and `record_ontology_gap` mean
|
|
423
470
|
the same as for an ungrounded claim, and the gap observation is not a grounding
|
|
424
471
|
link, so write it exactly as returned (tags, `claim_text`, `document.body`, no
|
|
425
472
|
`claim_key`, no relationships). Record an ontology gap only when no returned schema fits the
|
|
@@ -6,7 +6,7 @@ Requirement prose remains the human-readable source. Facts add queryable semanti
|
|
|
6
6
|
|
|
7
7
|
Logical coverage is clause-based, not entity-based. Give `kb_model` (`mode: "analyze"`) the complete requirement body and verify that its `clauses` list contains every atomic obligation. Supply the `clauses` input yourself when automatic splitting would combine or omit obligations. For every normative clause:
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- put the exact clause as `claim_text` on its ground fact, with the returned stable key as `claim_key` or none (Kibi derives a missing key; a sent key must match);
|
|
10
10
|
- add the key to the exact current `logic_claims` set, removing only stale keys whose propositions no longer exist in the source;
|
|
11
11
|
- link it through exactly one `requires_property` for `property_value`, one `requires_predicate` for `predicate`, or one `requires_rule` for a safe `rule` fact;
|
|
12
12
|
- leave ambiguity and ontology gaps visibly unresolved—observations do not satisfy `logic-coverage`.
|
|
@@ -23,8 +23,10 @@ drift diagnostic. Unresolved Git index conflicts are likewise blocking; Kibi
|
|
|
23
23
|
never chooses a merge winner.
|
|
24
24
|
|
|
25
25
|
Relationship upserts and relationship deletes patch only the canonical shard,
|
|
26
|
-
preserving unrelated records. Authored entity deletion
|
|
27
|
-
|
|
26
|
+
preserving unrelated records. Authored entity deletion writes nothing and
|
|
27
|
+
returns a hash-bound plan (`outcome: plan_returned`); approve it by running the
|
|
28
|
+
returned `nextActions[0]` (`kb_apply_plan` with `{plan, approvedPlanHash}`)
|
|
29
|
+
unchanged, or by repeating `kb_delete` with `approvedPlanHash`. Evolve requirements with a new
|
|
28
30
|
requirement and `supersedes`, rather than deleting the old semantic claim.
|
|
29
31
|
|
|
30
32
|
On `committed_with_repairs`, inspect `effects` and execute the typed required
|
|
@@ -126,8 +126,8 @@ diagnostics (`symbol_semantic_review_needed`).
|
|
|
126
126
|
`requires_predicate`.
|
|
127
127
|
3. Scalar placement/alignment/order clauses: `kb_model` (`mode: "requirement"`), apply the strict
|
|
128
128
|
subject/property plan and `constrains` / `requires_property`.
|
|
129
|
-
4. Preserve `claim_key` / `claim_text
|
|
130
|
-
`logic_claims` manifest.
|
|
129
|
+
4. Preserve `claim_key` / `claim_text` (a missing key is derived from the
|
|
130
|
+
text); merge every key into the requirement `logic_claims` manifest.
|
|
131
131
|
5. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`.
|
|
132
132
|
6. `kb_check` with `logic-coverage`, `predicate-verifiability`, `domain-contradictions`,
|
|
133
133
|
then a final unfiltered `kb_check`.
|
|
@@ -203,7 +203,7 @@ Optional per-project workflow for recording what the screen should look like. No
|
|
|
203
203
|
2. Run `kb_model` with `mode: "analyze"` on the description; audit or supply `clauses`.
|
|
204
204
|
3. For relational layout clauses ("X must remain visually aligned with Y"), call `kb_model` with `mode: "predicates"`, apply the returned `fact_kind: predicate` plan with `predicate_name: visual_layout_rule` and `requires_predicate`.
|
|
205
205
|
4. For scalar placement, alignment, and ordering clauses, call `kb_model` with `mode: "requirement"` and apply strict `fact_kind: subject` / `fact_kind: property_value` facts linked with `constrains` / `requires_property`. Model header order as indexed property keys (`nav_order_1`, `nav_order_2`, ...) against one subject region.
|
|
206
|
-
5. Preserve `claim_key` / `claim_text` on every ground fact and merge every key into the requirement `logic_claims` manifest.
|
|
206
|
+
5. Preserve `claim_key` / `claim_text` on every ground fact (a missing `claim_key` is derived from `claim_text`) and merge every key into the requirement `logic_claims` manifest.
|
|
207
207
|
6. Model UI components as `symbol` entities with `sourceFile` and `symbol_role: behavioral`, linked `implements` to the requirement.
|
|
208
208
|
7. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`. Run `kb_check` with `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then a final unfiltered `kb_check`.
|
|
209
209
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cursor",
|
|
3
3
|
"displayName": "Kibi",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.1",
|
|
5
5
|
"description": "Optional Cursor adapter for Kibi. Requires project-local kibi-cli, kibi-mcp, and kibi-core (SWI-Prolog is bundled on Linux and macOS) before the bundled MCP server can start.",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"author": {
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
"kibi-freshness/resources/branch-lifecycle.md": "ebc01b19fe3dca8df5fc0175978963f6f1204f71f7c805cb2a5fb1b277ac78e4",
|
|
9
9
|
"kibi-freshness/resources/operation-access.md": "4e1db9294ee540cd29b8b3a2532a81e7894d5b4228b39e99ba48b37212f489f3",
|
|
10
10
|
"kibi-freshness/resources/source-authoring.md": "41a0547ce4d2a112a0f3671d36720f07c447864db3b473e94eb88a8ce2d371ff",
|
|
11
|
-
"kibi-traceability/SKILL.md": "
|
|
11
|
+
"kibi-traceability/SKILL.md": "df564438228efaf73740037ef4b1969b0638a6530a9385c9e7bf21108e8a952d",
|
|
12
12
|
"kibi-traceability/resources/branch-lifecycle.md": "50f1a6355aa9185d412b2474db1a64e112944625d2465be0adbf93ada3273c1f",
|
|
13
13
|
"kibi-traceability/resources/operation-access.md": "39f7972ab7f4ae7479e78f7072bb50e8e6c4cdf4f857425f69d2522d37db437c",
|
|
14
14
|
"kibi-traceability/resources/source-authoring.md": "408c6ee2bef1b84e0194c0538ef929c26a0a617e631b2234247388140dbbdd08",
|
|
15
15
|
"kibi-traceability/resources/traceability.md": "38c290a0bc71bd1692e115f22694743946e2f69630e134acfd43cee5f613fb88",
|
|
16
|
-
"kibi-usage/SKILL.md": "
|
|
16
|
+
"kibi-usage/SKILL.md": "4726d657b799e52f71810985287e3ba42a79a80a8d69c733a3eaa63120de3d27",
|
|
17
17
|
"kibi-usage/resources/branch-lifecycle.md": "f1bf359e9826e83c548f3cd0287f8175a62456527b0132b06b3f9f74aa59b7d6",
|
|
18
|
-
"kibi-usage/resources/fact-lanes.md": "
|
|
18
|
+
"kibi-usage/resources/fact-lanes.md": "899218f90396aa469b6e34aeb5f7ea1f38bf11bb326102319f376c213859fb33",
|
|
19
19
|
"kibi-usage/resources/kb-improvement.md": "a8408fce27342bdce6415a6718599e53fe00bb33aa1fd3dc42353ec6f61adcd7",
|
|
20
20
|
"kibi-usage/resources/logic-ir.md": "0e8ce8aad07433ab4803ec169149ff6c4e1cf8cf010af18fa6fd67862d9be807",
|
|
21
21
|
"kibi-usage/resources/operation-access.md": "eb455796c066787ffd3fae8db0db1d3e87a84265a57f06ae61e30103cd6aed66",
|
|
22
22
|
"kibi-usage/resources/proof.md": "2348819078034dd3df25664c4c707ff98f17520bbbd335bff4f48611cf672bb3",
|
|
23
23
|
"kibi-usage/resources/relationship-directions.md": "0fdd67032c2d15299f772845fc4f807eb9435b09507bd87a5911ab33db2f143d",
|
|
24
|
-
"kibi-usage/resources/source-authoring.md": "
|
|
25
|
-
"kibi-usage/resources/ui-requirements.md": "
|
|
26
|
-
"kibi-usage/resources/workflows.md": "
|
|
24
|
+
"kibi-usage/resources/source-authoring.md": "cad93f1e0ae08a676f2de7492f9227677880302327e74d159618fea86ca50abe",
|
|
25
|
+
"kibi-usage/resources/ui-requirements.md": "f99c2a9a73bbb7bd92ce1f231db3056d544588be149a5b0d3f7cc6f28bc9eee9",
|
|
26
|
+
"kibi-usage/resources/workflows.md": "36e7511c1b1b66dc59e8332501225cf121f0e0ce61d0b5870a052afc237f8ed9"
|
|
27
27
|
}
|
|
@@ -43,10 +43,12 @@ sequential `kb_upsert`, then run final check and coverage. Kibi authors tracked
|
|
|
43
43
|
files transactionally but never Git-stages or commits them. Do not read or edit
|
|
44
44
|
`.kb` directly.
|
|
45
45
|
|
|
46
|
-
Use `kb_delete` only for intentional cleanup
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
Use `kb_delete` only for intentional cleanup; `dryRun: true` previews any
|
|
47
|
+
delete without writing. Authored entity deletion returns `outcome:
|
|
48
|
+
plan_returned` with a hash-bound plan whose `nextActions[0].input` is the exact
|
|
49
|
+
`kb_apply_plan` input; requirements return `supersession_required` and evolve
|
|
50
|
+
through a new requirement linked with `supersedes`. Relationship deletes patch
|
|
51
|
+
shards while preserving unrelated records.
|
|
50
52
|
|
|
51
53
|
## Typed recovery and proof
|
|
52
54
|
|
|
@@ -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.
|
|
5
|
+
version: 2.16.1
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -188,8 +188,9 @@ returns `status: error`, `MIGRATION_PLAN_REFUSED` and `data.outcome:
|
|
|
188
188
|
refused`: nothing changed, so read the action `detail` and get a new plan.
|
|
189
189
|
`data.outcome: reconciliation_required` (status success) means an action
|
|
190
190
|
failed mid-way: inspect its effect before retrying. `kb_delete` of an
|
|
191
|
-
authored entity returns status success with `deleted: 0
|
|
192
|
-
|
|
191
|
+
authored entity returns status success with `deleted: 0` and `outcome:
|
|
192
|
+
plan_returned` (or `supersession_required` for a requirement): nothing was
|
|
193
|
+
deleted yet, and `nextActions` names the call that does it. If the status is
|
|
193
194
|
`committed_with_repairs`, the mutation already committed: inspect failed effects,
|
|
194
195
|
execute each required repair action in order, and never retry the original
|
|
195
196
|
operation. Record effect failures, followed actions, and unsafe retries in
|
|
@@ -285,8 +286,13 @@ authored. Each one is the order the write path accepts.
|
|
|
285
286
|
existing entity, whose stored ledger Kibi keeps.
|
|
286
287
|
2. **Changing the text of a grounded requirement.** New prose means new
|
|
287
288
|
claim keys, so a bare rewrite is refused with `modeled proposition
|
|
288
|
-
claim_keys must match logical grounding target claim_keys exactly
|
|
289
|
-
|
|
289
|
+
claim_keys must match logical grounding target claim_keys exactly`; the
|
|
290
|
+
error names the modeled keys no fact declares and the facts whose keys
|
|
291
|
+
the ledger dropped. Analyze the new prose with the requirement's `id`
|
|
292
|
+
first: the receipt warns `Claim-key drift against the stored ledger`
|
|
293
|
+
and names the grounded clauses the new wording drops (the title worded
|
|
294
|
+
differently from the stored `semantic_text` is the usual cause), before
|
|
295
|
+
any write. Prefer supersession for a change of meaning: analyze the new prose,
|
|
290
296
|
write its facts, write the new requirement (`-v2`) with `supersedes` to
|
|
291
297
|
the old one, then set the old one to `status: closed`. Its scenario
|
|
292
298
|
follows the same rule as in recipe 1: create the new scenario (with
|
|
@@ -302,12 +308,18 @@ authored. Each one is the order the write path accepts.
|
|
|
302
308
|
between the two writes `kb_check` reports the requirement until the
|
|
303
309
|
second lands.
|
|
304
310
|
3. **Deleting authored entities.** `kb_delete` on an authored entity that
|
|
305
|
-
is not a requirement (scenario, test, fact, ADR, …)
|
|
306
|
-
`
|
|
307
|
-
`
|
|
308
|
-
|
|
309
|
-
`
|
|
310
|
-
|
|
311
|
+
is not a requirement (scenario, test, fact, ADR, …) writes nothing and
|
|
312
|
+
returns `outcome: plan_returned` with a hash-bound
|
|
313
|
+
`kibi.entity-deletion-plan.v1` in `deletionPlan`. After review, run
|
|
314
|
+
`nextActions[0]` unchanged: `kb_apply_plan` with its `input` (`plan` plus
|
|
315
|
+
`approvedPlanHash: plan.planHash`), or repeat the `kb_delete` call with
|
|
316
|
+
`approvedPlanHash` to apply the freshly computed plan in one step (a
|
|
317
|
+
changed source fails with `DELETE_PLAN_HASH_MISMATCH`). `dryRun: true`
|
|
318
|
+
previews relationship and direct deletes without writing. For an
|
|
319
|
+
authored requirement the result is `outcome: supersession_required`, the
|
|
320
|
+
plan carries `supersessionRequired: true` and both routes refuse it
|
|
321
|
+
(`REQUIREMENT_SUPERSESSION_REQUIRED`): Kibi never deletes an authored
|
|
322
|
+
requirement. Evolve it instead with a new
|
|
311
323
|
requirement linked by `supersedes` and close the old one, or, for an
|
|
312
324
|
agent-origin requirement nobody approved and nothing links to, upsert it
|
|
313
325
|
with `status: closed` (keep its `title`); it stays on disk as history. A
|
|
@@ -342,6 +354,29 @@ human sets `approved_by`; `kb_check` flags approvals an agent recorded without
|
|
|
342
354
|
corroboration. Never fill in an approval yourself. Record why a requirement
|
|
343
355
|
exists in `rationale`, or link the ADR that explains it.
|
|
344
356
|
|
|
357
|
+
## Decision firmness
|
|
358
|
+
|
|
359
|
+
Requirements and ADRs carry `firmness`, which says what you may do with them.
|
|
360
|
+
Search answers, `kb_query` rows and hook snippets show it (snippets label only
|
|
361
|
+
`[firm]` and `[exploratory]`; an unlabeled decision is `default`).
|
|
362
|
+
|
|
363
|
+
- `firm`: a human stated it as a rule. Follow it; to change it, ask first.
|
|
364
|
+
`kb_check` blocks a firm decision without `origin.ref` to their words, and
|
|
365
|
+
a replacement of a firm decision that is not itself firm.
|
|
366
|
+
- `default` (when absent): a delegated or agent choice. Follow it unless the
|
|
367
|
+
task gives evidence against it; then supersede it in the same change and
|
|
368
|
+
list it under "Decisions I changed" for review, without asking first.
|
|
369
|
+
- `exploratory`: a flagged guess; revisit it when you touch the area.
|
|
370
|
+
|
|
371
|
+
Set `firmness` from what a human actually said: only their stated rule is
|
|
372
|
+
`firm` (with `origin.ref`); "do whatever" or your own pick is `default`; a
|
|
373
|
+
guess is `exploratory`. A supersede needs `## Why this changed` in the new
|
|
374
|
+
entity's body (at least 12 words): name the evidence (a failing test, a
|
|
375
|
+
measured cost, a constraint the old decision missed, a new requirement) and
|
|
376
|
+
answer the old decision's reasoning; `kb_check` blocks it otherwise. A
|
|
377
|
+
preference is not evidence: propose it instead of superseding. Kibi checks
|
|
378
|
+
only that a firm decision has a reference; never cite words nobody said.
|
|
379
|
+
|
|
345
380
|
Conditional clauses ("only when", "only if", "must not ... unless") compile
|
|
346
381
|
into typed `forbid` rules linked by `requires_rule`, not property facts; one
|
|
347
382
|
`kb_model` or `kb_compile_intent` cannot translate stays an `ontology_gap`.
|
|
@@ -369,6 +404,8 @@ For each relational clause, call `kb_model` with `mode: "predicates"`, that clau
|
|
|
369
404
|
reviewed `schemaId`. If `binding_status` is `incomplete`, supply
|
|
370
405
|
`argumentBindings` and retry. Persist `fact_kind: predicate` with the same
|
|
371
406
|
`claim_key` / `claim_text`, then link `REQ -> fact` with `requires_predicate`.
|
|
407
|
+
`claim_key` is derived from `claim_text`, so a ground fact may send the exact
|
|
408
|
+
clause alone and Kibi fills the key in; a sent key must equal the derived one.
|
|
372
409
|
Use `kb_model` with `mode: "requirement"` for strict scalar clauses. Use
|
|
373
410
|
`fact_kind: observation` only for a true ontology gap. The manifest is not
|
|
374
411
|
grounding: run `logic-coverage` so each key binds to one ground fact.
|
|
@@ -419,7 +456,17 @@ a second grounding link would fail, so keep the existing link or apply the
|
|
|
419
456
|
`kb_delete` of the old link, requirement link; between the last two `kb_check`
|
|
420
457
|
reports both `logic-coverage` and `strict-req-fact-pairing` for the
|
|
421
458
|
requirement, as `expected.kbCheckAfterStep` states; run `kb_check` after the
|
|
422
|
-
last step and apply `rollback` if it is not clean)
|
|
459
|
+
last step and apply `rollback` if it is not clean). `keep_existing_grounding`
|
|
460
|
+
means the requirement already links a predicate fact with the candidate's
|
|
461
|
+
`canonical_key` (`existingGrounding[].matchedBy` is `canonical_key` when the
|
|
462
|
+
claim was worded differently), so write nothing. `extend_requirement` means
|
|
463
|
+
the requirement's proposition ledger has no entry for this text, so a link
|
|
464
|
+
cannot be made and no fact is planned: add the clause to the requirement's
|
|
465
|
+
prose (`mode: "requirement"`, or `kb_upsert` with the extended `semantic_text`
|
|
466
|
+
and the ledger `mode: "analyze"` returns) and call `mode: "predicates"` again.
|
|
467
|
+
Read `decisionConflicts` and its warnings whenever `plan` is null: they name
|
|
468
|
+
the stored decision facts the candidate would contradict and the requirements
|
|
469
|
+
that own them. `provide_argument_bindings` and `record_ontology_gap` mean
|
|
423
470
|
the same as for an ungrounded claim, and the gap observation is not a grounding
|
|
424
471
|
link, so write it exactly as returned (tags, `claim_text`, `document.body`, no
|
|
425
472
|
`claim_key`, no relationships). Record an ontology gap only when no returned schema fits the
|
|
@@ -6,7 +6,7 @@ Requirement prose remains the human-readable source. Facts add queryable semanti
|
|
|
6
6
|
|
|
7
7
|
Logical coverage is clause-based, not entity-based. Give `kb_model` (`mode: "analyze"`) the complete requirement body and verify that its `clauses` list contains every atomic obligation. Supply the `clauses` input yourself when automatic splitting would combine or omit obligations. For every normative clause:
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- put the exact clause as `claim_text` on its ground fact, with the returned stable key as `claim_key` or none (Kibi derives a missing key; a sent key must match);
|
|
10
10
|
- add the key to the exact current `logic_claims` set, removing only stale keys whose propositions no longer exist in the source;
|
|
11
11
|
- link it through exactly one `requires_property` for `property_value`, one `requires_predicate` for `predicate`, or one `requires_rule` for a safe `rule` fact;
|
|
12
12
|
- leave ambiguity and ontology gaps visibly unresolved—observations do not satisfy `logic-coverage`.
|
|
@@ -23,8 +23,10 @@ drift diagnostic. Unresolved Git index conflicts are likewise blocking; Kibi
|
|
|
23
23
|
never chooses a merge winner.
|
|
24
24
|
|
|
25
25
|
Relationship upserts and relationship deletes patch only the canonical shard,
|
|
26
|
-
preserving unrelated records. Authored entity deletion
|
|
27
|
-
|
|
26
|
+
preserving unrelated records. Authored entity deletion writes nothing and
|
|
27
|
+
returns a hash-bound plan (`outcome: plan_returned`); approve it by running the
|
|
28
|
+
returned `nextActions[0]` (`kb_apply_plan` with `{plan, approvedPlanHash}`)
|
|
29
|
+
unchanged, or by repeating `kb_delete` with `approvedPlanHash`. Evolve requirements with a new
|
|
28
30
|
requirement and `supersedes`, rather than deleting the old semantic claim.
|
|
29
31
|
|
|
30
32
|
On `committed_with_repairs`, inspect `effects` and execute the typed required
|
|
@@ -126,8 +126,8 @@ diagnostics (`symbol_semantic_review_needed`).
|
|
|
126
126
|
`requires_predicate`.
|
|
127
127
|
3. Scalar placement/alignment/order clauses: `kb_model` (`mode: "requirement"`), apply the strict
|
|
128
128
|
subject/property plan and `constrains` / `requires_property`.
|
|
129
|
-
4. Preserve `claim_key` / `claim_text
|
|
130
|
-
`logic_claims` manifest.
|
|
129
|
+
4. Preserve `claim_key` / `claim_text` (a missing key is derived from the
|
|
130
|
+
text); merge every key into the requirement `logic_claims` manifest.
|
|
131
131
|
5. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`.
|
|
132
132
|
6. `kb_check` with `logic-coverage`, `predicate-verifiability`, `domain-contradictions`,
|
|
133
133
|
then a final unfiltered `kb_check`.
|
|
@@ -203,7 +203,7 @@ Optional per-project workflow for recording what the screen should look like. No
|
|
|
203
203
|
2. Run `kb_model` with `mode: "analyze"` on the description; audit or supply `clauses`.
|
|
204
204
|
3. For relational layout clauses ("X must remain visually aligned with Y"), call `kb_model` with `mode: "predicates"`, apply the returned `fact_kind: predicate` plan with `predicate_name: visual_layout_rule` and `requires_predicate`.
|
|
205
205
|
4. For scalar placement, alignment, and ordering clauses, call `kb_model` with `mode: "requirement"` and apply strict `fact_kind: subject` / `fact_kind: property_value` facts linked with `constrains` / `requires_property`. Model header order as indexed property keys (`nav_order_1`, `nav_order_2`, ...) against one subject region.
|
|
206
|
-
5. Preserve `claim_key` / `claim_text` on every ground fact and merge every key into the requirement `logic_claims` manifest.
|
|
206
|
+
5. Preserve `claim_key` / `claim_text` on every ground fact (a missing `claim_key` is derived from `claim_text`) and merge every key into the requirement `logic_claims` manifest.
|
|
207
207
|
6. Model UI components as `symbol` entities with `sourceFile` and `symbol_role: behavioral`, linked `implements` to the requirement.
|
|
208
208
|
7. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`. Run `kb_check` with `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then a final unfiltered `kb_check`.
|
|
209
209
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cursor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Kibi Cursor plugin - thin adapter for Cursor MCP integration and editor hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"kibi-agent-core": "^0.
|
|
62
|
+
"kibi-agent-core": "^0.4.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/node": "latest",
|
package/skills/.canon-hash.json
CHANGED
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
"kibi-freshness/resources/branch-lifecycle.md": "ebc01b19fe3dca8df5fc0175978963f6f1204f71f7c805cb2a5fb1b277ac78e4",
|
|
9
9
|
"kibi-freshness/resources/operation-access.md": "4e1db9294ee540cd29b8b3a2532a81e7894d5b4228b39e99ba48b37212f489f3",
|
|
10
10
|
"kibi-freshness/resources/source-authoring.md": "41a0547ce4d2a112a0f3671d36720f07c447864db3b473e94eb88a8ce2d371ff",
|
|
11
|
-
"kibi-traceability/SKILL.md": "
|
|
11
|
+
"kibi-traceability/SKILL.md": "df564438228efaf73740037ef4b1969b0638a6530a9385c9e7bf21108e8a952d",
|
|
12
12
|
"kibi-traceability/resources/branch-lifecycle.md": "50f1a6355aa9185d412b2474db1a64e112944625d2465be0adbf93ada3273c1f",
|
|
13
13
|
"kibi-traceability/resources/operation-access.md": "39f7972ab7f4ae7479e78f7072bb50e8e6c4cdf4f857425f69d2522d37db437c",
|
|
14
14
|
"kibi-traceability/resources/source-authoring.md": "408c6ee2bef1b84e0194c0538ef929c26a0a617e631b2234247388140dbbdd08",
|
|
15
15
|
"kibi-traceability/resources/traceability.md": "38c290a0bc71bd1692e115f22694743946e2f69630e134acfd43cee5f613fb88",
|
|
16
|
-
"kibi-usage/SKILL.md": "
|
|
16
|
+
"kibi-usage/SKILL.md": "4726d657b799e52f71810985287e3ba42a79a80a8d69c733a3eaa63120de3d27",
|
|
17
17
|
"kibi-usage/resources/branch-lifecycle.md": "f1bf359e9826e83c548f3cd0287f8175a62456527b0132b06b3f9f74aa59b7d6",
|
|
18
|
-
"kibi-usage/resources/fact-lanes.md": "
|
|
18
|
+
"kibi-usage/resources/fact-lanes.md": "899218f90396aa469b6e34aeb5f7ea1f38bf11bb326102319f376c213859fb33",
|
|
19
19
|
"kibi-usage/resources/kb-improvement.md": "a8408fce27342bdce6415a6718599e53fe00bb33aa1fd3dc42353ec6f61adcd7",
|
|
20
20
|
"kibi-usage/resources/logic-ir.md": "0e8ce8aad07433ab4803ec169149ff6c4e1cf8cf010af18fa6fd67862d9be807",
|
|
21
21
|
"kibi-usage/resources/operation-access.md": "eb455796c066787ffd3fae8db0db1d3e87a84265a57f06ae61e30103cd6aed66",
|
|
22
22
|
"kibi-usage/resources/proof.md": "2348819078034dd3df25664c4c707ff98f17520bbbd335bff4f48611cf672bb3",
|
|
23
23
|
"kibi-usage/resources/relationship-directions.md": "0fdd67032c2d15299f772845fc4f807eb9435b09507bd87a5911ab33db2f143d",
|
|
24
|
-
"kibi-usage/resources/source-authoring.md": "
|
|
25
|
-
"kibi-usage/resources/ui-requirements.md": "
|
|
26
|
-
"kibi-usage/resources/workflows.md": "
|
|
24
|
+
"kibi-usage/resources/source-authoring.md": "cad93f1e0ae08a676f2de7492f9227677880302327e74d159618fea86ca50abe",
|
|
25
|
+
"kibi-usage/resources/ui-requirements.md": "f99c2a9a73bbb7bd92ce1f231db3056d544588be149a5b0d3f7cc6f28bc9eee9",
|
|
26
|
+
"kibi-usage/resources/workflows.md": "36e7511c1b1b66dc59e8332501225cf121f0e0ce61d0b5870a052afc237f8ed9"
|
|
27
27
|
}
|
|
@@ -43,10 +43,12 @@ sequential `kb_upsert`, then run final check and coverage. Kibi authors tracked
|
|
|
43
43
|
files transactionally but never Git-stages or commits them. Do not read or edit
|
|
44
44
|
`.kb` directly.
|
|
45
45
|
|
|
46
|
-
Use `kb_delete` only for intentional cleanup
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
Use `kb_delete` only for intentional cleanup; `dryRun: true` previews any
|
|
47
|
+
delete without writing. Authored entity deletion returns `outcome:
|
|
48
|
+
plan_returned` with a hash-bound plan whose `nextActions[0].input` is the exact
|
|
49
|
+
`kb_apply_plan` input; requirements return `supersession_required` and evolve
|
|
50
|
+
through a new requirement linked with `supersedes`. Relationship deletes patch
|
|
51
|
+
shards while preserving unrelated records.
|
|
50
52
|
|
|
51
53
|
## Typed recovery and proof
|
|
52
54
|
|
|
@@ -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.
|
|
5
|
+
version: 2.16.1
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -188,8 +188,9 @@ returns `status: error`, `MIGRATION_PLAN_REFUSED` and `data.outcome:
|
|
|
188
188
|
refused`: nothing changed, so read the action `detail` and get a new plan.
|
|
189
189
|
`data.outcome: reconciliation_required` (status success) means an action
|
|
190
190
|
failed mid-way: inspect its effect before retrying. `kb_delete` of an
|
|
191
|
-
authored entity returns status success with `deleted: 0
|
|
192
|
-
|
|
191
|
+
authored entity returns status success with `deleted: 0` and `outcome:
|
|
192
|
+
plan_returned` (or `supersession_required` for a requirement): nothing was
|
|
193
|
+
deleted yet, and `nextActions` names the call that does it. If the status is
|
|
193
194
|
`committed_with_repairs`, the mutation already committed: inspect failed effects,
|
|
194
195
|
execute each required repair action in order, and never retry the original
|
|
195
196
|
operation. Record effect failures, followed actions, and unsafe retries in
|
|
@@ -285,8 +286,13 @@ authored. Each one is the order the write path accepts.
|
|
|
285
286
|
existing entity, whose stored ledger Kibi keeps.
|
|
286
287
|
2. **Changing the text of a grounded requirement.** New prose means new
|
|
287
288
|
claim keys, so a bare rewrite is refused with `modeled proposition
|
|
288
|
-
claim_keys must match logical grounding target claim_keys exactly
|
|
289
|
-
|
|
289
|
+
claim_keys must match logical grounding target claim_keys exactly`; the
|
|
290
|
+
error names the modeled keys no fact declares and the facts whose keys
|
|
291
|
+
the ledger dropped. Analyze the new prose with the requirement's `id`
|
|
292
|
+
first: the receipt warns `Claim-key drift against the stored ledger`
|
|
293
|
+
and names the grounded clauses the new wording drops (the title worded
|
|
294
|
+
differently from the stored `semantic_text` is the usual cause), before
|
|
295
|
+
any write. Prefer supersession for a change of meaning: analyze the new prose,
|
|
290
296
|
write its facts, write the new requirement (`-v2`) with `supersedes` to
|
|
291
297
|
the old one, then set the old one to `status: closed`. Its scenario
|
|
292
298
|
follows the same rule as in recipe 1: create the new scenario (with
|
|
@@ -302,12 +308,18 @@ authored. Each one is the order the write path accepts.
|
|
|
302
308
|
between the two writes `kb_check` reports the requirement until the
|
|
303
309
|
second lands.
|
|
304
310
|
3. **Deleting authored entities.** `kb_delete` on an authored entity that
|
|
305
|
-
is not a requirement (scenario, test, fact, ADR, …)
|
|
306
|
-
`
|
|
307
|
-
`
|
|
308
|
-
|
|
309
|
-
`
|
|
310
|
-
|
|
311
|
+
is not a requirement (scenario, test, fact, ADR, …) writes nothing and
|
|
312
|
+
returns `outcome: plan_returned` with a hash-bound
|
|
313
|
+
`kibi.entity-deletion-plan.v1` in `deletionPlan`. After review, run
|
|
314
|
+
`nextActions[0]` unchanged: `kb_apply_plan` with its `input` (`plan` plus
|
|
315
|
+
`approvedPlanHash: plan.planHash`), or repeat the `kb_delete` call with
|
|
316
|
+
`approvedPlanHash` to apply the freshly computed plan in one step (a
|
|
317
|
+
changed source fails with `DELETE_PLAN_HASH_MISMATCH`). `dryRun: true`
|
|
318
|
+
previews relationship and direct deletes without writing. For an
|
|
319
|
+
authored requirement the result is `outcome: supersession_required`, the
|
|
320
|
+
plan carries `supersessionRequired: true` and both routes refuse it
|
|
321
|
+
(`REQUIREMENT_SUPERSESSION_REQUIRED`): Kibi never deletes an authored
|
|
322
|
+
requirement. Evolve it instead with a new
|
|
311
323
|
requirement linked by `supersedes` and close the old one, or, for an
|
|
312
324
|
agent-origin requirement nobody approved and nothing links to, upsert it
|
|
313
325
|
with `status: closed` (keep its `title`); it stays on disk as history. A
|
|
@@ -342,6 +354,29 @@ human sets `approved_by`; `kb_check` flags approvals an agent recorded without
|
|
|
342
354
|
corroboration. Never fill in an approval yourself. Record why a requirement
|
|
343
355
|
exists in `rationale`, or link the ADR that explains it.
|
|
344
356
|
|
|
357
|
+
## Decision firmness
|
|
358
|
+
|
|
359
|
+
Requirements and ADRs carry `firmness`, which says what you may do with them.
|
|
360
|
+
Search answers, `kb_query` rows and hook snippets show it (snippets label only
|
|
361
|
+
`[firm]` and `[exploratory]`; an unlabeled decision is `default`).
|
|
362
|
+
|
|
363
|
+
- `firm`: a human stated it as a rule. Follow it; to change it, ask first.
|
|
364
|
+
`kb_check` blocks a firm decision without `origin.ref` to their words, and
|
|
365
|
+
a replacement of a firm decision that is not itself firm.
|
|
366
|
+
- `default` (when absent): a delegated or agent choice. Follow it unless the
|
|
367
|
+
task gives evidence against it; then supersede it in the same change and
|
|
368
|
+
list it under "Decisions I changed" for review, without asking first.
|
|
369
|
+
- `exploratory`: a flagged guess; revisit it when you touch the area.
|
|
370
|
+
|
|
371
|
+
Set `firmness` from what a human actually said: only their stated rule is
|
|
372
|
+
`firm` (with `origin.ref`); "do whatever" or your own pick is `default`; a
|
|
373
|
+
guess is `exploratory`. A supersede needs `## Why this changed` in the new
|
|
374
|
+
entity's body (at least 12 words): name the evidence (a failing test, a
|
|
375
|
+
measured cost, a constraint the old decision missed, a new requirement) and
|
|
376
|
+
answer the old decision's reasoning; `kb_check` blocks it otherwise. A
|
|
377
|
+
preference is not evidence: propose it instead of superseding. Kibi checks
|
|
378
|
+
only that a firm decision has a reference; never cite words nobody said.
|
|
379
|
+
|
|
345
380
|
Conditional clauses ("only when", "only if", "must not ... unless") compile
|
|
346
381
|
into typed `forbid` rules linked by `requires_rule`, not property facts; one
|
|
347
382
|
`kb_model` or `kb_compile_intent` cannot translate stays an `ontology_gap`.
|
|
@@ -369,6 +404,8 @@ For each relational clause, call `kb_model` with `mode: "predicates"`, that clau
|
|
|
369
404
|
reviewed `schemaId`. If `binding_status` is `incomplete`, supply
|
|
370
405
|
`argumentBindings` and retry. Persist `fact_kind: predicate` with the same
|
|
371
406
|
`claim_key` / `claim_text`, then link `REQ -> fact` with `requires_predicate`.
|
|
407
|
+
`claim_key` is derived from `claim_text`, so a ground fact may send the exact
|
|
408
|
+
clause alone and Kibi fills the key in; a sent key must equal the derived one.
|
|
372
409
|
Use `kb_model` with `mode: "requirement"` for strict scalar clauses. Use
|
|
373
410
|
`fact_kind: observation` only for a true ontology gap. The manifest is not
|
|
374
411
|
grounding: run `logic-coverage` so each key binds to one ground fact.
|
|
@@ -419,7 +456,17 @@ a second grounding link would fail, so keep the existing link or apply the
|
|
|
419
456
|
`kb_delete` of the old link, requirement link; between the last two `kb_check`
|
|
420
457
|
reports both `logic-coverage` and `strict-req-fact-pairing` for the
|
|
421
458
|
requirement, as `expected.kbCheckAfterStep` states; run `kb_check` after the
|
|
422
|
-
last step and apply `rollback` if it is not clean)
|
|
459
|
+
last step and apply `rollback` if it is not clean). `keep_existing_grounding`
|
|
460
|
+
means the requirement already links a predicate fact with the candidate's
|
|
461
|
+
`canonical_key` (`existingGrounding[].matchedBy` is `canonical_key` when the
|
|
462
|
+
claim was worded differently), so write nothing. `extend_requirement` means
|
|
463
|
+
the requirement's proposition ledger has no entry for this text, so a link
|
|
464
|
+
cannot be made and no fact is planned: add the clause to the requirement's
|
|
465
|
+
prose (`mode: "requirement"`, or `kb_upsert` with the extended `semantic_text`
|
|
466
|
+
and the ledger `mode: "analyze"` returns) and call `mode: "predicates"` again.
|
|
467
|
+
Read `decisionConflicts` and its warnings whenever `plan` is null: they name
|
|
468
|
+
the stored decision facts the candidate would contradict and the requirements
|
|
469
|
+
that own them. `provide_argument_bindings` and `record_ontology_gap` mean
|
|
423
470
|
the same as for an ungrounded claim, and the gap observation is not a grounding
|
|
424
471
|
link, so write it exactly as returned (tags, `claim_text`, `document.body`, no
|
|
425
472
|
`claim_key`, no relationships). Record an ontology gap only when no returned schema fits the
|
|
@@ -6,7 +6,7 @@ Requirement prose remains the human-readable source. Facts add queryable semanti
|
|
|
6
6
|
|
|
7
7
|
Logical coverage is clause-based, not entity-based. Give `kb_model` (`mode: "analyze"`) the complete requirement body and verify that its `clauses` list contains every atomic obligation. Supply the `clauses` input yourself when automatic splitting would combine or omit obligations. For every normative clause:
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- put the exact clause as `claim_text` on its ground fact, with the returned stable key as `claim_key` or none (Kibi derives a missing key; a sent key must match);
|
|
10
10
|
- add the key to the exact current `logic_claims` set, removing only stale keys whose propositions no longer exist in the source;
|
|
11
11
|
- link it through exactly one `requires_property` for `property_value`, one `requires_predicate` for `predicate`, or one `requires_rule` for a safe `rule` fact;
|
|
12
12
|
- leave ambiguity and ontology gaps visibly unresolved—observations do not satisfy `logic-coverage`.
|
|
@@ -23,8 +23,10 @@ drift diagnostic. Unresolved Git index conflicts are likewise blocking; Kibi
|
|
|
23
23
|
never chooses a merge winner.
|
|
24
24
|
|
|
25
25
|
Relationship upserts and relationship deletes patch only the canonical shard,
|
|
26
|
-
preserving unrelated records. Authored entity deletion
|
|
27
|
-
|
|
26
|
+
preserving unrelated records. Authored entity deletion writes nothing and
|
|
27
|
+
returns a hash-bound plan (`outcome: plan_returned`); approve it by running the
|
|
28
|
+
returned `nextActions[0]` (`kb_apply_plan` with `{plan, approvedPlanHash}`)
|
|
29
|
+
unchanged, or by repeating `kb_delete` with `approvedPlanHash`. Evolve requirements with a new
|
|
28
30
|
requirement and `supersedes`, rather than deleting the old semantic claim.
|
|
29
31
|
|
|
30
32
|
On `committed_with_repairs`, inspect `effects` and execute the typed required
|
|
@@ -126,8 +126,8 @@ diagnostics (`symbol_semantic_review_needed`).
|
|
|
126
126
|
`requires_predicate`.
|
|
127
127
|
3. Scalar placement/alignment/order clauses: `kb_model` (`mode: "requirement"`), apply the strict
|
|
128
128
|
subject/property plan and `constrains` / `requires_property`.
|
|
129
|
-
4. Preserve `claim_key` / `claim_text
|
|
130
|
-
`logic_claims` manifest.
|
|
129
|
+
4. Preserve `claim_key` / `claim_text` (a missing key is derived from the
|
|
130
|
+
text); merge every key into the requirement `logic_claims` manifest.
|
|
131
131
|
5. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`.
|
|
132
132
|
6. `kb_check` with `logic-coverage`, `predicate-verifiability`, `domain-contradictions`,
|
|
133
133
|
then a final unfiltered `kb_check`.
|
|
@@ -203,7 +203,7 @@ Optional per-project workflow for recording what the screen should look like. No
|
|
|
203
203
|
2. Run `kb_model` with `mode: "analyze"` on the description; audit or supply `clauses`.
|
|
204
204
|
3. For relational layout clauses ("X must remain visually aligned with Y"), call `kb_model` with `mode: "predicates"`, apply the returned `fact_kind: predicate` plan with `predicate_name: visual_layout_rule` and `requires_predicate`.
|
|
205
205
|
4. For scalar placement, alignment, and ordering clauses, call `kb_model` with `mode: "requirement"` and apply strict `fact_kind: subject` / `fact_kind: property_value` facts linked with `constrains` / `requires_property`. Model header order as indexed property keys (`nav_order_1`, `nav_order_2`, ...) against one subject region.
|
|
206
|
-
5. Preserve `claim_key` / `claim_text` on every ground fact and merge every key into the requirement `logic_claims` manifest.
|
|
206
|
+
5. Preserve `claim_key` / `claim_text` on every ground fact (a missing `claim_key` is derived from `claim_text`) and merge every key into the requirement `logic_claims` manifest.
|
|
207
207
|
6. Model UI components as `symbol` entities with `sourceFile` and `symbol_role: behavioral`, linked `implements` to the requirement.
|
|
208
208
|
7. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`. Run `kb_check` with `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then a final unfiltered `kb_check`.
|
|
209
209
|
|