kibi-cursor 2.8.2 → 2.9.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 +67 -0
- package/README.md +3 -3
- package/agent-plugin/plugin.json +1 -1
- package/agent-plugin/skills/kibi-commit-review/SKILL.md +125 -0
- package/agent-plugin/skills/kibi-commit-review/resources/staged-gate.md +98 -0
- package/agent-plugin/skills/kibi-decisions/SKILL.md +130 -0
- package/agent-plugin/skills/kibi-decisions/resources/decision-records.md +142 -0
- package/agent-plugin/skills/kibi-decisions/resources/signoff-views.md +66 -0
- package/agent-plugin/skills/kibi-freshness/SKILL.md +3 -1
- package/agent-plugin/skills/kibi-traceability/SKILL.md +4 -0
- package/agent-plugin/skills/kibi-usage/SKILL.md +21 -16
- package/agent-plugin/skills/kibi-usage/resources/proof.md +36 -4
- package/agent-plugin/skills/kibi-usage/resources/workflows.md +1 -1
- package/commands/kibi-signoff.md +26 -0
- package/dist/.cursor-plugin/plugin.json +1 -1
- package/dist/commands/kibi-signoff.md +26 -0
- package/dist/hook-runner.js +14 -7
- package/dist/skills/.canon-hash.json +10 -5
- package/dist/skills/kibi-commit-review/SKILL.md +125 -0
- package/dist/skills/kibi-commit-review/resources/staged-gate.md +98 -0
- package/dist/skills/kibi-decisions/SKILL.md +130 -0
- package/dist/skills/kibi-decisions/resources/decision-records.md +142 -0
- package/dist/skills/kibi-decisions/resources/signoff-views.md +66 -0
- package/dist/skills/kibi-freshness/SKILL.md +3 -1
- package/dist/skills/kibi-traceability/SKILL.md +4 -0
- package/dist/skills/kibi-usage/SKILL.md +21 -16
- package/dist/skills/kibi-usage/resources/proof.md +36 -4
- package/dist/skills/kibi-usage/resources/workflows.md +1 -1
- package/package.json +2 -2
- package/skills/.canon-hash.json +10 -5
- package/skills/kibi-commit-review/SKILL.md +125 -0
- package/skills/kibi-commit-review/resources/staged-gate.md +98 -0
- package/skills/kibi-decisions/SKILL.md +130 -0
- package/skills/kibi-decisions/resources/decision-records.md +142 -0
- package/skills/kibi-decisions/resources/signoff-views.md +66 -0
- package/skills/kibi-freshness/SKILL.md +3 -1
- package/skills/kibi-traceability/SKILL.md +4 -0
- package/skills/kibi-usage/SKILL.md +21 -16
- package/skills/kibi-usage/resources/proof.md +36 -4
- package/skills/kibi-usage/resources/workflows.md +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: kibi-freshness
|
|
3
3
|
name: kibi-freshness
|
|
4
4
|
description: Check exact Git attachment, branch migration/quarantine, compiled-store freshness, source linkage, and repair state before decisions or writes.
|
|
5
|
-
version: 2.
|
|
5
|
+
version: 2.1.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -53,6 +53,8 @@ echo '{}' | npx --no-install kibi status --input -
|
|
|
53
53
|
`committed_with_repairs`, follow required typed `nextActions`; never retry the
|
|
54
54
|
original operation.
|
|
55
55
|
|
|
56
|
+
For every freshness, branch, or completion question, call `kb_status` first, then `kb_query` the entities and source files that status names, then `kb_check` as the last Kibi call before answering. Never skip the query step, even when status alone seems to answer the question. If another query or write follows a check, run `kb_check` again before answering. When asked whether requirements are consistent or proven, run `kb_query`, then `kb_check` with the rules `domain-contradictions`, `kb-consistency` and `kb-consistency-unresolved`, then `kb_coverage`, and read whether the analysis was complete. `domain-contradictions` compares facts two at a time; `kb-consistency` checks every fact of a property together, so a clean pairwise result is not proof. Report a `kb-consistency` violation as a conflict, name every requirement it lists, and give superseding or changing one of them as the next step; never edit or delete facts to make the check pass. Report a context `kb-consistency-unresolved` names as unresolved, never as consistent, with the step that would make it comparable. Report any unmodeled or unknown clause as incomplete analysis, not as consistent. Only when every clause is fully modeled and compatible, state plainly that no conflict was found. For authorized knowledge changes, keep the exact supplied target and intended relationship edges, and discover and query those targets first. Validate the payload with `kb_upsert` and `dryRun: true`, then perform the authorized `kb_upsert` with that same payload and read the result back exactly before the final checks. A passing dry run is validation, not completion. Distinct authorized payloads may need several sequential writes, each validated and read back, but never retry a mutation that already committed. If a mutation returns `committed_with_repairs`, follow its typed `nextActions` instead of repeating the original operation.
|
|
57
|
+
|
|
56
58
|
## Guidance
|
|
57
59
|
|
|
58
60
|
- Treat MCP and the trusted project-local CLI as equal peer surfaces.
|
|
@@ -29,6 +29,8 @@ interfaces. Select the surface by capability; neither is semantically preferred.
|
|
|
29
29
|
For CLI JSON, use a dedicated route such as
|
|
30
30
|
`printf '%s\n' '{}' | kibi status --input -`.
|
|
31
31
|
|
|
32
|
+
For every traceability answer, begin with `kb_search` even when an identifier is already named, then exact-filter with `kb_query`, inspect relationships with `kb_graph`, and make `kb_status` the final Kibi call, including after `kb_graph` or `kb_coverage`; report no conclusions until that closing `kb_status` returns. When judging scenario feasibility, ground each step in the queried requirements, scenarios, tests, and symbols, and state missing links, ambiguity, or stale evidence explicitly rather than inferring them. For authorized coverage or link work, keep the exact supplied target and intended edges, discover and query those targets, then validate the payload with `kb_upsert` and `dryRun: true`. A passing dry run is only validation, not completion: next perform the real `kb_upsert` with the same payload, exact-read the result back with `kb_query`, run `kb_check` and `kb_coverage`, report the resulting proof state, and finish with `kb_status`. Distinct authorized payloads may each need their own sequential dry run and write, so there is no single-write limit, but never retry a mutation that already committed; on `committed_with_repairs`, execute the typed repair action instead.
|
|
33
|
+
|
|
32
34
|
## Workflow
|
|
33
35
|
|
|
34
36
|
Use the visible approved MCP tools or trusted project-local CLI as equal peer
|
|
@@ -50,6 +52,8 @@ plan_returned` with a hash-bound plan whose `nextActions[0].input` is the exact
|
|
|
50
52
|
through a new requirement linked with `supersedes`. Relationship deletes patch
|
|
51
53
|
shards while preserving unrelated records.
|
|
52
54
|
|
|
55
|
+
For executable coverage work, keep the production symbol's implements link to its requirement and link that same production symbol to its qualifying test with covered_by; reserve executable_for for a symbol that stands for the executable test itself, and never put executable_for on a symbol that also carries production ownership or coverage. Preserve the exact supplied target and intended edges, discover and query those targets, validate the payload with `kb_upsert` and `dryRun: true`, then perform the authorized real `kb_upsert` with the same payload and exact-read the result with `kb_query` before final checks, because validation alone is not completion. A passing dry run does not guarantee the commit: if the real `kb_upsert` returns an error, read its message and correct only the conflicting relationship on the same target rather than working around it with a new entity, then validate again with `dryRun: true`, write again, and exact-read it back. Distinct authorized payloads may each need their own sequential validation and write, so there is no single write limit, but never retry a mutation that already committed; on `committed_with_repairs`, execute the typed repair action instead. Then run `kb_check` and `kb_coverage`, report the proof and verification state they return, treating a dirty verification snapshot after a write as expected rather than as a failure, and finish with `kb_status`.
|
|
56
|
+
|
|
53
57
|
## Typed recovery and proof
|
|
54
58
|
|
|
55
59
|
Parse `kibiProtocol`, `resultVersion`, `status`, `effects`, diagnostics, and
|
|
@@ -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.24.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -121,6 +121,10 @@ component that renders it) with `implements` through `kb_upsert`. Without a read
|
|
|
121
121
|
still answers and `kibi sync` regenerates the manifest. The search tip and the
|
|
122
122
|
`.kb/` note appear once per session and need no action.
|
|
123
123
|
|
|
124
|
+
Before you edit a source file that Kibi tracks, run `kb_search` with that file in `sourceLocations`, and treat both its ranked results and its `data.answer` layer as discovery only, not as the governing text. Then call `kb_query` by `id` on each current governing requirement that the search names, read what each one requires, and make the edit only after those exact reads. A `kb_check`, `kb_status` or `kb_coverage` result does not replace that `kb_query` read. This rule only adds an exact read before the edit and does not change the order of any other step in this workflow. It adds nothing to a modeling or write task: that task still ends with the real `kb_upsert` of every planned fact and requirement and the closing `kb_check`.
|
|
125
|
+
|
|
126
|
+
For an edit that keeps the governing rule, limit the consultation before the edit to exactly two Kibi calls: `kb_search` with the file in `sourceLocations`, then one `kb_query` (by the governing requirement's `id`, or by `sourceFile` when several requirements govern the file). Do not start with `kb_status`, and do not repeat the search or the query before editing; run `kb_status`, `kb_check` and `kb_coverage` after the edit. This limit applies only to source edits. A task that models a claim keeps its full order, one step after the other: `kb_search`, then the exact `kb_query` of the supplied target, then `kb_model` with `mode: "analyze"` on the complete claim, then `mode: "predicates"` for each relational clause, then `kb_model` with `mode: "requirement"` for a strict or typed-rule clause, and only then the real `kb_upsert` of every planned fact and requirement and the closing `kb_check`. Never call `kb_model` before that exact `kb_query`, and never stop at a dry run.
|
|
127
|
+
|
|
124
128
|
## Safe workflow
|
|
125
129
|
|
|
126
130
|
1. Always discover before you mutate: start with `kb_search`, then exact-filter with `kb_query`. Use
|
|
@@ -164,7 +168,7 @@ End every task with these five independent fields:
|
|
|
164
168
|
taskOutcome: complete | interim | blocked
|
|
165
169
|
kbState: clean_fresh | stale | dirty | legacy_compat | not_evaluated
|
|
166
170
|
verificationState: fresh | dirty | unavailable | not_evaluated
|
|
167
|
-
proofState:
|
|
171
|
+
proofState: tested | mixed | unresolved | not_evaluated
|
|
168
172
|
limitationDisposition: none | accepted | unaccepted | not_applicable
|
|
169
173
|
```
|
|
170
174
|
|
|
@@ -356,7 +360,9 @@ authored. Each one is the order the write path accepts.
|
|
|
356
360
|
|
|
357
361
|
Entities record `origin` (`kind`: `human`, `agent`, `migration`, or `import`,
|
|
358
362
|
plus optional `ref` and `approved_by`). `kb_upsert` records `kind: agent` on
|
|
359
|
-
entities you create; leave `origin.approved_by` to the person who reviews them
|
|
363
|
+
entities you create; leave `origin.approved_by` to the person who reviews them,
|
|
364
|
+
and ask for that review with `kibi signoff` (see `kibi-decisions`), never with
|
|
365
|
+
a summary in your own words.
|
|
360
366
|
An exception (a requirement that `exempts` another) exempts nothing until a
|
|
361
367
|
human sets `approved_by`; `kb_check` flags approvals an agent recorded without
|
|
362
368
|
corroboration. Never fill in an approval yourself. Record why a requirement
|
|
@@ -365,6 +371,8 @@ exists in `rationale`, or link the ADR that explains it.
|
|
|
365
371
|
## Decision firmness
|
|
366
372
|
|
|
367
373
|
Requirements and ADRs carry `firmness`, which says what you may do with them.
|
|
374
|
+
Load `kibi-decisions` when a person states a rule, a hook asks before an edit
|
|
375
|
+
of firm code, or a request conflicts with a recorded rule.
|
|
368
376
|
Search answers, `kb_query` rows and hook snippets show it (snippets label only
|
|
369
377
|
`[firm: ask before changing]` and `[exploratory]`; an unlabeled decision is
|
|
370
378
|
`default`).
|
|
@@ -394,17 +402,12 @@ task or in reply: then supersede it with `firmness: firm` and `origin.ref` to
|
|
|
394
402
|
their words (or, for a correction they asked for in place, update it with
|
|
395
403
|
`origin.ref` to those words), and say in the final answer which rule changed.
|
|
396
404
|
|
|
397
|
-
Set `firmness` from what a human actually said: only their stated
|
|
398
|
-
`firm` (with `origin.ref`
|
|
399
|
-
guess is `exploratory`.
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
words): name the evidence (a failing test, a measured cost, a constraint the
|
|
404
|
-
old decision missed, a new requirement, the person's instruction) and answer
|
|
405
|
-
the old decision's reasoning; `kb_check` blocks it otherwise. A preference is
|
|
406
|
-
not evidence: propose it instead of superseding. Kibi checks only that a firm
|
|
407
|
-
decision has a reference; never cite words nobody said.
|
|
405
|
+
Set `firmness` explicitly from what a human actually said: only their stated
|
|
406
|
+
rule is `firm` (with `origin.ref` to their words); your own pick is `default`;
|
|
407
|
+
a guess is `exploratory`. A supersede needs a `## Why this changed` section of
|
|
408
|
+
at least 12 words naming the evidence; a preference is not evidence. Never
|
|
409
|
+
cite words nobody said. `kibi-decisions` has the recording and supersede
|
|
410
|
+
payloads.
|
|
408
411
|
|
|
409
412
|
Conditional clauses ("only when", "only if", "must not ... unless") compile
|
|
410
413
|
into typed `forbid` rules linked by `requires_rule`, not property facts; one
|
|
@@ -418,7 +421,8 @@ read `unresolved` as consistent. Compare the intent with each candidate's
|
|
|
418
421
|
`statement`, then compile again with `conflictReviews`
|
|
419
422
|
(`{requirementId, verdict: "conflict" | "no_conflict", note}`). On a conflict
|
|
420
423
|
the plan is `blocked`: ask the human which rule holds (a firm requirement is
|
|
421
|
-
theirs), then supersede or change it, or change the intent
|
|
424
|
+
theirs), then supersede or change it, or change the intent (see
|
|
425
|
+
`kibi-decisions`).
|
|
422
426
|
|
|
423
427
|
## Semantic and proof guardrails
|
|
424
428
|
|
|
@@ -558,4 +562,5 @@ retrying the same payload; inspect the typed error and `nextActions`.
|
|
|
558
562
|
Kibi may now author tracked Markdown/YAML evidence transactionally. The former
|
|
559
563
|
statement “Kibi operation writes do not automatically stage markdown evidence”
|
|
560
564
|
means Kibi writes do not Git-stage it: review and commit remain ordinary Git
|
|
561
|
-
workflows.
|
|
565
|
+
workflows. When `kibi check --staged` or the pre-commit hook blocks a commit,
|
|
566
|
+
load `kibi-commit-review`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Proof and Verification Workflow
|
|
2
2
|
|
|
3
|
-
Use this resource when a requirement must be
|
|
3
|
+
Use this resource when a requirement must be tested end to end before handoff, when
|
|
4
4
|
wiring a proof-bearing test, or when `kb_ingest_proof` or `kibi prove`
|
|
5
5
|
rejected evidence.
|
|
6
6
|
|
|
@@ -97,9 +97,9 @@ Cosmetic edits (descriptions, labels) never stale proof. Execution-relevant
|
|
|
97
97
|
edits (command, artifact, targets, options, bindings, contract) change the
|
|
98
98
|
effective fingerprint and do.
|
|
99
99
|
|
|
100
|
-
## What counts toward
|
|
100
|
+
## What counts toward proofTested
|
|
101
101
|
|
|
102
|
-
A requirement
|
|
102
|
+
A requirement reaches `proofStatus: tested` only through its scenarios' tests, and a scenario test
|
|
103
103
|
counts only when it is an **end-to-end** test with a valid, fresh, passing
|
|
104
104
|
receipt for the current snapshot.
|
|
105
105
|
|
|
@@ -109,7 +109,7 @@ receipt for the current snapshot.
|
|
|
109
109
|
`source` path contains `e2e`) counts as end-to-end; anything else is
|
|
110
110
|
`unknown` scope.
|
|
111
111
|
- A `unit` or `integration` receipt is still recorded on the test entity, but
|
|
112
|
-
it does not move `
|
|
112
|
+
it does not move `proofTested` for a behavioural requirement: the
|
|
113
113
|
requirement keeps the `missing_passing_e2e` gap in `proofGaps`. The one
|
|
114
114
|
exception is a scenario whose specifying requirements are all grounded only
|
|
115
115
|
in component-scope UI predicates (`ui_pattern`, `same_pattern`,
|
|
@@ -120,6 +120,38 @@ receipt for the current snapshot.
|
|
|
120
120
|
receipt does not change it, and a `passing` status without a fresh receipt
|
|
121
121
|
proves nothing.
|
|
122
122
|
|
|
123
|
+
## Evidence levels
|
|
124
|
+
|
|
125
|
+
Every requirement row also carries `evidenceLevel`, the strength of what backs
|
|
126
|
+
it, and `evidence`, the entries that earned it (each with `kind`, `scope` and
|
|
127
|
+
`level`):
|
|
128
|
+
|
|
129
|
+
- `proved`: a re-checkable certificate covers every case. No proof kind issues
|
|
130
|
+
certificates yet, so nothing reaches it today.
|
|
131
|
+
- `tested`: `proofStatus` is `tested`; fresh E2E receipts cover every linked
|
|
132
|
+
scenario.
|
|
133
|
+
- `asserted`: a person stands behind the statement (approved, or firm by
|
|
134
|
+
`firmness` or a non-agent origin) but nothing current checks it.
|
|
135
|
+
- `unverified`: an agent wrote it, no person approved it, nothing checks it.
|
|
136
|
+
|
|
137
|
+
Report the level as it is. Never call an `asserted` or `unverified`
|
|
138
|
+
requirement proven or tested, and never call `tested` proved. Firmness is a
|
|
139
|
+
separate axis: it says how sure the person is, not how strong the evidence is.
|
|
140
|
+
|
|
141
|
+
## Knowledge-base certificates
|
|
142
|
+
|
|
143
|
+
`kb_check` (`kibi check`) proves facts about the KB itself in its
|
|
144
|
+
`kb-consistency` rule and re-checks each answer with an independent checker:
|
|
145
|
+
property facts are consistent (a model per subject, property and scope, or an
|
|
146
|
+
irreducible contradiction core), predicate facts and allow/deny decisions are
|
|
147
|
+
consistent, and stored rules are stratified. It catches facts that contradict
|
|
148
|
+
only together, which the pairwise `domain-contradictions` rule misses. A
|
|
149
|
+
`kb-consistency` violation names the core facts and the requirements behind
|
|
150
|
+
them: supersede or change one of those requirements; never edit the facts so
|
|
151
|
+
the check passes. Quote a `kb-consistency-unresolved` diagnostic as
|
|
152
|
+
unresolved, never as consistent. Opposing rule pairs and scenario
|
|
153
|
+
feasibility are not certified yet; their own rules still decide them.
|
|
154
|
+
|
|
123
155
|
## Attempt semantics (factual, never optimistic)
|
|
124
156
|
|
|
125
157
|
- `attempts: {status: "complete", entries: [...]}` — known history; the
|
|
@@ -9,7 +9,7 @@ success flag):
|
|
|
9
9
|
taskOutcome: complete | interim | blocked
|
|
10
10
|
kbState: clean_fresh | stale | dirty | legacy_compat | not_evaluated
|
|
11
11
|
verificationState: fresh | dirty | unavailable | not_evaluated
|
|
12
|
-
proofState:
|
|
12
|
+
proofState: tested | mixed | unresolved | not_evaluated
|
|
13
13
|
limitationDisposition: none | accepted | unaccepted | not_applicable
|
|
14
14
|
```
|
|
15
15
|
|